Having "fun" with `let` bindings
⚓ Rust 📅 2025-05-03 👤 surdeus 👁️ 10Can someone explain what ... this is supposed to mean?
fn main() {
let a @ b @ c @ ref mut d;
a = true;
d = &mut false;
b = c; // error[E0381]: used binding `c` isn't initialized -- but WHY?
}
Isn't the @ supposed to own, or reference, the same value?
Why in the world would I even be allowed to do this - in the very first place?
4 posts - 2 participants
🏷️ rust_feed