-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't let non-primary spans take priority over primary spans.
- Loading branch information
Showing
5 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
tests/integrations/basic/tests/actual_tests/mac_span.fixed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#![deny(unused_variables)] | ||
|
||
macro_rules! m { | ||
() => {{ | ||
let _x = 0; //~ unused_variables | ||
}}; | ||
} | ||
|
||
fn main() { | ||
m!(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#![deny(unused_variables)] | ||
|
||
macro_rules! m { | ||
() => {{ | ||
let x = 0; //~ unused_variables | ||
}}; | ||
} | ||
|
||
fn main() { | ||
m!(); | ||
} |
18 changes: 18 additions & 0 deletions
18
tests/integrations/basic/tests/actual_tests/mac_span.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
error: unused variable: `x` | ||
--> tests/actual_tests/mac_span.rs:5:13 | ||
| | ||
5 | let x = 0; | ||
| ^ help: if this is intentional, prefix it with an underscore: `_x` | ||
... | ||
10 | m!(); | ||
| ---- in this macro invocation | ||
| | ||
note: the lint level is defined here | ||
--> tests/actual_tests/mac_span.rs:1:9 | ||
| | ||
1 | #![deny(unused_variables)] | ||
| ^^^^^^^^^^^^^^^^ | ||
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: aborting due to 1 previous error | ||
|