1
Fork 0

Rollup merge of #137334 - compiler-errors:edition-2024-fresh-2, r=saethlin,traviscross

Greatly simplify lifetime captures in edition 2024

Remove most of the `+ Captures` and `+ '_` from the compiler, since they are now unnecessary with the new edition 2021 lifetime capture rules. Use some `+ 'tcx` and `+ 'static` rather than being overly verbose with precise capturing syntax.
This commit is contained in:
Jacob Pratt 2025-02-23 02:44:18 -05:00 committed by GitHub
commit 7f14d2eba4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
84 changed files with 223 additions and 294 deletions

View file

@ -323,7 +323,7 @@ impl<'tcx> MonoItems<'tcx> {
self.items.entry(item.node).or_insert(item.span);
}
fn items(&self) -> impl Iterator<Item = MonoItem<'tcx>> + '_ {
fn items(&self) -> impl Iterator<Item = MonoItem<'tcx>> {
self.items.keys().cloned()
}
}