Generate from_layout_js() conversion methods

This commit is contained in:
Anthony Ramine 2015-04-09 02:06:48 +02:00
parent c8f41b473c
commit 45b490c977

View file

@ -5427,6 +5427,12 @@ impl ${name}Cast {
unsafe { derived.transmute_borrowed() }
}
#[inline(always)]
#[allow(unrooted_must_root)]
pub fn from_layout_js<T: ${fromBound}+Reflectable>(derived: &LayoutJS<T>) -> LayoutJS<${name}> {
unsafe { derived.transmute_copy() }
}
#[inline(always)]
pub fn from_temporary<T: ${fromBound}+Reflectable>(derived: Temporary<T>) -> Temporary<${name}> {
unsafe { derived.transmute() }