]> git.lizzy.rs Git - rust.git/commitdiff
pacify the mercilous tidy
authorNiko Matsakis <niko@alum.mit.edu>
Mon, 3 Sep 2018 14:35:44 +0000 (10:35 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Mon, 10 Sep 2018 12:22:31 +0000 (08:22 -0400)
src/librustc_mir/borrow_check/nll/type_check/relate_tys.rs
src/librustc_mir/hair/pattern/_match.rs

index 67b469c01b2be8691e161d1d29c67816078ad125..ef686cb1dd6f6d1d4a3dd9b8fa2b0ae6dd724db2 100644 (file)
@@ -547,7 +547,10 @@ fn binders<T>(
 
             // 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 @@ fn visit_region(&mut self, r: ty::Region<'tcx>) -> bool {
 /// 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>,
 
index a29c81e38e5a45927de24cdda0802ca7e048b121..e05e0bb0470f4011064de3932a455c93414af991 100644 (file)
@@ -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, .. } => {