Adapt codebase to the tool_lints
This commit is contained in:
parent
cfd4c538d4
commit
f3bb161f0e
25 changed files with 39 additions and 38 deletions
|
@ -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"));
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue