File tree 5 files changed +5
-2
lines changed
5 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -315,6 +315,7 @@ struct BufferResource<T> {
315
315
impl < T > Drop for BufferResource < T > {
316
316
fn finalize ( & self ) {
317
317
unsafe {
318
+ // FIXME(#4330) Need self by value to get mutability.
318
319
let this: & mut BufferResource < T > = transmute ( self ) ;
319
320
320
321
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> {
78
78
assert ! ( self . refcount( ) > 0 ) ;
79
79
80
80
unsafe {
81
- // XXX: Mutable finalizer
81
+ // FIXME(#4330) Need self by value to get mutability.
82
82
let this: & mut RC < T > = cast:: transmute_mut ( self ) ;
83
83
84
84
match * this. get_mut_state ( ) {
Original file line number Diff line number Diff line change @@ -429,7 +429,7 @@ impl Process {
429
429
430
430
impl Drop for Process {
431
431
fn finalize ( & self ) {
432
- // FIXME #4943: transmute is bad .
432
+ // FIXME(#4330) Need self by value to get mutability .
433
433
let mut_self: & mut Process = unsafe { cast:: transmute ( self ) } ;
434
434
435
435
mut_self. finish ( ) ;
Original file line number Diff line number Diff line change @@ -323,6 +323,7 @@ impl Drop for TCB {
323
323
// Runs on task exit.
324
324
fn finalize ( & self ) {
325
325
unsafe {
326
+ // FIXME(#4330) Need self by value to get mutability.
326
327
let this: & mut TCB = transmute ( self ) ;
327
328
328
329
// 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> {
275
275
// This will ensure that the contained data is
276
276
// destroyed, unless it's null.
277
277
unsafe {
278
+ // FIXME(#4330) Need self by value to get mutability.
278
279
let this : & mut AtomicOption < T > = cast:: transmute ( self ) ;
279
280
let _ = this. take ( SeqCst ) ;
280
281
}
You can’t perform that action at this time.
0 commit comments