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`]
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
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`
Fix ICE in `too_many_lines`
fixes: #7272fixes: #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
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.
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)
Fix allow on some statement lints
changelog: Fix `#[allow(..)]` over statements for [`needless_collect`], [`short_circuit_statement`] and [`unnecessary_operation`]
Fixes#7171Fixes#7202
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#6806Closes#4504