-
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
revert stabilization of !
and TryFrom
#49691
Comments
triage: P-high |
cc @canndrew -- this is sorta sad :( |
Since |
Interesting. |
So @alexcrichton and I were saying that it would make sense to revert the |
FWIW I think it sucks if we can’t find a satisfying solution to #49593 in time. If we must revert it should’t be in the opposite order but there’s no need to separate them either. I could prepare a commit that changes some |
Argh. I meant to do this today, but I failed to get it done. It's going to be a bit tricky to revert I do not want to just revert back to what we had -- in particular I do not want to keep that flag we had on |
Hmm, ping @pnkfelix -- do you think you could take on reverting this next week? |
@SimonSapin I agree, but I feel reluctant to make changes to inference in a beta backport. But maybe it is worth expending some effort to see if we can find a minimal delta that we'd feel comfortable with. |
That’s definitely fair enough. I’m just sad we didn’t catch all this sooner. |
Brainstorming:
Some options:
I'm not sure what other options there are, but I guess that trying to disable the back-propagation in the event that it generates constraints that violate I'm also a bit unclear: would we check for any unifications that violate (cc @eddyb for thoughts) |
If so, back-propagation becomes a non-issue in this case, doesn’t it? |
Another point in the solution space would be to make Now, on some level we might abstractly think, "but (This sounds like a more radical solution, but I dunno. It's something we've (at least in my impression) only held off on in the name of conservatism and incrementality. The idea itself seems "obviously correct", and like something we'd surely want to have eventually, whereas it doesn't seem obviously true that we'd want to have the special-case type inference hacks if we already had this. So it's at least not self-evident which one is less conservative.) |
@glaebhoerl but |
Oh, I see. Thanks for explaining. In that case, we only need to implement #48055 :P |
assigning to self to try to ensure I actually attack this problem tomorrow. But leaving niko on assignee list in case I do not finish it tomorrow (because he and I will be swapping our PTO-states) |
…ack to `()`, not `!`. Note that this commit, since it is trying to be minimal in order to ease backporting to the beta and release channels, does *not* include the old future-proofing warnings that we used to have associated with such fallback to `()`; see discussion at this comment: rust-lang#49691 (comment)
…-al, r=alexcrichton Revert stabilization of never_type (!) et al Fix #49691 I *think* this correctly adopts @nikomatsakis 's desired fix of: * reverting stabilization of `!` and `TryFrom`, and * returning to the previous fallback semantics (i.e. it is once again dependent on whether the crate has opted into `#[feature(never_type)]`, * **without** attempting to put back in the previous future-proofing warnings regarding the change in fallback semantics. (I'll be away from computers for a week starting now, so any updates to this PR should be either pushed into it, or someone else should adopt the task of polishing this fix and put up their own PR.)
…ack to `()`, not `!`. Note that this commit, since it is trying to be minimal in order to ease backporting to the beta and release channels, does *not* include the old future-proofing warnings that we used to have associated with such fallback to `()`; see discussion at this comment: rust-lang#49691 (comment)
Per #49593, we need to rollback the stabilization of
!
(and a few dependent things) from 1.26. That's sad, but hopefully only temporary -- we'll bring it back once we can fix the coercion, but we don't want to be tinkering with the core type system in a beta backport. I'm opening this P-high issue specifically to track the backport, not the response.The text was updated successfully, but these errors were encountered: