Commit graph

2828 commits

Author SHA1 Message Date
Yuki Okushi
514b1bc2af Do not lint unnecessary_unwrap in macros 2020-02-04 04:01:42 +09:00
Yuki Okushi
49934e70a2 Remove unnecessary comment 2020-02-04 01:29:11 +09:00
Yuki Okushi
7c5785ca2b Split up indexing_slicing ui test 2020-02-03 15:09:17 +09:00
Yuki Okushi
fa32b41365 Split up drop_forget_ref ui test 2020-02-01 20:28:27 +09:00
Matthias Krüger
187983e991 update test stderr 2020-01-31 20:21:10 +01:00
flip1995
006f07f090
Add test for await in debug_assert!(..) 2020-01-31 10:57:51 +01:00
bors
ca2abaf366 Auto merge of #5109 - phansch:ciao_util_dev, r=flip1995
Deprecate util/dev in favor of cargo alias

This means one less shell script and a bit more cross-platform support
for contributors.

If you've been using `./util/dev` before, this now becomes `cargo dev`.

The key part of this change is found in `.cargo/config` where an alias for calling the `clippy_dev` binary is defined.

changelog: none
2020-01-31 07:18:06 +00:00
bors
bbef531518 Auto merge of #5108 - JohnTitor:split-up-0130, r=flip1995
Split up `match` ui test

Part of #2038

Also, this decreases the line length limit to 220.

changelog: none
2020-01-30 21:06:47 +00:00
Philipp Hansch
4d1a11d354
Deprecate util/dev in favor of cargo alias
If you've been using `./util/dev` before, this now becomes `cargo dev`.

The key part of this change is found in `.cargo/config`.

This means one less shell script and a bit more cross-platform support
for contributors.
2020-01-30 21:34:31 +01:00
bors
668bc485da Auto merge of #5101 - Areredify:let_underscore_lock, r=flip1995
add `let_underscore_lock` lint

closes #1574
changelog: add `let_underscore_lock` lint

I am not entirely sure about my docs/messages wording here, improvements are welcome
2020-01-30 20:24:24 +00:00
Areredify
63ab7a5e8c lint all guard types, not just lock functions 2020-01-30 18:46:22 +03:00
Mikhail Babenko
9b88a2b295 decouple 'let_underscore' tests 2020-01-30 16:51:23 +03:00
Mikhail Babenko
d1f8621711 add lint 2020-01-30 16:48:56 +03:00
Yuki Okushi
17489ef811 Split up match ui test 2020-01-30 12:06:42 +09:00
Yuki Okushi
ed6a0cc8a1 Revive test in enum_clike_unportable_variant 2020-01-30 11:43:19 +09:00
xiongmao86
26b1d60f15 Add test and update reference. 2020-01-30 00:22:42 +08:00
Yuki Okushi
314f438ab4 Split up non_copy_const ui test 2020-01-27 12:14:11 +09:00
bors
4f65bec39a Auto merge of #5084 - JohnTitor:clean-up-span-lint, r=flip1995
Clean up `span_lint` in `methods/mod.rs`

Uses `span_help_and_lint` instead of `span_lint` and `span_lint_and_sugg` instead of `span_lint_and_then`.

changelog: none
2020-01-26 15:28:39 +00:00
Philipp Hansch
45333102d7
Resolve FIXME: String::new is now a const fn
`const_string_new` is stable since Rust 1.39
2020-01-26 11:03:53 +01:00
Yuki Okushi
4b133f2867 Apply review comments 2020-01-26 07:01:16 +09:00
bors
fd6f609f64 Auto merge of #5083 - Areredify:issue-4399, r=flip1995
dont fire `possible_missing_comma` if intendation is present

Closes #4399
changelog: dont fire `possible_missing_comma` if intendation is present

