-
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
[MIR] broken MIR (bad assignment) for non-returning closure #32959
Comments
This happens because we construct MIR for the 2nd closure as if |
Okay, so:
Specifically for MIR, we could stop using |
Can we have diverging closures, anyway? |
The closure has the output type |
This seems like a serious backwards-compatibility hazard. We seem to have forced ourselves to introduce a |
Hmm. I thought that |
That is, we are not supposed to have diverging closures! |
You say that like it's a bad thing.
Well that's just a crappy, arbitrary restriction that we can get rid of. Also we do have diverging closures because you can write |
I don't want to have MIR blocked on new RFCs, basically. Maybe we can get that done fast enough.
A |
On Sat, Apr 16, 2016 at 02:33:55AM -0700, Andrew Cann wrote:
I don't really disagree. I'd just prefer to make that decision on its |
Discussed in @rust-lang/lang team meeting -- we think it makes sense to reconsider the RFC that makes We also should try to find some sort of way to "unregress" this test case in the short term, but I'm not sure what's the best plan there. |
[MIR] Temporary hack for 32959 Gets rid of the warning. This is more elegant that I thought it would be, actually. r? @nikomatsakis cc #32959
The code sample does not emit the warning anymore, but please keep the issue open because it was hacked around only. |
Now that we have actual never type, it might be interesting to revisit this. |
This workaround is no longer necessary as Rust, and by extension MIR, now support uninhabited type properly. This removes the workaround for the gh32959 that was introduced in gh33267. Fixes rust-lang#32959
…, r=pnkfelix Remove the workaround for gh32959 This workaround is no longer necessary as Rust, and by extension MIR, now support uninhabited type properly. This removes the workaround for the gh32959 that was introduced in gh33267. Fixes rust-lang#32959
This code:
Will yield this warning:
The text was updated successfully, but these errors were encountered: