Skip to content

Commit c67d107

Browse files
committed
Revert "Reorder hot accesses"
This reverts commit 0bd2f7a.
1 parent 0bd2f7a commit c67d107

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

compiler/rustc_expand/src/mbe/transcribe.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ use crate::mbe::{self, KleeneOp, MetaVarExpr};
2727

2828
/// Context needed to perform transcription of metavariable expressions.
2929
struct TranscrCtx<'psess, 'itp> {
30+
psess: &'psess ParseSess,
31+
32+
/// Map from metavars to matched tokens
33+
interp: &'itp FxHashMap<MacroRulesNormalizedIdent, NamedMatch>,
34+
35+
/// Allow marking spans.
36+
marker: Marker,
37+
3038
/// The stack of things yet to be completely expanded.
3139
///
3240
/// We descend into the RHS (`src`), expanding things as we go. This stack contains the things
@@ -58,14 +66,6 @@ struct TranscrCtx<'psess, 'itp> {
5866
/// The in-progress `result` lives at the top of this stack. Each entered `TokenTree` adds a
5967
/// new entry.
6068
result_stack: Vec<Vec<TokenTree>>,
61-
62-
/// Allow marking spans.
63-
marker: Marker,
64-
65-
psess: &'psess ParseSess,
66-
67-
/// Map from metavars to matched tokens
68-
interp: &'itp FxHashMap<MacroRulesNormalizedIdent, NamedMatch>,
6969
}
7070

7171
impl<'psess> TranscrCtx<'psess, '_> {
@@ -174,17 +174,17 @@ pub(super) fn transcribe<'a>(
174174
}
175175

176176
let mut tscx = TranscrCtx {
177+
psess,
178+
interp,
179+
marker: Marker { expand_id, transparency, cache: Default::default() },
180+
repeats: Vec::new(),
177181
stack: smallvec![Frame::new_delimited(
178182
src,
179183
src_span,
180184
DelimSpacing::new(Spacing::Alone, Spacing::Alone)
181185
)],
182-
repeats: Vec::new(),
183186
result: Vec::new(),
184187
result_stack: Vec::new(),
185-
marker: Marker { expand_id, transparency, cache: Default::default() },
186-
psess,
187-
interp,
188188
};
189189

190190
loop {

0 commit comments

Comments
 (0)