Skip to content

Commit

Permalink
Rollup merge of rust-lang#69430 - matthiaskrgr:noloop, r=varkor
Browse files Browse the repository at this point in the history
librustc_typeck: remove loop that never actually loops
  • Loading branch information
Dylan-DPC authored Feb 27, 2020
2 parents f7f57eb + b6f0567 commit 01b2b35
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/librustc_typeck/astconv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2358,10 +2358,11 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
break;
}
}
for binding in segment.generic_args().bindings {

// Only emit the first error to avoid overloading the user with error messages.
if let [binding, ..] = segment.generic_args().bindings {
has_err = true;
Self::prohibit_assoc_ty_binding(self.tcx(), binding.span);
break;
}
}
has_err
Expand Down

0 comments on commit 01b2b35

Please sign in to comment.