summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/issues/issue-68596.rs
blob: c3c9141e424d401f65402bddc139c51961bf2ae0 (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>();
}