File tree 3 files changed +11
-9
lines changed 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " static-reflect"
3
- version = " 0.1.7 "
3
+ version = " 0.1.8 "
4
4
edition = " 2018"
5
5
description = " Static type information, giving a form of compile-time reflection"
6
6
license = " MIT"
@@ -9,8 +9,8 @@ readme = "README.md"
9
9
10
10
[dependencies ]
11
11
# 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 }
14
14
# Optional: Support for numeric traits
15
15
num-traits = { version = " 0.2.14" , optional = true }
16
16
@@ -20,6 +20,8 @@ default = ["never", "builtins"]
20
20
never = []
21
21
# Support the 'builtin' alternative to stdlib types
22
22
builtins = []
23
+ # Support for garbage collection
24
+ gc = [" zerogc" , " zerogc-derive" ]
23
25
24
26
# Workaround for outdated nightly
25
27
docs-rs = []
Original file line number Diff line number Diff line change 5
5
use std:: mem:: MaybeUninit ;
6
6
use crate :: { StaticReflect , field_offset, TypeInfo } ;
7
7
8
- #[ cfg( feature = "zerogc " ) ]
8
+ #[ cfg( feature = "gc " ) ]
9
9
use zerogc_derive:: Trace ;
10
10
11
11
/// A FFi-safe slice type (`&[T]`)
@@ -66,11 +66,11 @@ unsafe impl<T: Sync> Send for AsmSlice<T> {}
66
66
/// and this type does not maintain any invariants.
67
67
#[ repr( C ) ]
68
68
#[ 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) ) ]
71
71
pub struct AsmStr {
72
72
/// The underlying memory of the string
73
- #[ cfg_attr( feature = "zerogc " , zerogc( unsafe_skip_trace) ) ]
73
+ #[ cfg_attr( feature = "gc " , zerogc( unsafe_skip_trace) ) ]
74
74
pub bytes : AsmSlice < u8 >
75
75
}
76
76
impl AsmStr {
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ pub enum TypeInfo<'a> {
211
211
*/
212
212
#[ cfg( feature = "gc" ) ]
213
213
unsafe_gc_impl ! {
214
- target => AsmType <' a>,
214
+ target => TypeInfo <' a>,
215
215
params => [ ' a] ,
216
216
bounds => {
217
217
Trace => always,
@@ -565,7 +565,7 @@ pub struct TypeId<'a, T: StaticReflect = ()> {
565
565
#[ cfg( feature = "gc" ) ]
566
566
unsafe_gc_impl ! {
567
567
target => TypeId <' a, T >,
568
- params => [ ' a, T : AsmRepr ] ,
568
+ params => [ ' a, T : StaticReflect ] ,
569
569
bounds => {
570
570
Trace => always,
571
571
TraceImmutable => always,
You can’t perform that action at this time.
0 commit comments