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`
This commit is contained in:
Matthias Krüger 2023-01-16 20:29:39 +01:00 committed by GitHub
commit 37378ee7da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 0 deletions

View file

@ -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;

View file

@ -0,0 +1,6 @@
// Test dump-dep-graph requires query-dep-graph enabled
// incremental
// compile-flags: -Z dump-dep-graph
fn main() {}

View file

@ -0,0 +1,2 @@
error: can't dump dependency graph without `-Z query-dep-graph`