Skip to content

Commit 4d04cf5

Browse files
authored
Merge pull request #654 from dtolnay/symbol-visibility-revisit
Force annotation on all functions in both source and header files
2 parents 967ec5e + b9bf5e7 commit 4d04cf5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

gen/src/write.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,7 @@ fn write_rust_function_shim_decl(
910910
sig: &Signature,
911911
indirect_call: bool,
912912
) {
913+
begin_function_definition(out);
913914
write_return_type(out, &sig.ret);
914915
write!(out, "{}(", local_name);
915916
for (i, arg) in sig.args.iter().enumerate() {
@@ -947,9 +948,6 @@ fn write_rust_function_shim_impl(
947948
// We've already defined this inside the struct.
948949
return;
949950
}
950-
if !out.header {
951-
begin_function_definition(out);
952-
}
953951
write_rust_function_shim_decl(out, local_name, sig, indirect_call);
954952
if out.header {
955953
writeln!(out, ";");

0 commit comments

Comments
 (0)