Skip to content

Commit 4572d32

Browse files
committed
Shrink visibility of the AllocMap and its methods
1 parent 1037f40 commit 4572d32

File tree

1 file changed

+3
-3
lines changed
  • src/librustc_middle/mir/interpret

1 file changed

+3
-3
lines changed

src/librustc_middle/mir/interpret/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ impl GlobalAlloc<'tcx> {
401401
}
402402
}
403403

404-
pub struct AllocMap<'tcx> {
404+
crate struct AllocMap<'tcx> {
405405
/// Maps `AllocId`s to their corresponding allocations.
406406
alloc_map: FxHashMap<AllocId, GlobalAlloc<'tcx>>,
407407

@@ -417,10 +417,10 @@ pub struct AllocMap<'tcx> {
417417
}
418418

419419
impl<'tcx> AllocMap<'tcx> {
420-
pub fn new() -> Self {
420+
crate fn new() -> Self {
421421
AllocMap { alloc_map: Default::default(), dedup: Default::default(), next_id: AllocId(0) }
422422
}
423-
pub fn reserve(&mut self) -> AllocId {
423+
fn reserve(&mut self) -> AllocId {
424424
let next = self.next_id;
425425
self.next_id.0 = self.next_id.0.checked_add(1).expect(
426426
"You overflowed a u64 by incrementing by 1... \

0 commit comments

Comments
 (0)