NLL: spurious error emitted on body of (erroneous) const fn body #55825
Labels
A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
NLL-diagnostics
Working towards the "diagnostic parity" goal
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Spawned off of #54528 (specificially this card in the project).
Consider the following code:
With AST-borrowck, you get (play):
With NLL (here using migration a la 2018 edition), you get (play):
I have not managed to replicate the above borrow-check error on code that does not exhibit some other
const fn
error.And the problem goes away if you opt into
#![feature(const_fn)]
(play).So, this is really a very minor diagnostic issue.
The text was updated successfully, but these errors were encountered: