File tree 1 file changed +7
-7
lines changed
compiler/rustc_parse/src/parser
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -218,16 +218,16 @@ impl<'a> Parser<'a> {
218
218
let start_token = ( self . token . clone ( ) , self . token_spacing ) ;
219
219
let cursor_snapshot = self . token_cursor . clone ( ) ;
220
220
let start_pos = self . num_bump_calls ;
221
-
222
221
let has_outer_attrs = !attrs. attrs . is_empty ( ) ;
223
- let prev_capturing = std:: mem:: replace ( & mut self . capture_state . capturing , Capturing :: Yes ) ;
224
222
let replace_ranges_start = self . capture_state . replace_ranges . len ( ) ;
225
223
226
- let ret = f ( self , attrs. attrs ) ;
227
-
228
- self . capture_state . capturing = prev_capturing;
229
-
230
- let ( mut ret, trailing) = ret?;
224
+ let ( mut ret, trailing) = {
225
+ let prev_capturing =
226
+ std:: mem:: replace ( & mut self . capture_state . capturing , Capturing :: Yes ) ;
227
+ let ret_and_trailing = f ( self , attrs. attrs ) ;
228
+ self . capture_state . capturing = prev_capturing;
229
+ ret_and_trailing?
230
+ } ;
231
231
232
232
// When we're not in `capture-cfg` mode, then bail out early if:
233
233
// 1. Our target doesn't support tokens at all (e.g we're parsing an `NtIdent`)
You can’t perform that action at this time.
0 commit comments