Skip to content

Commit

Permalink
Make a field only as public as it needs to be
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Dec 16, 2022
1 parent 02cbc01 commit b170669
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b170669

Please sign in to comment.