diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
commit | 9835e2ae736235810b4ea1c162ca5e65c547e770 (patch) | |
tree | 3fcebf40ed70e581d776a8a4c65923e8ec20e026 /tests/ui/lint/lint-match-arms-2.stderr | |
parent | Releasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff) | |
download | rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip |
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/lint/lint-match-arms-2.stderr')
-rw-r--r-- | tests/ui/lint/lint-match-arms-2.stderr | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/ui/lint/lint-match-arms-2.stderr b/tests/ui/lint/lint-match-arms-2.stderr new file mode 100644 index 000000000..062d5c12e --- /dev/null +++ b/tests/ui/lint/lint-match-arms-2.stderr @@ -0,0 +1,29 @@ +error[E0170]: pattern binding `A` is named the same as one of the variants of the type `E` + --> $DIR/lint-match-arms-2.rs:12:9 + | +LL | A => {} + | ^ help: to match on the variant, qualify the path: `E::A` + | +note: the lint level is defined here + --> $DIR/lint-match-arms-2.rs:11:16 + | +LL | #[deny(bindings_with_variant_name)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: irrefutable `if let` guard pattern + --> $DIR/lint-match-arms-2.rs:18:18 + | +LL | a if let b = a => {} + | ^ + | + = note: this pattern will always match, so the guard is useless + = help: consider removing the guard and adding a `let` inside the match arm +note: the lint level is defined here + --> $DIR/lint-match-arms-2.rs:17:16 + | +LL | #[deny(irrefutable_let_patterns)] + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0170`. |