How to cast a litteral to mut in rust without using a temporary variable?

后端 未结 0 1402
自闭症患者
自闭症患者 2020-12-28 18:29

this is for passing to a function taking *mut T

pub unsafe fn a() {
    std::ptr::write_volatile(&581684,1);
}

Which of cour

相关标签:
回答
  • 消灭零回复
提交回复
热议问题