|
| 1 | +error[E0277]: the trait bound `RawImpl<_>: Raw<_>` is not satisfied |
| 2 | + --> $DIR/issue-62742.rs:4:5 |
| 3 | + | |
| 4 | +LL | WrongImpl::foo(0i32); |
| 5 | + | ^^^^^^^^^ the trait `Raw<_>` is not implemented for `RawImpl<_>` |
| 6 | + | |
| 7 | + = help: the following implementations were found: |
| 8 | + <RawImpl<T> as Raw<[T]>> |
| 9 | +note: required by a bound in `SafeImpl` |
| 10 | + --> $DIR/issue-62742.rs:26:35 |
| 11 | + | |
| 12 | +LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>); |
| 13 | + | ^^^^^^ required by this bound in `SafeImpl` |
| 14 | + |
| 15 | +error[E0599]: the function or associated item `foo` exists for struct `SafeImpl<(), RawImpl<()>>`, but its trait bounds were not satisfied |
| 16 | + --> $DIR/issue-62742.rs:6:22 |
| 17 | + | |
| 18 | +LL | WrongImpl::<()>::foo(0i32); |
| 19 | + | ^^^ function or associated item cannot be called on `SafeImpl<(), RawImpl<()>>` due to unsatisfied trait bounds |
| 20 | +... |
| 21 | +LL | pub struct RawImpl<T>(PhantomData<T>); |
| 22 | + | -------------------------------------- doesn't satisfy `RawImpl<()>: Raw<()>` |
| 23 | +... |
| 24 | +LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>); |
| 25 | + | --------------------------------------------------------------- function or associated item `foo` not found for this |
| 26 | + | |
| 27 | + = note: the following trait bounds were not satisfied: |
| 28 | + `RawImpl<()>: Raw<()>` |
| 29 | +note: the following trait must be implemented |
| 30 | + --> $DIR/issue-62742.rs:12:1 |
| 31 | + | |
| 32 | +LL | / pub trait Raw<T: ?Sized> { |
| 33 | +LL | | type Value; |
| 34 | +LL | | } |
| 35 | + | |_^ |
| 36 | + |
| 37 | +error[E0277]: the trait bound `RawImpl<()>: Raw<()>` is not satisfied |
| 38 | + --> $DIR/issue-62742.rs:6:5 |
| 39 | + | |
| 40 | +LL | WrongImpl::<()>::foo(0i32); |
| 41 | + | ^^^^^^^^^^^^^^^ the trait `Raw<()>` is not implemented for `RawImpl<()>` |
| 42 | + | |
| 43 | + = help: the following implementations were found: |
| 44 | + <RawImpl<T> as Raw<[T]>> |
| 45 | +note: required by a bound in `SafeImpl` |
| 46 | + --> $DIR/issue-62742.rs:26:35 |
| 47 | + | |
| 48 | +LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>); |
| 49 | + | ^^^^^^ required by this bound in `SafeImpl` |
| 50 | + |
| 51 | +error: aborting due to 3 previous errors |
| 52 | + |
| 53 | +Some errors have detailed explanations: E0277, E0599. |
| 54 | +For more information about an error, try `rustc --explain E0277`. |
0 commit comments