Skip to content

Commit

Permalink
Rollup merge of #120135 - oli-obk:smir_private, r=celinval
Browse files Browse the repository at this point in the history
SMIR: Make the remaining "private" fields actually private

Turns out we have already created a trait that allows us to make the fields private: https://doc.rust-lang.org/nightly/nightly-rustc/stable_mir/ty/trait.IndexedVal.html

fixes rust-lang/project-stable-mir#56

r? `@celinval`
  • Loading branch information
matthiaskrgr authored Jan 20, 2024
2 parents 836bc69 + 225f0b9 commit 409949b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/stable_mir/src/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use std::fmt::{self, Debug, Display, Formatter};
use std::ops::Range;

#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct Ty(pub usize);
pub struct Ty(usize);

impl Debug for Ty {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
Expand Down Expand Up @@ -138,7 +138,7 @@ impl Const {
}

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct ConstId(pub usize);
pub struct ConstId(usize);

type Ident = Opaque;

Expand Down

0 comments on commit 409949b

Please sign in to comment.