impl<T> Drop for BufferResource<T> {
fn finalize(&self) {
unsafe {
+ // FIXME(#4330) Need self by value to get mutability.
let this: &mut BufferResource<T> = transmute(self);
let mut b = move_it!(this.buffer);
assert!(self.refcount() > 0);
unsafe {
- // XXX: Mutable finalizer
+ // FIXME(#4330) Need self by value to get mutability.
let this: &mut RC<T> = cast::transmute_mut(self);
match *this.get_mut_state() {
impl Drop for Process {
fn finalize(&self) {
- // FIXME #4943: transmute is bad.
+ // FIXME(#4330) Need self by value to get mutability.
let mut_self: &mut Process = unsafe { cast::transmute(self) };
mut_self.finish();
// Runs on task exit.
fn finalize(&self) {
unsafe {
+ // FIXME(#4330) Need self by value to get mutability.
let this: &mut TCB = transmute(self);
// If we are failing, the whole taskgroup needs to die.
// This will ensure that the contained data is
// destroyed, unless it's null.
unsafe {
+ // FIXME(#4330) Need self by value to get mutability.
let this : &mut AtomicOption<T> = cast::transmute(self);
let _ = this.take(SeqCst);
}