@@ -11,11 +11,10 @@ use super::*;
1111impl char {
1212 /// The highest valid code point a `char` can have.
1313 ///
14- /// A [ `char`] is a [Unicode Scalar Value], which means that it is a [Code
14+ /// A `char` is a [Unicode Scalar Value], which means that it is a [Code
1515 /// Point], but only ones within a certain range. `MAX` is the highest valid
1616 /// code point that's a valid [Unicode Scalar Value].
1717 ///
18- /// [`char`]: ../../std/primitive.char.html
1918 /// [Unicode Scalar Value]: http://www.unicode.org/glossary/#unicode_scalar_value
2019 /// [Code Point]: http://www.unicode.org/glossary/#code_point
2120 #[ unstable( feature = "assoc_char_consts" , reason = "recently added" , issue = "71763" ) ]
@@ -25,7 +24,7 @@ impl char {
2524 /// decoding error.
2625 ///
2726 /// It can occur, for example, when giving ill-formed UTF-8 bytes to
28- /// [`String::from_utf8_lossy`](../../std/ string/struct.String.html#method.from_utf8_lossy).
27+ /// [`String::from_utf8_lossy`](string/struct.String.html#method.from_utf8_lossy).
2928 #[ unstable( feature = "assoc_char_consts" , reason = "recently added" , issue = "71763" ) ]
3029 pub const REPLACEMENT_CHARACTER : char = '\u{FFFD}' ;
3130
@@ -96,7 +95,7 @@ impl char {
9695
9796 /// Converts a `u32` to a `char`.
9897 ///
99- /// Note that all [ `char`] s are valid [`u32`]s, and can be cast to one with
98+ /// Note that all `char`s are valid [`u32`]s, and can be cast to one with
10099 /// `as`:
101100 ///
102101 /// ```
@@ -107,16 +106,15 @@ impl char {
107106 /// ```
108107 ///
109108 /// However, the reverse is not true: not all valid [`u32`]s are valid
110- /// [ `char`] s. `from_u32()` will return `None` if the input is not a valid value
111- /// for a [ `char`] .
109+ /// `char`s. `from_u32()` will return `None` if the input is not a valid value
110+ /// for a `char`.
112111 ///
113- /// [`char`]: ../../std/primitive.char.html
114- /// [`u32`]: ../../std/primitive.u32.html
112+ /// [`u32`]: primitive.u32.html
115113 ///
116114 /// For an unsafe version of this function which ignores these checks, see
117115 /// [`from_u32_unchecked`].
118116 ///
119- /// [`from_u32_unchecked`]: fn .from_u32_unchecked.html
117+ /// [`from_u32_unchecked`]: #method .from_u32_unchecked
120118 ///
121119 /// # Examples
122120 ///
@@ -130,7 +128,7 @@ impl char {
130128 /// assert_eq!(Some('❤'), c);
131129 /// ```
132130 ///
133- /// Returning `None` when the input is not a valid [ `char`] :
131+ /// Returning `None` when the input is not a valid `char`:
134132 ///
135133 /// ```
136134 /// use std::char;
@@ -147,7 +145,7 @@ impl char {
147145
148146 /// Converts a `u32` to a `char`, ignoring validity.
149147 ///
150- /// Note that all [ `char`] s are valid [`u32`]s, and can be cast to one with
148+ /// Note that all `char`s are valid [`u32`]s, and can be cast to one with
151149 /// `as`:
152150 ///
153151 /// ```
@@ -158,19 +156,18 @@ impl char {
158156 /// ```
159157 ///
160158 /// However, the reverse is not true: not all valid [`u32`]s are valid
161- /// [ `char`] s. `from_u32_unchecked()` will ignore this, and blindly cast to
162- /// [ `char`] , possibly creating an invalid one.
159+ /// `char`s. `from_u32_unchecked()` will ignore this, and blindly cast to
160+ /// `char`, possibly creating an invalid one.
163161 ///
164- /// [`char`]: ../../std/primitive.char.html
165- /// [`u32`]: ../../std/primitive.u32.html
162+ /// [`u32`]: primitive.u32.html
166163 ///
167164 /// # Safety
168165 ///
169166 /// This function is unsafe, as it may construct invalid `char` values.
170167 ///
171168 /// For a safe version of this function, see the [`from_u32`] function.
172169 ///
173- /// [`from_u32`]: fn .from_u32.html
170+ /// [`from_u32`]: #method .from_u32
174171 ///
175172 /// # Examples
176173 ///
0 commit comments