Open
Description
All stable const fn
in core/alloc/std are checked to ensure that they, transitively, do not use any unstable const features.
However, the same is not the case for const items. A stable fn
can use array lengths, and a stable trait can have associated const, that use arbitrary unstable const features. That seems bad? I'm not entirely sure how to fix that though -- these items don't themselves have any stability, after all. They are just use in a large function (that may not even be a const fn
).
One example where we are actually doing this is here:
CMSG_SPACE
is a const fn
defined in libc. It is not subject to any recursive const stability checks.
Cc @rust-lang/wg-const-eval @compiler-errors