unstable const fn
s in libcore
can be ignored by const-qualification
#67053
Labels
A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
A-stability
Area: `#[stable]`, `#[unstable]` etc.
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
As shown in #66884 (comment) const-qualification can ignore some
const fn
s, in the context of libcore / rustc crates:playground
This should not compile without "miri unleashed"; const-qualification does not see this function as const since the unstable feature is not enabled, and thus does not check it.
It does not compile outside of libcore, nor if the unstable feature is enabled in libcore.
cc @ecstatic-morse @oli-obk
More discussion is also available in this zulip thread.
I have a fix and will post a PR shortly. There are a couple of existing cases in
libcore
where this matters (forconst_ptr_offset_from
andconst_type_name
), and I'll fix those at the same time.The text was updated successfully, but these errors were encountered: