Michael Wright
2d244d3358
literal representation restructure 4
...
Simplify `grouping_hint` by splitting digits into parts and handling
one at a time.
Fixes #4762
2019-11-13 08:27:19 +02:00
Andy Russell
add766493a
don't warn on CRLF in with_newline
lints
2019-11-12 08:50:22 -05:00
bors
2646b108d5
Auto merge of #4803 - tomprogrammer:issue-4732, r=phansch
...
Fix false positive in explicit_counter_loop lint
When the counter was used in a closure after the loop the lint didn't detect the
usage of the counter correctly.
changelog: Fix false positive in `explicit_counter_loop`
Fixes #4732
2019-11-11 19:24:20 +00:00
Manish Goregaokar
e9a3e54910
MutImmutable -> Immutable, MutMutable -> Mutable, CaptureClause -> CaptureBy
2019-11-11 10:58:39 -08:00
bors
79d3b30cd7
Auto merge of #4801 - mikerite:to_digit_is_some, r=flip1995
...
To digit is some
Add a lint that recommends replacing `to_digit().is_some()` with `is_digit()` on `char`s
changelog: Add lint `to_digit_is_some`
2019-11-11 11:28:27 +00:00
Thomas Bahn
c88afce6fc
Fix false positive in explicit_counter_loop lint
...
When the counter was used in a closure after the loop the lint didn't detect the
usage of the counter correctly.
2019-11-11 11:36:53 +01:00
bors
338f5e6801
Auto merge of #4780 - flip1995:ice_4775, r=phansch
...
Fix ICE #4775
Fixes #4775
changelog: Fix ICE with const_generics
2019-11-11 06:23:27 +00:00
Michael Wright
5817a4fa06
Add to_digit_is_some
lint
2019-11-10 15:52:59 +02:00
Michael Wright
cc6e27fa71
Put ice test auxiliary fix in right place
2019-11-08 07:18:12 +02:00
Michael Wright
9c48a2c39a
Merge branch 'master' into fix-4727
2019-11-08 07:15:16 +02:00
bors
4be144af87
Auto merge of #4697 - Licenser:no-exit, r=flip1995
...
restriction lint for `std::process::exit`
Addition to #4655 - adds the lint checking for `std::process::exit`
changelog: add restriction lint for `std::process::exit`
2019-11-07 22:05:51 +00:00
Manish Goregaokar
4721f4419b
Remove clippy dependency in lint_without_lint_pass
2019-11-07 12:53:36 -08:00
Manish Goregaokar
fe90b82951
Remove clippy_lints from useless attribute test
2019-11-07 12:53:36 -08:00
Heinz N. Gies
5e6017d193
Update tests for exit
2019-11-07 17:11:06 +01:00
Heinz N. Gies
ffcf4bec0f
Improve function checking
2019-11-07 17:10:18 +01:00
Heinz N. Gies
9471669e46
Exclude main from exit lint
2019-11-07 17:10:18 +01:00
Heinz N. Gies
695aa59c6d
Add lint for exit
2019-11-07 17:10:18 +01:00
flip1995
08fd397c2c
Deprecate into_iter_on_array
lint
...
This lint was uplifted/reimplemented by rustc.
Rustup to rust-lang/rust#66017
2019-11-07 14:04:29 +01:00
Michael Wright
e3c1aea157
use-self: correctly ignore dummy paths
2019-11-07 05:59:13 +02:00
Lzu Tao
fdc0153ef5
rustup improper_ctypes: extern "C"
fns
2019-11-07 00:49:33 +07:00
flip1995
073dbd4218
Add regression test for ICE #4775
2019-11-06 18:15:04 +01:00
bors
0be213bb79
Auto merge of #4772 - HMPerson1:tastier_ice_cream, r=flip1995
...
Use correct TypeckTables when hashing bodies
Fixes #4760
changelog: Fix ICE while hashing block expressions #4760
r? @phansch
2019-11-06 15:50:42 +00:00
Lzu Tao
a902e3fd71
rustup https://github.com/rust-lang/rust/pull/66014
2019-11-06 06:24:47 +00:00
Michael Wright
a952708b6c
Fix crash in use-self
lint
...
Fixes #4727
2019-11-06 07:33:56 +02:00
HMPerson1
e3d6069e18
Use correct TypeckTables when hashing bodies
2019-11-04 20:03:03 -05:00
Philipp Hansch
05aac0d8c1
UI test cleanup: Extract derive_hash_xor_eq tests
2019-10-28 07:34:29 +01:00
flip1995
4a52dd6c53
Rustup to rust-lang/rust#65773
2019-10-26 21:54:04 +02:00
bors
bfef48f185
Auto merge of #4721 - phansch:fix_try_err_in_ext_macro, r=flip1995
...
Don't emit try_err lint in external macros
changelog: Fix [`try_err`] false positive in external macros
Closes #4709
2019-10-24 17:53:42 +00:00
flip1995
562cc63b7e
Fix lint_without_lint_pass lint
2019-10-24 13:54:18 +02:00
flip1995
237e168b89
Fix tests
2019-10-24 13:29:51 +02:00
Philipp Hansch
52f52900a4
Don't emit try_err lint in external macros
2019-10-24 07:52:01 +02:00
bors
87536f00e3
Auto merge of #4675 - lzutao:improve-shellscript, r=phansch
...
build: improve script and travis config
* fix a diff failure on windows
See https://travis-ci.com/rust-lang/rust-clippy/jobs/245971932#L1625
for an example.
* use cmp instead of diff > /dev/null
* clone single branch instead of clone then checking out
* do not decrypt key if have no diff change
changelog: none
2019-10-24 05:20:45 +00:00
bors
850dfdae60
Auto merge of #4680 - hellow554:debug_assert_mut_call, r=flip1995
...
Add lint for debug_assert_with_mut_call
closes #1526
**What does not work:**
* detecting a mut call in the format string itself, e.g. `debug_assert!(false, "{}", vec![1].pop())`
* detecting `*mut T` usage (pointer)
---
changelog: add new lint `debug_assert_with_mut_call`
2019-10-23 20:58:14 +00:00
bors
087e5eaea5
Auto merge of #4691 - HMPerson1:suggest_iter, r=phansch
...
Fix suggestion of `explicit_counter_loop`
changelog: In the suggestion of `explicit_counter_loop`, if the `for` loop argument doesn't implement `Iterator`, then we suggest `x.into_iter().enumerate()` (or `x.iter{_mut}()` as appropriate). Also, the span of the suggestion has been corrected.
Fixes #4678
2019-10-23 20:12:14 +00:00
Marcel Hellwig
5572476a36
Add lint for debug_assert_with_mut_call
...
This lint will complain when you put a mutable function/method call
inside a `debug_assert` macro, because it will not be executed in
release mode, therefore it will change the execution flow, which is not
wanted.
2019-10-22 10:39:55 +02:00
Lzu Tao
b869eeb2a4
build: improve script and travis config
...
* fix a diff failure on windows
See https://travis-ci.com/rust-lang/rust-clippy/jobs/245971932#L1625
for an example.
* use cmp instead of diff > /dev/null
* clone single branch instead of clone then checking out
* do not decrypt key if have no diff change
2019-10-22 10:14:39 +07:00
HMPerson1
a9cb2b9001
Fix suggestion for ranges
2019-10-18 12:11:15 -04:00
Andre Bogus
d723b35aee
Omit proc macros from must_use_candidate
2019-10-18 15:54:25 +02:00
Heinz N. Gies
7f454d8d06
Split out tests
2019-10-18 07:40:48 +02:00
Heinz N. Gies
a7ad78f3eb
Add expect
...
Co-Authored-By: Philipp Krones <hello@philkrones.com>
2019-10-18 07:37:58 +02:00
Heinz N. Gies
98dc3aabea
Add todo and tests
2019-10-18 07:37:58 +02:00
Heinz Gies
8d911fe988
add restirction for unreachable and panic
2019-10-18 07:35:25 +02:00
HMPerson1
4578e5e15e
Fix suggestion span in explicit_counter_loop
2019-10-18 01:15:54 -04:00
HMPerson1
72f3439346
Suggest calling iter
if needed in explicit_counter_loop
2019-10-18 00:03:27 -04:00
Michael Zhang
2106a23966
Update help text in inefficient_to_string
...
Co-Authored-By: Manish Goregaokar <manishsmail@gmail.com>
2019-10-17 19:13:32 -04:00
HMPerson1
ffb53e7457
Add run-rustfix
to inefficient_to_string
2019-10-17 12:41:45 -04:00
HMPerson1
76b44f34b9
Add inefficient_to_string
lint
2019-10-16 15:54:20 -04:00
flip1995
2d6adb9424
Add regression test for ICE in use-self lint
2019-10-15 15:02:09 +02:00
James Wang
adf58868e9
Change terminology from static to associated
2019-10-15 09:58:12 +02:00
James Wang
e23a424b31
Change lint to be pedantic
2019-10-15 09:58:11 +02:00