Skip to content

Stop using in_band_lifetimes in compiler crates #91867

Closed
@scottmcm

Description

@scottmcm
Member

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:

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 the lib.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.
  • Once it compiles again, review the git diff to ensure it has only lifetime annotation changes.
  • EDIT: Remember to run x.py fmt and x.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:

(They're also listed in the checklist above.)

Activity

added
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Dec 13, 2021
LegionMammal978

LegionMammal978 commented on Dec 13, 2021

@LegionMammal978
Contributor

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), and rustc_codegen_llvm (#91931).

added
E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
on Dec 13, 2021
bugadani

bugadani commented on Dec 13, 2021

@bugadani
Contributor

I can give rustc_borrowck a try (#91879)

Patrick-Poitras

Patrick-Poitras commented on Dec 14, 2021

@Patrick-Poitras
Contributor

I'll try with rustc_typeck. 243 errors fixed! (#91882)

83 remaining items

added 5 commits that reference this issue on Dec 18, 2021

Rollup merge of rust-lang#91894 - pitaj:91867-incremental, r=Aaron1011

b19609b

Rollup merge of rust-lang#91894 - pitaj:91867-incremental, r=Aaron1011

8039087

Rollup merge of rust-lang#91984 - Aaron1011:rustc-middle-lifetime, r=…

4d5ffc4

Rollup merge of rust-lang#91878 - LegionMammal978:less-inband-infer, …

d576f7d

Rollup merge of rust-lang#91895 - pitaj:91867-monomorphize, r=Aaron1011

fba0d04
added a commit that references this issue on Dec 31, 2021

Auto merge of rust-lang#91929 - anuvratsingh:remove_in_band_lifetimes…

added a commit that references this issue on Jan 12, 2022

Auto merge of #8190 - camsteffen:no-in-band-liftetimes, r=flip1995

scottmcm

scottmcm commented on Jan 26, 2022

@scottmcm
MemberAuthor

Looks like these have all landed, so I'll close this.

Thanks for the help, everyone!

added a commit that references this issue on Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @pitaj@bugadani@Aaron1011@LegionMammal978@SylvanB

        Issue actions

          Stop using `in_band_lifetimes` in compiler crates · Issue #91867 · rust-lang/rust