Skip to content

Commit 79ff448

Browse files
committed
Rename PatternTypeProjection to PatTyProj
1 parent d556193 commit 79ff448

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/librustc_mir/build/matches/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ struct Binding<'tcx> {
708708
struct Ascription<'tcx> {
709709
span: Span,
710710
source: Place<'tcx>,
711-
user_ty: PatternTypeProjection<'tcx>,
711+
user_ty: PatTyProj<'tcx>,
712712
variance: ty::Variance,
713713
}
714714

src/librustc_mir/hair/cx/block.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ fn mirror_stmts<'a, 'tcx>(
8383
span: pattern.span,
8484
kind: Box::new(PatKind::AscribeUserType {
8585
ascription: hair::pattern::Ascription {
86-
user_ty: PatternTypeProjection::from_user_type(user_ty),
86+
user_ty: PatTyProj::from_user_type(user_ty),
8787
user_ty_span: ty.span,
8888
variance: ty::Variance::Covariant,
8989
},

src/librustc_mir/hair/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ mod constant;
2121

2222
pub mod pattern;
2323
pub use self::pattern::{BindingMode, Pattern, PatKind, PatRange, FieldPat};
24-
pub(crate) use self::pattern::PatternTypeProjection;
24+
pub(crate) use self::pattern::PatTyProj;
2525

2626
mod util;
2727

src/librustc_mir/hair/pattern/mod.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ pub struct Pattern<'tcx> {
6262

6363

6464
#[derive(Copy, Clone, Debug, PartialEq)]
65-
pub struct PatternTypeProjection<'tcx> {
65+
pub struct PatTyProj<'tcx> {
6666
pub user_ty: CanonicalUserType<'tcx>,
6767
}
6868

69-
impl<'tcx> PatternTypeProjection<'tcx> {
69+
impl<'tcx> PatTyProj<'tcx> {
7070
pub(crate) fn from_user_type(user_annotation: CanonicalUserType<'tcx>) -> Self {
7171
Self {
7272
user_ty: user_annotation,
@@ -92,7 +92,7 @@ impl<'tcx> PatternTypeProjection<'tcx> {
9292

9393
#[derive(Copy, Clone, Debug, PartialEq)]
9494
pub struct Ascription<'tcx> {
95-
pub user_ty: PatternTypeProjection<'tcx>,
95+
pub user_ty: PatTyProj<'tcx>,
9696
/// Variance to use when relating the type `user_ty` to the **type of the value being
9797
/// matched**. Typically, this is `Variance::Covariant`, since the value being matched must
9898
/// have a type that is some subtype of the ascribed type.
@@ -831,7 +831,7 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> {
831831
kind: Box::new(kind),
832832
},
833833
ascription: Ascription {
834-
user_ty: PatternTypeProjection::from_user_type(user_ty),
834+
user_ty: PatTyProj::from_user_type(user_ty),
835835
user_ty_span: span,
836836
variance: ty::Variance::Covariant,
837837
},
@@ -878,7 +878,7 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> {
878878

879879
let user_provided_types = self.tables().user_provided_types();
880880
return if let Some(u_ty) = user_provided_types.get(id) {
881-
let user_ty = PatternTypeProjection::from_user_type(*u_ty);
881+
let user_ty = PatTyProj::from_user_type(*u_ty);
882882
Pattern {
883883
span,
884884
kind: Box::new(
@@ -1358,7 +1358,7 @@ CloneImpls!{ <'tcx>
13581358
Span, Field, Mutability, ast::Name, hir::HirId, usize, ty::Const<'tcx>,
13591359
Region<'tcx>, Ty<'tcx>, BindingMode, &'tcx AdtDef,
13601360
SubstsRef<'tcx>, &'tcx GenericArg<'tcx>, UserType<'tcx>,
1361-
UserTypeProjection, PatternTypeProjection<'tcx>
1361+
UserTypeProjection, PatTyProj<'tcx>
13621362
}
13631363

13641364
impl<'tcx> PatternFoldable<'tcx> for FieldPat<'tcx> {

0 commit comments

Comments
 (0)