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 rust-lang/rust#140939 fixes rust-lang/rust#140493
This commit is contained in:
commit
420ca7104f
1 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue