Skip to content

Commit c25d6b8

Browse files
committed
update test
1 parent 802b256 commit c25d6b8

File tree

2 files changed

+27
-23
lines changed

2 files changed

+27
-23
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
// Test that duplicate matcher binding names are caught at declaration time, rather than at macro
22
// invocation time.
3+
//
4+
// FIXME(mark-i-m): Update this when it becomes a hard error.
5+
6+
// compile-pass
37

48
#![allow(unused_macros)]
59

610
macro_rules! foo1 {
7-
($a:ident, $a:ident) => {}; //~WARN duplicate matcher binding
8-
($a:ident, $a:path) => {}; //~WARN duplicate matcher binding
11+
($a:ident, $a:ident) => {}; //~WARNING duplicate matcher binding
12+
($a:ident, $a:path) => {}; //~WARNING duplicate matcher binding
913
}
1014

1115
macro_rules! foo2 {
@@ -14,8 +18,8 @@ macro_rules! foo2 {
1418
}
1519

1620
macro_rules! foo3 {
17-
($a:ident, $($a:ident),*) => {}; //~WARN duplicate matcher binding
18-
($($a:ident)+ # $($($a:path),+);*) => {}; //~WARN duplicate matcher binding
21+
($a:ident, $($a:ident),*) => {}; //~WARNING duplicate matcher binding
22+
($($a:ident)+ # $($($a:path),+);*) => {}; //~WARNING duplicate matcher binding
1923
}
2024

2125
fn main() {}

src/test/ui/macros/macro-multiple-matcher-bindings.stderr

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
warning: duplicate matcher binding
2-
--> src/test/ui/macros/macro-multiple-matcher-bindings.rs:7:6
3-
|
4-
7 | ($a:ident, $a:ident) => {}; //~WARN duplicate matcher binding
5-
| ^^^^^^^^ ^^^^^^^^
6-
|
7-
= note: #[warn(duplicate_matcher_binding_name)] on by default
8-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9-
= note: for more information, see issue #57593 <https://github.com/rust-lang/rust/issues/57593>
2+
--> $DIR/macro-multiple-matcher-bindings.rs:11:6
3+
|
4+
LL | ($a:ident, $a:ident) => {}; //~WARNING duplicate matcher binding
5+
| ^^^^^^^^ ^^^^^^^^
6+
|
7+
= note: #[warn(duplicate_matcher_binding_name)] on by default
8+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9+
= note: for more information, see issue #57593 <https://github.com/rust-lang/rust/issues/57593>
1010

1111
warning: duplicate matcher binding
12-
--> src/test/ui/macros/macro-multiple-matcher-bindings.rs:8:6
13-
|
14-
8 | ($a:ident, $a:path) => {}; //~WARN duplicate matcher binding
15-
| ^^^^^^^^ ^^^^^^^
16-
|
17-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
18-
= note: for more information, see issue #57593 <https://github.com/rust-lang/rust/issues/57593>
12+
--> $DIR/macro-multiple-matcher-bindings.rs:12:6
13+
|
14+
LL | ($a:ident, $a:path) => {}; //~WARNING duplicate matcher binding
15+
| ^^^^^^^^ ^^^^^^^
16+
|
17+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
18+
= note: for more information, see issue #57593 <https://github.com/rust-lang/rust/issues/57593>
1919

2020
warning: duplicate matcher binding
21-
--> src/test/ui/macros/macro-multiple-matcher-bindings.rs:17:6
21+
--> $DIR/macro-multiple-matcher-bindings.rs:21:6
2222
|
23-
LL | ($a:ident, $($a:ident),*) => {}; //~WARN duplicate matcher binding
23+
LL | ($a:ident, $($a:ident),*) => {}; //~WARNING duplicate matcher binding
2424
| ^^^^^^^^ ^^^^^^^^
2525
|
2626
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
2727
= note: for more information, see issue #57593 <https://github.com/rust-lang/rust/issues/57593>
2828

2929
warning: duplicate matcher binding
30-
--> src/test/ui/macros/macro-multiple-matcher-bindings.rs:18:8
30+
--> $DIR/macro-multiple-matcher-bindings.rs:22:8
3131
|
32-
LL | ($($a:ident)+ # $($($a:path),+);*) => {}; //~WARN duplicate matcher binding
32+
LL | ($($a:ident)+ # $($($a:path),+);*) => {}; //~WARNING duplicate matcher binding
3333
| ^^^^^^^^ ^^^^^^^
3434
|
3535
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

0 commit comments

Comments
 (0)