bors
92b9677864
Auto merge of #6820 - mgacek8:issue_6562_enhance_mem_replace_with_default_with_other_ctors, r=phansch
...
mem_replace_with_default: recognize some std library ctors
fixes #6562
changelog: mem_replace_with_default: recognize some common constructors equivalent to `Default::default()`
2021-03-13 15:43:00 +00:00
Jason Newcomb
a261bc5fad
Make explicit_deref_methods
check for multiple deref calls
...
Fix suggestion for `explicit_deref_methods`. Sometimes `&**` is needed, sometimes nothing is needed.
Allow `explicit_deref_methods` to trigger in a few new contexts.
`explicit_deref_methods` will now consider ufcs calls
2021-03-13 08:39:48 -05:00
Mateusz Gacek
41be515062
mem_replace_with_default: use diagnostic items intead of paths
2021-03-12 13:03:07 -08:00
Yoshitomo Nakanishi
93ee80ac3e
Use sym::Iterator instead of paths::ITERATOR
2021-03-13 02:10:54 +09:00
flip1995
78c740e2f3
Merge remote-tracking branch 'upstream/master' into rustup
2021-03-11 10:37:58 +01:00
Camille GILLOT
b32cffe493
Remove hir::Crate::attrs.
2021-03-09 19:22:55 +01:00
bors
8a5f98a0e4
Auto merge of #6866 - anall:ice6840, r=flip1995
...
Fix ICE 6840 - make is_normalizable more strict
fixes #6840
make `is_normalizable` more strict, which should catch this ICE and related cases
changelog: Fix ICE in [`zero_sized_map_values`]
2021-03-09 14:58:24 +00:00
Andrea Nall
9707599714
add comment for when can be removed
2021-03-09 08:30:33 -06:00
bors
627e910fe5
Auto merge of #6868 - Jarcho:lang_item, r=flip1995
...
Don't assume lang items will exist.
~~Should fix lintcheck warnings caused by #6823~~
See below
changelog: None
2021-03-09 14:28:49 +00:00
Andrea Nall
e812a8abde
use .all
instead of negative use of .any
2021-03-08 23:08:52 -06:00
Andrea Nall
e322c773e3
use TyS::walk
2021-03-08 23:03:45 -06:00
Yoshitomo Nakanishi
360f065404
Move 'is_isize_or_usize' to clippy_utils
2021-03-09 11:08:45 +09:00
Jason Newcomb
f2d917e3b1
Don't assume lang items will exist.
2021-03-08 11:08:52 -05:00
Andrea Nall
b27cbda32b
make is_normalizable more strict
2021-03-07 21:45:54 -06:00
Andrea Nall
9bdc273f03
relocate functions from clippy_lints::types
...
relocate `is_ty_param_lang_item` and `is_ty_param_diagnostic_item` to `clippy_utils`
2021-03-07 17:58:39 -06:00
Jason Newcomb
47145dec36
len_without_is_empty
will now consider multiple impl blocks
...
`len_without_is_empty` will now consider `#[allow]` on both the `len` method, and the type definition
2021-03-07 09:40:18 -05:00
bors
5945e85f34
Auto merge of #6823 - Jarcho:diagnostic_items, r=phansch
...
Use diagnostic or language items instead of paths
I think that gets everything except ones used in a list of paths to check.
changelog: none
2021-03-07 12:04:42 +00:00
Jason Newcomb
39c5e86337
When checking if two empty hir blocks are equal also check to see if the tokens used are the same as well
2021-03-04 11:06:24 -05:00
bors
ece3543c9f
Auto merge of #6801 - Jarcho:manual_match_fix, r=phansch
...
Fix `manual_map` false positives
fixes : #6795
fixes : #6797
fixes : #6811
fixes : #6819
changelog: Fix false positives for `manual_map` when `return`, `break`, `continue`, `yield`, `await`, and partially moved values are used.
changelog: Don't expand macros in suggestions for `manual_map`
2021-03-02 15:36:00 +00:00
Jason Newcomb
f21320fd74
Use diagnostic or language items instead of paths
2021-03-01 23:10:51 -05:00
Cameron Steffen
ada8c72f3f
Add version = "Two" to rustfmt.toml
...
Ignore UI tests since this change makes rustfmt less friendly with UI
test comments.
2021-03-01 16:17:33 -06:00
Cameron Steffen
7984e60d9e
Use diagnostic items in into_iter_collections
2021-03-01 09:04:11 -06:00
Jason Newcomb
a3278a16d3
Fix manual_map
: do not expand macros in suggestions
2021-02-28 09:13:24 -05:00
Andrea Nall
3d3cfd3754
added new lint implicit_clone
2021-02-26 19:13:47 -06:00
Jason Newcomb
ef87e58993
Fix manual_map
: don't lint when partially moved values are used.
...
Fix `manual_map`: don't lint when `return`, `break`, and `continue` are used.
2021-02-26 16:24:25 -05:00
flip1995
f64149dd04
Merge commit '928e72dd10749875cbd412f74bfbfd7765dbcd8a' into clippyup
2021-02-25 11:25:22 +01:00
Samuel E. Moelius III
8047458f40
Move conf.rs back into clippy_lints
2021-02-24 06:21:46 -05:00
Samuel E. Moelius III
ab7381f085
Move declare_clippy_lint
back into clippy_lints
2021-02-23 18:50:30 -05:00
Samuel E. Moelius III
979206f6b4
Fix doc test
2021-02-23 18:50:30 -05:00
Samuel E. Moelius III
b7f03c6697
Remove unused features
2021-02-23 18:50:30 -05:00
Samuel E. Moelius III
523de296cc
Get tests to pass
2021-02-23 18:50:30 -05:00
Samuel E. Moelius III
c5b9d22b02
Update clippy_utils/src/lib.rs
2021-02-23 18:50:30 -05:00
Samuel E. Moelius III
09bded4437
Factor out clippy_utils
crate
2021-02-23 18:50:30 -05:00