diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-04-19 17:54:42 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-19 17:54:42 +0200 |
| commit | 75de33cd1dbe8ed39ab1e5795673fcbcfb547a80 (patch) | |
| tree | 146a96e8ef95369b9834e8b642da65a671dce6ac /compiler/rustc_trait_selection/src | |
| parent | 9a13f4f0188d5a373815f23455250fd8d9575316 (diff) | |
| parent | 16d061ea77eebe963cac28b0cf13dd3cbb506b13 (diff) | |
| download | rust-75de33cd1dbe8ed39ab1e5795673fcbcfb547a80.tar.gz rust-75de33cd1dbe8ed39ab1e5795673fcbcfb547a80.zip | |
Rollup merge of #110531 - lcnr:type-system-stuff, r=aliemjay
small type system cleanup
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/wf.rs | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/wf.rs b/compiler/rustc_trait_selection/src/traits/wf.rs index 3d026506a5a..6808861d643 100644 --- a/compiler/rustc_trait_selection/src/traits/wf.rs +++ b/compiler/rustc_trait_selection/src/traits/wf.rs @@ -170,29 +170,20 @@ pub fn predicate_obligations<'tcx>( ty::PredicateKind::WellFormed(arg) => { wf.compute(arg); } - ty::PredicateKind::ObjectSafe(_) => {} - ty::PredicateKind::ClosureKind(..) => {} - ty::PredicateKind::Subtype(ty::SubtypePredicate { a, b, a_is_expected: _ }) => { - wf.compute(a.into()); - wf.compute(b.into()); - } - ty::PredicateKind::Coerce(ty::CoercePredicate { a, b }) => { - wf.compute(a.into()); - wf.compute(b.into()); - } + ty::PredicateKind::ConstEvaluatable(ct) => { wf.compute(ct.into()); } - ty::PredicateKind::ConstEquate(c1, c2) => { - wf.compute(c1.into()); - wf.compute(c2.into()); - } - ty::PredicateKind::Ambiguous => {} - ty::PredicateKind::TypeWellFormedFromEnv(..) => { - bug!("TypeWellFormedFromEnv is only used for Chalk") - } - ty::PredicateKind::AliasRelate(..) => { - bug!("We should only wf check where clauses and `AliasRelate` is not a `Clause`") + + ty::PredicateKind::ObjectSafe(_) + | ty::PredicateKind::ClosureKind(..) + | ty::PredicateKind::Subtype(..) + | ty::PredicateKind::Coerce(..) + | ty::PredicateKind::ConstEquate(..) + | ty::PredicateKind::Ambiguous + | ty::PredicateKind::AliasRelate(..) + | ty::PredicateKind::TypeWellFormedFromEnv(..) => { + bug!("We should only wf check where clauses, unexpected predicate: {predicate:?}") } } |
