Auto merge of #86827 - camsteffen:hash-lint-resolved, r=oli-obk
Fix internal `default_hash_types` lint to use resolved path I run into false positives now and then (mostly in Clippy) when I want to name some util after HashMap.
This commit is contained in:
commit
3e1c75c6e2
8 changed files with 72 additions and 71 deletions
|
|
@ -12,6 +12,5 @@
|
|||
//~| SUGGESTION rustc::default_hash_types
|
||||
fn main() {
|
||||
let _ = std::collections::HashMap::<String, String>::new();
|
||||
//~^ WARN Prefer FxHashMap over HashMap, it has better performance
|
||||
//~| HELP use
|
||||
//~^ WARN prefer `FxHashMap` over `HashMap`, it has better performance
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@ warning: unknown lint: `rustc::foo::default_hash_types`
|
|||
LL | #[allow(rustc::foo::default_hash_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `rustc::default_hash_types`
|
||||
|
||||
warning: Prefer FxHashMap over HashMap, it has better performance
|
||||
--> $DIR/issue-83477.rs:14:31
|
||||
warning: prefer `FxHashMap` over `HashMap`, it has better performance
|
||||
--> $DIR/issue-83477.rs:14:13
|
||||
|
|
||||
LL | let _ = std::collections::HashMap::<String, String>::new();
|
||||
| ^^^^^^^ help: use: `FxHashMap`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/issue-83477.rs:3:9
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue