Skip to content

Commit

Permalink
docs(data_structures): uppercase SAFETY comments (#9330)
Browse files Browse the repository at this point in the history
Our convention is to uppercase `# SAFETY` doc comments.
  • Loading branch information
overlookmotel committed Feb 24, 2025
1 parent 690bae5 commit 8bd3e39
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions crates/oxc_data_structures/src/stack/non_empty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl<T> NonEmptyStack<T> {
/// # Panics
/// Panics if `T` is a zero-sized type.
///
/// # Safety
/// # SAFETY
///
/// * `capacity` must not be 0.
/// * `capacity` must not exceed [`Self::MAX_CAPACITY`].
Expand Down Expand Up @@ -326,7 +326,7 @@ impl<T> NonEmptyStack<T> {

/// Pop value from stack, without checking that stack isn't empty.
///
/// # Safety
/// # SAFETY
///
/// * Stack must have at least 2 entries, so that after pop, it still has at least 1.
#[inline]
Expand Down
8 changes: 4 additions & 4 deletions crates/oxc_data_structures/src/stack/standard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ impl<T> Stack<T> {
/// # Panics
/// Panics if `T` is a zero-sized type.
///
/// # Safety
/// # SAFETY
///
/// * `capacity` must not be 0.
/// * `capacity` must not exceed [`Self::MAX_CAPACITY`].
Expand Down Expand Up @@ -204,7 +204,7 @@ impl<T> Stack<T> {

/// Get reference to last value on stack, without checking stack isn't empty.
///
/// # Safety
/// # SAFETY
///
/// * Stack must not be empty.
#[inline]
Expand Down Expand Up @@ -233,7 +233,7 @@ impl<T> Stack<T> {

/// Get mutable reference to last value on stack, without checking stack isn't empty.
///
/// # Safety
/// # SAFETY
///
/// * Stack must not be empty.
#[inline]
Expand Down Expand Up @@ -317,7 +317,7 @@ impl<T> Stack<T> {

/// Pop value from stack, without checking that stack isn't empty.
///
/// # Safety
/// # SAFETY
///
/// * Stack must not be empty.
#[inline]
Expand Down

0 comments on commit 8bd3e39

Please sign in to comment.