Skip to content

Commit 236b67a

Browse files
committed
Add regression test
1 parent 2d1f300 commit 236b67a

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

src/test/compile-fail-fulldeps/expanded-macro-use.rs src/test/compile-fail/macro-use-scope.rs

+19-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,25 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(rustc_private)]
12-
macro_rules! m {
13-
() => { #[macro_use] extern crate syntax; }
11+
// aux-build:two_macros.rs
12+
13+
#![feature(rustc_attrs)]
14+
#![allow(unused)]
15+
16+
fn f() {
17+
let _ = macro_one!();
1418
}
19+
#[macro_use(macro_one)] // Check that this macro is usable in the above function
20+
extern crate two_macros;
21+
22+
macro_rules! m { () => {
23+
fn g() {
24+
macro_two!();
25+
}
26+
#[macro_use(macro_two)] // Check that this macro is usable in the above function
27+
extern crate two_macros as _two_macros;
28+
} }
1529
m!();
1630

17-
fn main() {
18-
help!(); //~ ERROR unexpected end of macro invocation
19-
}
31+
#[rustc_error]
32+
fn main() {} //~ ERROR compilation successful

0 commit comments

Comments
 (0)