rust-lang / rust-lang/rust

`unused-revision-names` compiletest directive has confusing name

Open
#144,748 3 comments 0 reactions 1 assignee View on GitHub

@yuvimittal is already working on this.

Since Aug 6, 2025.

A-compiletest A-contributor-roadblock C-cleanup T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

In rust, and in programming in general, there are two similar classes of errors you can make with names:

  • undefined/unknown/unresolved: trying to refer to something that has is not defined. this corresponds to E0425 in rust.
  • unused: defining something, and then not using it. this corresponds to the unused lints in rustc.

despite it's name, unused-revision-names controls how to treat references to revision names that have not been declared. revision names that are defined and not referenced are never an error.

while there is some sense in which these revisions are never "used" (i.e. the test is never run with that revision), this seems needlessly confusing and contrary to the typical meaning of these words.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.