File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -275,6 +275,7 @@ mod prim_bool {}
275275mod prim_never { }
276276
277277#[ doc( primitive = "char" ) ]
278+ #[ allow( rustdoc:: invalid_rust_codeblocks) ]
278279/// A character type.
279280///
280281/// The `char` type represents a single character. More specifically, since
@@ -295,7 +296,7 @@ mod prim_never {}
295296/// No `char` may be constructed, whether as a literal or at runtime, that is not a
296297/// Unicode scalar value:
297298///
298- /// ```text
299+ /// ```compile_fail
299300/// // Each of these is a compiler error
300301/// ['\u{D800}', '\u{DFFF}', '\u{110000}'];
301302/// ```
@@ -305,7 +306,7 @@ mod prim_never {}
305306/// char::from_u32(0xDE01).unwrap();
306307/// ```
307308///
308- /// ```
309+ /// ```no_run
309310/// // Undefined behaviour
310311/// unsafe { char::from_u32_unchecked(0x110000) };
311312/// ```
Original file line number Diff line number Diff line change @@ -275,6 +275,7 @@ mod prim_bool {}
275275mod prim_never { }
276276
277277#[ doc( primitive = "char" ) ]
278+ #[ allow( rustdoc:: invalid_rust_codeblocks) ]
278279/// A character type.
279280///
280281/// The `char` type represents a single character. More specifically, since
@@ -295,7 +296,7 @@ mod prim_never {}
295296/// No `char` may be constructed, whether as a literal or at runtime, that is not a
296297/// Unicode scalar value:
297298///
298- /// ```text
299+ /// ```compile_fail
299300/// // Each of these is a compiler error
300301/// ['\u{D800}', '\u{DFFF}', '\u{110000}'];
301302/// ```
@@ -305,7 +306,7 @@ mod prim_never {}
305306/// char::from_u32(0xDE01).unwrap();
306307/// ```
307308///
308- /// ```
309+ /// ```no_run
309310/// // Undefined behaviour
310311/// unsafe { char::from_u32_unchecked(0x110000) };
311312/// ```
You can’t perform that action at this time.
0 commit comments