|
1 | 1 | error[E0106]: missing lifetime specifier
|
2 |
| - --> $DIR/missing-lifetime-in-assoc-const-type.rs:2:22 |
| 2 | + --> $DIR/missing-lifetime-in-assoc-const-type.rs:2:14 |
3 | 3 | |
|
4 |
| -LL | const TYPE_NAME: &str = ""; |
5 |
| - | ^ expected named lifetime parameter |
| 4 | +LL | const A: &str = ""; |
| 5 | + | ^ expected named lifetime parameter |
6 | 6 | |
|
| 7 | +help: consider using the `'static` lifetime |
| 8 | + | |
| 9 | +LL | const A: &'static str = ""; |
| 10 | + | ^^^^^^^ |
| 11 | +help: consider introducing a named lifetime parameter |
| 12 | + | |
| 13 | +LL | trait ZstAssert<'a>: Sized { |
| 14 | +LL | const A: &'a str = ""; |
| 15 | + | |
| 16 | + |
| 17 | +error[E0106]: missing lifetime specifier |
| 18 | + --> $DIR/missing-lifetime-in-assoc-const-type.rs:3:14 |
| 19 | + | |
| 20 | +LL | const B: S = S { s: &() }; |
| 21 | + | ^ expected named lifetime parameter |
| 22 | + | |
| 23 | +help: consider using the `'static` lifetime |
| 24 | + | |
| 25 | +LL | const B: S<'static> = S { s: &() }; |
| 26 | + | ^^^^^^^^^ |
| 27 | +help: consider introducing a named lifetime parameter |
| 28 | + | |
| 29 | +LL | trait ZstAssert<'a>: Sized { |
| 30 | +LL | const A: &str = ""; |
| 31 | +LL | const B: S<'a> = S { s: &() }; |
| 32 | + | |
| 33 | + |
| 34 | +error[E0106]: missing lifetime specifier |
| 35 | + --> $DIR/missing-lifetime-in-assoc-const-type.rs:4:15 |
| 36 | + | |
| 37 | +LL | const C: &'_ str = ""; |
| 38 | + | ^^ expected named lifetime parameter |
| 39 | + | |
| 40 | +help: consider using the `'static` lifetime |
| 41 | + | |
| 42 | +LL | const C: &'static str = ""; |
| 43 | + | ^^^^^^^ |
| 44 | +help: consider introducing a named lifetime parameter |
| 45 | + | |
| 46 | +LL | trait ZstAssert<'a>: Sized { |
| 47 | +LL | const A: &str = ""; |
| 48 | +LL | const B: S = S { s: &() }; |
| 49 | +LL | const C: &'a str = ""; |
| 50 | + | |
| 51 | + |
| 52 | +error[E0106]: missing lifetime specifiers |
| 53 | + --> $DIR/missing-lifetime-in-assoc-const-type.rs:5:14 |
| 54 | + | |
| 55 | +LL | const D: T = T { a: &(), b: &() }; |
| 56 | + | ^ expected 2 lifetime parameters |
| 57 | + | |
| 58 | +help: consider using the `'static` lifetime |
| 59 | + | |
| 60 | +LL | const D: T<'static, 'static> = T { a: &(), b: &() }; |
| 61 | + | ^^^^^^^^^^^^^^^^^^ |
7 | 62 | help: consider introducing a named lifetime parameter
|
8 | 63 | |
|
9 | 64 | LL | trait ZstAssert<'a>: Sized {
|
10 |
| -LL | const TYPE_NAME: &'a str = ""; |
| 65 | +LL | const A: &str = ""; |
| 66 | +LL | const B: S = S { s: &() }; |
| 67 | +LL | const C: &'_ str = ""; |
| 68 | +LL | const D: T<'a, 'a> = T { a: &(), b: &() }; |
11 | 69 | |
|
12 | 70 |
|
13 |
| -error: aborting due to previous error |
| 71 | +error: aborting due to 4 previous errors |
14 | 72 |
|
15 | 73 | For more information about this error, try `rustc --explain E0106`.
|
0 commit comments