Use Variance glob import everywhere
This commit is contained in:
parent
1d43fbbc73
commit
54fa4b0b74
20 changed files with 74 additions and 111 deletions
|
@ -699,7 +699,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
|||
// exactly `T` (i.e., with invariance). The variance field, in
|
||||
// contrast, is intended to be used to relate `T` to the type of
|
||||
// `<expr>`.
|
||||
ty::Variance::Invariant,
|
||||
ty::Invariant,
|
||||
),
|
||||
},
|
||||
);
|
||||
|
|
|
@ -92,7 +92,7 @@ impl<'tcx> Cx<'tcx> {
|
|||
kind: PatKind::AscribeUserType {
|
||||
ascription: Ascription {
|
||||
annotation,
|
||||
variance: ty::Variance::Covariant,
|
||||
variance: ty::Covariant,
|
||||
},
|
||||
subpattern: pattern,
|
||||
},
|
||||
|
|
|
@ -525,7 +525,7 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> {
|
|||
};
|
||||
kind = PatKind::AscribeUserType {
|
||||
subpattern: Box::new(Pat { span, ty, kind }),
|
||||
ascription: Ascription { annotation, variance: ty::Variance::Covariant },
|
||||
ascription: Ascription { annotation, variance: ty::Covariant },
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -612,7 +612,7 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> {
|
|||
annotation,
|
||||
// Note that use `Contravariant` here. See the
|
||||
// `variance` field documentation for details.
|
||||
variance: ty::Variance::Contravariant,
|
||||
variance: ty::Contravariant,
|
||||
},
|
||||
},
|
||||
ty: const_.ty(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue