File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -275,6 +275,7 @@ mod prim_bool {}
275
275
mod prim_never { }
276
276
277
277
#[ doc( primitive = "char" ) ]
278
+ #[ allow( rustdoc:: invalid_rust_codeblocks) ]
278
279
/// A character type.
279
280
///
280
281
/// The `char` type represents a single character. More specifically, since
@@ -295,7 +296,7 @@ mod prim_never {}
295
296
/// No `char` may be constructed, whether as a literal or at runtime, that is not a
296
297
/// Unicode scalar value:
297
298
///
298
- /// ```text
299
+ /// ```compile_fail
299
300
/// // Each of these is a compiler error
300
301
/// ['\u{D800}', '\u{DFFF}', '\u{110000}'];
301
302
/// ```
@@ -305,7 +306,7 @@ mod prim_never {}
305
306
/// char::from_u32(0xDE01).unwrap();
306
307
/// ```
307
308
///
308
- /// ```
309
+ /// ```no_run
309
310
/// // Undefined behaviour
310
311
/// unsafe { char::from_u32_unchecked(0x110000) };
311
312
/// ```
Original file line number Diff line number Diff line change @@ -275,6 +275,7 @@ mod prim_bool {}
275
275
mod prim_never { }
276
276
277
277
#[ doc( primitive = "char" ) ]
278
+ #[ allow( rustdoc:: invalid_rust_codeblocks) ]
278
279
/// A character type.
279
280
///
280
281
/// The `char` type represents a single character. More specifically, since
@@ -295,7 +296,7 @@ mod prim_never {}
295
296
/// No `char` may be constructed, whether as a literal or at runtime, that is not a
296
297
/// Unicode scalar value:
297
298
///
298
- /// ```text
299
+ /// ```compile_fail
299
300
/// // Each of these is a compiler error
300
301
/// ['\u{D800}', '\u{DFFF}', '\u{110000}'];
301
302
/// ```
@@ -305,7 +306,7 @@ mod prim_never {}
305
306
/// char::from_u32(0xDE01).unwrap();
306
307
/// ```
307
308
///
308
- /// ```
309
+ /// ```no_run
309
310
/// // Undefined behaviour
310
311
/// unsafe { char::from_u32_unchecked(0x110000) };
311
312
/// ```
You can’t perform that action at this time.
0 commit comments