-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
ICE using a trait-associated const in an array size #24947
Labels
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Comments
Triage: This no longer ICEs. |
This no longer ICEs, but the E0308 errors are somewhat strange:
|
Closed
In particular, the error messages that indicate that the found array type has length 0 are misleading. |
This now compiles, just fine, actually. Closing! |
@steveklabnik Does it still need a test? |
Still needs test. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
This only seems to be triggered if the size has to be evaluated by
typeck
; for instance you can usesize_of
on such an array without triggering the issue.Test case:
In fact, it's fine to use the inherent impl above (in the definitions of
y
andz
), but the trait-associated constant causes a problem that resembles #24946 and #24938. I'm not sure if it would have the same solution, though, since this issue is encountered at an earlier stage.The text was updated successfully, but these errors were encountered: