[bindings] Drop useless `#[no_mangle]` from `pub type` definitions
authorMatt Corallo <git@bluematt.me>
Wed, 30 Dec 2020 20:14:42 +0000 (15:14 -0500)
committerMatt Corallo <git@bluematt.me>
Tue, 2 Feb 2021 22:04:31 +0000 (17:04 -0500)
Newer rustc complains that "attribute should be applied to a function or
static"

c-bindings-gen/src/types.rs

index b5bd87e1abf83ad3bf74aff57fe93eca542c6fc4..e3ae3bdef4f9012fd2b7014466f419b7080c8e19 100644 (file)
@@ -1855,7 +1855,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
                        self.crate_types.templates_defined.insert(mangled_container.clone(), true);
                        let mut created_container: Vec<u8> = Vec::new();
 
-                       write!(&mut created_container, "#[no_mangle]\npub type {} = ", mangled_container).unwrap();
+                       write!(&mut created_container, "pub type {} = ", mangled_container).unwrap();
                        write!(&mut created_container, "{}::C{}Templ<", Self::container_templ_path(), container_type).unwrap();
                        self.write_template_generics(&mut created_container, &mut args.iter().map(|t| *t), generics, is_ref, true);
                        writeln!(&mut created_container, ">;").unwrap();