Skip to content

Commit 333dce9

Browse files
committed
add regression test for rust-lang#68596
1 parent e009b53 commit 333dce9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// check-pass
2+
#![feature(const_generics)]
3+
#![allow(incomplete_features)]
4+
5+
pub struct S(u8);
6+
7+
impl S {
8+
pub fn get<const A: u8>(&self) -> &u8 {
9+
&self.0
10+
}
11+
}
12+
13+
fn main() {
14+
const A: u8 = 5;
15+
let s = S(0);
16+
17+
s.get::<A>();
18+
}

0 commit comments

Comments
 (0)