|
| 1 | +error[E0261]: use of undeclared lifetime name `'s` |
| 2 | + --> $DIR/ice-mutability-error-slicing-121807.rs:17:31 |
| 3 | + | |
| 4 | +LL | extern "C" fn read_dword(&'s self) -> u16 { |
| 5 | + | ^^ undeclared lifetime |
| 6 | + | |
| 7 | +help: consider introducing lifetime `'s` here |
| 8 | + | |
| 9 | +LL | extern "C" fn read_dword<'s>(&'s self) -> u16 { |
| 10 | + | ++++ |
| 11 | +help: consider introducing lifetime `'s` here |
| 12 | + | |
| 13 | +LL | impl<'s> MemoryUnit for ROM { |
| 14 | + | ++++ |
| 15 | + |
| 16 | +warning: anonymous parameters are deprecated and will be removed in the next edition |
| 17 | + --> $DIR/ice-mutability-error-slicing-121807.rs:7:30 |
| 18 | + | |
| 19 | +LL | extern "C" fn read_dword(Self::Assoc<'_>) -> u16; |
| 20 | + | ^^^^^^^^^^^^^^^ help: try naming the parameter or explicitly ignoring it: `_: Self::Assoc<'_>` |
| 21 | + | |
| 22 | + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! |
| 23 | + = note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686> |
| 24 | + = note: `#[warn(anonymous_parameters)]` on by default |
| 25 | + |
| 26 | +error[E0220]: associated type `Assoc` not found for `Self` |
| 27 | + --> $DIR/ice-mutability-error-slicing-121807.rs:7:36 |
| 28 | + | |
| 29 | +LL | extern "C" fn read_dword(Self::Assoc<'_>) -> u16; |
| 30 | + | ^^^^^ associated type `Assoc` not found |
| 31 | + |
| 32 | +error[E0185]: method `read_dword` has a `&self` declaration in the impl, but not in the trait |
| 33 | + --> $DIR/ice-mutability-error-slicing-121807.rs:17:5 |
| 34 | + | |
| 35 | +LL | extern "C" fn read_dword(Self::Assoc<'_>) -> u16; |
| 36 | + | ------------------------------------------------- trait method declared without `&self` |
| 37 | +... |
| 38 | +LL | extern "C" fn read_dword(&'s self) -> u16 { |
| 39 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&self` used in impl |
| 40 | + |
| 41 | +error[E0046]: not all trait items implemented, missing: `read_word` |
| 42 | + --> $DIR/ice-mutability-error-slicing-121807.rs:15:1 |
| 43 | + | |
| 44 | +LL | extern "C" fn read_word(&mut self) -> u8; |
| 45 | + | ----------------------------------------- `read_word` from trait |
| 46 | +... |
| 47 | +LL | impl MemoryUnit for ROM { |
| 48 | + | ^^^^^^^^^^^^^^^^^^^^^^^ missing `read_word` in implementation |
| 49 | + |
| 50 | +error: aborting due to 4 previous errors; 1 warning emitted |
| 51 | + |
| 52 | +Some errors have detailed explanations: E0046, E0185, E0220, E0261. |
| 53 | +For more information about an error, try `rustc --explain E0046`. |
0 commit comments