]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/issues/issue-68596.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / const-generics / issues / issue-68596.rs
1 // check-pass
2 // revisions: full min
3 #![cfg_attr(full, feature(const_generics))]
4 #![cfg_attr(full, allow(incomplete_features))]
5 #![cfg_attr(min, feature(min_const_generics))]
6
7 pub struct S(u8);
8
9 impl S {
10 pub fn get<const A: u8>(&self) -> &u8 {
11 &self.0
12 }
13 }
14
15 fn main() {
16 const A: u8 = 5;
17 let s = S(0);
18
19 s.get::<A>();
20 }