@@ -15,7 +15,7 @@ LL | for<'b> <T as Z<'b, u16>>::W: Clone,
15
15
| ^^^^^ required by this bound in `Z`
16
16
17
17
error[E0277]: the trait bound `str: Clone` is not satisfied
18
- --> $DIR/hr-associated-type-bound-param-2.rs:17 :14
18
+ --> $DIR/hr-associated-type-bound-param-2.rs:18 :14
19
19
|
20
20
LL | type W = str;
21
21
| ^^^ the trait `Clone` is not implemented for `str`
@@ -63,6 +63,22 @@ LL | {
63
63
LL | type W: ?Sized;
64
64
| - required by a bound in this associated type
65
65
66
+ error[E0277]: the trait bound `str: Clone` is not satisfied
67
+ --> $DIR/hr-associated-type-bound-param-2.rs:10:9
68
+ |
69
+ LL | <T::W>::clone(x);
70
+ | ^^^^^^^^^^^^^ the trait `Clone` is not implemented for `str`
71
+ |
72
+ = help: the trait `Clone` is implemented for `String`
73
+ note: required by a bound in `Z`
74
+ --> $DIR/hr-associated-type-bound-param-2.rs:6:35
75
+ |
76
+ LL | trait Z<'a, T: ?Sized>
77
+ | - required by a bound in this trait
78
+ ...
79
+ LL | for<'b> <T as Z<'b, u16>>::W: Clone,
80
+ | ^^^^^ required by this bound in `Z`
81
+
66
82
error[E0277]: the trait bound `str: Clone` is not satisfied
67
83
--> $DIR/hr-associated-type-bound-param-2.rs:10:9
68
84
|
@@ -80,7 +96,7 @@ LL | for<'b> <T as Z<'b, u16>>::W: Clone,
80
96
| ^^^^^ required by this bound in `Z`
81
97
82
98
error[E0277]: the trait bound `str: Clone` is not satisfied
83
- --> $DIR/hr-associated-type-bound-param-2.rs:22 :10
99
+ --> $DIR/hr-associated-type-bound-param-2.rs:23 :10
84
100
|
85
101
LL | 1u16.h("abc");
86
102
| ^ the trait `Clone` is not implemented for `str`
@@ -95,6 +111,6 @@ LL | for<'b> <T as Z<'b, u16>>::W: Clone,
95
111
LL | fn h(&self, x: &T::W) {
96
112
| - required by a bound in this associated function
97
113
98
- error: aborting due to 6 previous errors
114
+ error: aborting due to 7 previous errors
99
115
100
116
For more information about this error, try `rustc --explain E0277`.
0 commit comments