Skip to content

Commit db0877f

Browse files
committed
trivial fix on fallback
1 parent fdda7e0 commit db0877f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

compiler/rustc_resolve/src/late/diagnostics.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
318318
if !self.type_ascription_suggestion(&mut err, base_error.span) {
319319
let mut fallback =
320320
self.suggest_trait_and_bounds(&mut err, source, res, span, &base_error);
321-
if self.suggest_typo(&mut err, source, path, span, &base_error) {
322-
fallback = true;
323-
}
321+
fallback |= self.suggest_typo(&mut err, source, path, span, &base_error);
324322
if fallback {
325323
// Fallback label.
326324
err.span_label(base_error.span, &base_error.fallback_label);

0 commit comments

Comments
 (0)