@@ -709,31 +709,6 @@ pub struct ExpnData {
709
709
/// call_site span would have its own ExpnData, with the call_site
710
710
/// pointing to the `foo!` invocation.
711
711
pub call_site : Span ,
712
-
713
- // --- The part specific to the macro/desugaring definition.
714
- // --- It may be reasonable to share this part between expansions with the same definition,
715
- // --- but such sharing is known to bring some minor inconveniences without also bringing
716
- // --- noticeable perf improvements (PR #62898).
717
- /// The span of the macro definition (possibly dummy).
718
- /// This span serves only informational purpose and is not used for resolution.
719
- pub def_site : Span ,
720
- /// List of `#[unstable]`/feature-gated features that the macro is allowed to use
721
- /// internally without forcing the whole crate to opt-in
722
- /// to them.
723
- pub allow_internal_unstable : Option < Lrc < [ Symbol ] > > ,
724
- /// Whether the macro is allowed to use `unsafe` internally
725
- /// even if the user crate has `#![forbid(unsafe_code)]`.
726
- pub allow_internal_unsafe : bool ,
727
- /// Enables the macro helper hack (`ident!(...)` -> `$crate::ident!(...)`)
728
- /// for a given macro.
729
- pub local_inner_macros : bool ,
730
- /// Edition of the crate in which the macro is defined.
731
- pub edition : Edition ,
732
- /// The `DefId` of the macro being invoked,
733
- /// if this `ExpnData` corresponds to a macro invocation
734
- pub macro_def_id : Option < DefId > ,
735
- /// The normal module (`mod`) in which the expanded macro was defined.
736
- pub parent_module : Option < DefId > ,
737
712
/// The crate that originally created this `ExpnData`. During
738
713
/// metadata serialization, we only encode `ExpnData`s that were
739
714
/// created locally - when our serialized metadata is decoded,
@@ -748,7 +723,6 @@ pub struct ExpnData {
748
723
// be considered equivalent.
749
724
#[ stable_hasher( ignore) ]
750
725
orig_id : Option < u32 > ,
751
-
752
726
/// Used to force two `ExpnData`s to have different `Fingerprint`s.
753
727
/// Due to macro expansion, it's possible to end up with two `ExpnId`s
754
728
/// that have identical `ExpnData`s. This violates the contract of `HashStable`
@@ -760,6 +734,31 @@ pub struct ExpnData {
760
734
/// `ExpnId`s would end up with the same `Fingerprint`. Since `ExpnData` includes
761
735
/// a `krate` field, this value only needs to be unique within a single crate.
762
736
disambiguator : u32 ,
737
+
738
+ // --- The part specific to the macro/desugaring definition.
739
+ // --- It may be reasonable to share this part between expansions with the same definition,
740
+ // --- but such sharing is known to bring some minor inconveniences without also bringing
741
+ // --- noticeable perf improvements (PR #62898).
742
+ /// The span of the macro definition (possibly dummy).
743
+ /// This span serves only informational purpose and is not used for resolution.
744
+ pub def_site : Span ,
745
+ /// List of `#[unstable]`/feature-gated features that the macro is allowed to use
746
+ /// internally without forcing the whole crate to opt-in
747
+ /// to them.
748
+ pub allow_internal_unstable : Option < Lrc < [ Symbol ] > > ,
749
+ /// Whether the macro is allowed to use `unsafe` internally
750
+ /// even if the user crate has `#![forbid(unsafe_code)]`.
751
+ pub allow_internal_unsafe : bool ,
752
+ /// Enables the macro helper hack (`ident!(...)` -> `$crate::ident!(...)`)
753
+ /// for a given macro.
754
+ pub local_inner_macros : bool ,
755
+ /// Edition of the crate in which the macro is defined.
756
+ pub edition : Edition ,
757
+ /// The `DefId` of the macro being invoked,
758
+ /// if this `ExpnData` corresponds to a macro invocation
759
+ pub macro_def_id : Option < DefId > ,
760
+ /// The normal module (`mod`) in which the expanded macro was defined.
761
+ pub parent_module : Option < DefId > ,
763
762
}
764
763
765
764
// These would require special handling of `orig_id`.
0 commit comments