fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.4 KiB37 linesraw
1error[E0276]: impl has stricter requirements than trait
2  --> $DIR/issue-55872-1.rs:12:15
3   |
4LL |     fn foo<T>() -> Self::E;
5   |     ----------------------- definition of `foo` from trait
6...
7LL |     fn foo<T: Default>() -> Self::E {
8   |               ^^^^^^^ impl has extra requirement `T: Default`
9
10error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)`
11  --> $DIR/issue-55872-1.rs:12:29
12   |
13LL |     fn foo<T: Default>() -> Self::E {
14   |                             ^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S`
15   |
16   = note: required because it appears within the type `(S, T)`
17help: consider further restricting this bound
18   |
19LL | impl<S: Default + std::marker::Copy> Bar for S {
20   |                 +++++++++++++++++++
21
22error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)`
23  --> $DIR/issue-55872-1.rs:12:29
24   |
25LL |     fn foo<T: Default>() -> Self::E {
26   |                             ^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T`
27   |
28   = note: required because it appears within the type `(S, T)`
29help: consider further restricting this bound
30   |
31LL |     fn foo<T: Default + std::marker::Copy>() -> Self::E {
32   |                       +++++++++++++++++++
33
34error: aborting due to 3 previous errors
35
36Some errors have detailed explanations: E0276, E0277.
37For more information about an error, try `rustc --explain E0276`.