Skip to content

unwrap-used not triggering for DashMap #8399

Closed
@laralove143

Description

@laralove143

Summary

this code works as expected

let mut hm = HashMap::new();
hm.insert("foo", "bar");
hm.get("foo").unwrap();

but

let dm = DashMap::new();
dm.insert("foo", "bar");
dm.get("foo").unwrap();

does not trigger any lint

Lint Name

unwrap-used

Reproducer

I tried this code:

let dm = DashMap::new();
dm.insert("foo", "bar");
dm.get("foo").unwrap();

I expected to see this happen:
clippy::unwrap-used triggers
Instead, this happened:
nothing

Version

rustc 1.58.1 (db9d1b20b 2022-01-20)
binary: rustc
commit-hash: db9d1b20bba1968c1ec1fc49616d4742c1725b4b
commit-date: 2022-01-20
host: aarch64-apple-darwin
release: 1.58.1
LLVM version: 13.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-false-negativeIssue: The lint should have been triggered on code, but wasn't

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions