From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../missing-bound-in-manual-copy-impl-2.stderr | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.stderr (limited to 'tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.stderr') diff --git a/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.stderr b/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.stderr new file mode 100644 index 000000000..9e6f0d9eb --- /dev/null +++ b/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.stderr @@ -0,0 +1,22 @@ +error[E0204]: the trait `Copy` may not be implemented for this type + --> $DIR/missing-bound-in-manual-copy-impl-2.rs:16:18 + | +LL | struct Wrapper(T); + | - this field does not implement `Copy` +... +LL | impl Copy for Wrapper> {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +note: the `Copy` impl for `OnlyCopyIfDisplay` requires that `S: std::fmt::Display` + --> $DIR/missing-bound-in-manual-copy-impl-2.rs:4:19 + | +LL | struct Wrapper(T); + | ^ +help: consider restricting type parameter `S` + | +LL | impl Copy for Wrapper> {} + | +++++++++++++++++++ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0204`. -- cgit v1.2.3