You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected to see this happen: sizes of foo, bar, baz should all be identical, because foo and baz simply forward to the underlying foo - they don't have any additional states. This makes the generator abstraction less zero-cost than it should be.
Instead, this happened: sizes are 2, 3 and 4 respectively.
I'm unclear if this is properly a bug or feature request - it's a missed optimization opportunity that IMO should be guaranteed.
I tried this code: (playground: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021)
I expected to see this happen: sizes of foo, bar, baz should all be identical, because foo and baz simply forward to the underlying foo - they don't have any additional states. This makes the generator abstraction less zero-cost than it should be.
Instead, this happened: sizes are 2, 3 and 4 respectively.
Meta
rustc 1.73.0-nightly (8771282 2023-07-23)
binary: rustc
commit-hash: 8771282
commit-date: 2023-07-23
host: x86_64-unknown-linux-gnu
release: 1.73.0-nightly
LLVM version: 16.0.5
The text was updated successfully, but these errors were encountered: