diff --git a/crates/backend/src/codegen.rs b/crates/backend/src/codegen.rs index e1a78906e30..fc81c1bfa64 100644 --- a/crates/backend/src/codegen.rs +++ b/crates/backend/src/codegen.rs @@ -703,6 +703,11 @@ impl ToTokens for ast::ImportType { fn as_ref(&self) -> &JsValue { self.obj.as_ref() } } + impl AsRef<#rust_name> for #rust_name { + #[inline] + fn as_ref(&self) -> &#rust_name { self } + } + impl From<#rust_name> for JsValue { #[inline]