Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add regression test
  • Loading branch information
jseyfried committed Jul 14, 2016
1 parent 4e74c18 commit 11f24a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/test/compile-fail/macro-expanded-include/foo/mod.rs
Expand Up @@ -13,3 +13,7 @@
macro_rules! m {
() => { include!("file.txt"); }
}

macro_rules! n {
() => { unsafe { asm!(include_str!("file.txt")); } }
}
4 changes: 3 additions & 1 deletion src/test/compile-fail/macro-expanded-include/test.rs
Expand Up @@ -8,12 +8,14 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

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

#[macro_use]
mod foo;

m!();
fn f() { n!(); }

#[rustc_error]
fn main() {} //~ ERROR compilation successful

0 comments on commit 11f24a9

Please sign in to comment.