]> git.lizzy.rs Git - rust.git/commitdiff
Make a field only as public as it needs to be
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>
Fri, 16 Dec 2022 10:09:23 +0000 (10:09 +0000)
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>
Fri, 16 Dec 2022 10:09:23 +0000 (10:09 +0000)
compiler/rustc_middle/src/ty/consts.rs

index 41053871cd573ed24bf8ab2f731f2ec5594150fe..e5abc38046ced9003709e43ee04b419ba6f1f63a 100644 (file)
@@ -17,7 +17,7 @@
 /// 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 {