Skip to content

Commit

Permalink
Rollup merge of rust-lang#125927 - ferrocene:lw-alloc-unwind-test, r=…
Browse files Browse the repository at this point in the history
…pietroalbini

Ignore `vec_deque_alloc_error::test_shrink_to_unwind` test on non-unwind targets

rust-lang#123803 added this test which requires unwinding to succeed. This conditionally ignores the test on non-unwind targets (as is the case with other tests using `catch_unwind`).
  • Loading branch information
matthiaskrgr authored Jun 3, 2024
2 parents 7f15094 + d392c50 commit 198b58b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/alloc/tests/vec_deque_alloc_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use std::{
};

#[test]
#[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
fn test_shrink_to_unwind() {
// This tests that `shrink_to` leaves the deque in a consistent state when
// the call to `RawVec::shrink_to_fit` unwinds. The code is adapted from #123369
Expand Down

0 comments on commit 198b58b

Please sign in to comment.