From c25d6b83441e0c060ee0273193ef27b29e1318cd Mon Sep 17 00:00:00 2001 From: Mark Mansi Date: Thu, 17 Jan 2019 21:30:06 -0600 Subject: [PATCH] update test --- .../macros/macro-multiple-matcher-bindings.rs | 12 +++-- .../macro-multiple-matcher-bindings.stderr | 46 +++++++++---------- 2 files changed, 31 insertions(+), 27 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 - -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 - -warning: duplicate matcher binding - --> src/test/ui/macros/macro-multiple-matcher-bindings.rs:17:6 + --> $DIR/macro-multiple-matcher-bindings.rs:11:6 | -LL | ($a:ident, $($a:ident),*) => {}; //~WARN duplicate matcher binding +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 + +warning: duplicate matcher binding + --> $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 + +warning: duplicate matcher binding + --> $DIR/macro-multiple-matcher-bindings.rs:21:6 + | +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 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!