Fix annotation of code blocks

This commit is contained in:
George Bateman 2022-02-01 21:44:53 +00:00
parent 5357ec1473
commit d372baf3f9
No known key found for this signature in database
GPG key ID: C417AA9C4039EFCF
2 changed files with 6 additions and 4 deletions

View file

@ -275,6 +275,7 @@ mod prim_bool {}
mod prim_never {} mod prim_never {}
#[doc(primitive = "char")] #[doc(primitive = "char")]
#[allow(rustdoc::invalid_rust_codeblocks)]
/// A character type. /// A character type.
/// ///
/// The `char` type represents a single character. More specifically, since /// The `char` type represents a single character. More specifically, since
@ -295,7 +296,7 @@ mod prim_never {}
/// No `char` may be constructed, whether as a literal or at runtime, that is not a /// No `char` may be constructed, whether as a literal or at runtime, that is not a
/// Unicode scalar value: /// Unicode scalar value:
/// ///
/// ```text /// ```compile_fail
/// // Each of these is a compiler error /// // Each of these is a compiler error
/// ['\u{D800}', '\u{DFFF}', '\u{110000}']; /// ['\u{D800}', '\u{DFFF}', '\u{110000}'];
/// ``` /// ```
@ -305,7 +306,7 @@ mod prim_never {}
/// char::from_u32(0xDE01).unwrap(); /// char::from_u32(0xDE01).unwrap();
/// ``` /// ```
/// ///
/// ``` /// ```no_run
/// // Undefined behaviour /// // Undefined behaviour
/// unsafe { char::from_u32_unchecked(0x110000) }; /// unsafe { char::from_u32_unchecked(0x110000) };
/// ``` /// ```

View file

@ -275,6 +275,7 @@ mod prim_bool {}
mod prim_never {} mod prim_never {}
#[doc(primitive = "char")] #[doc(primitive = "char")]
#[allow(rustdoc::invalid_rust_codeblocks)]
/// A character type. /// A character type.
/// ///
/// The `char` type represents a single character. More specifically, since /// The `char` type represents a single character. More specifically, since
@ -295,7 +296,7 @@ mod prim_never {}
/// No `char` may be constructed, whether as a literal or at runtime, that is not a /// No `char` may be constructed, whether as a literal or at runtime, that is not a
/// Unicode scalar value: /// Unicode scalar value:
/// ///
/// ```text /// ```compile_fail
/// // Each of these is a compiler error /// // Each of these is a compiler error
/// ['\u{D800}', '\u{DFFF}', '\u{110000}']; /// ['\u{D800}', '\u{DFFF}', '\u{110000}'];
/// ``` /// ```
@ -305,7 +306,7 @@ mod prim_never {}
/// char::from_u32(0xDE01).unwrap(); /// char::from_u32(0xDE01).unwrap();
/// ``` /// ```
/// ///
/// ``` /// ```no_run
/// // Undefined behaviour /// // Undefined behaviour
/// unsafe { char::from_u32_unchecked(0x110000) }; /// unsafe { char::from_u32_unchecked(0x110000) };
/// ``` /// ```