File tree 2 files changed +4
-1
lines changed
rustc_metadata/src/rmeta/decoder
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ macro_rules! provide {
47
47
// External query providers call `crate_hash` in order to register a dependency
48
48
// on the crate metadata. The exception is `crate_hash` itself, which obviously
49
49
// doesn't need to do this (and can't, as it would cause a query cycle).
50
- if stringify!( $name) != "crate_hash" && $tcx. dep_graph. is_fully_enabled( ) {
50
+ use rustc_middle:: dep_graph:: DepKind ;
51
+ if DepKind :: $name != DepKind :: crate_hash && $tcx. dep_graph. is_fully_enabled( ) {
51
52
$tcx. ensure( ) . crate_hash( $def_id. krate) ;
52
53
}
53
54
Original file line number Diff line number Diff line change @@ -1220,6 +1220,8 @@ rustc_queries! {
1220
1220
eval_always
1221
1221
desc { "looking up the disambiguator a crate" }
1222
1222
}
1223
+ // The macro which defines `rustc_metadata::provide_extern` depends on this query's name.
1224
+ // Changing the name should cause a compiler error, but in case that changes, be aware.
1223
1225
query crate_hash( _: CrateNum ) -> Svh {
1224
1226
eval_always
1225
1227
desc { "looking up the hash a crate" }
You can’t perform that action at this time.
0 commit comments