]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/issues/issue-83466.rs
Rollup merge of #84221 - ABouttefeux:generic-arg-elision, r=estebank
[rust.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 supressed 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() {}