diff options
Diffstat (limited to 'crates/hir_ty/src/lower.rs')
-rw-r--r-- | crates/hir_ty/src/lower.rs | 7 |
1 files changed, 2 insertions, 5 deletions
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> { | |||
703 | let trait_ref = match bound { | 703 | let trait_ref = match bound { |
704 | TypeBound::Path(path) => { | 704 | TypeBound::Path(path) => { |
705 | bindings = self.lower_trait_ref_from_path(path, Some(self_ty)); | 705 | bindings = self.lower_trait_ref_from_path(path, Some(self_ty)); |
706 | Some(bindings.clone().map_or(WhereClause::Error, WhereClause::Implemented)) | 706 | bindings.clone().map(WhereClause::Implemented) |
707 | } | 707 | } |
708 | TypeBound::Lifetime(_) => None, | 708 | TypeBound::Lifetime(_) => None, |
709 | TypeBound::Error => Some(WhereClause::Error), | 709 | TypeBound::Error => None, |
710 | }; | 710 | }; |
711 | trait_ref.into_iter().chain( | 711 | trait_ref.into_iter().chain( |
712 | bindings | 712 | bindings |
@@ -919,9 +919,6 @@ pub(crate) fn trait_environment_query( | |||
919 | let mut clauses = Vec::new(); | 919 | let mut clauses = Vec::new(); |
920 | for pred in resolver.where_predicates_in_scope() { | 920 | for pred in resolver.where_predicates_in_scope() { |
921 | for pred in ctx.lower_where_predicate(pred) { | 921 | for pred in ctx.lower_where_predicate(pred) { |
922 | if pred.is_error() { | ||
923 | continue; | ||
924 | } | ||
925 | if let WhereClause::Implemented(tr) = &pred { | 922 | if let WhereClause::Implemented(tr) = &pred { |
926 | traits_in_scope.push((tr.self_type_parameter().clone(), tr.hir_trait_id())); | 923 | traits_in_scope.push((tr.self_type_parameter().clone(), tr.hir_trait_id())); |
927 | } | 924 | } |