| Age | Commit message (Collapse) | Author | Lines |
|
- moving infaillible lint to prevent collisions
|
|
- Lint name: MATCH_SINGLE_BINDING
|
|
|
|
|
|
|
|
|
|
add size parameter for `vec_box` lint
changelog: add size threshold for the `vec_box` lint, currently 4096 bytes (one page) (subject to change). Closes #3547.
diff is a little bit confusing due to some refactoring (moving free functions to lint struct functions), relevant portion is [this](https://github.com/rust-lang/rust-clippy/compare/master...Areredify:vec_box_threshold?expand=1#diff-1096120ca9143af89dcc9175ea92b54aR294-R298). In hindsight should've been different commits, but oh well.
|
|
|
|
|
|
|
|
|
|
|
|
slice_patterns have been stabilized.
|
|
|
|
- Lint for any new lints that have the default lint description
from the automation
|
|
Fix issue4503
Fixes #4503.
changelog: Add a lint checking user are using FileType.is_file() method and suggest using !FileType.is_dir().
- [x] Followed [lint naming conventions][lint_naming]
- [x] Added passing UI tests (including committed `.stderr` file)
- [x] `cargo test` passes locally
- [x] Executed `./util/dev update_lints`
- [x] Added lint documentation
- [x] Run `./util/dev fmt`
|
|
|
|
|
|
|
|
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
|
|
Move `iterator_step_by_zero` into `methods` since it applies to all
iterators and not just ranges. Simplify the code while doing so.
|
|
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
|
|
|
|
Add `as_conversions` lint
changelog: closes #4771, adding a new pedantic allow-by-default lint that lints against any usage of `as`.
|
|
|
|
actuall add files
add better example and change pedantic to restriction
|
|
|
|
|
|
rollup-new-lints
|
|
|