bors
5c1e30ab05
Auto merge of #4327 - phansch:doctests_perf, r=flip1995
...
Doctests: Enable running doc tests for perf lints
changelog: none
This should be possible to merge independently of #4325
cc #4319
2019-08-03 14:06:13 +00:00
Philipp Hansch
c0cdfd296e
Doctests: Enable running doc tests for perf lints
...
This should be possible to merge independently of #4325
cc #4319
2019-08-03 08:08:00 +02:00
Philipp Hansch
abfa8a952c
Doctests: Fix all complexity lint docs
...
cc #4319
2019-08-02 18:16:35 +02:00
Jakub Wieczorek
2a13e83f2b
Update all the code to pass the updated use_self
lint.
...
One struct required a temporary `#[allow(dead_code)]` annotation due to
a bug in the Rust compiler: https://github.com/rust-lang/rust/issues/63151 .
2019-07-31 08:50:43 +00:00
Lzu Tao
7293defb34
Rename hir::map::local_def_id_from_hir_id to local_def_id
2019-07-06 10:52:51 +07:00
Manish Goregaokar
c47a7e4ef2
get_parent_node_by_hir_id -> get_parent_node
2019-06-25 14:33:51 -07:00
bors
c5d1ecd474
Auto merge of #4220 - d-dorazio:4182-needless-return-void-functions, r=flip1995
...
make needless_return work with void functions
fixes https://github.com/rust-lang/rust-clippy/issues/4181 .
changelog: make needless_return work with void functions.
I don't think the failure is related to my changes, but I'm not sure 🤔
2019-06-22 09:38:53 +00:00
Lzu Tao
6aea41e050
Fix fallout cause NodeId pruning
2019-06-22 13:41:16 +07:00
Daniele D'Orazio
e1a78ae528
update tests and fix lints in clippy
2019-06-21 14:17:59 +02:00
Lzu Tao
4fa498a3eb
Fix warnings about unnecessary lifetime bounds
...
Rustup https://github.com/rust-lang/rust/pull/61172
2019-06-20 01:36:23 +07:00
Lzu Tao
5e887b2a6a
Fix lifetime mismatch between LateContext and Ty
2019-06-19 17:21:53 +07:00
Matthias Krüger
4d984dc6e6
rustup https://github.com/rust-lang/rust/pull/61836/
2019-06-18 11:15:47 +02:00
mikerite
3b7d6eeb4f
Fix comment grammar
...
Co-Authored-By: Philipp Krones <hello@philkrones.com>
2019-06-04 08:27:31 +02:00
Michael Wright
98585a0324
Fix .map(..).unwrap_or_else(..) bad suggestion
...
Closes #4144
2019-06-02 08:50:20 +02:00
Seo Sanghyeon
2c53a3f970
Fix typo in comment
2019-05-27 12:32:04 +09:00
Oliver Scherer
f49ef0ec04
Dogfood
2019-05-18 01:42:15 +02:00
Oliver Scherer
462df72100
Dogfood and rustfmt
2019-05-18 00:58:25 +02:00
Oliver Scherer
f7f85a0dca
Prevent symbocalypse
2019-05-17 23:53:54 +02:00
bors
501830bf01
Auto merge of #4084 - mikerite:fix-4019, r=oli-obk
...
Fix 4019
Fixes #4019
2019-05-14 11:26:16 +00:00
Oliver Scherer
dfbc74b08b
Rustfmt all the things
2019-05-14 10:33:48 +02:00
Oliver Scherer
b2dbda4d48
Use symbols instead of strings
2019-05-14 10:33:42 +02:00
Michael Wright
2efd8c6e05
Fix comments; minor refactoring
2019-05-12 10:32:19 +02:00
Michael Wright
e6e3f24e0c
Fix #4019
2019-05-12 10:18:38 +02:00
Manish Goregaokar
69b1da4d82
Remove some unnecessary If arms
2019-05-10 23:40:42 -07:00
Matthias Krüger
d618637c05
Rustup to rustc 1.36.0-nightly (13fde05b1 2019-05-03)
2019-05-03 22:28:34 -07:00
Jean Mertz
ff244b6c43
Fix link in into_iter_on_array documentation
...
The non-inline variant wasn't being rendered correctly.
see: https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_array
2019-05-03 17:38:13 +02:00
bors
8151a17422
Auto merge of #4049 - airt:fix-4033-search_is_some, r=flip1995
...
Fix #4033 search_is_some
Fixes #4033 .
Suggest `any(|x| ..)` instead of `any(|&x| ..)` for `find(|&x| ..).is_some()` (Lint [search_is_some](https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some ))
FnDecl of `find`:
```rust
fn find<P>(&mut self, mut p: P) -> Option<Self::Item> where
P: FnMut(&Self::Item) -> bool
```
FnDecl of `any`:
```rust
fn any<F>(&mut self, mut f: F) -> bool where
F: FnMut(Self::Item) -> bool
```
If match on `|&_|` in closure of `find`, only use `|_|` in the suggestion.
PS. It's the first time that I have used the `hir` API, please correct me if there is any mistake 😺
2019-05-02 08:45:02 +00:00
airt
d063516c85
check closure arguments before use it
2019-05-01 04:41:00 +08:00
airt
5d6a100f81
format code
2019-05-01 04:03:51 +08:00
André Luis Leal Cardoso Junior
b411391f8e
Add lints for find_map
2019-04-30 16:45:28 -03:00
airt
c3fde34fd5
fix suggestion for search_is_some
2019-05-01 03:11:58 +08:00
airt
bd0b75f6c3
fix suggestion for search_is_some naively
2019-05-01 01:08:16 +08:00
Manish Goregaokar
7e2043de2f
Ignore all enum and struct constructors in lints about *or(call())
2019-04-23 08:01:42 -07:00
Felix Rabe
b4f2200d5c
Typo
2019-04-18 15:08:14 +02:00
Matthew Kraai
753c39672e
Use lint pass macros
...
Fixes #3917 .
2019-04-17 09:35:22 -07:00
flip1995
840eac2c05
Use {get,match}_def_path from LateContext
2019-04-17 12:53:29 +02:00
Klemen Košir
560fd163d6
Escape a single quote in single_char_pattern hint
2019-04-08 21:55:50 +09:00
Matthias Krüger
920e47ceb5
NFC: fix typos
2019-04-04 11:15:30 +02:00
Matthias Krüger
e17dd4efa9
rustup https://github.com/rust-lang/rust/pull/59096/
2019-03-23 23:37:38 +01:00
Mateusz Mikuła
9b7ff501a6
Replace most of ty:Ty with Ty
2019-03-18 12:54:10 +01:00
Alexander Regueiro
d43966a176
Various cosmetic improvements.
2019-03-10 18:06:28 +00:00
Manish Goregaokar
038ec7f5d8
Move get_unwrap to restriction
...
fixes #3862
2019-03-09 13:48:06 -08:00
Félix Fischer
ddc718087f
Renamed: Cyclomatic Complexity -> Cognitive Complexity
...
* Ran automatic naming update
* Formalized rename of `cyclomatic_complexity` to `cognitive_complexity`
** Added the rename to `lib.rs`
** Added rename test
* Added warning for deprecated key `cyclomatic_complexity_threshold` and tests for it
* Added deprecation status for Clippy's builtin attribute
* Updated tests for new builtin attribute renaming
2019-03-06 10:07:38 -03:00
Andy Russell
a9de64a151
fix or ignore failing doc tests
2019-03-05 18:45:08 -05:00
Andy Russell
fe96ffeac9
move lint documentation into macro invocations
2019-03-05 18:45:08 -05:00
ljedrz
f2587703cc
enable rust-lang/rust#58754
2019-03-01 19:10:14 +01:00
Wilco Kusee
4cf720abbe
Move lint_map_unwrap_or to its own file
2019-02-26 17:27:41 +01:00
Wilco Kusee
54ab22f6db
Only suggest map_or for copy types
2019-02-26 17:27:40 +01:00
ljedrz
8dac8a6ba4
HirIdify some lints
2019-02-24 20:49:43 +01:00
bors
a5c16e5892
Auto merge of #3789 - bzzzzzz:needless_range_loop_bugfix, r=oli-obk
...
Make needless_range_loop not applicable to structures without iter method
Fixes https://github.com/rust-lang/rust-clippy/issues/3788
Now we will start lint indexed structure only if it has known iter or iter_mut method implemented.
2019-02-21 09:36:13 +00:00