Remove ToPredicate impls that use Binder::dummy
This commit is contained in:
parent
2c7bc5e33c
commit
be76bdf905
27 changed files with 99 additions and 85 deletions
|
@ -89,10 +89,10 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
|
|||
category: ConstraintCategory,
|
||||
) {
|
||||
self.prove_predicates(
|
||||
Some(ty::PredicateKind::Trait(ty::TraitPredicate {
|
||||
Some(ty::Binder::dummy(ty::PredicateKind::Trait(ty::TraitPredicate {
|
||||
trait_ref,
|
||||
constness: ty::BoundConstness::NotConst,
|
||||
})),
|
||||
}))),
|
||||
locations,
|
||||
category,
|
||||
);
|
||||
|
|
|
@ -1078,7 +1078,8 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
|
|||
}
|
||||
|
||||
self.prove_predicate(
|
||||
ty::PredicateKind::WellFormed(inferred_ty.into()).to_predicate(self.tcx()),
|
||||
ty::Binder::dummy(ty::PredicateKind::WellFormed(inferred_ty.into()))
|
||||
.to_predicate(self.tcx()),
|
||||
Locations::All(span),
|
||||
ConstraintCategory::TypeAnnotation,
|
||||
);
|
||||
|
@ -1314,7 +1315,8 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
|
|||
obligations.obligations.push(traits::Obligation::new(
|
||||
ObligationCause::dummy(),
|
||||
param_env,
|
||||
ty::PredicateKind::WellFormed(revealed_ty.into()).to_predicate(infcx.tcx),
|
||||
ty::Binder::dummy(ty::PredicateKind::WellFormed(revealed_ty.into()))
|
||||
.to_predicate(infcx.tcx),
|
||||
));
|
||||
obligations.add(
|
||||
infcx
|
||||
|
@ -1584,7 +1586,9 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
|
|||
self.check_call_dest(body, term, &sig, destination, term_location);
|
||||
|
||||
self.prove_predicates(
|
||||
sig.inputs_and_output.iter().map(|ty| ty::PredicateKind::WellFormed(ty.into())),
|
||||
sig.inputs_and_output
|
||||
.iter()
|
||||
.map(|ty| ty::Binder::dummy(ty::PredicateKind::WellFormed(ty.into()))),
|
||||
term_location.to_locations(),
|
||||
ConstraintCategory::Boring,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue