Skip to content

Commit edd7f2c

Browse files
committed
Add a useful comment.
1 parent 4ba6096 commit edd7f2c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_expand/src/mbe/macro_parser.rs

+4
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ struct MatcherPos {
211211
/// with one element per metavar decl in the matcher. Each element records token trees matched
212212
/// against the relevant metavar by the black box parser. An element will be a `MatchedSeq` if
213213
/// the corresponding metavar decl is within a sequence.
214+
///
215+
/// It is critical to performance that this is an `Lrc`, because it gets cloned frequently when
216+
/// processing sequences. Mostly for sequence-ending possibilities that must be tried but end
217+
/// up failing.
214218
matches: Lrc<Vec<NamedMatch>>,
215219
}
216220

0 commit comments

Comments
 (0)