diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs index d865357b82900..2fb1bcf2dbfff 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs @@ -959,11 +959,10 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { \n where\n T: {qself_str},\n{}", where_bounds.join(",\n"), )); - } - let reported = err.emit(); - if !where_bounds.is_empty() { + let reported = err.emit(); return Err(reported); } + err.emit(); } Ok(bound)