File tree Expand file tree Collapse file tree 5 files changed +21
-5
lines changed Expand file tree Collapse file tree 5 files changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -356,7 +356,7 @@ pub mod parser {
356
356
357
357
declare_lint ! {
358
358
pub META_VARIABLE_MISUSE ,
359
- Allow ,
359
+ Deny ,
360
360
"possible meta-variable misuse at macro definition"
361
361
}
362
362
}
Original file line number Diff line number Diff line change 1
1
macro_rules! e {
2
2
( $inp: ident) => (
3
- $nonexistent
3
+ $nonexistent //~ ERROR unknown macro variable `nonexistent`
4
4
//~^ ERROR unknown macro variable `nonexistent`
5
5
) ;
6
6
}
Original file line number Diff line number Diff line change @@ -7,5 +7,13 @@ LL | $nonexistent
7
7
LL | e!(foo);
8
8
| -------- in this macro invocation
9
9
10
- error: aborting due to previous error
10
+ error: unknown macro variable `nonexistent`
11
+ --> $DIR/issue-6596-1.rs:3:9
12
+ |
13
+ LL | $nonexistent
14
+ | ^^^^^^^^^^^^
15
+ |
16
+ = note: #[deny(meta_variable_misuse)] on by default
17
+
18
+ error: aborting due to 2 previous errors
11
19
Original file line number Diff line number Diff line change 2
2
3
3
macro_rules! g {
4
4
( $inp: ident) => (
5
- { $inp $nonexistent }
5
+ { $inp $nonexistent } //~ ERROR unknown macro variable `nonexistent`
6
6
//~^ ERROR unknown macro variable `nonexistent`
7
7
) ;
8
8
}
Original file line number Diff line number Diff line change @@ -7,5 +7,13 @@ LL | { $inp $nonexistent }
7
7
LL | g!(foo);
8
8
| -------- in this macro invocation
9
9
10
- error: aborting due to previous error
10
+ error: unknown macro variable `nonexistent`
11
+ --> $DIR/issue-6596-2.rs:5:16
12
+ |
13
+ LL | { $inp $nonexistent }
14
+ | ^^^^^^^^^^^^
15
+ |
16
+ = note: #[deny(meta_variable_misuse)] on by default
17
+
18
+ error: aborting due to 2 previous errors
11
19
You can’t perform that action at this time.
0 commit comments