aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMs2ger <Ms2ger@gmail.com>2015-10-26 15:03:15 +0100
committerMs2ger <Ms2ger@gmail.com>2015-10-26 15:03:23 +0100
commit2f019f2d88a345e11362e9f79364c965028414ef (patch)
tree12b80b61468ab1d6ec944003fad6bb1249f75851
parent4e015b53781ce6ae26c8972fe5cfe82f0cc98b72 (diff)
downloadservo-2f019f2d88a345e11362e9f79364c965028414ef.tar.gz
servo-2f019f2d88a345e11362e9f79364c965028414ef.zip
Return a LayoutNode with a limited lifetime from layout_node_from_unsafe_layout_node (fixes #3044).
-rw-r--r--components/layout/wrapper.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/components/layout/wrapper.rs b/components/layout/wrapper.rs
index e2c0bd89f19..a389fb858ce 100644
--- a/components/layout/wrapper.rs
+++ b/components/layout/wrapper.rs
@@ -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)
}