We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f7f57eb + b6f0567 commit 01b2b35Copy full SHA for 01b2b35
src/librustc_typeck/astconv.rs
@@ -2358,10 +2358,11 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
2358
break;
2359
}
2360
2361
- for binding in segment.generic_args().bindings {
+
2362
+ // Only emit the first error to avoid overloading the user with error messages.
2363
+ if let [binding, ..] = segment.generic_args().bindings {
2364
has_err = true;
2365
Self::prohibit_assoc_ty_binding(self.tcx(), binding.span);
- break;
2366
2367
2368
has_err
0 commit comments