mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
hygiene: Merge a tiny bit of the "share expansion definition data" PR
This commit is contained in:
parent
74190a5e1c
commit
650f19aeae
@ -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())
|
||||
})
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user