Skip to content

[arithmetic_side_effects] Constant fields are ignored #10792

Closed
@c410-f3r

Description

@c410-f3r
struct Foo {
  bar: u32,
}
const FOO: Foo = Foo { bar: 2 };
let _ = 10 / FOO.bar;

In fact, this is an issue that involves anything that uses clippy_utils::consts::constant.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions