diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2024-04-03 17:49:59 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2024-04-03 19:06:22 +0300 |
| commit | b40ea03f8a9a94c294679b9f261b86ded120454f (patch) | |
| tree | 18e32ab93e0d4506cc8c973e3be253ebe079c03f /compiler/rustc_query_system/src/dep_graph | |
| parent | ceab6128fa48a616bfd3e3adf4bc80133b8ee223 (diff) | |
rustc_index: Add a `ZERO` constant to index types
It is commonly used.
Diffstat (limited to 'compiler/rustc_query_system/src/dep_graph')
| -rw-r--r-- | compiler/rustc_query_system/src/dep_graph/graph.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_query_system/src/dep_graph/graph.rs b/compiler/rustc_query_system/src/dep_graph/graph.rs index 9f067273f35..f223f64f2c5 100644 --- a/compiler/rustc_query_system/src/dep_graph/graph.rs +++ b/compiler/rustc_query_system/src/dep_graph/graph.rs @@ -40,7 +40,7 @@ rustc_index::newtype_index! { } impl DepNodeIndex { - const SINGLETON_DEPENDENCYLESS_ANON_NODE: DepNodeIndex = DepNodeIndex::from_u32(0); + const SINGLETON_DEPENDENCYLESS_ANON_NODE: DepNodeIndex = DepNodeIndex::ZERO; pub const FOREVER_RED_NODE: DepNodeIndex = DepNodeIndex::from_u32(1); } |
