File tree 3 files changed +39
-0
lines changed
3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ // force-host
2
+ // no-prefer-dynamic
3
+ #![ crate_type = "proc-macro" ]
4
+
5
+ extern crate proc_macro;
6
+
7
+ use proc_macro:: TokenStream ;
8
+
9
+ #[ proc_macro_attribute]
10
+ pub fn assert_input ( args : TokenStream , input : TokenStream ) -> TokenStream {
11
+ assert_eq ! ( input. to_string( ) , "trait Alias = Sized ;" ) ;
12
+ assert ! ( args. is_empty( ) ) ;
13
+ TokenStream :: new ( )
14
+ }
Original file line number Diff line number Diff line change
1
+ // check-pass
2
+ // aux-build:issue-79825.rs
3
+ #![ feature( trait_alias) ]
4
+
5
+ extern crate issue_79825;
6
+
7
+ #[ issue_79825:: assert_input]
8
+ trait Alias = Sized ;
9
+
10
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ // check-pass
2
+ // aux-build:test-macros.rs
3
+ #![ feature( stmt_expr_attributes, proc_macro_hygiene) ]
4
+
5
+ extern crate test_macros;
6
+
7
+ use test_macros:: identity_attr;
8
+
9
+ #[ identity_attr]
10
+ fn main ( ) {
11
+ let _x;
12
+ let y = ( ) ;
13
+ #[ identity_attr]
14
+ _x = y;
15
+ }
You can’t perform that action at this time.
0 commit comments