Commit graph

7477 commits

Author SHA1 Message Date
bors
ac795a6f3a Auto merge of #4960 - ThibsG:patterns_with_wildcard_#4640, r=flip1995
New lint: pats_with_wild_match_arm

Wildcard use with other pattern in same match arm.

The wildcard covers other(s) pattern(s) as it will match anyway.

changelog: add new lint when multiple patterns (including wildcard) are used in a match arm.

Fixes #4640.
2020-01-09 13:51:00 +00:00
bors
50403de386 Auto merge of #5025 - JohnTitor:rustup-0109, r=flip1995
Some rustups

changelog: none
2020-01-09 12:37:54 +00:00
Yuki Okushi
822de884ff Rustup to rust-lang/rust#68024 2020-01-09 16:43:51 +09:00
Yuki Okushi
e58cfac458 Rustup to rust-lang/rust#67979 2020-01-09 16:43:51 +09:00
Yuki Okushi
c24251b5fd Rustup to rust-lang/rust#67781 2020-01-09 09:22:16 +09:00
bors
0da0ae3aa6 Auto merge of #5022 - flip1995:useless_attr, r=phansch
Fix useless_attribute suggestion

Fixes #5021

changelog: Fix [`useless_attribute`] suggestion, which tripped rustfix
2020-01-08 20:28:19 +00:00
flip1995
6eba66532c
Add regression test for useless_attribute lint 2020-01-08 17:47:01 +01:00
flip1995
9ea17d42a7
Fix useless attribute suggestion 2020-01-08 17:47:01 +01:00
bors
52b9e704c6 Auto merge of #5017 - sinkuu:mir_no_opt_fallout, r=flip1995
Fix redundant_clone lint not working with PathBuf and OsString

https://github.com/rust-lang/rust-clippy/pull/4825 diabled MIR optimization in clippy, including `rustc_mir::transform::InstCombine` which reduces `&(*x)` to `x`. This PR tries to unwrap `&*` when looking into `mir::Rvalue`s.

Fixes #5014.

---

changelog: fixed `redundant_clone` lint not working with `PathBuf` and `OsString`
2020-01-08 12:09:45 +00:00
bors
c789caa454 Auto merge of #5015 - krishna-veerareddy:change-float-to-int-transmute-category, r=flip1995
Move `transmute_float_to_int` lint to `complexity`

`transmute_float_to_int` lint was accidentally added to nursery so moving it to the complexity group.

changelog: Move `transmute_float_to_int` out of nursery
2020-01-08 08:42:46 +00:00
bors
e03a32f88a Auto merge of #5019 - JohnTitor:follow-up-normalize, r=phansch
Normalize lint messages in cast_precision_loss

Follow-up of #5000

changelog: none
2020-01-08 08:14:31 +00:00
Yuki Okushi
787106c380 Normalize lint messages in cast_precision_loss 2020-01-08 16:36:02 +09:00
bors
baa5cc17da Auto merge of #5018 - JohnTitor:rustup-0108, r=phansch
Rustup to rust-lang/rust#67970

changelog: none
2020-01-08 06:56:57 +00:00
Yuki Okushi
fa33681d5c Rustup to rust-lang/rust#67970 2020-01-08 15:42:54 +09:00
Shotaro Yamada
99eec3f54f Fix redundant_clone 2020-01-08 14:18:00 +09:00
Krishna Sai Veera Reddy
b793cf09f2 Move transmute_float_to_int lint to complexity
`transmute_float_to_int` lint was accidentally added to nursery
so moving it to the complexity group.
2020-01-07 15:53:19 -08:00
ThibsG
0fa0df9efb Span help without suggestion 2020-01-07 19:10:59 +01:00
ThibsG
8ae8b08e32 Change lint name to WILDCARD_IN_OR_PATTERNS 2020-01-07 18:48:16 +01:00
ThibsG
58deaad42d Handle case for non-exhaustive enums 2020-01-07 18:48:16 +01:00
ThibsG
d60c6f9398 Move to complexity and adapt test
- test wildcard_enum_match_arm has been impacted by this new lint
2020-01-07 18:48:16 +01:00
ThibsG
649af71f9e Change group and use only func call 2020-01-07 18:48:16 +01:00
ThibsG
8ec32175fa Remove useless parameters in func call 2020-01-07 18:48:16 +01:00
ThibsG
96c4198832 New lint: pats_with_wild_match_arm
- Wildcard use with other pattern in same match arm
2020-01-07 18:48:16 +01:00
bors
c092068996 Auto merge of #5000 - JohnTitor:backticks, r=flip1995
Normalize lint messages

