summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/type-dependent/issue-63695.rs
blob: 08b6d4bf554ad11f823feb00009d3e4e886e6cc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// run-pass

trait T {
    fn test<const A: i32>(&self) -> i32 { A }
}

struct S();

impl T for S {}

fn main() {
    let foo = S();
    assert_eq!(foo.test::<8i32>(), 8);
    assert_eq!(foo.test::<16i32>(), 16);
}