From 17d40c6057c88f4c432b0d7bac88e1b84cb7e67f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:03:36 +0200 Subject: Adding upstream version 1.65.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/suggestions/issue-101465.stderr | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/test/ui/suggestions/issue-101465.stderr (limited to 'src/test/ui/suggestions/issue-101465.stderr') diff --git a/src/test/ui/suggestions/issue-101465.stderr b/src/test/ui/suggestions/issue-101465.stderr new file mode 100644 index 000000000..e2ca77712 --- /dev/null +++ b/src/test/ui/suggestions/issue-101465.stderr @@ -0,0 +1,25 @@ +error[E0308]: `match` arms have incompatible types + --> $DIR/issue-101465.rs:20:18 + | +LL | / match true { +LL | | true => B, + | | - this is found to be of type `B` +LL | | false => C, + | | ^ expected struct `B`, found struct `C` +LL | | +LL | | } + | |_____- `match` arms have incompatible types + | +help: you could change the return type to be a boxed trait object + | +LL | fn foo() -> Box { + | ~~~~~~~ + +help: if you change the return type to expect trait objects, box the returned expressions + | +LL ~ true => Box::new(B), +LL ~ false => Box::new(C), + | + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0308`. -- cgit v1.2.3