Hide errors whose suggestions would contain error constants or types

This commit is contained in:
Oli Scherer 2024-12-05 16:57:30 +00:00
parent cb72b9bb37
commit 060cecba1a
2 changed files with 3 additions and 6 deletions

View file

@ -998,6 +998,9 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
self.lower_const_arg(ct, FeedConstTy::No).into()
}
};
if term.references_error() {
continue;
}
// FIXME(#97583): This isn't syntactically well-formed!
where_bounds.push(format!(
" T: {trait}::{assoc_name} = {term}",