Support bindings for `pub extern "C" fn foo() { ... }`.
This CL adds support for generating bindings for very simple Rust
functions:
- `extern "C"` is required (i.e. we don't have to worry about generating
Rust thunks just yet).
- Only the unit / `void` / `()` return type is supported
- No parameters are supported.
Still, after this CL it should be possible to start working on
end-to-end tests that actually verify that the generated bindings
build+link without any issues.
PiperOrigin-RevId: 481745367
diff --git a/common/code_gen_utils.rs b/common/code_gen_utils.rs
index 2031372..59e7361 100644
--- a/common/code_gen_utils.rs
+++ b/common/code_gen_utils.rs
@@ -20,8 +20,7 @@
// an error is returned when `ident` is a C++ reserved keyword.
ensure!(
!RESERVED_CC_KEYWORDS.contains(ident),
- "`{}` is a C++ reserved keyword and \
- can't be used as a C++ identifier in the generated bindings",
+ "`{}` is a C++ reserved keyword and can't be used as a C++ identifier",
ident
);