Commit graph

3130 commits

Author SHA1 Message Date
Michael Wright
5817a4fa06 Add to_digit_is_some lint 2019-11-10 15:52:59 +02:00
Manish Goregaokar
3ef852b74c Rustup to rustc 1.40.0-nightly (ac162c6ab 2019-11-09) 2019-11-09 17:04:42 -08:00
bors
b0b3dc6e76 Auto merge of #4776 - mikerite:fix-4727, r=flip1995
Fix crash in `use-self` lint

Fixes #4727

changelog: Fix crash in `use-self` lint
2019-11-08 22:06:21 +00:00
HMPerson1
94b36d9ca4
dogfood 2019-11-08 15:41:54 -05:00
HMPerson1
d4758420e6
Rustup rust-lang/rust#66188 2019-11-08 15:12:08 -05:00
Michael Wright
9c48a2c39a Merge branch 'master' into fix-4727 2019-11-08 07:15:16 +02:00
Lzu Tao
ff5bf67b94 remove unused warnings 2019-11-08 10:23:42 +07:00
Lzu Tao
acbe224f6a rustup https://github.com/rust-lang/rust/pull/65916 2019-11-08 10:23:42 +07: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
bors
426c05ae33 Auto merge of #4758 - mikerite:dec_lit_20191031, r=flip1995
`DecimalLiteralRepresentation` simplification

Remove recalculation of literal value.

changelog: none
2019-11-07 21:06:18 +00:00
bors
842cfb0311 Auto merge of #4757 - evanjs:issue/4748, r=phansch
Fix Deprecated lints don't expand

### Move doc comments inside of declare_deprecated_lint macros so that they are picked up by lintlib.py

### fixes #4748

Unable to `cargo test` locally (I'm on NixOS, and keep getting errors that are similar to those #4714 might solve) but I have verified that all deprecated lints can now be expanded like other lints.

![2019-10-30_21:06:28](https://user-images.githubusercontent.com/1847524/67910501-5815de00-fb59-11e9-9fa2-91fe6a8b9bb9.png)

changelog: Show deprecated lints in lint documentation again
2019-11-07 20:47:14 +00:00
Heinz N. Gies
abdf027df3 Update clippy_lints/src/lib.rs
Co-Authored-By: Philipp Krones <hello@philkrones.com>
2019-11-07 17:11:06 +01:00
Heinz N. Gies
a984702b50 Update clippy_lints/src/lib.rs
Co-Authored-By: Philipp Krones <hello@philkrones.com>
2019-11-07 17:11:05 +01:00
Heinz N. Gies
eae6a62db7 Simplify dentry point detection 2019-11-07 17:11:05 +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
60c2fdd0b9 Update lints 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
flip1995
e917b01286
Rustup to rust-lang/rust#65884 2019-11-07 13:27:00 +01:00
Manish Goregaokar
305ba73fc1
Rustup to rustc 1.40.0-nightly (7a76fe76f 2019-11-07) 2019-11-07 13:14:40 +01:00
Michael Wright
e3c1aea157 use-self: correctly ignore dummy paths 2019-11-07 05:59:13 +02: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
42c8c03464 bump smallvec to 1.0.0 2019-11-06 17:46:45 +07:00
Lzu Tao
56f3ba33c5 chore: sort out clippy_lints deps 2019-11-06 17:46:45 +07:00
Lzu Tao
51632530d7 rustup rust-lang/rust#65776 2019-11-06 17:46:45 +07:00
Michael Wright
a952708b6c Fix crash in use-self lint
Fixes #4727
2019-11-06 07:33:56 +02:00
Lzu Tao
98313bd83a chore: remove unnecessary parentheses around type 2019-11-05 22:05:55 +07:00
HMPerson1
e3d6069e18
Use correct TypeckTables when hashing bodies 2019-11-04 20:03:03 -05:00
Evan Stoll
8ca9c237a0 deprecated_lints: re-fix ASSIGN_OPS lint doc-comment 2019-11-02 14:19:25 -04:00
Evan Stoll
9a2c968f9f deprecated_lints: align doc comment indents with pub LINT_NAME 2019-11-02 14:11:25 -04:00
Evan Stoll
1acea2e4fc deprecated_lints: remove extraneous declare_deprecated_lint 2019-11-02 14:11:13 -04:00
Michael Wright
4e78547e6f DecimalLiteralRepresentation simplification
Remove recalculation of literal value.
2019-10-31 09:13:08 +02:00
Evan Stoll
94e35510ae Fix #4748 - Deprecated lints don't expand
- Move doc comments inside of declare_deprecated_lint macros so that they are picked up by lintlib.py
2019-10-30 21:05:23 -04:00
Michael Wright
5ce8990885 Simplify approx const truncation check 2019-10-29 08:34:05 +02:00
Matthias Krüger
ece5f862c4 rustup https://github.com/rust-lang/rust/pull/65792/ 2019-10-28 15:15:28 +01:00
flip1995
1e1d45a005
Move manual_mul_add into nursery 2019-10-26 19:57:01 +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
b2616641d9
Fix dogfood findings 2019-10-24 14:39:19 +02: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
flip1995
ef02e3a755
Run ./util/dev fmt 2019-10-24 11:55:22 +02:00
flip1995
5f4b5b91d7
Rustup to rust-lang/rust#65657 2019-10-24 11:54:11 +02:00
Mark Rousskov
7e77f3c29f
Update clippy for latest rustc changes
Specifically, this revises the clippy integration to utilize a new
callback to register its lints, as the prior editing of lint store in
Session is no longer possible.
2019-10-24 11:40:45 +02:00
Philipp Hansch
52f52900a4
Don't emit try_err lint in external macros 2019-10-24 07:52:01 +02: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
Matthias Krüger
b5f73dad90 deps: update cargo_metadata from 0.8.0 to 0.9.0 2019-10-23 17:30:24 +02:00
flip1995
e8d5a9e95c
Use StableHasher in SpanlessHasher 2019-10-22 14:57:44 +02:00
flip1995
ef18ece564
Don't hash spans in SpanlessHasher 2019-10-22 11:17:16 +02:00