Skip to content

Commit 1b5db85

Browse files
committed
Fix #![feature]s.
1 parent ece87c3 commit 1b5db85

File tree

1 file changed

+40
-37
lines changed

1 file changed

+40
-37
lines changed

src/libcore/num/mod.rs

Lines changed: 40 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -642,11 +642,11 @@ returning `None` if `rhs == 0` or the division results in overflow.
642642
Basic usage:
643643
644644
```
645-
", $Feature, "assert_eq!((", stringify!($SelfT),
645+
#![feature(euclidean_division)]
646+
assert_eq!((", stringify!($SelfT),
646647
"::min_value() + 1).checked_div_euc(-1), Some(", stringify!($Max), "));
647648
assert_eq!(", stringify!($SelfT), "::min_value().checked_div_euc(-1), None);
648-
assert_eq!((1", stringify!($SelfT), ").checked_div_euc(0), None);",
649-
$EndFeature, "
649+
assert_eq!((1", stringify!($SelfT), ").checked_div_euc(0), None);
650650
```"),
651651
#[unstable(feature = "euclidean_division", issue = "49048")]
652652
#[inline]
@@ -695,12 +695,12 @@ $EndFeature, "
695695
Basic usage:
696696
697697
```
698-
", $Feature, "use std::", stringify!($SelfT), ";
698+
#![feature(euclidean_division)]
699+
use std::", stringify!($SelfT), ";
699700
700701
assert_eq!(5", stringify!($SelfT), ".checked_mod_euc(2), Some(1));
701702
assert_eq!(5", stringify!($SelfT), ".checked_mod_euc(0), None);
702-
assert_eq!(", stringify!($SelfT), "::MIN.checked_mod_euc(-1), None);",
703-
$EndFeature, "
703+
assert_eq!(", stringify!($SelfT), "::MIN.checked_mod_euc(-1), None);
704704
```"),
705705
#[unstable(feature = "euclidean_division", issue = "49048")]
706706
#[inline]
@@ -1063,9 +1063,9 @@ This function will panic if `rhs` is 0.
10631063
Basic usage:
10641064
10651065
```
1066+
#![feature(euclidean_division)]
10661067
assert_eq!(100", stringify!($SelfT), ".wrapping_div_euc(10), 10);
1067-
assert_eq!((-128i8).wrapping_div_euc(-1), -128);",
1068-
$EndFeature, "
1068+
assert_eq!((-128i8).wrapping_div_euc(-1), -128);
10691069
```"),
10701070
#[unstable(feature = "euclidean_division", issue = "49048")]
10711071
#[inline]
@@ -1119,9 +1119,9 @@ This function will panic if `rhs` is 0.
11191119
Basic usage:
11201120
11211121
```
1122-
", $Feature, "assert_eq!(100", stringify!($SelfT), ".wrapping_mod_euc(10), 0);
1123-
assert_eq!((-128i8).wrapping_mod_euc(-1), 0);",
1124-
$EndFeature, "
1122+
#![feature(euclidean_division)]
1123+
assert_eq!(100", stringify!($SelfT), ".wrapping_mod_euc(10), 0);
1124+
assert_eq!((-128i8).wrapping_mod_euc(-1), 0);
11251125
```"),
11261126
#[unstable(feature = "euclidean_division", issue = "49048")]
11271127
#[inline]
@@ -1410,12 +1410,12 @@ This function will panic if `rhs` is 0.
14101410
Basic usage:
14111411
14121412
```
1413-
", $Feature, "use std::", stringify!($SelfT), ";
1413+
#![feature(euclidean_division)]
1414+
use std::", stringify!($SelfT), ";
14141415
14151416
assert_eq!(5", stringify!($SelfT), ".overflowing_div_euc(2), (2, false));
14161417
assert_eq!(", stringify!($SelfT), "::MIN.overflowing_div_euc(-1), (", stringify!($SelfT),
1417-
"::MIN, true));",
1418-
$EndFeature, "
1418+
"::MIN, true));
14191419
```"),
14201420
#[inline]
14211421
#[unstable(feature = "euclidean_division", issue = "49048")]
@@ -1476,11 +1476,11 @@ This function will panic if `rhs` is 0.
14761476
Basic usage:
14771477
14781478
```
1479-
", $Feature, "use std::", stringify!($SelfT), ";
1479+
#![feature(euclidean_division)]
1480+
use std::", stringify!($SelfT), ";
14801481
14811482
assert_eq!(5", stringify!($SelfT), ".overflowing_mod_euc(2), (1, false));
1482-
assert_eq!(", stringify!($SelfT), "::MIN.overflowing_mod_euc(-1), (0, true));",
1483-
$EndFeature, "
1483+
assert_eq!(", stringify!($SelfT), "::MIN.overflowing_mod_euc(-1), (0, true));
14841484
```"),
14851485
#[unstable(feature = "euclidean_division", issue = "49048")]
14861486
#[inline]
@@ -1704,14 +1704,14 @@ This function will panic if `rhs` is 0.
17041704
Basic usage:
17051705
17061706
```
1707-
", $Feature, "let a: ", stringify!($SelfT), " = 7; // or any other integer type
1707+
#![feature(euclidean_division)]
1708+
let a: ", stringify!($SelfT), " = 7; // or any other integer type
17081709
let b = 4;
17091710
17101711
assert_eq!(a.div_euc(b), 1); // 7 >= 4 * 1
17111712
assert_eq!(a.div_euc(-b), -1); // 7 >= -4 * -1
17121713
assert_eq!((-a).div_euc(b), -2); // -7 >= 4 * -2
1713-
assert_eq!((-a).div_euc(-b), 2); // -7 >= -4 * 2",
1714-
$EndFeature, "
1714+
assert_eq!((-a).div_euc(-b), 2); // -7 >= -4 * 2
17151715
```"),
17161716
#[unstable(feature = "euclidean_division", issue = "49048")]
17171717
#[inline]
@@ -1740,14 +1740,14 @@ This function will panic if `rhs` is 0.
17401740
Basic usage:
17411741
17421742
```
1743-
", $Feature, "let a: ", stringify!($SelfT), " = 7; // or any other integer type
1743+
#![feature(euclidean_division)]
1744+
let a: ", stringify!($SelfT), " = 7; // or any other integer type
17441745
let b = 4;
17451746
17461747
assert_eq!(a.mod_euc(b), 3);
17471748
assert_eq!((-a).mod_euc(b), 1);
17481749
assert_eq!(a.mod_euc(-b), 3);
1749-
assert_eq!((-a).mod_euc(-b), 1);",
1750-
$EndFeature, "
1750+
assert_eq!((-a).mod_euc(-b), 1);
17511751
```"),
17521752
#[unstable(feature = "euclidean_division", issue = "49048")]
17531753
#[inline]
@@ -2362,7 +2362,8 @@ if `rhs == 0`.
23622362
Basic usage:
23632363
23642364
```
2365-
", $Feature, "assert_eq!(128", stringify!($SelfT), ".checked_div(2), Some(64));
2365+
#![feature(euclidean_division)]
2366+
assert_eq!(128", stringify!($SelfT), ".checked_div(2), Some(64));
23662367
assert_eq!(1", stringify!($SelfT), ".checked_div_euc(0), None);
23672368
```"),
23682369
#[unstable(feature = "euclidean_division", issue = "49048")]
@@ -2409,9 +2410,9 @@ if `rhs == 0`.
24092410
Basic usage:
24102411
24112412
```
2412-
", $Feature, "assert_eq!(5", stringify!($SelfT), ".checked_mod_euc(2), Some(1));
2413-
assert_eq!(5", stringify!($SelfT), ".checked_mod_euc(0), None);",
2414-
$EndFeature, "
2413+
#![feature(euclidean_division)]
2414+
assert_eq!(5", stringify!($SelfT), ".checked_mod_euc(2), Some(1));
2415+
assert_eq!(5", stringify!($SelfT), ".checked_mod_euc(0), None);
24152416
```"),
24162417
#[unstable(feature = "euclidean_division", issue = "49048")]
24172418
#[inline]
@@ -2715,7 +2716,8 @@ are accounted for in the wrapping operations.
27152716
Basic usage:
27162717
27172718
```
2718-
", $Feature, "assert_eq!(100", stringify!($SelfT), ".wrapping_div_euc(10), 10);", $EndFeature, "
2719+
#![feature(euclidean_division)]
2720+
assert_eq!(100", stringify!($SelfT), ".wrapping_div_euc(10), 10);
27192721
```"),
27202722
#[unstable(feature = "euclidean_division", issue = "49048")]
27212723
#[inline]
@@ -2759,7 +2761,8 @@ are accounted for in the wrapping operations.
27592761
Basic usage:
27602762
27612763
```
2762-
", $Feature, "assert_eq!(100", stringify!($SelfT), ".wrapping_mod_euc(10), 0);", $EndFeature, "
2764+
#![feature(euclidean_division)]
2765+
assert_eq!(100", stringify!($SelfT), ".wrapping_mod_euc(10), 0);
27632766
```"),
27642767
#[unstable(feature = "euclidean_division", issue = "49048")]
27652768
#[inline]
@@ -3018,8 +3021,8 @@ This function will panic if `rhs` is 0.
30183021
Basic usage
30193022
30203023
```
3021-
", $Feature, "assert_eq!(5", stringify!($SelfT), ".overflowing_div_euc(2), (2, false));",
3022-
$EndFeature, "
3024+
#![feature(euclidean_division)]
3025+
assert_eq!(5", stringify!($SelfT), ".overflowing_div_euc(2), (2, false));
30233026
```"),
30243027
#[inline]
30253028
#[unstable(feature = "euclidean_division", issue = "49048")]
@@ -3071,8 +3074,8 @@ This function will panic if `rhs` is 0.
30713074
Basic usage
30723075
30733076
```
3074-
", $Feature, "assert_eq!(5", stringify!($SelfT), ".overflowing_mod_euc(2), (1, false));",
3075-
$EndFeature, "
3077+
#![feature(euclidean_division)]
3078+
assert_eq!(5", stringify!($SelfT), ".overflowing_mod_euc(2), (1, false));
30763079
```"),
30773080
#[inline]
30783081
#[unstable(feature = "euclidean_division", issue = "49048")]
@@ -3248,8 +3251,8 @@ For unsigned types, this is just the same as `self / rhs`.
32483251
Basic usage:
32493252
32503253
```
3251-
", $Feature, "assert_eq(7", stringify!($SelfT), ".div_euc(4), 1); // or any other integer type",
3252-
$EndFeature, "
3254+
#![feature(euclidean_division)]
3255+
assert_eq(7", stringify!($SelfT), ".div_euc(4), 1); // or any other integer type
32533256
```"),
32543257
#[unstable(feature = "euclidean_division", issue = "49048")]
32553258
#[inline]
@@ -3270,8 +3273,8 @@ For unsigned types, this is just the same as `self % rhs`.
32703273
Basic usage:
32713274
32723275
```
3273-
", $Feature, "assert_eq(7", stringify!($SelfT), ".mod_euc(4), 3); // or any other integer type",
3274-
$EndFeature, "
3276+
#![feature(euclidean_division)]
3277+
assert_eq(7", stringify!($SelfT), ".mod_euc(4), 3); // or any other integer type
32753278
```"),
32763279
#[unstable(feature = "euclidean_division", issue = "49048")]
32773280
#[inline]

0 commit comments

Comments
 (0)