bors
1831385ff0
Auto merge of #5611 - rrbutani:master, r=flip1995
...
Add to the list of words clippy::doc_markdown ignores
"TypeScript" is the only one of these I actually ran into organically; I can remove the others if they're too much.
changelog: Add to the list of words `clippy::doc_markdown` ignores
2020-05-20 14:15:12 +00:00
bors
cafa94662c
Auto merge of #5582 - vtmargaryan:match_wildcard_for_single_variants, r=flip1995
...
New lint: `match_wildcard_for_single_variants`
changelog: Added a new lint match_wildcard_for_single_variants to warn on enum matches where a wildcard is used to match a single variant
Closes #5556
2020-05-20 12:51:28 +00:00
flip1995
f28f1f15da
Fix dogfood fallout
2020-05-20 13:32:53 +02:00
Amanieu d'Antras
d25b25610b
Handle InlineAsm in clippy
2020-05-18 14:41:33 +01:00
Rahul Butani
1b3dc5f79b
Add to the list of words clippy::doc_markdown ignores
2020-05-17 22:21:02 -05:00
flip1995
f1d3086492
Merge commit 'e214ea82ad0a751563acf67e1cd9279cf302db3a' into clippyup
2020-05-17 17:36:26 +02:00
bors
6ae0643d1a
Auto merge of #5529 - alex-700:improve-option-and-then-some-lint, r=phansch
...
Improve `option_and_then_some` lint
fixed #5492
changelog: Improve and generalize `option_and_then_some` and rename it to `bind_instead_of_map`.
2020-05-17 10:58:56 +00:00
flip1995
cb0d40a7ec
Merge remote-tracking branch 'upstream/master' into rustup
2020-05-17 01:13:02 +02:00
Aleksei Latyshev
cb7f9679a6
simplify multispan_sugg interface
...
- add `multispan_sugg_with_applicability`
- not it gets `&str` instead of `String`, like in `diag.multispan_suggestion`
2020-05-17 00:09:37 +03:00
Dylan DPC
b0490cc80d
Rollup merge of #71948 - csmoe:issue-61076, r=oli-obk
...
Suggest to await future before ? operator
Closes https://github.com/rust-lang/rust/issues/71811
cc #61076
2020-05-16 02:37:21 +02:00
Vardan Margaryan
2620d2449d
Fix check for missing enum variants from match expressions
...
TupleStruct matches are checked for exhaustiveness
2020-05-16 00:06:52 +03:00
Vardan Margaryan
10313a2631
Revert "Fix cases of match_wildcard_for_single_variants lint when it is spanned on Option"
...
This reverts commit 4948307977
.
2020-05-15 22:33:37 +03:00
csmoe
0a86335cd4
implement type_implments_trait query
2020-05-15 15:37:11 +08:00
Vardan Margaryan
4948307977
Fix cases of match_wildcard_for_single_variants lint when it is spanned on Option
2020-05-14 22:36:46 +03:00
flip1995
505280b108
Run cargo dev fmt
2020-05-11 21:31:01 +02:00
Camille GILLOT
8ab3224b3b
Fix clippy.
2020-05-11 21:26:39 +02:00
flip1995
d13d8987b0
Merge commit '43a1777b89cf6791f9e20878b4e5e3ae907867a5' into clippyup
2020-05-11 20:23:47 +02:00
Glenn Hope
ad92486d52
Add check for "test" in parent name. Include flag for disabling wildcard import exceptions
2020-05-09 11:09:38 -07:00
Camille GILLOT
31c84e5077
Fix clippy.
2020-05-08 13:57:01 +02:00
Eduardo Broto
3e4bc026e2
Apply suggestions from PR review
2020-05-07 22:40:28 +02:00
Eduardo Broto
3b58d66b22
Add the manual_async_fn lint
2020-05-07 21:42:40 +02:00
bors
76ddac5e8e
Auto merge of #5560 - CrazyRoka:fix-match-on-vector-full-range, r=phansch,flip1995
...
Fix match on vec items: match on vec[..]
- Added new tests
- Fixed false positive when matching on full range, which will never panic
Closes #5551
changelog: fix match_on_vec_items when matching full range
2020-05-02 16:13:02 +00:00
CrazyRoka
de58c5644d
Changed RANGE_FULL constant in utils
2020-05-02 17:37:03 +03:00
Aleksei Latyshev
d0c1f8ada2
fix fp on while-let-on-iterator
...
- fix `is_refutable` for slice patterns
- fix `is_refutable` for bindings
- add some TODO-s for cases, which can not be fixed easily
2020-05-02 14:21:29 +03: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