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:
commit
7f14d2eba4
84 changed files with 223 additions and 294 deletions
|
@ -93,7 +93,7 @@ impl DefPathTable {
|
|||
|
||||
pub fn enumerated_keys_and_path_hashes(
|
||||
&self,
|
||||
) -> impl Iterator<Item = (DefIndex, &DefKey, DefPathHash)> + ExactSizeIterator + '_ {
|
||||
) -> impl Iterator<Item = (DefIndex, &DefKey, DefPathHash)> + ExactSizeIterator {
|
||||
self.index_to_key
|
||||
.iter_enumerated()
|
||||
.map(move |(index, key)| (index, key, self.def_path_hash(index)))
|
||||
|
|
|
@ -60,7 +60,7 @@ impl LanguageItems {
|
|||
self.reverse_items.get(&def_id).copied()
|
||||
}
|
||||
|
||||
pub fn iter(&self) -> impl Iterator<Item = (LangItem, DefId)> + '_ {
|
||||
pub fn iter(&self) -> impl Iterator<Item = (LangItem, DefId)> {
|
||||
self.items
|
||||
.iter()
|
||||
.enumerate()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue