Skip to content

Conversation

flip1995
Copy link
Member

@flip1995 flip1995 commented Dec 4, 2018

@flip1995 flip1995 added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Dec 4, 2018
@oli-obk
Copy link
Contributor

oli-obk commented Dec 5, 2018

Can you add this lint to rustc? We might need to put it behind a -Z flag so that we don't expose it to users (allow(usage_of_ty_kind) should complain about an unknown lint without the -Z flag).

@flip1995
Copy link
Member Author

flip1995 commented Dec 5, 2018

Yes can do. While doing this should I also move the DEFAULT_HASH_TYPES lint to rustc, since it is also on the list in rust-lang/rust#49509?

/// **What it does:** Checks for the presence of the default hash types "HashMap" or "HashSet"
/// and recommends the FxHash* variants.
///
/// **Why is this bad?** The FxHash variants have better performance
/// and we don't need any collision prevention in clippy.
declare_clippy_lint! {
pub DEFAULT_HASH_TYPES,
internal,
"forbid HashMap and HashSet and suggest the FxHash* variants"
}

@oli-obk
Copy link
Contributor

oli-obk commented Dec 5, 2018

good idea!

@flip1995 flip1995 mentioned this pull request Dec 5, 2018
@flip1995
Copy link
Member Author

flip1995 commented Dec 5, 2018

Fixing done in #3495. Closing this in favor of a rustc implementation.

@flip1995 flip1995 closed this Dec 5, 2018
@flip1995 flip1995 mentioned this pull request Dec 30, 2018
@flip1995 flip1995 deleted the tykind_usage branch June 18, 2019 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants