Skip to content

Commit

Permalink
Add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
jseyfried committed Jun 12, 2016
1 parent 2d1f300 commit 236b67a
Showing 1 changed file with 19 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,25 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(rustc_private)]
macro_rules! m {
() => { #[macro_use] extern crate syntax; }
// aux-build:two_macros.rs

#![feature(rustc_attrs)]
#![allow(unused)]

fn f() {
let _ = macro_one!();
}
#[macro_use(macro_one)] // Check that this macro is usable in the above function
extern crate two_macros;

macro_rules! m { () => {
fn g() {
macro_two!();
}
#[macro_use(macro_two)] // Check that this macro is usable in the above function
extern crate two_macros as _two_macros;
} }
m!();

fn main() {
help!(); //~ ERROR unexpected end of macro invocation
}
#[rustc_error]
fn main() {} //~ ERROR compilation successful

0 comments on commit 236b67a

Please sign in to comment.