Skip to content

Commit ac53e79

Browse files
committed
rustc_expand: Mark inner #![test] attributes as soft-unstable
1 parent ac160d7 commit ac53e79

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

std/src/num/tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ fn test_checked_mul() {
7575

7676
macro_rules! test_is_power_of_two {
7777
($test_name:ident, $T:ident) => {
78+
#[test]
7879
fn $test_name() {
79-
#![test]
8080
assert_eq!((0 as $T).is_power_of_two(), false);
8181
assert_eq!((1 as $T).is_power_of_two(), true);
8282
assert_eq!((2 as $T).is_power_of_two(), true);
@@ -96,8 +96,8 @@ test_is_power_of_two! { test_is_power_of_two_uint, usize }
9696

9797
macro_rules! test_next_power_of_two {
9898
($test_name:ident, $T:ident) => {
99+
#[test]
99100
fn $test_name() {
100-
#![test]
101101
assert_eq!((0 as $T).next_power_of_two(), 1);
102102
let mut next_power = 1;
103103
for i in 1 as $T..40 {
@@ -118,8 +118,8 @@ test_next_power_of_two! { test_next_power_of_two_uint, usize }
118118

119119
macro_rules! test_checked_next_power_of_two {
120120
($test_name:ident, $T:ident) => {
121+
#[test]
121122
fn $test_name() {
122-
#![test]
123123
assert_eq!((0 as $T).checked_next_power_of_two(), Some(1));
124124
let smax = $T::MAX >> 1;
125125
assert_eq!(smax.checked_next_power_of_two(), Some(smax + 1));

0 commit comments

Comments
 (0)