Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/plan/concurrent/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ use bytemuck::NoUninit;
// TODO: This is probably not be general enough for all the concurrent plans.
// TODO: We could consider moving this to specific plans later.
#[repr(u8)]
#[derive(Debug, PartialEq, Eq, Copy, Clone, NoUninit)]
#[derive(Debug, PartialEq, Eq, Copy, Clone, NoUninit, Default)]
pub enum Pause {
/// A whole GC (including root scanning, closure, releasing, etc.) happening in a single pause.
///
/// Don't be confused with "full-heap" GC in generational collectors. `Pause::Full` can also
/// refer to a nursery GC that happens in a single pause.
#[default]
Full = 1,
/// The initial pause before concurrent marking.
InitialMark,
Expand All @@ -26,9 +27,3 @@ pub enum Pause {
unsafe impl bytemuck::ZeroableInOption for Pause {}

unsafe impl bytemuck::PodInOption for Pause {}

impl Default for Pause {
fn default() -> Self {
Self::Full
}
}
9 changes: 8 additions & 1 deletion src/policy/sft_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,14 @@ impl SFTRefStorage {
// Load with the acquire ordering.
pub fn load(&self) -> &dyn SFT {
let val = self.0.load(Ordering::Acquire);
unsafe { std::mem::transmute(val) }
// Provenance-related APIs were stabilized in Rust 1.84.
// Rust 1.91 introduced the warn-by-default lint `integer_to_ptr_transmutes`.
// Since our MSRV is still 1.74.1, we can't fix it until bumping MSRV.
#[allow(unknown_lints)]
#[allow(integer_to_ptr_transmutes)]
unsafe {
std::mem::transmute(val)
}
}

// Store a raw SFT pointer with the release ordering.
Expand Down
9 changes: 8 additions & 1 deletion src/util/erase_vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ macro_rules! define_erased_vm_mut_ref {
Self(worker_as_usize, PhantomData)
}
pub fn into_mut<VM: VMBinding>(self) -> &'a mut $orig_type {
unsafe { std::mem::transmute(self.0) }
// Provenance-related APIs were stabilized in Rust 1.84.
// Rust 1.91 introduced the warn-by-default lint `integer_to_ptr_transmutes`.
// Since our MSRV is still 1.74.1, we can't fix it until bumping MSRV.
#[allow(unknown_lints)]
#[allow(integer_to_ptr_transmutes)]
unsafe {
std::mem::transmute(self.0)
}
}
}
};
Expand Down