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/structs/struct-base-wrong-type.stderr | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/ui/structs/struct-base-wrong-type.stderr (limited to 'tests/ui/structs/struct-base-wrong-type.stderr') diff --git a/tests/ui/structs/struct-base-wrong-type.stderr b/tests/ui/structs/struct-base-wrong-type.stderr new file mode 100644 index 000000000..b039ce2cc --- /dev/null +++ b/tests/ui/structs/struct-base-wrong-type.stderr @@ -0,0 +1,27 @@ +error[E0308]: mismatched types + --> $DIR/struct-base-wrong-type.rs:7:33 + | +LL | static foo: Foo = Foo { a: 2, ..bar }; + | ^^^ expected struct `Foo`, found struct `Bar` + +error[E0308]: mismatched types + --> $DIR/struct-base-wrong-type.rs:8:35 + | +LL | static foo_i: Foo = Foo { a: 2, ..4 }; + | ^ expected struct `Foo`, found integer + +error[E0308]: mismatched types + --> $DIR/struct-base-wrong-type.rs:12:27 + | +LL | let f = Foo { a: 2, ..b }; + | ^ expected struct `Foo`, found struct `Bar` + +error[E0308]: mismatched types + --> $DIR/struct-base-wrong-type.rs:13:34 + | +LL | let f__isize = Foo { a: 2, ..4 }; + | ^ expected struct `Foo`, found integer + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0308`. -- cgit v1.2.3