make some things a bit more private

This commit is contained in:
Ralf Jung 2018-09-20 10:22:11 +02:00
parent 018d128325
commit b1453dda0f
3 changed files with 5 additions and 4 deletions

View File

@ -77,7 +77,7 @@ pub fn mk_eval_cx<'a, 'tcx>(
Ok(ecx)
}
pub fn eval_promoted<'a, 'mir, 'tcx>(
pub(crate) fn eval_promoted<'a, 'mir, 'tcx>(
tcx: TyCtxt<'a, 'tcx, 'tcx>,
cid: GlobalId<'tcx>,
mir: &'mir mir::Mir<'tcx>,

View File

@ -41,10 +41,10 @@ pub struct EvalContext<'a, 'mir, 'tcx: 'a + 'mir, M: Machine<'a, 'mir, 'tcx>> {
pub machine: M,
/// The results of the type checker, from rustc.
pub tcx: TyCtxtAt<'a, 'tcx, 'tcx>,
pub(crate) tcx: TyCtxtAt<'a, 'tcx, 'tcx>,
/// Bounds in scope for polymorphic evaluations.
pub param_env: ty::ParamEnv<'tcx>,
pub(crate) param_env: ty::ParamEnv<'tcx>,
/// The virtual memory system.
pub memory: Memory<'a, 'mir, 'tcx, M>,

View File

@ -57,7 +57,8 @@ pub struct Memory<'a, 'mir, 'tcx: 'a + 'mir, M: Machine<'a, 'mir, 'tcx>> {
/// that do not exist any more.
dead_alloc_map: FxHashMap<AllocId, (Size, Align)>,
pub tcx: TyCtxtAt<'a, 'tcx, 'tcx>,
/// Lets us implement `HasDataLayout`, which is awfully convenient.
pub(super) tcx: TyCtxtAt<'a, 'tcx, 'tcx>,
}
impl<'b, 'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> HasDataLayout