about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/hir/mod.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-02-20 18:58:46 +0000
committerMichael Goulet <michael@errs.io>2025-02-22 22:24:52 +0000
commit12e3911d81034864314503b9c2d9fba2773c7904 (patch)
tree3c137d293516116a798effc67b2077dbb2025941 /compiler/rustc_middle/src/hir/mod.rs
parent46420c96070b4c4bd8242f16d5806b8f26a57016 (diff)
downloadrust-12e3911d81034864314503b9c2d9fba2773c7904.tar.gz
rust-12e3911d81034864314503b9c2d9fba2773c7904.zip
Greatly simplify lifetime captures in edition 2024
Diffstat (limited to 'compiler/rustc_middle/src/hir/mod.rs')
-rw-r--r--compiler/rustc_middle/src/hir/mod.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler/rustc_middle/src/hir/mod.rs b/compiler/rustc_middle/src/hir/mod.rs
index 2a201e23015..6071a58367e 100644
--- a/compiler/rustc_middle/src/hir/mod.rs
+++ b/compiler/rustc_middle/src/hir/mod.rs
@@ -40,25 +40,25 @@ impl ModuleItems {
     /// include foreign items. If you want to e.g. get all functions, use `definitions()` below.
     ///
     /// However, this does include the `impl` blocks themselves.
-    pub fn free_items(&self) -> impl Iterator<Item = ItemId> + '_ {
+    pub fn free_items(&self) -> impl Iterator<Item = ItemId> {
         self.free_items.iter().copied()
     }
 
-    pub fn trait_items(&self) -> impl Iterator<Item = TraitItemId> + '_ {
+    pub fn trait_items(&self) -> impl Iterator<Item = TraitItemId> {
         self.trait_items.iter().copied()
     }
 
     /// Returns all items that are associated with some `impl` block (both inherent and trait impl
     /// blocks).
-    pub fn impl_items(&self) -> impl Iterator<Item = ImplItemId> + '_ {
+    pub fn impl_items(&self) -> impl Iterator<Item = ImplItemId> {
         self.impl_items.iter().copied()
     }
 
-    pub fn foreign_items(&self) -> impl Iterator<Item = ForeignItemId> + '_ {
+    pub fn foreign_items(&self) -> impl Iterator<Item = ForeignItemId> {
         self.foreign_items.iter().copied()
     }
 
-    pub fn owners(&self) -> impl Iterator<Item = OwnerId> + '_ {
+    pub fn owners(&self) -> impl Iterator<Item = OwnerId> {
         self.free_items
             .iter()
             .map(|id| id.owner_id)
@@ -67,15 +67,15 @@ impl ModuleItems {
             .chain(self.foreign_items.iter().map(|id| id.owner_id))
     }
 
-    pub fn opaques(&self) -> impl Iterator<Item = LocalDefId> + '_ {
+    pub fn opaques(&self) -> impl Iterator<Item = LocalDefId> {
         self.opaques.iter().copied()
     }
 
-    pub fn nested_bodies(&self) -> impl Iterator<Item = LocalDefId> + '_ {
+    pub fn nested_bodies(&self) -> impl Iterator<Item = LocalDefId> {
         self.nested_bodies.iter().copied()
     }
 
-    pub fn definitions(&self) -> impl Iterator<Item = LocalDefId> + '_ {
+    pub fn definitions(&self) -> impl Iterator<Item = LocalDefId> {
         self.owners().map(|id| id.def_id)
     }