Skip to content

Commit d0af2e3

Browse files
committed
Fix <&'static [u32] as Trace> bound
Adds T: ?Sized bound to &T impls
1 parent 512a113 commit d0af2e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/manually_traced/core.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ unsafe_gc_impl! {
223223
*/
224224
unsafe_gc_impl! {
225225
target => &'a T,
226-
params => ['a, T: 'a],
226+
params => ['a, T: ?Sized + 'a],
227227
bounds => {
228228
Trace => { where T: TraceImmutable },
229229
TraceImmutable => { where T: TraceImmutable },
@@ -406,7 +406,7 @@ mod test {
406406
assert!(!<Option<(i32, char)> as Trace>::NEEDS_TRACE);
407407
// PhantomData is NullTrace regardless of inside
408408
assert!(!<PhantomData<Gc<'gc, i32>> as Trace>::NEEDS_TRACE);
409-
409+
assert!(!<&'static [u32] as Trace>::NEEDS_TRACE);
410410
}
411411
#[derive(Trace)]
412412
#[zerogc(collector_ids(EpsilonCollectorId))]

0 commit comments

Comments
 (0)