From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/dst/dst-bad-coerce1.stderr | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/test/ui/dst/dst-bad-coerce1.stderr (limited to 'src/test/ui/dst/dst-bad-coerce1.stderr') diff --git a/src/test/ui/dst/dst-bad-coerce1.stderr b/src/test/ui/dst/dst-bad-coerce1.stderr new file mode 100644 index 000000000..594acff85 --- /dev/null +++ b/src/test/ui/dst/dst-bad-coerce1.stderr @@ -0,0 +1,42 @@ +error[E0308]: mismatched types + --> $DIR/dst-bad-coerce1.rs:16:29 + | +LL | let f3: &Fat<[usize]> = f2; + | ------------- ^^ expected slice `[usize]`, found array `[isize; 3]` + | | + | expected due to this + | + = note: expected reference `&Fat<[usize]>` + found reference `&Fat<[isize; 3]>` + +error[E0277]: the trait bound `Foo: Bar` is not satisfied + --> $DIR/dst-bad-coerce1.rs:22:29 + | +LL | let f3: &Fat = f2; + | ^^ the trait `Bar` is not implemented for `Foo` + | + = note: required for the cast from `Foo` to the object type `dyn Bar` + +error[E0308]: mismatched types + --> $DIR/dst-bad-coerce1.rs:28:27 + | +LL | let f3: &([usize],) = f2; + | ----------- ^^ expected slice `[usize]`, found array `[isize; 3]` + | | + | expected due to this + | + = note: expected reference `&([usize],)` + found reference `&([isize; 3],)` + +error[E0277]: the trait bound `Foo: Bar` is not satisfied + --> $DIR/dst-bad-coerce1.rs:34:27 + | +LL | let f3: &(dyn Bar,) = f2; + | ^^ the trait `Bar` is not implemented for `Foo` + | + = note: required for the cast from `Foo` to the object type `dyn Bar` + +error: aborting due to 4 previous errors + +Some errors have detailed explanations: E0277, E0308. +For more information about an error, try `rustc --explain E0277`. -- cgit v1.2.3