File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
compiler/rustc_parse/src/parser Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2260,7 +2260,7 @@ impl<'a> Parser<'a> {
22602260 ( pat, this. parse_ty_for_param ( ) ?)
22612261 } else {
22622262 debug ! ( "parse_param_general ident_to_pat" ) ;
2263- let parser_snapshot_before_ty = this. clone ( ) ;
2263+ let parser_snapshot_before_ty = this. create_snapshot_for_diagnostic ( ) ;
22642264 this. eat_incorrect_doc_comment_for_param_type ( ) ;
22652265 let mut ty = this. parse_ty_for_param ( ) ;
22662266 if ty. is_ok ( )
@@ -2283,7 +2283,7 @@ impl<'a> Parser<'a> {
22832283 // Recover from attempting to parse the argument as a type without pattern.
22842284 Err ( err) => {
22852285 err. cancel ( ) ;
2286- * this = parser_snapshot_before_ty;
2286+ this. restore_snapshot ( parser_snapshot_before_ty) ;
22872287 this. recover_arg_parse ( ) ?
22882288 }
22892289 }
You can’t perform that action at this time.
0 commit comments