Skip to main content

strip_lifetime_ticks

Function strip_lifetime_ticks 

Source
fn strip_lifetime_ticks(s: &str) -> String
Expand description

Strips the leading ' from Rust lifetime tokens so that syn can parse them as regular identifier expressions inside attribute arguments. For example, 'a becomes a, 'static becomes static_lifetime.

String literals ("...") and char literals ('x') are copied verbatim so their contents are never altered.