about summary refs log tree commit diff
path: root/tests/ui/const-generics/issues/issue-68596.rs
blob: 9e450adf5ee547c6b00e2e4ae485ebfc98a71849 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@ check-pass
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>();
}