-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Greatly simplify lifetime captures in edition 2024 #137334
Conversation
☔ The latest upstream changes (presumably #137397) made this pull request unmergeable. Please resolve the merge conflicts. |
f55a571
to
e94d539
Compare
Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri, @rust-lang/wg-const-eval Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred in need_type_info.rs cc @lcnr Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor Some changes occurred in compiler/rustc_attr_parsing Some changes occurred in exhaustiveness checking cc @Nadrieril This PR changes Stable MIR cc @oli-obk, @celinval, @ouz-a Some changes occurred to the CTFE machinery cc @rust-lang/wg-const-eval Some changes occurred in coverage instrumentation. cc @Zalathar |
r? compiler |
r? saethlin How many uses of Captures are left? |
The only change I did to rust-analyzer here was to remove the redundant RPITIT lifetimes. |
e94d539
to
12e3911
Compare
src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs
Show resolved
Hide resolved
@bors r=saethlin,traviscross |
Rollup of 9 pull requests Successful merges: - rust-lang#135354 ([Debuginfo] Add MSVC Synthetic and Summary providers to LLDB) - rust-lang#136826 (Replace mem::zeroed with mem::MaybeUninit::uninit for large struct in Unix) - rust-lang#137194 (More const {} init in thread_local) - rust-lang#137334 (Greatly simplify lifetime captures in edition 2024) - rust-lang#137382 (bootstrap: add doc for vendor build step) - rust-lang#137423 (Improve a bit HIR pretty printer) - rust-lang#137435 (Fix "missing match arm body" suggestion involving `!`) - rust-lang#137448 (Fix bugs due to unhandled `ControlFlow` in compiler) - rust-lang#137458 (Fix missing self subst when rendering `impl Fn*<T>` with no output type) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#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.
We'll migrate in ~4 weeks fwiw (we try not to immediately bump our MSRV to latest when a new stable releases) |
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.