mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
63712e0f9d
Make `setup_dep_graph` incremental-only and more straightforward The existing code contains some very strange control flow that can put the dep graph into an inconsistent and untested state if streaming output setup fails. (Specifically, that failure would put `DepGraph` into an "empty" state intended for non-incremental compilation, but other parts of the compiler would still think that incremental mode is enabled due to `sess.opts.incremental`.) This PR therefore performs a big overhaul of `setup_dep_graph` by: - Returning immediately in non-incremental mode. - Exiting immediately if dep-graph streaming output couldn't be set up. - Inlining some "helper" functions that were more confusing than helpful.