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/traits/chalk | |
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/traits/chalk')
-rw-r--r-- | crates/hir_ty/src/traits/chalk/mapping.rs | 7 |
1 files changed, 1 insertions, 6 deletions
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 { | |||
98 | TyKind::Dyn(predicates) => { | 98 | TyKind::Dyn(predicates) => { |
99 | let where_clauses = chalk_ir::QuantifiedWhereClauses::from_iter( | 99 | let where_clauses = chalk_ir::QuantifiedWhereClauses::from_iter( |
100 | &Interner, | 100 | &Interner, |
101 | predicates.iter().filter(|p| !p.is_error()).cloned().map(|p| p.to_chalk(db)), | 101 | predicates.iter().cloned().map(|p| p.to_chalk(db)), |
102 | ); | 102 | ); |
103 | let bounded_ty = chalk_ir::DynTy { | 103 | let bounded_ty = chalk_ir::DynTy { |
104 | bounds: make_binders(where_clauses, 1), | 104 | bounds: make_binders(where_clauses, 1), |
@@ -318,7 +318,6 @@ impl ToChalk for WhereClause { | |||
318 | chalk_ir::WhereClause::AliasEq(alias_eq.to_chalk(db).shifted_in(&Interner)), | 318 | chalk_ir::WhereClause::AliasEq(alias_eq.to_chalk(db).shifted_in(&Interner)), |
319 | 0, | 319 | 0, |
320 | ), | 320 | ), |
321 | WhereClause::Error => panic!("tried passing GenericPredicate::Error to Chalk"), | ||
322 | } | 321 | } |
323 | } | 322 | } |
324 | 323 | ||
@@ -521,10 +520,6 @@ pub(super) fn convert_where_clauses( | |||
521 | let generic_predicates = db.generic_predicates(def); | 520 | let generic_predicates = db.generic_predicates(def); |
522 | let mut result = Vec::with_capacity(generic_predicates.len()); | 521 | let mut result = Vec::with_capacity(generic_predicates.len()); |
523 | for pred in generic_predicates.iter() { | 522 | for pred in generic_predicates.iter() { |
524 | if pred.value.is_error() { | ||
525 | // skip errored predicates completely | ||
526 | continue; | ||
527 | } | ||
528 | result.push(pred.clone().subst(substs).to_chalk(db)); | 523 | result.push(pred.clone().subst(substs).to_chalk(db)); |
529 | } | 524 | } |
530 | result | 525 | result |