1- error[E0599 ]: the function or associated item `foo` exists for struct `SafeImpl<_, RawImpl<_>>`, but its trait bounds were not satisfied
1+ error[E0275 ]: overflow assigning `_` to `[_]`
22 --> $DIR/issue-62742.rs:4:16
33 |
44LL | WrongImpl::foo(0i32);
5- | ^^^ function or associated item cannot be called on `SafeImpl<_, RawImpl<_>>` due to unsatisfied trait bounds
6- ...
7- LL | pub struct RawImpl<T>(PhantomData<T>);
8- | --------------------- doesn't satisfy `RawImpl<_>: Raw<_>`
9- ...
10- LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
11- | ----------------------------------------- function or associated item `foo` not found for this struct
12- |
13- note: trait bound `RawImpl<_>: Raw<_>` was not satisfied
14- --> $DIR/issue-62742.rs:29:20
15- |
16- LL | impl<T: ?Sized, A: Raw<T>> SafeImpl<T, A> {
17- | ^^^^^^ --------------
18- | |
19- | unsatisfied trait bound introduced here
20- note: the trait `Raw` must be implemented
21- --> $DIR/issue-62742.rs:13:1
22- |
23- LL | pub trait Raw<T: ?Sized> {
24- | ^^^^^^^^^^^^^^^^^^^^^^^^
5+ | ^^^
256
267error[E0599]: the function or associated item `foo` exists for struct `SafeImpl<(), RawImpl<()>>`, but its trait bounds were not satisfied
27- --> $DIR/issue-62742.rs:7 :22
8+ --> $DIR/issue-62742.rs:9 :22
289 |
2910LL | WrongImpl::<()>::foo(0i32);
3011 | ^^^ function or associated item cannot be called on `SafeImpl<(), RawImpl<()>>` due to unsatisfied trait bounds
@@ -36,46 +17,33 @@ LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
3617 | ----------------------------------------- function or associated item `foo` not found for this struct
3718 |
3819note: trait bound `RawImpl<()>: Raw<()>` was not satisfied
39- --> $DIR/issue-62742.rs:29 :20
20+ --> $DIR/issue-62742.rs:34 :20
4021 |
4122LL | impl<T: ?Sized, A: Raw<T>> SafeImpl<T, A> {
4223 | ^^^^^^ --------------
4324 | |
4425 | unsatisfied trait bound introduced here
4526note: the trait `Raw` must be implemented
46- --> $DIR/issue-62742.rs:13 :1
27+ --> $DIR/issue-62742.rs:18 :1
4728 |
4829LL | pub trait Raw<T: ?Sized> {
4930 | ^^^^^^^^^^^^^^^^^^^^^^^^
5031
51- error[E0277]: the trait bound `RawImpl<_>: Raw<_>` is not satisfied
52- --> $DIR/issue-62742.rs:4:5
53- |
54- LL | WrongImpl::foo(0i32);
55- | ^^^^^^^^^ the trait `Raw<_>` is not implemented for `RawImpl<_>`
56- |
57- = help: the trait `Raw<[_]>` is implemented for `RawImpl<_>`
58- note: required by a bound in `SafeImpl`
59- --> $DIR/issue-62742.rs:27:35
60- |
61- LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
62- | ^^^^^^ required by this bound in `SafeImpl`
63-
6432error[E0277]: the trait bound `RawImpl<()>: Raw<()>` is not satisfied
65- --> $DIR/issue-62742.rs:7 :5
33+ --> $DIR/issue-62742.rs:9 :5
6634 |
6735LL | WrongImpl::<()>::foo(0i32);
6836 | ^^^^^^^^^^^^^^^ the trait `Raw<()>` is not implemented for `RawImpl<()>`
6937 |
7038 = help: the trait `Raw<[()]>` is implemented for `RawImpl<()>`
7139 = help: for that trait implementation, expected `[()]`, found `()`
7240note: required by a bound in `SafeImpl`
73- --> $DIR/issue-62742.rs:27 :35
41+ --> $DIR/issue-62742.rs:32 :35
7442 |
7543LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
7644 | ^^^^^^ required by this bound in `SafeImpl`
7745
78- error: aborting due to 4 previous errors
46+ error: aborting due to 3 previous errors
7947
80- Some errors have detailed explanations: E0277, E0599.
81- For more information about an error, try `rustc --explain E0277 `.
48+ Some errors have detailed explanations: E0275, E0277, E0599.
49+ For more information about an error, try `rustc --explain E0275 `.
0 commit comments