2024-01-15 11:47:53 +01:00
|
|
|
error[E0277]: the trait bound `RawImpl<_>: Raw<_>` is not satisfied
|
|
|
|
--> $DIR/issue-62742.rs:4:5
|
|
|
|
|
|
|
|
|
LL | WrongImpl::foo(0i32);
|
2024-01-15 15:06:25 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ the trait `Raw<_>` is not implemented for `RawImpl<_>`
|
2024-01-15 11:47:53 +01:00
|
|
|
|
|
|
|
|
= help: the trait `Raw<[_]>` is implemented for `RawImpl<_>`
|
|
|
|
note: required by a bound in `SafeImpl::<T, A>::foo`
|
2024-01-15 15:06:25 +01:00
|
|
|
--> $DIR/issue-62742.rs:29:20
|
2024-01-15 11:47:53 +01:00
|
|
|
|
|
|
|
|
LL | impl<T: ?Sized, A: Raw<T>> SafeImpl<T, A> {
|
|
|
|
| ^^^^^^ required by this bound in `SafeImpl::<T, A>::foo`
|
|
|
|
LL | pub fn foo(value: A::Value) {}
|
|
|
|
| --- required by a bound in this associated function
|
|
|
|
|
2022-02-17 13:55:58 +00:00
|
|
|
error[E0277]: the trait bound `RawImpl<_>: Raw<_>` is not satisfied
|
|
|
|
--> $DIR/issue-62742.rs:4:5
|
|
|
|
|
|
|
|
|
LL | WrongImpl::foo(0i32);
|
|
|
|
| ^^^^^^^^^ the trait `Raw<_>` is not implemented for `RawImpl<_>`
|
|
|
|
|
|
2023-09-10 03:21:52 +00:00
|
|
|
= help: the trait `Raw<[_]>` is implemented for `RawImpl<_>`
|
2022-02-17 13:55:58 +00:00
|
|
|
note: required by a bound in `SafeImpl`
|
2024-01-15 15:06:25 +01:00
|
|
|
--> $DIR/issue-62742.rs:27:35
|
2022-02-17 13:55:58 +00:00
|
|
|
|
|
|
|
|
LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
|
|
|
|
| ^^^^^^ required by this bound in `SafeImpl`
|
|
|
|
|
|
|
|
error[E0599]: the function or associated item `foo` exists for struct `SafeImpl<(), RawImpl<()>>`, but its trait bounds were not satisfied
|
2024-01-15 15:06:25 +01:00
|
|
|
--> $DIR/issue-62742.rs:7:22
|
2022-02-17 13:55:58 +00:00
|
|
|
|
|
|
|
|
LL | WrongImpl::<()>::foo(0i32);
|
|
|
|
| ^^^ function or associated item cannot be called on `SafeImpl<(), RawImpl<()>>` due to unsatisfied trait bounds
|
|
|
|
...
|
|
|
|
LL | pub struct RawImpl<T>(PhantomData<T>);
|
2022-02-13 16:27:59 +01:00
|
|
|
| --------------------- doesn't satisfy `RawImpl<()>: Raw<()>`
|
2022-02-17 13:55:58 +00:00
|
|
|
...
|
|
|
|
LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
|
2022-07-01 16:47:26 -07:00
|
|
|
| ----------------------------------------- function or associated item `foo` not found for this struct
|
2022-02-17 13:55:58 +00:00
|
|
|
|
|
2023-01-11 03:07:14 +00:00
|
|
|
note: trait bound `RawImpl<()>: Raw<()>` was not satisfied
|
2024-01-15 15:06:25 +01:00
|
|
|
--> $DIR/issue-62742.rs:29:20
|
2023-01-11 03:07:14 +00:00
|
|
|
|
|
|
|
|
LL | impl<T: ?Sized, A: Raw<T>> SafeImpl<T, A> {
|
|
|
|
| ^^^^^^ --------------
|
|
|
|
| |
|
|
|
|
| unsatisfied trait bound introduced here
|
2022-12-12 11:55:46 +00:00
|
|
|
note: the trait `Raw` must be implemented
|
2024-01-15 15:06:25 +01:00
|
|
|
--> $DIR/issue-62742.rs:13:1
|
2022-02-17 13:55:58 +00:00
|
|
|
|
|
2022-02-13 16:27:59 +01:00
|
|
|
LL | pub trait Raw<T: ?Sized> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-02-17 13:55:58 +00:00
|
|
|
|
|
|
|
error[E0277]: the trait bound `RawImpl<()>: Raw<()>` is not satisfied
|
2024-01-15 15:06:25 +01:00
|
|
|
--> $DIR/issue-62742.rs:7:5
|
2022-02-17 13:55:58 +00:00
|
|
|
|
|
|
|
|
LL | WrongImpl::<()>::foo(0i32);
|
|
|
|
| ^^^^^^^^^^^^^^^ the trait `Raw<()>` is not implemented for `RawImpl<()>`
|
|
|
|
|
|
2023-09-10 03:21:52 +00:00
|
|
|
= help: the trait `Raw<[()]>` is implemented for `RawImpl<()>`
|
2023-09-10 03:33:07 +00:00
|
|
|
= help: for that trait implementation, expected `[()]`, found `()`
|
2022-02-17 13:55:58 +00:00
|
|
|
note: required by a bound in `SafeImpl`
|
2024-01-15 15:06:25 +01:00
|
|
|
--> $DIR/issue-62742.rs:27:35
|
2022-02-17 13:55:58 +00:00
|
|
|
|
|
|
|
|
LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
|
|
|
|
| ^^^^^^ required by this bound in `SafeImpl`
|
|
|
|
|
2024-01-15 15:06:25 +01:00
|
|
|
error: aborting due to 4 previous errors
|
2022-02-17 13:55:58 +00:00
|
|
|
|
|
|
|
Some errors have detailed explanations: E0277, E0599.
|
|
|
|
For more information about an error, try `rustc --explain E0277`.
|