-
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
Wrap cast expressions inside of ValueTypeAscription #54938
Conversation
r? @zackmdavis (rust_highfive has picked a reviewer for you, use r? to override) |
i'm curious to see whether travis is happier now |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Welp, we have our answer. =) |
Isn't there an issue open for deduplicating these messages? cc @oli-obk |
Are you looking for #53821 ? that PR deduplicates all const eval error reporting |
Could that be the problem here? |
I don't think so. This change changes the way the HAIR is structured for casts, thus having an effect on the generated MIR. I don't know what effect, but it looks to me like it causes the MIR to mention a constant twice, thus it being evaluated twice via https://github.com/rust-lang/rust/blob/master/src/librustc_mir/transform/const_prop.rs#L256 This can easily be verified by generating the MIR of one of the failing tests before and after this PR. That said, the mentioned PR will definitely deduplicate this error, but we should probably have a look at why the MIR mentions this constant twice. |
☔ The latest upstream changes (presumably #55152) made this pull request unmergeable. Please resolve the merge conflicts. |
Fixes #54332.