Camille GILLOT
31c84e5077
Fix clippy.
2020-05-08 13:57:01 +02:00
Matthias Krüger
bdc9528e7c
rustup https://github.com/rust-lang/rust/pull/71292/
2020-04-28 15:05:56 +02:00
csmoe
305177d9cc
rustup: rust-lang/rust#71628
2020-04-27 22:40:56 +08: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
Philipp Krones
a33d64a4c3
Rollup merge of #5505 - flip1995:avoid_running_lints, r=matthiaskrgr
...
Avoid running cargo+internal lints when not enabled
r? @matthiaskrgr
changelog: none
2020-04-25 21:06:27 +02:00
Matthias Krüger
f9c1acbc45
rustup https://github.com/rust-lang/rust/pull/71215/
2020-04-24 15:29:31 +02:00
flip1995
f31502f4bb
Only run (late) internal lints, when they are warn/deny/forbid
2020-04-22 20:51:58 +02:00
flip1995
14f596cb74
Only run cargo lints, when they are warn/deny/forbid
2020-04-22 20:32:37 +02:00
Andy Weiss
2dc8c083f5
Switch to matching against full paths instead of just the last element of the path
2020-04-21 21:07:43 -07:00
Eduardo Broto
00b4f2819f
Implement unsafe_derive_deserialize lint
2020-04-19 23:26:17 +02:00
Philipp Krones
98a244fc27
Formatting and naming
2020-04-19 20:40:25 +02:00
Philipp Krones
41115d994a
Formatting and naming
2020-04-19 20:38:07 +02:00
xiongmao86
d7f1a1ed2b
Change note_span argument for span_lint_and_note.
2020-04-18 18:29:36 +08:00
xiongmao86
cf4e35339b
Add an Option<Span> argument to span_lint_and_help.
2020-04-18 18:28:29 +08:00
xiongmao86
bdd32e7700
Implement collapsible_span_lint_calls lint.
2020-04-18 18:13:50 +08:00
Philipp Hansch
870ae36f85
Cleanup: Rename 'db' variable to 'diag'
2020-04-17 08:08:00 +02:00
Philipp Krones
19183a6af5
Rollup merge of #5468 - Toxyxer:zero-single-char-names, r=flip1995
...
Zero single char names
Fixes : #4086
changelog:
- Make the inequality strict
2020-04-15 20:12:31 +02:00
Philipp Krones
ceea3c6a35
Rollup merge of #5248 - ThibsG:ConstValues, r=flip1995
...
Add lint on large non scalar const
This PR adds the new lint `non_scalar_const` that aims to warn against `const` declaration of large arrays. For performance, because of inlining, large arrays should be preferably declared as `static`.
Note: i made this one to warn on all const arrays, whether they are in a body function or not. I don't know if this is really necessary, i could just reduce this lint to variables out of function scope.
Fixes : #400
changelog: add new lint for large non-scalar types declared as const
2020-04-15 20:12:28 +02:00
Philipp Krones
a353f0f174
Rename dummy_hir_id -> parent_hir_id
2020-04-15 19:46:05 +02:00
Matthias Krüger
721549569c
rustup https://github.com/rust-lang/rust/pull/71116
2020-04-15 18:58:44 +02:00
Marcin Serwin
ce372c17cd
Change default many single char names threshold
2020-04-15 17:58:26 +02:00
bors
c6cc07a851
Auto merge of #5452 - phansch:match_def_path_refactor, r=matthiaskrgr
...
Refactor: Use rustc's `match_def_path`
This replaces our match_def_path implementation with the rustc one.
Note that we can't just use it in all call sites because of the
`&[&str]` / `&[Symbol]` difference in Clippy/rustc.
changelog: none
2020-04-15 05:42:52 +00:00
Philipp Hansch
9ec95af702
Refactor: Use rustc's match_def_path
...
This replaces our match_def_path implementation with the rustc one.
Note that we can't just use it in all call sites because of the
`&[&str]` / `&[Symbol]` difference in Clippy/rustc.
2020-04-15 07:23:13 +02:00
bors
81b3e7096b
Auto merge of #5449 - phansch:diagnostic-items, r=matthiaskrgr
...
Make use of more diagnostic items
This makes use of some (not all) already existing diagnostic items. Specifically:
* 79982a2
: `core::mem::uninitialized`, `core::mem::zeroed`, `alloc::sync::Arc`, `alloc::sync::Rc`
* 83874d0
: `Option` and `Result`
cc #5393
changelog: none
2020-04-14 19:58:17 +00:00
Philipp Hansch
e47db677ac
Cleanup: Use rustc's is_proc_macro_attr
...
It's doing exactly the same: https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_ast/expand/mod.rs.html#8-12
2020-04-13 09:33:00 +02:00
Philipp Hansch
79982a2813
Make use of some existing diagnostic items
2020-04-12 13:58:04 +02:00
Philipp Hansch
1d1b6d886b
Say that diagnostic items are preferred over paths
2020-04-12 13:58:04 +02:00
Matthias Krüger
f7bdead5ec
rustup https://github.com/rust-lang/rust/pull/69745
2020-04-11 01:51:25 +02:00
ThibsG
629cc4ada3
Update doc generation script
2020-04-09 09:17:41 +02:00
Linus Färnstrand
51bb1d28c5
Use assoc const NAN for zero_div_zero lint
2020-04-08 00:43:27 +02:00
flip1995
98aa5938c4
Rustup to rust-lang/rust#70634
2020-04-02 22:29:41 +02:00
Jacek Pospychala
f8e892db5e
useless Rc<Rc<T>>, Rc<Box<T>>, Rc<&T>, Box<&T>
2020-04-02 00:02:25 +02:00
flip1995
7d58ba20b4
Rustup to rust-lang/rust#70632
2020-04-01 20:14:05 +02:00
Tomasz Miąsko
b77b219280
Lint unnamed address comparisons
2020-03-30 21:42:16 +02:00
Matthias Krüger
aff57e0f43
rustup https://github.com/rust-lang/rust/pull/70536
2020-03-30 11:17:58 +02:00
Matthias Krüger
0982097e4d
remove redundant import
2020-03-27 20:47:34 +01:00
Matthias Krüger
48da6e926c
rustup https://github.com/rust-lang/rust/pull/68404
2020-03-27 20:41:53 +01:00
Matthias Krüger
8177e49e10
rustup https://github.com/rust-lang/rust/pull/70344
2020-03-27 20:41:35 +01:00
Philipp Hansch
cec1e8f74e
Remove dependency on matches
crate
...
The std equivalent works exactly the same.
2020-03-25 07:50:08 +01:00
bors
d3989eef2d
Auto merge of #5319 - 1tgr:master, r=flip1995
...
Lint for `pub(crate)` items that are not crate visible due to the visibility of the module that contains them
changelog: Add `redundant_pub_crate` lint
Closes #5274 .
2020-03-23 20:35:49 +00:00
Tim Robinson
870b9e8139
nursery group -> style
2020-03-23 16:45:31 +00:00
Philipp Krones
606e3285b2
Rollup merge of #5341 - flip1995:rustup, r=flip1995
...
Rustup to rust-lang/rust#66131
changelog: none
2020-03-19 15:00:32 +01:00
flip1995
21aeb21b8a
Rustup to rust-lang/rust#66131
2020-03-19 14:33:10 +01:00
Matthias Krüger
b9d6bf3bfb
rustup https://github.com/rust-lang/rust/pull/69920/
2020-03-19 09:14:53 +01:00
Matthias Krüger
a97f60b8e3
rustup https://github.com/rust-lang/rust/pull/69738
2020-03-16 18:38:30 +01:00
bors
24f6d643fe
Auto merge of #5322 - phansch:or_patterns, r=matthiaskrgr
...
Make use of `or_patterns` feature
changelog: none
2020-03-16 12:41:04 +00:00
Matthias Krüger
ba0884bee3
rustup https://github.com/rust-lang/rust/pull/68944
2020-03-16 11:36:17 +01:00
Philipp Hansch
548c417ec4
Make use of or_patterns
feature
2020-03-16 07:25:09 +01:00
Matthias Krüger
4d8ed5a842
rustup https://github.com/rust-lang/rust/pull/69589/
2020-03-15 18:23:43 +01:00
Yuki Okushi
00861d100d
Rustup to rust-lang/rust#69076
2020-03-15 05:26:32 +09:00