diff options
| author | bors <bors@rust-lang.org> | 2024-01-06 14:16:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-01-06 14:16:04 +0000 |
| commit | 0814a5699fca614661ee3d681ffccad41b3c5565 (patch) | |
| tree | 95fdd1e5026ca6fb3299665c8c0ba76cbab39eb8 /compiler/rustc_pattern_analysis/src/lib.rs | |
| parent | d334a4bccfa9529c35be45e3e1a34bf875c01030 (diff) | |
| parent | 46f53c8b5d576f3a9d8ff9c8857dad16f9e0dca7 (diff) | |
| download | rust-0814a5699fca614661ee3d681ffccad41b3c5565.tar.gz rust-0814a5699fca614661ee3d681ffccad41b3c5565.zip | |
Auto merge of #3254 - rust-lang:rustup-2024-01-06, r=saethlin
Automatic Rustup
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/lib.rs')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/lib.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_pattern_analysis/src/lib.rs b/compiler/rustc_pattern_analysis/src/lib.rs index e01b571ede1..8ea8dd61ab4 100644 --- a/compiler/rustc_pattern_analysis/src/lib.rs +++ b/compiler/rustc_pattern_analysis/src/lib.rs @@ -61,8 +61,6 @@ pub trait TypeCx: Sized + fmt::Debug { /// Extra data to store in a pattern. type PatData: Clone; - /// FIXME(Nadrieril): `Cx` should only give us revealed types. - fn reveal_opaque_ty(&self, ty: Self::Ty) -> Self::Ty; fn is_exhaustive_patterns_feature_on(&self) -> bool; /// The number of fields for this constructor. @@ -114,6 +112,7 @@ pub fn analyze_match<'p, 'tcx>( ) -> rustc::UsefulnessReport<'p, 'tcx> { // Arena to store the extra wildcards we construct during analysis. let wildcard_arena = tycx.pattern_arena; + let scrut_ty = tycx.reveal_opaque_ty(scrut_ty); let scrut_validity = ValidityConstraint::from_bool(tycx.known_valid_scrutinee); let cx = MatchCtxt { tycx, wildcard_arena }; |
