Open
Description
opened on Nov 17, 2020
Between rust-lang/rust#78837 and rust-lang/rust#79150, we feel like a format_static!()
macro would be useful. This would allow one to, for example:
#[doc = format_static!(include!("docs_for_foo.md"), $arg1, $arg2)]
or even just for replacing these occurrences of concat!
with something more human-readable: https://github.com/rust-lang/rust/pull/79150/files#diff-28f62e401cacbc5959e8762c79a4e0417d52ab64b2cd4e19cafa0d9f7e1bbaeeR30
such that
#[doc = concat!("For example, `Option<", stringify!($Ty), ">` is the same size as `", stringify!($Int), "`:")]
becomes
#[doc = format_static!("For example, `Option<{}>` is the same size as `{}`:", stringify!($Ty), stringify!($Int))]
which doesn't require whoever is maintaining the thing to parse the stringify!() parts before being able to continue.
Metadata
Assignees
Labels
No labels
Activity