mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-30 00:23:24 +00:00
Fix multiple issues pointed out by the new compiler
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
5f2bd9d0ac
commit
9e4257b655
@ -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,
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user