We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 350491d + b6f0567 commit 84f5bccCopy full SHA for 84f5bcc
src/librustc_typeck/astconv.rs
@@ -2439,10 +2439,11 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
2439
break;
2440
}
2441
2442
- for binding in segment.generic_args().bindings {
+
2443
+ // Only emit the first error to avoid overloading the user with error messages.
2444
+ if let [binding, ..] = segment.generic_args().bindings {
2445
has_err = true;
2446
Self::prohibit_assoc_ty_binding(self.tcx(), binding.span);
- break;
2447
2448
2449
has_err
0 commit comments