Skip to content

Commit 1b41a38

Browse files
authored
Rollup merge of #104354 - lukas-code:blank-lines-2, r=JohnTitor
Remove leading newlines from `NonZero*` doc examples Like #103045, but for `NonZero*`. `@rustbot` label A-docs
2 parents 98be657 + ce10ac0 commit 1b41a38

File tree

1 file changed

+6
-20
lines changed

1 file changed

+6
-20
lines changed

library/core/src/num/nonzero.rs

+6-20
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ macro_rules! nonzero_unsigned_operations {
321321
///
322322
/// ```
323323
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
324-
///
325324
/// # fn main() { test().unwrap(); }
326325
/// # fn test() -> Option<()> {
327326
#[doc = concat!("let one = ", stringify!($Ty), "::new(1)?;")]
@@ -356,7 +355,6 @@ macro_rules! nonzero_unsigned_operations {
356355
///
357356
/// ```
358357
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
359-
///
360358
/// # fn main() { test().unwrap(); }
361359
/// # fn test() -> Option<()> {
362360
#[doc = concat!("let one = ", stringify!($Ty), "::new(1)?;")]
@@ -391,8 +389,8 @@ macro_rules! nonzero_unsigned_operations {
391389
///
392390
/// ```
393391
/// #![feature(nonzero_ops)]
394-
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
395392
///
393+
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
396394
/// # fn main() { test().unwrap(); }
397395
/// # fn test() -> Option<()> {
398396
#[doc = concat!("let one = ", stringify!($Ty), "::new(1)?;")]
@@ -420,7 +418,6 @@ macro_rules! nonzero_unsigned_operations {
420418
///
421419
/// ```
422420
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
423-
///
424421
/// # fn main() { test().unwrap(); }
425422
/// # fn test() -> Option<()> {
426423
#[doc = concat!("let two = ", stringify!($Ty), "::new(2)?;")]
@@ -461,7 +458,6 @@ macro_rules! nonzero_unsigned_operations {
461458
///
462459
/// ```
463460
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
464-
///
465461
#[doc = concat!("assert_eq!(", stringify!($Ty), "::new(7).unwrap().ilog2(), 2);")]
466462
#[doc = concat!("assert_eq!(", stringify!($Ty), "::new(8).unwrap().ilog2(), 3);")]
467463
#[doc = concat!("assert_eq!(", stringify!($Ty), "::new(9).unwrap().ilog2(), 3);")]
@@ -486,7 +482,6 @@ macro_rules! nonzero_unsigned_operations {
486482
///
487483
/// ```
488484
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
489-
///
490485
#[doc = concat!("assert_eq!(", stringify!($Ty), "::new(99).unwrap().ilog10(), 1);")]
491486
#[doc = concat!("assert_eq!(", stringify!($Ty), "::new(100).unwrap().ilog10(), 2);")]
492487
#[doc = concat!("assert_eq!(", stringify!($Ty), "::new(101).unwrap().ilog10(), 2);")]
@@ -526,7 +521,6 @@ macro_rules! nonzero_signed_operations {
526521
///
527522
/// ```
528523
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
529-
///
530524
/// # fn main() { test().unwrap(); }
531525
/// # fn test() -> Option<()> {
532526
#[doc = concat!("let pos = ", stringify!($Ty), "::new(1)?;")]
@@ -556,7 +550,6 @@ macro_rules! nonzero_signed_operations {
556550
///
557551
/// ```
558552
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
559-
///
560553
/// # fn main() { test().unwrap(); }
561554
/// # fn test() -> Option<()> {
562555
#[doc = concat!("let pos = ", stringify!($Ty), "::new(1)?;")]
@@ -591,7 +584,6 @@ macro_rules! nonzero_signed_operations {
591584
///
592585
/// ```
593586
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
594-
///
595587
/// # fn main() { test().unwrap(); }
596588
/// # fn test() -> Option<()> {
597589
#[doc = concat!("let pos = ", stringify!($Ty), "::new(1)?;")]
@@ -626,7 +618,6 @@ macro_rules! nonzero_signed_operations {
626618
///
627619
/// ```
628620
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
629-
///
630621
/// # fn main() { test().unwrap(); }
631622
/// # fn test() -> Option<()> {
632623
#[doc = concat!("let pos = ", stringify!($Ty), "::new(1)?;")]
@@ -662,7 +653,6 @@ macro_rules! nonzero_signed_operations {
662653
///
663654
/// ```
664655
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
665-
///
666656
/// # fn main() { test().unwrap(); }
667657
/// # fn test() -> Option<()> {
668658
#[doc = concat!("let pos = ", stringify!($Ty), "::new(1)?;")]
@@ -905,7 +895,6 @@ macro_rules! nonzero_unsigned_signed_operations {
905895
///
906896
/// ```
907897
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
908-
///
909898
/// # fn main() { test().unwrap(); }
910899
/// # fn test() -> Option<()> {
911900
#[doc = concat!("let two = ", stringify!($Ty), "::new(2)?;")]
@@ -941,7 +930,6 @@ macro_rules! nonzero_unsigned_signed_operations {
941930
///
942931
/// ```
943932
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
944-
///
945933
/// # fn main() { test().unwrap(); }
946934
/// # fn test() -> Option<()> {
947935
#[doc = concat!("let two = ", stringify!($Ty), "::new(2)?;")]
@@ -986,8 +974,8 @@ macro_rules! nonzero_unsigned_signed_operations {
986974
///
987975
/// ```
988976
/// #![feature(nonzero_ops)]
989-
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
990977
///
978+
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
991979
/// # fn main() { test().unwrap(); }
992980
/// # fn test() -> Option<()> {
993981
#[doc = concat!("let two = ", stringify!($Ty), "::new(2)?;")]
@@ -1014,7 +1002,6 @@ macro_rules! nonzero_unsigned_signed_operations {
10141002
///
10151003
/// ```
10161004
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
1017-
///
10181005
/// # fn main() { test().unwrap(); }
10191006
/// # fn test() -> Option<()> {
10201007
#[doc = concat!("let three = ", stringify!($Ty), "::new(3)?;")]
@@ -1058,7 +1045,6 @@ macro_rules! nonzero_unsigned_signed_operations {
10581045
///
10591046
/// ```
10601047
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
1061-
///
10621048
/// # fn main() { test().unwrap(); }
10631049
/// # fn test() -> Option<()> {
10641050
#[doc = concat!("let three = ", stringify!($Ty), "::new(3)?;")]
@@ -1162,8 +1148,8 @@ macro_rules! nonzero_min_max_unsigned {
11621148
///
11631149
/// ```
11641150
/// #![feature(nonzero_min_max)]
1165-
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
11661151
///
1152+
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
11671153
#[doc = concat!("assert_eq!(", stringify!($Ty), "::MIN.get(), 1", stringify!($Int), ");")]
11681154
/// ```
11691155
#[unstable(feature = "nonzero_min_max", issue = "89065")]
@@ -1177,8 +1163,8 @@ macro_rules! nonzero_min_max_unsigned {
11771163
///
11781164
/// ```
11791165
/// #![feature(nonzero_min_max)]
1180-
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
11811166
///
1167+
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
11821168
#[doc = concat!("assert_eq!(", stringify!($Ty), "::MAX.get(), ", stringify!($Int), "::MAX);")]
11831169
/// ```
11841170
#[unstable(feature = "nonzero_min_max", issue = "89065")]
@@ -1204,8 +1190,8 @@ macro_rules! nonzero_min_max_signed {
12041190
///
12051191
/// ```
12061192
/// #![feature(nonzero_min_max)]
1207-
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
12081193
///
1194+
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
12091195
#[doc = concat!("assert_eq!(", stringify!($Ty), "::MIN.get(), ", stringify!($Int), "::MIN);")]
12101196
/// ```
12111197
#[unstable(feature = "nonzero_min_max", issue = "89065")]
@@ -1223,8 +1209,8 @@ macro_rules! nonzero_min_max_signed {
12231209
///
12241210
/// ```
12251211
/// #![feature(nonzero_min_max)]
1226-
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
12271212
///
1213+
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
12281214
#[doc = concat!("assert_eq!(", stringify!($Ty), "::MAX.get(), ", stringify!($Int), "::MAX);")]
12291215
/// ```
12301216
#[unstable(feature = "nonzero_min_max", issue = "89065")]

0 commit comments

Comments
 (0)