2023-01-31 03:49:11 +00:00
|
|
|
// edition: 2021
|
|
|
|
// run-pass
|
|
|
|
|
|
|
|
async fn test(_arg: [u8; 8192]) {}
|
|
|
|
|
|
|
|
async fn use_future(fut: impl std::future::Future<Output = ()>) {
|
|
|
|
fut.await
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2023-01-31 17:04:18 +00:00
|
|
|
let actual = std::mem::size_of_val(&use_future(use_future(use_future(use_future(use_future(
|
2023-01-31 03:49:11 +00:00
|
|
|
use_future(use_future(use_future(use_future(use_future(test(
|
|
|
|
[0; 8192]
|
|
|
|
))))))
|
|
|
|
))))));
|
|
|
|
// Not putting an exact number in case it slightly changes over different commits
|
2023-01-31 17:04:18 +00:00
|
|
|
let expected = 8000000;
|
|
|
|
assert!(actual > expected, "expected: >{expected}, actual: {actual}");
|
2023-01-31 03:49:11 +00:00
|
|
|
}
|