]> git.lizzy.rs Git - rust.git/blob - tests/ui/generics/issue-65285-incorrect-explicit-lifetime-name-needed.rs
Rollup merge of #107331 - GuillaumeGomez:cleanup-js, r=notriddle
[rust.git] / tests / ui / generics / issue-65285-incorrect-explicit-lifetime-name-needed.rs
1 #![crate_type="lib"]
2
3 struct Nested<K>(K);
4
5 fn should_error<T>() where T : Into<&u32> {}
6 //~^ ERROR `&` without an explicit lifetime name cannot be used here [E0637]
7
8 trait X<'a, K: 'a> {
9     fn foo<'b, L: X<&'b Nested<K>>>();
10     //~^ ERROR missing lifetime specifier [E0106]
11     //~| ERROR the type `&'b Nested<K>` does not fulfill the required lifetime
12 }
13
14 fn bar<'b, L: X<&'b Nested<i32>>>(){}
15 //~^ ERROR missing lifetime specifier [E0106]