Skip to content

Commit 420ca71

Browse files
committed
Auto merge of #140941 - ferrocene:ja/gh140939-fix-async-drop-test, r=petrochenkov
ui/async-drop-initial: factor in panic strategy in destructor size check the size of `AsyncStruct`'s destructor depends on whether the configured panic strategy is 'unwind' or 'abort' so factor that into the test using conditional compilation fixes #140939 fixes #140493
2 parents bc7512e + 2fdf3d9 commit 420ca71

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/ui/async-await/async-drop/async-drop-initial.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ fn main() {
6060
let j = 42;
6161
test_async_drop(&i, 16).await;
6262
test_async_drop(&j, 16).await;
63-
test_async_drop(AsyncStruct { b: AsyncInt(8), a: AsyncInt(7), i: 6 }, 168).await;
63+
test_async_drop(
64+
AsyncStruct { b: AsyncInt(8), a: AsyncInt(7), i: 6 },
65+
if cfg!(panic = "unwind") { 168 } else { 136 },
66+
).await;
6467
test_async_drop(ManuallyDrop::new(AsyncInt(9)), 16).await;
6568

6669
let foo = AsyncInt(10);

0 commit comments

Comments
 (0)