summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/issues/issue-83466.rs
blob: 73c9301011d58693e52f12d50925c538d706d58f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// regression test for #83466- tests that generic arg mismatch errors between
// consts and types are not suppressed when there are explicit late bound lifetimes

struct S;
impl S {
    fn func<'a, U>(self) -> U {
        todo!()
    }
}
fn dont_crash<'a, U>() {
    S.func::<'a, 10_u32>()
    //~^ WARNING cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
    //~^^ WARNING this was previously accepted by
    //~^^^ ERROR constant provided when a type was expected [E0747]
}

fn main() {}