From bc84dfbae5d73d9951337411d92885cfdc08d6b9 Mon Sep 17 00:00:00 2001 From: chickenleaf Date: Tue, 8 Oct 2024 22:07:05 +0530 Subject: [PATCH] Fix: Add missing transmute annotations in Castable trait (#33729) Signed-off-by: L Ashwin B --- components/script/dom/bindings/inheritance.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/script/dom/bindings/inheritance.rs b/components/script/dom/bindings/inheritance.rs index 06474fa5423..e0d4530704e 100644 --- a/components/script/dom/bindings/inheritance.rs +++ b/components/script/dom/bindings/inheritance.rs @@ -37,7 +37,7 @@ pub trait Castable: IDLInterface + DomObject + Sized { T: Castable, Self: DerivedFrom, { - unsafe { mem::transmute(self) } + unsafe { mem::transmute::<&Self, &T>(self) } } /// Cast a DOM object downwards to one of the interfaces it might implement.