| Crates.io | stringify-inner |
| lib.rs | stringify-inner |
| version | 0.3.2 |
| created_at | 2025-04-17 14:03:10.221891+00 |
| updated_at | 2025-05-07 01:12:49.245734+00 |
| description | Translate #stringify for use in places where stringify! is not supported |
| homepage | |
| repository | https://github.com/A4-Tacks/stringify-inner-rs |
| max_upload_size | |
| id | 1637778 |
| size | 9,537 |
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!()
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");