Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up[MIR] broken MIR (bad assignment) for non-returning closure #32959
Comments
alexcrichton
added
the
A-mir
label
Apr 14, 2016
This comment has been minimized.
This comment has been minimized.
|
This happens because we construct MIR for the 2nd closure as if |
This comment has been minimized.
This comment has been minimized.
|
Okay, so:
Specifically for MIR, we could stop using |
mitchmindtree
referenced this issue
Apr 15, 2016
Closed
Broken MIR - call dest mismatch (warning appeared after updating to 1.8 stable) #32983
This comment has been minimized.
This comment has been minimized.
|
Can we have diverging closures, anyway? |
This comment has been minimized.
This comment has been minimized.
|
The closure has the output type |
This comment has been minimized.
This comment has been minimized.
|
This seems like a serious backwards-compatibility hazard. We seem to have forced ourselves to introduce a |
This comment has been minimized.
This comment has been minimized.
|
Hmm. I thought that |
This comment has been minimized.
This comment has been minimized.
|
That is, we are not supposed to have diverging closures! |
nikomatsakis
added
I-nominated
T-lang
labels
Apr 16, 2016
This comment has been minimized.
This comment has been minimized.
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 |
This comment has been minimized.
This comment has been minimized.
|
I don't want to have MIR blocked on new RFCs, basically. Maybe we can get that done fast enough.
A |
This comment has been minimized.
This comment has been minimized.
|
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 |
This comment has been minimized.
This comment has been minimized.
|
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. |
nikomatsakis
removed
the
I-nominated
label
Apr 28, 2016
bors
added a commit
that referenced
this issue
May 7, 2016
This comment has been minimized.
This comment has been minimized.
|
The code sample does not emit the warning anymore, but please keep the issue open because it was hacked around only. |
This comment has been minimized.
This comment has been minimized.
|
Now that we have actual never type, it might be interesting to revisit this. |
alexcrichton commentedApr 14, 2016
This code:
Will yield this warning: