rust/tests/ui/associated-types/hr-associated-type-bound-pa...

101 lines
3.6 KiB
Plaintext

error[E0277]: the trait bound `str: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-2.rs:3:8
|
LL | T: Z<'a, u16>,
| ^^^^^^^^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
note: required by a bound in `Z`
--> $DIR/hr-associated-type-bound-param-2.rs:6:35
|
LL | trait Z<'a, T: ?Sized>
| - required by a bound in this trait
...
LL | for<'b> <T as Z<'b, u16>>::W: Clone,
| ^^^^^ required by this bound in `Z`
error[E0277]: the trait bound `str: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-2.rs:17:14
|
LL | type W = str;
| ^^^ the trait `Clone` is not implemented for `str`, which is required by `for<'b> <u16 as Z<'b, u16>>::W: Clone`
|
= help: the trait `Clone` is implemented for `String`
note: required by a bound in `Z`
--> $DIR/hr-associated-type-bound-param-2.rs:6:35
|
LL | trait Z<'a, T: ?Sized>
| - required by a bound in this trait
...
LL | for<'b> <T as Z<'b, u16>>::W: Clone,
| ^^^^^ required by this bound in `Z`
error[E0277]: the trait bound `str: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-2.rs:3:8
|
LL | T: Z<'a, u16>,
| ^^^^^^^^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
note: required by a bound in `Z`
--> $DIR/hr-associated-type-bound-param-2.rs:6:35
|
LL | trait Z<'a, T: ?Sized>
| - required by a bound in this trait
...
LL | for<'b> <T as Z<'b, u16>>::W: Clone,
| ^^^^^ required by this bound in `Z`
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0277]: the trait bound `str: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-2.rs:10:10
|
LL | <T::W>::clone(x);
| ^^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
note: required by a bound in `Z::W`
--> $DIR/hr-associated-type-bound-param-2.rs:6:35
|
LL | for<'b> <T as Z<'b, u16>>::W: Clone,
| ^^^^^ required by this bound in `Z::W`
LL | {
LL | type W: ?Sized;
| - required by a bound in this associated type
error[E0277]: the trait bound `str: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-2.rs:10:9
|
LL | <T::W>::clone(x);
| ^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
note: required by a bound in `Z`
--> $DIR/hr-associated-type-bound-param-2.rs:6:35
|
LL | trait Z<'a, T: ?Sized>
| - required by a bound in this trait
...
LL | for<'b> <T as Z<'b, u16>>::W: Clone,
| ^^^^^ required by this bound in `Z`
error[E0277]: the trait bound `str: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-2.rs:22:10
|
LL | 1u16.h("abc");
| ^ the trait `Clone` is not implemented for `str`
|
= help: the trait `Clone` is implemented for `String`
note: required by a bound in `Z::h`
--> $DIR/hr-associated-type-bound-param-2.rs:6:35
|
LL | for<'b> <T as Z<'b, u16>>::W: Clone,
| ^^^^^ required by this bound in `Z::h`
...
LL | fn h(&self, x: &T::W) {
| - required by a bound in this associated function
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0277`.