3 ms·
let x; foobar(x); // error: borrow of possibly-uninitialized variable: `x` x = 42; possibly-uninitialized - Why does the compiler sound uncertain while emi
by techolic 6y ago
let x;
foobar(x); // error: borrow of possibly-uninitialized variable: `x`
x = 42;
possibly-uninitialized - Why does the compiler sound uncertain while emitting an error?
- steveklabnik 6y agoThe analysis is not perfect. It’s worded that way to acknowledge this fact. It also is language that works well when something may be initialized in some control flow paths but not all.