Skip to content

Commit 1e426ae

Browse files
committed
Do not emit Rust method wrapper for blacklisted functions
We should not emit Rust struct methods corresponding to a C++ method unless we are actually emitting a binding for that method.
1 parent d5cdad2 commit 1e426ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/codegen/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2146,6 +2146,10 @@ impl MethodCodegen for Method {
21462146

21472147
// First of all, output the actual function.
21482148
let function_item = ctx.resolve_item(self.signature());
2149+
if function_item.is_blacklisted(ctx) {
2150+
// We shouldn't emit a method declaration if the function is blacklisted
2151+
return;
2152+
}
21492153
function_item.codegen(ctx, result, &());
21502154

21512155
let function = function_item.expect_function();

0 commit comments

Comments
 (0)