1
Fork 0

Adapt codebase to the tool_lints

This commit is contained in:
flip1995 2018-08-01 22:48:41 +02:00 committed by Manish Goregaokar
parent cfd4c538d4
commit f3bb161f0e
25 changed files with 39 additions and 38 deletions

View file

@ -1,13 +1,14 @@
// 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::process::{exit, Command};
#[allow(print_stdout)]
#[allow(clippy::print_stdout)]
fn show_version() {
println!(env!("CARGO_PKG_VERSION"));
}

View file

@ -1,8 +1,9 @@
// error-pattern:cargo-clippy
#![feature(plugin_registrar)]
#![feature(rustc_private)]
#![feature(tool_lints)]
#![allow(unknown_lints)]
#![allow(missing_docs_in_private_items)]
#![allow(clippy::missing_docs_in_private_items)]
#![warn(rust_2018_idioms)]
use rustc_plugin::Registry;

View file

@ -1,7 +1,8 @@
// 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)]
const CARGO_CLIPPY_HELP: &str = r#"Checks a package to catch common mistakes and improve your Rust code.
@ -28,12 +29,12 @@ it to allow or deny lints from the code, eg.:
#[cfg_attr(feature = "cargo-clippy", allow(needless_lifetimes))]
"#;
#[allow(print_stdout)]
#[allow(clippy::print_stdout)]
fn show_help() {
println!("{}", CARGO_CLIPPY_HELP);
}
#[allow(print_stdout)]
#[allow(clippy::print_stdout)]
fn show_version() {
println!(env!("CARGO_PKG_VERSION"));
}