add regression test for #68596
This commit is contained in:
parent
e009b53df4
commit
333dce960c
1 changed files with 18 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue