Skip to content

Commit bbac745

Browse files
committed
make a doctest less slow in Miri
1 parent 3403cab commit bbac745

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

alloc/src/sync.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,9 @@ impl<T, A: Allocator> Arc<T, A> {
10621062
///
10631063
/// // Create a long list and clone it
10641064
/// let mut x = LinkedList::new();
1065-
/// for i in 0..100000 {
1065+
/// let size = 100000;
1066+
/// # let size = if cfg!(miri) { 100 } else { size };
1067+
/// for i in 0..size {
10661068
/// x.push(i); // Adds i to the front of x
10671069
/// }
10681070
/// let y = x.clone();

0 commit comments

Comments
 (0)