Make a field only as public as it needs to be

This commit is contained in:
Oli Scherer 2022-12-16 10:09:23 +00:00
parent 02cbc017d7
commit b170669917

View file

@ -17,7 +17,7 @@ pub use valtree::*;
/// Use this rather than `ConstData, whenever possible.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, HashStable)]
#[rustc_pass_by_value]
pub struct Const<'tcx>(pub Interned<'tcx, ConstData<'tcx>>);
pub struct Const<'tcx>(pub(super) Interned<'tcx, ConstData<'tcx>>);
impl<'tcx> fmt::Debug for Const<'tcx> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {