Shotaro Yamada
667223c35d
Add run-rustfix
2019-10-03 08:10:29 +09:00
Shotaro Yamada
301ef6bb2a
Fix false-positive of redundant_clone and move to clippy::perf
2019-10-03 08:10:29 +09:00
bors
737f0a6bb5
Auto merge of #4599 - lzutao:zero-ptr-suggestion, r=flip1995
...
Add suggestion for zero-ptr lint
changelog: Improve suggestion of `zero_ptr` lint
2019-10-02 17:16:29 +00:00
Lzu Tao
6b1a8683f4
Add suggestion for zero-ptr lint
2019-10-02 22:38:00 +07:00
Andre Bogus
23a9c02120
New lint: needless_doc_main
2019-10-02 17:17:22 +02:00
flip1995
93bda4876a
Fix ICE #4579
2019-10-02 09:39:04 +02:00
Manish Goregaokar
9e166e09b8
Use new spans for expansion checking in loop lints
2019-10-01 10:17:29 -07:00
Lzu Tao
aa4f3fb537
Clean up some unused vars
2019-09-29 23:46:32 +07:00
Lzu Tao
6e3a0ea6b3
Rustup rust-lang/rust#63492
2019-09-29 22:58:17 +07:00
bors
fe920ebf8b
Auto merge of #4593 - james9909:fix-multiple-inherent-impls, r=llogiq
...
Fix false positive in `multiple_inherent_impl`
changelog: Fix false positive in `multiple_inherent_impl` by ignoring impls derived from macros.
Closes #4578 .
2019-09-29 06:21:55 +00:00
Matthias Krüger
5f6e3f35b5
rustup https://github.com/rust-lang/rust/pull/64781/
...
cc https://github.com/rust-lang/rust/issues/64867
2019-09-28 10:42:41 +02:00
James Wang
189eaa54c6
Ignore impls derived from macros
2019-09-27 20:47:00 -05:00
flip1995
8d8ba14371
Fix author lint
2019-09-27 18:01:04 +02:00
flip1995
4bbd10a585
Rustup to rust-lang/rust#64813
2019-09-27 17:21:20 +02:00
Michael Wright
8b9415cd88
Refactor booleans
...
Remove unused output from `suggest(..)`
2019-09-27 07:59:34 +02:00
Michael Sproul
4f9d6eea5c
Detect assignment ops in integer_arithmetic
2019-09-27 11:55:42 +10:00
Matthias Krüger
e59d619981
rustup https://github.com/rust-lang/rust/pull/64515
...
changelog: none
2019-09-26 18:34:43 +02:00
Lzu Tao
54371929d2
Remove unused import
2019-09-26 16:08:30 +07:00
Lzu Tao
a7b7e19f49
Rustup https://github.com/rust-lang/rust/pull/64513
2019-09-26 16:03:36 +07:00
bors
adc1df11b4
Auto merge of #4568 - mikerite:fix-4548, r=flip1995
...
Fix `nonminimal-bool` false positive
Closes #4548
Closes #3847
changelog: Fix `nonminimal-bool` false positive
2019-09-26 08:06:16 +00:00
bors
4d30b08027
Auto merge of #4569 - james9909:add-comparison-chain, r=oli-obk
...
Add a new lint for comparison chains
changelog: Adds a new lint: `comparison_chain`.
`comparison_chain` lints all `if` conditional chains where all the conditions are binary comparisons on the same two operands and will suggest a rewrite with `match`.
Closes #4531 .
2019-09-26 07:38:08 +00:00
Lzu Tao
08ce6bc6d9
Fix macro expansion in toplevel_ref_arg lint
2019-09-26 08:46:51 +07:00
Manish Goregaokar
49374a4380
Downgrade op_ref to a MaybeIncorrect suggestion
2019-09-25 14:53:48 -07:00
Manish Goregaokar
d28dacb33a
redundant_pattern_matching: make rustfixable
2019-09-25 14:45:18 -07:00
Manish Goregaokar
a83a8dccba
redundant_closure_call: split tests into fixable
2019-09-25 14:45:18 -07:00
Manish Goregaokar
ad0e7c8e7f
map_unit_fn: fix applicability
2019-09-25 14:45:18 -07:00
Manish Goregaokar
1090509564
non_copy_const: remove incorrect suggestion
2019-09-25 14:45:18 -07:00
Manish Goregaokar
980650eec2
needless_collect: fix suggestion, make test rustfixable
2019-09-25 14:45:18 -07:00
Manish Goregaokar
7f822e742d
needless_borrowed_ref: fix false positive, make rustfixable
2019-09-25 14:45:18 -07:00
Manish Goregaokar
4368771548
map_entry test: Fix semicolon, add run-rustfix
2019-09-25 14:45:18 -07:00
Manish Goregaokar
d445bf2e89
Remove suggestion for complex map_entry cases
2019-09-25 13:54:53 -07:00
Manish Goregaokar
b5cadd734e
ignore single-match for or patterns
2019-09-25 13:34:55 -07:00
Manish Goregaokar
982c51e769
arm.pats -> arm.pat
2019-09-25 12:52:16 -07:00
Michael Wright
89cdd26e71
Refactor booleans
...
Inline `snip (..)` function
2019-09-25 06:40:04 +02:00
James Wang
2f34576c18
Update refactor according to code review
2019-09-24 19:07:03 -05:00
James Wang
7e8afe2001
Fix example in docs
2019-09-24 17:05:43 -05:00
James Wang
52408f5b7d
Add a new lint for comparison chains
2019-09-24 16:55:05 -05:00
Michael Wright
0cc48ad9f9
Fix nonminimal-bool
false positive
...
Closes #4548
Closes #3847
2019-09-24 08:13:50 +02:00
Andre Bogus
2b7514154d
Fix let_and_return lint
2019-09-23 09:17:18 +02:00
Michael Wright
ca6d36ba22
Merge branch 'master' into unneeded_wildcard_pattern
2019-09-23 05:26:47 +02:00
Cyril Plisko
4c881d108a
clippy::cargo_common_metadata: check for license-file
...
When license property is missing in Cargo.toml check for license-file
as it may be used instead of the former. The check implemented here is
very naive as it only verifies that the field is present and is not
empty. More scrutiny can be applied by verifying the file is actually
present.
Fixes #4517
2019-09-22 10:49:36 +03:00
Michael Wright
d04bf15114
Merge branch 'master' into unneeded_wildcard_pattern
2019-09-22 08:59:23 +02:00
bors
f21cd81949
Auto merge of #4558 - Manishearth:suggestions, r=phansch
...
Make more tests rustfixable
changelog: Fix various lint suggestions
Progress towards https://github.com/rust-lang/rust-clippy/issues/3630
r? @phansch
2019-09-21 01:01:21 +00:00
Manish Goregaokar
bbfb9a49e3
for_loop: Split test into fixable/unfixable, make needless_range_loop use updated range syntax
2019-09-21 10:01:06 +09:00
Manish Goregaokar
fa969762a4
assign_ops: Remove MachineApplicable
2019-09-20 14:51:28 +09:00
Andre Bogus
8d884c8a1a
new lint: mem-replace-with-uninit
2019-09-20 00:25:57 +02:00
bors
cdaa93d695
Auto merge of #4544 - JoshMcguigan:issue-4542, r=flip1995
...
#4542 remove machine applicable suggestion
This helps #4542 (but does not completely resolve) by removing the machine applicable suggestion (which was incorrect) for that case.
I would have preferred to fix the machine applicable suggestion to handle format strings, but that's a bit beyond my current understanding of the clippy codebase. I'd be happy to give it a try given some guidance.
changelog: only produce machine applicable suggestions on `explicit_write` lint
2019-09-19 09:28:29 +00:00
bors
f08f171530
Auto merge of #4539 - jolson88:cast-lossless-pedantic, r=flip1995
...
Changes cast-lossless to a pedantic lint
As discussed in #4528 , this moves the cast-lossless lint from `all` to `pedantic`.
I couldn't tell from description alone if it should also be removed from the complexity category, so I left it as part of complexity for now. I didn't see any impact to the tests from this change, but I could be wrong (as this is my first PR).
fixes #4528
changelog: Moves cast-lossless from default to checking only as a `pedantic` lint.
2019-09-19 08:50:31 +00:00
Andre Bogus
70a7dab773
New lint: Require # Safety
section in pub unsafe fn docs
2019-09-19 09:19:55 +02:00
Michael Wright
16ce071bed
Work around qpath_res issue
2019-09-18 21:57:14 +02:00