Skip to content

Commit b3b12b0

Browse files
committed
DO NOT SUBMIT: Switch to deny-by-default for crater
1 parent c9d2b6f commit b3b12b0

File tree

7 files changed

+23
-7
lines changed

7 files changed

+23
-7
lines changed

src/libcore/tests/ascii.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ macro_rules! assert_none {
151151
stringify!($what), b);
152152
}
153153
}
154-
)*
154+
)+
155155
}};
156156
($what:ident, $($str:tt),+,) => (assert_none!($what,$($str),+))
157157
}

src/libcore/tests/pattern.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::str::pattern::*;
55
macro_rules! search_asserts {
66
($haystack:expr, $needle:expr, $testname:expr, [$($func:ident),*], $result:expr) => {
77
let mut searcher = $needle.into_searcher($haystack);
8-
let arr = [$( Step::from(searcher.$func()) ),+];
8+
let arr = [$( Step::from(searcher.$func()) ),*];
99
assert_eq!(&arr[..], &$result, $testname);
1010
}
1111
}

src/librustc/lint/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ pub mod parser {
356356

357357
declare_lint! {
358358
pub META_VARIABLE_MISUSE,
359-
Allow,
359+
Deny,
360360
"possible meta-variable misuse at macro definition"
361361
}
362362
}

src/test/ui/issues/issue-6596-1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
macro_rules! e {
22
($inp:ident) => (
3-
$nonexistent
3+
$nonexistent //~ ERROR unknown macro variable `nonexistent`
44
//~^ ERROR unknown macro variable `nonexistent`
55
);
66
}

src/test/ui/issues/issue-6596-1.stderr

+9-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,13 @@ LL | $nonexistent
77
LL | e!(foo);
88
| -------- in this macro invocation
99

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
1119

src/test/ui/issues/issue-6596-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
macro_rules! g {
44
($inp:ident) => (
5-
{ $inp $nonexistent }
5+
{ $inp $nonexistent } //~ ERROR unknown macro variable `nonexistent`
66
//~^ ERROR unknown macro variable `nonexistent`
77
);
88
}

src/test/ui/issues/issue-6596-2.stderr

+9-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,13 @@ LL | { $inp $nonexistent }
77
LL | g!(foo);
88
| -------- in this macro invocation
99

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
1119

0 commit comments

Comments
 (0)