rustc_errors: hide "in this macro invocation" when redundant, more explicitly.
This commit is contained in:
parent
5eaa9a150d
commit
ab080973cb
9 changed files with 53 additions and 68 deletions
|
|
@ -33,10 +33,7 @@ error: `$x:expr` may be followed by `=`, which is not allowed for `expr` fragmen
|
|||
--> $DIR/same-sequence-span.rs:19:1
|
||||
|
|
||||
LL | proc_macro_sequence::make_foo!();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| not allowed after `expr` fragments
|
||||
| in this macro invocation
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ error[E0412]: cannot find type `FromOutside` in this scope
|
|||
--> $DIR/generate-mod.rs:9:1
|
||||
|
|
||||
LL | generate_mod::check!();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| not found in this scope
|
||||
| in this macro invocation
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
|
||||
|
|
||||
= note: possible candidate is found in another module, you can import it into scope:
|
||||
FromOutside
|
||||
|
|
@ -14,10 +11,7 @@ error[E0412]: cannot find type `Outer` in this scope
|
|||
--> $DIR/generate-mod.rs:9:1
|
||||
|
|
||||
LL | generate_mod::check!();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| not found in this scope
|
||||
| in this macro invocation
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
|
||||
|
|
||||
= note: possible candidate is found in another module, you can import it into scope:
|
||||
Outer
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ error: unexpected closing delimiter: `)`
|
|||
--> $DIR/invalid-punct-ident-4.rs:6:1
|
||||
|
|
||||
LL | lexer_failure!();
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| unexpected closing delimiter
|
||||
| in this macro invocation
|
||||
| ^^^^^^^^^^^^^^^^^ unexpected closing delimiter
|
||||
|
||||
error: proc macro panicked
|
||||
--> $DIR/invalid-punct-ident-4.rs:6:1
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ error[E0425]: cannot find value `foobar2` in this scope
|
|||
--> $DIR/lints_in_proc_macros.rs:12:5
|
||||
|
|
||||
LL | bang_proc_macro2!();
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| help: a local variable with a similar name exists: `foobar`
|
||||
| in this macro invocation
|
||||
| ^^^^^^^^^^^^^^^^^^^^ help: a local variable with a similar name exists: `foobar`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -2,19 +2,13 @@ error[E0426]: use of undeclared label `'label_use`
|
|||
--> $DIR/mixed-site-span.rs:15:9
|
||||
|
|
||||
LL | proc_macro_rules!();
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| undeclared label `'label_use`
|
||||
| in this macro invocation
|
||||
| ^^^^^^^^^^^^^^^^^^^^ undeclared label `'label_use`
|
||||
|
||||
error[E0425]: cannot find value `local_use` in this scope
|
||||
--> $DIR/mixed-site-span.rs:15:9
|
||||
|
|
||||
LL | proc_macro_rules!();
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| not found in this scope
|
||||
| in this macro invocation
|
||||
| ^^^^^^^^^^^^^^^^^^^^ not found in this scope
|
||||
|
||||
error[E0425]: cannot find value `local_def` in this scope
|
||||
--> $DIR/mixed-site-span.rs:19:9
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: found 'hi's
|
|||
--> $DIR/subspan.rs:11:1
|
||||
|
|
||||
LL | subspan!("hi");
|
||||
| ^^^^^^^^^^^^^^^ in this macro invocation
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: here
|
||||
--> $DIR/subspan.rs:11:11
|
||||
|
|
@ -14,7 +14,7 @@ error: found 'hi's
|
|||
--> $DIR/subspan.rs:14:1
|
||||
|
|
||||
LL | subspan!("hihi");
|
||||
| ^^^^^^^^^^^^^^^^^ in this macro invocation
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: here
|
||||
--> $DIR/subspan.rs:14:11
|
||||
|
|
@ -26,7 +26,7 @@ error: found 'hi's
|
|||
--> $DIR/subspan.rs:17:1
|
||||
|
|
||||
LL | subspan!("hihihi");
|
||||
| ^^^^^^^^^^^^^^^^^^^ in this macro invocation
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: here
|
||||
--> $DIR/subspan.rs:17:11
|
||||
|
|
@ -38,7 +38,7 @@ error: found 'hi's
|
|||
--> $DIR/subspan.rs:20:1
|
||||
|
|
||||
LL | subspan!("why I hide? hi!");
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: here
|
||||
--> $DIR/subspan.rs:20:17
|
||||
|
|
@ -50,7 +50,7 @@ error: found 'hi's
|
|||
--> $DIR/subspan.rs:21:1
|
||||
|
|
||||
LL | subspan!("hey, hi, hidy, hidy, hi hi");
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: here
|
||||
--> $DIR/subspan.rs:21:16
|
||||
|
|
@ -62,7 +62,7 @@ error: found 'hi's
|
|||
--> $DIR/subspan.rs:22:1
|
||||
|
|
||||
LL | subspan!("this is a hi, and this is another hi");
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: here
|
||||
--> $DIR/subspan.rs:22:12
|
||||
|
|
@ -74,7 +74,7 @@ error: found 'hi's
|
|||
--> $DIR/subspan.rs:23:1
|
||||
|
|
||||
LL | subspan!("how are you this evening");
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: here
|
||||
--> $DIR/subspan.rs:23:24
|
||||
|
|
@ -86,7 +86,7 @@ error: found 'hi's
|
|||
--> $DIR/subspan.rs:24:1
|
||||
|
|
||||
LL | subspan!("this is highly eradic");
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: here
|
||||
--> $DIR/subspan.rs:24:12
|
||||
|
|
|
|||
|
|
@ -4,10 +4,7 @@ error[E0308]: mismatched types
|
|||
LL | / intrinsic_match! {
|
||||
LL | | "abc"
|
||||
LL | | };
|
||||
| | ^
|
||||
| | |
|
||||
| |______expected `&str`, found struct `std::string::String`
|
||||
| in this macro invocation
|
||||
| |______^ expected `&str`, found struct `std::string::String`
|
||||
|
|
||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue