Skip to content

Commit f1ab04f

Browse files
authored
Rollup merge of #102782 - Hosshii:issue-102124, r=Mark-Simulacrum
Add regression test for #102124 closes #102124, which was already fixed on nightly.
2 parents 825014e + 462730f commit f1ab04f

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)