Skip to content

Getting "unknown lint: clippy::elidable_lifetime_names" using clippy 1.85.1 #14653

Open
@corneliusroemer

Description

@corneliusroemer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't have

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions