Unused variables lint does not work inside an array length expression #77169
Labels
A-HIR
Area: The high-level intermediate representation (HIR)
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Array length expressions can can do anything that a
const
initializer can. However, the unused variables lint does not work inside an array length expression. For example,(Playground)
...compiles with no warnings:
The text was updated successfully, but these errors were encountered: