Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
zakarumych committed May 22, 2023
1 parent 9dde6d8 commit bb5ddd4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/stable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pub mod vec;
#[cfg(feature = "alloc")]
mod macros;

#[cfg(feature = "alloc")]
#[track_caller]
#[inline(always)]
#[cfg(debug_assertions)]
Expand All @@ -24,6 +25,8 @@ unsafe fn assume(v: bool) {
}
}

#[cfg(feature = "alloc")]
#[track_caller]
#[inline(always)]
#[cfg(not(debug_assertions))]
unsafe fn assume(v: bool) {
Expand All @@ -32,6 +35,7 @@ unsafe fn assume(v: bool) {
}
}

#[cfg(feature = "alloc")]
#[inline(always)]
fn addr<T>(x: *const T) -> usize {
#[allow(clippy::useless_transmute, clippy::transmutes_expressible_as_ptr_casts)]
Expand All @@ -40,6 +44,7 @@ fn addr<T>(x: *const T) -> usize {
}
}

#[cfg(feature = "alloc")]
#[inline(always)]
fn invalid_mut<T>(addr: usize) -> *mut T {
#[allow(clippy::useless_transmute, clippy::transmutes_expressible_as_ptr_casts)]
Expand Down

0 comments on commit bb5ddd4

Please sign in to comment.