]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/issues/issue-83466.rs
73c9301011d58693e52f12d50925c538d706d58f
[rustc.git] / src / test / ui / const-generics / issues / issue-83466.rs
1 // regression test for #83466- tests that generic arg mismatch errors between
2 // consts and types are not suppressed when there are explicit late bound lifetimes
3
4 struct S;
5 impl S {
6 fn func<'a, U>(self) -> U {
7 todo!()
8 }
9 }
10 fn dont_crash<'a, U>() {
11 S.func::<'a, 10_u32>()
12 //~^ WARNING cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
13 //~^^ WARNING this was previously accepted by
14 //~^^^ ERROR constant provided when a type was expected [E0747]
15 }
16
17 fn main() {}