flip1995
b2e2c0806e
Improve extract_msrv_attr! situation
2020-11-25 12:22:58 +01:00
Suyash458
aaa4325045
add support for minimum supported rust version.
...
add configuration option for minimum supported rust version
add msrv attribute to some lints listed in #6097
add tests
2020-11-25 12:22:47 +01:00
bors
f897d27d8b
Auto merge of #6339 - CDirkx:redundant-pattern-match-poll, r=ebroto
...
Change `redundant_pattern_matching` to also lint `std::task::Poll`
`reduntant_pattern_matching` currently lints pattern matching on `Option` and `Result` where the `is_variant` utility methods could be used instead: `is_some`, `is_none`, `is_ok`, `is_err`. This PR extends this behaviour to `std::task::Poll`, suggesting the methods `is_pending` and `is_ready`.
Motivation: The current description of `redundant_pattern_matching` mentions
> It's more concise and clear to just use the proper utility function
which in my mind applies to `Poll` as well.
changelog: Enhance [`redundant_pattern_matching`] to also lint on `std::task::Poll`
2020-11-24 23:19:43 +00:00
flip1995
c6a577ea11
Merge remote-tracking branch 'upstream/master' into rustup
2020-11-24 17:05:01 +01:00
bors
53ce1dd719
Auto merge of #79228 - flip1995:clippyup, r=oli-obk
...
Update Clippy
Biweekly Clippy update
r? `@Manishearth`
2020-11-24 06:56:02 +00:00
bors
295fe28057
Auto merge of #6313 - giraffate:fix_fp_needless_collect, r=ebroto
...
Fix FP in indirect `needless_collect` when used multiple times
Fix https://github.com/rust-lang/rust-clippy/issues/5991
Fix https://github.com/rust-lang/rust-clippy/issues/6297
changelog: Fix FP in indirect `needless_collect` when used multiple times
2020-11-23 22:26:45 +00:00
Eduardo Broto
209ab1885c
Merge remote-tracking branch 'upstream/master' into rustup
2020-11-23 23:02:12 +01:00
bors
e5fddb6747
Auto merge of #78439 - lzutao:rm-clouldabi, r=Mark-Simulacrum
...
Drop support for all cloudabi targets
`cloudabi` is a tier-3 target, and [it is no longer being maintained upstream][no].
This PR drops supports for cloudabi targets. Those targets are:
* aarch64-unknown-cloudabi
* armv7-unknown-cloudabi
* i686-unknown-cloudabi
* x86_64-unknown-cloudabi
Since this drops supports for a target, I'd like somebody to tag `relnotes` label to this PR.
Some other issues:
* The tidy exception for `cloudabi` crate is still remained because
* `parking_lot v0.9.0` and `parking_lot v0.10.2` depends on `cloudabi v0.0.3`.
* `parking_lot v0.11.0` depends on `cloudabi v0.1.0`.
[no]: https://github.com/NuxiNL/cloudabi#note-this-project-is-unmaintained
2020-11-23 19:01:19 +00:00
flip1995
284c359c61
Fix ICE in utils::implements_trait
...
This only happend when debug_assertions were enabled in rustc
2020-11-23 13:52:27 +01:00
flip1995
d3d2018ead
Merge commit '3e7c6dec244539970b593824334876f8b6ed0b18' into clippyup
2020-11-23 13:51:04 +01:00
Cameron Steffen
a39a93faeb
Disable unnecessary_cast for cfg-dependant types
2020-11-22 19:35:04 -06:00
Lzu Tao
4b698f2069
Drop support for cloudabi targets
2020-11-22 17:11:41 -05:00
Carol (Nichols || Goulding)
445466e567
Apply suggestions from code review to change "that" to "which"
...
Co-authored-by: oliver <16816606+o752d@users.noreply.github.com>
2020-11-22 10:17:34 -05:00
Carol (Nichols || Goulding)
034244f108
Small grammar, punctuation, and code style improvements to docs
2020-11-22 10:17:34 -05:00
oliver
9b910e19ce
a typo
...
typo
2020-11-22 04:44:47 +00:00
Jonas Schievink
1464dcedfb
Thread Constness
through selection
2020-11-22 02:13:53 +01:00
Daniel Smith
8b21241fd5
Revert "Convert the await holding lints to correctness"
...
This reverts commit d8c6bce440
.
2020-11-20 11:44:26 -05:00
bors
8325d48d2d
Auto merge of #6351 - flip1995:rustup, r=flip1995
...
Rustup
r? `@ghost`
changelog: none
2020-11-20 09:07:56 +00:00
flip1995
5ee0a400fc
Fix dogfood errors
2020-11-20 10:06:26 +01:00
flip1995
dd4e471b3f
Properly deprecate panic_params lint
2020-11-20 09:37:47 +01:00
Mara Bos
113c1476c9
Clippy: Match on assert!() expansions without an inner block.
2020-11-19 19:47:25 +01:00
Mara Bos
78faaef8de
Remove the clippy::panic-params lint.
...
Rustc itself now warns for all cases that triggered this lint.
2020-11-19 18:34:40 +01:00
Mara Bos
577ebc8cd6
Rollup merge of #79145 - camelid:clippy-fix-panics, r=flip1995
...
Fix handling of panic calls
This should make Clippy more resilient and will unblock #78343 .
This PR is made against rust-lang/rust to avoid the need for a subtree
sync at ``@flip1995's`` suggestion in rust-lang/rust-clippy#6310 .
r? ``@flip1995``
cc ``@m-ou-se``
2020-11-18 15:46:36 +01:00
Takayuki Nakata
0502ac2a87
Improve doc about map_clone
2020-11-18 08:33:25 +09:00
Christiaan Dirkx
5a83968877
Change redundant_pattern_matching
to also lint std::task::Poll
...
Suggest using utility methods `is_pending` and `is_ready`.
2020-11-17 23:40:31 +01:00
bors
44d944586c
Auto merge of #6070 - matsujika:unnecessary_wrap, r=flip1995
...
Add new lint `unnecessary_wrap`
Fixes #5969
changelog: New lint [`unnecessary_wraps`]
2020-11-17 20:28:32 +00:00
Camelid
4e4c4fb8aa
Fix handling of panic calls
...
This should make Clippy more resilient and will unblock #78343 .
This PR is made against rust-lang/rust to avoid the need for a subtree
sync at @flip1995's suggestion in rust-lang/rust-clippy#6310 .
2020-11-17 12:16:15 -08:00
bors
5464cbed2f
Auto merge of #6337 - ThibsG:FixIce6332, r=Manishearth
...
Remove `expect()` calls to avoid ICEs in `deref_addrof` lint
Fixes : #6332
changelog: none
2020-11-17 17:55:46 +00:00
bors
a8cafc6196
Auto merge of #6338 - flip1995:rustup, r=flip1995
...
Rustup
r? `@ghost`
changelog: none
2020-11-17 17:10:04 +00:00
flip1995
bf2d31d053
Run cargo dev fmt
2020-11-17 18:08:12 +01:00
Hirochika Matsumoto
c7445d7f2c
Pluralize lint name
2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
4e5c02e898
Ignore trait implementations
2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
bf46f78ca7
Fix clippy error
2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
532d205218
Skip functions in PartialOrd
2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
9d96311d73
Remove wildcard use
2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
e998d61fe6
Downgrade applicability to MaybeIncorrect
2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
c7692cf749
Skip function with no exprs contained
2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
c5447eb3c1
Make lint skip macros
2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
12474c62ff
Add support for methods
2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
2f85aa736e
Make lint skip closures
2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
8392bc7946
Run cargo dev fmt
2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
1bdac87128
Improve lint message
2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
eec7f5c111
Update clippy_lints/src/unnecessary_wrap.rs
...
Co-authored-by: Philipp Krones <hello@philkrones.com>
2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
df0d565e59
Move find_all_ret_expressions
into utils
2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
cdb72df6f9
Split lint suggestion into two
2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
a433d4690e
Run rustfmt
2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
c775856727
Call diag.multipart_suggestion
instead
2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
3ed8902623
Fix typo
...
Co-authored-by: Philipp Krones <hello@philkrones.com>
2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
ebdd4e2c72
Refactor code according to reivews
2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
0335b8d6a7
Fix lint example
2020-11-18 01:28:37 +09:00