Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint to warn on identity operations (e.g. x + 0) #54

Closed
llogiq opened this issue May 15, 2015 · 0 comments
Closed

lint to warn on identity operations (e.g. x + 0) #54

llogiq opened this issue May 15, 2015 · 0 comments
Assignees

Comments

@llogiq
Copy link
Contributor

llogiq commented May 15, 2015

Patterns to match:

x + 0, x - 0, x | 0, x << 0, x >> 0, x ^ 0, x * 1, x / 1, x & -1

(and vice versa, e.g. 0 + x)

Note that x & x and x | x are already handled by eq_op, so we won't include them here

@llogiq llogiq self-assigned this May 15, 2015
@llogiq llogiq closed this as completed May 15, 2015
yaahc pushed a commit to yaahc/rust-clippy that referenced this issue Mar 14, 2019
This generates errors for malformed semver versions during the decoding process
rather than later in the convertion to a package id. This also cuts down on the
large number of derived traits to only what's necessary.

Closes rust-lang#54
yaahc pushed a commit to yaahc/rust-clippy that referenced this issue Mar 14, 2019
This generates errors for malformed semver versions during the decoding process
rather than later in the convertion to a package id. This also cuts down on the
large number of derived traits to only what's necessary.

Closes rust-lang#54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant