From 291aea2200e01843623a67d42112500b1810d276 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Wed, 23 Mar 2022 03:38:15 +0000 Subject: [PATCH] Consider all reference types clonable (because they are) --- c-bindings-gen/src/types.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index 2efba6e..51a5dfc 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -772,6 +772,7 @@ impl<'a> CrateTypes<'a> { self.clonable_types.borrow_mut().insert(object); } pub fn is_clonable(&self, object: &str) -> bool { + object.starts_with("&'static ") || self.clonable_types.borrow().contains(object) } pub fn write_new_template(&self, mangled_container: String, has_destructor: bool, created_container: &[u8]) { -- 2.39.5