diff --git a/crates/libs/bindgen/src/metadata.rs b/crates/libs/bindgen/src/metadata.rs index e422f67a9a..9d48c57a1d 100644 --- a/crates/libs/bindgen/src/metadata.rs +++ b/crates/libs/bindgen/src/metadata.rs @@ -628,13 +628,7 @@ pub fn type_def_is_blittable(row: TypeDef) -> bool { pub fn type_def_is_copyable(row: TypeDef) -> bool { match row.kind() { - TypeKind::Struct => { - if matches!(row.type_name(), TypeName::VARIANT | TypeName::PROPVARIANT) { - false - } else { - row.fields().all(|field| field_is_copyable(field, row)) - } - } + TypeKind::Struct => row.fields().all(|field| field_is_copyable(field, row)), TypeKind::Enum => true, TypeKind::Delegate => !row.flags().contains(TypeAttributes::WindowsRuntime), _ => false, diff --git a/crates/libs/bindgen/src/rust/writer.rs b/crates/libs/bindgen/src/rust/writer.rs index 47cb37c944..1b32c6a378 100644 --- a/crates/libs/bindgen/src/rust/writer.rs +++ b/crates/libs/bindgen/src/rust/writer.rs @@ -159,14 +159,6 @@ impl Writer { let crate_name = self.crate_name(); quote! { #crate_name BSTR } } - metadata::Type::Name(metadata::TypeName::VARIANT) => { - let crate_name = self.crate_name(); - quote! { #crate_name VARIANT } - } - metadata::Type::Name(metadata::TypeName::PROPVARIANT) => { - let crate_name = self.crate_name(); - quote! { #crate_name PROPVARIANT } - } metadata::Type::Object => { if self.sys { quote! { *mut core::ffi::c_void } @@ -271,12 +263,6 @@ impl Writer { metadata::Type::Name(metadata::TypeName::BSTR) => { quote! { core::mem::MaybeUninit } } - metadata::Type::Name(metadata::TypeName::VARIANT) => { - quote! { core::mem::MaybeUninit } - } - metadata::Type::Name(metadata::TypeName::PROPVARIANT) => { - quote! { core::mem::MaybeUninit } - } metadata::Type::Win32Array(kind, len) => { let name = self.type_abi_name(kind); let len = Literal::usize_unsuffixed(*len);