]> git.proxmox.com Git - rustc.git/blobdiff - src/librustc/infer/freshen.rs
New upstream version 1.14.0+dfsg1
[rustc.git] / src / librustc / infer / freshen.rs
index eea12b7f19712867b2ddbf3d750737a9f8b459fb..828f9f32baac8d3446b066ed01f7e20dbc20ed49 100644 (file)
@@ -61,9 +61,8 @@ impl<'a, 'gcx, 'tcx> TypeFreshener<'a, 'gcx, 'tcx> {
                   -> Ty<'tcx> where
         F: FnOnce(u32) -> ty::InferTy,
     {
-        match opt_ty {
-            Some(ty) => { return ty.fold_with(self); }
-            None => { }
+        if let Some(ty) = opt_ty {
+            return ty.fold_with(self);
         }
 
         match self.freshen_map.entry(key) {