Skip to content

Commit c8df434

Browse files
committed
Implement zerogc::Trace for AsmStr
AsmSlice and AsmOption may not be safe to ignore, and are not nessicarrily in a valid state to trace. Thus, it is the user's responsibility to handle them.
1 parent 7a710de commit c8df434

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/builtins.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ unsafe impl<T: Sync> Send for AsmSlice<T> {}
6363
/// and this type does not maintain any invariants.
6464
#[repr(C)]
6565
#[derive(Copy, Clone, Debug)]
66+
#[cfg_attr(feature = "zerogc", derive(Trace))]
67+
#[cfg_attr(feature = "zerogc", zerogc(nop_trace, copy))]
6668
pub struct AsmStr {
6769
/// The underlying memory of the string
6870
pub bytes: AsmSlice<u8>

0 commit comments

Comments
 (0)