mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-17 05:25:37 +03:00
Document From implementation for NonZero nums
This commit is contained in:
@@ -91,8 +91,12 @@ pub const fn get(self) -> $Int {
|
||||
|
||||
#[stable(feature = "from_nonzero", since = "1.31.0")]
|
||||
impl From<$Ty> for $Int {
|
||||
fn from(nonzero: $Ty) -> Self {
|
||||
nonzero.0
|
||||
doc_comment! {
|
||||
concat!(
|
||||
"Converts a `", stringify!($Ty), "` into an `", stringify!($Int), "`"),
|
||||
fn from(nonzero: $Ty) -> Self {
|
||||
nonzero.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user