diff options
| author | Tyson Nottingham <tgnottingham@gmail.com> | 2021-01-11 13:31:43 -0800 |
|---|---|---|
| committer | Tyson Nottingham <tgnottingham@gmail.com> | 2021-01-12 11:22:58 -0800 |
| commit | 8e7cbc28a65df0e979b6052db7f4f8d26fecd9d9 (patch) | |
| tree | e0234d48477656f5725b78e28293299fd4f389a8 /compiler/rustc_metadata/src/rmeta/decoder | |
| parent | 0962e5eba91cc873b2546d1b727dcddd33fde6a8 (diff) | |
| download | rust-8e7cbc28a65df0e979b6052db7f4f8d26fecd9d9.tar.gz rust-8e7cbc28a65df0e979b6052db7f4f8d26fecd9d9.zip | |
Prevent potential bug resulting from changing crate_hash query name
Diffstat (limited to 'compiler/rustc_metadata/src/rmeta/decoder')
| -rw-r--r-- | compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs index 85507b8f843..f50c84adb26 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs @@ -47,7 +47,8 @@ macro_rules! provide { // External query providers call `crate_hash` in order to register a dependency // on the crate metadata. The exception is `crate_hash` itself, which obviously // doesn't need to do this (and can't, as it would cause a query cycle). - if stringify!($name) != "crate_hash" && $tcx.dep_graph.is_fully_enabled() { + use rustc_middle::dep_graph::DepKind; + if DepKind::$name != DepKind::crate_hash && $tcx.dep_graph.is_fully_enabled() { $tcx.ensure().crate_hash($def_id.krate); } |
