Sosthène Guédon
1fd9f2d271
Fix tests
2022-07-28 22:27:57 +02:00
Sosthène Guédon
307b800f27
unwrap_used: Fix doc to not recommend expect when expect_used is not allowed
2022-07-28 22:08:48 +02:00
Sosthène Guédon
3e52031471
unwrap_used: Fix help, "an None
" -> "None
"
2022-07-22 19:14:58 +02:00
Sosthène Guédon
6ee03e2b01
unwrap_used: Stop recommending using expect
when the expect_used
lint is not allowed
2022-07-21 22:50:54 +02:00
bors
cce617165d
Auto merge of #9148 - arieluy:then_some_unwrap_or, r=Jarcho
...
Add new lint `obfuscated_if_else`
part of #9100 , additional commits could make it work with `then` and `unwrap_or_else` as well
changelog: Add new lint `obfuscated_if_else`
2022-07-18 12:45:11 +00:00
Ariel Uy
9ff7c91100
Add new lint obfuscated_if_else
...
New lint suggests using `if .. else ..` instead of
`.then_some(..).unwrap_or(..)`.
2022-07-17 18:44:49 -07:00
bors
3a4e4575ed
Auto merge of #9022 - alex-semenyuk:needless_option_take_more_docs, r=Jarcho
...
`NEEDLESS_OPTION_TAKE` doc improvements
changelog: More info on `NEEDLESS_OPTION_TAKE`
2022-07-17 13:33:40 +00:00
alexey semenyuk
e7804355de
NEEDLESS_OPTION_TAKE doc improvements
...
NEEDLESS_OPTION_TAKE doc improvements
NEEDLESS_OPTION_TAKE doc improvements
NEEDLESS_OPTION_TAKE doc improvements
NEEDLESS_OPTION_TAKE doc improvements
NEEDLESS_OPTION_TAKE doc improvements
NEEDLESS_OPTION_TAKE doc improvements
NEEDLESS_OPTION_TAKE doc improvements
2022-07-17 16:13:58 +03:00
Philipp Krones
f074034590
Merge remote-tracking branch 'upstream/master' into rustup
2022-07-15 09:49:15 +02:00
Maybe Waffle
1c3f62c750
Fix clippy build
2022-07-12 21:00:14 +04:00
alex-semenyuk
c3c4cda50b
Address review
2022-07-11 10:34:01 +03:00
alex-semenyuk
783992e693
Fix dogfood issue for or_fun_call
2022-07-10 13:34:58 +03:00
alex-semenyuk
97cd46fa33
Fix span for or_fun_call
2022-07-10 13:11:19 +03:00
Alex Macleod
307b8cd825
Lint simple expressions in manual_filter_map, manual_find_map
2022-07-07 11:51:42 +00:00
bors
f93d418f17
Auto merge of #9099 - joshtriplett:unnecessary-lazy-eval-then-some, r=flip1995
...
Extend unnecessary_lazy_eval to cover `bool::then` -> `bool::then_some`
fixes #9097
changelog: Extend `unnecessary_lazy_eval` to convert `bool::then` to `bool::then_some`
2022-07-06 09:20:55 +00:00
Josh Triplett
b7230d4f44
Dogfood fixes to use bool::then_some
2022-07-06 02:03:56 -07:00
Josh Triplett
ebff7206bc
Add MSRV check for bool::then_some
2022-07-06 01:00:19 -07:00
Josh Triplett
528308b5aa
Extend unnecessary_lazy_eval to cover bool::then
-> bool::then_some
2022-07-06 00:48:51 -07:00
xFrednet
2dd5fc14da
Correct [clippy::version]
for 1.62 lints and add note to docs
2022-07-03 17:02:48 +02:00
Cameron Steffen
5de85902fa
Factor out hir::Node::Binding
2022-07-01 10:04:19 -05:00
Muhammad Hamza
a2b8a67777
Fix broken hyperlink
2022-07-01 00:14:38 +05:00
Philipp Krones
09f5df5087
Merge commit '0cb0f7636851f9fcc57085cf80197a2ef6db098f' into clippyup
2022-06-30 10:50:09 +02:00
Philipp Krones
f26cf11fe8
Merge remote-tracking branch 'upstream/master' into rustup
2022-06-30 10:27:25 +02:00
Maybe Waffle
ee37029afa
remove last use of MAX_SUGGESTION_HIGHLIGHT_LINES
2022-06-20 00:25:07 +04:00
Maybe Waffle
9395c261d6
remove span_lint_and_sugg_for_edges
from clippy utils
2022-06-19 23:21:14 +04:00
flip1995
f8f9d01c2a
Merge commit 'd7b5cbf065b88830ca519adcb73fad4c0d24b1c7' into clippyup
2022-06-16 17:39:06 +02:00
flip1995
c5c8f6122f
Merge remote-tracking branch 'upstream/master' into rustup
2022-06-16 16:04:06 +02:00
Yuki Okushi
bd071bf5b2
Rollup merge of #98110 - cjgillot:closure-brace, r=Aaron1011
...
Make `ExprKind::Closure` a struct variant.
Simple refactor since we both need it to introduce additional fields in `ExprKind::Closure`.
r? ``@Aaron1011``
2022-06-15 19:37:14 +09:00
Takayuki Maeda
f2d9acfc01
remove unnecessary to_string
and String::new
2022-06-13 15:48:40 +09:00
Camille GILLOT
7b84a97c3e
Make ExprKind::Closure
a struct variant.
2022-06-12 00:16:27 +02:00
Alex Macleod
2b655d4630
Correct some #[clippy::version]
s
2022-06-09 13:50:07 +00:00
bors
4970527296
Auto merge of #8954 - Serial-ATA:doc-comment-issues, r=xFrednet
...
Improve lint doc consistency
changelog: none
This is a continuation of #8908 .
Notable changes:
- Removed empty `Known Problems` sections
- Removed "Good"/"Bad" language (replaced with "Use instead")
- Removed (and added some 😄 ) duplication
- Ignored the [`create_dir`] example so it doesn't create `clippy_lints/foo` 😄
2022-06-09 11:03:49 +00:00
Jason Newcomb
bf3ab592f0
Changes to iter_overeager_cloned
...
* Don't lint on `.cloned().flatten()` when `T::Item` doesn't implement `IntoIterator`
* Reduce verbosity of lint message
* Narrow down the scope of the replacement range
2022-06-07 00:40:32 -04:00
Serial
cab5362d32
Suppress unused
in doc examples
2022-06-06 20:28:16 -04:00
Serial
9aeed6b9bf
Improve lint doc consistency
2022-06-05 16:03:18 -04:00
bors
542d474d38
Auto merge of #8930 - kyoto7250:issue_8920, r=Alexendoo
...
fix(manual_find_map and manual_filter_map): check clone method
close #8920
Added conditional branching when the clone method is used.
Thank you in advance.
---
changelog: check `clone()` and other variant preserving methods in [`manual_find_map`] and [`manual_filter_map`]
2022-06-04 13:05:27 +00:00
kyoto7250
42cf98553a
refactor: check copied and cloned
2022-06-04 21:28:14 +09:00
Philipp Krones
f067783461
Merge commit 'd9ddce8a223cb9916389c039777b6966ea448dc8' into clippyup
2022-06-04 13:34:07 +02:00
Philipp Krones
7f402b15c7
Merge remote-tracking branch 'upstream/master' into rustup
2022-06-04 12:53:27 +02:00
kyoto7250
990f8bf5a6
refactor: Add some methods
2022-06-04 17:15:55 +09:00
dswij
678dcdd2be
Apply needless_return
suggestions
2022-06-02 20:22:15 +08:00
bors
0d5ace3ed2
Auto merge of #8908 - Serial-ATA:doc-comment-issues, r=xFrednet
...
Make docs more consistent
changelog: none
This just fixes some docs to make them more consistent. I mostly just changed `// Good`, `// Bad`, etc to `Use instead:`.
2022-06-02 07:38:01 +00:00
kyoto7250
007fae10ed
fix(manual_find_map and manual_filter_map): check clone method
2022-06-02 09:54:14 +09:00
Serial
b20f95c1a1
Combine doc examples
2022-06-01 18:53:15 -04:00
lyj
c5410150eb
needless_deref
2022-05-30 01:46:15 +00:00
Serial
cfd0f5592b
Make docs more consistent
2022-05-28 09:48:26 -04:00
kyoto7250
b531eb1a7a
suggest first() instead of get(0)
2022-05-25 09:08:25 +09:00
bors
b97784fd07
Auto merge of #8862 - Alexendoo:get-last-with-len, r=Jarcho,xFrednet
...
`get_last_with_len`: lint `VecDeque` and any deref to slice
changelog: [`get_last_with_len`]: lint `VecDeque` and any deref to slice
Previously only `Vec`s were linted, this will now catch any usages on slices, arrays, etc. It also suggests `.back()` for `VecDeque`s
Also moves the lint into `methods/`
2022-05-24 21:40:15 +00:00
bors
fbb9e565e3
Auto merge of #8754 - guerinoni:no_effect_replace, r=llogiq
...
New lint `no_effect_replace`
Closes #1595
Signed-off-by: Federico Guerinoni <guerinoni.federico@gmail.com>
changelog: Add [`no_effect_replace`] lint.
2022-05-24 16:55:06 +00:00
Federico Guerinoni
ea62347a5a
New lint no_effect_replace
...
Closes #1595
changelog: Add no_effect_replace lint.
2022-05-24 11:08:41 +02:00