hygiene: Merge a tiny bit of the "share expansion definition data" PR

This commit is contained in:
Vadim Petrochenkov 2019-08-13 23:39:48 +03:00
parent 74190a5e1c
commit 650f19aeae
2 changed files with 3 additions and 2 deletions

View File

@ -705,7 +705,6 @@ impl<'a> LoweringContext<'a> {
allow_internal_unstable: Option<Lrc<[Symbol]>>,
) -> Span {
span.fresh_expansion(ExpnInfo {
def_site: span,
allow_internal_unstable,
..ExpnInfo::default(ExpnKind::Desugaring(reason), span, self.sess.edition())
})

View File

@ -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,