]> git.proxmox.com Git - rustc.git/blob - src/test/ui/associated-types/defaults-unsound-62211-2.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / associated-types / defaults-unsound-62211-2.stderr
1 error[E0277]: the trait bound `Self: Copy` is not satisfied
2 --> $DIR/defaults-unsound-62211-2.rs:21:18
3 |
4 LL | trait UncheckedCopy: Sized {
5 | -------------------------- required by `UncheckedCopy`
6 ...
7 LL | type Output: Copy
8 | ^^^^ the trait `Copy` is not implemented for `Self`
9 |
10 help: consider further restricting `Self`
11 |
12 LL | trait UncheckedCopy: Sized + Copy {
13 | ^^^^^^
14
15 error[E0277]: cannot add-assign `&'static str` to `Self`
16 --> $DIR/defaults-unsound-62211-2.rs:25:7
17 |
18 LL | trait UncheckedCopy: Sized {
19 | -------------------------- required by `UncheckedCopy`
20 ...
21 LL | + AddAssign<&'static str>
22 | ^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `Self += &'static str`
23 |
24 help: consider further restricting `Self`
25 |
26 LL | trait UncheckedCopy: Sized + AddAssign<&'static str> {
27 | ^^^^^^^^^^^^^^^^^^^^^^^^^
28
29 error[E0277]: the trait bound `Self: Deref` is not satisfied
30 --> $DIR/defaults-unsound-62211-2.rs:23:7
31 |
32 LL | trait UncheckedCopy: Sized {
33 | -------------------------- required by `UncheckedCopy`
34 ...
35 LL | + Deref<Target = str>
36 | ^^^^^^^^^^^^^^^^^^^ the trait `Deref` is not implemented for `Self`
37 |
38 help: consider further restricting `Self`
39 |
40 LL | trait UncheckedCopy: Sized + Deref {
41 | ^^^^^^^
42
43 error[E0277]: `Self` doesn't implement `std::fmt::Display`
44 --> $DIR/defaults-unsound-62211-2.rs:28:7
45 |
46 LL | trait UncheckedCopy: Sized {
47 | -------------------------- required by `UncheckedCopy`
48 ...
49 LL | + Display = Self;
50 | ^^^^^^^ `Self` cannot be formatted with the default formatter
51 |
52 = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
53 help: consider further restricting `Self`
54 |
55 LL | trait UncheckedCopy: Sized + std::fmt::Display {
56 | ^^^^^^^^^^^^^^^^^^^
57
58 error[E0277]: `T` doesn't implement `std::fmt::Display`
59 --> $DIR/defaults-unsound-62211-2.rs:41:9
60 |
61 LL | trait UncheckedCopy: Sized {
62 | ------------- required by a bound in this
63 ...
64 LL | + Display = Self;
65 | ------- required by this bound in `UncheckedCopy`
66 ...
67 LL | impl<T> UncheckedCopy for T {}
68 | ^^^^^^^^^^^^^ `T` cannot be formatted with the default formatter
69 |
70 = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
71 help: consider restricting type parameter `T`
72 |
73 LL | impl<T: std::fmt::Display> UncheckedCopy for T {}
74 | ^^^^^^^^^^^^^^^^^^^
75
76 error[E0277]: the trait bound `T: Deref` is not satisfied
77 --> $DIR/defaults-unsound-62211-2.rs:41:9
78 |
79 LL | trait UncheckedCopy: Sized {
80 | ------------- required by a bound in this
81 ...
82 LL | + Deref<Target = str>
83 | ------------------- required by this bound in `UncheckedCopy`
84 ...
85 LL | impl<T> UncheckedCopy for T {}
86 | ^^^^^^^^^^^^^ the trait `Deref` is not implemented for `T`
87 |
88 help: consider restricting type parameter `T`
89 |
90 LL | impl<T: Deref> UncheckedCopy for T {}
91 | ^^^^^^^
92
93 error[E0277]: cannot add-assign `&'static str` to `T`
94 --> $DIR/defaults-unsound-62211-2.rs:41:9
95 |
96 LL | trait UncheckedCopy: Sized {
97 | ------------- required by a bound in this
98 ...
99 LL | + AddAssign<&'static str>
100 | ----------------------- required by this bound in `UncheckedCopy`
101 ...
102 LL | impl<T> UncheckedCopy for T {}
103 | ^^^^^^^^^^^^^ no implementation for `T += &'static str`
104 |
105 help: consider restricting type parameter `T`
106 |
107 LL | impl<T: AddAssign<&'static str>> UncheckedCopy for T {}
108 | ^^^^^^^^^^^^^^^^^^^^^^^^^
109
110 error[E0277]: the trait bound `T: Copy` is not satisfied
111 --> $DIR/defaults-unsound-62211-2.rs:41:9
112 |
113 LL | trait UncheckedCopy: Sized {
114 | ------------- required by a bound in this
115 ...
116 LL | type Output: Copy
117 | ---- required by this bound in `UncheckedCopy`
118 ...
119 LL | impl<T> UncheckedCopy for T {}
120 | ^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T`
121 |
122 help: consider restricting type parameter `T`
123 |
124 LL | impl<T: Copy> UncheckedCopy for T {}
125 | ^^^^^^
126
127 error: aborting due to 8 previous errors
128
129 For more information about this error, try `rustc --explain E0277`.