Skip to content

Commit b1453dd

Browse files
committed
make some things a bit more private
1 parent 018d128 commit b1453dd

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/librustc_mir/const_eval.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ pub fn mk_eval_cx<'a, 'tcx>(
7777
Ok(ecx)
7878
}
7979

80-
pub fn eval_promoted<'a, 'mir, 'tcx>(
80+
pub(crate) fn eval_promoted<'a, 'mir, 'tcx>(
8181
tcx: TyCtxt<'a, 'tcx, 'tcx>,
8282
cid: GlobalId<'tcx>,
8383
mir: &'mir mir::Mir<'tcx>,

src/librustc_mir/interpret/eval_context.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ pub struct EvalContext<'a, 'mir, 'tcx: 'a + 'mir, M: Machine<'a, 'mir, 'tcx>> {
4141
pub machine: M,
4242

4343
/// The results of the type checker, from rustc.
44-
pub tcx: TyCtxtAt<'a, 'tcx, 'tcx>,
44+
pub(crate) tcx: TyCtxtAt<'a, 'tcx, 'tcx>,
4545

4646
/// Bounds in scope for polymorphic evaluations.
47-
pub param_env: ty::ParamEnv<'tcx>,
47+
pub(crate) param_env: ty::ParamEnv<'tcx>,
4848

4949
/// The virtual memory system.
5050
pub memory: Memory<'a, 'mir, 'tcx, M>,

src/librustc_mir/interpret/memory.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ pub struct Memory<'a, 'mir, 'tcx: 'a + 'mir, M: Machine<'a, 'mir, 'tcx>> {
5757
/// that do not exist any more.
5858
dead_alloc_map: FxHashMap<AllocId, (Size, Align)>,
5959

60-
pub tcx: TyCtxtAt<'a, 'tcx, 'tcx>,
60+
/// Lets us implement `HasDataLayout`, which is awfully convenient.
61+
pub(super) tcx: TyCtxtAt<'a, 'tcx, 'tcx>,
6162
}
6263

6364
impl<'b, 'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> HasDataLayout

0 commit comments

Comments
 (0)