@@ -16,8 +16,8 @@ use rustc_ast_pretty::pprust;
16
16
use rustc_data_structures:: fx:: FxHashSet ;
17
17
use rustc_data_structures:: sync:: Lrc ;
18
18
use rustc_errors:: {
19
- Applicability , Diag , DiagCtxtHandle , ErrorGuaranteed , FatalError , PResult , Subdiagnostic ,
20
- Suggestions , pluralize,
19
+ Applicability , Diag , DiagCtxtHandle , ErrorGuaranteed , PResult , Subdiagnostic , Suggestions ,
20
+ pluralize,
21
21
} ;
22
22
use rustc_session:: errors:: ExprParenthesesNeeded ;
23
23
use rustc_span:: edit_distance:: find_best_match_for_name;
@@ -3023,17 +3023,10 @@ impl<'a> Parser<'a> {
3023
3023
}
3024
3024
3025
3025
pub ( super ) fn recover_vcs_conflict_marker ( & mut self ) {
3026
- if let Err ( err) = self . err_vcs_conflict_marker ( ) {
3027
- err. emit ( ) ;
3028
- FatalError . raise ( ) ;
3029
- }
3030
- }
3031
-
3032
- pub ( crate ) fn err_vcs_conflict_marker ( & mut self ) -> PResult < ' a , ( ) > {
3033
3026
// <<<<<<<
3034
3027
let Some ( start) = self . conflict_marker ( & TokenKind :: BinOp ( token:: Shl ) , & TokenKind :: Lt )
3035
3028
else {
3036
- return Ok ( ( ) ) ;
3029
+ return ;
3037
3030
} ;
3038
3031
let mut spans = Vec :: with_capacity ( 3 ) ;
3039
3032
spans. push ( start) ;
@@ -3063,7 +3056,7 @@ impl<'a> Parser<'a> {
3063
3056
self . bump ( ) ;
3064
3057
}
3065
3058
3066
- let mut err = self . dcx ( ) . struct_span_err ( spans, "encountered diff marker" ) ;
3059
+ let mut err = self . dcx ( ) . struct_span_fatal ( spans, "encountered diff marker" ) ;
3067
3060
match middlediff3 {
3068
3061
// We're using diff3
3069
3062
Some ( middlediff3) => {
@@ -3106,7 +3099,7 @@ impl<'a> Parser<'a> {
3106
3099
visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>",
3107
3100
) ;
3108
3101
3109
- Err ( err)
3102
+ err. emit ( ) ;
3110
3103
}
3111
3104
3112
3105
/// Parse and throw away a parenthesized comma separated
0 commit comments