forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#59858 - mark-i-m:dup-matcher-bindings-3, r=…
…Centril Make duplicate matcher bindings a hard error r? @Centril Closes rust-lang#57742
- Loading branch information
Showing
7 changed files
with
44 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 33 additions & 24 deletions
57
src/test/ui/macros/macro-multiple-matcher-bindings.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,50 @@ | ||
warning: duplicate matcher binding | ||
--> $DIR/macro-multiple-matcher-bindings.rs:12:6 | ||
error: duplicate matcher binding | ||
--> $DIR/macro-multiple-matcher-bindings.rs:7:16 | ||
| | ||
LL | ($a:ident, $a:ident) => {}; | ||
| ^^^^^^^^ ^^^^^^^^ | ||
| ^^^^^^^^ | ||
| | ||
note: lint level defined here | ||
--> $DIR/macro-multiple-matcher-bindings.rs:9:9 | ||
note: previous declaration was here | ||
--> $DIR/macro-multiple-matcher-bindings.rs:7:6 | ||
| | ||
LL | #![warn(duplicate_matcher_binding_name)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #57593 <https://github.com/rust-lang/rust/issues/57593> | ||
LL | ($a:ident, $a:ident) => {}; | ||
| ^^^^^^^^ | ||
|
||
warning: duplicate matcher binding | ||
--> $DIR/macro-multiple-matcher-bindings.rs:13:6 | ||
error: duplicate matcher binding | ||
--> $DIR/macro-multiple-matcher-bindings.rs:8:16 | ||
| | ||
LL | ($a:ident, $a:path) => {}; | ||
| ^^^^^^^^ ^^^^^^^ | ||
| ^^^^^^^ | ||
| | ||
note: previous declaration was here | ||
--> $DIR/macro-multiple-matcher-bindings.rs:8:6 | ||
| | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #57593 <https://github.com/rust-lang/rust/issues/57593> | ||
LL | ($a:ident, $a:path) => {}; | ||
| ^^^^^^^^ | ||
|
||
warning: duplicate matcher binding | ||
--> $DIR/macro-multiple-matcher-bindings.rs:22:6 | ||
error: duplicate matcher binding | ||
--> $DIR/macro-multiple-matcher-bindings.rs:17:18 | ||
| | ||
LL | ($a:ident, $($a:ident),*) => {}; | ||
| ^^^^^^^^ ^^^^^^^^ | ||
| ^^^^^^^^ | ||
| | ||
note: previous declaration was here | ||
--> $DIR/macro-multiple-matcher-bindings.rs:17:6 | ||
| | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #57593 <https://github.com/rust-lang/rust/issues/57593> | ||
LL | ($a:ident, $($a:ident),*) => {}; | ||
| ^^^^^^^^ | ||
|
||
warning: duplicate matcher binding | ||
--> $DIR/macro-multiple-matcher-bindings.rs:23:8 | ||
error: duplicate matcher binding | ||
--> $DIR/macro-multiple-matcher-bindings.rs:18:25 | ||
| | ||
LL | ($($a:ident)+ # $($($a:path),+);*) => {}; | ||
| ^^^^^^^^ ^^^^^^^ | ||
| ^^^^^^^ | ||
| | ||
note: previous declaration was here | ||
--> $DIR/macro-multiple-matcher-bindings.rs:18:8 | ||
| | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #57593 <https://github.com/rust-lang/rust/issues/57593> | ||
LL | ($($a:ident)+ # $($($a:path),+);*) => {}; | ||
| ^^^^^^^^ | ||
|
||
error: aborting due to 4 previous errors | ||
|