]> git.proxmox.com Git - rustc.git/blob - src/test/ui/nll/trait-associated-constant.stderr
Update upstream source from tag 'upstream/1.31.0_beta.4+dfsg1'
[rustc.git] / src / test / ui / nll / trait-associated-constant.stderr
1 error[E0308]: mismatched types
2 --> $DIR/trait-associated-constant.rs:31: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 30:18...
10 --> $DIR/trait-associated-constant.rs:30: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 30:14
15 --> $DIR/trait-associated-constant.rs:30: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:38: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 37:6...
29 --> $DIR/trait-associated-constant.rs:37: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 37:14
34 --> $DIR/trait-associated-constant.rs:37: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`.