Skip to content

Commit 8505610

Browse files
authored
Rollup merge of #87618 - GuillaumeGomez:std-char-types-doc, r=jyn514,camelid
Add missing documentation for std::char types
2 parents c9b45e6 + 5b5649f commit 8505610

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

library/core/src/char/convert.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ impl const From<u8> for char {
218218
}
219219

220220
/// An error which can be returned when parsing a char.
221+
///
222+
/// This `struct` is created when using the [`char::from_str`] method.
221223
#[stable(feature = "char_from_str", since = "1.20.0")]
222224
#[derive(Clone, Debug, PartialEq, Eq)]
223225
pub struct ParseCharError {
@@ -300,7 +302,10 @@ impl TryFrom<u32> for char {
300302
}
301303
}
302304

303-
/// The error type returned when a conversion from u32 to char fails.
305+
/// The error type returned when a conversion from [`prim@u32`] to [`prim@char`] fails.
306+
///
307+
/// This `struct` is created by the [`char::try_from<u32>`](char#impl-TryFrom<u32>) method.
308+
/// See its documentation for more.
304309
#[stable(feature = "try_from", since = "1.34.0")]
305310
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
306311
pub struct CharTryFromError(());

0 commit comments

Comments
 (0)