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