Make // SAFETY comment part of the doctest, and not surrounding code

This commit is contained in:
Maybe Waffle 2023-01-12 07:28:43 +00:00
parent f1a63bc2dd
commit 22b4c68895

View File

@ -2716,7 +2716,7 @@ pub fn fetch_min(&self, val: $int_type, order: Ordering) -> $int_type {
///
#[doc = concat!("let atomic = ", stringify!($atomic_type), "::new(1);")]
///
// SAFETY: Safe as long as `my_atomic_op` is atomic.
/// // SAFETY: Safe as long as `my_atomic_op` is atomic.
/// unsafe {
/// my_atomic_op(atomic.as_mut_ptr());
/// }