Make the style crate almost build on stable Rust.

`discriminant_value` will need to be replaced with something else later.
This commit is contained in:
Simon Sapin 2016-06-21 17:35:26 +02:00
parent ea73c8efac
commit 00b6210519
41 changed files with 370 additions and 375 deletions

View file

@ -17,7 +17,7 @@ use util::workqueue::{WorkQueue, WorkUnit, WorkerProxy};
#[allow(dead_code)]
fn static_assertion(node: UnsafeNode) {
unsafe {
let _: UnsafeNodeList = ::std::intrinsics::transmute(node);
let _: UnsafeNodeList = mem::transmute(node);
}
}
@ -46,7 +46,7 @@ pub fn traverse_dom<N, C>(root: N,
run_queue_with_custom_work_data_type(queue, |queue| {
queue.push(WorkUnit {
fun: top_down_dom::<N, C>,
data: (box vec![root.to_unsafe()], root.opaque()),
data: (Box::new(vec![root.to_unsafe()]), root.opaque()),
});
}, queue_data);
}
@ -89,7 +89,7 @@ fn top_down_dom<N, C>(unsafe_nodes: UnsafeNodeList,
for chunk in discovered_child_nodes.chunks(CHUNK_SIZE) {
proxy.push(WorkUnit {
fun: top_down_dom::<N, C>,
data: (box chunk.iter().cloned().collect(), unsafe_nodes.1),
data: (Box::new(chunk.iter().cloned().collect()), unsafe_nodes.1),
});
}
}