rustc_pattern_analysis no longer needs to be passed an arena
This commit is contained in:
parent
174e73a3f6
commit
db36304102
8 changed files with 19 additions and 42 deletions
|
@ -240,7 +240,7 @@ impl<Cx: TypeCx> 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: &PlaceCtxt<'_, '_, Cx>, ctor: Constructor<Cx>) -> Self {
|
||||
pub(crate) fn wild_from_ctor(pcx: &PlaceCtxt<'_, Cx>, ctor: Constructor<Cx>) -> Self {
|
||||
let field_tys = pcx.ctor_sub_tys(&ctor);
|
||||
let fields = field_tys.iter().map(|ty| Self::wildcard(*ty)).collect();
|
||||
Self::new(ctor, fields, pcx.ty)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue