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]) {
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();