Skip to content

Commit 462730f

Browse files
committed
Add regression test for #102124
1 parent e42c4d7 commit 462730f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
+20
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)