dtolnay / cxx

Safe interop between Rust and C++
https://cxx.rs
Apache License 2.0
5.82k stars 330 forks source link

Raw identifiers in methods in extern "C++" block leads to wrong C++ code generation #1324

Open jjyyxx opened 6 months ago

jjyyxx commented 6 months ago

For example

pub fn highlight(r#type: i32);

leads to

void ffi$cxxbridge1$highlight(::std::int32_t r#type) noexcept { ... }

I wish it could be unraw-ed if being a valid C++ identifier. Currently workaround with type_.