xFrednet
967d815a42
Extracting is_expr_identity_function
into clippy_utils
for reusability
2021-06-07 22:42:11 +02:00
Bastian Kersting
6bf8303c47
Refactored the check for two spans on the same line
2021-06-07 22:05:53 +02:00
Smitty
c864e18678
Remove some last remants of {push,pop}_unsafe!
...
These macros have already been removed, but there was still some code
handling these macros. That code is now removed.
2021-06-06 17:04:03 -04:00
Yoshitomo Nakanishi
d7a380e4b9
Fix FP in default_numeric_fallback
with external macro expansion
2021-06-06 12:43:22 +09:00
Bastian Kersting
790888d520
Fixed failing tests
2021-06-05 18:54:41 +02:00
Bastian Kersting
96747c1a46
Enhance semicolon_if_nothing_returned according to #7324
2021-06-05 18:54:41 +02:00
lyj
f877f54767
rc_mutex: fix test
2021-06-05 22:42:48 +08:00
lyj
896c19e2cf
rc_mutex: update doc
2021-06-05 21:42:45 +08:00
lyj
e2ec85c697
rc_mutex: add struct test
2021-06-05 21:20:02 +08:00
lyj
a5ced1fc2b
rc_mutex use span_lint instead of span_lint_and_sugg
2021-06-05 21:19:05 +08:00
bors
e4a1e8524c
Auto merge of #7321 - flip1995:doc-release-stable-branch, r=xFrednet
...
Release doc: add explanation for updating the stable branch
r? `@xFrednet`
[Rendered](https://github.com/flip1995/rust-clippy/blob/doc-release-stable-branch/doc/release.md )
changelog: none
2021-06-05 11:24:47 +00:00
Felix S. Klock II
b95e1f7b3d
Revert clippy's path to the copy intrinsics (part of reverting PR 81238).
2021-06-04 16:44:28 -04:00
bors
9991040258
Auto merge of #7289 - camsteffen:needless-collect-shadow, r=Manishearth
...
Fix needless_collect with binding shadowing
changelog: Fix [`needless_collect`] weird output when a binding is shadowed
Fixes #7200
2021-06-04 15:39:16 +00:00
flip1995
52fc18c932
Release doc: add explanation for updating the stable branch
2021-06-04 16:57:03 +02:00
r00ster91
dc4ea800b7
Replace some std::iter::repeat with str::repeat
2021-06-04 14:32:47 +02:00
Joshua Nelson
390893c600
Remove doc(include)
2021-06-04 08:05:54 -04:00
bors
b1752f616f
Auto merge of #7319 - m-ou-se:cfg-not-const, r=camsteffen
...
Don't warn about `cfg!(..)` as a constant in assertions
This makes clippy understand that `cfg!(..)` is not just a hardcoded `true` or `false` (even though it expands to one of those).
cc `@khyperia`
changelog: Don't treat `cfg!(..)` as a constant in [`assertions-on-constants`]
2021-06-04 11:49:23 +00:00
Mara Bos
38ab1a6166
Add test for not linting on assert!(cfg!(..)).
2021-06-04 10:47:03 +02:00
Mara Bos
25639101dd
Don't treat cfg!()
as a constant.
2021-06-04 10:47:03 +02:00
lyj
c0f3c2fe27
correct lint
2021-06-04 10:44:34 +08:00
lyj
84c511facf
rc_mutex
2021-06-03 16:25:27 +08:00
bors
5f746a1c2a
Auto merge of #7314 - flip1995:ci-win-rustup, r=flip1995
...
Revert "CI: update rustup before installing the toolchain on windows"
This reverts commit 716d03f86b
.
This is no longer necessary, since rustup 1.24.2 is now the default
version on the windows runner.
changelog: none
2021-06-03 07:12:51 +00:00
flip1995
cd57c2307c
Revert "CI: update rustup before installing the toolchain on windows"
...
This reverts commit 716d03f86b
.
This is no longer necessary, since rustup 1.24.2 is now the default
version on the windows runner.
2021-06-03 08:55:15 +02:00
flip1995
6c27482115
Merge commit '3ae8faff4d46ad92f194c2a4b941c3152a701b31' into clippyup
2021-06-03 08:41:37 +02:00
bors
3ae8faff4d
Auto merge of #7313 - flip1995:rustup, r=flip1995
...
Rustup
Empty rustup. No changes to Clippy in the Rust repo for the last 2 weeks 😮
changelog: none
2021-06-03 06:40:25 +00:00
flip1995
ab8bede9d7
Bump nightly version -> 2021-06-03
2021-06-03 08:38:19 +02:00
flip1995
531bfc83b6
Merge remote-tracking branch 'upstream/master' into rustup
2021-06-03 08:37:53 +02:00
bors
cf5f894536
Auto merge of #7297 - flip1995:rm-cov, r=giraffate
...
Remove util/cov.sh script
This script hasn't been working and wasn't used for years.
changelog: none
2021-06-01 01:22:43 +00:00
bors
ca570f9b84
Auto merge of #7265 - Jarcho:manual_str_repeat, r=giraffate
...
Add lint `manual_str_repeat`
fixes : #7260
There's a similar function for slices. Should this be renamed to include it, or should that be a separate lint? If we are going to have them as one lint a better name will be needed. `manual_repeat` isn't exactly clear as it's replacing a call to `iter::repeat`.
changelog: Add new lint `manual_str_repeat`
2021-06-01 00:47:05 +00:00
flip1995
f49251a33e
Remove util/cov.sh script
...
This script hasn't been working and wasn't used for years.
2021-05-31 17:09:21 +02:00
Jason Newcomb
cfddf0927b
Fix type checks for manual_str_repeat
2021-05-31 09:37:13 -04:00
Jason Newcomb
97311f0906
Add lint manual_str_repeat
2021-05-30 23:26:48 -04:00
bors
860cb8f977
Auto merge of #7294 - stevenengler:unsafe-ptr-deref-msg, r=Manishearth
...
Improve message for `not_unsafe_ptr_arg_deref` lint
changelog: Improved message for the ['not_unsafe_ptr_arg_deref'] lint
Doesn't close any issue, but implements a suggestion from https://github.com/rust-lang/rust-clippy/issues/3045#issuecomment-791556803 .
2021-05-31 00:36:46 +00:00
Steven Engler
58491d386a
Update message for 'not_unsafe_ptr_arg_deref' lint
2021-05-30 20:19:57 -04:00
bors
d1308aecaf
Auto merge of #7292 - Jarcho:suspicious_splitn, r=flip1995
...
Add lint `suspicious_splitn`
fixes : #7245
changelog: Add lint `suspicious_splitn`
2021-05-30 20:32:22 +00:00
Jason Newcomb
5fa08eaf53
Evaluate constant expressions in suspicious_splitn
2021-05-30 13:25:24 -04:00
Jason Newcomb
898b6a0e07
Add lint suspicious_splitn
2021-05-30 09:49:55 -04:00
bors
5cdba7d08a
Auto merge of #7287 - Jarcho:ice_7272, r=flip1995
...
Fix ICE in `too_many_lines`
fixes : #7272
fixes : #7286
#7272 looks like it's caused by a bug in rust-c. The span it's giving for the closure is:
```rust
$crate:: $lower($d arg) }
}
}
}
```
The correct span would be `$crate:: $lower($d arg)` without all the closing braces.
#7286 is definitely a clippy bug
changelog: none
2021-05-28 09:22:22 +00:00
Jason Newcomb
4ba6afd192
Fix ICE in too_many_lines
due to wrong assumptions on braces.
2021-05-27 22:44:08 -04:00
Cameron Steffen
21c829e0c8
Simplify collect expr_ty
2021-05-27 20:54:56 -05:00
Cameron Steffen
6c1ba7c1bc
Fix needless_collect with binding shadowing
2021-05-27 20:39:59 -05:00
Cameron Steffen
29b4b4c10d
Do not lint use_self on type parameters
2021-05-27 20:18:07 -05:00
Cameron Steffen
d3c20c835f
Some cleanup for use_self
2021-05-27 16:25:17 -05:00
bors
543a8a6aac
Auto merge of #7285 - camsteffen:mini-macro-move, r=flip1995
...
Move mini-macro to tests/ui/auxilary
changelog: none
Merges `/mini-macro` into `/tests/ui/auxilary/proc_macro_derive.rs`.
The mini-macro crate is an artifact of the distant past. A lot has changed (#2284 ) and it doesn't make sense as a top-level crate anymore. Especially since we can use the auxilary folder to accompolish the same thing.
2021-05-27 17:19:39 +00:00
Cameron Steffen
6c54f61beb
Move mini-macro to auxilary
2021-05-27 11:32:14 -05:00
bors
16e347f7b3
Auto merge of #7284 - camsteffen:consts-reexport, r=flip1995
...
Remove clippy_utils::consts re-export
changelog: none
We got a straggler.
2021-05-27 14:07:12 +00:00
Cameron Steffen
d39a11cbe1
Remove clippy_utils::consts re-export
2021-05-27 08:52:10 -05:00
bors
5cb49bcb98
Auto merge of #7283 - flip1995:release-doc, r=giraffate
...
Document to only push the created tag and not everything
Inspired by https://stackoverflow.com/a/5195913
changelog: none
2021-05-27 13:19:35 +00:00
flip1995
8d422881bc
Document to only push the created tag and not everything
2021-05-27 11:09:49 +02:00
bors
2fa9362448
Auto merge of #7281 - camsteffen:has-doc-fp, r=flip1995
...
Fix missing_docs_in_private_items false negative
changelog: Fix [`missing_docs_in_private_items`] false negative when the item has any `#[name = "value"]` attribute
Closes #7247 (decided not to use the rustc method since it calls `Session::check_name`, which is for rustc only)
2021-05-27 08:37:08 +00:00