Uh oh!
There was an error while loading. Please reload this page.
Implement type ascription. - #23773
Conversation
rust-highfive
commented
Mar 27, 2015
(rust_highfive has picked a reviewer for you, use r? to override) |
nrc
commented
Mar 27, 2015
nrc
commented
Mar 27, 2015
And thanks for doing the rebase! |
Ryman
commented
Mar 27, 2015
eddyb
commented
Mar 27, 2015
nrc
commented
Mar 30, 2015
@eddyb: Using those fns in middle::ty would be my first bet. Otherwise, it is a strictly syntactic property - you just need to know the context of the expression. If none of that works out, then you could check later in type checking (mem categorization, I guess) that if you find an ascription expression, and it's an lvalue, then check to see if there is an adjustment on that expression, if there is, error out at that stage. |
eddyb
commented
Mar 30, 2015
The issue was related to lifetime invariance in mutable lvalues, wasn't it? I do wonder what we do right now for I haven't had the chance to experiment with this fully. Oh and I didn't think of unsizing coercions on a pointer-type lvalue - but that would consume the lvalue, so it shouldn't have bad interactions with ascription. |
eddyb
commented
Mar 30, 2015
Some quick playpen experimentation suggests we do propagate expected types down, but we don't attempt coercions on lvalues: |
nikomatsakis
commented
Mar 30, 2015
@eddyb that sounds right. In particular, the |
bors
commented
Apr 7, 2015
☔ The latest upstream changes (presumably #23857) made this pull request unmergeable. Please resolve the merge conflicts. |
nikomatsakis
commented
Apr 8, 2015
After some discussion with @nrc conclusion was that I should take over this PR too. |
alexcrichton
commented
May 1, 2015
Closing in favor of an upcoming rebase by @nikomatsakis! |
cristicbz
commented
Jun 25, 2015
I recently remembered that type ascription was supposed to land "any minute now" some time ago, is this still going to happen? PS: Also may I suggest not closing issues in favour of upcoming rebases until the latter are actually opened (just so as not to have things fall through cracks). Not trying to be passive aggresive, just a genuine suggestion! |
nrc
commented
Jun 29, 2015
ping @nikomatsakis who was going to do the rebase |
pnkfelix
commented
Sep 16, 2015
I can see why we would close a PR if e.g. its functionality is going to be provided in a different manner (so that people do not waste their time reviewing code that isn't even close to what is planned to be added). But closing a PR based solely on an anticipated future rebase that has not been opened does seem misguided. After all, what if someone else were willing to do the rebase in the meantime? (In other words, I think that closing this PR may have been an error.) |
alexcrichton
commented
Sep 17, 2015
I'm fine reopening, I'm just trying to keep the queue clear! |
apasel422
commented
Oct 7, 2015
Is someone working on the rebase of this? |
nikomatsakis
commented
Oct 7, 2015
I was supposed to, but I haven't had the time. I'd be happy to mentor an On Wed, Oct 7, 2015 at 3:42 PM, Andrew Paseltiner notifications@github.com
|
strega-nil
commented
Oct 25, 2015
@nikomatsakis I'd like to attempt a rebase. Would you like to mentor |
nikomatsakis
commented
Oct 26, 2015
I would be happy to, but there has been someone doing the rebase that I've On Sun, Oct 25, 2015 at 7:44 AM, Nicholas notifications@github.com wrote:
|
apasel422
commented
Oct 26, 2015
I had been working on the rebase, but haven't been able to work on it recently, so @GBGamer is welcome to take it over. |
nikomatsakis
commented
Oct 26, 2015
Ah, OK. Did you have an intermediate branch that might be worth looing at? On Mon, Oct 26, 2015 at 2:11 PM, Andrew Paseltiner <notifications@github.com
|
Rebased #21836
cc @eddyb (didn't see any reply on irc), @nrc