|
| 1 | +error[E0271]: type mismatch resolving `<String as Trait<String>>::Proof normalizes-to String` |
| 2 | + --> $DIR/item-bound-via-impl-where-clause.rs:24:33 |
| 3 | + | |
| 4 | +LL | let s: String = transmute::<_, String>(vec![65_u8, 66, 67]); |
| 5 | + | ^ types differ |
| 6 | + | |
| 7 | +note: required for `String` to implement `Trait<String>` |
| 8 | + --> $DIR/item-bound-via-impl-where-clause.rs:14:12 |
| 9 | + | |
| 10 | +LL | impl<L, R> Trait<R> for L |
| 11 | + | ^^^^^^^^ ^ |
| 12 | +... |
| 13 | +LL | R: Trait<R, Proof = <L::Proof as Trait<R>>::Proof> |
| 14 | + | ------------------------------------- unsatisfied trait bound introduced here |
| 15 | + = note: 2 redundant requirements hidden |
| 16 | + = note: required for `Vec<u8>` to implement `Trait<String>` |
| 17 | +note: required by a bound in `transmute` |
| 18 | + --> $DIR/item-bound-via-impl-where-clause.rs:22:17 |
| 19 | + | |
| 20 | +LL | fn transmute<L: Trait<R>, R>(r: L) -> <L::Proof as Trait<R>>::Proof { r } |
| 21 | + | ^^^^^^^^ required by this bound in `transmute` |
| 22 | + |
| 23 | +error[E0271]: type mismatch resolving `<String as Trait<String>>::Proof normalizes-to String` |
| 24 | + --> $DIR/item-bound-via-impl-where-clause.rs:24:21 |
| 25 | + | |
| 26 | +LL | let s: String = transmute::<_, String>(vec![65_u8, 66, 67]); |
| 27 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ |
| 28 | + | |
| 29 | +note: required for `String` to implement `Trait<String>` |
| 30 | + --> $DIR/item-bound-via-impl-where-clause.rs:14:12 |
| 31 | + | |
| 32 | +LL | impl<L, R> Trait<R> for L |
| 33 | + | ^^^^^^^^ ^ |
| 34 | +... |
| 35 | +LL | R: Trait<R, Proof = <L::Proof as Trait<R>>::Proof> |
| 36 | + | ------------------------------------- unsatisfied trait bound introduced here |
| 37 | + = note: 1 redundant requirement hidden |
| 38 | + = note: required for `Vec<u8>` to implement `Trait<String>` |
| 39 | +note: required by a bound in `Trait` |
| 40 | + --> $DIR/item-bound-via-impl-where-clause.rs:11:17 |
| 41 | + | |
| 42 | +LL | trait Trait<R>: Sized { |
| 43 | + | ^^^^^ required by this bound in `Trait` |
| 44 | + |
| 45 | +error[E0271]: type mismatch resolving `<String as Trait<String>>::Proof == _` |
| 46 | + --> $DIR/item-bound-via-impl-where-clause.rs:24:21 |
| 47 | + | |
| 48 | +LL | let s: String = transmute::<_, String>(vec![65_u8, 66, 67]); |
| 49 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch resolving `<String as Trait<String>>::Proof == _` |
| 50 | + | |
| 51 | +note: types differ |
| 52 | + --> $DIR/item-bound-via-impl-where-clause.rs:20:11 |
| 53 | + | |
| 54 | +LL | = R; |
| 55 | + | ^ |
| 56 | +note: required for `String` to implement `Trait<String>` |
| 57 | + --> $DIR/item-bound-via-impl-where-clause.rs:14:12 |
| 58 | + | |
| 59 | +LL | impl<L, R> Trait<R> for L |
| 60 | + | ^^^^^^^^ ^ |
| 61 | +... |
| 62 | +LL | R: Trait<R, Proof = <L::Proof as Trait<R>>::Proof> |
| 63 | + | ------------------------------------- unsatisfied trait bound introduced here |
| 64 | + = note: 2 redundant requirements hidden |
| 65 | + = note: required for `Vec<u8>` to implement `Trait<String>` |
| 66 | + |
| 67 | +error: aborting due to 3 previous errors |
| 68 | + |
| 69 | +For more information about this error, try `rustc --explain E0271`. |
0 commit comments