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/lower.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'crates/hir_ty/src/lower.rs') diff --git a/crates/hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs index 4199dc7a6..cbbb535e5 100644 --- a/crates/hir_ty/src/lower.rs +++ b/crates/hir_ty/src/lower.rs @@ -703,10 +703,10 @@ impl<'a> TyLoweringContext<'a> { let trait_ref = match bound { TypeBound::Path(path) => { bindings = self.lower_trait_ref_from_path(path, Some(self_ty)); - Some(bindings.clone().map_or(WhereClause::Error, WhereClause::Implemented)) + bindings.clone().map(WhereClause::Implemented) } TypeBound::Lifetime(_) => None, - TypeBound::Error => Some(WhereClause::Error), + TypeBound::Error => None, }; trait_ref.into_iter().chain( bindings @@ -919,9 +919,6 @@ pub(crate) fn trait_environment_query( let mut clauses = Vec::new(); for pred in resolver.where_predicates_in_scope() { for pred in ctx.lower_where_predicate(pred) { - if pred.is_error() { - continue; - } if let WhereClause::Implemented(tr) = &pred { traits_in_scope.push((tr.self_type_parameter().clone(), tr.hir_trait_id())); } -- cgit v1.2.3