blob: 0bb23be1eb4ea3bea13dc7fe5cf876d78a95ea47 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// check-pass
// revisions: full min
#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(full, 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>();
}
|