Repository navigation
Stop using in_band_lifetimes in compiler crates #91867
Copy link
Copy link
Closed
Labels
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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_lifetimesfromrustc_borrowck#91879 - compiler\rustc_codegen_llvm\src\lib.rs Remove
in_band_lifetimesfromrustc_codegen_llvm#91931 - compiler\rustc_codegen_ssa\src\lib.rs Remove
in_band_lifetimesfromrustc_codegen_ssa#91885 - compiler\rustc_const_eval\src\lib.rs Remove
in_band_lifetimesfromrustc_const_eval#91887 - compiler\rustc_data_structures\src\lib.rs Stop enabling
in_band_lifetimesin rustc_data_structures #91580 - compiler\rustc_hir\src\lib.rs Remove
in_band_lifetimesfromrustc_hir#91893 - compiler\rustc_incremental\src\lib.rs Remove
in_band_lifetimesfromrustc_incremental#91894 - compiler\rustc_infer\src\lib.rs Remove
in_band_lifetimesfromrustc_infer#91878 - compiler\rustc_metadata\src\lib.rs Remove
in_band_lifetimesfromrustc_metadata#91926 - compiler\rustc_middle\src\lib.rs Remove
in_band_lifetimesfromrustc_middle#91984 - compiler\rustc_mir_dataflow\src\lib.rs Remove
in_band_lifetimesfromrustc_mir_dataflow#91922 - compiler\rustc_mir_transform\src\lib.rs Remove
in_band_lifetimesfromrustc_mir_transform#91638 - compiler\rustc_monomorphize\src\lib.rs Remove
in_band_lifetimesforrustc_monomorphize#91895 - compiler\rustc_passes\src\lib.rs Remove
in_band_lifetimesforrustc_passes#91896 - compiler\rustc_privacy\src\lib.rs Remove
in_band_lifetimesfromrustc_privacy#91925 - compiler\rustc_query_impl\src\lib.rs Remove
in_band_lifetimesfromrustc_query_impl#91923 - compiler\rustc_symbol_mangling\src\lib.rs Remove
in_band_lifetimesfromrustc_symbol_mangling#91901 - compiler\rustc_trait_selection\src\lib.rs Remove
in_band_lifetimesfromrustc_trait_selection#91904 - compiler\rustc_traits\src\lib.rs Removed
in_band_lifetimesfromrustc_traits#91929 - compiler\rustc_typeck\src\lib.rs Remove
in_band_lifetimesfromrustc_typeck#91882 - library\proc_macro\src\lib.rs Removed
in_band_lifetimesfromlibrary\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.rsfile - 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 fmtandx.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_lifetimesin rustc_data_structures #91580 - Remove
in_band_lifetimesfromrustc_mir_transform#91638
(They're also listed in the checklist above.)
Metadata
Metadata
Assignees
Labels
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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).bugadani commentedon Dec 13, 2021
I can give
rustc_borrowcka try (#91879)Patrick-Poitras commentedon Dec 14, 2021
I'll try with
rustc_typeck. 243 errors fixed! (#91882)pitaj commentedon Dec 14, 2021
I'll take
rustc_hir(#91893) andrustc_incremental(#91894).I'll also take
rustc_monomorphize(#91895) andrustc_passes(#91896).Rollup merge of rust-lang#91879 - bugadani:in_band_borrowck, r=wesley…
SylvanB commentedon Dec 14, 2021
I'll take
rustc_symbol_mangling(#91901).Also taking
rustc_trait_selection(#91904).Also taking
rustc_metadata(#91926)Rollup merge of rust-lang#91887 - LegionMammal978:less-inband-const_e…
Rollup merge of rust-lang#91893 - pitaj:91867-hir, r=davidtwco
62 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
Auto 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.
Auto merge of #91929 - anuvratsingh:remove_in_band_lifetimes_compiler…
rust: update to version 1.59.0.
rust: update to version 1.59.0.
rust: update to version 1.59.0.