From 650f19aeae94eff687382859603929cd2dd463bc Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Tue, 13 Aug 2019 23:39:48 +0300 Subject: [PATCH] hygiene: Merge a tiny bit of the "share expansion definition data" PR --- src/librustc/hir/lowering.rs | 1 - src/libsyntax_pos/hygiene.rs | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs index 0b7dacf8383..8c1ce5983b8 100644 --- a/src/librustc/hir/lowering.rs +++ b/src/librustc/hir/lowering.rs @@ -705,7 +705,6 @@ impl<'a> LoweringContext<'a> { allow_internal_unstable: Option>, ) -> Span { span.fresh_expansion(ExpnInfo { - def_site: span, allow_internal_unstable, ..ExpnInfo::default(ExpnKind::Desugaring(reason), span, self.sess.edition()) }) diff --git a/src/libsyntax_pos/hygiene.rs b/src/libsyntax_pos/hygiene.rs index 1dba466625a..4d9496f94fb 100644 --- a/src/libsyntax_pos/hygiene.rs +++ b/src/libsyntax_pos/hygiene.rs @@ -603,7 +603,9 @@ pub struct ExpnInfo { pub call_site: Span, // --- The part specific to the macro/desugaring definition. - // --- FIXME: Share it between expansions with the same definition. + // --- It may be reasonable to share this part between expansions with the same definition, + // --- but such sharing is known to bring some minor inconveniences without also bringing + // --- noticeable perf improvements (PR #62898). /// The span of the macro definition (possibly dummy). /// This span serves only informational purpose and is not used for resolution. pub def_site: Span,