Skip to content

Commit f8d5ed4

Browse files
committed
Add a test for issue #53529
1 parent b85e4cc commit f8d5ed4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/liballoc/collections/vec_deque.rs

+17
Original file line numberDiff line numberDiff line change
@@ -2967,4 +2967,21 @@ mod tests {
29672967
}
29682968
}
29692969

2970+
#[test]
2971+
fn issue_53529() {
2972+
use boxed::Box;
2973+
2974+
let mut dst = VecDeque::new();
2975+
dst.push_front(Box::new(1));
2976+
dst.push_front(Box::new(2));
2977+
assert_eq!(*dst.pop_back().unwrap(), 1);
2978+
2979+
let mut src = VecDeque::new();
2980+
src.push_front(Box::new(2));
2981+
dst.append(&mut src);
2982+
for a in dst {
2983+
assert_eq!(*a, 2);
2984+
}
2985+
}
2986+
29702987
}

0 commit comments

Comments
 (0)