-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
"type ... too big for the current architecture" error reported without span pointing to type #25116
Comments
Triage: no change. |
Always error on `SizeOverflow` during mir evaluation Fix rust-lang#55878, fix rust-lang#25116. r? @oli-obk
Always error on `SizeOverflow` during mir evaluation Fix rust-lang#55878, fix rust-lang#25116. r? @oli-obk
The diagnostic is actually wrong. It's not about the type, it's about values of that type. You can use any type no matter its size for trait resolution and such, you just can't create values of it. Additionally, we're still not emitting this error with spans. I think the only way to reasonably do this is to create a new well formedness bound that is automatically added to a function's where bounds for all types within that function that are used with values, but for which we can't prove well-formedness. This may be very expensive, since it spawns lots of new |
Current output:
|
e053dfa added checks for huge types. These checks are done in middle/trans, but the location of the type is not reported.
For anonymous array types there's no way to extract the span, as the ast-ID is lost.
An example:
the error message:
The text was updated successfully, but these errors were encountered: