Commit graph

12139 commits

Author SHA1 Message Date
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
bors
8066f836ec Auto merge of #7282 - camsteffen:lint-stmt-expr, r=flip1995
Fix allow on some statement lints

changelog: Fix `#[allow(..)]` over statements for [`needless_collect`], [`short_circuit_statement`] and [`unnecessary_operation`]

Fixes #7171
Fixes #7202
2021-05-27 08:23:21 +00:00
bors
9c4651f2ee Auto merge of #7187 - camsteffen:avoid-break-exported, r=flip1995,phansch
Add avoid_breaking_exported_api config option

changelog: Add `avoid_breaking_exported_api` config option for [`enum_variant_names`], [`large_types_passed_by_value`], [`trivially_copy_pass_by_ref`], [`unnecessary_wraps`], [`upper_case_acronyms`] and [`wrong_self_convention`].

changelog: Deprecates [`pub_enum_variant_names`] and [`wrong_pub_self_convention`] as the non-pub variants are now configurable.

changelog: Fix various false negatives for `pub` items that are not exported from the crate.

A couple changes to late passes in order to use `cx.access_levels.is_exported` rather than `item.vis.kind.is_pub`.

I'm not sure how to better document the config option or lints that are (not) affected (see comments in #6806). Suggestions are welcome. cc `@rust-lang/clippy`

I added `/clippy.toml` to use the config internally and `/tests/clippy.toml` to maintain a default config in ui tests.

Closes #6806
Closes #4504
2021-05-27 04:49:56 +00:00
Cameron Steffen
f3e77a454a Fix allow on some statement lints 2021-05-26 22:07:53 -05:00
Cameron Steffen
6eea598645 Fix config file lookup 2021-05-26 21:53:43 -05:00
Cameron Steffen
3af95846a2 Add deprecated lint tests 2021-05-26 21:53:43 -05:00
bors
f205dd176a Auto merge of #7280 - camsteffen:macro-use, r=Manishearth
Add macro_use clippy_utils

changelog: none
2021-05-26 22:15:07 +00:00
Cameron Steffen
7dd356d9f1 Eat dogfood 2021-05-26 16:53:13 -05:00
Cameron Steffen
c51472b4b0 Add clippy.toml to project and tests 2021-05-26 16:53:13 -05:00
Cameron Steffen
55ccc7a8c6 Use break api config for upper_case_acronyms 2021-05-26 16:53:13 -05:00
Cameron Steffen
1ce581d706 Use break api config for unnecessary_wraps 2021-05-26 16:53:13 -05:00
Cameron Steffen
3d77a2b861 Use break api config for enum_variant_names 2021-05-26 16:53:13 -05:00
Cameron Steffen
ee79077d80 Use break api config for pass by value or ref 2021-05-26 16:53:13 -05:00
Cameron Steffen
d7f47f280e Use break api config for wrong_pub_self_convention 2021-05-26 16:53:13 -05:00