diff options
| author | LeSeulArtichaut <leseulartichaut@gmail.com> | 2020-01-29 16:18:51 +0100 |
|---|---|---|
| committer | LeSeulArtichaut <leseulartichaut@gmail.com> | 2020-01-29 17:49:38 +0100 |
| commit | 684bd50148ea1e240ebfdce2365af7422f46ec53 (patch) | |
| tree | b1f2bd112f21d2d0abbbb801851e0f59437bb77f /src | |
| parent | eed12bcd0cb281979c4c9ed956b9e41fda2bfaeb (diff) | |
| download | rust-684bd50148ea1e240ebfdce2365af7422f46ec53.tar.gz rust-684bd50148ea1e240ebfdce2365af7422f46ec53.zip | |
Document `From` implementation for NonZero nums
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/num/mod.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 91848abd68d..5d2c1d0de2c 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -91,8 +91,12 @@ assert_eq!(size_of::<Option<core::num::", stringify!($Ty), ">>(), size_of::<", s #[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 + } } } |
