const fn
allows unreachable calls to non-const
fns
#62404
Labels
A-const-fn
Area: const fn foo(..) {..}. Pure functions which can be applied at compile time.
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
E.g. the following compiles on stable:
@eddyb notes that this is because we do a "semantic check" and that
f();
is not linked in the CFG.However, it seems to me that the basic blocks should be there (tho I haven't checked yet...) so you can visit the call to
f();
and ban it.cc @oli-obk
The text was updated successfully, but these errors were encountered: