Skip to content

Commit 650f19a

Browse files
committed
hygiene: Merge a tiny bit of the "share expansion definition data" PR
1 parent 74190a5 commit 650f19a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/librustc/hir/lowering.rs

-1
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,6 @@ impl<'a> LoweringContext<'a> {
705705
allow_internal_unstable: Option<Lrc<[Symbol]>>,
706706
) -> Span {
707707
span.fresh_expansion(ExpnInfo {
708-
def_site: span,
709708
allow_internal_unstable,
710709
..ExpnInfo::default(ExpnKind::Desugaring(reason), span, self.sess.edition())
711710
})

src/libsyntax_pos/hygiene.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,9 @@ pub struct ExpnInfo {
603603
pub call_site: Span,
604604

605605
// --- The part specific to the macro/desugaring definition.
606-
// --- FIXME: Share it between expansions with the same definition.
606+
// --- It may be reasonable to share this part between expansions with the same definition,
607+
// --- but such sharing is known to bring some minor inconveniences without also bringing
608+
// --- noticeable perf improvements (PR #62898).
607609
/// The span of the macro definition (possibly dummy).
608610
/// This span serves only informational purpose and is not used for resolution.
609611
pub def_site: Span,

0 commit comments

Comments
 (0)