File tree Expand file tree Collapse file tree 5 files changed +5
-2
lines changed Expand file tree Collapse file tree 5 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -315,6 +315,7 @@ struct BufferResource<T> {
315315impl < T > Drop for BufferResource < T > {
316316 fn finalize ( & self ) {
317317 unsafe {
318+ // FIXME(#4330) Need self by value to get mutability.
318319 let this: & mut BufferResource < T > = transmute ( self ) ;
319320
320321 let mut b = move_it ! ( this. buffer) ;
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ impl<T> Drop for RC<T> {
7878 assert ! ( self . refcount( ) > 0 ) ;
7979
8080 unsafe {
81- // XXX: Mutable finalizer
81+ // FIXME(#4330) Need self by value to get mutability.
8282 let this: & mut RC < T > = cast:: transmute_mut ( self ) ;
8383
8484 match * this. get_mut_state ( ) {
Original file line number Diff line number Diff line change @@ -429,7 +429,7 @@ impl Process {
429429
430430impl Drop for Process {
431431 fn finalize ( & self ) {
432- // FIXME #4943: transmute is bad .
432+ // FIXME(#4330) Need self by value to get mutability .
433433 let mut_self: & mut Process = unsafe { cast:: transmute ( self ) } ;
434434
435435 mut_self. finish ( ) ;
Original file line number Diff line number Diff line change @@ -323,6 +323,7 @@ impl Drop for TCB {
323323 // Runs on task exit.
324324 fn finalize ( & self ) {
325325 unsafe {
326+ // FIXME(#4330) Need self by value to get mutability.
326327 let this: & mut TCB = transmute ( self ) ;
327328
328329 // If we are failing, the whole taskgroup needs to die.
Original file line number Diff line number Diff line change @@ -275,6 +275,7 @@ impl<T> Drop for AtomicOption<T> {
275275 // This will ensure that the contained data is
276276 // destroyed, unless it's null.
277277 unsafe {
278+ // FIXME(#4330) Need self by value to get mutability.
278279 let this : & mut AtomicOption < T > = cast:: transmute ( self ) ;
279280 let _ = this. take ( SeqCst ) ;
280281 }
You can’t perform that action at this time.
0 commit comments