Closed as not planned
Description
hello,
I have some code that's heavily relying on futures and impl trait for which I have different compilation behaviours on stable (1.30) and nightly (I'm running rust on OSX, but a colleague reproduced it on Linux as well):
1.30 stable:
- compiles in 15s in debug
1.31.0-nightly (4bd4e41 2018-10-25):
- if compiled directly with
cargo +nightly build
I get the following error:
error: reached the type-length limit while instantiating `<std::vec::IntoIter<futures::future::join_all::ElemState<futures...`
|
= note: consider adding a `#![type_length_limit="2097152"]` attribute to your crate
- if I add the
type_length_limit
attribute, it compiles in 30s - if I measure time for compilation passes with
RUSTFLAGS="-Z time-passes" rustup run nightly cargo build
:
time: 0.034 lint checking
time: 0.002 resolving dependency formats
time: 0.000 write metadata
time: 0.002 collecting roots
time: 16.834 collecting mono items
time: 16.836 monomorphization collection
time: 0.031 codegen unit partitioning
time: 0.000 write allocator module
time: 0.000 llvm function passes [2mhp9uvb4kzbepub]
time: 0.003 llvm module passes [2mhp9uvb4kzbepub]
time: 0.001 llvm function passes [36y3779vszzmsrb1]
time: 0.003 llvm module passes [36y3779vszzmsrb1]
time: 0.267 codegen passes [2mhp9uvb4kzbepub]
time: 0.001 llvm function passes [2nrwubyljtrub0c7]
time: 0.002 llvm module passes [2nrwubyljtrub0c7]
time: 0.001 llvm function passes [2mz1h59pje44dj1g]
time: 0.003 llvm module passes [2mz1h59pje44dj1g]
time: 0.193 codegen passes [36y3779vszzmsrb1]
time: 0.209 codegen passes [2nrwubyljtrub0c7]
time: 0.197 codegen passes [2mz1h59pje44dj1g]
time: 0.002 llvm function passes [1moek2n93vgg6psh]
time: 0.002 llvm module passes [1moek2n93vgg6psh]
time: 0.000 llvm function passes [37ep5o26a6aq0f2a]
time: 0.003 llvm module passes [37ep5o26a6aq0f2a]
time: 0.176 codegen passes [37ep5o26a6aq0f2a]
time: 0.003 llvm function passes [4cfjod4ovqous12r]
time: 0.269 codegen passes [1moek2n93vgg6psh]
time: 0.003 llvm module passes [4cfjod4ovqous12r]
time: 0.001 llvm function passes [590t4nab5qyp6vss]
time: 0.002 llvm module passes [590t4nab5qyp6vss]
time: 0.000 llvm function passes [27my216ny6cmtwvn]
time: 0.003 llvm module passes [27my216ny6cmtwvn]
time: 0.193 codegen passes [590t4nab5qyp6vss]
time: 0.177 codegen passes [27my216ny6cmtwvn]
time: 0.307 codegen passes [4cfjod4ovqous12r]
time: 0.000 llvm function passes [1pmi26f1ndz2bwfm]
time: 0.002 llvm module passes [1pmi26f1ndz2bwfm]
...
Unfortunately, this is coming from internal code that I won't be able to share, and I'm not sure I would be able to provide a minimal reproducible case, but I could bisect nightlies since the last release. Any suggestion of which commit I should start at to speed up the process?
Metadata
Metadata
Assignees
Labels
Category: This is a bug.Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleIssue: Problems and improvements with respect to compile times.Medium priorityRelevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from one stable version to another.