Some tracing cleanups
This commit is contained in:
parent
56d540e057
commit
340e708634
3 changed files with 3 additions and 5 deletions
|
|
@ -334,8 +334,8 @@ impl<'tcx> UniversalRegionRelationsBuilder<'_, 'tcx> {
|
|||
/// either the return type of the MIR or one of its arguments. At
|
||||
/// the same time, compute and add any implied bounds that come
|
||||
/// from this local.
|
||||
#[instrument(level = "debug", skip(self))]
|
||||
fn add_implied_bounds(&mut self, ty: Ty<'tcx>) -> Option<Rc<QueryRegionConstraints<'tcx>>> {
|
||||
debug!("add_implied_bounds(ty={:?})", ty);
|
||||
let TypeOpOutput { output: bounds, constraints, .. } = self
|
||||
.param_env
|
||||
.and(type_op::implied_outlives_bounds::ImpliedOutlivesBounds { ty })
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ pub mod verify;
|
|||
use rustc_middle::traits::query::OutlivesBound;
|
||||
use rustc_middle::ty;
|
||||
|
||||
#[instrument(level = "debug", skip(param_env))]
|
||||
pub fn explicit_outlives_bounds<'tcx>(
|
||||
param_env: ty::ParamEnv<'tcx>,
|
||||
) -> impl Iterator<Item = OutlivesBound<'tcx>> + 'tcx {
|
||||
debug!("explicit_outlives_bounds()");
|
||||
param_env
|
||||
.caller_bounds()
|
||||
.into_iter()
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ impl<'tcx> OutlivesEnvironmentExt<'tcx> for OutlivesEnvironment<'tcx> {
|
|||
/// add those assumptions into the outlives-environment.
|
||||
///
|
||||
/// Tests: `src/test/ui/regions/regions-free-region-ordering-*.rs`
|
||||
#[instrument(level = "debug", skip(self, infcx))]
|
||||
fn add_implied_bounds<'a>(
|
||||
&mut self,
|
||||
infcx: &InferCtxt<'a, 'tcx>,
|
||||
|
|
@ -137,11 +138,8 @@ impl<'tcx> OutlivesEnvironmentExt<'tcx> for OutlivesEnvironment<'tcx> {
|
|||
body_id: hir::HirId,
|
||||
span: Span,
|
||||
) {
|
||||
debug!("add_implied_bounds()");
|
||||
|
||||
for ty in fn_sig_tys {
|
||||
let ty = infcx.resolve_vars_if_possible(ty);
|
||||
debug!("add_implied_bounds: ty = {}", ty);
|
||||
let implied_bounds = infcx.implied_outlives_bounds(self.param_env, body_id, ty, span);
|
||||
self.add_outlives_bounds(Some(infcx), implied_bounds)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue