Open nwalfield opened 7 months ago
You'll need to enable the "nightly_const_generics"
feature, because the "const_generics"
feature is for whenever &'static str
is made usable as a const parameter on stable.
(It has separate "nightly_const_generics"
and "const_generics"
features so that I don't have to update the library whenever &'static str
const parameter support is stabilized)
The StrValue
trait currently requires a nightly compiler, because I don't believe there's any way to make the &'static str
associated constant on stable (in a way that works for any string).
Got it, thanks!
I think I was confused, because there is also a nightly_const_generics
feature so I assumed that the const_generics
feature would work with the stable compiler.
I'm trying to use
StrValue
. This requires enablingconst_generics
. Unfortunately, when I enable that feature,tstr
doesn't compile any more:I'm using an empty project created by
cargo init
and just add the following toCargo.toml
:I tried compiling with rustc version 1.46, which I think should be supported, but I got the same error (I had to also change the edition to 2018). As such, I think I'm probably holding it wrong, and my request is to improve the documentation.
Thanks!