Closed
Description
With more than 50% of the sign-offs needed in #44524 (comment) to remove the feature entirely (EDIT: And now in FCP), I think it's now fine to start updating the compiler code to stop using the nightly feature.
Here are the crates currently using it:
- compiler\rustc_borrowck\src\lib.rs Remove
in_band_lifetimes
fromrustc_borrowck
#91879 - compiler\rustc_codegen_llvm\src\lib.rs Remove
in_band_lifetimes
fromrustc_codegen_llvm
#91931 - compiler\rustc_codegen_ssa\src\lib.rs Remove
in_band_lifetimes
fromrustc_codegen_ssa
#91885 - compiler\rustc_const_eval\src\lib.rs Remove
in_band_lifetimes
fromrustc_const_eval
#91887 - compiler\rustc_data_structures\src\lib.rs Stop enabling
in_band_lifetimes
in rustc_data_structures #91580 - compiler\rustc_hir\src\lib.rs Remove
in_band_lifetimes
fromrustc_hir
#91893 - compiler\rustc_incremental\src\lib.rs Remove
in_band_lifetimes
fromrustc_incremental
#91894 - compiler\rustc_infer\src\lib.rs Remove
in_band_lifetimes
fromrustc_infer
#91878 - compiler\rustc_metadata\src\lib.rs Remove
in_band_lifetimes
fromrustc_metadata
#91926 - compiler\rustc_middle\src\lib.rs Remove
in_band_lifetimes
fromrustc_middle
#91984 - compiler\rustc_mir_dataflow\src\lib.rs Remove
in_band_lifetimes
fromrustc_mir_dataflow
#91922 - compiler\rustc_mir_transform\src\lib.rs Remove
in_band_lifetimes
fromrustc_mir_transform
#91638 - compiler\rustc_monomorphize\src\lib.rs Remove
in_band_lifetimes
forrustc_monomorphize
#91895 - compiler\rustc_passes\src\lib.rs Remove
in_band_lifetimes
forrustc_passes
#91896 - compiler\rustc_privacy\src\lib.rs Remove
in_band_lifetimes
fromrustc_privacy
#91925 - compiler\rustc_query_impl\src\lib.rs Remove
in_band_lifetimes
fromrustc_query_impl
#91923 - compiler\rustc_symbol_mangling\src\lib.rs Remove
in_band_lifetimes
fromrustc_symbol_mangling
#91901 - compiler\rustc_trait_selection\src\lib.rs Remove
in_band_lifetimes
fromrustc_trait_selection
#91904 - compiler\rustc_traits\src\lib.rs Removed
in_band_lifetimes
fromrustc_traits
#91929 - compiler\rustc_typeck\src\lib.rs Remove
in_band_lifetimes
fromrustc_typeck
#91882 - library\proc_macro\src\lib.rs Removed
in_band_lifetimes
fromlibrary\proc_macro
#91906
I've marked this E-easy
as it's very mechanical work. If you're interested in helping out:
- Get your dev environment set up so that you can successfully build the compiler, see https://rustc-dev-guide.rust-lang.org/
- Post the crate you'll tackle, to avoid duplicate work. (I suggest picking ~randomly, not going in order.)
- Delete the
#![feature(in_band_lifetimes)]
line from thelib.rs
file - Look at the compiler errors, and either
- See that the undeclared lifetime is single-use, and thus replace it with
'_
, or - If it's used multiple times, declare it at the appropriate scope.
- See that the undeclared lifetime is single-use, and thus replace it with
- Once it compiles again, review the git diff to ensure it has only lifetime annotation changes.
- EDIT: Remember to run
x.py fmt
andx.py test tidy
! - Send a PR cc'ing this issue, and edit your previous post to include the PR number.
If you'd like to see how these PRs end up looking, here's two that I made earlier:
- Stop enabling
in_band_lifetimes
in rustc_data_structures #91580 - Remove
in_band_lifetimes
fromrustc_mir_transform
#91638
(They're also listed in the checklist above.)