Skip to content

Commit c51ba85

Browse files
committed
Update to nightly 2023-05-23
Minimal changes needed
1 parent 2fd0cfe commit c51ba85

File tree

6 files changed

+6
-14
lines changed

6 files changed

+6
-14
lines changed

libs/context/src/handle.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
use core::ptr::{self, NonNull, Pointee};
55
use core::marker::PhantomData;
66
use core::sync::atomic::{self, AtomicPtr, AtomicUsize, Ordering};
7+
use core::mem::ManuallyDrop;
78

89
use alloc::boxed::Box;
910
use alloc::vec::Vec;
@@ -323,8 +324,8 @@ impl<C: RawHandleImpl> GcHandleBucket<C> {
323324
/// depending on whether the value pointer is null.
324325
#[repr(C)]
325326
pub union HandleSlot<C: RawHandleImpl> {
326-
freed: FreedHandleSlot<C>,
327-
valid: GcRawHandle<C>
327+
freed: ManuallyDrop<FreedHandleSlot<C>>,
328+
valid: ManuallyDrop<GcRawHandle<C>>
328329
}
329330
impl<C: RawHandleImpl> HandleSlot<C> {
330331
/// Load the current value of this pointer
@@ -663,4 +664,4 @@ unsafe impl<C> HandleCollectorId for CollectorId<C>
663664
GcHandle::new(NonNull::from(raw), weak_collector, metadata)
664665
}
665666
}
666-
}
667+
}

libs/context/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#![feature(
22
negative_impls, // !Send is much cleaner than `PhantomData<Rc>`
3-
untagged_unions, // I want to avoid ManuallyDrop in unions
4-
generic_associated_types, // Finally!
53
ptr_metadata
64
)]
75
#![allow(

libs/context/src/state/sync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ unsafe impl<C> super::RawContext<C> for RawContext<C>
232232
let shadow_stack = &*self.shadow_stack.get();
233233
let ptr = self as *const RawContext<C> as *mut RawContext<C>;
234234
debug_assert!(state.known_contexts.get_mut().contains(&ptr));
235-
let mut pending = state.pending.as_mut().unwrap();
235+
let pending: &mut _ = state.pending.as_mut().unwrap();
236236
// Change our state to mark we are now waiting at a safepoint
237237
assert_eq!(self.state.replace(ContextState::SafePoint {
238238
collection_id: pending.id

libs/simple/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,13 @@
2525
negative_impls, // impl !Send is much cleaner than PhantomData<Rc<()>>
2626
exhaustive_patterns, // Allow exhaustive matching against never
2727
const_alloc_layout, // Used for StaticType
28-
untagged_unions, // Why isn't this stable?
2928
new_uninit, // Until Rust has const generics, this is how we init arrays..
3029
ptr_metadata, // Needed to abstract over Sized/unsized types
3130
// Used for const layout computation:
3231
const_mut_refs,
3332
const_align_of_val,
3433
// Needed for field_offset!
35-
const_ptr_offset_from,
3634
const_refs_to_cell,
37-
generic_associated_types
3835
)]
3936
#![feature(drain_filter)]
4037
#![allow(

src/epsilon.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ use crate::{CollectorId, GcContext, GcSafe, GcSimpleAlloc, GcSystem, Trace};
1717
use std::ptr::NonNull;
1818
use std::alloc::Layout;
1919
use std::rc::Rc;
20-
use std::cell::Cell;
21-
use std::lazy::OnceCell;
20+
use std::cell::{Cell, OnceCell};
2221

2322
use self::alloc::{EpsilonAlloc};
2423
use self::layout::EpsilonRawVec;

src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@
33
coerce_unsized, // RFC 0982 - DST coercion
44
unsize,
55
trait_alias, // RFC 1733 - Trait aliases
6-
generic_associated_types, // RFC 1598 - Generic associated types
76
// Needed for epsilon collector:
8-
once_cell, // RFC 2788 (Probably will be accepted)
97
negative_impls, // More elegant than marker types
108
alloc_layout_extra,
119
const_mut_refs,
1210
const_option,
13-
const_slice_from_raw_parts,
1411
const_transmute_copy,
1512
slice_range, // Convenient for bounds checking :)
1613
)]

0 commit comments

Comments
 (0)