2024-02-16 14:02:50 -06:00
|
|
|
//@ edition: 2021
|
|
|
|
//@ run-pass
|
2023-01-30 21:49:11 -06:00
|
|
|
|
2023-02-01 15:09:24 -06:00
|
|
|
async fn test(_arg: [u8; 16]) {}
|
2023-01-30 21:49:11 -06:00
|
|
|
|
|
|
|
async fn use_future(fut: impl std::future::Future<Output = ()>) {
|
|
|
|
fut.await
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2023-02-01 15:09:24 -06:00
|
|
|
let actual = std::mem::size_of_val(
|
|
|
|
&use_future(use_future(use_future(use_future(use_future(test([0; 16])))))));
|
|
|
|
// Not using an exact number in case it slightly changes over different commits
|
|
|
|
let expected = 550;
|
2023-01-31 11:04:18 -06:00
|
|
|
assert!(actual > expected, "expected: >{expected}, actual: {actual}");
|
2023-01-30 21:49:11 -06:00
|
|
|
}
|