Skip to content

unfulfilled_lint_expectation warns on a lint that happens at MSRV but not at nightly #14695

Open
@ilyagr

Description

@ilyagr

Summary

I'm not 100% sure this would be considered a bug, but I'm hoping it is.

Lint Name

unfulfilled_lint_expectation, redundant_clone

Reproducer

When I run cargo +nightly clippy --all-targets on https://github.com/jj-vcs/jj/tree/13477940af42a74a58caaaaeafdbd322cfebb81d I get this error:

warning: this lint expectation is unfulfilled
   --> lib/src/default_index/mod.rs:178:18
    |
178 |         #[expect(clippy::redundant_clone)] // Work around nightly clippy false positive
    |                  ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(unfulfilled_lint_expectations)]` on by default

warning: `jj-lib` (lib test) generated 1 warning

However, the MSRV for this code is 1.84, and cargo +1.84 clippy --all-targets does not trigger this warning.

I could of course change this to an allow(), but then we would forget to remove the exception when we increase our MSRV.

Version

rustc 1.88.0-nightly (b4c8b0c3f 2025-04-25)
binary: rustc
commit-hash: b4c8b0c3f0533bb342a4873ff59bdad3883ab8e3
commit-date: 2025-04-25
host: aarch64-apple-darwin
release: 1.88.0-nightly
LLVM version: 20.1.2

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