mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-18 18:04:13 +00:00
Add regression test
This commit is contained in:
parent
2d1f3009cc
commit
236b67af51
@ -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
|
Loading…
Reference in New Issue
Block a user