@@ -210,7 +210,10 @@ impl FormatReport {
210
210
if !new_errors. is_empty ( ) {
211
211
errs. has_formatting_errors = true ;
212
212
}
213
- if errs. has_operational_errors && errs. has_check_errors && errs. has_missing_errors {
213
+ if errs. has_operational_errors
214
+ && errs. has_check_errors
215
+ && errs. has_unformatted_original_code
216
+ {
214
217
return ;
215
218
}
216
219
for err in new_errors {
@@ -220,10 +223,10 @@ impl FormatReport {
220
223
}
221
224
ErrorKind :: TrailingWhitespace => {
222
225
errs. has_operational_errors = true ;
223
- errs. has_missing_errors = true ;
226
+ errs. has_unformatted_original_code = true ;
224
227
}
225
228
ErrorKind :: LostComment => {
226
- errs. has_missing_errors = true ;
229
+ errs. has_unformatted_original_code = true ;
227
230
}
228
231
ErrorKind :: BadIssue ( _)
229
232
| ErrorKind :: LicenseCheck
@@ -313,7 +316,7 @@ fn format_snippet(snippet: &str, config: &Config, is_macro_def: bool) -> Option<
313
316
session. errors . has_macro_format_failure
314
317
|| session. out . as_ref ( ) . unwrap ( ) . is_empty ( ) && !snippet. is_empty ( )
315
318
|| result. is_err ( )
316
- || ( is_macro_def && session. has_missing_errors ( ) ) ,
319
+ || ( is_macro_def && session. has_unformatted_original_code ( ) ) ,
317
320
result,
318
321
)
319
322
} ;
@@ -488,8 +491,8 @@ impl<'b, T: Write + 'b> Session<'b, T> {
488
491
self . errors . has_diff
489
492
}
490
493
491
- pub fn has_missing_errors ( & self ) -> bool {
492
- self . errors . has_missing_errors
494
+ pub fn has_unformatted_original_code ( & self ) -> bool {
495
+ self . errors . has_unformatted_original_code
493
496
}
494
497
495
498
pub fn has_no_errors ( & self ) -> bool {
@@ -498,7 +501,7 @@ impl<'b, T: Write + 'b> Session<'b, T> {
498
501
|| self . has_formatting_errors ( )
499
502
|| self . has_check_errors ( )
500
503
|| self . has_diff ( )
501
- || self . has_missing_errors ( )
504
+ || self . has_unformatted_original_code ( )
502
505
|| self . errors . has_macro_format_failure )
503
506
}
504
507
}
0 commit comments