diff options
Diffstat (limited to 'tests/ui/generics/issue-65285-incorrect-explicit-lifetime-name-needed.rs')
-rw-r--r-- | tests/ui/generics/issue-65285-incorrect-explicit-lifetime-name-needed.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/generics/issue-65285-incorrect-explicit-lifetime-name-needed.rs b/tests/ui/generics/issue-65285-incorrect-explicit-lifetime-name-needed.rs new file mode 100644 index 000000000..9ea9fc71b --- /dev/null +++ b/tests/ui/generics/issue-65285-incorrect-explicit-lifetime-name-needed.rs @@ -0,0 +1,15 @@ +#![crate_type="lib"] + +struct Nested<K>(K); + +fn should_error<T>() where T : Into<&u32> {} +//~^ ERROR `&` without an explicit lifetime name cannot be used here [E0637] + +trait X<'a, K: 'a> { + fn foo<'b, L: X<&'b Nested<K>>>(); + //~^ ERROR missing lifetime specifier [E0106] + //~| ERROR the type `&'b Nested<K>` does not fulfill the required lifetime +} + +fn bar<'b, L: X<&'b Nested<i32>>>(){} +//~^ ERROR missing lifetime specifier [E0106] |