Skip to content

Commit

Permalink
Make // SAFETY comment part of the doctest, and not surrounding code
Browse files Browse the repository at this point in the history
  • Loading branch information
WaffleLapkin committed Jan 12, 2023
1 parent f1a63bc commit 22b4c68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/sync/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2716,7 +2716,7 @@ macro_rules! atomic_int {
///
#[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());
/// }
Expand Down

0 comments on commit 22b4c68

Please sign in to comment.