]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/trait-associated-constant.stderr
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / nll / trait-associated-constant.stderr
1 error[E0308]: mismatched types
2   --> $DIR/trait-associated-constant.rs:21:5
3    |
4 LL |     const AC: Option<&'c str> = None;
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
6    |
7    = note: expected type `std::option::Option<&'b str>`
8               found type `std::option::Option<&'c str>`
9 note: the lifetime 'c as defined on the impl at 20:18...
10   --> $DIR/trait-associated-constant.rs:20:18
11    |
12 LL | impl<'a: 'b, 'b, 'c> Anything<'a, 'b> for FailStruct1 {
13    |                  ^^
14 note: ...does not necessarily outlive the lifetime 'b as defined on the impl at 20:14
15   --> $DIR/trait-associated-constant.rs:20:14
16    |
17 LL | impl<'a: 'b, 'b, 'c> Anything<'a, 'b> for FailStruct1 {
18    |              ^^
19
20 error[E0308]: mismatched types
21   --> $DIR/trait-associated-constant.rs:28:5
22    |
23 LL |     const AC: Option<&'a str> = None;
24    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
25    |
26    = note: expected type `std::option::Option<&'b str>`
27               found type `std::option::Option<&'a str>`
28 note: the lifetime 'a as defined on the impl at 27:6...
29   --> $DIR/trait-associated-constant.rs:27:6
30    |
31 LL | impl<'a: 'b, 'b> Anything<'a, 'b> for FailStruct2 {
32    |      ^^
33 note: ...does not necessarily outlive the lifetime 'b as defined on the impl at 27:14
34   --> $DIR/trait-associated-constant.rs:27:14
35    |
36 LL | impl<'a: 'b, 'b> Anything<'a, 'b> for FailStruct2 {
37    |              ^^
38
39 error: aborting due to 2 previous errors
40
41 For more information about this error, try `rustc --explain E0308`.