diff options
| author | bors <bors@rust-lang.org> | 2023-05-08 12:24:56 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-05-08 12:24:56 +0000 |
| commit | 8798c66a9e32212bf19cef5fb0cdb7abe79c4943 (patch) | |
| tree | 7226a5c226dcafc7598fcae7cf650987d0f873e9 /clippy_lints/src/declared_lints.rs | |
| parent | 3aab0ddc435cfad61ab35225fab7cae0e6837316 (diff) | |
| parent | 56e8e1a27da1a204a5ed6ace2132c09abe49178b (diff) | |
Auto merge of #10736 - NotAPenguin0:master, r=Alexendoo
initial clippy::ref_pattern implementation This implements a new lint that discourages the use of the `ref` keyword as outlined in #9010. I think there are still some things to improve about this lint, but I need some feedback before I can implement those. - [x] ~~Maybe it's desirable that a quick fix is listed too, instead of a generic `avoid using the ref keyword` lint.~~ - [x] `let ref x = y` already has a lint (`clippy::toplevel_ref_arg`). This implementation will report this too, so you get two lints for the same issue, which is not great. I don't really know a way around this though. - [X] The dogfood test is currently failing locally, though I ran `cargo clippy -- -D clippy::all -D clippy::pedantic` and got no output, so I'm not sure why this is. Any help with these would be greatly appreciated. fixes #9010 changelog: [`ref_pattern`]: newly added lint
Diffstat (limited to 'clippy_lints/src/declared_lints.rs')
| -rw-r--r-- | clippy_lints/src/declared_lints.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clippy_lints/src/declared_lints.rs b/clippy_lints/src/declared_lints.rs index 79d0f6f3607..6614b99713a 100644 --- a/clippy_lints/src/declared_lints.rs +++ b/clippy_lints/src/declared_lints.rs @@ -539,6 +539,7 @@ pub(crate) static LINTS: &[&crate::LintInfo] = &[ crate::redundant_slicing::REDUNDANT_SLICING_INFO, crate::redundant_static_lifetimes::REDUNDANT_STATIC_LIFETIMES_INFO, crate::ref_option_ref::REF_OPTION_REF_INFO, + crate::ref_patterns::REF_PATTERNS_INFO, crate::reference::DEREF_ADDROF_INFO, crate::regex::INVALID_REGEX_INFO, crate::regex::TRIVIAL_REGEX_INFO, |
