From 8e7e405f6ab0c1ee10bfdd3d55a97628fe4cd6dd Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 20 Mar 2021 10:51:00 +0100 Subject: Remove WhereClause::Error Chalk doesn't have it, and judging from the removed code, it wasn't useful anyway. --- crates/hir_ty/src/traits/chalk/mapping.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'crates/hir_ty/src/traits/chalk') diff --git a/crates/hir_ty/src/traits/chalk/mapping.rs b/crates/hir_ty/src/traits/chalk/mapping.rs index 5756e9754..7841c216c 100644 --- a/crates/hir_ty/src/traits/chalk/mapping.rs +++ b/crates/hir_ty/src/traits/chalk/mapping.rs @@ -98,7 +98,7 @@ impl ToChalk for Ty { TyKind::Dyn(predicates) => { let where_clauses = chalk_ir::QuantifiedWhereClauses::from_iter( &Interner, - predicates.iter().filter(|p| !p.is_error()).cloned().map(|p| p.to_chalk(db)), + predicates.iter().cloned().map(|p| p.to_chalk(db)), ); let bounded_ty = chalk_ir::DynTy { bounds: make_binders(where_clauses, 1), @@ -318,7 +318,6 @@ impl ToChalk for WhereClause { chalk_ir::WhereClause::AliasEq(alias_eq.to_chalk(db).shifted_in(&Interner)), 0, ), - WhereClause::Error => panic!("tried passing GenericPredicate::Error to Chalk"), } } @@ -521,10 +520,6 @@ pub(super) fn convert_where_clauses( let generic_predicates = db.generic_predicates(def); let mut result = Vec::with_capacity(generic_predicates.len()); for pred in generic_predicates.iter() { - if pred.value.is_error() { - // skip errored predicates completely - continue; - } result.push(pred.clone().subst(substs).to_chalk(db)); } result -- cgit v1.2.3