Skip to content

Commit fb9a554

Browse files
committed
Update to nightly 2022-02-08
Specify more explicit types to workaround GAT inference problems
1 parent c3e1955 commit fb9a554

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

libs/context/src/collector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ unsafe impl<C> GcSimpleAlloc for CollectorContext<C>
387387

388388
#[inline]
389389
fn alloc_raw_vec_with_capacity<'gc, T>(&'gc self, capacity: usize) -> C::RawVec<'gc, T> where T: GcSafe<'gc, CollectorId<C>> {
390-
C::alloc_raw_vec_with_capacity(self, capacity)
390+
C::alloc_raw_vec_with_capacity::<T>(self, capacity)
391391
}
392392
}
393393

libs/simple/src/layout.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ unsafe impl<'gc, T: GcSafe<'gc, crate::CollectorId>> IGcVec<'gc, T> for SimpleVe
334334

335335
#[inline]
336336
pub fn with_capacity_in(capacity: usize, ctx: &'gc crate::SimpleCollectorContext) -> Self {
337-
ctx.alloc_raw_vec_with_capacity(capacity)
337+
ctx.alloc_raw_vec_with_capacity::<T>(capacity)
338338
}
339339

340340
#[inline]

libs/simple/tests/trait_objects.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![feature(thread_local_const_init)]
21
use core::cell::Cell;
32

43
use zerogc::{Trace, safepoint, DynTrace, trait_object_trace, GcSimpleAlloc};
@@ -73,4 +72,4 @@ fn foo_bar() {
7372
// Trace inner, should end up dropping Bar
7473
safepoint!(context, ());
7574
assert_eq!(BAR_DROP_COUNT.with(Cell::get), 2, "Expected Bar to be dropped");
76-
}
75+
}

src/epsilon/layout.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ unsafe impl<'gc, T: GcSafe<'gc, EpsilonCollectorId>> IGcVec<'gc, T> for EpsilonR
241241

242242
#[inline]
243243
pub fn with_capacity_in(capacity: usize, ctx: &'gc EpsilonContext) -> Self {
244-
ctx.alloc_raw_vec_with_capacity(capacity)
244+
ctx.alloc_raw_vec_with_capacity::<T>(capacity)
245245
}
246246

247247
#[inline]
@@ -307,4 +307,4 @@ impl<'gc, T: GcSafe<'gc, EpsilonCollectorId>> Extend<T> for EpsilonRawVec<'gc, T
307307
self.push(val);
308308
}
309309
}
310-
}
310+
}

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ pub unsafe trait GcSimpleAlloc: GcContext {
592592
fn alloc_vec<'gc, T>(&'gc self) -> GcVec<'gc, T, Self::Id>
593593
where T: GcSafe<'gc, Self::Id> {
594594
unsafe {
595-
crate::vec::GcVec::from_raw(self.alloc_raw_vec_with_capacity(0))
595+
crate::vec::GcVec::from_raw(self.alloc_raw_vec_with_capacity::<T>(0))
596596
}
597597
}
598598
/// Allocate a new [GcVec] with the specified capacity
@@ -601,7 +601,7 @@ pub unsafe trait GcSimpleAlloc: GcContext {
601601
fn alloc_vec_with_capacity<'gc, T>(&'gc self, capacity: usize) -> GcVec<'gc, T, Self::Id>
602602
where T: GcSafe<'gc, Self::Id> {
603603
unsafe {
604-
crate::vec::GcVec::from_raw(self.alloc_raw_vec_with_capacity(capacity))
604+
crate::vec::GcVec::from_raw(self.alloc_raw_vec_with_capacity::<T>(capacity))
605605
}
606606
}
607607
}

0 commit comments

Comments
 (0)