Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions oscars/src/collectors/mark_sweep/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,22 @@ unsafe impl<T: Eq + Hash + Trace, S: BuildHasher> Trace for HashSet<T, S> {
});
}

#[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<T: Eq + Hash + Trace> Finalize for LinkedList<T> {}
// SAFETY: All the elements of the `LinkedList` are correctly marked.
unsafe impl<T: Eq + Hash + Trace> Trace for LinkedList<T> {
Expand Down
1 change: 1 addition & 0 deletions oscars_derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "oscars_derive"
version = "0.1.0"
edition = "2021"
description = "Macros for oscars."

[lib]
Expand Down