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.
1 parent a8437cf commit b6f0567Copy full SHA for b6f0567
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