@@ -11,11 +11,10 @@ use super::*;
11
11
impl char {
12
12
/// The highest valid code point a `char` can have.
13
13
///
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
15
15
/// Point], but only ones within a certain range. `MAX` is the highest valid
16
16
/// code point that's a valid [Unicode Scalar Value].
17
17
///
18
- /// [`char`]: ../../std/primitive.char.html
19
18
/// [Unicode Scalar Value]: http://www.unicode.org/glossary/#unicode_scalar_value
20
19
/// [Code Point]: http://www.unicode.org/glossary/#code_point
21
20
#[ unstable( feature = "assoc_char_consts" , reason = "recently added" , issue = "71763" ) ]
@@ -25,7 +24,7 @@ impl char {
25
24
/// decoding error.
26
25
///
27
26
/// 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).
29
28
#[ unstable( feature = "assoc_char_consts" , reason = "recently added" , issue = "71763" ) ]
30
29
pub const REPLACEMENT_CHARACTER : char = '\u{FFFD}' ;
31
30
@@ -96,7 +95,7 @@ impl char {
96
95
97
96
/// Converts a `u32` to a `char`.
98
97
///
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
100
99
/// `as`:
101
100
///
102
101
/// ```
@@ -107,16 +106,15 @@ impl char {
107
106
/// ```
108
107
///
109
108
/// 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`.
112
111
///
113
- /// [`char`]: ../../std/primitive.char.html
114
- /// [`u32`]: ../../std/primitive.u32.html
112
+ /// [`u32`]: primitive.u32.html
115
113
///
116
114
/// For an unsafe version of this function which ignores these checks, see
117
115
/// [`from_u32_unchecked`].
118
116
///
119
- /// [`from_u32_unchecked`]: fn .from_u32_unchecked.html
117
+ /// [`from_u32_unchecked`]: #method .from_u32_unchecked
120
118
///
121
119
/// # Examples
122
120
///
@@ -130,7 +128,7 @@ impl char {
130
128
/// assert_eq!(Some('❤'), c);
131
129
/// ```
132
130
///
133
- /// Returning `None` when the input is not a valid [ `char`] :
131
+ /// Returning `None` when the input is not a valid `char`:
134
132
///
135
133
/// ```
136
134
/// use std::char;
@@ -147,7 +145,7 @@ impl char {
147
145
148
146
/// Converts a `u32` to a `char`, ignoring validity.
149
147
///
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
151
149
/// `as`:
152
150
///
153
151
/// ```
@@ -158,19 +156,18 @@ impl char {
158
156
/// ```
159
157
///
160
158
/// 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.
163
161
///
164
- /// [`char`]: ../../std/primitive.char.html
165
- /// [`u32`]: ../../std/primitive.u32.html
162
+ /// [`u32`]: primitive.u32.html
166
163
///
167
164
/// # Safety
168
165
///
169
166
/// This function is unsafe, as it may construct invalid `char` values.
170
167
///
171
168
/// For a safe version of this function, see the [`from_u32`] function.
172
169
///
173
- /// [`from_u32`]: fn .from_u32.html
170
+ /// [`from_u32`]: #method .from_u32
174
171
///
175
172
/// # Examples
176
173
///
0 commit comments