Skip to content

Commit 88b0912

Browse files
committed
Fix a typo in a variable name.
1 parent dbd8220 commit 88b0912

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/librustc_expand/mbe/macro_rules.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,14 @@ fn generic_extension<'cx>(
222222
// This is used so that if a matcher is not `Success(..)`ful,
223223
// then the spans which became gated when parsing the unsuccessful matcher
224224
// are not recorded. On the first `Success(..)`ful matcher, the spans are merged.
225-
let mut gated_spans_snaphot = mem::take(&mut *cx.parse_sess.gated_spans.spans.borrow_mut());
225+
let mut gated_spans_snapshot =
226+
mem::take(&mut *cx.parse_sess.gated_spans.spans.borrow_mut());
226227

227228
match parse_tt(&mut Cow::Borrowed(&parser), lhs_tt) {
228229
Success(named_matches) => {
229230
// The matcher was `Success(..)`ful.
230231
// Merge the gated spans from parsing the matcher with the pre-existing ones.
231-
cx.parse_sess.gated_spans.merge(gated_spans_snaphot);
232+
cx.parse_sess.gated_spans.merge(gated_spans_snapshot);
232233

233234
let rhs = match rhses[i] {
234235
// ignore delimiters
@@ -289,7 +290,7 @@ fn generic_extension<'cx>(
289290

290291
// The matcher was not `Success(..)`ful.
291292
// Restore to the state before snapshotting and maybe try again.
292-
mem::swap(&mut gated_spans_snaphot, &mut cx.parse_sess.gated_spans.spans.borrow_mut());
293+
mem::swap(&mut gated_spans_snapshot, &mut cx.parse_sess.gated_spans.spans.borrow_mut());
293294
}
294295
drop(parser);
295296

0 commit comments

Comments
 (0)