add regression test for #68596
This commit is contained in:
parent
e009b53df4
commit
333dce960c
18
src/test/ui/const-generics/issues/issue-68596.rs
Normal file
18
src/test/ui/const-generics/issues/issue-68596.rs
Normal file
@ -0,0 +1,18 @@
|
||||
// check-pass
|
||||
#![feature(const_generics)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
pub struct S(u8);
|
||||
|
||||
impl S {
|
||||
pub fn get<const A: u8>(&self) -> &u8 {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
const A: u8 = 5;
|
||||
let s = S(0);
|
||||
|
||||
s.get::<A>();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user