Greatly simplify lifetime captures in edition 2024
This commit is contained in:
parent
46420c9607
commit
12e3911d81
84 changed files with 223 additions and 294 deletions
|
@ -216,11 +216,11 @@ fn to_upvars_resolved_place_builder<'tcx>(
|
|||
/// Supports only HIR projection kinds that represent a path that might be
|
||||
/// captured by a closure or a coroutine, i.e., an `Index` or a `Subslice`
|
||||
/// projection kinds are unsupported.
|
||||
fn strip_prefix<'a, 'tcx>(
|
||||
fn strip_prefix<'tcx>(
|
||||
mut base_ty: Ty<'tcx>,
|
||||
projections: &'a [PlaceElem<'tcx>],
|
||||
projections: &[PlaceElem<'tcx>],
|
||||
prefix_projections: &[HirProjection<'tcx>],
|
||||
) -> impl Iterator<Item = PlaceElem<'tcx>> + 'a {
|
||||
) -> impl Iterator<Item = PlaceElem<'tcx>> {
|
||||
let mut iter = projections
|
||||
.iter()
|
||||
.copied()
|
||||
|
|
|
@ -159,12 +159,12 @@ impl<'tcx> ThirBuildCx<'tcx> {
|
|||
})
|
||||
}
|
||||
|
||||
fn explicit_params<'a>(
|
||||
&'a mut self,
|
||||
fn explicit_params(
|
||||
&mut self,
|
||||
owner_id: HirId,
|
||||
fn_decl: &'tcx hir::FnDecl<'tcx>,
|
||||
body: &'tcx hir::Body<'tcx>,
|
||||
) -> impl Iterator<Item = Param<'tcx>> + 'a {
|
||||
) -> impl Iterator<Item = Param<'tcx>> {
|
||||
let fn_sig = self.typeck_results.liberated_fn_sigs()[owner_id];
|
||||
|
||||
body.params.iter().enumerate().map(move |(index, param)| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue