@@ -1805,7 +1805,7 @@ declare_lint! {
1805
1805
///
1806
1806
/// ### Example
1807
1807
///
1808
- /// ```
1808
+ /// ```rust
1809
1809
/// if let _ = 123 {
1810
1810
/// println!("always runs!");
1811
1811
/// }
@@ -2431,7 +2431,19 @@ declare_lint! {
2431
2431
/// }
2432
2432
/// ```
2433
2433
///
2434
- /// {{produces}}
2434
+ /// This will produce:
2435
+ ///
2436
+ /// ```text
2437
+ /// warning: formatting may not be suitable for sub-register argument
2438
+ /// --> src/main.rs:7:19
2439
+ /// |
2440
+ /// 7 | asm!("mov {0}, {0}", in(reg) 0i16);
2441
+ /// | ^^^ ^^^ ---- for this argument
2442
+ /// |
2443
+ /// = note: `#[warn(asm_sub_register)]` on by default
2444
+ /// = help: use the `x` modifier to have the register formatted as `ax`
2445
+ /// = help: or use the `r` modifier to keep the default formatting of `rax`
2446
+ /// ```
2435
2447
///
2436
2448
/// ### Explanation
2437
2449
///
@@ -2470,7 +2482,17 @@ declare_lint! {
2470
2482
/// }
2471
2483
/// ```
2472
2484
///
2473
- /// {{produces}}
2485
+ /// This will produce:
2486
+ ///
2487
+ /// ```text
2488
+ /// warning: avoid using `.att_syntax`, prefer using `options(att_syntax)` instead
2489
+ /// --> src/main.rs:8:14
2490
+ /// |
2491
+ /// 8 | ".att_syntax",
2492
+ /// | ^^^^^^^^^^^
2493
+ /// |
2494
+ /// = note: `#[warn(bad_asm_style)]` on by default
2495
+ /// ```
2474
2496
///
2475
2497
/// ### Explanation
2476
2498
///
@@ -2788,7 +2810,7 @@ declare_lint! {
2788
2810
///
2789
2811
/// ### Example
2790
2812
///
2791
- /// ```compile_fail
2813
+ /// ```rust, compile_fail
2792
2814
/// #![feature(staged_api)]
2793
2815
///
2794
2816
/// #[derive(Clone)]
@@ -3618,7 +3640,17 @@ declare_lint! {
3618
3640
/// fn foo() {}
3619
3641
/// ```
3620
3642
///
3621
- /// {{produces}}
3643
+ /// This will produce:
3644
+ ///
3645
+ /// ```text
3646
+ /// warning: duplicated attribute
3647
+ /// --> src/lib.rs:2:1
3648
+ /// |
3649
+ /// 2 | #[test]
3650
+ /// | ^^^^^^^
3651
+ /// |
3652
+ /// = note: `#[warn(duplicate_macro_attributes)]` on by default
3653
+ /// ```
3622
3654
///
3623
3655
/// ### Explanation
3624
3656
///
0 commit comments