Closed bjorn3 closed 3 years ago
Hm, I guess the auto-detection isn't quite working as intended then, in-std compilation is not supposed to be using std.
Usually, a crate would just have an explicit std
feature (probably off by default) which you turn on if you want to use the standard library. And then if you're building on 1.34 or 1.35 you'd use std
(since there's no alloc crate) and then if you're 1.36 or later you'd be able to skip the std
feature and the alloc crate would be used. But, that's all a breaking change of course.
I guess, do we file a bug with autocfg
and hope they track it down?
There is already a rustc-dep-of-std
feature for building inside libstd. It seems autocfg doesn't work properly in this case. Maybe you can just manually define has_alloc
if that feature is enabled though, since it implies alloc.
@bjorn3 are you able to test if 5a5522d fixes it? I don't have everything set up for building libstd right now.
Thanks, that fixes it.
Likely caused by #95.