about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Mansi <markm@cs.wisc.edu>2019-01-17 21:30:06 -0600
committerMark Mansi <markm@cs.wisc.edu>2019-02-07 12:17:27 -0600
commitc25d6b83441e0c060ee0273193ef27b29e1318cd (patch)
tree9ee6bfcfbfff4490e34fd403d48b35d0cd33a1aa
parent802b256283fe7dd0f0e72499ba77d18f2838e817 (diff)
downloadrust-c25d6b83441e0c060ee0273193ef27b29e1318cd.tar.gz
rust-c25d6b83441e0c060ee0273193ef27b29e1318cd.zip
update test
-rw-r--r--src/test/ui/macros/macro-multiple-matcher-bindings.rs12
-rw-r--r--src/test/ui/macros/macro-multiple-matcher-bindings.stderr38
2 files changed, 27 insertions, 23 deletions
diff --git a/src/test/ui/macros/macro-multiple-matcher-bindings.rs b/src/test/ui/macros/macro-multiple-matcher-bindings.rs
index 3deae3eacec..9e0fa388716 100644
--- a/src/test/ui/macros/macro-multiple-matcher-bindings.rs
+++ b/src/test/ui/macros/macro-multiple-matcher-bindings.rs
@@ -1,11 +1,15 @@
 // Test that duplicate matcher binding names are caught at declaration time, rather than at macro
 // invocation time.
+//
+// FIXME(mark-i-m): Update this when it becomes a hard error.
+
+// compile-pass
 
 #![allow(unused_macros)]
 
 macro_rules! foo1 {
-    ($a:ident, $a:ident) => {}; //~WARN duplicate matcher binding
-    ($a:ident, $a:path) => {};  //~WARN duplicate matcher binding
+    ($a:ident, $a:ident) => {}; //~WARNING duplicate matcher binding
+    ($a:ident, $a:path) => {};  //~WARNING duplicate matcher binding
 }
 
 macro_rules! foo2 {
@@ -14,8 +18,8 @@ macro_rules! foo2 {
 }
 
 macro_rules! foo3 {
-    ($a:ident, $($a:ident),*) => {}; //~WARN duplicate matcher binding
-    ($($a:ident)+ # $($($a:path),+);*) => {}; //~WARN duplicate matcher binding
+    ($a:ident, $($a:ident),*) => {}; //~WARNING duplicate matcher binding
+    ($($a:ident)+ # $($($a:path),+);*) => {}; //~WARNING duplicate matcher binding
 }
 
 fn main() {}
diff --git a/src/test/ui/macros/macro-multiple-matcher-bindings.stderr b/src/test/ui/macros/macro-multiple-matcher-bindings.stderr
index 04b27e88a1f..bc78b471a2d 100644
--- a/src/test/ui/macros/macro-multiple-matcher-bindings.stderr
+++ b/src/test/ui/macros/macro-multiple-matcher-bindings.stderr
@@ -1,35 +1,35 @@
 warning: duplicate matcher binding
- --> src/test/ui/macros/macro-multiple-matcher-bindings.rs:7:6
-  |
-7 |     ($a:ident, $a:ident) => {}; //~WARN duplicate matcher binding
-  |      ^^^^^^^^  ^^^^^^^^
-  |
-  = note: #[warn(duplicate_matcher_binding_name)] on by default
-  = 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>
+  --> $DIR/macro-multiple-matcher-bindings.rs:11:6
+   |
+LL |     ($a:ident, $a:ident) => {}; //~WARNING duplicate matcher binding
+   |      ^^^^^^^^  ^^^^^^^^
+   |
+   = note: #[warn(duplicate_matcher_binding_name)] on by default
+   = 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>
 
 warning: duplicate matcher binding
- --> src/test/ui/macros/macro-multiple-matcher-bindings.rs:8:6
-  |
-8 |     ($a:ident, $a:path) => {};  //~WARN duplicate matcher binding
-  |      ^^^^^^^^  ^^^^^^^
-  |
-  = 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>
+  --> $DIR/macro-multiple-matcher-bindings.rs:12:6
+   |
+LL |     ($a:ident, $a:path) => {};  //~WARNING duplicate matcher binding
+   |      ^^^^^^^^  ^^^^^^^
+   |
+   = 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>
 
 warning: duplicate matcher binding
-  --> src/test/ui/macros/macro-multiple-matcher-bindings.rs:17:6
+  --> $DIR/macro-multiple-matcher-bindings.rs:21:6
    |
-LL |     ($a:ident, $($a:ident),*) => {}; //~WARN duplicate matcher binding
+LL |     ($a:ident, $($a:ident),*) => {}; //~WARNING duplicate matcher binding
    |      ^^^^^^^^    ^^^^^^^^
    |
    = 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>
 
 warning: duplicate matcher binding
-  --> src/test/ui/macros/macro-multiple-matcher-bindings.rs:18:8
+  --> $DIR/macro-multiple-matcher-bindings.rs:22:8
    |
-LL |     ($($a:ident)+ # $($($a:path),+);*) => {}; //~WARN duplicate matcher binding
+LL |     ($($a:ident)+ # $($($a:path),+);*) => {}; //~WARNING duplicate matcher binding
    |        ^^^^^^^^         ^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!