|
29 | 29 | //! contained no `DefId` for thing that had been removed.
|
30 | 30 | //!
|
31 | 31 | //! `DepNode` definition happens in the `define_dep_nodes!()` macro. This macro
|
32 |
| -//! defines the `DepKind` enum and a corresponding `DepConstructor` enum. The |
33 |
| -//! `DepConstructor` enum links a `DepKind` to the parameters that are needed at |
| 32 | +//! defines the `DepKind` enum and a corresponding `dep_constructor` module. The |
| 33 | +//! `dep_constructor` module links a `DepKind` to the parameters that are needed at |
34 | 34 | //! runtime in order to construct a valid `DepNode` fingerprint.
|
35 | 35 | //!
|
36 | 36 | //! Because the macro sees what parameters a given `DepKind` requires, it can
|
|
44 | 44 | //! `DefId` it was computed from. In other cases, too much information gets
|
45 | 45 | //! lost during fingerprint computation.
|
46 | 46 | //!
|
47 |
| -//! The `DepConstructor` enum, together with `DepNode::new()`, ensures that only |
| 47 | +//! The `dep_constructor` module, together with `DepNode::new()`, ensures that only |
48 | 48 | //! valid `DepNode` instances can be constructed. For example, the API does not
|
49 | 49 | //! allow for constructing parameterless `DepNode`s with anything other
|
50 | 50 | //! than a zeroed out fingerprint. More generally speaking, it relieves the
|
@@ -331,10 +331,10 @@ macro_rules! define_dep_nodes {
|
331 | 331 | $($variant),*
|
332 | 332 | }
|
333 | 333 |
|
334 |
| - pub struct DepConstructor; |
335 |
| - |
336 | 334 | #[allow(non_camel_case_types)]
|
337 |
| - impl DepConstructor { |
| 335 | + pub mod dep_constructor { |
| 336 | + use super::*; |
| 337 | + |
338 | 338 | $(
|
339 | 339 | #[inline(always)]
|
340 | 340 | #[allow(unreachable_code, non_snake_case)]
|
|
0 commit comments