paste
paste copied to clipboard
Macros for all your token pasting needs
I'm incredibly new to macros so I don't know if this is even possible to address. If a macro that produces a string literal is used in `#[doc]`, `paste` does...
It may usefull to add a conversion supporting kebab case in addition to snake/upper case.
Paste will produce a keyword instead of an identifier in some cases: ```rust use paste::paste; macro_rules! empty_items{ ($name:ident $(- $name_tail:ident)*) => { paste!{ struct [< $name:camel $( $name_tail)* >]; fn...
I'm trying to run the test suite but this is the outcome. Am I doing something wrong? `$ cargo test` ``` Updating crates.io index Downloaded itoa v1.0.10 Downloaded rustversion v1.0.14...
I'm attempting to use `$expr:snake` with a path containing slashes. My use-case is for automating tests, where test fixtures are in a hierarchical structure, and I'm auto-generating test modules based...
paste: 1.0.12 rustc: 1.68.2 When I try to concatenate a minus sign (`-`), a float literal (e.g. `0.0`), and a type suffix (e.g. `f32` or `f64`), rustc reports errors. Here...
readme uses an initial capital in "CamelCase", while camel case is typically understood to not capitalize the initial letter [Reading the code](https://github.com/dtolnay/paste/blob/master/src/segment.rs#L197) it appears that `$var:camel` modifier converts to `PascalCase`...
Ths PR fixes a problem affecting numbers/uppercase-letter boundaries in identifiers being converted to camel case. The following else-if case would apply and force the current character to lowercase only if...
Hey :wave: Thanks for the awesome crate 🙏 Reading from the code they're seems to be some un-intentional edge cases with `:camel`. For example: 1. `my__ident` will be converted to...