rust/clippy_lints/src
bors 18a7dce4da Auto merge of #4314 - chansuke:add-negation-to-is_empty, r=flip1995
Add negation to `len_zero` lint to show more explicit message.

Fixes #4304 I have updated the `len_zero` to show the required negation in case of like the below case.

```
fn main() {
    let v = vec![1];
    if v.len() > 0 {
    }
}
```

changelog: Clarify suggestion of `len_zero` lint.
2019-08-01 14:09:59 +00:00
..
methods Update all the code to pass the updated use_self lint. 2019-07-31 08:50:43 +00:00
utils Update all the code to pass the updated use_self lint. 2019-07-31 08:50:43 +00:00
approx_const.rs
arithmetic.rs
assertions_on_constants.rs
assign_ops.rs Fix warnings about unnecessary lifetime bounds 2019-06-20 01:36:23 +07:00
attrs.rs Typos and minor grammar corrections 2019-06-12 20:07:10 +02:00
bit_mask.rs
blacklisted_name.rs
block_in_if_condition.rs Fix warnings about unnecessary lifetime bounds 2019-06-20 01:36:23 +07:00
booleans.rs Fix breakage due to rust-lang/rust#61968 2019-06-21 08:14:07 +02:00
bytecount.rs
cargo_common_metadata.rs
checked_conversions.rs Update all the code to pass the updated use_self lint. 2019-07-31 08:50:43 +00:00
cognitive_complexity.rs Rename hir::map::local_def_id_from_hir_id to local_def_id 2019-07-06 10:52:51 +07:00
collapsible_if.rs Fix fallout from rust-lang/rust PR 60861. 2019-06-23 17:24:45 +02:00
consts.rs Update formatting 2019-08-01 07:09:57 +02:00
copies.rs Fix match_same_arms false negative 2019-07-02 08:18:55 +02:00
copy_iterator.rs Rename hir::map::local_def_id_from_hir_id to local_def_id 2019-07-06 10:52:51 +07:00
dbg_macro.rs
default_trait_access.rs
deprecated_lints.rs
derive.rs Rename hir::map::local_def_id_from_hir_id to local_def_id 2019-07-06 10:52:51 +07:00
doc.rs
double_comparison.rs Format code 2019-07-18 17:23:22 +02:00
double_parens.rs
drop_bounds.rs
drop_forget_ref.rs
duration_subsec.rs
else_if_without_else.rs
empty_enum.rs Rename hir::map::local_def_id_from_hir_id to local_def_id 2019-07-06 10:52:51 +07:00
entry.rs Fix warnings about unnecessary lifetime bounds 2019-06-20 01:36:23 +07:00
enum_clike.rs
enum_glob_use.rs rustup https://github.com/rust-lang/rust/pull/61836/ 2019-06-18 11:15:47 +02:00
enum_variants.rs
eq_op.rs
erasing_op.rs
escape.rs Fix breakage due to rust-lang/rust#61856 2019-07-30 06:39:51 +02:00
eta_reduction.rs redundant_closure_for_method_calls fixes: 2019-06-12 13:43:36 +02:00
eval_order_dependence.rs find_by_hir_id -> find 2019-06-25 14:34:07 -07:00
excessive_precision.rs Update all the code to pass the updated use_self lint. 2019-07-31 08:50:43 +00:00
explicit_write.rs
fallible_impl_from.rs Rename hir::map::local_def_id_from_hir_id to local_def_id 2019-07-06 10:52:51 +07:00
format.rs Remove wrong lifetime from LintContext 2019-06-12 10:28:52 +02:00
formatting.rs Simplify unsugar_if to just an if expr check 2019-06-24 09:51:53 +02:00
functions.rs fmt 2019-06-25 14:41:10 -07:00
get_last_with_len.rs
identity_conversion.rs Fix dogfood test failures. 2019-06-24 04:00:05 +02:00
identity_op.rs
if_not_else.rs
implicit_return.rs Improved imports 2019-07-17 20:44:09 +02:00
indexing_slicing.rs Typos and minor grammar corrections 2019-06-12 20:07:10 +02:00
infallible_destructuring_match.rs
infinite_iter.rs
inherent_impl.rs Fix breakage due to rust-lang/rust#61968 2019-06-21 08:14:07 +02:00
inherent_to_string.rs Corrections for PR review. 2019-07-17 08:58:36 +02:00
inline_fn_without_body.rs
int_plus_one.rs
integer_division.rs Downgrade integer_division to restriction 2019-06-15 00:17:04 -07:00
invalid_ref.rs update tests and fix lints in clippy 2019-06-21 14:17:59 +02:00
items_after_statements.rs
large_enum_variant.rs Rename hir::map::local_def_id_from_hir_id to local_def_id 2019-07-06 10:52:51 +07:00
len_zero.rs Add required negation in non_zero lint 2019-08-01 00:23:09 +09:00
let_if_seq.rs Fix warnings about unnecessary lifetime bounds 2019-06-20 01:36:23 +07:00
lib.rs Move UNNECESSARY_UNWRAP to complexity and PANICKING_UNWRAP to correctness 2019-08-01 15:14:06 +02:00
lifetimes.rs Ignore generated fresh lifetimes in elision check. 2019-07-10 01:57:25 +08:00
literal_representation.rs Update all the code to pass the updated use_self lint. 2019-07-31 08:50:43 +00:00
loops.rs rustfmt 2019-07-06 19:43:34 +02:00
map_clone.rs
map_unit_fn.rs
matches.rs Fix warnings about unnecessary lifetime bounds 2019-06-20 01:36:23 +07:00
mem_discriminant.rs
mem_forget.rs
mem_replace.rs
minmax.rs
misc_early.rs Update formatting 2019-08-01 07:09:57 +02:00
misc.rs Lint 2019-07-15 14:00:07 -05:00
missing_const_for_fn.rs Rename hir::map::local_def_id_from_hir_id to local_def_id 2019-07-06 10:52:51 +07:00
missing_doc.rs Rename hir::map::local_def_id_from_hir_id to local_def_id 2019-07-06 10:52:51 +07:00
missing_inline.rs Rename hir::map::local_def_id_from_hir_id to local_def_id 2019-07-06 10:52:51 +07:00
multiple_crate_versions.rs
mut_mut.rs Fix warnings about unnecessary lifetime bounds 2019-06-20 01:36:23 +07:00
mut_reference.rs
mutex_atomic.rs
needless_bool.rs get_parent_node_by_hir_id -> get_parent_node 2019-06-25 14:33:51 -07:00
needless_borrow.rs
needless_borrowed_ref.rs
needless_continue.rs Pacify rustfmt. 2019-06-24 04:54:23 +02:00
needless_pass_by_value.rs rustup https://github.com/rust-lang/rust/pull/62964 2019-07-26 22:58:31 +02:00
needless_update.rs
neg_cmp_op_on_partial_ord.rs
neg_multiply.rs
new_without_default.rs Rename hir::map::local_def_id_from_hir_id to local_def_id 2019-07-06 10:52:51 +07:00
no_effect.rs
non_copy_const.rs Update all the code to pass the updated use_self lint. 2019-07-31 08:50:43 +00:00
non_expressive_names.rs update tests and fix lints in clippy 2019-06-21 14:17:59 +02:00
ok_if_let.rs
open_options.rs Update formatting 2019-08-01 07:09:57 +02:00
overflow_check_conditional.rs
panic_unimplemented.rs rustup https://github.com/rust-lang/rust/pull/61995 2019-07-03 18:00:35 +02:00
partialeq_ne_impl.rs
path_buf_push_overwrite.rs
precedence.rs
ptr_offset_with_cast.rs Update all the code to pass the updated use_self lint. 2019-07-31 08:50:43 +00:00
ptr.rs Rename hir::map::local_def_id_from_hir_id to local_def_id 2019-07-06 10:52:51 +07:00
question_mark.rs rustup https://github.com/rust-lang/rust/pull/61995 2019-07-03 18:00:35 +02:00
ranges.rs Make use of new outer_expn_info() function 2019-06-01 16:25:51 +07:00
redundant_clone.rs rustup https://github.com/rust-lang/rust/pull/62859 2019-07-24 02:20:36 +02:00
redundant_field_names.rs
redundant_pattern_matching.rs rustup https://github.com/rust-lang/rust/pull/61995 2019-07-03 18:00:35 +02:00
redundant_static_lifetimes.rs Update formatting 2019-08-01 07:09:57 +02:00
reference.rs
regex.rs
replace_consts.rs Remove lint for ONCE_INIT 2019-07-06 12:34:32 +07:00
returns.rs Rustup macro expansion and resolution 2019-07-12 00:26:36 +07:00
serde_api.rs
shadow.rs Fix breakage due to rust-lang/rust#61988 2019-07-06 19:06:49 +02:00
slow_vector_initialization.rs Fix warnings about unnecessary lifetime bounds 2019-06-20 01:36:23 +07:00
strings.rs Extract semantic constant 2019-07-08 17:51:13 -03:00
suspicious_trait_impl.rs get_parent_node_by_hir_id -> get_parent_node 2019-06-25 14:33:51 -07:00
swap.rs
temporary_assignment.rs
trait_bounds.rs Respond to review comments 2019-07-27 21:58:29 +01:00
transmute.rs
transmuting_null.rs
trivially_copy_pass_by_ref.rs Rename hir::map::local_def_id_from_hir_id to local_def_id 2019-07-06 10:52:51 +07:00
try_err.rs Making try_err machine applicable 2019-06-24 21:28:46 -04:00
types.rs Auto merge of #4318 - izik1:typo, r=phansch 2019-08-01 09:20:32 +00:00
unicode.rs
unsafe_removed_from_name.rs
unused_io_amount.rs
unused_label.rs Fix breakage due to rust-lang/rust#61988 2019-07-06 19:06:49 +02:00
unwrap.rs Fix doc tests 2019-08-01 15:14:06 +02:00
use_self.rs Update formatting 2019-08-01 07:09:57 +02:00
vec.rs Make use of new outer_expn_info() function 2019-06-01 16:25:51 +07:00
wildcard_dependencies.rs
write.rs rustup https://github.com/rust-lang/rust/pull/61758/files 2019-06-12 10:28:58 +02:00
zero_div_zero.rs