subtype_predicate: remove unnecessary probe
This commit is contained in:
parent
e999d8b6e1
commit
df5b604945
1 changed files with 3 additions and 12 deletions
|
@ -713,10 +713,6 @@ impl<'tcx> InferCtxtBuilder<'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'tcx, T> InferOk<'tcx, T> {
|
impl<'tcx, T> InferOk<'tcx, T> {
|
||||||
pub fn unit(self) -> InferOk<'tcx, ()> {
|
|
||||||
InferOk { value: (), obligations: self.obligations }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Extracts `value`, registering any obligations into `fulfill_cx`.
|
/// Extracts `value`, registering any obligations into `fulfill_cx`.
|
||||||
pub fn into_value_registering_obligations(
|
pub fn into_value_registering_obligations(
|
||||||
self,
|
self,
|
||||||
|
@ -1025,15 +1021,10 @@ impl<'tcx> InferCtxt<'tcx> {
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(self.commit_if_ok(|_snapshot| {
|
let ty::SubtypePredicate { a_is_expected, a, b } =
|
||||||
let ty::SubtypePredicate { a_is_expected, a, b } =
|
self.instantiate_binder_with_placeholders(predicate);
|
||||||
self.instantiate_binder_with_placeholders(predicate);
|
|
||||||
|
|
||||||
let ok =
|
Ok(self.at(cause, param_env).sub_exp(DefineOpaqueTypes::No, a_is_expected, a, b))
|
||||||
self.at(cause, param_env).sub_exp(DefineOpaqueTypes::No, a_is_expected, a, b)?;
|
|
||||||
|
|
||||||
Ok(ok.unit())
|
|
||||||
}))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn region_outlives_predicate(
|
pub fn region_outlives_predicate(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue