Add SAFETY comment for atomic example
This commit is contained in:
parent
0f2ee495e9
commit
022a7de26f
@ -1989,7 +1989,9 @@ extern {
|
||||
}
|
||||
|
||||
let mut atomic = ", stringify!($atomic_type), "::new(1);
|
||||
unsafe {
|
||||
",
|
||||
// SAFETY: Safe as long as `my_atomic_op` is atomic.
|
||||
"unsafe {
|
||||
my_atomic_op(atomic.as_mut_ptr());
|
||||
}
|
||||
# }
|
||||
|
Loading…
x
Reference in New Issue
Block a user