Input C/C++ Header
__attribute__((objc_root_class))
@interface Foo
- (int)take$foo:(int)t;
@end
Bindgen Invocation
$ bindgen input.h -- -x objective-c
Actual Results
bindgen aborts:
panicked at bindgen/ir/objc.rs:264:30:
"take$foo" is not a valid Ident
clang accepts $ in the selector. C names with $ already go through rust_mangle ($ → _). ObjC format_method_call passes selector fragments to Ident::new / syn::parse_str without that.
This is not #2486 (keyword type / self) or #1703 (empty :: fragments).
Expected Results
Do not abort. Mangle $ in selector fragments the same way C identifiers are mangled.
Environment
bindgen: 0.73.1 (rust-lang/rust-bindgen 77cbc723)
clang/libclang: Homebrew clang 21.1.8
rustc: 1.97.1
target: aarch64-apple-darwin
OS: macOS
Input C/C++ Header
Bindgen Invocation
$ bindgen input.h -- -x objective-cActual Results
bindgen aborts:
clang accepts
$in the selector. C names with$already go throughrust_mangle($→_). ObjCformat_method_callpasses selector fragments toIdent::new/syn::parse_strwithout that.This is not #2486 (keyword
type/self) or #1703 (empty::fragments).Expected Results
Do not abort. Mangle
$in selector fragments the same way C identifiers are mangled.Environment