cxx
cxx copied to clipboard
"Expected identifier" even for C++ names
Some Rust keywords are valid identifiers in C++. Yet this fails:
demo/include/blobstore.h
: add
inline void move(uint32_t a) {}
demo/src/main.rs
: add (in extern C++
section):
#[cxx_name = "move"]
fn move_(a: u32);
This gives
error[cxxbridge]: expected identifier
┌─ src/main.rs:28:18
│
28 │ #[cxx_name = "move"]
│ ^^^^^^ expected identifier
I haven't yet looked into how to fix this, but I may do so in due course.
Same issue here with type
.