Skip to content

Commit 6594c75

Browse files
Move ConstEvaluatable to Clause
1 parent 52d3fc9 commit 6594c75

File tree

30 files changed

+54
-55
lines changed

30 files changed

+54
-55
lines changed

compiler/rustc_hir_analysis/src/astconv/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,14 +1529,14 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
15291529
}
15301530
ty::Clause::RegionOutlives(_)
15311531
| ty::Clause::ConstArgHasType(..)
1532-
| ty::Clause::WellFormed(_) => bug!(),
1532+
| ty::Clause::WellFormed(_)
1533+
| ty::Clause::ConstEvaluatable(_) => bug!(),
15331534
},
15341535
ty::PredicateKind::AliasRelate(..)
15351536
| ty::PredicateKind::ObjectSafe(_)
15361537
| ty::PredicateKind::ClosureKind(_, _, _)
15371538
| ty::PredicateKind::Subtype(_)
15381539
| ty::PredicateKind::Coerce(_)
1539-
| ty::PredicateKind::ConstEvaluatable(_)
15401540
| ty::PredicateKind::ConstEquate(_, _)
15411541
| ty::PredicateKind::TypeWellFormedFromEnv(_)
15421542
| ty::PredicateKind::Ambiguous => bug!(),

compiler/rustc_hir_analysis/src/check/wfcheck.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,9 +1032,9 @@ fn check_type_defn<'tcx>(tcx: TyCtxt<'tcx>, item: &hir::Item<'tcx>, all_sized: b
10321032
tcx,
10331033
cause,
10341034
wfcx.param_env,
1035-
ty::Binder::dummy(ty::PredicateKind::ConstEvaluatable(
1035+
ty::Binder::dummy(ty::PredicateKind::Clause(ty::Clause::ConstEvaluatable(
10361036
ty::Const::from_anon_const(tcx, discr_def_id.expect_local()),
1037-
)),
1037+
))),
10381038
));
10391039
}
10401040
}

compiler/rustc_hir_analysis/src/collect/predicates_of.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ fn const_evaluatable_predicates_of(
353353
if let ty::ConstKind::Unevaluated(_) = ct.kind() {
354354
let span = self.tcx.def_span(c.def_id);
355355
self.preds.insert((
356-
ty::Binder::dummy(ty::PredicateKind::ConstEvaluatable(ct))
356+
ty::Binder::dummy(ty::PredicateKind::Clause(ty::Clause::ConstEvaluatable(ct)))
357357
.to_predicate(self.tcx),
358358
span,
359359
));

compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ fn trait_predicate_kind<'tcx>(
547547
| ty::PredicateKind::Coerce(_)
548548
| ty::PredicateKind::ObjectSafe(_)
549549
| ty::PredicateKind::ClosureKind(..)
550-
| ty::PredicateKind::ConstEvaluatable(..)
550+
| ty::PredicateKind::Clause(ty::Clause::ConstEvaluatable(..))
551551
| ty::PredicateKind::ConstEquate(..)
552552
| ty::PredicateKind::Ambiguous
553553
| ty::PredicateKind::TypeWellFormedFromEnv(..) => None,

compiler/rustc_hir_analysis/src/outlives/explicit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ impl<'tcx> ExplicitPredicatesMap<'tcx> {
6161
| ty::PredicateKind::ClosureKind(..)
6262
| ty::PredicateKind::Subtype(..)
6363
| ty::PredicateKind::Coerce(..)
64-
| ty::PredicateKind::ConstEvaluatable(..)
64+
| ty::PredicateKind::Clause(ty::Clause::ConstEvaluatable(..))
6565
| ty::PredicateKind::ConstEquate(..)
6666
| ty::PredicateKind::Ambiguous
6767
| ty::PredicateKind::TypeWellFormedFromEnv(..) => (),

compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
671671
| ty::PredicateKind::Clause(ty::Clause::WellFormed(..))
672672
| ty::PredicateKind::ObjectSafe(..)
673673
| ty::PredicateKind::AliasRelate(..)
674-
| ty::PredicateKind::ConstEvaluatable(..)
674+
| ty::PredicateKind::Clause(ty::Clause::ConstEvaluatable(..))
675675
| ty::PredicateKind::ConstEquate(..)
676676
// N.B., this predicate is created by breaking down a
677677
// `ClosureType: FnFoo()` predicate, where

compiler/rustc_hir_typeck/src/fn_ctxt/adjust_fulfillment_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
3232
ty::PredicateKind::Clause(ty::Clause::ConstArgHasType(arg, ty)) => {
3333
vec![ty.into(), arg.into()]
3434
}
35-
ty::PredicateKind::ConstEvaluatable(e) => vec![e.into()],
35+
ty::PredicateKind::Clause(ty::Clause::ConstEvaluatable(e)) => vec![e.into()],
3636
_ => return false,
3737
};
3838

compiler/rustc_hir_typeck/src/method/probe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
842842
| ty::PredicateKind::ObjectSafe(..)
843843
| ty::PredicateKind::ClosureKind(..)
844844
| ty::PredicateKind::Clause(ty::Clause::TypeOutlives(..))
845-
| ty::PredicateKind::ConstEvaluatable(..)
845+
| ty::PredicateKind::Clause(ty::Clause::ConstEvaluatable(..))
846846
| ty::PredicateKind::ConstEquate(..)
847847
| ty::PredicateKind::Ambiguous
848848
| ty::PredicateKind::AliasRelate(..)

compiler/rustc_infer/src/infer/outlives/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub fn explicit_outlives_bounds<'tcx>(
3333
| ty::PredicateKind::ObjectSafe(..)
3434
| ty::PredicateKind::ClosureKind(..)
3535
| ty::PredicateKind::Clause(ty::Clause::TypeOutlives(..))
36-
| ty::PredicateKind::ConstEvaluatable(..)
36+
| ty::PredicateKind::Clause(ty::Clause::ConstEvaluatable(..))
3737
| ty::PredicateKind::ConstEquate(..)
3838
| ty::PredicateKind::Ambiguous
3939
| ty::PredicateKind::TypeWellFormedFromEnv(..) => None,

compiler/rustc_infer/src/traits/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ impl<'tcx, O: Elaboratable<'tcx>> Elaborator<'tcx, O> {
249249
ty::PredicateKind::ClosureKind(..) => {
250250
// Nothing to elaborate when waiting for a closure's kind to be inferred.
251251
}
252-
ty::PredicateKind::ConstEvaluatable(..) => {
252+
ty::PredicateKind::Clause(ty::Clause::ConstEvaluatable(..)) => {
253253
// Currently, we do not elaborate const-evaluatable
254254
// predicates.
255255
}

0 commit comments

Comments
 (0)