X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c-bindings-gen%2Fsrc%2Ftypes.rs;h=ced1f34b0e91c31493127c14bf8c9e7db31748ac;hb=f05687b6d75e35ac71f96ca84dce38664d18e5cf;hp=3309ee0ea31aaa4c076da34897ca5957485cc5d4;hpb=840401d925fc2af9f96cc10342bc610a4218deea;p=ldk-c-bindings diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index 3309ee0..ced1f34 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -772,7 +772,6 @@ 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]) { @@ -2715,7 +2714,8 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> { if !c_ty { self.write_rust_path(w, generics, path); } else { - write!(w, "{}", full_path).unwrap(); + // We shouldn't be mapping references in types, so panic here + unimplemented!(); } } else if is_ref { write!(w, "&{}{}{}", if is_mut { "mut " } else { "" }, crate_pfx, full_path).unwrap();