diff options
| author | Boxy <supbscripter@gmail.com> | 2023-02-17 09:32:33 +0000 |
|---|---|---|
| committer | Boxy <supbscripter@gmail.com> | 2023-02-17 09:32:39 +0000 |
| commit | 90c8d6bbe4725ca83e79e73e9cdf1f66840db79f (patch) | |
| tree | f048c0a43938c553b152b3a36a19c36238d52651 /compiler/rustc_privacy/src | |
| parent | e919d7e348932287cc33ec70cdc6f59ab48de255 (diff) | |
| download | rust-90c8d6bbe4725ca83e79e73e9cdf1f66840db79f.tar.gz rust-90c8d6bbe4725ca83e79e73e9cdf1f66840db79f.zip | |
add predicate evaluation logic
Diffstat (limited to 'compiler/rustc_privacy/src')
| -rw-r--r-- | compiler/rustc_privacy/src/lib.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/compiler/rustc_privacy/src/lib.rs b/compiler/rustc_privacy/src/lib.rs index 64c7fafa713..58dfca75c65 100644 --- a/compiler/rustc_privacy/src/lib.rs +++ b/compiler/rustc_privacy/src/lib.rs @@ -159,9 +159,21 @@ where _region, ))) => ty.visit_with(self), ty::PredicateKind::Clause(ty::Clause::RegionOutlives(..)) => ControlFlow::Continue(()), + ty::PredicateKind::Clause(ty::Clause::ConstArgHasType(ct, ty)) => { + ct.visit_with(self)?; + ty.visit_with(self) + } ty::PredicateKind::ConstEvaluatable(ct) => ct.visit_with(self), ty::PredicateKind::WellFormed(arg) => arg.visit_with(self), - _ => bug!("unexpected predicate: {:?}", predicate), + + ty::PredicateKind::ObjectSafe(_) + | ty::PredicateKind::ClosureKind(_, _, _) + | ty::PredicateKind::Subtype(_) + | ty::PredicateKind::Coerce(_) + | ty::PredicateKind::ConstEquate(_, _) + | ty::PredicateKind::TypeWellFormedFromEnv(_) + | ty::PredicateKind::Ambiguous + | ty::PredicateKind::AliasEq(_, _) => bug!("unexpected predicate: {:?}", predicate), } } |
