]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #107695 - Swatinem:futcallx3, r=compiler-errors
authorMatthias Krüger <matthias.krueger@famsik.de>
Tue, 7 Feb 2023 16:57:15 +0000 (17:57 +0100)
committerGitHub <noreply@github.com>
Tue, 7 Feb 2023 16:57:15 +0000 (17:57 +0100)
commit4b859c3f2f023c95b5aff6d330e2eabe71253b39
tree94822e46a22fb8687c72acf8c4d865e8b06bc7fc
parent306dbaf5741a4d76cb2ba0c5feca24414cd1c51a
parent7a7b2e352108e17dc4ac834b02ff59e7f81a2c5d
Rollup merge of #107695 - Swatinem:futcallx3, r=compiler-errors

Add test for Future inflating arg size to 3x

This adds one more test that should track improvements to generator
layout, like https://github.com/rust-lang/rust/issues/62958 and https://github.com/rust-lang/rust/issues/62575.

In particular, this test highlights suboptimal layout, as the storage
for the argument future is not being reused across its usage as `upvar`,
`local` and `awaitee` (being polled to completion).

This is on top of https://github.com/rust-lang/rust/pull/107692 (as those would conflict with each other)

It is a minimal repro for code mentioned in https://github.com/moka-rs/moka/issues/212#issuecomment-1416914616 (CC `@tatsuya6502)`