7 releases
new 0.3.2 | May 7, 2025 |
---|---|
0.3.1 | May 6, 2025 |
0.2.1 | Apr 27, 2025 |
0.1.2 | Apr 27, 2025 |
#583 in No standard library
609 downloads per month
Used in short-names
6KB
85 lines
This macro translates a simple string processing expression,
such as #stringify()
and #concat()
Can be used in conjunction with some macros that cannot evaluate stringify!()
Examples
Is compile-fail case:
#[doc(alias = stringify!(bar))]
fn foo() {}
Change to:
use stringify_inner::sexpr_attr;
#[sexpr_attr(doc(alias = #stringify(bar)))]
fn foo() {}
use stringify_inner::sexpr;
assert_eq!(sexpr!(#stringify(foo)), "foo");
assert_eq!(sexpr!(#concat(#stringify(foo), "bar")), "foobar");
Dependencies
~23KB