-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 when using typeof
#42060
Comments
cc @nikomatsakis I think we'll have to make |
@eddyb I don't quite know what you mean by "work like closures"? Work like closures in which respect? |
In terms of sharing inference, which would fix this ICE. |
@eddyb I see. That seems ok. I thought you meant upvar inference or something. |
triage: P-medium |
Another ICE case: |
Obviously
typeof
isn't used in the current version of Rust, but if you do try to use it you get some strange behaviour.rustc
correctly reports thattypeof
is unimplemented, and the error message is sensible if used with a constant expression, but using it with local variables causes an ICE.Minimum code sample:
I'd expect this to return the same error as doing
typeof(5)
, which is:But instead I get this:
The text was updated successfully, but these errors were encountered: