diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-07-30 11:25:12 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2022-03-07 13:59:10 +0100 |
| commit | 5b5649fd73755eb2d9c4473efad0a1f264e3cfd0 (patch) | |
| tree | 836ae0ec011061e7cfb4c25daffb0a202db65dc9 | |
| parent | a64180f67f148c0d13f30a8137dc4b8cc2b28757 (diff) | |
| download | rust-5b5649fd73755eb2d9c4473efad0a1f264e3cfd0.tar.gz rust-5b5649fd73755eb2d9c4473efad0a1f264e3cfd0.zip | |
Add missing documentation for std::char types
| -rw-r--r-- | library/core/src/char/convert.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/library/core/src/char/convert.rs b/library/core/src/char/convert.rs index 139841368d6..4ee0310b361 100644 --- a/library/core/src/char/convert.rs +++ b/library/core/src/char/convert.rs @@ -218,6 +218,8 @@ impl const From<u8> for char { } /// An error which can be returned when parsing a char. +/// +/// This `struct` is created when using the [`char::from_str`] method. #[stable(feature = "char_from_str", since = "1.20.0")] #[derive(Clone, Debug, PartialEq, Eq)] pub struct ParseCharError { @@ -300,7 +302,10 @@ impl TryFrom<u32> for char { } } -/// The error type returned when a conversion from u32 to char fails. +/// The error type returned when a conversion from [`prim@u32`] to [`prim@char`] fails. +/// +/// This `struct` is created by the [`char::try_from<u32>`](char#impl-TryFrom<u32>) method. +/// See its documentation for more. #[stable(feature = "try_from", since = "1.34.0")] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub struct CharTryFromError(()); |
