diff options
| author | bors <bors@rust-lang.org> | 2021-10-09 13:13:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-10-09 13:13:07 +0000 |
| commit | 15491d7b6be1065217e09bd735e4ecffbe9838ba (patch) | |
| tree | 90369b3aabbdc0e768224b4e63e25e2642878826 /src | |
| parent | bb918d0a5bf22211df0423f7474e4e4056978007 (diff) | |
| parent | 415a9a2ea69e917c5af69a484a602010ccf67198 (diff) | |
| download | rust-15491d7b6be1065217e09bd735e4ecffbe9838ba.tar.gz rust-15491d7b6be1065217e09bd735e4ecffbe9838ba.zip | |
Auto merge of #89343 - Mark-Simulacrum:no-args-queries, r=cjgillot
Refactor fingerprint reconstruction
This PR replaces can_reconstruct_query_key with fingerprint_style, which returns the style of the fingerprint for that query. This allows us to avoid trying to extract a DefId (or equivalent) from keys which *are* reconstructible because they're () but not as DefIds.
This is done with the goal of fixing -Zdump-dep-graph, which seems to have broken a while ago (I didn't try to bisect). Currently even on a `fn main() {}` file it'll ICE (you need to also pass -Zquery-dep-graph for it to work at all), and this patch indirectly fixes the cause of that ICE. This also adds a test for it continuing to work.
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/run-make/dep-graph/Makefile | 12 | ||||
| -rw-r--r-- | src/test/run-make/dep-graph/foo.rs | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/test/run-make/dep-graph/Makefile b/src/test/run-make/dep-graph/Makefile new file mode 100644 index 00000000000..88916022c7c --- /dev/null +++ b/src/test/run-make/dep-graph/Makefile @@ -0,0 +1,12 @@ +-include ../../run-make-fulldeps/tools.mk + +# ignore-cross-compile + +# Just verify that we successfully run and produce dep graphs when requested. + +all: + RUST_DEP_GRAPH=$(TMPDIR)/dep-graph $(RUSTC) \ + -Cincremental=$(TMPDIR)/incr \ + -Zquery-dep-graph -Zdump-dep-graph foo.rs + test -f $(TMPDIR)/dep-graph.txt + test -f $(TMPDIR)/dep-graph.dot diff --git a/src/test/run-make/dep-graph/foo.rs b/src/test/run-make/dep-graph/foo.rs new file mode 100644 index 00000000000..f328e4d9d04 --- /dev/null +++ b/src/test/run-make/dep-graph/foo.rs @@ -0,0 +1 @@ +fn main() {} |
