]> git.lizzy.rs Git - rust.git/commitdiff
Add regression test
authorJeffrey Seyfried <jeffrey.seyfried@gmail.com>
Thu, 14 Jul 2016 08:59:25 +0000 (08:59 +0000)
committerJeffrey Seyfried <jeffrey.seyfried@gmail.com>
Thu, 14 Jul 2016 10:27:20 +0000 (10:27 +0000)
src/test/compile-fail/macro-expanded-include/foo/mod.rs
src/test/compile-fail/macro-expanded-include/test.rs

index 57b7b72a1d435b6f8ac0572f5434f5d5a87c128b..888bdf5179a23fe26637ba0c4a2c7ecc451b36a8 100644 (file)
@@ -13,3 +13,7 @@
 macro_rules! m {
     () => { include!("file.txt"); }
 }
+
+macro_rules! n {
+    () => { unsafe { asm!(include_str!("file.txt")); } }
+}
index 7ab9dd19b1b70dc9df3c47a01a7b334e28705a40..e1e85ddb2c1b18a145f6852ddd34e6e0b1a0f8f9 100644 (file)
@@ -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