Closed
Description
Lint name: mutable_key_type
I tried this code:
use std::collections::HashSet;
fn main() {
let s: HashSet<*mut ()> = HashSet::new();
}
I expected to see this happen: lint not triggered because raw pointers are compared and hashed by pointer value rather than by pointed-to value
Instead, this happened: lint triggered
Meta
cargo clippy -V
: clippy 0.1.52 (d1206f9 2021-02-15)rustc -Vv
:rustc 1.52.0-nightly (d1206f950 2021-02-15) binary: rustc commit-hash: d1206f950ffb76c76e1b74a19ae33c2b7d949454 commit-date: 2021-02-15 host: x86_64-unknown-linux-gnu release: 1.52.0-nightly LLVM version: 11.0.1