InteriorAssign trait { a := b }
Rust Internals [Unofficial]
May 10, 2026
bluelightzero:
For completeness, the current way to do this would be:
It could be defined to do that, or it could be defined to do:
if let Some(num) = &mut num { *num = 13; }
or
*num.as_mut().unwrap() = 13;
I didn't really mean to use Option as a motivating example, just a simple one.
Discussion in the ATmosphere