We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4062fe2 commit 8ab4803Copy full SHA for 8ab4803
src/tools/miri/test-cargo-miri/subcrate/src/lib.rs
@@ -1,5 +1,16 @@
1
+// This is a proc-macro crate.
2
+
3
+extern crate proc_macro; // make sure proc_macro is in the sysroot
4
5
#[cfg(doctest)]
6
compile_error!("rustdoc should not touch me");
7
-#[cfg(test)]
8
+#[cfg(miri)]
9
compile_error!("Miri should not touch me");
10
11
+use proc_macro::TokenStream;
12
13
+#[proc_macro]
14
+pub fn make_answer(_item: TokenStream) -> TokenStream {
15
+ "fn answer() -> u32 { 42 }".parse().unwrap()
16
+}
src/tools/miri/tests/pass/sysroot.rs
@@ -0,0 +1,9 @@
+//! Just check that some things are available in the sysroot.
+#![feature(test)]
+#![allow(unused)]
+extern crate proc_macro;
+extern crate std;
+extern crate test;
+fn main() {}
0 commit comments