diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
commit | 64d98f8ee037282c35007b64c2649055c56af1db (patch) | |
tree | 5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/ui/pattern/pattern-binding-disambiguation.stderr | |
parent | Adding debian version 1.67.1+dfsg1-1. (diff) | |
download | rustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/pattern/pattern-binding-disambiguation.stderr')
-rw-r--r-- | tests/ui/pattern/pattern-binding-disambiguation.stderr | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/tests/ui/pattern/pattern-binding-disambiguation.stderr b/tests/ui/pattern/pattern-binding-disambiguation.stderr new file mode 100644 index 000000000..d54467b3c --- /dev/null +++ b/tests/ui/pattern/pattern-binding-disambiguation.stderr @@ -0,0 +1,63 @@ +error[E0530]: match bindings cannot shadow tuple structs + --> $DIR/pattern-binding-disambiguation.rs:24:9 + | +LL | struct TupleStruct(); + | --------------------- the tuple struct `TupleStruct` is defined here +... +LL | TupleStruct => {} + | ^^^^^^^^^^^ + | | + | cannot be named the same as a tuple struct + | help: try specify the pattern arguments: `TupleStruct(..)` + +error[E0530]: match bindings cannot shadow tuple variants + --> $DIR/pattern-binding-disambiguation.rs:33:9 + | +LL | use E::*; + | ---- the tuple variant `TupleVariant` is imported here +... +LL | TupleVariant => {} + | ^^^^^^^^^^^^ + | | + | cannot be named the same as a tuple variant + | help: try specify the pattern arguments: `TupleVariant(..)` + +error[E0530]: match bindings cannot shadow statics + --> $DIR/pattern-binding-disambiguation.rs:42:9 + | +LL | static STATIC: () = (); + | ----------------------- the static `STATIC` is defined here +... +LL | STATIC => {} + | ^^^^^^ cannot be named the same as a static + +error[E0530]: let bindings cannot shadow tuple structs + --> $DIR/pattern-binding-disambiguation.rs:49:9 + | +LL | struct TupleStruct(); + | --------------------- the tuple struct `TupleStruct` is defined here +... +LL | let TupleStruct = doesnt_matter; + | ^^^^^^^^^^^ cannot be named the same as a tuple struct + +error[E0530]: let bindings cannot shadow tuple variants + --> $DIR/pattern-binding-disambiguation.rs:52:9 + | +LL | use E::*; + | ---- the tuple variant `TupleVariant` is imported here +... +LL | let TupleVariant = doesnt_matter; + | ^^^^^^^^^^^^ cannot be named the same as a tuple variant + +error[E0530]: let bindings cannot shadow statics + --> $DIR/pattern-binding-disambiguation.rs:55:9 + | +LL | static STATIC: () = (); + | ----------------------- the static `STATIC` is defined here +... +LL | let STATIC = doesnt_matter; + | ^^^^^^ cannot be named the same as a static + +error: aborting due to 6 previous errors + +For more information about this error, try `rustc --explain E0530`. |