2021-07-26 15:01:16 -05:00
|
|
|
error[E0276]: impl has stricter requirements than trait
|
2022-01-27 10:11:28 -06:00
|
|
|
--> $DIR/issue-55872-1.rs:12:15
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
|
|
|
LL | fn foo<T>() -> Self::E;
|
|
|
|
| ----------------------- definition of `foo` from trait
|
|
|
|
...
|
|
|
|
LL | fn foo<T: Default>() -> Self::E {
|
2021-10-06 07:27:42 -05:00
|
|
|
| ^^^^^^^ impl has extra requirement `T: Default`
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
|
|
error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)`
|
2022-05-27 14:31:10 -05:00
|
|
|
--> $DIR/issue-55872-1.rs:12:29
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
2022-05-27 14:31:10 -05:00
|
|
|
LL | fn foo<T: Default>() -> Self::E {
|
2024-01-29 12:31:02 -06:00
|
|
|
| ^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S`, which is required by `(S, T): Copy`
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
|
|
|
= note: required because it appears within the type `(S, T)`
|
|
|
|
help: consider further restricting this bound
|
|
|
|
|
|
|
|
|
LL | impl<S: Default + std::marker::Copy> Bar for S {
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++++++++++++++
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
|
|
error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)`
|
2022-05-27 14:31:10 -05:00
|
|
|
--> $DIR/issue-55872-1.rs:12:29
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
2022-05-27 14:31:10 -05:00
|
|
|
LL | fn foo<T: Default>() -> Self::E {
|
2024-01-29 12:31:02 -06:00
|
|
|
| ^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T`, which is required by `(S, T): Copy`
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
|
|
|
= note: required because it appears within the type `(S, T)`
|
|
|
|
help: consider further restricting this bound
|
|
|
|
|
|
|
|
|
LL | fn foo<T: Default + std::marker::Copy>() -> Self::E {
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++++++++++++++
|
2021-07-26 15:01:16 -05:00
|
|
|
|
2022-02-14 10:10:22 -06:00
|
|
|
error: aborting due to 3 previous errors
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
|
|
Some errors have detailed explanations: E0276, E0277.
|
|
|
|
For more information about an error, try `rustc --explain E0276`.
|