Skip to content

Use const_eval instead of constant for more lints? #461

Open
@llogiq

Description

@llogiq
  • eq_op won't join here because we expressly only want syntactically equal expressions
  • bit_mask uses it
  • float_cmp uses it
  • approx_const doesn't even need constant because we only want to match literals
  • zero_div_zero might probably be able to use it
  • min_max might use it (but we currently bail on refs, so it's debatable whether it should)
  • loops could benefit from it
  • identity_op shouldn't use it because it bails on refs and it's so low-payoff that a full const_eval isn't worth it

What do you folks think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions