diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2025-02-23 02:44:18 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-23 02:44:18 -0500 |
| commit | 7f14d2eba48addfbd398c784e43fd7875e313d74 (patch) | |
| tree | 2f50960bce1ff03ec088ef071b118549045566ba /compiler/rustc_parse/src | |
| parent | 2ff53a293e6dde5344a1f02c41dc9043816b8271 (diff) | |
| parent | 12e3911d81034864314503b9c2d9fba2773c7904 (diff) | |
| download | rust-7f14d2eba48addfbd398c784e43fd7875e313d74.tar.gz rust-7f14d2eba48addfbd398c784e43fd7875e313d74.zip | |
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.
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index bbd73dec2e4..80a33a76005 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -1657,7 +1657,7 @@ impl<'a> Parser<'a> { // Debug view of the parser's token stream, up to `{lookahead}` tokens. // Only used when debugging. #[allow(unused)] - pub(crate) fn debug_lookahead(&self, lookahead: usize) -> impl fmt::Debug + '_ { + pub(crate) fn debug_lookahead(&self, lookahead: usize) -> impl fmt::Debug { fmt::from_fn(move |f| { let mut dbg_fmt = f.debug_struct("Parser"); // or at least, one view of |
