apply suggestions from oli-obk

Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
This commit is contained in:
Niko Matsakis 2022-06-23 16:40:06 -04:00 committed by GitHub
parent c9bf88ccf9
commit e6b630c5b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View file

@ -1364,7 +1364,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
let result = self.scc_values.contains_points(sup_region_scc, sub_region_scc);
debug!(
"eval_outlives: returning {} because of comparison between points in sup/sub",
"returning {} because of comparison between points in sup/sub",
result
);
result

View file

@ -318,7 +318,7 @@ where
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(
&mut self,
origin: infer::SubregionOrigin<'tcx>,
@ -361,7 +361,7 @@ where
// }` in the trait definition.
approx_env_bounds.retain(|bound_outlives| {
// 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.
// 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.

View file

@ -34,7 +34,7 @@ use crate::infer::region_constraints::VerifyIfEq;
/// 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
/// machinery.
#[tracing::instrument(level = "Debug", skip(tcx, param_env))]
#[tracing::instrument(level = "debug", skip(tcx, param_env))]
pub fn extract_verify_if_eq<'tcx>(
tcx: TyCtxt<'tcx>,
param_env: ty::ParamEnv<'tcx>,
@ -63,7 +63,7 @@ pub fn extract_verify_if_eq<'tcx>(
}
/// 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>(
tcx: TyCtxt<'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
/// is already bound to a different value.
#[tracing::instrument(level = "Debug", skip(self))]
#[tracing::instrument(level = "debug", skip(self))]
fn bind(
&mut self,
br: ty::BoundRegion,
@ -167,7 +167,7 @@ impl<'tcx> TypeRelation<'tcx> for Match<'tcx> {
#[instrument(skip(self), level = "debug")]
fn tys(&mut self, pattern: Ty<'tcx>, value: Ty<'tcx>) -> RelateResult<'tcx, Ty<'tcx>> {
if pattern == value {
return Ok(pattern);
Ok(pattern)
} else {
relate::super_relate_tys(self, pattern, value)
}
@ -181,7 +181,7 @@ impl<'tcx> TypeRelation<'tcx> for Match<'tcx> {
) -> RelateResult<'tcx, ty::Const<'tcx>> {
debug!("{}.consts({:?}, {:?})", self.tag(), pattern, value);
if pattern == value {
return Ok(pattern);
Ok(pattern)
} else {
relate::super_relate_consts(self, pattern, value)
}