Skip to content

FN: missing_panics_doc doesn't check assert_eq!/assert_ne! #6997

@Y-Nak

Description

@Y-Nak

Lint name: missing_panics_doc

missing_panics_doc doesn't check the usage of assert_eq! or assert_ne! even though it checks assert!

I tried this code:

#![deny(clippy::missing_panics_doc)]

pub fn foo(x: i32, y: i32) {
    assert_eq!(x, y);
    assert_ne!(x, y);
}

I expected to see this happen: missing_panics_doc should be triggered.

Instead, this happened: nothing.

Meta

  • cargo clippy -V: clippy 0.1.52 (07e0e2e 2021-03-24)
  • rustc -Vv:
    rustc 1.53.0-nightly (07e0e2ec2 2021-03-24)
    binary: rustc
    commit-hash: 07e0e2ec268c140e607e1ac7f49f145612d0f597
    commit-date: 2021-03-24
    host: x86_64-unknown-linux-gnu
    release: 1.53.0-nightly
    LLVM version: 12.0.0
    

Metadata

Metadata

Assignees

Labels

C-bugCategory: Clippy is not doing the correct thingI-false-negativeIssue: The lint should have been triggered on code, but wasn'tgood first issueThese issues are a good way to get started with Clippy

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions