We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e42c4d7 commit 462730fCopy full SHA for 462730f
src/test/ui/const-generics/issue-102124.rs
@@ -0,0 +1,20 @@
1
+// run-pass
2
+// compile-flags: -Zmir-opt-level=3
3
+
4
+// regression test for #102124
5
6
+const L: usize = 4;
7
8
+pub trait Print<const N: usize> {
9
+ fn print(&self) -> usize {
10
+ N
11
+ }
12
+}
13
14
+pub struct Printer;
15
+impl Print<L> for Printer {}
16
17
+fn main() {
18
+ let p = Printer;
19
+ assert_eq!(p.print(), 4);
20
0 commit comments