Fix multiple issues pointed out by the new compiler

This commit is contained in:
Zhang Junyang
2024-10-13 21:39:47 +08:00
committed by Tate, Hongliang Tian
parent 5f2bd9d0ac
commit 9e4257b655
62 changed files with 211 additions and 178 deletions

View File

@ -208,6 +208,7 @@ impl<T: 'static + SingleInstructionBitXorAssign<T>> CpuLocalCell<T> {
///
/// Note that this memory operation will not be elided or reordered by the
/// compiler since it is a black-box.
#[allow(unused)]
pub fn bitxor_assign(&'static self, rhs: T) {
let offset = self as *const _ as usize - __cpu_local_start as usize;
// SAFETY: The CPU-local object is defined in the `.cpu_local` section,

View File

@ -114,6 +114,7 @@ pub trait SingleInstructionBitXorAssign<Rhs = Self> {
/// # Safety
///
/// Please refer to the module-level documentation of [`self`].
#[allow(unused)]
unsafe fn bitxor_assign(offset: *mut Self, rhs: Rhs);
}