about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-01-16 20:29:39 +0100
committerGitHub <noreply@github.com>2023-01-16 20:29:39 +0100
commit37378ee7da8252f6a2b429670b7b4218c8471345 (patch)
treef9a99468ee032a49683890660c4a29989092ad95 /compiler
parent8ea26ca17f1baf0877b7b249323f3d5d72f0d3b4 (diff)
parent2c5583efbde7987c6de16cb057503f57c0d73d73 (diff)
downloadrust-37378ee7da8252f6a2b429670b7b4218c8471345.tar.gz
rust-37378ee7da8252f6a2b429670b7b4218c8471345.zip
Rollup merge of #106912 - gftea:pr-106736, r=Nilstrieb
check -Z query-dep-graph is enabled if -Z dump-dep-graph (#106736)

PR to solve #106736, r? `@cjgillot`
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_session/src/config.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
index 55576b4e0d1..38aebc81cd6 100644
--- a/compiler/rustc_session/src/config.rs
+++ b/compiler/rustc_session/src/config.rs
@@ -2459,6 +2459,11 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
 
     let pretty = parse_pretty(&unstable_opts, error_format);
 
+    // query-dep-graph is required if dump-dep-graph is given #106736
+    if unstable_opts.dump_dep_graph && !unstable_opts.query_dep_graph {
+        early_error(error_format, "can't dump dependency graph without `-Z query-dep-graph`");
+    }
+
     // Try to find a directory containing the Rust `src`, for more details see
     // the doc comment on the `real_rust_source_base_dir` field.
     let tmp_buf;