mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-26 14:40:32 +00:00
update lints
This commit is contained in:
parent
76ab801001
commit
e7013a3e9c
3 changed files with 4 additions and 2 deletions
|
@ -14,7 +14,7 @@ Table of contents:
|
|||
* [License](#license)
|
||||
|
||||
##Lints
|
||||
There are 138 lints included in this crate:
|
||||
There are 139 lints included in this crate:
|
||||
|
||||
name | default | meaning
|
||||
---------------------------------------------------------------------------------------------------------------------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -75,6 +75,7 @@ name
|
|||
[let_and_return](https://github.com/Manishearth/rust-clippy/wiki#let_and_return) | warn | creating a let-binding and then immediately returning it like `let x = expr; x` at the end of a block
|
||||
[let_unit_value](https://github.com/Manishearth/rust-clippy/wiki#let_unit_value) | warn | creating a let binding to a value of unit type, which usually can't be used afterwards
|
||||
[linkedlist](https://github.com/Manishearth/rust-clippy/wiki#linkedlist) | warn | usage of LinkedList, usually a vector is faster, or a more specialized data structure like a VecDeque
|
||||
[logic_bug](https://github.com/Manishearth/rust-clippy/wiki#logic_bug) | warn | checks for boolean expressions that contain terminals which can be eliminated
|
||||
[manual_swap](https://github.com/Manishearth/rust-clippy/wiki#manual_swap) | warn | manual swap
|
||||
[many_single_char_names](https://github.com/Manishearth/rust-clippy/wiki#many_single_char_names) | warn | too many single character bindings
|
||||
[map_clone](https://github.com/Manishearth/rust-clippy/wiki#map_clone) | warn | using `.map(|x| x.clone())` to clone an iterator or option's contents (recommends `.cloned()` instead)
|
||||
|
|
|
@ -12,7 +12,7 @@ use utils::{span_lint_and_then, in_macro, snippet_opt, SpanlessEq};
|
|||
///
|
||||
/// **Example:** `if a && true` should be `if a`
|
||||
declare_lint! {
|
||||
pub NONMINIMAL_BOOL, Allow,
|
||||
pub NONMINIMAL_BOOL, Warn,
|
||||
"checks for boolean expressions that can be written more concisely"
|
||||
}
|
||||
|
||||
|
|
|
@ -267,6 +267,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
|
|||
blacklisted_name::BLACKLISTED_NAME,
|
||||
block_in_if_condition::BLOCK_IN_IF_CONDITION_EXPR,
|
||||
block_in_if_condition::BLOCK_IN_IF_CONDITION_STMT,
|
||||
booleans::LOGIC_BUG,
|
||||
booleans::NONMINIMAL_BOOL,
|
||||
collapsible_if::COLLAPSIBLE_IF,
|
||||
copies::IF_SAME_THEN_ELSE,
|
||||
|
|
Loading…
Reference in a new issue