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 `[_]`
2
2
--> $DIR/issue-62742.rs:4:16
3
3
|
4
4
LL | 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
+ | ^^^
25
6
26
7
error[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
28
9
|
29
10
LL | WrongImpl::<()>::foo(0i32);
30
11
| ^^^ 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)>);
36
17
| ----------------------------------------- function or associated item `foo` not found for this struct
37
18
|
38
19
note: trait bound `RawImpl<()>: Raw<()>` was not satisfied
39
- --> $DIR/issue-62742.rs:29 :20
20
+ --> $DIR/issue-62742.rs:34 :20
40
21
|
41
22
LL | impl<T: ?Sized, A: Raw<T>> SafeImpl<T, A> {
42
23
| ^^^^^^ --------------
43
24
| |
44
25
| unsatisfied trait bound introduced here
45
26
note: the trait `Raw` must be implemented
46
- --> $DIR/issue-62742.rs:13 :1
27
+ --> $DIR/issue-62742.rs:18 :1
47
28
|
48
29
LL | pub trait Raw<T: ?Sized> {
49
30
| ^^^^^^^^^^^^^^^^^^^^^^^^
50
31
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
-
64
32
error[E0277]: the trait bound `RawImpl<()>: Raw<()>` is not satisfied
65
- --> $DIR/issue-62742.rs:7 :5
33
+ --> $DIR/issue-62742.rs:9 :5
66
34
|
67
35
LL | WrongImpl::<()>::foo(0i32);
68
36
| ^^^^^^^^^^^^^^^ the trait `Raw<()>` is not implemented for `RawImpl<()>`
69
37
|
70
38
= help: the trait `Raw<[()]>` is implemented for `RawImpl<()>`
71
39
= help: for that trait implementation, expected `[()]`, found `()`
72
40
note: required by a bound in `SafeImpl`
73
- --> $DIR/issue-62742.rs:27 :35
41
+ --> $DIR/issue-62742.rs:32 :35
74
42
|
75
43
LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
76
44
| ^^^^^^ required by this bound in `SafeImpl`
77
45
78
- error: aborting due to 4 previous errors
46
+ error: aborting due to 3 previous errors
79
47
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