mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Tweak duplicate matcher binding error
This commit is contained in:
parent
1eeed17c9e
commit
3893d16341
@ -269,7 +269,8 @@ fn check_binders(
|
|||||||
// for nested macro definitions.
|
// for nested macro definitions.
|
||||||
sess.span_diagnostic
|
sess.span_diagnostic
|
||||||
.struct_span_err(span, "duplicate matcher binding")
|
.struct_span_err(span, "duplicate matcher binding")
|
||||||
.span_note(prev_info.span, "previous declaration was here")
|
.span_label(span, "duplicate binding")
|
||||||
|
.span_label(prev_info.span, "previous binding")
|
||||||
.emit();
|
.emit();
|
||||||
*valid = false;
|
*valid = false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -2,49 +2,33 @@ error: duplicate matcher binding
|
|||||||
--> $DIR/macro-multiple-matcher-bindings.rs:7:16
|
--> $DIR/macro-multiple-matcher-bindings.rs:7:16
|
||||||
|
|
|
|
||||||
LL | ($a:ident, $a:ident) => {};
|
LL | ($a:ident, $a:ident) => {};
|
||||||
| ^^^^^^^^
|
| -------- ^^^^^^^^ duplicate binding
|
||||||
|
|
| |
|
||||||
note: previous declaration was here
|
| previous binding
|
||||||
--> $DIR/macro-multiple-matcher-bindings.rs:7:6
|
|
||||||
|
|
|
||||||
LL | ($a:ident, $a:ident) => {};
|
|
||||||
| ^^^^^^^^
|
|
||||||
|
|
||||||
error: duplicate matcher binding
|
error: duplicate matcher binding
|
||||||
--> $DIR/macro-multiple-matcher-bindings.rs:8:16
|
--> $DIR/macro-multiple-matcher-bindings.rs:8:16
|
||||||
|
|
|
|
||||||
LL | ($a:ident, $a:path) => {};
|
LL | ($a:ident, $a:path) => {};
|
||||||
| ^^^^^^^
|
| -------- ^^^^^^^ duplicate binding
|
||||||
|
|
| |
|
||||||
note: previous declaration was here
|
| previous binding
|
||||||
--> $DIR/macro-multiple-matcher-bindings.rs:8:6
|
|
||||||
|
|
|
||||||
LL | ($a:ident, $a:path) => {};
|
|
||||||
| ^^^^^^^^
|
|
||||||
|
|
||||||
error: duplicate matcher binding
|
error: duplicate matcher binding
|
||||||
--> $DIR/macro-multiple-matcher-bindings.rs:17:18
|
--> $DIR/macro-multiple-matcher-bindings.rs:17:18
|
||||||
|
|
|
|
||||||
LL | ($a:ident, $($a:ident),*) => {};
|
LL | ($a:ident, $($a:ident),*) => {};
|
||||||
| ^^^^^^^^
|
| -------- ^^^^^^^^ duplicate binding
|
||||||
|
|
| |
|
||||||
note: previous declaration was here
|
| previous binding
|
||||||
--> $DIR/macro-multiple-matcher-bindings.rs:17:6
|
|
||||||
|
|
|
||||||
LL | ($a:ident, $($a:ident),*) => {};
|
|
||||||
| ^^^^^^^^
|
|
||||||
|
|
||||||
error: duplicate matcher binding
|
error: duplicate matcher binding
|
||||||
--> $DIR/macro-multiple-matcher-bindings.rs:18:25
|
--> $DIR/macro-multiple-matcher-bindings.rs:18:25
|
||||||
|
|
|
|
||||||
LL | ($($a:ident)+ # $($($a:path),+);*) => {};
|
LL | ($($a:ident)+ # $($($a:path),+);*) => {};
|
||||||
| ^^^^^^^
|
| -------- ^^^^^^^ duplicate binding
|
||||||
|
|
| |
|
||||||
note: previous declaration was here
|
| previous binding
|
||||||
--> $DIR/macro-multiple-matcher-bindings.rs:18:8
|
|
||||||
|
|
|
||||||
LL | ($($a:ident)+ # $($($a:path),+);*) => {};
|
|
||||||
| ^^^^^^^^
|
|
||||||
|
|
||||||
error: aborting due to 4 previous errors
|
error: aborting due to 4 previous errors
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user