• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error[E0637]: `&` without an explicit lifetime name cannot be used here
2  --> $DIR/issue-65285-incorrect-explicit-lifetime-name-needed.rs:5:37
3   |
4LL | fn should_error<T>() where T : Into<&u32> {}
5   |                                     ^ explicit lifetime name needed here
6   |
7help: consider introducing a higher-ranked lifetime here
8   |
9LL | fn should_error<T>() where T : for<'a> Into<&'a u32> {}
10   |                                +++++++       ++
11
12error[E0106]: missing lifetime specifier
13  --> $DIR/issue-65285-incorrect-explicit-lifetime-name-needed.rs:9:20
14   |
15LL |     fn foo<'b, L: X<&'b Nested<K>>>();
16   |                    ^ expected named lifetime parameter
17   |
18note: these named lifetimes are available to use
19  --> $DIR/issue-65285-incorrect-explicit-lifetime-name-needed.rs:8:9
20   |
21LL | trait X<'a, K: 'a> {
22   |         ^^
23LL |     fn foo<'b, L: X<&'b Nested<K>>>();
24   |            ^^
25help: consider using one of the available lifetimes here
26   |
27LL |     fn foo<'b, L: X<'lifetime, &'b Nested<K>>>();
28   |                     ++++++++++
29
30error[E0106]: missing lifetime specifier
31  --> $DIR/issue-65285-incorrect-explicit-lifetime-name-needed.rs:13:16
32   |
33LL | fn bar<'b, L: X<&'b Nested<i32>>>(){}
34   |                ^ expected named lifetime parameter
35   |
36help: consider using the `'b` lifetime
37   |
38LL | fn bar<'b, L: X<'b, &'b Nested<i32>>>(){}
39   |                 +++
40
41error: aborting due to 3 previous errors
42
43Some errors have detailed explanations: E0106, E0637.
44For more information about an error, try `rustc --explain E0106`.
45