From d1b2d29528b7794b41e66fc2136e395a02f8529b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:59:35 +0200 Subject: Merging upstream version 1.73.0+dfsg1. Signed-off-by: Daniel Baumann --- .../generic-const-items/unsatisfied-bounds.stderr | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 tests/ui/generic-const-items/unsatisfied-bounds.stderr (limited to 'tests/ui/generic-const-items/unsatisfied-bounds.stderr') diff --git a/tests/ui/generic-const-items/unsatisfied-bounds.stderr b/tests/ui/generic-const-items/unsatisfied-bounds.stderr new file mode 100644 index 000000000..1fda46037 --- /dev/null +++ b/tests/ui/generic-const-items/unsatisfied-bounds.stderr @@ -0,0 +1,62 @@ +error[E0277]: the trait bound `String: Copy` is not satisfied + --> $DIR/unsatisfied-bounds.rs:30:18 + | +LL | let () = C::; + | ^^^^^^ the trait `Copy` is not implemented for `String` + | +note: required by a bound in `C` + --> $DIR/unsatisfied-bounds.rs:8:12 + | +LL | const C: () = (); + | ^^^^ required by this bound in `C` + +error[E0277]: the trait bound `Infallible: From<()>` is not satisfied + --> $DIR/unsatisfied-bounds.rs:31:18 + | +LL | let () = K::<()>; + | ^^ the trait `From<()>` is not implemented for `Infallible` + | + = help: the trait `From` is implemented for `Infallible` +note: required by a bound in `K` + --> $DIR/unsatisfied-bounds.rs:12:17 + | +LL | const K: () = () + | - required by a bound in this constant +LL | where +LL | Infallible: From; + | ^^^^^^^ required by this bound in `K` + +error[E0277]: the trait bound `Vec: Copy` is not satisfied + --> $DIR/unsatisfied-bounds.rs:32:13 + | +LL | let _ = <() as Trait>>::A; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Vec` + | +note: required by a bound in `Trait::A` + --> $DIR/unsatisfied-bounds.rs:17:12 + | +LL | const A: u32 + | - required by a bound in this associated constant +LL | where +LL | P: Copy; + | ^^^^ required by this bound in `Trait::A` + +error[E0277]: the trait bound `Infallible: From<()>` is not satisfied + --> $DIR/unsatisfied-bounds.rs:33:46 + | +LL | let _ = <() as Trait<&'static str>>::B::<()>; + | ^^ the trait `From<()>` is not implemented for `Infallible` + | + = help: the trait `From` is implemented for `Infallible` +note: required by a bound in `Trait::B` + --> $DIR/unsatisfied-bounds.rs:21:21 + | +LL | const B: u32 + | - required by a bound in this associated constant +LL | where +LL | Infallible: From; + | ^^^^^^^ required by this bound in `Trait::B` + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0277`. -- cgit v1.2.3