-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Borrowing static array that contains another static array represented by literal doesn't work when expressed inline #54224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
|
If we add It appears related to the issue described in #43058, which was fixed by nll. |
This is a bit curious. I'm digging in a bit more. |
It's a bug that NLL "fixes" this - see #51990 (comment). @pepyakin This is not a bug (ignoring NLL), but we need to document it better.
We could maybe relax the rules a bit here, since we're in a constant anyway, and promotion rules require not involving named variables, but we'd need to be careful around |
Why does this work:
but this doesn't?
The text was updated successfully, but these errors were encountered: