@@ -85,7 +85,7 @@ pub unsafe trait RawCollectorImpl: 'static + Sized {
85
85
owner : & Gc < ' gc , O , CollectorId < Self > > ,
86
86
value : & Gc < ' gc , V , CollectorId < Self > > ,
87
87
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 ;
89
89
/// The logger associated with this collector
90
90
fn logger ( & self ) -> & Logger ;
91
91
@@ -302,21 +302,20 @@ unsafe impl<C: RawCollectorImpl> ::zerogc::CollectorId for CollectorId<C> {
302
302
type System = CollectorRef < C > ;
303
303
type RawVecRepr < ' gc > = C :: RawVecRepr < ' gc > ;
304
304
// 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 > ;
306
306
307
307
#[ 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 {
309
309
C :: id_for_gc ( gc)
310
310
}
311
311
312
312
#[ 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 {
314
314
C :: id_for_array ( gc)
315
315
}
316
316
317
317
#[ 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 {
320
319
C :: resolve_array_len ( repr)
321
320
}
322
321
@@ -325,7 +324,7 @@ unsafe impl<C: RawCollectorImpl> ::zerogc::CollectorId for CollectorId<C> {
325
324
owner : & Gc < ' gc , O , Self > ,
326
325
value : & Gc < ' gc , V , Self > ,
327
326
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 {
329
328
C :: gc_write_barrier ( owner, value, field_offset)
330
329
}
331
330
@@ -341,7 +340,7 @@ unsafe impl<C: RawCollectorImpl> ::zerogc::CollectorId for CollectorId<C> {
341
340
}
342
341
unsafe impl < C : ~const ConstRawCollectorImpl > const zerogc:: internals:: ConstCollectorId for CollectorId < C > {
343
342
#[ 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 {
345
344
C :: resolve_array_len_const ( repr)
346
345
}
347
346
}
@@ -390,8 +389,8 @@ impl<C: RawCollectorImpl> WeakCollectorRef<C> {
390
389
}
391
390
392
391
pub 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
395
394
where T : GcSafe < ' gc , CollectorId < Self > > ;
396
395
fn alloc_vec < ' gc , T > ( context : & ' gc CollectorContext < Self > ) -> GcVec < ' gc , T , CollectorContext < Self > >
397
396
where T : GcSafe < ' gc , CollectorId < Self > > ;
@@ -401,24 +400,24 @@ pub unsafe trait RawSimpleAlloc: RawCollectorImpl {
401
400
unsafe impl < C > GcSimpleAlloc for CollectorContext < C >
402
401
where C : RawSimpleAlloc {
403
402
#[ 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 > > {
406
405
C :: alloc_uninit ( self )
407
406
}
408
407
409
408
#[ 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 > > {
412
411
C :: alloc_uninit_slice ( self , len)
413
412
}
414
413
415
414
#[ 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 > > {
417
416
C :: alloc_vec ( self )
418
417
}
419
418
420
419
#[ 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 > > {
422
421
C :: alloc_vec_with_capacity ( self , capacity)
423
422
}
424
423
}
0 commit comments