diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-04-25 03:05:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-25 03:05:25 +0200 |
| commit | 3fffcd33141da118c0224914bf9418ba9c37d157 (patch) | |
| tree | 9b6ddd5820ccba213652b3fb3ae6e48965b8c501 /src/libstd | |
| parent | a4ef188ab6008c6f600e06a7e01e81f75370d574 (diff) | |
| parent | 7af0fccc88127619ec7e0fa695437525678db0b2 (diff) | |
| download | rust-3fffcd33141da118c0224914bf9418ba9c37d157.tar.gz rust-3fffcd33141da118c0224914bf9418ba9c37d157.zip | |
Rollup merge of #60185 - NieDzejkob:int-error-kind-reexport, r=rkruppe
Reexport IntErrorKind in std Currently `IntErrorKind` can only be found in `core`. @Centril confirmed on Discord that this is unintentional (should I r? him in this situation?). Should there be a test for this? As far as this *specific* situation goes, I don't think so, I'll risk it and say that there's no way this regresses. However, it might be a good idea to have some tool detect public items in `core` that are not reexported in `std`. Does this belong in tidy, or should that be a separate tool? Is there some rustc-specific *linter*? Unless that's entirely a dumb idea, this should probably get an issue. Note: My local build hasn't finished yet, but it's well past the point where I would expect problems.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/lib.rs | 1 | ||||
| -rw-r--r-- | src/libstd/num.rs | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index bdec0c347f5..7b0e090fb1b 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -267,6 +267,7 @@ #![feature(hash_raw_entry)] #![feature(hashmap_internals)] #![feature(int_error_internals)] +#![feature(int_error_matching)] #![feature(integer_atomics)] #![feature(lang_items)] #![feature(libc)] diff --git a/src/libstd/num.rs b/src/libstd/num.rs index d67d0b55a79..2a2ca0b5237 100644 --- a/src/libstd/num.rs +++ b/src/libstd/num.rs @@ -16,6 +16,12 @@ pub use core::num::{NonZeroU8, NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU128, #[stable(feature = "signed_nonzero", since = "1.34.0")] pub use core::num::{NonZeroI8, NonZeroI16, NonZeroI32, NonZeroI64, NonZeroI128, NonZeroIsize}; +#[unstable(feature = "int_error_matching", + reason = "it can be useful to match errors when making error messages \ + for integer parsing", + issue = "22639")] +pub use core::num::IntErrorKind; + #[cfg(test)] use crate::fmt; #[cfg(test)] use crate::ops::{Add, Sub, Mul, Div, Rem}; |
