|
35 | 35 | //! "infer" some properties for each kind of `DepNode`:
|
36 | 36 | //!
|
37 | 37 | //! * Whether a `DepNode` of a given kind has any parameters at all. Some
|
38 |
| -//! `DepNode`s, like `AllLocalTraitImpls`, represent global concepts with only one value. |
| 38 | +//! `DepNode`s, like `?`, represent global concepts with only one value. |
39 | 39 | //! * Whether it is possible, in principle, to reconstruct a query key from a
|
40 | 40 | //! given `DepNode`. Many `DepKind`s only require a single `DefId` parameter,
|
41 | 41 | //! in which case it is possible to map the node's fingerprint back to the
|
@@ -276,8 +276,8 @@ macro_rules! define_dep_nodes {
|
276 | 276 | /// Construct a DepNode from the given DepKind and DefPathHash. This
|
277 | 277 | /// method will assert that the given DepKind actually requires a
|
278 | 278 | /// single DefId/DefPathHash parameter.
|
279 |
| - pub fn from_def_path_hash(kind: DepKind, |
280 |
| - def_path_hash: DefPathHash) |
| 279 | + pub fn from_def_path_hash(def_path_hash: DefPathHash, |
| 280 | + kind: DepKind) |
281 | 281 | -> DepNode {
|
282 | 282 | debug_assert!(kind.can_reconstruct_query_key() && kind.has_params());
|
283 | 283 | DepNode {
|
@@ -333,7 +333,7 @@ macro_rules! define_dep_nodes {
|
333 | 333 | }
|
334 | 334 |
|
335 | 335 | if kind.has_params() {
|
336 |
| - Ok(def_path_hash.to_dep_node(kind)) |
| 336 | + Ok(DepNode::from_def_path_hash(def_path_hash, kind)) |
337 | 337 | } else {
|
338 | 338 | Ok(DepNode::new_no_params(kind))
|
339 | 339 | }
|
@@ -390,28 +390,13 @@ impl fmt::Debug for DepNode {
|
390 | 390 | }
|
391 | 391 | }
|
392 | 392 |
|
393 |
| -impl DefPathHash { |
394 |
| - pub fn to_dep_node(self, kind: DepKind) -> DepNode { |
395 |
| - DepNode::from_def_path_hash(kind, self) |
396 |
| - } |
397 |
| -} |
398 |
| - |
399 | 393 | rustc_dep_node_append!([define_dep_nodes!][ <'tcx>
|
400 | 394 | // We use this for most things when incr. comp. is turned off.
|
401 | 395 | [] Null,
|
402 | 396 |
|
403 |
| - // Represents the body of a function or method. The def-id is that of the |
404 |
| - // function/method. |
405 |
| - [eval_always] HirBody(DefId), |
406 |
| - |
407 |
| - // Represents the HIR node with the given node-id |
408 |
| - [eval_always] Hir(DefId), |
409 |
| - |
410 | 397 | // Represents metadata from an extern crate.
|
411 | 398 | [eval_always] CrateMetadata(CrateNum),
|
412 | 399 |
|
413 |
| - [eval_always] AllLocalTraitImpls, |
414 |
| - |
415 | 400 | [anon] TraitSelect,
|
416 | 401 |
|
417 | 402 | [] CompileCodegenUnit(Symbol),
|
|
0 commit comments