@@ -85,7 +85,7 @@ pub unsafe trait RawCollectorImpl: 'static + Sized {
8585 owner : & Gc < ' gc , O , CollectorId < Self > > ,
8686 value : & Gc < ' gc , V , CollectorId < Self > > ,
8787 field_offset : usize
88- ) where O : GcSafe < ' gc , CollectorId < Self > > + ?Sized + ' gc , V : GcSafe < ' gc , CollectorId < Self > > + ?Sized + ' gc ;
88+ ) where O : GcSafe < ' gc , CollectorId < Self > > + ?Sized , V : GcSafe < ' gc , CollectorId < Self > > + ?Sized ;
8989 /// The logger associated with this collector
9090 fn logger ( & self ) -> & Logger ;
9191
@@ -302,21 +302,20 @@ unsafe impl<C: RawCollectorImpl> ::zerogc::CollectorId for CollectorId<C> {
302302 type System = CollectorRef < C > ;
303303 type RawVecRepr < ' gc > = C :: RawVecRepr < ' gc > ;
304304 // TODO: What if clients want to customize this?
305- type ArrayRepr < ' gc , T : ' gc > = zerogc:: array:: repr:: ThinArrayRepr < ' gc , T , Self > ;
305+ type ArrayRepr < ' gc , T > = zerogc:: array:: repr:: ThinArrayRepr < ' gc , T , Self > ;
306306
307307 #[ inline]
308- fn from_gc_ptr < ' a , ' gc , T > ( gc : & ' a Gc < ' gc , T , Self > ) -> & ' a Self where T : ?Sized + ' gc , ' gc : ' a {
308+ fn from_gc_ptr < ' a , ' gc , T > ( gc : & ' a Gc < ' gc , T , Self > ) -> & ' a Self where T : ?Sized , ' gc : ' a {
309309 C :: id_for_gc ( gc)
310310 }
311311
312312 #[ inline]
313- fn resolve_array_id < ' a , ' gc , T > ( gc : & ' a Self :: ArrayRepr < ' gc , T > ) -> & ' a Self where T : ' gc , ' gc : ' a {
313+ fn resolve_array_id < ' a , ' gc , T > ( gc : & ' a Self :: ArrayRepr < ' gc , T > ) -> & ' a Self where ' gc : ' a {
314314 C :: id_for_array ( gc)
315315 }
316316
317317 #[ inline]
318- fn resolve_array_len < ' gc , T > ( repr : & ThinArrayRepr < ' gc , T , Self > ) -> usize
319- where T : ' gc {
318+ fn resolve_array_len < ' gc , T > ( repr : & ThinArrayRepr < ' gc , T , Self > ) -> usize {
320319 C :: resolve_array_len ( repr)
321320 }
322321
@@ -325,7 +324,7 @@ unsafe impl<C: RawCollectorImpl> ::zerogc::CollectorId for CollectorId<C> {
325324 owner : & Gc < ' gc , O , Self > ,
326325 value : & Gc < ' gc , V , Self > ,
327326 field_offset : usize
328- ) where O : GcSafe < ' gc , Self > + ?Sized + ' gc , V : GcSafe < ' gc , Self > + ?Sized + ' gc {
327+ ) where O : GcSafe < ' gc , Self > + ?Sized , V : GcSafe < ' gc , Self > + ?Sized {
329328 C :: gc_write_barrier ( owner, value, field_offset)
330329 }
331330
@@ -341,7 +340,7 @@ unsafe impl<C: RawCollectorImpl> ::zerogc::CollectorId for CollectorId<C> {
341340}
342341unsafe impl < C : ~const ConstRawCollectorImpl > const zerogc:: internals:: ConstCollectorId for CollectorId < C > {
343342 #[ inline]
344- fn resolve_array_len_const < ' gc , T > ( repr : & Self :: ArrayRepr < ' gc , T > ) -> usize where T : ' gc {
343+ fn resolve_array_len_const < ' gc , T > ( repr : & Self :: ArrayRepr < ' gc , T > ) -> usize {
345344 C :: resolve_array_len_const ( repr)
346345 }
347346}
@@ -390,8 +389,8 @@ impl<C: RawCollectorImpl> WeakCollectorRef<C> {
390389}
391390
392391pub unsafe trait RawSimpleAlloc : RawCollectorImpl {
393- unsafe fn alloc_uninit < ' gc , T : GcSafe < ' gc , CollectorId < Self > > > ( context : & ' gc CollectorContext < Self > ) -> ( CollectorId < Self > , * mut T ) ;
394- unsafe fn alloc_uninit_slice < ' gc , T > ( context : & ' gc CollectorContext < Self > , len : usize ) -> ( CollectorId < Self > , * mut T )
392+ unsafe fn alloc_uninit < ' gc , T : GcSafe < ' gc , CollectorId < Self > > > ( context : & ' gc CollectorContext < Self > ) -> * mut T ;
393+ unsafe fn alloc_uninit_slice < ' gc , T > ( context : & ' gc CollectorContext < Self > , len : usize ) -> * mut T
395394 where T : GcSafe < ' gc , CollectorId < Self > > ;
396395 fn alloc_vec < ' gc , T > ( context : & ' gc CollectorContext < Self > ) -> GcVec < ' gc , T , CollectorContext < Self > >
397396 where T : GcSafe < ' gc , CollectorId < Self > > ;
@@ -401,24 +400,24 @@ pub unsafe trait RawSimpleAlloc: RawCollectorImpl {
401400unsafe impl < C > GcSimpleAlloc for CollectorContext < C >
402401 where C : RawSimpleAlloc {
403402 #[ inline]
404- unsafe fn alloc_uninit < ' gc , T > ( & ' gc self ) -> ( CollectorId < C > , * mut T )
405- where T : GcSafe < ' gc , CollectorId < C > > + ' gc {
403+ unsafe fn alloc_uninit < ' gc , T > ( & ' gc self ) -> * mut T
404+ where T : GcSafe < ' gc , CollectorId < C > > {
406405 C :: alloc_uninit ( self )
407406 }
408407
409408 #[ inline]
410- unsafe fn alloc_uninit_slice < ' gc , T > ( & ' gc self , len : usize ) -> ( Self :: Id , * mut T )
411- where T : GcSafe < ' gc , CollectorId < C > > + ' gc {
409+ unsafe fn alloc_uninit_slice < ' gc , T > ( & ' gc self , len : usize ) -> * mut T
410+ where T : GcSafe < ' gc , CollectorId < C > > {
412411 C :: alloc_uninit_slice ( self , len)
413412 }
414413
415414 #[ inline]
416- fn alloc_vec < ' gc , T > ( & ' gc self ) -> GcVec < ' gc , T , Self > where T : GcSafe < ' gc , CollectorId < C > > + ' gc {
415+ fn alloc_vec < ' gc , T > ( & ' gc self ) -> GcVec < ' gc , T , Self > where T : GcSafe < ' gc , CollectorId < C > > {
417416 C :: alloc_vec ( self )
418417 }
419418
420419 #[ inline]
421- fn alloc_vec_with_capacity < ' gc , T > ( & ' gc self , capacity : usize ) -> GcVec < ' gc , T , Self > where T : GcSafe < ' gc , CollectorId < C > > + ' gc {
420+ fn alloc_vec_with_capacity < ' gc , T > ( & ' gc self , capacity : usize ) -> GcVec < ' gc , T , Self > where T : GcSafe < ' gc , CollectorId < C > > {
422421 C :: alloc_vec_with_capacity ( self , capacity)
423422 }
424423}
0 commit comments