diff --git a/crates/jrsonnet-interner/Cargo.toml b/crates/jrsonnet-interner/Cargo.toml index c70bc5bf..fba704da 100644 --- a/crates/jrsonnet-interner/Cargo.toml +++ b/crates/jrsonnet-interner/Cargo.toml @@ -9,3 +9,4 @@ edition = "2018" [dependencies] serde = { version = "1.0" } rustc-hash = "1.1.0" +gc = { version = "0.4.1", features = ["derive"] } \ No newline at end of file diff --git a/crates/jrsonnet-interner/src/lib.rs b/crates/jrsonnet-interner/src/lib.rs index 51a0a0d2..9fc23cda 100644 --- a/crates/jrsonnet-interner/src/lib.rs +++ b/crates/jrsonnet-interner/src/lib.rs @@ -1,3 +1,4 @@ +use gc::{unsafe_empty_trace, Finalize, Trace}; use rustc_hash::FxHashMap; use serde::{Deserialize, Serialize}; use std::{ @@ -10,6 +11,10 @@ use std::{ #[derive(Clone, PartialOrd, Ord, Eq)] pub struct IStr(Rc); +impl Finalize for IStr {} +unsafe impl Trace for IStr { + unsafe_empty_trace!(); +} impl Deref for IStr { type Target = str;