We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
AllocMap
1 parent 1037f40 commit 4572d32Copy full SHA for 4572d32
src/librustc_middle/mir/interpret/mod.rs
@@ -401,7 +401,7 @@ impl GlobalAlloc<'tcx> {
401
}
402
403
404
-pub struct AllocMap<'tcx> {
+crate struct AllocMap<'tcx> {
405
/// Maps `AllocId`s to their corresponding allocations.
406
alloc_map: FxHashMap<AllocId, GlobalAlloc<'tcx>>,
407
@@ -417,10 +417,10 @@ pub struct AllocMap<'tcx> {
417
418
419
impl<'tcx> AllocMap<'tcx> {
420
- pub fn new() -> Self {
+ crate fn new() -> Self {
421
AllocMap { alloc_map: Default::default(), dedup: Default::default(), next_id: AllocId(0) }
422
423
- pub fn reserve(&mut self) -> AllocId {
+ fn reserve(&mut self) -> AllocId {
424
let next = self.next_id;
425
self.next_id.0 = self.next_id.0.checked_add(1).expect(
426
"You overflowed a u64 by incrementing by 1... \
0 commit comments