File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
compiler/rustc_builtin_macros/src Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ use rustc_session::Session;
1010use rustc_span:: symbol:: { sym, Ident } ;
1111use rustc_span:: { ErrorGuaranteed , Span } ;
1212
13- pub ( crate ) struct Expander ( pub bool ) ;
13+ pub ( crate ) struct Expander {
14+ pub is_const : bool ,
15+ }
1416
1517impl MultiItemModifier for Expander {
1618 fn expand (
@@ -58,7 +60,7 @@ impl MultiItemModifier for Expander {
5860 report_path_args ( sess, meta) ;
5961 meta. path . clone ( )
6062 } )
61- . map ( |path| ( path, dummy_annotatable ( ) , None , self . 0 ) )
63+ . map ( |path| ( path, dummy_annotatable ( ) , None , self . is_const ) )
6264 . collect ( )
6365 }
6466 _ => vec ! [ ] ,
Original file line number Diff line number Diff line change @@ -109,8 +109,8 @@ pub fn register_builtin_macros(resolver: &mut dyn ResolverExpand) {
109109 bench: test:: expand_bench,
110110 cfg_accessible: cfg_accessible:: Expander ,
111111 cfg_eval: cfg_eval:: expand,
112- derive: derive:: Expander ( false ) ,
113- derive_const: derive:: Expander ( true ) ,
112+ derive: derive:: Expander { is_const : false } ,
113+ derive_const: derive:: Expander { is_const : true } ,
114114 global_allocator: global_allocator:: expand,
115115 test: test:: expand_test,
116116 test_case: test:: expand_test_case,
You can’t perform that action at this time.
0 commit comments