]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/missing-lifetime-in-assoc-const-type.stderr
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / missing-lifetime-in-assoc-const-type.stderr
1 error[E0106]: missing lifetime specifier
2   --> $DIR/missing-lifetime-in-assoc-const-type.rs:2:14
3    |
4 LL |     const A: &str = "";
5    |              ^ expected named lifetime parameter
6    |
7 help: consider introducing a named lifetime parameter
8    |
9 LL ~ trait ZstAssert<'a>: Sized {
10 LL ~     const A: &'a str = "";
11    |
12
13 error[E0106]: missing lifetime specifier
14   --> $DIR/missing-lifetime-in-assoc-const-type.rs:3:14
15    |
16 LL |     const B: S = S { s: &() };
17    |              ^ expected named lifetime parameter
18    |
19 help: consider introducing a named lifetime parameter
20    |
21 LL ~ trait ZstAssert<'a>: Sized {
22 LL |     const A: &str = "";
23 LL ~     const B: S<'a> = S { s: &() };
24    |
25
26 error[E0106]: missing lifetime specifier
27   --> $DIR/missing-lifetime-in-assoc-const-type.rs:4:15
28    |
29 LL |     const C: &'_ str = "";
30    |               ^^ expected named lifetime parameter
31    |
32 help: consider introducing a named lifetime parameter
33    |
34 LL ~ trait ZstAssert<'a>: Sized {
35 LL |     const A: &str = "";
36 LL |     const B: S = S { s: &() };
37 LL ~     const C: &'a str = "";
38    |
39
40 error[E0106]: missing lifetime specifiers
41   --> $DIR/missing-lifetime-in-assoc-const-type.rs:5:14
42    |
43 LL |     const D: T = T { a: &(), b: &() };
44    |              ^ expected 2 lifetime parameters
45    |
46 help: consider introducing a named lifetime parameter
47    |
48 LL ~ trait ZstAssert<'a>: Sized {
49 LL |     const A: &str = "";
50 LL |     const B: S = S { s: &() };
51 LL |     const C: &'_ str = "";
52 LL ~     const D: T<'a, 'a> = T { a: &(), b: &() };
53    |
54
55 error: aborting due to 4 previous errors
56
57 For more information about this error, try `rustc --explain E0106`.