This emits c-string literals where possible when on Rust 1.77 or later.
Since we are not allowed to emit these literals on earlier Rust versions, we need to have the conditional compilation on the macro code itself, so I added a build.rs to emit the required cfgs.
We also have the case for doc attributes including macro invocations, since there is currently no way to concat! c-string literals, this case falls back to the c_str! macro
This emits c-string literals where possible when on Rust 1.77 or later.
Since we are not allowed to emit these literals on earlier Rust versions, we need to have the conditional compilation on the macro code itself, so I added a
build.rs
to emit the requiredcfg
s.We also have the case for
doc
attributes including macro invocations, since there is currently no way toconcat!
c-string literals, this case falls back to thec_str!
macroCloses #4261