On rustc diagnostics, we prefer to use backticks over `'`,  `"`, or something else. I think we should follow their manner here.
In first commit, normalizes lint messages with backticks.
In second commit, updates all stderrs.
In third commit, updates descriptions on lintlist.

changelog: none
2020-01-07 11:52:23 +00:00
Yuki Okushi
abc49c3139 Bless 32bit test 2020-01-07 19:56:21 +09:00
Yuki Okushi
f7a93f029c Apply suggestion from code review 2020-01-07 18:38:12 +09:00
Yuki Okushi
cd201f526f Update lintlist 2020-01-07 18:38:12 +09:00
Yuki Okushi
07e33633a3 Update stderrs 2020-01-07 18:38:12 +09:00
Yuki Okushi
5ac08b0cc9 Normalize lint messages 2020-01-07 18:26:55 +09:00
bors
fdccfe7bca Auto merge of #5011 - JohnTitor:split-collapsible-if, r=flip1995
Split up `collapsible_if` ui test

Part of #2038

changelog: none
2020-01-07 08:45:14 +00:00
bors
cdd134764a Auto merge of #5010 - lzutao:recurse-remove_blocks, r=phansch
Make utils::remove_blocks non-recursive

changelog: none
2020-01-07 07:46:00 +00:00
bors
79509bed5d Auto merge of #5002 - lzutao:fmt-fallout, r=flip1995
build: Use rustfmt from lastest nightly that contains it

changelog: none
2020-01-07 07:10:58 +00:00
bors
a86301fbfc Auto merge of #4999 - krishna-veerareddy:issue-4679-atomic-ordering, r=phansch
Add lint to detect usage of invalid atomic ordering

Detect usage of invalid atomic ordering modes such as `Ordering::{Release, AcqRel}` in atomic loads and `Ordering::{Acquire, AcqRel}` in atomic stores.

Fixes #4679

changelog: Add lint [`invalid_atomic_ordering`]
2020-01-07 06:32:15 +00:00
Yuki Okushi
175c78bc17 Split up collapsible_if ui test 2020-01-07 15:06:23 +09:00
bors
6271f56169 Auto merge of #5009 - lzutao:travis-windows-msvc, r=phansch
Travis: Use windows-msvc target for Windows build

changelog: none
closes #5005
2020-01-07 06:03:28 +00:00
Lzu Tao
3801d216e2 Make utils::remove_blocks non-recursive 2020-01-07 10:50:35 +07:00
Lzu Tao
a2b3b5a7b7 Travis: Use windows-msvc target for Windows build 2020-01-07 10:13:33 +07:00
Krishna Sai Veera Reddy
fe21ef4e8b Prevent doc-tests from running and fix lint description 2020-01-06 17:33:28 -08:00
Krishna Sai Veera Reddy
18060eb81e Split test cases into separate files 2020-01-06 16:39:31 -08:00
Krishna Sai Veera Reddy
9e6a6069a7 Add lint to detect usage of invalid atomic ordering
Detect usage of invalid atomic ordering modes such as
`Ordering::{Release, AcqRel}` in atomic loads and
`Ordering::{Acquire, AcqRel}` in atomic stores.
2020-01-06 16:39:31 -08:00
bors
62ff63917c Auto merge of #5008 - JohnTitor:let-on-macros, r=flip1995
Do not trigger `let_and_return` lint on macros

Fixes #4997

changelog: Fix false positive in `let_and_return`
2020-01-06 22:48:22 +00:00
Yuki Okushi
2213989a01 Do not trigger let_and_return lint on macros 2020-01-07 05:26:20 +09:00
Lzu Tao
abd76076b0 build: Use rustfmt from lastest nightly that contains it 2020-01-07 01:51:49 +07:00
bors
e8642c7a29 Auto merge of #5003 - JohnTitor:rustup, r=flip1995
Rustup to rust-lang/rust#67886

changelog: none
2020-01-06 18:15:48 +00:00
Yuki Okushi
65d15340cd Fix test again 2020-01-07 02:04:10 +09:00
Yuki Okushi
ce36335cf0 Pick up lost property 2020-01-07 01:54:51 +09:00
Yuki Okushi
2f2eaf8b7e Rustup to rust-lang/rust#67886 2020-01-07 01:46:33 +09:00
bors
390eacff80 Auto merge of #4998 - JohnTitor:revive-rls, r=llogiq
Re-enable rls integration test

It seems rls integration test passes correctly: https://travis-ci.com/rust-lang/rust-clippy/builds/143133541

changelog: none
2020-01-05 19:32:20 +00:00
Yuki Okushi
fe919b4231 Fix space size 2020-01-06 03:16:19 +09:00
Yuki Okushi
2ebcf28b32 Re-enable rls integration test 2020-01-06 01:22:01 +09:00