2019-10-11 12:16:09 +00:00
|
|
|
error[E0637]: `&` without an explicit lifetime name cannot be used here
|
|
|
|
--> $DIR/issue-65285-incorrect-explicit-lifetime-name-needed.rs:5:37
|
|
|
|
|
|
|
|
|
LL | fn should_error<T>() where T : Into<&u32> {}
|
|
|
|
| ^ explicit lifetime name needed here
|
2022-12-18 03:04:21 +00:00
|
|
|
|
|
2023-06-30 00:30:50 +00:00
|
|
|
help: consider introducing a higher-ranked lifetime here
|
2022-12-18 03:04:21 +00:00
|
|
|
|
|
2023-06-30 00:30:50 +00:00
|
|
|
LL | fn should_error<T>() where T : for<'a> Into<&'a u32> {}
|
|
|
|
| +++++++ ++
|
2019-10-11 12:16:09 +00:00
|
|
|
|
2021-02-28 02:31:56 +00:00
|
|
|
error[E0106]: missing lifetime specifier
|
2022-06-05 16:33:09 +00:00
|
|
|
--> $DIR/issue-65285-incorrect-explicit-lifetime-name-needed.rs:9:20
|
2019-10-11 12:16:09 +00:00
|
|
|
|
|
|
|
|
LL | fn foo<'b, L: X<&'b Nested<K>>>();
|
2022-06-05 16:33:09 +00:00
|
|
|
| ^ expected named lifetime parameter
|
2020-04-17 17:46:22 +00:00
|
|
|
|
|
|
|
|
note: these named lifetimes are available to use
|
2020-04-22 19:42:02 +00:00
|
|
|
--> $DIR/issue-65285-incorrect-explicit-lifetime-name-needed.rs:8:9
|
2020-04-17 17:46:22 +00:00
|
|
|
|
|
|
|
|
LL | trait X<'a, K: 'a> {
|
|
|
|
| ^^
|
|
|
|
LL | fn foo<'b, L: X<&'b Nested<K>>>();
|
|
|
|
| ^^
|
|
|
|
help: consider using one of the available lifetimes here
|
|
|
|
|
|
|
|
|
LL | fn foo<'b, L: X<'lifetime, &'b Nested<K>>>();
|
2021-06-22 02:07:19 +00:00
|
|
|
| ++++++++++
|
2019-10-11 12:16:09 +00:00
|
|
|
|
2022-06-05 16:33:09 +00:00
|
|
|
error[E0106]: missing lifetime specifier
|
2023-02-03 23:21:56 +00:00
|
|
|
--> $DIR/issue-65285-incorrect-explicit-lifetime-name-needed.rs:13:16
|
2022-06-05 16:33:09 +00:00
|
|
|
|
|
|
|
|
LL | fn bar<'b, L: X<&'b Nested<i32>>>(){}
|
|
|
|
| ^ expected named lifetime parameter
|
|
|
|
|
|
|
|
|
help: consider using the `'b` lifetime
|
|
|
|
|
|
|
|
|
LL | fn bar<'b, L: X<'b, &'b Nested<i32>>>(){}
|
|
|
|
| +++
|
|
|
|
|
2023-02-03 23:21:56 +00:00
|
|
|
error: aborting due to 3 previous errors
|
2019-10-11 12:16:09 +00:00
|
|
|
|
2023-02-03 23:21:56 +00:00
|
|
|
Some errors have detailed explanations: E0106, E0637.
|
2020-02-07 17:44:31 +00:00
|
|
|
For more information about an error, try `rustc --explain E0106`.
|