dtolnay/cxx

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

Ouverte

#1 324 ouverte le 11 mars 2024

 (0 commentaire) (0 réaction) (0 personne assignée)Rust (253 forks)batch import
help wanted

Métriques du dépôt

Stars
 (4 472 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

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

Guide contributeur