1
Fork 0

Store macro parent module in ExpnData.

This commit is contained in:
Camille GILLOT 2021-06-28 19:29:55 +02:00
parent 969a6c2481
commit 3162c37b59
7 changed files with 32 additions and 40 deletions

View file

@ -836,7 +836,7 @@ impl<'a, 'tcx> MutVisitor<'tcx> for Integrator<'a, 'tcx> {
fn visit_span(&mut self, span: &mut Span) {
let mut expn_data =
ExpnData::default(ExpnKind::Inlined, *span, self.tcx.sess.edition(), None);
ExpnData::default(ExpnKind::Inlined, *span, self.tcx.sess.edition(), None, None);
expn_data.def_site = self.body_span;
// Make sure that all spans track the fact that they were inlined.
*span = self.callsite_span.fresh_expansion(expn_data);