]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/missing-lifetime-in-assoc-const-type.stderr
Rollup merge of #90420 - GuillaumeGomez:rustdoc-internals-feature, r=camelid
[rust.git] / src / test / 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 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    |               ++++++++++++++++++
62 help: consider introducing a named lifetime parameter
63    |
64 LL ~ trait ZstAssert<'a>: Sized {
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: &() };
69    |
70
71 error: aborting due to 4 previous errors
72
73 For more information about this error, try `rustc --explain E0106`.