diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-15 16:15:38 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-16 16:49:22 +1100 |
| commit | 8f669f558a02037feaafc3002207a1ac121b744d (patch) | |
| tree | 9512a5fe4671b571147c2d4a67022eb9a5a51d6f /compiler/rustc_query_system/src/dep_graph/edges.rs | |
| parent | 000767564e574f15ed4e6cd9ee0b56ecad6ae748 (diff) | |
| download | rust-8f669f558a02037feaafc3002207a1ac121b744d.tar.gz rust-8f669f558a02037feaafc3002207a1ac121b744d.zip | |
Reduce exposure of things.
Diffstat (limited to 'compiler/rustc_query_system/src/dep_graph/edges.rs')
| -rw-r--r-- | compiler/rustc_query_system/src/dep_graph/edges.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_query_system/src/dep_graph/edges.rs b/compiler/rustc_query_system/src/dep_graph/edges.rs index 6ba3924f65e..400f128d583 100644 --- a/compiler/rustc_query_system/src/dep_graph/edges.rs +++ b/compiler/rustc_query_system/src/dep_graph/edges.rs @@ -5,7 +5,7 @@ use std::iter::Extend; use std::ops::Deref; #[derive(Default, Debug)] -pub struct EdgesVec { +pub(crate) struct EdgesVec { max: u32, edges: SmallVec<[DepNodeIndex; EdgesVec::INLINE_CAPACITY]>, } @@ -18,21 +18,21 @@ impl Hash for EdgesVec { } impl EdgesVec { - pub const INLINE_CAPACITY: usize = 8; + pub(crate) const INLINE_CAPACITY: usize = 8; #[inline] - pub fn new() -> Self { + pub(crate) fn new() -> Self { Self::default() } #[inline] - pub fn push(&mut self, edge: DepNodeIndex) { + pub(crate) fn push(&mut self, edge: DepNodeIndex) { self.max = self.max.max(edge.as_u32()); self.edges.push(edge); } #[inline] - pub fn max_index(&self) -> u32 { + pub(crate) fn max_index(&self) -> u32 { self.max } } |
