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