dtolnay/cxx

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

Offen

#1.324 geöffnet am 11.03.2024

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Rust (253 Forks)batch import
help wanted

Repository-Metriken

Stars
 (4.472 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

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_.

Contributor Guide