File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
compiler/rustc_expand/src Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -136,15 +136,16 @@ impl MultiItemModifier for DeriveProcMacro {
136
136
// FIXME(pr-time): without flattened some (weird) tests fail, but no idea if it's correct/enough
137
137
let input = tcx. arena . alloc ( input. flattened ( ) ) as & TokenStream ;
138
138
let invoc_id = ecx. current_expansion . id ;
139
+ let invoc_expn_data = invoc_id. expn_data ( ) ;
139
140
140
141
// FIXME(pr-time): Just using the crate hash to notice when the proc-macro code has
141
142
// changed. How to *correctly* depend on exactly the macro definition?
142
143
// I.e., depending on the crate hash is just a HACK (and leaves garbage in the
143
144
// incremental compilation dir).
144
- let macro_def_id = invoc_id . expn_data ( ) . macro_def_id . unwrap ( ) ;
145
+ let macro_def_id = invoc_expn_data . macro_def_id . unwrap ( ) ;
145
146
let proc_macro_crate_hash = tcx. crate_hash ( macro_def_id. krate ) ;
146
147
147
- assert_eq ! ( invoc_id . expn_data ( ) . call_site, span) ;
148
+ assert_eq ! ( invoc_expn_data . call_site, span) ;
148
149
149
150
let res = crate :: derive_macro_expansion:: enter_context ( ( ecx, self . client ) , move || {
150
151
let key = ( invoc_id, proc_macro_crate_hash, input) ;
You can’t perform that action at this time.
0 commit comments