Skip to content

Stop using in_band_lifetimes in compiler crates #91867

Description

@scottmcm

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

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

      Issue actions