Skip to content

Commit

Permalink
Auto merge of rust-lang#59843 - pietroalbini:stable-extras, r=Mark-Si…
Browse files Browse the repository at this point in the history
…mulacrum

[stable] Cherry-pick stdlib fix

Cherry-picked:

* rust-lang#59835: Re-export NonZero signed variant in std

r? @Mark-Simulacrum
cc rust-lang#59834 @rust-lang/release
  • Loading branch information
bors committed Apr 10, 2019
2 parents a7af34a + c19ca84 commit 91856ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/libstd/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ pub use core::num::Wrapping;

#[stable(feature = "nonzero", since = "1.28.0")]
pub use core::num::{NonZeroU8, NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU128, NonZeroUsize};
#[stable(feature = "signed_nonzero", since = "1.34.0")]
pub use core::num::{NonZeroI8, NonZeroI16, NonZeroI32, NonZeroI64, NonZeroI128, NonZeroIsize};

#[cfg(test)] use fmt;
#[cfg(test)] use ops::{Add, Sub, Mul, Div, Rem};
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/try-block/try-block-bad-type.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ LL | Err("")?; //~ ERROR the trait bound `i32: std::convert::From<&str>`
|
= help: the following implementations were found:
<i32 as std::convert::From<bool>>
<i32 as std::convert::From<core::num::NonZeroI32>>
<i32 as std::convert::From<i16>>
<i32 as std::convert::From<i8>>
<i32 as std::convert::From<std::num::NonZeroI32>>
and 2 others
= note: required by `std::convert::From::from`

Expand Down

0 comments on commit 91856ed

Please sign in to comment.