| Age | Commit message (Collapse) | Author | Lines |
|
|
|
- moving infaillible lint to prevent collisions
|
|
|
|
Deprecate util/dev in favor of cargo alias
This means one less shell script and a bit more cross-platform support
for contributors.
If you've been using `./util/dev` before, this now becomes `cargo dev`.
The key part of this change is found in `.cargo/config` where an alias for calling the `clippy_dev` binary is defined.
changelog: none
|
|
If you've been using `./util/dev` before, this now becomes `cargo dev`.
The key part of this change is found in `.cargo/config`.
This means one less shell script and a bit more cross-platform support
for contributors.
|
|
|
|
|
|
|
|
|
|
r=phansch
Detect usage of invalid atomic ordering in memory fences
Detect usage of `core::sync::atomic::{fence, compiler_fence}` with `Ordering::Relaxed` and suggest valid alternatives.
changelog: Extend `invalid_atomic_ordering` to lint memory fences
Fixes #5026
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Detect usage of `core::sync::atomic::{fence, compiler_fence}`
with `Ordering::Relaxed` and suggest valid alternatives.
|
|
New lint: pats_with_wild_match_arm
Wildcard use with other pattern in same match arm.
The wildcard covers other(s) pattern(s) as it will match anyway.
changelog: add new lint when multiple patterns (including wildcard) are used in a match arm.
Fixes #4640.
|
|
|
|
`transmute_float_to_int` lint was accidentally added to nursery
so moving it to the complexity group.
|
|
|
|
|
|
- test wildcard_enum_match_arm has been impacted by this new lint
|
|
- Wildcard use with other pattern in same match arm
|
|
|
|
|
|
|
|
Detect usage of invalid atomic ordering modes such as
`Ordering::{Release, AcqRel}` in atomic loads and
`Ordering::{Acquire, AcqRel}` in atomic stores.
|
|
- Encourage iter.next() rather than iter.nth(0), which is less readable
|
|
|
|
|
|
`std::mem::take` can be used to replace a value of type `T`
with `T::default()` instead of `std::mem::replace`.
|
|
|
|
new lint: mutable_key_type
This fixes #732 - well, partly, it doesn't adress `Hash` impls, but the use of mutable types as map keys or set members
changelog: add `mutable_key_type` lint
r? @flip1995
|
|
|
|
* ToString and AsRef are in prelude, no need to import them
|
|
actually add files
update lints
change to pedantic
|
|
This lint was uplifted/turned into warn-by-default in rustc
|
|
|
|
|
|
Clippy build fails because the feature `result_map_or` has been
stabilized in v1.41.0 but we still have an explicit feature
attribute for it.
|
|
Add lint that detects transmutation from a float to an integer
and suggests usage of `{f32, f64}.to_bits()` instead.
|
|
The Rust Book recommends that functions that return a `Result` type have
a doc comment with an `# Errors` section describing the kind of errors
that can be returned
(https://doc.rust-lang.org/book/ch14-02-publishing-to-crates-io.html#commonly-used-sections).
This change adds a lint to enforce this. The lint is allow by default;
it can be enabled with `#![warn(clippy::missing_errors_doc)]`.
Closes #4854.
|
|
|
|
|
|
|
|
This utilizes https://github.com/rust-lang/rust/pull/60584 by setting
our own `panic_hook` and pointing to our own issue tracker instead of
the rustc issue tracker.
This also adds a new internal lint to test the ICE message.
**Potential downsides**
* This essentially copies rustc's `report_ice` function as
`report_clippy_ice`. I think that's how it's meant to be implemented, but
maybe @jonas-schievink could have a look as well =)
The downside of more-or-less copying this function is that we have to
maintain it as well now.
The original function can be found [here][original].
* `driver` now depends directly on `rustc` and `rustc_errors`
Closes #2734
[original]: https://github.com/rust-lang/rust/blob/59367b074f1523353dddefa678ffe3cac9fd4e50/src/librustc_driver/lib.rs#L1185
|
|
Move use_self to nursery
Closes #4859
We have a lot of false positives in this lint, so I think it makes sense
to move this to the nursery until they are resolved.
changelog: Move `use_self` lint to nursery, due to many false positives
|
|
Closes #4859
We have a lot of false positives in this lint, so I think it makes sense
to move this to the nursery until they are resolved.
changelog: Move `use_self` lint to nursery, due to many false positives
|
|
|