Skip to content

Commit 92cc062

Browse files
committed
Fix cargo test without cargo features enabled
1 parent a3f4d8f commit 92cc062

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/pool/singleton.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ use as_slice::{AsMutSlice, AsSlice};
1515
use super::{Init, Node, Uninit};
1616

1717
/// Instantiates a pool as a global singleton
18+
// NOTE(any(test)) makes testing easier (no need to enable Cargo features for testing)
1819
#[cfg(any(
1920
armv7a,
2021
armv7r,
2122
armv7m,
2223
armv8m_main,
2324
all(target_arch = "x86_64", feature = "x86-sync-pool"),
25+
test
2426
))]
2527
#[macro_export]
2628
macro_rules! pool {

tests/tsan.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ fn iterator_properly_wraps() {
235235
assert_eq!(expected, actual)
236236
}
237237

238+
#[cfg(all(target_arch = "x86_64", feature = "x86-sync-pool"))]
238239
#[test]
239240
fn pool() {
240241
use heapless::pool::singleton::Pool as _;

0 commit comments

Comments
 (0)