diff options
| author | Jorge Aparicio <jorge.aparicio@ferrous-systems.com> | 2025-05-12 13:49:17 +0200 |
|---|---|---|
| committer | Jorge Aparicio <jorge.aparicio@ferrous-systems.com> | 2025-05-12 13:58:20 +0200 |
| commit | 2fdf3d98205abfbf1a034ef1f04369a6342645ec (patch) | |
| tree | 5bcd3d6e15c987723cb9c99faca0d169601c9ef3 /tests/ui/async-await/async-drop/async-drop-initial.rs | |
| parent | ac9ac0e0f36dcd7f8a8f0405cd003585fe4e4426 (diff) | |
| download | rust-2fdf3d98205abfbf1a034ef1f04369a6342645ec.tar.gz rust-2fdf3d98205abfbf1a034ef1f04369a6342645ec.zip | |
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 rust-lang/rust#140939
Diffstat (limited to 'tests/ui/async-await/async-drop/async-drop-initial.rs')
| -rw-r--r-- | tests/ui/async-await/async-drop/async-drop-initial.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/ui/async-await/async-drop/async-drop-initial.rs b/tests/ui/async-await/async-drop/async-drop-initial.rs index 80b34840c8b..263b70699f5 100644 --- a/tests/ui/async-await/async-drop/async-drop-initial.rs +++ b/tests/ui/async-await/async-drop/async-drop-initial.rs @@ -60,7 +60,10 @@ fn main() { let j = 42; test_async_drop(&i, 16).await; test_async_drop(&j, 16).await; - test_async_drop(AsyncStruct { b: AsyncInt(8), a: AsyncInt(7), i: 6 }, 168).await; + test_async_drop( + AsyncStruct { b: AsyncInt(8), a: AsyncInt(7), i: 6 }, + if cfg!(panic = "unwind") { 168 } else { 136 }, + ).await; test_async_drop(ManuallyDrop::new(AsyncInt(9)), 16).await; let foo = AsyncInt(10); |
