-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Rust 1.19 regression, minions 0.2.8, type mismatch #42618
Comments
The relevant code (which is in a test case, I believe) has been deleted on master of the relevant repo, but bisection shows failure was introduced in #42265 -- cc @eddyb @Zoxc, this is actually somewhat concerning. It's possible that this hints at some more wide-spread problem that patch introduced that just wasn't noticed yet, but I could be wrong. Here is the code https://github.com/dbeck/acto-rs/blob/5311c872dd88d3bf034e023f501971c711dee41c/src/main.rs#L147. |
I really don't see how that could be happening - does it reproduce on nightly? |
Reproduces on nightly and 5aa3403. |
Reproduced with: fn main() {
let mut sum = 0;
for i in Vec::new() {
sum += i;
}
} |
Change the for-loop desugar so the `break` does not affect type inference. Fixes #42618 Rewrite the `for` loop desugaring to avoid contaminating the inference results. Under the older desugaring, `for x in vec![] { .. }` would erroneously type-check, even though the type of `vec![]` is unconstrained. (written by @nikomatsakis)
Reopening to track the beta backport of #42634. I don't know if this is the proper procedure but... seems good and not harmful. |
@Mark-Simulacrum looks like beta backport landed in #42927, no? Going to close for now, assuming I'm right. |
https://github.com/dbeck/acto-rs
cc @dbeck
The text was updated successfully, but these errors were encountered: