Skip to content

Commit

Permalink
DO NOT SUBMIT: Switch to deny-by-default for crater
Browse files Browse the repository at this point in the history
  • Loading branch information
ia0 committed Jun 29, 2019
1 parent 98a6587 commit 390133e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/librustc/lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ pub mod parser {

declare_lint! {
pub META_VARIABLE_MISUSE,
Allow,
Deny,
"possible meta-variable misuse at macro definition"
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-6596-1.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
macro_rules! e {
($inp:ident) => (
$nonexistent
$nonexistent //~ ERROR unknown macro variable `nonexistent`
//~^ ERROR unknown macro variable `nonexistent`
);
}
Expand Down
10 changes: 9 additions & 1 deletion src/test/ui/issues/issue-6596-1.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,13 @@ LL | $nonexistent
LL | e!(foo);
| -------- in this macro invocation

error: aborting due to previous error
error: unknown macro variable `nonexistent`
--> $DIR/issue-6596-1.rs:3:9
|
LL | $nonexistent
| ^^^^^^^^^^^^
|
= note: #[deny(meta_variable_misuse)] on by default

error: aborting due to 2 previous errors

2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-6596-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

macro_rules! g {
($inp:ident) => (
{ $inp $nonexistent }
{ $inp $nonexistent } //~ ERROR unknown macro variable `nonexistent`
//~^ ERROR unknown macro variable `nonexistent`
);
}
Expand Down
10 changes: 9 additions & 1 deletion src/test/ui/issues/issue-6596-2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,13 @@ LL | { $inp $nonexistent }
LL | g!(foo);
| -------- in this macro invocation

error: aborting due to previous error
error: unknown macro variable `nonexistent`
--> $DIR/issue-6596-2.rs:5:16
|
LL | { $inp $nonexistent }
| ^^^^^^^^^^^^
|
= note: #[deny(meta_variable_misuse)] on by default

error: aborting due to 2 previous errors

0 comments on commit 390133e

Please sign in to comment.