Merge pull request #654 from dtolnay/symbol-visibility-revisit

Force annotation on all functions in both source and header files
This commit is contained in:
David Tolnay 2021-01-03 00:05:58 -08:00 committed by GitHub
commit 4d04cf59d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -910,6 +910,7 @@ fn write_rust_function_shim_decl(
sig: &Signature,
indirect_call: bool,
) {
begin_function_definition(out);
write_return_type(out, &sig.ret);
write!(out, "{}(", local_name);
for (i, arg) in sig.args.iter().enumerate() {
@ -947,9 +948,6 @@ fn write_rust_function_shim_impl(
// We've already defined this inside the struct.
return;
}
if !out.header {
begin_function_definition(out);
}
write_rust_function_shim_decl(out, local_name, sig, indirect_call);
if out.header {
writeln!(out, ";");