]> git.lizzy.rs Git - rust.git/blobdiff - src/main.rs
Auto merge of #3646 - matthiaskrgr:travis, r=phansch
[rust.git] / src / main.rs
index aac5e97f3114cd6507258143de4a980afb99501e..eefababb96d3f5891f1d1104c2b215f8fca3a823 100644 (file)
@@ -1,7 +1,9 @@
 // error-pattern:yummy
 #![feature(box_syntax)]
 #![feature(rustc_private)]
-#![allow(unknown_lints, missing_docs_in_private_items)]
+#![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.
 
     -D --deny OPT       Set lint denied
     -F --forbid OPT     Set lint forbidden
 
-The feature `cargo-clippy` is automatically defined for convenience. You can use
-it to allow or deny lints from the code, eg.:
+You can use tool lints to allow or deny lints from your code, eg.:
 
-    #[cfg_attr(feature = "cargo-clippy", allow(needless_lifetimes))]
+    #[allow(clippy::needless_lifetimes)]
 "#;
 
-#[allow(print_stdout)]
 fn show_help() {
     println!("{}", CARGO_CLIPPY_HELP);
 }
 
-#[allow(print_stdout)]
 fn show_version() {
-    println!("{}", env!("CARGO_PKG_VERSION"));
+    let version_info = rustc_tools_util::get_version_info!();
+    println!("{}", version_info);
 }
 
 pub fn main() {
@@ -44,6 +44,7 @@ pub fn main() {
         show_help();
         return;
     }
+
     if std::env::args().any(|a| a == "--version" || a == "-V") {
         show_version();
         return;