diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/empty/empty-struct-tuple-pat.stderr | |
parent | Initial commit. (diff) | |
download | rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip |
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/empty/empty-struct-tuple-pat.stderr')
-rw-r--r-- | src/test/ui/empty/empty-struct-tuple-pat.stderr | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/test/ui/empty/empty-struct-tuple-pat.stderr b/src/test/ui/empty/empty-struct-tuple-pat.stderr new file mode 100644 index 000000000..8d0f75d20 --- /dev/null +++ b/src/test/ui/empty/empty-struct-tuple-pat.stderr @@ -0,0 +1,59 @@ +error[E0530]: match bindings cannot shadow tuple structs + --> $DIR/empty-struct-tuple-pat.rs:22:9 + | +LL | struct Empty2(); + | ---------------- the tuple struct `Empty2` is defined here +... +LL | Empty2 => () + | ^^^^^^ + | | + | cannot be named the same as a tuple struct + | help: try specify the pattern arguments: `Empty2(..)` + +error[E0530]: match bindings cannot shadow tuple structs + --> $DIR/empty-struct-tuple-pat.rs:25:9 + | +LL | use empty_struct::*; + | --------------- the tuple struct `XEmpty6` is imported here +... +LL | XEmpty6 => () + | ^^^^^^^ + | | + | cannot be named the same as a tuple struct + | help: try specify the pattern arguments: `XEmpty6(..)` + +error[E0532]: expected unit struct, unit variant or constant, found tuple variant `E::Empty4` + --> $DIR/empty-struct-tuple-pat.rs:29:9 + | +LL | Empty4() + | -------- `E::Empty4` defined here +... +LL | E::Empty4 => () + | ^^^^^^^^^ help: use the tuple variant pattern syntax instead: `E::Empty4()` + +error[E0532]: expected unit struct, unit variant or constant, found tuple variant `XE::XEmpty5` + --> $DIR/empty-struct-tuple-pat.rs:33:9 + | +LL | XE::XEmpty5 => (), + | ^^^^^^^^^^^ + | + ::: $DIR/auxiliary/empty-struct.rs:7:5 + | +LL | XEmpty4, + | ------- similarly named unit variant `XEmpty4` defined here +LL | XEmpty5(), + | ------- `XE::XEmpty5` defined here + | +help: use the tuple variant pattern syntax instead + | +LL | XE::XEmpty5(/* fields */) => (), + | ~~~~~~~~~~~~~~~~~~~~~~~~~ +help: a unit variant with a similar name exists + | +LL | XE::XEmpty4 => (), + | ~~~~~~~ + +error: aborting due to 4 previous errors + +Some errors have detailed explanations: E0530, E0532. +For more information about an error, try `rustc --explain E0530`. |