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
#91879compiler\rustc_codegen_llvm\src\lib.rs Removein_band_lifetimes
fromrustc_codegen_llvm
#91931compiler\rustc_codegen_ssa\src\lib.rs Removein_band_lifetimes
fromrustc_codegen_ssa
#91885compiler\rustc_const_eval\src\lib.rs Removein_band_lifetimes
fromrustc_const_eval
#91887compiler\rustc_data_structures\src\lib.rs Stop enablingin_band_lifetimes
in rustc_data_structures #91580compiler\rustc_hir\src\lib.rs Removein_band_lifetimes
fromrustc_hir
#91893compiler\rustc_incremental\src\lib.rs Removein_band_lifetimes
fromrustc_incremental
#91894compiler\rustc_infer\src\lib.rs Removein_band_lifetimes
fromrustc_infer
#91878compiler\rustc_metadata\src\lib.rs Removein_band_lifetimes
fromrustc_metadata
#91926compiler\rustc_middle\src\lib.rs Removein_band_lifetimes
fromrustc_middle
#91984compiler\rustc_mir_dataflow\src\lib.rs Removein_band_lifetimes
fromrustc_mir_dataflow
#91922compiler\rustc_mir_transform\src\lib.rs Removein_band_lifetimes
fromrustc_mir_transform
#91638compiler\rustc_monomorphize\src\lib.rs Removein_band_lifetimes
forrustc_monomorphize
#91895compiler\rustc_passes\src\lib.rs Removein_band_lifetimes
forrustc_passes
#91896compiler\rustc_privacy\src\lib.rs Removein_band_lifetimes
fromrustc_privacy
#91925compiler\rustc_query_impl\src\lib.rs Removein_band_lifetimes
fromrustc_query_impl
#91923compiler\rustc_symbol_mangling\src\lib.rs Removein_band_lifetimes
fromrustc_symbol_mangling
#91901compiler\rustc_trait_selection\src\lib.rs Removein_band_lifetimes
fromrustc_trait_selection
#91904compiler\rustc_traits\src\lib.rs Removedin_band_lifetimes
fromrustc_traits
#91929compiler\rustc_typeck\src\lib.rs Removein_band_lifetimes
fromrustc_typeck
#91882library\proc_macro\src\lib.rs Removedin_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.)
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
LegionMammal978 commentedon Dec 13, 2021
I've worked on
rustc_infer
(#91878),rustc_codegen_ssa
(#91885),rustc_const_eval
(#91887),rustc_mir_dataflow
(#91922),rustc_query_impl
(#91923),rustc_privacy
(#91925), andrustc_codegen_llvm
(#91931).in_band_lifetimes
fromrustc_infer
#91878bugadani commentedon Dec 13, 2021
I can give
rustc_borrowck
a try (#91879)in_band_lifetimes
fromrustc_borrowck
#91879Patrick-Poitras commentedon Dec 14, 2021
I'll try with
rustc_typeck
. 243 errors fixed! (#91882)in_band_lifetimes
fromrustc_typeck
#91882in_band_lifetimes
fromrustc_codegen_ssa
#91885in_band_lifetimes
fromrustc_const_eval
#91887Remove `in_band_lifetimes` from `rustc_const_eval`
83 remaining items
Rollup merge of rust-lang#91894 - pitaj:91867-incremental, r=Aaron1011
Rollup merge of rust-lang#91894 - pitaj:91867-incremental, r=Aaron1011
Rollup merge of rust-lang#91984 - Aaron1011:rustc-middle-lifetime, r=…
Rollup merge of rust-lang#91878 - LegionMammal978:less-inband-infer, …
Rollup merge of rust-lang#91895 - pitaj:91867-monomorphize, r=Aaron1011
in_band_lifetimes
from rustdoc #92368in_band_lifetimes
rust-lang/rust-clippy#8190Auto merge of rust-lang#91929 - anuvratsingh:remove_in_band_lifetimes…
Auto merge of #8190 - camsteffen:no-in-band-liftetimes, r=flip1995
scottmcm commentedon Jan 26, 2022
Looks like these have all landed, so I'll close this.
Thanks for the help, everyone!
rust: update to version 1.59.0.
rust: update to version 1.59.0.