Skip to content

Commit 91473f8

Browse files
committed
Update zerogc to v0.2.0-alpha.2
1 parent 68a96a9 commit 91473f8

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ readme = "README.md"
99

1010
[dependencies]
1111
# Optional: Support for zerogc
12-
zerogc = { version = "0.1.3", optional = true }
12+
zerogc = { version = "0.2.0-alpha.2", optional = true }
13+
zerogc-derive = { version = "0.2.0-alpha.2", optional = true }
1314
# Optional: Support for numeric traits
1415
num-traits = { version = "0.2.14", optional = true }
1516

@@ -22,4 +23,4 @@ builtins = []
2223

2324

2425
[workspace]
25-
members = ["lib/*"]
26+
members = ["lib/*"]

src/builtins.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use std::mem::MaybeUninit;
66
use crate::{StaticReflect, field_offset, TypeInfo};
77

8+
#[cfg(feature = "zerogc")]
9+
use zerogc_derive::Trace;
10+
811
/// A FFi-safe slice type (`&[T]`)
912
///
1013
/// Unlike the rust type, this has a well-defined C representation.
@@ -67,6 +70,7 @@ unsafe impl<T: Sync> Send for AsmSlice<T> {}
6770
#[cfg_attr(feature = "zerogc", zerogc(nop_trace, copy))]
6871
pub struct AsmStr {
6972
/// The underlying memory of the string
73+
#[cfg_attr(feature = "zerogc", zerogc(unsafe_skip_trace))]
7074
pub bytes: AsmSlice<u8>
7175
}
7276
impl AsmStr {
@@ -177,4 +181,4 @@ unsafe impl<T: StaticReflect> StaticReflect for AsmOption<T> {
177181
}
178182

179183
/// This is an owned value, so it's safe to send
180-
unsafe impl<T: Send> Send for AsmOption<T> {}
184+
unsafe impl<T: Send> Send for AsmOption<T> {}

0 commit comments

Comments
 (0)