|
| 1 | +error[E0261]: use of undeclared lifetime name `'a` |
| 2 | + --> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:22:68 |
| 3 | + | |
| 4 | +LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } } |
| 5 | + | ^^ undeclared lifetime |
| 6 | + | |
| 7 | +help: consider introducing lifetime `'a` here |
| 8 | + | |
| 9 | +LL | reuse <u8 as Trait>::{foo'a, , bar, meh} { &const { InvariantRef::<'a>::NEW } } |
| 10 | + | +++ |
| 11 | +help: consider introducing lifetime `'a` here |
| 12 | + | |
| 13 | +LL | impl<'a> Trait for Z { |
| 14 | + | ++++ |
| 15 | + |
| 16 | +error[E0261]: use of undeclared lifetime name `'a` |
| 17 | + --> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:22:68 |
| 18 | + | |
| 19 | +LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } } |
| 20 | + | ^^ undeclared lifetime |
| 21 | + | |
| 22 | +help: consider introducing lifetime `'a` here |
| 23 | + | |
| 24 | +LL | reuse <u8 as Trait>::{foo, bar'a, , meh} { &const { InvariantRef::<'a>::NEW } } |
| 25 | + | +++ |
| 26 | +help: consider introducing lifetime `'a` here |
| 27 | + | |
| 28 | +LL | impl<'a> Trait for Z { |
| 29 | + | ++++ |
| 30 | + |
| 31 | +error[E0261]: use of undeclared lifetime name `'a` |
| 32 | + --> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:22:68 |
| 33 | + | |
| 34 | +LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } } |
| 35 | + | ^^ undeclared lifetime |
| 36 | + | |
| 37 | +help: consider introducing lifetime `'a` here |
| 38 | + | |
| 39 | +LL | reuse <u8 as Trait>::{foo, bar, meh'a, } { &const { InvariantRef::<'a>::NEW } } |
| 40 | + | +++ |
| 41 | +help: consider introducing lifetime `'a` here |
| 42 | + | |
| 43 | +LL | impl<'a> Trait for Z { |
| 44 | + | ++++ |
| 45 | + |
| 46 | +error[E0599]: no function or associated item named `new` found for struct `InvariantRef` in the current scope |
| 47 | + --> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:9:41 |
| 48 | + | |
| 49 | +LL | pub struct InvariantRef<'a, T: ?Sized>(&'a T, PhantomData<&'a mut &'a T>); |
| 50 | + | -------------------------------------- function or associated item `new` not found for this struct |
| 51 | +... |
| 52 | +LL | pub const NEW: Self = InvariantRef::new(&()); |
| 53 | + | ^^^ function or associated item not found in `InvariantRef<'_, _>` |
| 54 | + |
| 55 | +error[E0308]: mismatched types |
| 56 | + --> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:22:53 |
| 57 | + | |
| 58 | +LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } } |
| 59 | + | ^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `InvariantRef<'_, ()>` |
| 60 | + | |
| 61 | + = note: expected type `u8` |
| 62 | + found struct `InvariantRef<'_, ()>` |
| 63 | + |
| 64 | +error[E0277]: the trait bound `u8: Trait` is not satisfied |
| 65 | + --> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:22:12 |
| 66 | + | |
| 67 | +LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } } |
| 68 | + | ^^ the trait `Trait` is not implemented for `u8` |
| 69 | + | |
| 70 | + = help: the trait `Trait` is implemented for `Z` |
| 71 | + |
| 72 | +error[E0308]: mismatched types |
| 73 | + --> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:22:53 |
| 74 | + | |
| 75 | +LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } } |
| 76 | + | ^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `InvariantRef<'_, ()>` |
| 77 | + | |
| 78 | + = note: expected type `u8` |
| 79 | + found struct `InvariantRef<'_, ()>` |
| 80 | + = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 81 | + |
| 82 | +error[E0277]: the trait bound `u8: Trait` is not satisfied |
| 83 | + --> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:22:12 |
| 84 | + | |
| 85 | +LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } } |
| 86 | + | ^^ the trait `Trait` is not implemented for `u8` |
| 87 | + | |
| 88 | + = help: the trait `Trait` is implemented for `Z` |
| 89 | + = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 90 | + |
| 91 | +error[E0308]: mismatched types |
| 92 | + --> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:22:53 |
| 93 | + | |
| 94 | +LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } } |
| 95 | + | ^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `InvariantRef<'_, ()>` |
| 96 | + | |
| 97 | + = note: expected type `u8` |
| 98 | + found struct `InvariantRef<'_, ()>` |
| 99 | + = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 100 | + |
| 101 | +error[E0277]: the trait bound `u8: Trait` is not satisfied |
| 102 | + --> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:22:12 |
| 103 | + | |
| 104 | +LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } } |
| 105 | + | ^^ the trait `Trait` is not implemented for `u8` |
| 106 | + | |
| 107 | + = help: the trait `Trait` is implemented for `Z` |
| 108 | + = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 109 | + |
| 110 | +error: aborting due to 10 previous errors |
| 111 | + |
| 112 | +Some errors have detailed explanations: E0261, E0277, E0308, E0599. |
| 113 | +For more information about an error, try `rustc --explain E0261`. |
0 commit comments