Skip to content

Commit 96e66cd

Browse files
committed
Release 0.1.8
Update zerogc to 0.2.0-alpha.4
1 parent d8becd2 commit 96e66cd

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

Cargo.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "static-reflect"
3-
version = "0.1.7"
3+
version = "0.1.8"
44
edition = "2018"
55
description = "Static type information, giving a form of compile-time reflection"
66
license = "MIT"
@@ -9,8 +9,8 @@ readme = "README.md"
99

1010
[dependencies]
1111
# Optional: Support for zerogc
12-
zerogc = { version = "0.2.0-alpha.3", optional = true }
13-
zerogc-derive = { version = "0.2.0-alpha.3", optional = true }
12+
zerogc = { version = "0.2.0-alpha.4", optional = true }
13+
zerogc-derive = { version = "0.2.0-alpha.4", optional = true }
1414
# Optional: Support for numeric traits
1515
num-traits = { version = "0.2.14", optional = true }
1616

@@ -20,6 +20,8 @@ default = ["never", "builtins"]
2020
never = []
2121
# Support the 'builtin' alternative to stdlib types
2222
builtins = []
23+
# Support for garbage collection
24+
gc = ["zerogc", "zerogc-derive"]
2325

2426
# Workaround for outdated nightly
2527
docs-rs = []

src/builtins.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use std::mem::MaybeUninit;
66
use crate::{StaticReflect, field_offset, TypeInfo};
77

8-
#[cfg(feature = "zerogc")]
8+
#[cfg(feature = "gc")]
99
use zerogc_derive::Trace;
1010

1111
/// A FFi-safe slice type (`&[T]`)
@@ -66,11 +66,11 @@ unsafe impl<T: Sync> Send for AsmSlice<T> {}
6666
/// and this type does not maintain any invariants.
6767
#[repr(C)]
6868
#[derive(Copy, Clone, Debug)]
69-
#[cfg_attr(feature = "zerogc", derive(Trace))]
70-
#[cfg_attr(feature = "zerogc", zerogc(nop_trace, copy))]
69+
#[cfg_attr(feature = "gc", derive(Trace))]
70+
#[cfg_attr(feature = "gc", zerogc(nop_trace, copy))]
7171
pub struct AsmStr {
7272
/// The underlying memory of the string
73-
#[cfg_attr(feature = "zerogc", zerogc(unsafe_skip_trace))]
73+
#[cfg_attr(feature = "gc", zerogc(unsafe_skip_trace))]
7474
pub bytes: AsmSlice<u8>
7575
}
7676
impl AsmStr {

src/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ pub enum TypeInfo<'a> {
211211
*/
212212
#[cfg(feature = "gc")]
213213
unsafe_gc_impl! {
214-
target => AsmType<'a>,
214+
target => TypeInfo<'a>,
215215
params => ['a],
216216
bounds => {
217217
Trace => always,
@@ -565,7 +565,7 @@ pub struct TypeId<'a, T: StaticReflect = ()> {
565565
#[cfg(feature = "gc")]
566566
unsafe_gc_impl! {
567567
target => TypeId<'a, T>,
568-
params => ['a, T: AsmRepr],
568+
params => ['a, T: StaticReflect],
569569
bounds => {
570570
Trace => always,
571571
TraceImmutable => always,

0 commit comments

Comments
 (0)