]> git.lizzy.rs Git - rust.git/commitdiff
Fix style issues
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Sun, 22 Jul 2018 22:02:31 +0000 (00:02 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Sun, 22 Jul 2018 22:02:31 +0000 (00:02 +0200)
src/librustdoc/clean/auto_trait.rs

index 4246c8b555acf7d092fca601021b43fb964796df..d1ec7856e616d4dfe63258da6481c9899272c85c 100644 (file)
@@ -80,8 +80,12 @@ pub fn get_with_node_id(&self, id: ast::NodeId, name: String) -> Vec<Item> {
         self.get_auto_trait_impls(did, &def_ctor, Some(name))
     }
 
-    fn get_real_ty<F>(&self, def_id: DefId, def_ctor: &F, real_name: &Option<Ident>,
-                      generics: &ty::Generics) -> hir::Ty
+    fn get_real_ty<F>(&self,
+                      def_id: DefId,
+                      def_ctor: &F,
+                      real_name: &Option<Ident>,
+                      generics: &ty::Generics,
+    ) -> hir::Ty
     where F: Fn(DefId) -> Def {
         let path = get_path_for_type(self.cx.tcx, def_id, def_ctor);
         let mut segments = path.segments.into_vec();
@@ -151,11 +155,9 @@ pub fn get_auto_trait_impls<F>(
                             let generics = infcx.tcx.generics_of(impl_def_id);
                             let trait_ref = infcx.tcx.impl_trait_ref(impl_def_id).unwrap();
 
-                            if !match infcx.tcx.type_of(impl_def_id).sty {
-                                ::rustc::ty::TypeVariants::TyParam(_) => true,
-                                _ => false,
-                            } {
-                                return
+                            match infcx.tcx.type_of(impl_def_id).sty {
+                                ::rustc::ty::TypeVariants::TyParam(_) => {},
+                                _ => return,
                             }
 
                             let substs = infcx.fresh_substs_for_item(DUMMY_SP, def_id);