mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 09:27:25 +00:00
ceea3c6a35
Add lint on large non scalar const This PR adds the new lint `non_scalar_const` that aims to warn against `const` declaration of large arrays. For performance, because of inlining, large arrays should be preferably declared as `static`. Note: i made this one to warn on all const arrays, whether they are in a body function or not. I don't know if this is really necessary, i could just reduce this lint to variables out of function scope. Fixes: #400 changelog: add new lint for large non-scalar types declared as const |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |