apply suggestions from oli-obk
Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
This commit is contained in:
parent
c9bf88ccf9
commit
e6b630c5b1
|
@ -1364,7 +1364,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
|
||||||
|
|
||||||
let result = self.scc_values.contains_points(sup_region_scc, sub_region_scc);
|
let result = self.scc_values.contains_points(sup_region_scc, sub_region_scc);
|
||||||
debug!(
|
debug!(
|
||||||
"eval_outlives: returning {} because of comparison between points in sup/sub",
|
"returning {} because of comparison between points in sup/sub",
|
||||||
result
|
result
|
||||||
);
|
);
|
||||||
result
|
result
|
||||||
|
|
|
@ -318,7 +318,7 @@ where
|
||||||
self.delegate.push_verify(origin, generic, region, verify_bound);
|
self.delegate.push_verify(origin, generic, region, verify_bound);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "Debug", skip(self))]
|
#[tracing::instrument(level = "debug", skip(self))]
|
||||||
fn projection_must_outlive(
|
fn projection_must_outlive(
|
||||||
&mut self,
|
&mut self,
|
||||||
origin: infer::SubregionOrigin<'tcx>,
|
origin: infer::SubregionOrigin<'tcx>,
|
||||||
|
@ -361,7 +361,7 @@ where
|
||||||
// }` in the trait definition.
|
// }` in the trait definition.
|
||||||
approx_env_bounds.retain(|bound_outlives| {
|
approx_env_bounds.retain(|bound_outlives| {
|
||||||
// OK to skip binder because we only manipulate and compare against other
|
// OK to skip binder because we only manipulate and compare against other
|
||||||
// values from the same inder. e.g. if we have (e.g.) `for<'a> <T as Trait<'a>>::Item: 'a`
|
// values from the same binder. e.g. if we have (e.g.) `for<'a> <T as Trait<'a>>::Item: 'a`
|
||||||
// in `bound`, the `'a` will be a `^1` (bound, debruijn index == innermost) region.
|
// in `bound`, the `'a` will be a `^1` (bound, debruijn index == innermost) region.
|
||||||
// If the declaration is `trait Trait<'b> { type Item: 'b; }`, then `projection_declared_bounds_from_trait`
|
// If the declaration is `trait Trait<'b> { type Item: 'b; }`, then `projection_declared_bounds_from_trait`
|
||||||
// will be invoked with `['b => ^1]` and so we will get `^1` returned.
|
// will be invoked with `['b => ^1]` and so we will get `^1` returned.
|
||||||
|
|
|
@ -34,7 +34,7 @@ use crate::infer::region_constraints::VerifyIfEq;
|
||||||
/// like are used. This is a particular challenge since this function is invoked
|
/// like are used. This is a particular challenge since this function is invoked
|
||||||
/// very late in inference and hence cannot make use of the normal inference
|
/// very late in inference and hence cannot make use of the normal inference
|
||||||
/// machinery.
|
/// machinery.
|
||||||
#[tracing::instrument(level = "Debug", skip(tcx, param_env))]
|
#[tracing::instrument(level = "debug", skip(tcx, param_env))]
|
||||||
pub fn extract_verify_if_eq<'tcx>(
|
pub fn extract_verify_if_eq<'tcx>(
|
||||||
tcx: TyCtxt<'tcx>,
|
tcx: TyCtxt<'tcx>,
|
||||||
param_env: ty::ParamEnv<'tcx>,
|
param_env: ty::ParamEnv<'tcx>,
|
||||||
|
@ -63,7 +63,7 @@ pub fn extract_verify_if_eq<'tcx>(
|
||||||
}
|
}
|
||||||
|
|
||||||
/// True if a (potentially higher-ranked) outlives
|
/// True if a (potentially higher-ranked) outlives
|
||||||
#[tracing::instrument(level = "Debug", skip(tcx, param_env))]
|
#[tracing::instrument(level = "debug", skip(tcx, param_env))]
|
||||||
pub(super) fn can_match_erased_ty<'tcx>(
|
pub(super) fn can_match_erased_ty<'tcx>(
|
||||||
tcx: TyCtxt<'tcx>,
|
tcx: TyCtxt<'tcx>,
|
||||||
param_env: ty::ParamEnv<'tcx>,
|
param_env: ty::ParamEnv<'tcx>,
|
||||||
|
@ -102,7 +102,7 @@ impl<'tcx> Match<'tcx> {
|
||||||
|
|
||||||
/// Binds the pattern variable `br` to `value`; returns an `Err` if the pattern
|
/// Binds the pattern variable `br` to `value`; returns an `Err` if the pattern
|
||||||
/// is already bound to a different value.
|
/// is already bound to a different value.
|
||||||
#[tracing::instrument(level = "Debug", skip(self))]
|
#[tracing::instrument(level = "debug", skip(self))]
|
||||||
fn bind(
|
fn bind(
|
||||||
&mut self,
|
&mut self,
|
||||||
br: ty::BoundRegion,
|
br: ty::BoundRegion,
|
||||||
|
@ -167,7 +167,7 @@ impl<'tcx> TypeRelation<'tcx> for Match<'tcx> {
|
||||||
#[instrument(skip(self), level = "debug")]
|
#[instrument(skip(self), level = "debug")]
|
||||||
fn tys(&mut self, pattern: Ty<'tcx>, value: Ty<'tcx>) -> RelateResult<'tcx, Ty<'tcx>> {
|
fn tys(&mut self, pattern: Ty<'tcx>, value: Ty<'tcx>) -> RelateResult<'tcx, Ty<'tcx>> {
|
||||||
if pattern == value {
|
if pattern == value {
|
||||||
return Ok(pattern);
|
Ok(pattern)
|
||||||
} else {
|
} else {
|
||||||
relate::super_relate_tys(self, pattern, value)
|
relate::super_relate_tys(self, pattern, value)
|
||||||
}
|
}
|
||||||
|
@ -181,7 +181,7 @@ impl<'tcx> TypeRelation<'tcx> for Match<'tcx> {
|
||||||
) -> RelateResult<'tcx, ty::Const<'tcx>> {
|
) -> RelateResult<'tcx, ty::Const<'tcx>> {
|
||||||
debug!("{}.consts({:?}, {:?})", self.tag(), pattern, value);
|
debug!("{}.consts({:?}, {:?})", self.tag(), pattern, value);
|
||||||
if pattern == value {
|
if pattern == value {
|
||||||
return Ok(pattern);
|
Ok(pattern)
|
||||||
} else {
|
} else {
|
||||||
relate::super_relate_consts(self, pattern, value)
|
relate::super_relate_consts(self, pattern, value)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue