diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index a7f73e67494..cfa760a7679 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -5268,17 +5268,6 @@ pub trait ${castTraitName} : Sized { } } - #[inline(always)] - #[allow(unrooted_must_root)] - fn to_js(base: &JS) -> Option> { - unsafe { - match (*base.unsafe_get()).${checkFn}() { - true => Some(base.transmute_copy()), - false => None - } - } - } - #[inline(always)] #[allow(unrooted_must_root)] fn to_layout_js(base: &LayoutJS) -> Option> {