difftreelog
feat(jrsonnet-types) implement gc
in: master
It is currently not possible to implement recursive type, so all tracing is noop here
2 files changed
crates/jrsonnet-types/Cargo.tomldiffbeforeafterboth--- a/crates/jrsonnet-types/Cargo.toml
+++ b/crates/jrsonnet-types/Cargo.toml
@@ -8,3 +8,4 @@
[dependencies]
peg = "0.7.0"
+gc = { version = "0.4.1", features = ["derive"] }
crates/jrsonnet-types/src/lib.rsdiffbeforeafterboth1#![allow(clippy::redundant_closure_call)]1#![allow(clippy::redundant_closure_call)]223use gc::{unsafe_empty_trace, Finalize, Trace};3use std::fmt::Display;4use std::fmt::Display;455#[macro_export]6#[macro_export]87 Obj,88 Obj,88 Func,89 Func,89}90}91impl Finalize for ValType {}92unsafe impl Trace for ValType {93 unsafe_empty_trace!();94}909591impl ValType {96impl ValType {92 pub const fn name(&self) -> &'static str {97 pub const fn name(&self) -> &'static str {123 Sum(Vec<ComplexValType>),128 Sum(Vec<ComplexValType>),124 SumRef(&'static [ComplexValType]),129 SumRef(&'static [ComplexValType]),125}130}131impl Finalize for ComplexValType {}132unsafe impl Trace for ComplexValType {133 unsafe_empty_trace!();134}135126impl From<ValType> for ComplexValType {136impl From<ValType> for ComplexValType {127 fn from(s: ValType) -> Self {137 fn from(s: ValType) -> Self {