Wrong "This declaration is never used." warning when variables are used only in reassignment LHS in index expressions
ironcev opened this issue · comments
Igor Rončević commented
E.g., this example will emit a false warning:
script;
fn main() {
let i = 0;
// - This declaration is never used. <<<----- WRONG WARNING.
let mut array = [1, 2, 3];
array[i] = 0; // <<<----- `i` is used here.
}