File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -222,13 +222,14 @@ fn generic_extension<'cx>(
222
222
// This is used so that if a matcher is not `Success(..)`ful,
223
223
// then the spans which became gated when parsing the unsuccessful matcher
224
224
// 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 ( ) ) ;
226
227
227
228
match parse_tt ( & mut Cow :: Borrowed ( & parser) , lhs_tt) {
228
229
Success ( named_matches) => {
229
230
// The matcher was `Success(..)`ful.
230
231
// 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 ) ;
232
233
233
234
let rhs = match rhses[ i] {
234
235
// ignore delimiters
@@ -289,7 +290,7 @@ fn generic_extension<'cx>(
289
290
290
291
// The matcher was not `Success(..)`ful.
291
292
// 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 ( ) ) ;
293
294
}
294
295
drop ( parser) ;
295
296
You can’t perform that action at this time.
0 commit comments