Yuki Okushi
73e525019d
Fix the ordering on nonminimal_bool
2020-01-14 07:08:45 +09:00
Yuki Okushi
ce1c6b285d
Rustup to rust-lang/rust#68045
2020-01-13 21:55:57 +09:00
Yuki Okushi
11fb749a96
Comment out half-open patterns' tests
2020-01-12 03:05:47 +09:00
Yuki Okushi
39947992b5
Rustup to rust-lang/rust#67806
2020-01-11 21:50:00 +09:00
Yuki Okushi
10cf141ebb
Apply review comments
2020-01-11 19:39:43 +09:00
Yuki Okushi
77e5a1b227
Split up missing-doc
ui test
2020-01-10 04:35:37 +09:00
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
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
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
Yuki Okushi
787106c380
Normalize lint messages in cast_precision_loss
2020-01-08 16:36:02 +09:00
Shotaro Yamada
99eec3f54f
Fix redundant_clone
2020-01-08 14:18:00 +09: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
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
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
07e33633a3
Update stderrs
2020-01-07 18:38:12 +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
Yuki Okushi
175c78bc17
Split up collapsible_if
ui test
2020-01-07 15:06:23 +09: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
Yuki Okushi
2213989a01
Do not trigger let_and_return
lint on macros
2020-01-07 05:26:20 +09: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
Andre Bogus
539cd25262
External macro check for missing_*_doc
2020-01-04 20:19:14 +01:00
Brad Sherman
ab5ff0352e
Add lint for iter.nth(0)
...
- Encourage iter.next() rather than iter.nth(0), which is less readable
2020-01-04 11:20:11 -06:00
Philipp Hansch
c5178e82b4
Rustup to https://github.com/rust-lang/rust/pull/67853
...
Specifically caused by https://github.com/rust-lang/rust/pull/67786
2020-01-04 11:30:03 +01:00
bors
fa9b85d4df
Auto merge of #4881 - krishna-veerareddy:issue-4871-use-mem-take, r=flip1995
...
Use `mem::take` instead of `mem::replace` when applicable
`std::mem::take` can be used to replace a value of type `T` with `T::default()` instead of `std::mem::replace`.
Fixes issue #4871
changelog: Added lint for [`mem_replace_with_default`]
2020-01-04 08:09:43 +00:00
Andre Bogus
47972cdf12
No #[no_mangle] must_use_candidate functions
2020-01-03 17:21:36 +01:00
bors
2e8c3c3e9e
Auto merge of #4975 - JohnTitor:fix-4968, r=phansch
...
Fix ICE on `unsound_collection_transmute`
Fixes #4968
Check if `Ty`s are normalizable. It might show hidden false negative, I'm not sure.
Also, the regression tests are placed on two dirs, so move them to `/crashes`. I think it will be easier to find the right place.
changelog: Fix ICE on `unsound_collection_transmute`
2020-01-03 08:48:05 +00:00
Yuki Okushi
c6aeda7bd5
Move use_self_macro
into crashes/auxiliary
2020-01-03 17:03:07 +09:00
bors
304edf39c3
Auto merge of #4978 - mikerite:fix-4958, r=phansch
...
Fix bad `explicit_into_iter_loop` suggestion
Fixes #4958
changelog: Fix bad `explicit_into_iter_loop` suggestion
2020-01-03 05:59:19 +00:00
Krishna Veera Reddy
8b36196cb6
Add if let
test case
2020-01-01 23:22:57 -08:00
Yuki Okushi
20318e00ef
Add attribute
2020-01-02 09:32:55 +09:00
Michael Wright
ea829bd8c6
Fix bad explicit_into_iter_loop
suggestion
...
Fixes #4958
2020-01-01 07:09:09 +02:00
Krishna Veera Reddy
84a60c3186
Prevent replace_consts
lint within match patterns
...
Currently `replace_consts` lint applies within match patterns but
the suggestion is incorrect as function calls are disallowed in
them. To fix this we prevent the lint from firing within patterns.
2019-12-31 10:33:15 -08:00
Krishna Veera Reddy
a8413a32b3
Remove unnecessary import
2019-12-31 09:22:35 -08:00
Krishna Veera Reddy
c09e79e226
Lint within internal macros without a suggestion
2019-12-31 09:22:35 -08:00
Krishna Veera Reddy
26812f733d
Prevent mem_replace_with_default
lint within macros
...
Also added test cases for internal and external macros.
2019-12-31 09:22:34 -08:00
Krishna Veera Reddy
2a75241c1a
Add test cases for replace with Default::default()
2019-12-31 09:22:34 -08:00
Krishna Veera Reddy
8db319f957
Use mem::take
instead of mem::replace
when applicable
...
`std::mem::take` can be used to replace a value of type `T`
with `T::default()` instead of `std::mem::replace`.
2019-12-31 09:22:34 -08:00
Yuki Okushi
de6fe1071b
Rename test prefix
2019-12-31 20:55:12 +09:00
Yuki Okushi
50a8582980
Move ICE tests to /crashes
2019-12-31 20:55:12 +09:00
Yuki Okushi
12a3d72462
Add regression test for #4968
2019-12-31 20:55:12 +09:00
bors
cecaca3382
Auto merge of #4634 - m-ober:feature/2320-map-or, r=llogiq
...
Add real suggestion to option_map_unwrap_or
changelog: Add real suggestion to `option_map_unwrap_or`
Fixes #2320
2019-12-30 15:50:06 +00:00
Micha Ober
c5046fdce5
Add real suggestion to option_map_unwrap_or
2019-12-28 23:24:45 +01:00