First Pull Request


Lint: Implicit Deref rust-lang/rust-clippy

Basically, an `#[allow]` by default lint that tells you when you are referencing a value implicitly (e.g. `String::new().chars()` is really `(*String::new()).chars()`. Rationale is that somebody o...

Created - 0 comments - E-easy L-lint T-middle

Lint to warn about str::as_ptr() usage in ffi call rust-lang/rust-clippy

Hello. It would be nice to have a warning when using `str::as_ptr()` in a ffi call instead of using `CStr`. For instance, in the following code: ``` rust unsafe { printf("Hello".as_ptr() as *cons...

Created - 0 comments - A-correctness E-easy L-lint T-middle

Lint x != _ || x != _ rust-lang/rust-clippy

Also probably `x == _ && x == _`. This is either a duplicate (if both `_` are equal) or always false (true for the former).

Created - 1 comment - A-correctness E-easy L-lint T-middle

useless op on lhs of integer division or modulo rust-lang/rust-clippy

`(x + n + y) % n` or `(x + n + y) / n` can simply be replaced by `(x + y) % n` or `(x + y) / n + 1` this isn't true for the following computations on unsigned integers: `(x + n - y) % n` or `...

Created - 1 comment - A-correctness A-unnecessary E-easy L-lint T-middle

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

Derived PartialOrd and implemented Ord 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 - 1 comment - A-correctness A-unnecessary good first issue hacktoberfest T-middle

Lint `HashMap<T, ZST>` where ZST is any zero sized type rust-lang/rust-clippy

The user should be using `HashSet<T>` instead and magically create the ZSTs out of thin air when needed (since they are all the same value anyway).

Created - 1 comment - A-unnecessary E-easy L-lint T-middle

`let_and_return` ignores type inference rust-lang/rust-clippy

`{ let x: T = ...; x }` generates a warning, but it is not possible to replace it with `{ ...: T }` on stable. (Type ascription is unstable.)

Created - 1 comment - E-easy L-bug T-middle

Lint request: warn mutable range bound variable rust-lang/rust-clippy

Rust uses `..` as the syntactic sugar for range construct however it might be misused as a replacement for *for-loop* in C/C++: the range bounds (`start`/`end`) are captured at the site of the rang...

Created - 1 comment - A-correctness E-easy L-lint T-middle

Lint `as_ref` on `&[u8]` rust-lang/rust-clippy

This is a nop and most likely a remnant of refactoring. Even better would be detecting `as_ref` on `&T` that yields `&T`

Created - 1 comment - A-unnecessary E-easy L-lint T-middle

Lint using |_| () instead of drop rust-lang/rust-clippy

Basically, any occurrence of `|_| ()` as a closure could be more clearly worded as `drop`.

Created - 1 comment - L-lint T-middle good first issue

Stronger macro check for identity-op and type-complexity rust-lang/rust-clippy

Macros are both used to make types easier to read and to create basic operations, sometimes relying on the compiler to remove identity operations so the macro is easier. Therefore I have written a ...

Created - 2 comments - C-needs-discussion E-easy L-bug T-middle

Lint for Unnecessary Map rust-lang/rust-clippy

It woud be nice if clippy could detect situations where `map()` is being used unnecessarily to pass a contained value wrapped as either a Result or an Option. ### Unnecessarry ``` rust let mut fil...

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

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 - 2 comments - A-style E-easy L-lint T-middle

Lint unwrap in drop impls rust-lang/rust-clippy

Would it make sense to deny panic-able fns in `Drop::drop` implementations? It recently came up in <https://github.com/diesel-rs/diesel/pull/641#discussion_r100066589>.

Created - 2 comments - A-correctness E-easy E-hard L-lint T-middle

Lint for iterating over a slice with one (or zero) element 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 - 2 comments - A-unnecessary E-easy L-lint T-middle

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

Always true expressions in if expressions 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 - 2 comments - A-correctness good first issue hacktoberfest L-lint T-middle

explicit_counter_loop improvement suggestion rust-lang/rust-clippy

Hello! I'm just learning rust and clippy has been a valuable resource for improving my code, thanks! Today I got confused by one of the clippy suggestions. I had a look at the source but not sure...

Created - 2 comments - E-easy L-bug T-middle

New Lint: Pass small trivially copyable objects by value 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 - 2 comments - A-performance E-easy T-middle

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

Lint calling `mem::swap` on a reference 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 - 2 comments - A-correctness C-needs-discussion E-easy L-lint T-middle

Suggest more-accurate float functions for hand-written formulas rust-lang/rust-clippy

Last summer I worked with MATLAB code that was copied-down from equations directly, when floating point math allows for a lot of optimisations that aren't always obvious, like `exp_m1`. Here are a ...

Created - 2 comments - A-performance E-easy E-medium L-lint T-middle

New lint: clone on arguments taken by reference rust-lang/rust-clippy

If a function takes an argument by reference, but later calls `.clone()` on it (or otherwise requires an `impl Clone` or `impl Copy` from it), lint that taking it by ownership allows the caller to ...

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

manual_memcpy false positive on overlapping slices rust-lang/rust-clippy

I'm performing operation analogous to `memmove`, not `memcpy`, so I can't replace it with `.clone_from_slice`: ```rust for i in 0..w { inout[d + i] = inout[s + i]; } ``` This copy can'...

Created - 2 comments - E-easy L-bug T-middle

Lint TryFrom with infalliable error type rust-lang/rust-clippy

Implementations of `TryFrom` should always have a falliable error type; instead, infalliable conversions should be implemented via `From` with the blanket conversion.

Created - 2 comments - A-unnecessary L-lint T-middle good first issue

Iterators: suggest `position()` instead of `enumerate() + find() + .0` 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 - 2 comments - good first issue T-middle

Catch use of PhantomData that requires T: Sized rust-lang/rust-clippy

In Serde the traits we implement for PhantomData should have worked for T: ?Sized, but as a bug they required T: Sized -- fixed in https://github.com/serde-rs/serde/commit/4751627f1cd14cacdf216188c...

Created - 2 comments - good first issue T-middle

Warn for non-scalar const values rust-lang/rust-clippy

https://github.com/servo/servo/pull/8086#issuecomment-149347157 This seems like an easy thing to mess up.

Created - 3 comments - E-easy L-lint T-middle

Displaying issues 1 - 30 of 64 in total

License

Language