Document From implementation for NonZero nums

This commit is contained in:
LeSeulArtichaut
2020-01-29 16:18:51 +01:00
parent eed12bcd0c
commit 684bd50148
+6 -2
View File
@@ -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
}
}
}