Mutable Static Variables
fn add_to_counter(inc: u32) {
fn main() {
unsafe { println!("COUNTER: {COUNTER}"); } // Potential data race!
}
fn add_to_counter(inc: u32) {
fn main() {
unsafe { println!("COUNTER: {COUNTER}"); } // Potential data race!
}
本文档使用 全库网 构建