diff options
| author | bors <bors@rust-lang.org> | 2018-04-21 21:14:53 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-04-21 21:14:53 +0000 |
| commit | aa7ce896f2c41550f7f6cf3dadb21bacc69cc912 (patch) | |
| tree | 421b5b857e218551788d71342af7e7d7abb7cde0 /src/libstd | |
| parent | 699eb95ae3dae023cddca85facf6660b196bd0d1 (diff) | |
| parent | 42b6d4653a2ad22be695760aba3514fc64c18d66 (diff) | |
| download | rust-aa7ce896f2c41550f7f6cf3dadb21bacc69cc912.tar.gz rust-aa7ce896f2c41550f7f6cf3dadb21bacc69cc912.zip | |
Auto merge of #50121 - pnkfelix:revert-stabilization-of-never-type-et-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.)
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/error.rs | 8 | ||||
| -rw-r--r-- | src/libstd/lib.rs | 2 | ||||
| -rw-r--r-- | src/libstd/primitive_docs.rs | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/libstd/error.rs b/src/libstd/error.rs index 3c209928d43..749b8ccc13d 100644 --- a/src/libstd/error.rs +++ b/src/libstd/error.rs @@ -233,7 +233,7 @@ impl<'a> From<Cow<'a, str>> for Box<Error> { } } -#[stable(feature = "never_type", since = "1.26.0")] +#[unstable(feature = "never_type", issue = "35121")] impl Error for ! { fn description(&self) -> &str { *self } } @@ -284,14 +284,14 @@ impl Error for num::ParseIntError { } } -#[stable(feature = "try_from", since = "1.26.0")] +#[unstable(feature = "try_from", issue = "33417")] impl Error for num::TryFromIntError { fn description(&self) -> &str { self.__description() } } -#[stable(feature = "try_from", since = "1.26.0")] +#[unstable(feature = "try_from", issue = "33417")] impl Error for array::TryFromSliceError { fn description(&self) -> &str { self.__description() @@ -365,7 +365,7 @@ impl Error for cell::BorrowMutError { } } -#[stable(feature = "try_from", since = "1.26.0")] +#[unstable(feature = "try_from", issue = "33417")] impl Error for char::CharTryFromError { fn description(&self) -> &str { "converted integer out of range for `char`" diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 7d896695311..e53e009678c 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -275,6 +275,7 @@ #![feature(macro_reexport)] #![feature(macro_vis_matcher)] #![feature(needs_panic_runtime)] +#![feature(never_type)] #![feature(exhaustive_patterns)] #![feature(nonzero)] #![feature(num_bits_bytes)] @@ -306,6 +307,7 @@ #![feature(test, rustc_private)] #![feature(thread_local)] #![feature(toowned_clone_into)] +#![feature(try_from)] #![feature(try_reserve)] #![feature(unboxed_closures)] #![feature(untagged_unions)] diff --git a/src/libstd/primitive_docs.rs b/src/libstd/primitive_docs.rs index ce4bbfffc2e..42bac605511 100644 --- a/src/libstd/primitive_docs.rs +++ b/src/libstd/primitive_docs.rs @@ -79,6 +79,7 @@ mod prim_bool { } /// write: /// /// ``` +/// #![feature(never_type)] /// # fn foo() -> u32 { /// let x: ! = { /// return 123 @@ -155,6 +156,7 @@ mod prim_bool { } /// for example: /// /// ``` +/// #![feature(never_type)] /// # use std::fmt; /// # trait Debug { /// # fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result; |
