First Pull Request


FR: redundant_field_names should distinguish between all and some fields matching rust-lang/rust-clippy

`redundant_field_names` fires on any field being a match. This impairs readability in cases like this: ```rust let thingy = Thingy { calc: big + calculation, redundant: redundant, o...

Created - 0 comments - A-style L-enhancement good first issue

Lint suggestion: Useless explicit documentation link rust-lang/rust-clippy

Once [intra-rustdoc links](https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md) lands, many explicit links will become unnecessary. It would be very useful to have a lint...

Created - 0 comments - A-style L-lint good first issue

New lint: Use `Into`/`TryInto` in bounds as opposed to `From`/`TryFrom` rust-lang/rust-clippy

When writing generic bounds such as: ```rust fn foo<T>(a: T) where u32: From<T>; ``` `Into` should be preferred, like this: ```rust fn foo<T>(a: T) where T: Into<u32>; ``` Why the f...

Created - 0 comments - A-style L-lint good first issue

add lint for prevent global import rust-lang/rust-clippy

<!-- Hi there! Whether you've come to make a suggestion for a new lint, an improvement to an existing lint or to report a bug or a false positive in Clippy, you've come to the right place. If you ...

Created - 1 comment - A-style E-easy T-AST

should_implement_trait should include ToOwned, FromStr rust-lang/rust-clippy

Also see: servo/rust-url#286. For `FromStr`, clippy should recommend that `parse` methods be renamed to `from_str`.

Created - 1 comment - A-style E-easy L-enhancement T-middle

Warn methods in doc comments written as `fun()` instead of `fun` rust-lang/rust-clippy

According to [#41771 (comment)](https://github.com/rust-lang/rust/pull/41771#discussion_r115144707), the current convention for rustdoc is to write methods without any trailing parentheses. For exa...

Created - 1 comment - A-style E-easy L-documentation T-AST

Stop linting `assert!(x == y)` rust-lang/rust-clippy

While RFC 2011 isn't implemented yet, the earlier we stop telling people to rewrite their asserts, the less they will be pissed once we tell them to change it back :)

Created - 1 comment - A-style good first issue hacktoberfest

Warn about useless matches rust-lang/rust-clippy

Clippy should warn about this useless match: ```rust fn main() { let a = 1; let b = 2; let c = 3; match (a, b, c) { (x, y, z) => { // this is a ...

Created - 1 comment - A-complexity A-style A-suggestion L-lint good first issue

Lint suggesting from_fn instead of while let Some(x) rust-lang/rust-clippy

With the release of 1.34 with the `from_fn` function, I'd like to propose a new lint that matches: `while let Some(x) = expr` and suggests replacing it with `for x in from_fn(|| expr)`. (With a spe...

Created - 1 comment - A-style A-suggestion L-lint good first issue

improve suggestions around `&*` and don't add parenthesis rust-lang/rust-clippy

~~Is there ever a reason to have an unsized type and ref it instead of having a reference to an unsized type? I think we should simply suggest to use `let p: &str = &*"hello";` instead (and make...

Created - 2 comments - A-style E-easy L-enhancement

Lint direct calls to `deref` or `deref_mut` rust-lang/rust-clippy

Instead of calling `x.deref()` or `x.deref_mut()`, `&*x` and `&mut *x` should be recommended instead.

Created - 2 comments - A-style E-easy L-lint T-middle

Rust API Guideline: Cargo.toml publishes CI badges for tier 1 platforms rust-lang/rust-clippy

As per [Cargo.toml publishes CI badges for tier 1 platforms](https://github.com/brson/rust-api-guidelines#cargotoml-publishes-ci-badges-for-tier-1-platforms-c-ci).

Created - 2 comments - A-style E-easy L-lint T-cargo

Suggest `x > y` over `x >= y + 1` for integers rust-lang/rust-clippy

Also all other combinations around comparison, and adding/subtracting 1 on either side.

Created - 2 comments - A-style A-unnecessary E-easy L-lint T-middle

new lint: suggest ptr::eq() instead of "x as *const _ as usize == y as *const as usize" rust-lang/rust-clippy

Inspired by https://github.com/rust-lang/rust/pull/57547 This looks like it could be a clippy lint :)

Created - 2 comments - A-style L-lint good first issue

Suggest `v.trailing_zeros() == n` over `(v & (1 << n)) != 0` rust-lang/rust-clippy

What it says in the title. There's probably other similar expressions Rust have nice functions for. See https://stackoverflow.com/questions/39178648/how-to-match-against-a-flags-bitmasks-in-rust.

Created - 3 comments - A-style L-lint T-middle good first issue hacktoberfest

Lint for unused arguments starting with a _ rust-lang/rust-clippy

<!-- Hi there! Whether you've come to make a suggestion for a new lint, an improvement to an existing lint or to report a bug or a false positive in Clippy, you've come to the right place. For ...

Created - 3 comments - A-style L-lint good first issue hacktoberfest

unreadable_literal for floating-point numbers rust-lang/rust-clippy

unreadable_literal triggers for floating-point numbers such as > ``` > | > 5 | 0.095332, 0.118095, 0.095332, > | ^^^^^^^^ help: consider: `0.095_332` > ``` ...

Created - 4 comments - A-style L-enhancement L-lint good first issue

Warn about non-working null check `!foo == 0` rust-lang/rust-clippy

```rust fn main() { let c_pointer = 42; if !c_pointer == 0 { println!("not null"); } else { println!("null"); } } ``` I think it's very likely that the user wanted to do ```r...

Created - 5 comments - A-style E-easy L-lint T-middle

Lint non-expressive variable names rust-lang/rust-clippy

So, I've recently had to deal with code written in ▊▊▊▊▊ and for some reason the original authors of the software tended to use either one-letter variables or weirdly long names (that were not even...

Created - 6 comments - A-style E-easy L-lint T-AST T-middle

Lint on method/struct fields sharing the same name rust-lang/rust-clippy

Would it be possible to lint on the situation in which a struct field shares a name with a struct method? For example, in the following situation: ```rust struct Foo { bar: i32 } impl F...

Created - 6 comments - A-style E-easy L-lint T-middle

Lint against redundant field names in struct literals rust-lang/rust-clippy

<!-- Hi there! Whether you've come to make a suggestion for a new lint, an improvement to an existing lint or to report a bug or a false positive in Clippy, you've come to the right place. If y...

Created - 6 comments - A-style A-unnecessary L-lint T-AST good first issue

lint usage of struct constructors when new/from method is available rust-lang/rust-clippy

if a struct has a `new` or a `from` method that does the same as a struct constructor, then that method should be used instead of the struct constructor. Obviously the usage of a struct constructo...

Created - 7 comments - A-style E-easy L-lint T-middle

lint usage of struct constructors when new/from method is available rust-lang/rust-clippy

if a struct has a `new` or a `from` method that does the same as a struct constructor, then that method should be used instead of the struct constructor. Obviously the usage of a struct constructo...

Created - 7 comments - A-style E-easy L-lint T-middle

Suggest to insert underscores into long numeric literals rust-lang/rust-clippy

I don't even know what `61864918973511` is, but `61_864_918_973_511` I can quickly count to be 61 Trillion (In case I got the US naming scheme right. In germany it would be a Billion).

Created - 8 comments - A-style E-easy L-lint T-AST

suggest `?` over `try!` rust-lang/rust-clippy

The `?` operator has hit stable. We should lint all uses of the try macro and suggest the new operator instead.

Created - 13 comments - A-style E-easy L-lint

Displaying all 25 issues

License

Language