-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Both operands to ICmp instruction are not of the same type! #2149
Comments
I suspect that this, #2150, and #2151 are all a result of a (perhaps poor) decision I made to resolve unconstrained types to bottom. I think I will revert that choice. It means that some nonsensical programs (like these) will not compile but also that something like "let x = none;" where there is no further constraint on the type of x will fail, because it will not know what sort of "none" x is (e.g., |
Could allow |
Hmm, I could be wrong in my theory, actually. I'm not 100% sure why |
@jruderman well one possible fix along those lines, which I just implemented, is to refuse to consider the "bottom" type as "resolved"---this causes this test (and the others) to result in a compile error, because a resolved type is required in order to process a binary operator. (resolved types are required wherever the resulting type of an expression is overloaded based on an input type; this occurs for binary operators because of overloaded operators and because not all types are addable and so forth) I am not sure if this is the best fix---it may leave other weird paths through the compiler---but I guess I will institute it for now. |
move some compile-fail tests to a more appropriate location These are testing validity invariants, after all.
Upgrade our toolchain to `nightly-2023-01-23`. The changes here are related to the following changes: - rust-lang#104986 - rust-lang#105657 - rust-lang#105603 - rust-lang#105613 - rust-lang#105977 - rust-lang#104645
Co-authored-by: Eric Huss <[email protected]>
Co-authored-by: Eric Huss <[email protected]>
rustc fails with:
The text was updated successfully, but these errors were encountered: