@@ -59,7 +59,7 @@ impl<'gc, T: GcSafe<'gc, Ctx::Id>, Ctx: GcSimpleAlloc> GcVec<'gc, T, Ctx> {
59
59
match self . raw . try_push ( val) {
60
60
Ok ( ( ) ) => { } ,
61
61
Err ( InsufficientCapacityError { } ) => {
62
- unsafe { std :: hint:: unreachable_unchecked ( ) ; }
62
+ unsafe { core :: hint:: unreachable_unchecked ( ) ; }
63
63
}
64
64
}
65
65
}
@@ -87,7 +87,7 @@ impl<'gc, T: GcSafe<'gc, Ctx::Id>, Ctx: GcSimpleAlloc> GcVec<'gc, T, Ctx> {
87
87
self . raw . len ( )
88
88
) ;
89
89
new_mem. as_repr_mut ( ) . set_len ( self . raw . len ( ) ) ;
90
- let mut old_mem = std :: mem:: replace ( & mut self . raw , new_mem) ;
90
+ let mut old_mem = core :: mem:: replace ( & mut self . raw , new_mem) ;
91
91
old_mem. as_repr_mut ( ) . set_len ( 0 ) ; // We don't want to drop the old elements
92
92
}
93
93
}
@@ -170,7 +170,7 @@ impl<'gc, T: GcSafe<'gc, Id>, Id: CollectorId> GcRawVec<'gc, T, Id> {
170
170
where Ctx : GcSimpleAlloc < Id =Id > , F : FnOnce ( & mut GcVec < ' gc , T , Ctx > ) -> R {
171
171
let vec = ManuallyDrop :: new ( GcVec {
172
172
// NOTE: This is okay, because we will restore any changes via `scopeguard`
173
- raw : unsafe { std :: ptr:: read ( self ) } ,
173
+ raw : unsafe { core :: ptr:: read ( self ) } ,
174
174
context : ctx
175
175
} ) ;
176
176
let mut guard = scopeguard:: guard ( vec, |vec| {
@@ -185,10 +185,10 @@ impl<'gc, T: GcSafe<'gc, Id>, Id: CollectorId> GcRawVec<'gc, T, Id> {
185
185
where Ctx : GcSimpleAlloc < Id =Id > , F : FnOnce ( & GcVec < ' gc , T , Ctx > ) -> R {
186
186
let vec = ManuallyDrop :: new ( GcVec {
187
187
// NOTE: This is okay, because we will forget it later
188
- raw : unsafe { std :: ptr:: read ( self ) } ,
188
+ raw : unsafe { core :: ptr:: read ( self ) } ,
189
189
context : ctx
190
190
} ) ;
191
- let guard = scopeguard:: guard ( vec, std :: mem:: forget) ;
191
+ let guard = scopeguard:: guard ( vec, core :: mem:: forget) ;
192
192
func ( & * guard)
193
193
}
194
194
/// The length of this vector
@@ -214,7 +214,7 @@ impl<'gc, T: GcSafe<'gc, Id>, Id: CollectorId> GcRawVec<'gc, T, Id> {
214
214
let old_len = self . len ( ) ;
215
215
// Drop after we set the length, in case it panics
216
216
self . repr . set_len ( 0 ) ;
217
- std :: ptr:: drop_in_place :: < [ T ] > ( std :: ptr:: slice_from_raw_parts_mut (
217
+ core :: ptr:: drop_in_place :: < [ T ] > ( core :: ptr:: slice_from_raw_parts_mut (
218
218
elements, old_len
219
219
) ) ;
220
220
}
@@ -257,7 +257,7 @@ impl<'gc, T: GcSafe<'gc, Id>, Id: CollectorId> GcRawVec<'gc, T, Id> {
257
257
/// this is bound to the lifetime of the current value.
258
258
#[ inline]
259
259
pub fn as_slice ( & self ) -> & [ T ] {
260
- unsafe { std :: slice:: from_raw_parts (
260
+ unsafe { core :: slice:: from_raw_parts (
261
261
self . as_ptr ( ) ,
262
262
self . len ( )
263
263
) }
@@ -297,4 +297,4 @@ unsafe_gc_impl!(
297
297
trace_mut => |self , visitor| {
298
298
unsafe { visitor. visit_vec:: <T , Id >( self . as_repr_mut( ) ) }
299
299
} ,
300
- ) ;
300
+ ) ;
0 commit comments