diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-20 10:23:55 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-20 10:23:55 +0000 |
commit | 5ac0290f533eed295c6e92564d7530d41cf45d6e (patch) | |
tree | ebdcea14c479ddfca358bbeabdde1da8f45b2423 /crates/hir_ty/src/lower.rs | |
parent | 3901c3b566a6834c64e029bd6f4fdaaf8b26f809 (diff) | |
parent | 8e7e405f6ab0c1ee10bfdd3d55a97628fe4cd6dd (diff) |
Merge #8116
8116: Remove WhereClause::Error r=flodiebold a=flodiebold
Chalk doesn't have it, and judging from the removed code, it wasn't useful anyway.
Co-authored-by: Florian Diebold <[email protected]>
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 | } |