509 B
509 B
A binding shadowed something it shouldn't.
Erroneous code example:
static TEST: i32 = 0;
let r: (i32, i32) = (0, 0);
match r {
TEST => {} // error: match bindings cannot shadow statics
}
To fix this error, just change the binding's name in order to avoid shadowing one of the following:
- struct name
- struct/enum variant
- static
- const
- associated const
Fixed example:
static TEST: i32 = 0;
let r: (i32, i32) = (0, 0);
match r {
something => {} // ok!
}