fork/rust

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

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

master
795 B22 linesraw
1error[E0204]: the trait `Copy` cannot be implemented for this type
2  --> $DIR/missing-bound-in-manual-copy-impl-2.rs:16:18
3   |
4LL | struct Wrapper<T>(T);
5   |                   - this field does not implement `Copy`
6...
7LL | impl<S> Copy for Wrapper<OnlyCopyIfDisplay<S>> {}
8   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9   |
10note: the `Copy` impl for `OnlyCopyIfDisplay<S>` requires that `S: std::fmt::Display`
11  --> $DIR/missing-bound-in-manual-copy-impl-2.rs:4:19
12   |
13LL | struct Wrapper<T>(T);
14   |                   ^
15help: consider restricting type parameter `S`
16   |
17LL | impl<S: std::fmt::Display> Copy for Wrapper<OnlyCopyIfDisplay<S>> {}
18   |       +++++++++++++++++++
19
20error: aborting due to previous error
21
22For more information about this error, try `rustc --explain E0204`.