Exponential blowup in core::drop_in_place
symbol size for builder-pattern structures that chain closures
#109363
Labels
C-bug
Category: This is a bug.
I-compiletime
Issue: Problems and improvements with respect to compile times.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen: the compiler will complete in a reasonable amount of time, and generate a suitably small symbol name.
Instead, this happened: The compile time of this program grows roughly proportional to
2 ** x
wherex
is the number of.attr
calls chained on the builder. The root cause of this seems to be exponential blowup in the size of theBuilder
type fed in tocore::ptr::drop_in_place
. With 16 chained.attr
calls, the symbol name generated forcore::ptr::drop_in_place
is over 11 megabytes in size:This is probably related to #68508.
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: