Some tracing helpers
This commit is contained in:
parent
0c6918fe21
commit
12457f814c
1 changed files with 3 additions and 0 deletions
|
@ -202,6 +202,7 @@ fn find_capture_matching_projections<'a, 'tcx>(
|
||||||
/// `PlaceBuilder` now starts from `PlaceBase::Local`.
|
/// `PlaceBuilder` now starts from `PlaceBase::Local`.
|
||||||
///
|
///
|
||||||
/// Returns a Result with the error being the PlaceBuilder (`from_builder`) that was not found.
|
/// Returns a Result with the error being the PlaceBuilder (`from_builder`) that was not found.
|
||||||
|
#[instrument(level = "trace", skip(cx))]
|
||||||
fn to_upvars_resolved_place_builder<'tcx>(
|
fn to_upvars_resolved_place_builder<'tcx>(
|
||||||
from_builder: PlaceBuilder<'tcx>,
|
from_builder: PlaceBuilder<'tcx>,
|
||||||
cx: &Builder<'_, 'tcx>,
|
cx: &Builder<'_, 'tcx>,
|
||||||
|
@ -270,12 +271,14 @@ fn to_upvars_resolved_place_builder<'tcx>(
|
||||||
|
|
||||||
// We used some of the projections to build the capture itself,
|
// We used some of the projections to build the capture itself,
|
||||||
// now we apply the remaining to the upvar resolved place.
|
// now we apply the remaining to the upvar resolved place.
|
||||||
|
trace!(?capture.place, ?from_builder.projection);
|
||||||
let remaining_projections = strip_prefix(
|
let remaining_projections = strip_prefix(
|
||||||
capture.place.base_ty,
|
capture.place.base_ty,
|
||||||
from_builder.projection,
|
from_builder.projection,
|
||||||
&capture.place.projections,
|
&capture.place.projections,
|
||||||
);
|
);
|
||||||
upvar_resolved_place_builder.projection.extend(remaining_projections);
|
upvar_resolved_place_builder.projection.extend(remaining_projections);
|
||||||
|
trace!(?upvar_resolved_place_builder);
|
||||||
|
|
||||||
Ok(upvar_resolved_place_builder)
|
Ok(upvar_resolved_place_builder)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue