Closed
Description
The compile time for the following code has increased significantly since the last stable:
extern crate futures;
use futures::{future, IntoFuture, Future};
fn main() {
let t: std::result::Result<(), ()> = Ok(());
let f = t
.into_future()
.and_then(|_| future::ok(()))
.and_then(|_| future::ok(()))
.and_then(|_| future::ok(()))
.and_then(|_| future::ok(()))
.and_then(|_| future::ok(()))
.and_then(|_| future::ok(()))
.and_then(|_| future::ok(()))
.and_then(|_| future::ok(()))
.and_then(|_| future::ok(()))
.and_then(|_| future::ok(()))
.and_then(|_| future::ok(()))
.and_then(|_| future::ok(()))
.and_then(|_| future::ok(()))
.and_then(|_| future::ok(()));
f.wait();
}
Ignoring the fact that the translation
phase takes forever (tracked in #38528), the borrow checking
phase now takes orders of magnitude longer than on the last stable:
$ cargo +stable rustc -- -Z time-passes | grep "borrow checking"
time: 0.000; rss: 88MB borrow checking $ cargo +nightly rustc -- -Z time-passes | grep "borrow checking"
time: 1.173; rss: 101MB borrow checking