File tree 2 files changed +28
-0
lines changed
2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ // force-host
2
+ // no-prefer-dynamic
3
+
4
+ #![ crate_type = "proc-macro" ]
5
+ #![ crate_name = "proc_macro_api_tests" ]
6
+ #![ deny( dead_code) ] // catch if a test function is never called
7
+
8
+ extern crate proc_macro;
9
+
10
+ use proc_macro:: TokenStream ;
11
+
12
+ #[ proc_macro]
13
+ pub fn run ( input : TokenStream ) -> TokenStream {
14
+ assert ! ( input. is_empty( ) ) ;
15
+ TokenStream :: new ( )
16
+ }
Original file line number Diff line number Diff line change
1
+ // check-pass
2
+ // aux-build:api/mod.rs
3
+
4
+ //! This is for everything that *would* be a #[test] inside of libproc_macro,
5
+ //! except for the fact that proc_macro objects are not capable of existing
6
+ //! inside of an ordinary Rust test execution, only inside a macro.
7
+
8
+ extern crate proc_macro_api_tests;
9
+
10
+ proc_macro_api_tests:: run!( ) ;
11
+
12
+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments