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/parser/bare-struct-body.stderr | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/test/ui/parser/bare-struct-body.stderr (limited to 'src/test/ui/parser/bare-struct-body.stderr') diff --git a/src/test/ui/parser/bare-struct-body.stderr b/src/test/ui/parser/bare-struct-body.stderr new file mode 100644 index 000000000..c77992b2c --- /dev/null +++ b/src/test/ui/parser/bare-struct-body.stderr @@ -0,0 +1,41 @@ +error: struct literal body without path + --> $DIR/bare-struct-body.rs:5:17 + | +LL | fn foo() -> Foo { + | _________________^ +LL | | val: (), +LL | | } + | |_^ + | +help: you might have forgotten to add the struct literal inside the block + | +LL ~ fn foo() -> Foo { SomeStruct { +LL | val: (), +LL ~ } } + | + +error: struct literal body without path + --> $DIR/bare-struct-body.rs:12:13 + | +LL | let x = { + | _____________^ +LL | | val: (), +LL | | }; + | |_____^ + | +help: you might have forgotten to add the struct literal inside the block + | +LL ~ let x = { SomeStruct { +LL | val: (), +LL ~ } }; + | + +error[E0308]: mismatched types + --> $DIR/bare-struct-body.rs:11:14 + | +LL | x.val == 42; + | ^^ expected `()`, found integer + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0308`. -- cgit v1.2.3