@@ -419,29 +419,30 @@ pub struct Vec<
419
419
len : usize ,
420
420
}
421
421
422
+ /// "Cooperative" Vector. Preferring co-alloc API (if Global alloc supports it).
422
423
#[ unstable( feature = "global_co_alloc_covec" , issue = "none" ) ]
423
- pub type CoVec < T , # [ unstable ( feature = "allocator_api" , issue = "32838" ) ] A : Allocator = Global > =
424
+ pub type CoVec < T , A = Global > =
424
425
Vec < T , A , true > ;
425
426
426
427
/// "Plain" Vec. Not "cooperative" - not carrying extra data to assist the allocator.
427
428
/// FIXME after cleanup, see if we still use this in core:: and/or alloc::
428
429
#[ unstable( feature = "global_co_alloc_plvec" , issue = "none" ) ]
429
- pub type PlVec < T , # [ unstable ( feature = "allocator_api" , issue = "32838" ) ] A : Allocator = Global > =
430
+ pub type PlVec < T , A = Global > =
430
431
Vec < T , A , false > ;
431
432
432
433
/// "Default" Vec. Either "cooperative" or not - as specified by `DEFAULT_COOP_PREFERRED`. The
433
434
/// difference to `Vec` (used without specifying `COOP_PREFERRED`): `DefVec` indicates that the
434
435
/// author considered using `CoVec` or `PlVec`, but left it to default instead.
435
436
#[ unstable( feature = "global_co_alloc_defvec" , issue = "none" ) ]
436
437
#[ allow( unused_braces) ]
437
- pub type DefVec < T , # [ unstable ( feature = "allocator_api" , issue = "32838" ) ] A : Allocator = Global > =
438
+ pub type DefVec < T , A = Global > =
438
439
Vec < T , A , { DEFAULT_COOP_PREFERRED ! ( ) } > ;
439
440
440
441
/// "Weighted cooperative" Vec. Weight means how much it wants to cooperate (with the allocator). 0
441
442
/// = always pack; u8::MAX = always cooperate (if `Global` supports it).
442
443
/// @FIXME A `pub const` threshold.
443
444
#[ unstable( feature = "global_co_alloc_vec" , issue = "none" ) ]
444
- pub type WeVec < T , const weight : u8 > = Vec < T , Global , { weight > 127 } > ;
445
+ pub type WeVec < T , const WEIGHT : u8 > = Vec < T , Global , { WEIGHT > 127 } > ;
445
446
446
447
////////////////////////////////////////////////////////////////////////////////
447
448
// Inherent methods
0 commit comments