I suspect there is already a utils function for indentation (but searching indent didn't yield a function for that), and my solution is certainly not universal, but it's probably the best we can do.
2020-01-25 17:47:54 +00:00
Mikhail Babenko
a234aef084 dont fire possible_missing_comma if intendation is present 2020-01-25 20:16:05 +03:00
bors
6b5419412e Auto merge of #5081 - Areredify:vec_box_threshold, r=flip1995
add size parameter for `vec_box`  lint

changelog: add size threshold for the `vec_box` lint, currently 4096 bytes (one page) (subject to change). Closes #3547.

diff is a little bit confusing due to some refactoring (moving free functions to lint struct functions), relevant portion is [this](https://github.com/rust-lang/rust-clippy/compare/master...Areredify:vec_box_threshold?expand=1#diff-1096120ca9143af89dcc9175ea92b54aR294-R298). In hindsight should've been different commits, but oh well.
2020-01-25 16:11:43 +00:00
Mikhail Babenko
2b7bc260de add size parameter for lint 2020-01-25 18:06:52 +03:00
Yuki Okushi
83f6b516a0 Split up match_same_arms ui test 2020-01-25 14:25:45 +09:00
bors
87597b5a42 Auto merge of #5087 - Areredify:issue-4905, r=phansch
improve `empty_enum` documentation

closes #4905
changelog: improve `empty_enum` help message and documentation.
2020-01-24 22:30:07 +00:00
bors
1ccd284ec6 Auto merge of #5086 - Areredify:issue-3746, r=phansch
don't fire `empty_loop` in `no_std` crates

closes #3746.
changelog: move no_std detection to utils, don't fire empty_loop in no_std crates
2020-01-24 21:42:46 +00:00
Mikhail Babenko
634774b89b don't fire empty_loop in no_std crates 2020-01-24 14:42:24 +03:00
Mikhail Babenko
199ae1714e improve empty_enum documentation 2020-01-24 14:37:16 +03:00
Yuki Okushi
46b787d1b8 Split up needless_range_loop ui test 2020-01-24 17:21:50 +09:00
Yuki Okushi
3999b30d9b Update stderrs 2020-01-24 17:04:46 +09:00
bors
2c7cfa8321 Auto merge of #5027 - sinkuu:vectored_io, r=phansch
Lint vectored IO in unused_io_amount lint

`read_vectored` & `write_vectored` require handling returned value likewise non-vectored methods. https://github.com/rust-lang/rust/issues/68041

---

changelog: lint vectored IO in `unused_io_amount` lint
2020-01-24 06:44:09 +00:00
bors
3237b7a69f Auto merge of #5082 - Areredify:issue-4980, r=flip1995
disable let_underscore_must_use in external macros

changelog: disable let_underscore_must_use in external macros
Closes #4980
2020-01-23 18:29:28 +00:00
Mikhail Babenko
fef3657100 disable let_underscore_must_use in external macros 2020-01-23 20:02:34 +03:00
Areredify
796958c7e2 add option_as_ref_deref lint 2020-01-23 16:12:16 +03:00
Yuki Okushi
a7d58edf27 Ignore macros with ! operators in eq_op 2020-01-22 16:48:00 +09:00
bors
f78cc07509 Auto merge of #5068 - JohnTitor:split-up-transmute, r=phansch
Split up `transmute` ui test

Part of #2038

changelog: none
2020-01-21 06:22:05 +00:00
bors
dd06c06183 Auto merge of #5028 - krishna-veerareddy:issue-5026-mem-ordering-fences, r=phansch
Detect usage of invalid atomic ordering in memory fences

Detect usage of `core::sync::atomic::{fence, compiler_fence}` with `Ordering::Relaxed` and suggest valid alternatives.

changelog: Extend `invalid_atomic_ordering` to lint memory fences

Fixes #5026
2020-01-21 05:53:46 +00:00
bors
eca0d8e5d0 Auto merge of #5067 - JohnTitor:lint-skip-while-next, r=flip1995
Add `skip_while_next` lint

Fixes #4036

changelog: Add `skip_while_next` lint
2020-01-20 17:28:38 +00:00
bors
32949da78e Auto merge of #5070 - JohnTitor:suspicious-map-doc, r=flip1995
Improve `suspicious_map`documentation

Fixes #4793

changelog: none
2020-01-20 12:12:03 +00:00
Yuki Okushi
bec5b69e45 Apply review comment 2020-01-20 21:07:31 +09:00
Yuki Okushi
f8034e0bc6 Improve suspicious_mapdocumentation 2020-01-20 15:05:40 +09:00
Yuki Okushi
fdda3c3f25 Tweak wording in assertions_on_constants 2020-01-20 11:52:58 +09:00
Yuki Okushi
67d0f443b3 Split up transmute ui test 2020-01-20 11:16:50 +09:00
Yuki Okushi
95c369fa91 Add skip_while_next lint 2020-01-20 10:56:02 +09:00
bors
f7b3e4f29c Auto merge of #5056 - rust-lang:dissasociate-mut-key, r=flip1995
Avoid mut_key on types of unknown layout

This fixes #5020 by requiring a known layout for the key type before linting. Edit: This fixes #5043, too.

changelog: none
2020-01-19 14:41:28 +00:00
Andre Bogus
59fd637ba1 Avoid mut_key on types of unknown layout 2020-01-19 14:49:18 +01:00
bors
fd0428f622 Auto merge of #5032 - JohnTitor:add-sugg-some-result, r=flip1995
Add suggestions for `if_let_some_result`

Fixes #4991

This approach may be fragile though...

changelog: Add suggestions for `if_let_some_result`
2020-01-19 12:27:35 +00:00
Yuki Okushi
c9f8d03f42 Treat more strange pattern 2020-01-19 21:14:47 +09:00
Yuki Okushi
dfab83fe11 Split up if_same_then_else ui test 2020-01-19 15:04:41 +09:00