These are chat archives for rust-lang/rust
This is one way of doing it:
let mut s = SomeStruct; let x = Some(&mut s).map(|s| s as &_);
I'm quite sure the call to
map will be optimized away, or at least be aggressively inlined.