hey, I'm having trouble with Rust optimizing around a channel implementation.

basically,

```rust
pub fn recv<T>() -> T {
    let tmp = UnsafeCell::<MaybeUninit<T>>::new(MaybeUninit::uninit());
    
    critical_section::with(|cs| /* magic */);
    
    let m = uc.into_inner(); 
    unsafe { m.assume_init() }
}
```

So the critical section takes `uc.prt()`, induces a context switch, ..., and I confirmed with the debugger that at the end of it, the memory that `uc.ptr()` returned contains the T it should. but `recv()` doesn't read that memory.
If I add `core::intrinsics::blackbox(uc.get())` after the critical section, `recv()` *does* return my T.

So the compiler seems to be optimizing away the read, and it probably has all the right to do so. but how do I implement this correctly?