Closed penberg closed 7 years ago
Why does rustdoc --test
fail with nightly?
The rustdoc tests fail because they don't enable the const_fn
feature. This can be solved by using the #[allow_internal_unstable]
attribute on the macro.
However there is another problem with your code: the #[cfg]
is evaluated in the crate that uses the macro rather than the one that defines it. This obviously isn't what we want. Solving this requires moving the #[cfg]
outside the macro, which means that the entire macro needs to be duplicated.
I implemented this in 92369a491d643952a94e3a0568b68df3a97736a1, see the comment at the top. I also published v0.6.4 with this change.
Awesome, thanks @Amanieu!
This adds a const constructor to intrusive_adapter macro. It's useful when initializing a static variable, for example.