Skip to content

Commit 8aced9e

Browse files
committed
Auto merge of #153074 - jhpratt:rollup-6aKDmTD, r=jhpratt
Rollup of 12 pull requests Successful merges: - rust-lang/rust#149169 (ptr::replace: make calls on ZST null ptr not UB) - rust-lang/rust#150562 (Fix doc link used in suggestion for pinning self) - rust-lang/rust#152418 (`BTreeMap::merge` optimized) - rust-lang/rust#152679 (rustc_expand: improve diagnostics for non-repeatable metavars) - rust-lang/rust#152952 (mGCA: improve ogca diagnostic message ) - rust-lang/rust#152977 (Fix relative path handling for --extern-html-root-url) - rust-lang/rust#153017 (Implement debuginfo for unsafe binder types) - rust-lang/rust#152868 (delete some very old trivial `Box` tests) - rust-lang/rust#152922 (rustc_public: Make fields that shouldn't be exposed visible only in `rustc_public`) - rust-lang/rust#153032 (Fix attribute parser and kind names.) - rust-lang/rust#153051 (Migration of `LintDiagnostic` - part 3) - rust-lang/rust#153060 (Give a better error when updating a submodule fails)
2 parents b7820e7 + c6514c4 commit 8aced9e

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

rustc_public/src/ty.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -862,17 +862,11 @@ pub struct Discr {
862862
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize)]
863863
pub struct VariantDef {
864864
/// The variant index.
865-
///
866-
/// ## Warning
867-
/// Do not access this field directly!
868-
pub idx: VariantIdx,
865+
pub(crate) idx: VariantIdx,
869866
/// The data type where this variant comes from.
870867
/// For now, we use this to retrieve information about the variant itself so we don't need to
871868
/// cache more information.
872-
///
873-
/// ## Warning
874-
/// Do not access this field directly!
875-
pub adt_def: AdtDef,
869+
pub(crate) adt_def: AdtDef,
876870
}
877871

878872
impl VariantDef {
@@ -894,10 +888,7 @@ impl VariantDef {
894888
#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
895889
pub struct FieldDef {
896890
/// The field definition.
897-
///
898-
/// ## Warning
899-
/// Do not access this field directly! This is public for the compiler to have access to it.
900-
pub def: DefId,
891+
pub(crate) def: DefId,
901892

902893
/// The field name.
903894
pub name: Symbol,

0 commit comments

Comments
 (0)