Rollup merge of #120135 - oli-obk:smir_private, r=celinval

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 https://github.com/rust-lang/project-stable-mir/issues/56

r? `@celinval`
This commit is contained in:
Matthias Krüger 2024-01-20 09:37:28 +01:00 committed by GitHub
commit 409949bc23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 {
@ -138,7 +138,7 @@ impl Const {
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct ConstId(pub usize);
pub struct ConstId(usize);
type Ident = Opaque;