Skip to content

Commit 2a24c8f

Browse files
authored
Rollup merge of rust-lang#59835 - lzutao:nonzero-signed, r=Mark-Simulacrum
Re-export NonZero signed variant in std Closes rust-lang#59834 .
2 parents 4b160ef + 404df31 commit 2a24c8f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Diff for: src/libstd/num.rs

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ pub use core::num::Wrapping;
1313

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

1719
#[cfg(test)] use crate::fmt;
1820
#[cfg(test)] use crate::ops::{Add, Sub, Mul, Div, Rem};

Diff for: src/test/ui/try-block/try-block-bad-type.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ LL | Err("")?;
66
|
77
= help: the following implementations were found:
88
<i32 as std::convert::From<bool>>
9-
<i32 as std::convert::From<core::num::NonZeroI32>>
109
<i32 as std::convert::From<i16>>
1110
<i32 as std::convert::From<i8>>
11+
<i32 as std::convert::From<std::num::NonZeroI32>>
1212
and 2 others
1313
= note: required by `std::convert::From::from`
1414

0 commit comments

Comments
 (0)