Skip to content

Commit

Permalink
trivial fix on fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyukang committed Sep 25, 2022
1 parent fdda7e0 commit db0877f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions compiler/rustc_resolve/src/late/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
if !self.type_ascription_suggestion(&mut err, base_error.span) {
let mut fallback =
self.suggest_trait_and_bounds(&mut err, source, res, span, &base_error);
if self.suggest_typo(&mut err, source, path, span, &base_error) {
fallback = true;
}
fallback |= self.suggest_typo(&mut err, source, path, span, &base_error);
if fallback {
// Fallback label.
err.span_label(base_error.span, &base_error.fallback_label);
Expand Down

0 comments on commit db0877f

Please sign in to comment.