mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-05 12:25:13 +00:00
Auto merge of #8706 - lupd:cast-abs-to-unsigned, r=xFrednet
Fix formatting of `cast_abs_to_unsigned` docs The "use instead" section of the example was not being formatted as Rust code, and the "configuration" documentation was being formatted as Rust code. changelog: `[cast_abs_to_unsigned]` Fix example/configuration formatting
This commit is contained in:
commit
b2959dbf69
@ -487,6 +487,7 @@ declare_clippy_lint! {
|
|||||||
/// let y: u32 = x.abs() as u32;
|
/// let y: u32 = x.abs() as u32;
|
||||||
/// ```
|
/// ```
|
||||||
/// Use instead:
|
/// Use instead:
|
||||||
|
/// ```rust
|
||||||
/// let x: i32 = -42;
|
/// let x: i32 = -42;
|
||||||
/// let y: u32 = x.unsigned_abs();
|
/// let y: u32 = x.unsigned_abs();
|
||||||
/// ```
|
/// ```
|
||||||
|
Loading…
Reference in New Issue
Block a user