diff options
| author | Tshepang Mbambo <hopsi@tuta.io> | 2025-07-25 05:36:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-25 05:36:15 +0200 |
| commit | e69303f372a6d810e02b2c3cb9c3daf9198edde4 (patch) | |
| tree | f1eb971f65244cd1e6781c87b5c81de8c18a47b8 /compiler/rustc_pattern_analysis/src | |
| parent | 1ecb68d48c2cd1a8c02cd7506274aae31e57c13e (diff) | |
| parent | e5b1e7d192780463c35d3a08ad79c6764119297e (diff) | |
| download | rust-e69303f372a6d810e02b2c3cb9c3daf9198edde4.tar.gz rust-e69303f372a6d810e02b2c3cb9c3daf9198edde4.zip | |
Merge pull request #2518 from rust-lang/rustc-pull
Rustc pull update
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/rustc.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/compiler/rustc_pattern_analysis/src/rustc.rs b/compiler/rustc_pattern_analysis/src/rustc.rs index ee72b676b38..0c1b0d622f2 100644 --- a/compiler/rustc_pattern_analysis/src/rustc.rs +++ b/compiler/rustc_pattern_analysis/src/rustc.rs @@ -16,7 +16,7 @@ use rustc_middle::ty::{ }; use rustc_middle::{bug, span_bug}; use rustc_session::lint; -use rustc_span::{DUMMY_SP, ErrorGuaranteed, Span, sym}; +use rustc_span::{DUMMY_SP, ErrorGuaranteed, Span}; use crate::constructor::Constructor::*; use crate::constructor::{ @@ -238,10 +238,7 @@ impl<'p, 'tcx: 'p> RustcPatCtxt<'p, 'tcx> { let is_visible = adt.is_enum() || field.vis.is_accessible_from(cx.module, cx.tcx); let is_uninhabited = cx.is_uninhabited(*ty); - let is_unstable = cx.tcx.lookup_stability(field.did).is_some_and(|stab| { - stab.is_unstable() && stab.feature != sym::rustc_private - }); - let skip = is_uninhabited && (!is_visible || is_unstable); + let skip = is_uninhabited && !is_visible; (ty, PrivateUninhabitedField(skip)) }); cx.dropless_arena.alloc_from_iter(tys) |
