File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
rustc_metadata/src/rmeta/decoder Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ macro_rules! provide {
4747 // External query providers call `crate_hash` in order to register a dependency
4848 // on the crate metadata. The exception is `crate_hash` itself, which obviously
4949 // 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( ) {
5152 $tcx. ensure( ) . crate_hash( $def_id. krate) ;
5253 }
5354
Original file line number Diff line number Diff line change @@ -1220,6 +1220,8 @@ rustc_queries! {
12201220 eval_always
12211221 desc { "looking up the disambiguator a crate" }
12221222 }
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.
12231225 query crate_hash( _: CrateNum ) -> Svh {
12241226 eval_always
12251227 desc { "looking up the hash a crate" }
You can’t perform that action at this time.
0 commit comments