|
1 |
| -warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing |
2 |
| - --> $DIR/defaults-unsound-62211-1.rs:52:5 |
| 1 | +error[E0277]: `Self` doesn't implement `std::fmt::Display` |
| 2 | + --> $DIR/defaults-unsound-62211-1.rs:24:96 |
3 | 3 | |
|
4 |
| -LL | drop(origin); |
5 |
| - | ^^^^^------^ |
6 |
| - | | |
7 |
| - | argument has type `<T as UncheckedCopy>::Output` |
| 4 | +LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self; |
| 5 | + | ^^^^ `Self` cannot be formatted with the default formatter |
8 | 6 | |
|
9 |
| - = note: `#[warn(dropping_copy_types)]` on by default |
10 |
| -help: use `let _ = ...` to ignore the expression or result |
| 7 | + = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead |
| 8 | +note: required by a bound in `UncheckedCopy::Output` |
| 9 | + --> $DIR/defaults-unsound-62211-1.rs:24:86 |
11 | 10 | |
|
12 |
| -LL - drop(origin); |
13 |
| -LL + let _ = origin; |
| 11 | +LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self; |
| 12 | + | ^^^^^^^ required by this bound in `UncheckedCopy::Output` |
| 13 | +help: consider further restricting `Self` |
14 | 14 | |
|
| 15 | +LL | trait UncheckedCopy: Sized + std::fmt::Display { |
| 16 | + | +++++++++++++++++++ |
15 | 17 |
|
16 |
| -warning: 1 warning emitted |
| 18 | +error[E0277]: cannot add-assign `&'static str` to `Self` |
| 19 | + --> $DIR/defaults-unsound-62211-1.rs:24:96 |
| 20 | + | |
| 21 | +LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self; |
| 22 | + | ^^^^ no implementation for `Self += &'static str` |
| 23 | + | |
| 24 | +note: required by a bound in `UncheckedCopy::Output` |
| 25 | + --> $DIR/defaults-unsound-62211-1.rs:24:47 |
| 26 | + | |
| 27 | +LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self; |
| 28 | + | ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output` |
| 29 | +help: consider further restricting `Self` |
| 30 | + | |
| 31 | +LL | trait UncheckedCopy: Sized + AddAssign<&'static str> { |
| 32 | + | +++++++++++++++++++++++++ |
| 33 | + |
| 34 | +error[E0271]: type mismatch resolving `<Self as Deref>::Target == str` |
| 35 | + --> $DIR/defaults-unsound-62211-1.rs:24:96 |
| 36 | + | |
| 37 | +LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self; |
| 38 | + | ^^^^ types differ |
| 39 | + | |
| 40 | +note: required by a bound in `UncheckedCopy::Output` |
| 41 | + --> $DIR/defaults-unsound-62211-1.rs:24:31 |
| 42 | + | |
| 43 | +LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self; |
| 44 | + | ^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output` |
| 45 | + |
| 46 | +error[E0277]: the trait bound `Self: Deref` is not satisfied |
| 47 | + --> $DIR/defaults-unsound-62211-1.rs:24:96 |
| 48 | + | |
| 49 | +LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self; |
| 50 | + | ^^^^ the trait `Deref` is not implemented for `Self` |
| 51 | + | |
| 52 | +note: required by a bound in `UncheckedCopy::Output` |
| 53 | + --> $DIR/defaults-unsound-62211-1.rs:24:25 |
| 54 | + | |
| 55 | +LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self; |
| 56 | + | ^^^^^^^^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output` |
| 57 | +help: consider further restricting `Self` |
| 58 | + | |
| 59 | +LL | trait UncheckedCopy: Sized + Deref { |
| 60 | + | +++++++ |
| 61 | + |
| 62 | +error[E0277]: the trait bound `Self: Copy` is not satisfied |
| 63 | + --> $DIR/defaults-unsound-62211-1.rs:24:96 |
| 64 | + | |
| 65 | +LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self; |
| 66 | + | ^^^^ the trait `Copy` is not implemented for `Self` |
| 67 | + | |
| 68 | +note: required by a bound in `UncheckedCopy::Output` |
| 69 | + --> $DIR/defaults-unsound-62211-1.rs:24:18 |
| 70 | + | |
| 71 | +LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self; |
| 72 | + | ^^^^ required by this bound in `UncheckedCopy::Output` |
| 73 | +help: consider further restricting `Self` |
| 74 | + | |
| 75 | +LL | trait UncheckedCopy: Sized + Copy { |
| 76 | + | ++++++ |
| 77 | + |
| 78 | +error: aborting due to 5 previous errors |
17 | 79 |
|
| 80 | +Some errors have detailed explanations: E0271, E0277. |
| 81 | +For more information about an error, try `rustc --explain E0271`. |
0 commit comments