rail
461f4a3466
Add missing tests
2020-04-30 17:32:37 +12:00
bors
0a53ed2d8e
Auto merge of #5547 - CrazyRoka:fix-clone-double-ref-suggestion, r=flip1995
...
Fixed incorrect suggestion of `clone_double_ref` lint
- Added `<_>` to suggestion
- Changed help message
- Added new tests
Closes #5494
changelog: Improve suggestion of [`clone_double_ref`]
2020-04-29 20:05:18 +00:00
CrazyRoka
20c069beec
Fixed incorrect suggestion of clone_double_ref
lint
...
- Added `<_>` to suggestion
- Changed help message
2020-04-29 22:40:57 +03:00
bors
28197b6226
Auto merge of #5545 - flip1995:rustup, r=flip1995
...
Rustup to rust-lang/rust#71518
changelog: none
2020-04-29 13:59:30 +00:00
flip1995
cd3480991a
Rustup to rust-lang/rust#71518
2020-04-29 15:48:43 +02:00
bors
9a3b0a0588
Auto merge of #5543 - matthiaskrgr:rustup_45, r=flip1995
...
rustup https://github.com/rust-lang/rust/pull/71292/
cc https://github.com/rust-lang/rust/issues/71608
---
changelog: none
2020-04-28 18:30:01 +00:00
Matthias Krüger
bdc9528e7c
rustup https://github.com/rust-lang/rust/pull/71292/
2020-04-28 15:05:56 +02:00
Stanislav Tkach
1afb6e6e3b
Extend example for the unneeded_field_pattern
lint
...
Current example is incorrect (or pseudo-code) because a struct name is omitted. I have used the code from the tests instead. Perhaps this example can be made less verbose, but I think it is more convenient to see a "real" code as an example.
2020-04-28 12:08:38 +03:00
bors
2c4d566113
Auto merge of #5535 - ebroto:issue_5360, r=phansch
...
used_underscore_binding: do not lint on `await` desugaring
changelog: used_underscore_binding: do not lint on `await` desugaring
Fixes #5360
2020-04-28 05:36:30 +00:00
Eduardo Broto
fc5fc6378c
Test that we lint the awaited expression
2020-04-27 21:29:31 +02:00
Eduardo Broto
3a96f548d1
used_underscore_binding: do not lint on await
desugaring
2020-04-27 21:20:08 +02:00
bors
f2486b3d35
Auto merge of #5538 - csmoe:rustup, r=phansch
...
rustup: rust-lang/rust#71628
cc https://github.com/rust-lang/rust/issues/71608
changelog: none
2020-04-27 16:58:24 +00:00
csmoe
305177d9cc
rustup: rust-lang/rust#71628
2020-04-27 22:40:56 +08:00
rail
51585a1298
Removed unused lifetimes and a needless bool
2020-04-27 20:37:21 +12:00
rail
be9f7c2b6d
Merge branch 'master' into fix_manual_memcpy
2020-04-27 19:52:49 +12:00
rail
582614fbbe
Extract building the suggestion of manual_memcpy
2020-04-27 19:44:44 +12:00
rail
9fc6f37778
Delay getting the snippet from slices
2020-04-27 19:34:41 +12:00
rail
4f2617c059
Separate getting offsets and getting index expressions
2020-04-27 19:26:00 +12:00
rail
3d121d53af
Extract roles getting indexes from get_indexed_assignments
2020-04-27 19:15:51 +12:00
rail
aab80eedf3
Extract get_fixed_offset_var
from
fetch_cloned_fixed_offset_var`
2020-04-27 19:04:56 +12:00
rail
ecb472c052
Use fn
instead of closures where unnecessary
2020-04-27 19:02:08 +12:00
rail
3f1e51b3f4
Rename negate
to sign
and make it strong types then make art1
&str
2020-04-27 18:57:36 +12:00
rail
7dd0f3459f
Refactor if
to use else
and iterator combinators
2020-04-27 18:47:24 +12:00
rail
c94f0f49f8
Remove all ref
keyword
2020-04-27 18:22:10 +12:00
rail
75ad839cd2
Do not trigger manual_memcpy
for RangeTo
2020-04-27 18:04:37 +12:00
bors
d13ffbe3fe
Auto merge of #5522 - CrazyRoka:match_vec_item, r=phansch
...
New lint `match_vec_item`
Added new lint to warn a match on index item which can panic. It's always better to use `get(..)` instead.
Closes #5500
changelog: New lint `match_on_vec_items`
2020-04-27 06:02:05 +00:00
rail
37261a904c
Print 0 when end
and offset
is 0, and also simplify the suggestion
2020-04-27 17:51:01 +12:00
rail
ad9ad6f402
Don't negate resulted offsets when offset
is subtraction by 0
2020-04-27 17:42:57 +12:00
bors
5d8a3e8724
Auto merge of #5506 - ebroto:mismatched_target_os, r=flip1995
...
Implement mismatched_target_os lint
I've extended the check suggested in the issue to all the currently supported operating systems instead of limiting it to `linux` and `macos`, let me know if we want to do this.
Also, I've restored the text `There are over XXX lints ...` in the README as it was matched against by `cargo dev new_lint`.
changelog: Added `mismatched_target_os` lint to warn when an operating system is used in target family position in a #[cfg] attribute
Closes #3949
2020-04-27 02:29:49 +00:00
Eduardo Broto
303e7d1af8
Split tests in unix/non-unix
2020-04-26 21:27:29 +02:00
Eduardo Broto
4a405c9977
Remove some OSes from the test to comply with stderr line limit
2020-04-26 21:27:29 +02:00
Eduardo Broto
ce50e42ed6
Use the span of the attribute for the error message
2020-04-26 21:27:29 +02:00
Eduardo Broto
d24a106395
Apply suggestions from PR review
...
- Show just one error message with multiple suggestions in case of
using multiple times an OS in target family position
- Only suggest #[cfg(unix)] when the OS is in the Unix family
- Test all the operating systems
2020-04-26 21:27:29 +02:00
Eduardo Broto
149f6d6046
Implement mismatched_target_os lint
2020-04-26 21:27:29 +02:00
CrazyRoka
b574941dcb
Updated lint info in lib.rs
2020-04-26 18:11:21 +03:00
CrazyRoka
940c662654
Small lint update
...
- Changed lint category to `correctness`
- Moved main function to bottom in test file
- Added `FIXME` comment to `span_lint_and_sugg` to improve later
2020-04-26 18:00:51 +03:00
bors
87a6f3fc2c
Auto merge of #5534 - phansch:remove-util-dev, r=flip1995
...
Remove util/dev script
`cargo dev` has been the replacement for a while, so I think we can
remove it now.
cc #5394
changelog: none
2020-04-26 14:44:08 +00:00
bors
5c12f2b286
Auto merge of #5509 - phansch:more-diagnostic-items2, r=matthiaskrgr
...
Use more diagnostic items
In particular for:
* `VecDeque`
* `String`
* `Mutex`
* `HashMap`
* `HashSet`
cc rust-lang/rust#71414 #5393
---
changelog: none
2020-04-26 12:30:52 +00:00
Philipp Hansch
eda73fe707
Fix cargo crash
2020-04-26 14:11:58 +02:00
Philipp Hansch
8d596ea01c
Remove util/dev script
...
`cargo dev` has been the replacement for a while, so I think we can
remove it now.
cc #5394
2020-04-26 14:00:03 +02:00
Philipp Hansch
0a49935270
cargo dev fmt
2020-04-26 13:44:08 +02:00
Philipp Hansch
0480ff861a
More diagnostic items
...
In particular for:
* `VecDeque`
* `String`
* `Mutex`
* `HashMap`
* `HashSet`
cc https://github.com/rust-lang/rust/pull/71414 https://github.com/rust-lang/rust-clippy/issues/5393
2020-04-26 13:44:08 +02:00
bors
b7c802b5e3
Auto merge of #5533 - phansch:rustup001, r=matthiaskrgr
...
rustup to https://github.com/rust-lang/rust/pull/70043
changelog: none
2020-04-26 11:26:15 +00:00
Philipp Hansch
5b1622b324
rustup to https://github.com/rust-lang/rust/pull/70043
2020-04-26 10:12:14 +02:00
bors
07dd5fada9
Auto merge of #5511 - alex-700:fix-redundant-pattern-matching, r=flip1995
...
Fix redundant_pattern_matching lint
fixes #5504
changelog: Fix suggestion in `redundant_pattern_matching` for macros.
2020-04-25 21:41:56 +00:00
bors
44eb953adc
Auto merge of #5525 - flip1995:issue_1654, r=phansch
...
Don't trigger while_let_on_iterator when the iterator is recreated every iteration
r? @phansch
Fixes #1654
changelog: Fix false positive in [`while_let_on_iterator`]
2020-04-25 21:29:03 +00:00
bors
a76bfd46c5
Auto merge of #5530 - ebroto:issue_5524, r=flip1995
...
map_clone: avoid suggesting `copied()` for &mut
changelog: map_clone: avoid suggesting `copied()` for &mut
Fixes #5524
2020-04-25 21:16:06 +00:00
Eduardo Broto
806d973adc
map_clone: avoid suggesting copied()
for &mut
2020-04-25 22:52:19 +02:00
Aleksei Latyshev
69fe6b4c98
fix redundant_pattern_matching lint
...
- now it gives correct suggestion in case of macros
- better tests
- remove a couple of non-relevant tests
2020-04-25 23:51:30 +03:00
bors
77c23b7089
Auto merge of #5527 - flip1995:rollup-pr2htfd, r=flip1995
...
Rollup of 5 pull requests
Successful merges:
- #5408 (Downgrade match_bool to pedantic)
- #5505 (Avoid running cargo+internal lints when not enabled)
- #5516 (Add a note to the beta sections of release.md)
- #5517 (Deploy time travel)
- #5523 (Add lifetime test case for `new_ret_no_self`)
Failed merges:
r? @ghost
changelog: rollup
2020-04-25 19:38:04 +00:00