Return a LayoutNode with a limited lifetime from layout_node_from_unsafe_layout_node (fixes #3044).

This commit is contained in:
Ms2ger 2015-10-26 15:03:15 +01:00
parent 4e015b5378
commit 2f019f2d88

View file

@ -1076,9 +1076,7 @@ pub fn layout_node_to_unsafe_layout_node(node: &LayoutNode) -> UnsafeLayoutNode
}
}
// FIXME(#3044): This should be updated to use a real lifetime instead of
// faking one.
pub unsafe fn layout_node_from_unsafe_layout_node(node: &UnsafeLayoutNode) -> LayoutNode<'static> {
pub unsafe fn layout_node_from_unsafe_layout_node(node: &UnsafeLayoutNode) -> LayoutNode {
let (node, _) = *node;
mem::transmute(node)
}