]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/defaults-unsound-62211-2.stderr
Rollup merge of #76468 - SNCPlay42:lifetime-names, r=Mark-Simulacrum
[rust.git] / src / test / ui / associated-types / defaults-unsound-62211-2.stderr
1 error[E0277]: `Self` doesn't implement `std::fmt::Display`
2   --> $DIR/defaults-unsound-62211-2.rs:20:5
3    |
4 LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-------^^^^^^^^
6    |     |                                                                                |
7    |     |                                                                                required by this bound in `UncheckedCopy::Output`
8    |     `Self` cannot be formatted with the default formatter
9    |
10    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
11 help: consider further restricting `Self`
12    |
13 LL | trait UncheckedCopy: Sized + std::fmt::Display {
14    |                            ^^^^^^^^^^^^^^^^^^^
15
16 error[E0277]: the trait bound `Self: Deref` is not satisfied
17   --> $DIR/defaults-unsound-62211-2.rs:20:5
18    |
19 LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
20    |     ^^^^^^^^^^^^^^^^^^^^-------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21    |     |                   |
22    |     |                   required by this bound in `UncheckedCopy::Output`
23    |     the trait `Deref` is not implemented for `Self`
24    |
25 help: consider further restricting `Self`
26    |
27 LL | trait UncheckedCopy: Sized + Deref {
28    |                            ^^^^^^^
29
30 error[E0277]: cannot add-assign `&'static str` to `Self`
31   --> $DIR/defaults-unsound-62211-2.rs:20:5
32    |
33 LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
34    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
35    |     |                                         |
36    |     |                                         required by this bound in `UncheckedCopy::Output`
37    |     no implementation for `Self += &'static str`
38    |
39 help: consider further restricting `Self`
40    |
41 LL | trait UncheckedCopy: Sized + AddAssign<&'static str> {
42    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^
43
44 error[E0277]: the trait bound `Self: Copy` is not satisfied
45   --> $DIR/defaults-unsound-62211-2.rs:20:5
46    |
47 LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
48    |     ^^^^^^^^^^^^^----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
49    |     |            |
50    |     |            required by this bound in `UncheckedCopy::Output`
51    |     the trait `Copy` is not implemented for `Self`
52    |
53 help: consider further restricting `Self`
54    |
55 LL | trait UncheckedCopy: Sized + Copy {
56    |                            ^^^^^^
57
58 error: aborting due to 4 previous errors
59
60 For more information about this error, try `rustc --explain E0277`.