Skip to content
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 never_type (!) et al #50121

Merged

Conversation

pnkfelix
Copy link
Member

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.)

This commit is just covering the feature gate itself and the tests
that made direct use of `!` and thus need to opt back into the
feature.

A follow on commit brings back the other change that motivates the
revert: Namely, going back to the old rules for falling back to `()`.
…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)
@pnkfelix
Copy link
Member Author

cc @SimonSapin @alexcrichton

@pnkfelix pnkfelix added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 20, 2018
@pnkfelix
Copy link
Member Author

Even though @nikomatsakis is on PTO, I believe he will be back soon enough that he would be a good choice as a reviewer. (However, if any one else wants to jump on board, I will not object.)

r? @nikomatsakis

@alexcrichton
Copy link
Member

Thanks @pnkfelix! The libs parts here look good to me

@alexcrichton alexcrichton added this to the 1.26 milestone Apr 20, 2018
@alexcrichton alexcrichton added beta-nominated Nominated for backporting to the compiler in the beta channel. beta-accepted Accepted for backporting to the compiler in the beta channel. labels Apr 20, 2018
@rust-highfive

This comment has been minimized.

@kennytm kennytm added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 20, 2018
@kennytm
Copy link
Member

kennytm commented Apr 20, 2018

(I've added 42b6d46 to address the trivial build failures)

@rust-highfive

This comment has been minimized.

@kennytm kennytm force-pushed the revert-stabilization-of-never-type-et-al branch from 594a552 to 76639f7 Compare April 20, 2018 20:11
@rust-highfive

This comment has been minimized.

@kennytm kennytm force-pushed the revert-stabilization-of-never-type-et-al branch from 76639f7 to 7c4b7c6 Compare April 21, 2018 04:54
@kennytm kennytm force-pushed the revert-stabilization-of-never-type-et-al branch from 7c4b7c6 to 42b6d46 Compare April 21, 2018 07:18
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Apr 21, 2018

📌 Commit 42b6d46 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 21, 2018
@alexcrichton
Copy link
Member

@bors: p=1

due to backport status

@SimonSapin
Copy link
Contributor

@alexcrichton Do we also want to revert the addition of impl FromStr for PathBuf #48292 so that in can be later re-added with type Err = !; #49039 rather than a dedicated empty enum ?

@bors
Copy link
Contributor

bors commented Apr 21, 2018

⌛ Testing commit 42b6d46 with merge aa7ce89...

bors added a commit that referenced this pull request Apr 21, 2018
…-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.)
@bors
Copy link
Contributor

bors commented Apr 22, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing aa7ce89 to master...

@bors bors merged commit 42b6d46 into rust-lang:master Apr 22, 2018
@bors bors mentioned this pull request Apr 22, 2018
@zackmdavis zackmdavis mentioned this pull request Apr 23, 2018
bors added a commit that referenced this pull request Apr 23, 2018
[beta] Another round of backports

This is a backport of:

* #50039
* #50121
@alexcrichton alexcrichton removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Apr 24, 2018
@termoshtt termoshtt mentioned this pull request May 3, 2018
6 tasks
kennytm added a commit to kennytm/rust that referenced this pull request Sep 14, 2018
…kennytm

re-mark the never docs as unstable

Fixes rust-lang#54198

This stability attribute was removed in rust-lang#47630, but not replaced with a `#[stable]` attribute, and when rust-lang#50121 reverted that stabilization, it didn't set the docs back to unstable. I'm concerned as to why it was allowed to not have the stability attribute at all, but at least this can put it back.

I'm nominating this for beta backport because it's a really small change, and right now our docs are in an awkward position where the `!` type is technically unstable to use, but the docs don't say so the same way any other library feature would. (And this is also the case *on stable* now, but i'm not suggesting a stable backport for a docs fix.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

revert stabilization of ! and TryFrom
7 participants