Skip to content

Commit 11f24a9

Browse files
committed
Add regression test
1 parent 4e74c18 commit 11f24a9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/test/compile-fail/macro-expanded-include/foo/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@
1313
macro_rules! m {
1414
() => { include!("file.txt"); }
1515
}
16+
17+
macro_rules! n {
18+
() => { unsafe { asm!(include_str!("file.txt")); } }
19+
}

src/test/compile-fail/macro-expanded-include/test.rs

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

11-
#![feature(rustc_attrs)]
11+
#![feature(asm, rustc_attrs)]
12+
#![allow(unused)]
1213

1314
#[macro_use]
1415
mod foo;
1516

1617
m!();
18+
fn f() { n!(); }
1719

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

0 commit comments

Comments
 (0)