summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/invalid-const-arg-for-type-param.rs
blob: 7d4dc98f396b4c7ccf4bcf1a62e0bdab7c693ad0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::convert::TryInto;

struct S;

fn main() {
    let _: u32 = 5i32.try_into::<32>().unwrap();
    //~^ ERROR this associated function takes

    S.f::<0>();
    //~^ ERROR no method named `f`

    S::<0>;
    //~^ ERROR this struct takes 0
}