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 {
136136 // FIXME(pr-time): without flattened some (weird) tests fail, but no idea if it's correct/enough
137137 let input = tcx. arena . alloc ( input. flattened ( ) ) as & TokenStream ;
138138 let invoc_id = ecx. current_expansion . id ;
139+ let invoc_expn_data = invoc_id. expn_data ( ) ;
139140
140141 // FIXME(pr-time): Just using the crate hash to notice when the proc-macro code has
141142 // changed. How to *correctly* depend on exactly the macro definition?
142143 // I.e., depending on the crate hash is just a HACK (and leaves garbage in the
143144 // 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 ( ) ;
145146 let proc_macro_crate_hash = tcx. crate_hash ( macro_def_id. krate ) ;
146147
147- assert_eq ! ( invoc_id . expn_data ( ) . call_site, span) ;
148+ assert_eq ! ( invoc_expn_data . call_site, span) ;
148149
149150 let res = crate :: derive_macro_expansion:: enter_context ( ( ecx, self . client ) , move || {
150151 let key = ( invoc_id, proc_macro_crate_hash, input) ;
You can’t perform that action at this time.
0 commit comments