Skip to content

Lint bit operations with decimal constants #1775

@clarfonthey

Description

@clarfonthey

For example, something like x & 12 could be better represented as x & 0b1100, and x | 1024 could be better represented as x | (1 << 9).

Not sure the extent to which this should be, but it'd be nice if we could cover a few cases.

Metadata

Metadata

Assignees

Labels

A-lintArea: New lintsL-styleLint: Belongs in the style lint groupT-middleType: Probably requires verifiying typesgood first issueThese issues are a good way to get started with Clippy

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions