Skip to main content

DOLLAR

Constant DOLLAR 

Source
pub const DOLLAR: &str = "_dollar_";
Expand description

What a $ in a C identifier is written as in the generated Rust.

$ is an identifier character here — GCC takes it unconditionally and Clang by default, which is what WG14 DR027 allows and what crate::Options::dollar_in_identifiers switches on — and Rust has no spelling for it at all, not even a raw identifier. The C name is still what the symbol links by: an object or function that is not defined here carries it in #[link_name], and one that is carries it in #[unsafe(export_name)].