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;
10
10
use rustc_span:: symbol:: { sym, Ident } ;
11
11
use rustc_span:: { ErrorGuaranteed , Span } ;
12
12
13
- pub ( crate ) struct Expander ( pub bool ) ;
13
+ pub ( crate ) struct Expander {
14
+ pub is_const : bool ,
15
+ }
14
16
15
17
impl MultiItemModifier for Expander {
16
18
fn expand (
@@ -58,7 +60,7 @@ impl MultiItemModifier for Expander {
58
60
report_path_args ( sess, meta) ;
59
61
meta. path . clone ( )
60
62
} )
61
- . map ( |path| ( path, dummy_annotatable ( ) , None , self . 0 ) )
63
+ . map ( |path| ( path, dummy_annotatable ( ) , None , self . is_const ) )
62
64
. collect ( )
63
65
}
64
66
_ => vec ! [ ] ,
Original file line number Diff line number Diff line change @@ -109,8 +109,8 @@ pub fn register_builtin_macros(resolver: &mut dyn ResolverExpand) {
109
109
bench: test:: expand_bench,
110
110
cfg_accessible: cfg_accessible:: Expander ,
111
111
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 } ,
114
114
global_allocator: global_allocator:: expand,
115
115
test: test:: expand_test,
116
116
test_case: test:: expand_test_case,
You can’t perform that action at this time.
0 commit comments