mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-22 11:03:16 +00:00
e636b88aa1
Add `rc_buffer` lint for checking Rc<String> and friends Fixes #2623 This is a bit different from the original PR attempting to implement this type of lint. Rather than linting against converting into the unwanted types, this PR lints against declaring the unwanted type in a struct or function definition. I'm reasonably happy with what I have here, although I used the fully qualified type names for the Path and OsString suggestions, and I'm not sure if I should have just used the short versions instead, even if they might not have been declared via use. Also, I don't know if "buffer type" is the best way to put it or not. Alternatively I could call it a "growable type" or "growable buffer type", but I was thinking of PathBuf when I started making the lint. changelog: Add `rc_buffer` lint |
||
---|---|---|
.. | ||
ast_utils.rs | ||
attrs.rs | ||
author.rs | ||
camel_case.rs | ||
comparisons.rs | ||
conf.rs | ||
constants.rs | ||
diagnostics.rs | ||
eager_or_lazy.rs | ||
higher.rs | ||
hir_utils.rs | ||
inspector.rs | ||
internal_lints.rs | ||
mod.rs | ||
numeric_literal.rs | ||
paths.rs | ||
ptr.rs | ||
sugg.rs | ||
sym.rs | ||
usage.rs |