diff options
| author | Michael Goulet <michael@errs.io> | 2025-02-20 18:58:46 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-02-22 22:24:52 +0000 |
| commit | 12e3911d81034864314503b9c2d9fba2773c7904 (patch) | |
| tree | 3c137d293516116a798effc67b2077dbb2025941 /compiler/rustc_mir_dataflow | |
| parent | 46420c96070b4c4bd8242f16d5806b8f26a57016 (diff) | |
| download | rust-12e3911d81034864314503b9c2d9fba2773c7904.tar.gz rust-12e3911d81034864314503b9c2d9fba2773c7904.zip | |
Greatly simplify lifetime captures in edition 2024
Diffstat (limited to 'compiler/rustc_mir_dataflow')
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/move_paths/mod.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/un_derefer.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/value_analysis.rs | 6 |
3 files changed, 3 insertions, 7 deletions
diff --git a/compiler/rustc_mir_dataflow/src/move_paths/mod.rs b/compiler/rustc_mir_dataflow/src/move_paths/mod.rs index 8aea8d2ae3c..18985ba0da2 100644 --- a/compiler/rustc_mir_dataflow/src/move_paths/mod.rs +++ b/compiler/rustc_mir_dataflow/src/move_paths/mod.rs @@ -343,7 +343,7 @@ impl<'tcx> MovePathLookup<'tcx> { /// `MovePathIndex`es. pub fn iter_locals_enumerated( &self, - ) -> impl DoubleEndedIterator<Item = (Local, MovePathIndex)> + '_ { + ) -> impl DoubleEndedIterator<Item = (Local, MovePathIndex)> { self.locals.iter_enumerated().filter_map(|(l, &idx)| Some((l, idx?))) } } diff --git a/compiler/rustc_mir_dataflow/src/un_derefer.rs b/compiler/rustc_mir_dataflow/src/un_derefer.rs index bb15b8106a1..b38dd9d40f5 100644 --- a/compiler/rustc_mir_dataflow/src/un_derefer.rs +++ b/compiler/rustc_mir_dataflow/src/un_derefer.rs @@ -28,7 +28,7 @@ impl<'tcx> UnDerefer<'tcx> { pub(crate) fn iter_projections( &self, place: PlaceRef<'tcx>, - ) -> impl Iterator<Item = (PlaceRef<'tcx>, PlaceElem<'tcx>)> + '_ { + ) -> impl Iterator<Item = (PlaceRef<'tcx>, PlaceElem<'tcx>)> { ProjectionIter::new(self.deref_chain(place.local), place) } } diff --git a/compiler/rustc_mir_dataflow/src/value_analysis.rs b/compiler/rustc_mir_dataflow/src/value_analysis.rs index 9cba07e15a4..36fb1c2b36d 100644 --- a/compiler/rustc_mir_dataflow/src/value_analysis.rs +++ b/compiler/rustc_mir_dataflow/src/value_analysis.rs @@ -2,7 +2,6 @@ use std::fmt::{Debug, Formatter}; use std::ops::Range; use rustc_abi::{FieldIdx, VariantIdx}; -use rustc_data_structures::captures::Captures; use rustc_data_structures::fx::{FxHashMap, FxIndexSet, StdEntry}; use rustc_data_structures::stack::ensure_sufficient_stack; use rustc_index::IndexVec; @@ -676,10 +675,7 @@ impl<'tcx> Map<'tcx> { } /// Iterate over all direct children. - fn children( - &self, - parent: PlaceIndex, - ) -> impl Iterator<Item = PlaceIndex> + Captures<'_> + Captures<'tcx> { + fn children(&self, parent: PlaceIndex) -> impl Iterator<Item = PlaceIndex> { Children::new(self, parent) } |
