Skip to content

Commit

Permalink
Rollup merge of #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 committed Feb 28, 2020
2 parents 350491d + b6f0567 commit 84f5bcc
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 @@ -2439,10 +2439,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 84f5bcc

Please sign in to comment.