Skip to content

Commit 974f1ef

Browse files
committedApr 14, 2016
Add test for issue #31856
1 parent f08f75f commit 974f1ef

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed
 

‎src/test/compile-fail/issue-32922.rs

+12-1
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,23 @@
99
// except according to those terms.
1010

1111
#![feature(rustc_attrs)]
12+
#![allow(warnings)]
1213

1314
macro_rules! foo { () => {
1415
let x = 1;
1516
macro_rules! bar { () => {x} }
1617
let _ = bar!();
1718
}}
1819

20+
macro_rules! bar { // test issue #31856
21+
($n:ident) => (
22+
let a = 1;
23+
let $n = a;
24+
)
25+
}
26+
1927
#[rustc_error]
20-
fn main() { foo! {}; } //~ ERROR compilation successful
28+
fn main() { //~ ERROR compilation successful
29+
foo! {};
30+
bar! {};
31+
}

0 commit comments

Comments
 (0)
Please sign in to comment.