rust-lang / rust-lang/rust-clippy

Getting "unknown lint: `clippy::elidable_lifetime_names`" using clippy 1.85.1

Open
#14,653 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug I-false-positive
Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

Update: Turns out the version annotation was wrong. Here's a PR to fix it: #14654

Summary

I'm getting an "unknown lint" warning for clippy::elidable_lifetime_names despite using rust/clippy version 1.85.1 which is later than the version clippy::elidable_lifetime_names was introduced in: 1.84.0 per https://rust-lang.github.io/rust-clippy/master/index.html#/elid)

Interestingly I couldn't find the lint in the stable branch, only on master. Is that why I'm getting the lint? If so, shouldn't the docs distinguish between the version something landed on stable?

Lint Name

unknown lint: clippy::elidable_lifetime_names

Reproducer

I tried this code:

#![allow(
    clippy::elidable_lifetime_names,
)]

fn main() {
    println!("Hello, world!");
}

I saw this happen:

cargo clippy
    Checking tmp2 v0.1.0 (/Users/cr/code/tmp2)
warning: unknown lint: `clippy::elidable_lifetime_names`
 --> src/main.rs:3:5
  |
3 |     clippy::elidable_lifetime_names,
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `clippy::single_char_lifetime_names`
  |
  = note: `#[warn(unknown_lints)]` on by default

warning: `tmp2` (bin "tmp2") generated 1 warning
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.06s

I expected to see this happen: No lint

Version
rustc 1.85.1 (4eb161250 2025-03-15)
binary: rustc
commit-hash: 4eb161250e340c8f48f66e2b929ef4a5bed7c181
commit-date: 2025-03-15
host: aarch64-apple-darwin
release: 1.85.1
LLVM version: 19.1.7
Additional Labels

No response

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 with the reproducer in src/main.rs and compare the stable and master Clippy documentation for clippy::elidable_lifetime_names, especially its version annotation. The issue is done when the documented release matches the lint's stable availability and the reported Rust 1.85.1 example no longer produces an unknown-lint warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.