@@ -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;
@@ -3057,17 +3057,10 @@ impl<'a> Parser<'a> {
3057
3057
}
3058
3058
3059
3059
pub ( super ) fn recover_vcs_conflict_marker ( & mut self ) {
3060
- if let Err ( err) = self . err_vcs_conflict_marker ( ) {
3061
- err. emit ( ) ;
3062
- FatalError . raise ( ) ;
3063
- }
3064
- }
3065
-
3066
- pub ( crate ) fn err_vcs_conflict_marker ( & mut self ) -> PResult < ' a , ( ) > {
3067
3060
// <<<<<<<
3068
3061
let Some ( start) = self . conflict_marker ( & TokenKind :: BinOp ( token:: Shl ) , & TokenKind :: Lt )
3069
3062
else {
3070
- return Ok ( ( ) ) ;
3063
+ return ;
3071
3064
} ;
3072
3065
let mut spans = Vec :: with_capacity ( 3 ) ;
3073
3066
spans. push ( start) ;
@@ -3097,7 +3090,7 @@ impl<'a> Parser<'a> {
3097
3090
self . bump ( ) ;
3098
3091
}
3099
3092
3100
- let mut err = self . dcx ( ) . struct_span_err ( spans, "encountered diff marker" ) ;
3093
+ let mut err = self . dcx ( ) . struct_span_fatal ( spans, "encountered diff marker" ) ;
3101
3094
match middlediff3 {
3102
3095
// We're using diff3
3103
3096
Some ( middlediff3) => {
@@ -3140,7 +3133,7 @@ impl<'a> Parser<'a> {
3140
3133
visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>",
3141
3134
) ;
3142
3135
3143
- Err ( err)
3136
+ err. emit ( ) ;
3144
3137
}
3145
3138
3146
3139
/// Parse and throw away a parenthesized comma separated
0 commit comments