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:
commit
37378ee7da
|
@ -2459,6 +2459,11 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
|
||||||
|
|
||||||
let pretty = parse_pretty(&unstable_opts, error_format);
|
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
|
// Try to find a directory containing the Rust `src`, for more details see
|
||||||
// the doc comment on the `real_rust_source_base_dir` field.
|
// the doc comment on the `real_rust_source_base_dir` field.
|
||||||
let tmp_buf;
|
let tmp_buf;
|
||||||
|
|
6
tests/ui/dep-graph/dep-graph-dump.rs
Normal file
6
tests/ui/dep-graph/dep-graph-dump.rs
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
// Test dump-dep-graph requires query-dep-graph enabled
|
||||||
|
|
||||||
|
// incremental
|
||||||
|
// compile-flags: -Z dump-dep-graph
|
||||||
|
|
||||||
|
fn main() {}
|
2
tests/ui/dep-graph/dep-graph-dump.stderr
Normal file
2
tests/ui/dep-graph/dep-graph-dump.stderr
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
error: can't dump dependency graph without `-Z query-dep-graph`
|
||||||
|
|
Loading…
Reference in a new issue