]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.stderr
Merge commit '7f27e2e74ef957baa382dc05cf08df6368165c74' into clippyup
[rust.git] / tests / ui / suggestions / missing-bound-in-manual-copy-impl-2.stderr
1 error[E0204]: the trait `Copy` may not be implemented for this type
2   --> $DIR/missing-bound-in-manual-copy-impl-2.rs:16:18
3    |
4 LL | struct Wrapper<T>(T);
5    |                   - this field does not implement `Copy`
6 ...
7 LL | impl<S> Copy for Wrapper<OnlyCopyIfDisplay<S>> {}
8    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9    |
10 note: 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    |
13 LL | struct Wrapper<T>(T);
14    |                   ^
15 help: consider restricting type parameter `S`
16    |
17 LL | impl<S: std::fmt::Display> Copy for Wrapper<OnlyCopyIfDisplay<S>> {}
18    |       +++++++++++++++++++
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0204`.