From baf3fa522d2932c29b8530696952c5a5f8b1a64b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Mar 2026 22:44:32 +0000 Subject: [PATCH 1/2] Initial plan From 0376dba02cb982b56e9be897fca5b381df1bc2ca Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Mar 2026 22:53:48 +0000 Subject: [PATCH 2/2] Add Trace/Finalize impls for Path/PathBuf; set edition in oscars_derive Co-authored-by: shruti2522 <98698727+shruti2522@users.noreply.github.com> --- oscars/src/collectors/mark_sweep/trace.rs | 16 ++++++++++++++++ oscars_derive/Cargo.toml | 1 + 2 files changed, 17 insertions(+) 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]