From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/block-result/issue-13428.stderr | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/ui/block-result/issue-13428.stderr (limited to 'tests/ui/block-result/issue-13428.stderr') diff --git a/tests/ui/block-result/issue-13428.stderr b/tests/ui/block-result/issue-13428.stderr new file mode 100644 index 000000000..2b386d10c --- /dev/null +++ b/tests/ui/block-result/issue-13428.stderr @@ -0,0 +1,22 @@ +error[E0308]: mismatched types + --> $DIR/issue-13428.rs:3:13 + | +LL | fn foo() -> String { + | --- ^^^^^^ expected struct `String`, found `()` + | | + | implicitly returns `()` as its body has no tail or `return` expression + +error[E0308]: mismatched types + --> $DIR/issue-13428.rs:11:13 + | +LL | fn bar() -> String { + | --- ^^^^^^ expected struct `String`, found `()` + | | + | implicitly returns `()` as its body has no tail or `return` expression +LL | "foobar".to_string() +LL | ; + | - help: remove this semicolon to return this value + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0308`. -- cgit v1.2.3