Skip to content

Commit 120af7f

Browse files
committed
Add explicit T: 'r to gc_alloc
1 parent 2e262b4 commit 120af7f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ impl<T: Trace> Arena<T> {
139139
capacity: 1000,
140140
}
141141
}
142-
pub fn gc_alloc<'r>(&'r self, _t: T) -> Gc<'r, T> {
142+
pub fn gc_alloc<'r>(&'r self, _t: T) -> Gc<'r, T>
143+
where
144+
T: 'r,
145+
{
143146
unimplemented!()
144147
}
145148

@@ -302,8 +305,7 @@ struct Foo<'r> {
302305
unsafe impl<'r> Trace for Foo<'r> {
303306
fn trace(_: &Foo<'r>) {}
304307
const TRACE_TYPE_INFO: GcTypeInfo = GcTypeInfo::new::<Self>();
305-
const TRACE_CHILD_TYPE_INFO: [Option<GcTypeInfo>; 8] =
306-
GcTypeInfo::one_child::<Gc<'r, usize>>();
308+
const TRACE_CHILD_TYPE_INFO: [Option<GcTypeInfo>; 8] = GcTypeInfo::one_child::<Gc<'r, usize>>();
307309
fn trace_transitive_type_info(tti: &mut Tti) {
308310
tti.add_direct::<Self>();
309311
tti.add_trans(Gc::<'r, usize>::trace_transitive_type_info);

0 commit comments

Comments
 (0)