diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-09-03 10:35:44 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2018-09-10 08:22:31 -0400 |
| commit | 05a6e1e73f453f0b6edcb9676a7b75365ec525b1 (patch) | |
| tree | a5ecb95b93d5220edc2e526032cfb0d350a52d4e | |
| parent | 7e1b97884ba806210f97f5e5ee0029604031d1af (diff) | |
| download | rust-05a6e1e73f453f0b6edcb9676a7b75365ec525b1.tar.gz rust-05a6e1e73f453f0b6edcb9676a7b75365ec525b1.zip | |
pacify the mercilous tidy
| -rw-r--r-- | src/librustc_mir/borrow_check/nll/type_check/relate_tys.rs | 7 | ||||
| -rw-r--r-- | src/librustc_mir/hair/pattern/_match.rs | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/librustc_mir/borrow_check/nll/type_check/relate_tys.rs b/src/librustc_mir/borrow_check/nll/type_check/relate_tys.rs index 67b469c01b2..ef686cb1dd6 100644 --- a/src/librustc_mir/borrow_check/nll/type_check/relate_tys.rs +++ b/src/librustc_mir/borrow_check/nll/type_check/relate_tys.rs @@ -547,7 +547,10 @@ impl<'cx, 'bccx, 'gcx, 'tcx> TypeRelation<'cx, 'gcx, 'tcx> // Reset ambient variance to contravariance. See the // covariant case above for an explanation. - let variance = ::std::mem::replace(&mut self.ambient_variance, ty::Variance::Contravariant); + let variance = ::std::mem::replace( + &mut self.ambient_variance, + ty::Variance::Contravariant, + ); self.relate(a.skip_binder(), b.skip_binder())?; @@ -629,7 +632,7 @@ impl<'cx, 'gcx, 'tcx> TypeVisitor<'tcx> for ScopeInstantiator<'cx, 'gcx, 'tcx> { /// so that the resulting generalized type is independent from the /// scopes. /// -/// [blog post]: http://smallcultfollowing.com/babysteps/blog/2014/07/09/an-experimental-new-type-inference-scheme-for-rust/ +/// [blog post]: https://is.gd/0hKvIr struct TypeGeneralizer<'me, 'bccx: 'me, 'gcx: 'tcx, 'tcx: 'bccx> { type_rel: &'me TypeRelating<'me, 'bccx, 'gcx, 'tcx>, diff --git a/src/librustc_mir/hair/pattern/_match.rs b/src/librustc_mir/hair/pattern/_match.rs index a29c81e38e5..e05e0bb0470 100644 --- a/src/librustc_mir/hair/pattern/_match.rs +++ b/src/librustc_mir/hair/pattern/_match.rs @@ -1235,7 +1235,8 @@ fn pat_constructors<'tcx>(cx: &mut MatchCheckCtxt, -> Option<Vec<Constructor<'tcx>>> { match *pat.kind { - PatternKind::AscribeUserType { ref subpattern, .. } => pat_constructors(cx, subpattern, pcx), + PatternKind::AscribeUserType { ref subpattern, .. } => + pat_constructors(cx, subpattern, pcx), PatternKind::Binding { .. } | PatternKind::Wild => None, PatternKind::Leaf { .. } | PatternKind::Deref { .. } => Some(vec![Single]), PatternKind::Variant { adt_def, variant_index, .. } => { |
