diff --git a/oscars/src/collectors/mark_sweep/trace.rs b/oscars/src/collectors/mark_sweep/trace.rs index d15f698..7f0c943 100644 --- a/oscars/src/collectors/mark_sweep/trace.rs +++ b/oscars/src/collectors/mark_sweep/trace.rs @@ -423,6 +423,22 @@ unsafe impl Trace for HashSet { }); } +#[cfg(feature = "std")] +impl Finalize for Path {} +#[cfg(feature = "std")] +// SAFETY: `Path` is a leaf type with no inner GC-managed references to trace. +unsafe impl Trace for Path { + empty_trace!(); +} + +#[cfg(feature = "std")] +impl Finalize for PathBuf {} +#[cfg(feature = "std")] +// SAFETY: `PathBuf` is a leaf type with no inner GC-managed references to trace. +unsafe impl Trace for PathBuf { + empty_trace!(); +} + impl Finalize for LinkedList {} // SAFETY: All the elements of the `LinkedList` are correctly marked. unsafe impl Trace for LinkedList { diff --git a/oscars_derive/Cargo.toml b/oscars_derive/Cargo.toml index 8784e2b..645494e 100644 --- a/oscars_derive/Cargo.toml +++ b/oscars_derive/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "oscars_derive" version = "0.1.0" +edition = "2021" description = "Macros for oscars." [lib]