]> git.lizzy.rs Git - rust.git/blobdiff - src/driver.rs
Merge pull request #3085 from mikerite/revert-98dbce
[rust.git] / src / driver.rs
index 6854ccbbddc0bada7cc54c58b6d14b6c644e2205..267e460ad2e5ec7623ae133bdd6ac3daf4cd97b1 100644 (file)
@@ -1,13 +1,15 @@
 // error-pattern:yummy
 #![feature(box_syntax)]
 #![feature(rustc_private)]
-#![allow(unknown_lints, missing_docs_in_private_items)]
+#![feature(tool_lints)]
+#![allow(unknown_lints, clippy::missing_docs_in_private_items)]
 
 use rustc_driver::{self, driver::CompileController, Compilation};
 use rustc_plugin;
+use std::path::Path;
 use std::process::{exit, Command};
 
-#[allow(print_stdout)]
+#[allow(clippy::print_stdout)]
 fn show_version() {
     println!(env!("CARGO_PKG_VERSION"));
 }
@@ -46,7 +48,7 @@ pub fn main() {
         if orig_args.len() <= 1 {
             std::process::exit(1);
         }
-        if orig_args[1] == "rustc" {
+        if Path::new(&orig_args[1]).file_stem() == Some("rustc".as_ref()) {
             // we still want to be able to invoke it normally though
             orig_args.remove(1);
         }
@@ -118,8 +120,8 @@ pub fn main() {
                     ls.register_late_pass(Some(sess), true, pass);
                 }
 
-                for (name, to) in lint_groups {
-                    ls.register_group(Some(sess), true, name, to);
+                for (name, (to, deprecated_name)) in lint_groups {
+                    ls.register_group(Some(sess), true, name, deprecated_name, to);
                 }
                 clippy_lints::register_pre_expansion_lints(sess, &mut ls, &conf);