]> git.lizzy.rs Git - rust.git/blobdiff - src/main.rs
more Use->DropTemps fixes
[rust.git] / src / main.rs
index 20466fc567d7fd4e26ea7cafe1de31c2b5b7883b..e0b2bcc7266455766a5ce29556aebf82241f474b 100644 (file)
@@ -1,8 +1,3 @@
-// error-pattern:yummy
-#![feature(box_syntax)]
-#![feature(rustc_private)]
-#![allow(clippy::missing_docs_in_private_items)]
-
 use rustc_tools_util::*;
 
 const CARGO_CLIPPY_HELP: &str = r#"Checks a package to catch common mistakes and improve your Rust code.
@@ -61,10 +56,8 @@ fn process<I>(mut old_args: I) -> Result<(), i32>
 {
     let mut args = vec!["check".to_owned()];
 
-    let mut found_dashes = false;
     for arg in old_args.by_ref() {
-        found_dashes |= arg == "--";
-        if found_dashes {
+        if arg == "--" {
             break;
         }
         args.push(arg);
@@ -82,11 +75,7 @@ fn process<I>(mut old_args: I) -> Result<(), i32>
     let target_dir = std::env::var_os("CLIPPY_DOGFOOD")
         .map(|_| {
             std::env::var_os("CARGO_MANIFEST_DIR").map_or_else(
-                || {
-                    let mut fallback = std::ffi::OsString::new();
-                    fallback.push("clippy_dogfood");
-                    fallback
-                },
+                || std::ffi::OsString::from("clippy_dogfood"),
                 |d| {
                     std::path::PathBuf::from(d)
                         .join("target")