Skip to content

Commit b9d9141

Browse files
committed
Drop the T: GcSafe bound on Gc
Makes profing `Gc: Copy` unessicarrily difficult.
1 parent c639baa commit b9d9141

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ pub unsafe trait CollectorId: Copy + Eq + Debug + NullTrace + TrustedDrop + 'sta
625625
/// Unsafe code can rely on a pointer always dereferencing to the same value in between
626626
/// safepoints. This is true even for copying/moving collectors.
627627
#[repr(transparent)]
628-
pub struct Gc<'gc, T: GcSafe<'gc, Id> + ?Sized, Id: CollectorId> {
628+
pub struct Gc<'gc, T: ?Sized + 'gc, Id: CollectorId> {
629629
value: NonNull<T>,
630630
/// Marker struct used to statically identify the collector's type
631631
///
@@ -745,8 +745,8 @@ unsafe impl<'gc, O, V, Id> GcDirectBarrier<'gc, Gc<'gc, O, Id>> for Gc<'gc, V,Id
745745
}
746746
}
747747
// We can be copied freely :)
748-
impl<'gc, T: GcSafe<'gc, Id> + ?Sized, Id: CollectorId> Copy for Gc<'gc, T, Id> {}
749-
impl<'gc, T: GcSafe<'gc, Id> + ?Sized, Id: CollectorId> Clone for Gc<'gc, T, Id> {
748+
impl<'gc, T: ?Sized, Id: CollectorId> Copy for Gc<'gc, T, Id> {}
749+
impl<'gc, T: ?Sized, Id: CollectorId> Clone for Gc<'gc, T, Id> {
750750
#[inline(always)]
751751
fn clone(&self) -> Self {
752752
*self

0 commit comments

Comments
 (0)