diff options
| author | Nadrieril <nadrieril+git@gmail.com> | 2023-12-15 16:32:44 +0100 |
|---|---|---|
| committer | Nadrieril <nadrieril+git@gmail.com> | 2023-12-15 16:58:38 +0100 |
| commit | 60ea14bfaab32d2d1d5f956acfd08d72a2a79e1c (patch) | |
| tree | d7493db58bc59ad2611acd9a5cd5988f31519dea /compiler/rustc_pattern_analysis/src/pat.rs | |
| parent | 1e89a38423ee1b562e3b10278d0097d88bc48f5f (diff) | |
| download | rust-60ea14bfaab32d2d1d5f956acfd08d72a2a79e1c.tar.gz rust-60ea14bfaab32d2d1d5f956acfd08d72a2a79e1c.zip | |
s/PatCtxt/PlaceCtxt/
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/pat.rs')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/pat.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_pattern_analysis/src/pat.rs b/compiler/rustc_pattern_analysis/src/pat.rs index daaf62dca3d..4ddd5eb630a 100644 --- a/compiler/rustc_pattern_analysis/src/pat.rs +++ b/compiler/rustc_pattern_analysis/src/pat.rs @@ -6,7 +6,7 @@ use std::fmt; use smallvec::{smallvec, SmallVec}; use crate::constructor::{Constructor, Slice, SliceKind}; -use crate::usefulness::PatCtxt; +use crate::usefulness::PlaceCtxt; use crate::{Captures, MatchCx}; use self::Constructor::*; @@ -77,7 +77,7 @@ impl<'p, Cx: MatchCx> DeconstructedPat<'p, Cx> { /// `other_ctor` can be different from `self.ctor`, but must be covered by it. pub(crate) fn specialize<'a>( &self, - pcx: &PatCtxt<'a, 'p, Cx>, + pcx: &PlaceCtxt<'a, 'p, Cx>, other_ctor: &Constructor<Cx>, ) -> SmallVec<[&'a DeconstructedPat<'p, Cx>; 2]> { let wildcard_sub_tys = || { @@ -178,7 +178,7 @@ impl<Cx: MatchCx> WitnessPat<Cx> { /// Construct a pattern that matches everything that starts with this constructor. /// For example, if `ctor` is a `Constructor::Variant` for `Option::Some`, we get the pattern /// `Some(_)`. - pub(crate) fn wild_from_ctor(pcx: &PatCtxt<'_, '_, Cx>, ctor: Constructor<Cx>) -> Self { + pub(crate) fn wild_from_ctor(pcx: &PlaceCtxt<'_, '_, Cx>, ctor: Constructor<Cx>) -> Self { let field_tys = pcx.cx.ctor_sub_tys(&ctor, pcx.ty); let fields = field_tys.iter().map(|ty| Self::wildcard(*ty)).collect(); Self::new(ctor, fields, pcx.ty) |
