Add regression test

This commit is contained in:
Jeffrey Seyfried 2016-06-12 04:24:51 +00:00
parent 2d1f3009cc
commit 236b67af51

View File

@ -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