]> git.lizzy.rs Git - rust.git/commitdiff
rustc/driver: remove explicit return, add explicit None
authorljedrz <ljedrz@gmail.com>
Fri, 12 Oct 2018 12:32:56 +0000 (14:32 +0200)
committerljedrz <ljedrz@gmail.com>
Sat, 13 Oct 2018 08:09:42 +0000 (10:09 +0200)
src/librustc_driver/driver.rs
src/librustc_driver/lib.rs

index 688e083ac47fea55fb69ccf35f974648b94aa669..040f835bf5ec4dc0d51b76ed3b85ace840714875 100644 (file)
@@ -1548,7 +1548,7 @@ pub fn collect_crate_types(session: &Session, attrs: &[ast::Attribute]) -> Vec<c
                         }
                         None
                     }
-                    _ => {
+                    None => {
                         session
                             .struct_span_err(a.span, "`crate_type` requires a value")
                             .note("for example: `#![crate_type=\"lib\"]`")
index e56ffb20a906914e1db126b53e06e29d4d87dfce..8ec88c9d8f6442925d7bb90290911019319539b3 100644 (file)
@@ -997,7 +997,7 @@ pub fn list_metadata(sess: &Session,
             return Compilation::Stop;
         }
 
-        return Compilation::Continue;
+        Compilation::Continue
     }