add regression test for #68596

This commit is contained in:
Bastian Kauschke 2020-07-16 11:54:20 +02:00
parent e009b53df4
commit 333dce960c

View 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>();
}