about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Scherer <github35764891676564198441@oli-obk.de>2020-04-24 17:34:56 +0200
committerOliver Scherer <github35764891676564198441@oli-obk.de>2020-05-08 10:59:08 +0200
commit4572d328103b96ef0c80c00dc9b3455e526e8eab (patch)
tree31f443bf2f72b630c2c218314c8fe8dec9aa4ff4
parent1037f403ea74f73071d627d8f3c129d537090abb (diff)
downloadrust-4572d328103b96ef0c80c00dc9b3455e526e8eab.tar.gz
rust-4572d328103b96ef0c80c00dc9b3455e526e8eab.zip
Shrink visibility of the `AllocMap` and its methods
-rw-r--r--src/librustc_middle/mir/interpret/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_middle/mir/interpret/mod.rs b/src/librustc_middle/mir/interpret/mod.rs
index 7cec2f9a2c7..cb9f0bd0aca 100644
--- a/src/librustc_middle/mir/interpret/mod.rs
+++ b/src/librustc_middle/mir/interpret/mod.rs
@@ -401,7 +401,7 @@ impl GlobalAlloc<'tcx> {
     }
 }
 
-pub struct AllocMap<'tcx> {
+crate struct AllocMap<'tcx> {
     /// Maps `AllocId`s to their corresponding allocations.
     alloc_map: FxHashMap<AllocId, GlobalAlloc<'tcx>>,
 
@@ -417,10 +417,10 @@ pub struct AllocMap<'tcx> {
 }
 
 impl<'tcx> AllocMap<'tcx> {
-    pub fn new() -> Self {
+    crate fn new() -> Self {
         AllocMap { alloc_map: Default::default(), dedup: Default::default(), next_id: AllocId(0) }
     }
-    pub fn reserve(&mut self) -> AllocId {
+    fn reserve(&mut self) -> AllocId {
         let next = self.next_id;
         self.next_id.0 = self.next_id.0.checked_add(1).expect(
             "You overflowed a u64 by incrementing by 1... \