Upgrade to rustc 0.12.0-pre (4d2af3861 2014-09-17 15:51:11 +0000)

This commit is contained in:
Keegan McAllister 2014-09-16 13:00:18 -07:00
parent 8a7eefefd5
commit a640a7c5c3
74 changed files with 459 additions and 449 deletions

View file

@ -23,7 +23,7 @@ impl FlowRef {
pub fn new(mut flow: Box<Flow>) -> FlowRef {
unsafe {
let result = {
let flow_ref: &mut Flow = flow;
let flow_ref: &mut Flow = &mut *flow;
let object = mem::transmute::<&mut Flow, raw::TraitObject>(flow_ref);
FlowRef { object: object }
};
@ -56,14 +56,14 @@ impl Drop for FlowRef {
}
let flow_ref: FlowRef = mem::replace(self, FlowRef {
object: raw::TraitObject {
vtable: ptr::mut_null(),
data: ptr::mut_null(),
vtable: ptr::null_mut(),
data: ptr::null_mut(),
}
});
drop(mem::transmute::<raw::TraitObject, Box<Flow>>(flow_ref.object));
mem::forget(flow_ref);
self.object.vtable = ptr::mut_null();
self.object.data = ptr::mut_null();
self.object.vtable = ptr::null_mut();
self.object.data = ptr::null_mut();
}
}
}