diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2020-02-11 08:44:55 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2020-02-14 10:51:08 +1100 |
| commit | 88b0912d27afa0fa2f9593c3c7545207127ff91c (patch) | |
| tree | 5a6a31ba59cc93ed520212c3f0475150286d4de5 | |
| parent | dbd8220891d229f9092e623b8a1dcadbddeb12fc (diff) | |
| download | rust-88b0912d27afa0fa2f9593c3c7545207127ff91c.tar.gz rust-88b0912d27afa0fa2f9593c3c7545207127ff91c.zip | |
Fix a typo in a variable name.
| -rw-r--r-- | src/librustc_expand/mbe/macro_rules.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/librustc_expand/mbe/macro_rules.rs b/src/librustc_expand/mbe/macro_rules.rs index da4309c3b3d..f6abcce4d3f 100644 --- a/src/librustc_expand/mbe/macro_rules.rs +++ b/src/librustc_expand/mbe/macro_rules.rs @@ -222,13 +222,14 @@ fn generic_extension<'cx>( // This is used so that if a matcher is not `Success(..)`ful, // then the spans which became gated when parsing the unsuccessful matcher // are not recorded. On the first `Success(..)`ful matcher, the spans are merged. - let mut gated_spans_snaphot = mem::take(&mut *cx.parse_sess.gated_spans.spans.borrow_mut()); + let mut gated_spans_snapshot = + mem::take(&mut *cx.parse_sess.gated_spans.spans.borrow_mut()); match parse_tt(&mut Cow::Borrowed(&parser), lhs_tt) { Success(named_matches) => { // The matcher was `Success(..)`ful. // Merge the gated spans from parsing the matcher with the pre-existing ones. - cx.parse_sess.gated_spans.merge(gated_spans_snaphot); + cx.parse_sess.gated_spans.merge(gated_spans_snapshot); let rhs = match rhses[i] { // ignore delimiters @@ -289,7 +290,7 @@ fn generic_extension<'cx>( // The matcher was not `Success(..)`ful. // Restore to the state before snapshotting and maybe try again. - mem::swap(&mut gated_spans_snaphot, &mut cx.parse_sess.gated_spans.spans.borrow_mut()); + mem::swap(&mut gated_spans_snapshot, &mut cx.parse_sess.gated_spans.spans.borrow_mut()); } drop(parser); |
