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
Daniel McNab
c4e2cf9601
Opt-in to rustc_private for rust-analyzer
...
rust-analyzer/rust-analyzer#7891
2021-03-08 17:39:51 +00: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
Andrea Nall
3877a410be
migrate paths to newly-added diagnostic items
...
This gets rid of the following paths:
* OS_STRING
* TO_OWNED
* TO_STRING
Also removes some usages of:
* PATH_BUF
And the now completely unused `clippy_lints::types::is_ty_param_path`
2021-03-07 17:53:12 -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
Oli Scherer
5b2e7e91c3
Shrink the size of Rvalue by 16 bytes
2021-03-05 09:33:01 +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
Cameron Steffen
2b3a731e1c
Add missing diagnostic item Symbols
2021-02-26 22:12:36 -06: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
flip1995
c6408a47bd
Merge remote-tracking branch 'upstream/master' into rustup
2021-02-25 10:40:00 +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
33ee598a9f
Update clippy_utils/Cargo.toml
...
Co-authored-by: Philipp Krones <hello@philkrones.com>
2021-02-23 18:50:30 -05:00
Samuel E. Moelius III
50e3ef9eb5
Remove file accidentally re-added during rebase
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
964f2a0ef2
Bump clippy_utils version
2021-02-23 18:50:30 -05:00
Samuel E. Moelius III
5f04b50191
Fix one import
2021-02-23 18:50:30 -05:00
Samuel E. Moelius III
ff157ae1f4
Improve tests
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
29b6570612
Remove unused dependencies
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