rust-lang / rust-lang/rust

Disallow future-incompatibility lints in the 2024 edition

Open
#117,921 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-lints A-maybe-future-edition C-discussion T-lang
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

We have quite a long list of future-incompatibility lints that are waiting to be made into hard errors. The lints are so severe that we warn even when they are used by a dependency of the crate being built, because they will cause the crate to stop compiling at some point in the future.

We could use the edition as an impetus to switch some or all of these lints over to hard errors (or deny-by-default lints). Note that because of the way editions work this would only affect the crate being upgraded, not its dependencies. This would mean pairing the carrot with the stick, so to speak; if any of the crates triggering these errors are upgraded to the edition they will also need to have their future-incompat issues fixed. It also means that new code (using the latest edition) won't be written that triggers these lints.

On the other hand it's unlikely that the crates with future-incompat issues are being maintained in the first place, so this wouldn't do much to help the problem.

Opening this issue for discussion and consideration by the lang team.

For some background on how we handled this in past editions, see https://github.com/rust-lang/rust/issues/80165#issuecomment-791583502.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the future-incompatibility lint list and the prior-edition discussion linked in the issue. Determine which lints, if any, should become hard errors or deny-by-default in the 2024 edition, then confirm the language-team decision and its implementation scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.