diff --git a/.travis.yml b/.travis.yml index 2664a01ea47..8fe1be2ddfa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,6 +28,7 @@ script: - cargo test --features debugging - mkdir -p ~/rust/cargo/bin - cp target/debug/cargo-clippy ~/rust/cargo/bin/cargo-clippy + - cp target/debug/clippy-driver ~/rust/cargo/bin/clippy-driver - PATH=$PATH:~/rust/cargo/bin cargo clippy --all -- -D clippy - cd clippy_workspace_tests && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy && cd .. - cd clippy_workspace_tests/src && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy && cd ../.. diff --git a/Cargo.toml b/Cargo.toml index f9c3fd0fd67..3d3b8abaa76 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,6 +14,7 @@ readme = "README.md" license = "MPL-2.0" keywords = ["clippy", "lint", "plugin"] categories = ["development-tools", "development-tools::cargo-plugins"] +build = "build.rs" [badges] travis-ci = { repository = "rust-lang-nursery/rust-clippy" } @@ -29,6 +30,11 @@ name = "cargo-clippy" test = false path = "src/main.rs" +[[bin]] +name = "clippy-driver" +test = false +path = "src/driver.rs" + [dependencies] # begin automatic update clippy_lints = { version = "0.0.165", path = "clippy_lints" } diff --git a/build.rs b/build.rs new file mode 100644 index 00000000000..1c930c1b2c9 --- /dev/null +++ b/build.rs @@ -0,0 +1,8 @@ +use std::env; + +fn main() { + // Forward the profile to the main compilation + println!("cargo:rustc-env=PROFILE={}", env::var("PROFILE").unwrap()); + // Don't rebuild even if nothing changed + println!("cargo:rerun-if-changed=build.rs"); +} diff --git a/src/driver.rs b/src/driver.rs new file mode 100644 index 00000000000..ab5e90141a9 --- /dev/null +++ b/src/driver.rs @@ -0,0 +1,198 @@ +// error-pattern:yummy +#![feature(box_syntax)] +#![feature(rustc_private)] +#![allow(unknown_lints, missing_docs_in_private_items)] + +extern crate clippy_lints; +extern crate getopts; +extern crate rustc; +extern crate rustc_driver; +extern crate rustc_errors; +extern crate rustc_plugin; +extern crate syntax; + +use rustc_driver::{driver, Compilation, CompilerCalls, RustcDefaultCalls}; +use rustc::session::{config, CompileIncomplete, Session}; +use rustc::session::config::{ErrorOutputType, Input}; +use std::path::PathBuf; +use std::process::Command; +use syntax::ast; + +struct ClippyCompilerCalls { + default: RustcDefaultCalls, + run_lints: bool, +} + +impl ClippyCompilerCalls { + fn new(run_lints: bool) -> Self { + Self { + default: RustcDefaultCalls, + run_lints: run_lints, + } + } +} + +impl<'a> CompilerCalls<'a> for ClippyCompilerCalls { + fn early_callback( + &mut self, + matches: &getopts::Matches, + sopts: &config::Options, + cfg: &ast::CrateConfig, + descriptions: &rustc_errors::registry::Registry, + output: ErrorOutputType, + ) -> Compilation { + self.default + .early_callback(matches, sopts, cfg, descriptions, output) + } + fn no_input( + &mut self, + matches: &getopts::Matches, + sopts: &config::Options, + cfg: &ast::CrateConfig, + odir: &Option, + ofile: &Option, + descriptions: &rustc_errors::registry::Registry, + ) -> Option<(Input, Option)> { + self.default + .no_input(matches, sopts, cfg, odir, ofile, descriptions) + } + fn late_callback( + &mut self, + matches: &getopts::Matches, + sess: &Session, + crate_stores: &rustc::middle::cstore::CrateStore, + input: &Input, + odir: &Option, + ofile: &Option, + ) -> Compilation { + self.default + .late_callback(matches, sess, crate_stores, input, odir, ofile) + } + fn build_controller(&mut self, sess: &Session, matches: &getopts::Matches) -> driver::CompileController<'a> { + let mut control = self.default.build_controller(sess, matches); + + if self.run_lints { + let old = std::mem::replace(&mut control.after_parse.callback, box |_| {}); + control.after_parse.callback = Box::new(move |state| { + { + let mut registry = rustc_plugin::registry::Registry::new( + state.session, + state + .krate + .as_ref() + .expect( + "at this compilation stage \ + the krate must be parsed", + ) + .span, + ); + registry.args_hidden = Some(Vec::new()); + clippy_lints::register_plugins(&mut registry); + + let rustc_plugin::registry::Registry { + early_lint_passes, + late_lint_passes, + lint_groups, + llvm_passes, + attributes, + .. + } = registry; + let sess = &state.session; + let mut ls = sess.lint_store.borrow_mut(); + for pass in early_lint_passes { + ls.register_early_pass(Some(sess), true, pass); + } + for pass in late_lint_passes { + ls.register_late_pass(Some(sess), true, pass); + } + + for (name, to) in lint_groups { + ls.register_group(Some(sess), true, name, to); + } + + sess.plugin_llvm_passes.borrow_mut().extend(llvm_passes); + sess.plugin_attributes.borrow_mut().extend(attributes); + } + old(state); + }); + } + + control + } +} + +#[allow(print_stdout)] +fn show_version() { + println!("{}", env!("CARGO_PKG_VERSION")); +} + +pub fn main() { + use std::env; + + if env::var("CLIPPY_DOGFOOD").map(|_| true).unwrap_or(false) { + panic!("yummy"); + } + + if std::env::args().any(|a| a == "--version" || a == "-V") { + show_version(); + return; + } + + let home = option_env!("RUSTUP_HOME").or(option_env!("MULTIRUST_HOME")); + let toolchain = option_env!("RUSTUP_TOOLCHAIN").or(option_env!("MULTIRUST_TOOLCHAIN")); + let sys_root = if let (Some(home), Some(toolchain)) = (home, toolchain) { + format!("{}/toolchains/{}", home, toolchain) + } else { + option_env!("SYSROOT") + .map(|s| s.to_owned()) + .or_else(|| { + Command::new("rustc") + .arg("--print") + .arg("sysroot") + .output() + .ok() + .and_then(|out| String::from_utf8(out.stdout).ok()) + .map(|s| s.trim().to_owned()) + }) + .expect( + "need to specify SYSROOT env var during clippy compilation, or use rustup or multirust", + ) + }; + + rustc_driver::in_rustc_thread(|| { + // Setting RUSTC_WRAPPER causes Cargo to pass 'rustc' as the first argument. + // We're invoking the compiler programatically, so we ignore this/ + let mut orig_args: Vec = env::args().collect(); + if orig_args[1] == "rustc" { + // we still want to be able to invoke it normally though + orig_args.remove(1); + } + // this conditional check for the --sysroot flag is there so users can call + // `clippy_driver` directly + // without having to pass --sysroot or anything + let mut args: Vec = if orig_args.iter().any(|s| s == "--sysroot") { + orig_args.clone() + } else { + orig_args.clone().into_iter() + .chain(Some("--sysroot".to_owned())) + .chain(Some(sys_root)) + .collect() + }; + + // this check ensures that dependencies are built but not linted and the final + // crate is + // linted but not built + let clippy_enabled = env::var("CLIPPY_TESTS").ok().map_or(false, |val| val == "true") || + orig_args.iter().any(|s| s == "--emit=metadata"); + + if clippy_enabled { + args.extend_from_slice(&["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()]); + } + + let mut ccc = ClippyCompilerCalls::new(clippy_enabled); + let (result, _) = rustc_driver::run_compiler(&args, &mut ccc, None, None); + if let Err(CompileIncomplete::Errored(_)) = result { + std::process::exit(1); + } + }).expect("rustc_thread failed"); +} diff --git a/src/main.rs b/src/main.rs index f21cd7bd28c..69f416e2092 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,128 +3,12 @@ #![feature(rustc_private)] #![allow(unknown_lints, missing_docs_in_private_items)] -extern crate clippy_lints; -extern crate getopts; -extern crate rustc; -extern crate rustc_driver; -extern crate rustc_errors; -extern crate rustc_plugin; -extern crate syntax; - -use rustc_driver::{driver, Compilation, CompilerCalls, RustcDefaultCalls}; -use rustc::session::{config, CompileIncomplete, Session}; -use rustc::session::config::{ErrorOutputType, Input}; use std::collections::HashMap; -use std::path::PathBuf; -use std::process::{self, Command}; -use syntax::ast; +use std::process; use std::io::{self, Write}; extern crate cargo_metadata; -struct ClippyCompilerCalls { - default: RustcDefaultCalls, - run_lints: bool, -} - -impl ClippyCompilerCalls { - fn new(run_lints: bool) -> Self { - Self { - default: RustcDefaultCalls, - run_lints: run_lints, - } - } -} - -impl<'a> CompilerCalls<'a> for ClippyCompilerCalls { - fn early_callback( - &mut self, - matches: &getopts::Matches, - sopts: &config::Options, - cfg: &ast::CrateConfig, - descriptions: &rustc_errors::registry::Registry, - output: ErrorOutputType, - ) -> Compilation { - self.default - .early_callback(matches, sopts, cfg, descriptions, output) - } - fn no_input( - &mut self, - matches: &getopts::Matches, - sopts: &config::Options, - cfg: &ast::CrateConfig, - odir: &Option, - ofile: &Option, - descriptions: &rustc_errors::registry::Registry, - ) -> Option<(Input, Option)> { - self.default - .no_input(matches, sopts, cfg, odir, ofile, descriptions) - } - fn late_callback( - &mut self, - matches: &getopts::Matches, - sess: &Session, - crate_stores: &rustc::middle::cstore::CrateStore, - input: &Input, - odir: &Option, - ofile: &Option, - ) -> Compilation { - self.default - .late_callback(matches, sess, crate_stores, input, odir, ofile) - } - fn build_controller(&mut self, sess: &Session, matches: &getopts::Matches) -> driver::CompileController<'a> { - let mut control = self.default.build_controller(sess, matches); - - if self.run_lints { - let old = std::mem::replace(&mut control.after_parse.callback, box |_| {}); - control.after_parse.callback = Box::new(move |state| { - { - let mut registry = rustc_plugin::registry::Registry::new( - state.session, - state - .krate - .as_ref() - .expect( - "at this compilation stage \ - the krate must be parsed", - ) - .span, - ); - registry.args_hidden = Some(Vec::new()); - clippy_lints::register_plugins(&mut registry); - - let rustc_plugin::registry::Registry { - early_lint_passes, - late_lint_passes, - lint_groups, - llvm_passes, - attributes, - .. - } = registry; - let sess = &state.session; - let mut ls = sess.lint_store.borrow_mut(); - for pass in early_lint_passes { - ls.register_early_pass(Some(sess), true, pass); - } - for pass in late_lint_passes { - ls.register_late_pass(Some(sess), true, pass); - } - - for (name, to) in lint_groups { - ls.register_group(Some(sess), true, name, to); - } - - sess.plugin_llvm_passes.borrow_mut().extend(llvm_passes); - sess.plugin_attributes.borrow_mut().extend(attributes); - } - old(state); - }); - } - - control - } -} - use std::path::Path; const CARGO_CLIPPY_HELP: &str = r#"Checks a package to catch common mistakes and improve your Rust code. @@ -181,166 +65,105 @@ pub fn main() { return; } - if "clippy" == std::env::args().nth(1).as_ref().expect("cargo-clippy should be called with at least one argument!") { - // this arm is executed on the initial call to `cargo clippy` + let manifest_path_arg = std::env::args() + .skip(2) + .find(|val| val.starts_with("--manifest-path=")); - let manifest_path_arg = std::env::args() - .skip(2) - .find(|val| val.starts_with("--manifest-path=")); + let mut metadata = if let Ok(metadata) = cargo_metadata::metadata(manifest_path_arg.as_ref().map(AsRef::as_ref)) + { + metadata + } else { + let _ = io::stderr().write_fmt(format_args!("error: Could not obtain cargo metadata.\n")); + process::exit(101); + }; - let mut metadata = if let Ok(metadata) = cargo_metadata::metadata(manifest_path_arg.as_ref().map(AsRef::as_ref)) - { - metadata - } else { - let _ = io::stderr().write_fmt(format_args!("error: Could not obtain cargo metadata.\n")); - process::exit(101); - }; + let manifest_path = manifest_path_arg.map(|arg| { + Path::new(&arg["--manifest-path=".len()..]) + .canonicalize() + .expect("manifest path could not be canonicalized") + }); - let manifest_path = manifest_path_arg.map(|arg| { - Path::new(&arg["--manifest-path=".len()..]) - .canonicalize() - .expect("manifest path could not be canonicalized") - }); - - let packages = if std::env::args().any(|a| a == "--all") { - metadata.packages - } else { - let package_index = { - if let Some(manifest_path) = manifest_path { - metadata.packages.iter().position(|package| { - let package_manifest_path = Path::new(&package.manifest_path) - .canonicalize() - .expect("package manifest path could not be canonicalized"); - package_manifest_path == manifest_path - }) - } else { - let package_manifest_paths: HashMap<_, _> = metadata - .packages - .iter() - .enumerate() - .map(|(i, package)| { - let package_manifest_path = Path::new(&package.manifest_path) - .parent() - .expect("could not find parent directory of package manifest") - .canonicalize() - .expect("package directory cannot be canonicalized"); - (package_manifest_path, i) - }) - .collect(); - - let current_dir = std::env::current_dir() - .expect("could not read current directory") + let packages = if std::env::args().any(|a| a == "--all") { + metadata.packages + } else { + let package_index = { + if let Some(manifest_path) = manifest_path { + metadata.packages.iter().position(|package| { + let package_manifest_path = Path::new(&package.manifest_path) .canonicalize() - .expect("current directory cannot be canonicalized"); + .expect("package manifest path could not be canonicalized"); + package_manifest_path == manifest_path + }) + } else { + let package_manifest_paths: HashMap<_, _> = metadata + .packages + .iter() + .enumerate() + .map(|(i, package)| { + let package_manifest_path = Path::new(&package.manifest_path) + .parent() + .expect("could not find parent directory of package manifest") + .canonicalize() + .expect("package directory cannot be canonicalized"); + (package_manifest_path, i) + }) + .collect(); - let mut current_path: &Path = ¤t_dir; + let current_dir = std::env::current_dir() + .expect("could not read current directory") + .canonicalize() + .expect("current directory cannot be canonicalized"); - // This gets the most-recent parent (the one that takes the fewest `cd ..`s to - // reach). - loop { - if let Some(&package_index) = package_manifest_paths.get(current_path) { - break Some(package_index); - } else { - // We'll never reach the filesystem root, because to get to this point in the - // code - // the call to `cargo_metadata::metadata` must have succeeded. So it's okay to - // unwrap the current path's parent. - current_path = current_path - .parent() - .unwrap_or_else(|| panic!("could not find parent of path {}", current_path.display())); - } + let mut current_path: &Path = ¤t_dir; + + // This gets the most-recent parent (the one that takes the fewest `cd ..`s to + // reach). + loop { + if let Some(&package_index) = package_manifest_paths.get(current_path) { + break Some(package_index); + } else { + // We'll never reach the filesystem root, because to get to this point in the + // code + // the call to `cargo_metadata::metadata` must have succeeded. So it's okay to + // unwrap the current path's parent. + current_path = current_path + .parent() + .unwrap_or_else(|| panic!("could not find parent of path {}", current_path.display())); } } - }.expect("could not find matching package"); + } + }.expect("could not find matching package"); - vec![metadata.packages.remove(package_index)] - }; + vec![metadata.packages.remove(package_index)] + }; - for package in packages { - let manifest_path = package.manifest_path; + for package in packages { + let manifest_path = package.manifest_path; - for target in package.targets { - let args = std::env::args() - .skip(2) - .filter(|a| a != "--all" && !a.starts_with("--manifest-path=")); + for target in package.targets { + let args = std::env::args() + .skip(2) + .filter(|a| a != "--all" && !a.starts_with("--manifest-path=")); - let args = std::iter::once(format!("--manifest-path={}", manifest_path)).chain(args); - if let Some(first) = target.kind.get(0) { - if target.kind.len() > 1 || first.ends_with("lib") { - if let Err(code) = process(std::iter::once("--lib".to_owned()).chain(args)) { - std::process::exit(code); - } - } else if ["bin", "example", "test", "bench"].contains(&&**first) { - if let Err(code) = process( - vec![format!("--{}", first), target.name] - .into_iter() - .chain(args), - ) { - std::process::exit(code); - } + let args = std::iter::once(format!("--manifest-path={}", manifest_path)).chain(args); + if let Some(first) = target.kind.get(0) { + if target.kind.len() > 1 || first.ends_with("lib") { + if let Err(code) = process(std::iter::once("--lib".to_owned()).chain(args)) { + std::process::exit(code); + } + } else if ["bin", "example", "test", "bench"].contains(&&**first) { + if let Err(code) = process( + vec![format!("--{}", first), target.name] + .into_iter() + .chain(args), + ) { + std::process::exit(code); } - } else { - panic!("badly formatted cargo metadata: target::kind is an empty array"); } + } else { + panic!("badly formatted cargo metadata: target::kind is an empty array"); } } - } else { - // this arm is executed when cargo-clippy runs `cargo rustc` with the `RUSTC_WRAPPER` - // env var set to itself - - let home = option_env!("RUSTUP_HOME").or(option_env!("MULTIRUST_HOME")); - let toolchain = option_env!("RUSTUP_TOOLCHAIN").or(option_env!("MULTIRUST_TOOLCHAIN")); - let sys_root = if let (Some(home), Some(toolchain)) = (home, toolchain) { - format!("{}/toolchains/{}", home, toolchain) - } else { - option_env!("SYSROOT") - .map(|s| s.to_owned()) - .or_else(|| { - Command::new("rustc") - .arg("--print") - .arg("sysroot") - .output() - .ok() - .and_then(|out| String::from_utf8(out.stdout).ok()) - .map(|s| s.trim().to_owned()) - }) - .expect( - "need to specify SYSROOT env var during clippy compilation, or use rustup or multirust", - ) - }; - - rustc_driver::in_rustc_thread(|| { - // Setting RUSTC_WRAPPER causes Cargo to pass 'rustc' as the first argument. - // We're invoking the compiler programatically, so we ignore this/ - let orig_args: Vec = env::args().skip(1).collect(); - - // this conditional check for the --sysroot flag is there so users can call - // `cargo-clippy` directly - // without having to pass --sysroot or anything - let mut args: Vec = if orig_args.iter().any(|s| s == "--sysroot") { - orig_args.clone() - } else { - orig_args.clone().into_iter() - .chain(Some("--sysroot".to_owned())) - .chain(Some(sys_root)) - .collect() - }; - - // this check ensures that dependencies are built but not linted and the final - // crate is - // linted but not built - let clippy_enabled = orig_args.iter().any(|s| s == "--emit=metadata"); - - if clippy_enabled { - args.extend_from_slice(&["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()]); - } - - let mut ccc = ClippyCompilerCalls::new(clippy_enabled); - let (result, _) = rustc_driver::run_compiler(&args, &mut ccc, None, None); - if let Err(CompileIncomplete::Errored(_)) = result { - std::process::exit(1); - } - }).expect("rustc_thread failed"); } } @@ -362,7 +185,9 @@ where args.push("--cfg".to_owned()); args.push(r#"feature="cargo-clippy""#.to_owned()); - let path = std::env::current_exe().expect("current executable path invalid"); + let path = std::env::current_exe() + .expect("current executable path invalid") + .with_file_name("clippy-driver"); let exit_status = std::process::Command::new("cargo") .args(&args) .env("RUSTC_WRAPPER", path) diff --git a/tests/compile-test.rs b/tests/compile-test.rs index 8fa0d440ee7..be8793215dc 100644 --- a/tests/compile-test.rs +++ b/tests/compile-test.rs @@ -3,6 +3,14 @@ extern crate compiletest_rs as compiletest; use std::path::PathBuf; use std::env::{set_var, var}; +fn clippy_driver_path() -> PathBuf { + if let Some(path) = option_env!("CLIPPY_DRIVER_PATH") { + PathBuf::from(path) + } else { + PathBuf::from(concat!("target/", env!("PROFILE"), "/clippy-driver")) + } +} + fn run_mode(dir: &'static str, mode: &'static str) { let mut config = compiletest::Config::default(); @@ -16,12 +24,15 @@ fn run_mode(dir: &'static str, mode: &'static str) { config.mode = cfg_mode; config.build_base = PathBuf::from("target/debug/test_build_base"); config.src_base = PathBuf::from(format!("tests/{}", dir)); + config.rustc_path = clippy_driver_path(); compiletest::run_tests(&config); } fn prepare_env() { set_var("CLIPPY_DISABLE_DOCS_LINKS", "true"); + set_var("CLIPPY_TESTS", "true"); + set_var("RUST_BACKTRACE", "0"); } #[test] @@ -29,8 +40,4 @@ fn compile_test() { prepare_env(); run_mode("run-pass", "run-pass"); run_mode("ui", "ui"); - #[cfg(target_os = "windows")] - run_mode("ui-windows", "ui"); - #[cfg(not(target_os = "windows"))] - run_mode("ui-posix", "ui"); } diff --git a/tests/run-pass/conf_whitelisted.rs b/tests/conf_whitelisted.rs similarity index 87% rename from tests/run-pass/conf_whitelisted.rs rename to tests/conf_whitelisted.rs index 1c82a010b3d..198bf465bd5 100644 --- a/tests/run-pass/conf_whitelisted.rs +++ b/tests/conf_whitelisted.rs @@ -1,4 +1,3 @@ #![feature(plugin)] #![plugin(clippy(conf_file="./tests/auxiliary/conf_whitelisted.toml"))] -fn main() {} diff --git a/tests/run-pass/associated-constant-ice.rs b/tests/run-pass/associated-constant-ice.rs index 8fb55fa2272..744de9bcf38 100644 --- a/tests/run-pass/associated-constant-ice.rs +++ b/tests/run-pass/associated-constant-ice.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + pub trait Trait { const CONSTANT: u8; diff --git a/tests/run-pass/enum-glob-import-crate.rs b/tests/run-pass/enum-glob-import-crate.rs index e08a00d26e2..21ed2dbf991 100644 --- a/tests/run-pass/enum-glob-import-crate.rs +++ b/tests/run-pass/enum-glob-import-crate.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![deny(clippy)] #![allow(unused_imports)] diff --git a/tests/run-pass/ice-1588.rs b/tests/run-pass/ice-1588.rs index d53d3a1cc75..780df523511 100644 --- a/tests/run-pass/ice-1588.rs +++ b/tests/run-pass/ice-1588.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(clippy)] fn main() { diff --git a/tests/run-pass/ice-1969.rs b/tests/run-pass/ice-1969.rs index 23a002a5cde..29633982848 100644 --- a/tests/run-pass/ice-1969.rs +++ b/tests/run-pass/ice-1969.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(clippy)] fn main() { } diff --git a/tests/run-pass/ice-700.rs b/tests/run-pass/ice-700.rs index a7ff78eac14..a1e3a6756e9 100644 --- a/tests/run-pass/ice-700.rs +++ b/tests/run-pass/ice-700.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![deny(clippy)] fn core() {} diff --git a/tests/run-pass/mut_mut_macro.rs b/tests/run-pass/mut_mut_macro.rs index a6473b0f909..adc308626b1 100644 --- a/tests/run-pass/mut_mut_macro.rs +++ b/tests/run-pass/mut_mut_macro.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![deny(mut_mut, zero_ptr, cmp_nan)] #![allow(dead_code)] diff --git a/tests/run-pass/needless_lifetimes_impl_trait.rs b/tests/run-pass/needless_lifetimes_impl_trait.rs index 8edb444f936..0ebc1bf3c6c 100644 --- a/tests/run-pass/needless_lifetimes_impl_trait.rs +++ b/tests/run-pass/needless_lifetimes_impl_trait.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![feature(conservative_impl_trait)] #![deny(needless_lifetimes)] #![allow(dead_code)] diff --git a/tests/run-pass/procedural_macro.rs b/tests/run-pass/procedural_macro.rs index 91269726172..b185f6dc427 100644 --- a/tests/run-pass/procedural_macro.rs +++ b/tests/run-pass/procedural_macro.rs @@ -1,5 +1,5 @@ #![feature(plugin)] -#![plugin(clippy, clippy_mini_macro_test)] +#![plugin(clippy_mini_macro_test)] #[deny(warnings)] fn main() { diff --git a/tests/run-pass/regressions.rs b/tests/run-pass/regressions.rs index 442b01d35f8..d5e343c56c2 100644 --- a/tests/run-pass/regressions.rs +++ b/tests/run-pass/regressions.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(blacklisted_name)] pub fn foo(bar: *const u8) { diff --git a/tests/run-pass/single-match-else.rs b/tests/run-pass/single-match-else.rs index fe3cf1ce71f..b8fa7294dcd 100644 --- a/tests/run-pass/single-match-else.rs +++ b/tests/run-pass/single-match-else.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(single_match_else)] fn main() { diff --git a/tests/ui-posix/conf_non_existant.rs b/tests/ui-posix/conf_non_existant.rs deleted file mode 100644 index e287f7e02af..00000000000 --- a/tests/ui-posix/conf_non_existant.rs +++ /dev/null @@ -1,6 +0,0 @@ -// error-pattern: error reading Clippy's configuration file - -#![feature(plugin)] -#![plugin(clippy(conf_file="./tests/auxiliary/non_existant_conf.toml"))] - -fn main() {} diff --git a/tests/ui-posix/conf_non_existant.stderr b/tests/ui-posix/conf_non_existant.stderr deleted file mode 100644 index 7920bd35589..00000000000 --- a/tests/ui-posix/conf_non_existant.stderr +++ /dev/null @@ -1,4 +0,0 @@ -error: error reading Clippy's configuration file: No such file or directory (os error 2) - -error: aborting due to previous error - diff --git a/tests/ui-posix/update-all-references.sh b/tests/ui-posix/update-all-references.sh deleted file mode 100755 index d6aa69c7e8d..00000000000 --- a/tests/ui-posix/update-all-references.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 The Rust Project Developers. See the COPYRIGHT -# file at the top-level directory of this distribution and at -# http://rust-lang.org/COPYRIGHT. -# -# Licensed under the Apache License, Version 2.0 or the MIT license -# , at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - -# A script to update the references for all tests. The idea is that -# you do a run, which will generate files in the build directory -# containing the (normalized) actual output of the compiler. You then -# run this script, which will copy those files over. If you find -# yourself manually editing a foo.stderr file, you're doing it wrong. -# -# See all `update-references.sh`, if you just want to update a single test. - -if [[ "$1" == "--help" || "$1" == "-h" || "$1" == "" ]]; then - echo "usage: $0" -fi - -BUILD_DIR=$PWD/target/debug/test_build_base -MY_DIR=$(dirname $0) -cd $MY_DIR -find . -name '*.rs' | xargs ./update-references.sh $BUILD_DIR diff --git a/tests/ui-posix/update-references.sh b/tests/ui-posix/update-references.sh deleted file mode 100755 index aa99d35f7aa..00000000000 --- a/tests/ui-posix/update-references.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 The Rust Project Developers. See the COPYRIGHT -# file at the top-level directory of this distribution and at -# http://rust-lang.org/COPYRIGHT. -# -# Licensed under the Apache License, Version 2.0 or the MIT license -# , at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - -# A script to update the references for particular tests. The idea is -# that you do a run, which will generate files in the build directory -# containing the (normalized) actual output of the compiler. This -# script will then copy that output and replace the "expected output" -# files. You can then commit the changes. -# -# If you find yourself manually editing a foo.stderr file, you're -# doing it wrong. - -if [[ "$1" == "--help" || "$1" == "-h" || "$1" == "" || "$2" == "" ]]; then - echo "usage: $0 " - echo "" - echo "For example:" - echo " $0 ../../../build/x86_64-apple-darwin/test/ui *.rs */*.rs" -fi - -MYDIR=$(dirname $0) - -BUILD_DIR="$1" -shift - -while [[ "$1" != "" ]]; do - STDERR_NAME="${1/%.rs/.stderr}" - STDOUT_NAME="${1/%.rs/.stdout}" - shift - if [ -f $BUILD_DIR/$STDOUT_NAME ] && \ - ! (diff $BUILD_DIR/$STDOUT_NAME $MYDIR/$STDOUT_NAME >& /dev/null); then - echo updating $MYDIR/$STDOUT_NAME - cp $BUILD_DIR/$STDOUT_NAME $MYDIR/$STDOUT_NAME - fi - if [ -f $BUILD_DIR/$STDERR_NAME ] && \ - ! (diff $BUILD_DIR/$STDERR_NAME $MYDIR/$STDERR_NAME >& /dev/null); then - echo updating $MYDIR/$STDERR_NAME - cp $BUILD_DIR/$STDERR_NAME $MYDIR/$STDERR_NAME - fi -done - - diff --git a/tests/ui-windows/conf_non_existant.rs b/tests/ui-windows/conf_non_existant.rs deleted file mode 100644 index e287f7e02af..00000000000 --- a/tests/ui-windows/conf_non_existant.rs +++ /dev/null @@ -1,6 +0,0 @@ -// error-pattern: error reading Clippy's configuration file - -#![feature(plugin)] -#![plugin(clippy(conf_file="./tests/auxiliary/non_existant_conf.toml"))] - -fn main() {} diff --git a/tests/ui-windows/conf_non_existant.stderr b/tests/ui-windows/conf_non_existant.stderr deleted file mode 100644 index f21ae524f5e..00000000000 --- a/tests/ui-windows/conf_non_existant.stderr +++ /dev/null @@ -1,4 +0,0 @@ -error: error reading Clippy's configuration file: The system cannot find the file specified. (os error 2) - -error: aborting due to previous error - diff --git a/tests/ui-windows/update-all-references.sh b/tests/ui-windows/update-all-references.sh deleted file mode 100755 index d6aa69c7e8d..00000000000 --- a/tests/ui-windows/update-all-references.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 The Rust Project Developers. See the COPYRIGHT -# file at the top-level directory of this distribution and at -# http://rust-lang.org/COPYRIGHT. -# -# Licensed under the Apache License, Version 2.0 or the MIT license -# , at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - -# A script to update the references for all tests. The idea is that -# you do a run, which will generate files in the build directory -# containing the (normalized) actual output of the compiler. You then -# run this script, which will copy those files over. If you find -# yourself manually editing a foo.stderr file, you're doing it wrong. -# -# See all `update-references.sh`, if you just want to update a single test. - -if [[ "$1" == "--help" || "$1" == "-h" || "$1" == "" ]]; then - echo "usage: $0" -fi - -BUILD_DIR=$PWD/target/debug/test_build_base -MY_DIR=$(dirname $0) -cd $MY_DIR -find . -name '*.rs' | xargs ./update-references.sh $BUILD_DIR diff --git a/tests/ui-windows/update-references.sh b/tests/ui-windows/update-references.sh deleted file mode 100755 index aa99d35f7aa..00000000000 --- a/tests/ui-windows/update-references.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 The Rust Project Developers. See the COPYRIGHT -# file at the top-level directory of this distribution and at -# http://rust-lang.org/COPYRIGHT. -# -# Licensed under the Apache License, Version 2.0 or the MIT license -# , at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - -# A script to update the references for particular tests. The idea is -# that you do a run, which will generate files in the build directory -# containing the (normalized) actual output of the compiler. This -# script will then copy that output and replace the "expected output" -# files. You can then commit the changes. -# -# If you find yourself manually editing a foo.stderr file, you're -# doing it wrong. - -if [[ "$1" == "--help" || "$1" == "-h" || "$1" == "" || "$2" == "" ]]; then - echo "usage: $0 " - echo "" - echo "For example:" - echo " $0 ../../../build/x86_64-apple-darwin/test/ui *.rs */*.rs" -fi - -MYDIR=$(dirname $0) - -BUILD_DIR="$1" -shift - -while [[ "$1" != "" ]]; do - STDERR_NAME="${1/%.rs/.stderr}" - STDOUT_NAME="${1/%.rs/.stdout}" - shift - if [ -f $BUILD_DIR/$STDOUT_NAME ] && \ - ! (diff $BUILD_DIR/$STDOUT_NAME $MYDIR/$STDOUT_NAME >& /dev/null); then - echo updating $MYDIR/$STDOUT_NAME - cp $BUILD_DIR/$STDOUT_NAME $MYDIR/$STDOUT_NAME - fi - if [ -f $BUILD_DIR/$STDERR_NAME ] && \ - ! (diff $BUILD_DIR/$STDERR_NAME $MYDIR/$STDERR_NAME >& /dev/null); then - echo updating $MYDIR/$STDERR_NAME - cp $BUILD_DIR/$STDERR_NAME $MYDIR/$STDERR_NAME - fi -done - - diff --git a/tests/ui/absurd-extreme-comparisons.rs b/tests/ui/absurd-extreme-comparisons.rs index ad381c6cd49..1f88d94bd2b 100644 --- a/tests/ui/absurd-extreme-comparisons.rs +++ b/tests/ui/absurd-extreme-comparisons.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(absurd_extreme_comparisons)] #![allow(unused, eq_op, no_effect, unnecessary_operation, needless_pass_by_value)] diff --git a/tests/ui/absurd-extreme-comparisons.stderr b/tests/ui/absurd-extreme-comparisons.stderr index 2b1e9ad66fe..a4b8839797c 100644 --- a/tests/ui/absurd-extreme-comparisons.stderr +++ b/tests/ui/absurd-extreme-comparisons.stderr @@ -143,5 +143,3 @@ error: <-comparison of unit values detected. This will always be false | = note: `-D unit-cmp` implied by `-D warnings` -error: aborting due to 18 previous errors - diff --git a/tests/ui/approx_const.rs b/tests/ui/approx_const.rs index eb66a633f9e..f2239ecb467 100644 --- a/tests/ui/approx_const.rs +++ b/tests/ui/approx_const.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[warn(approx_constant)] #[allow(unused, shadow_unrelated, similar_names)] diff --git a/tests/ui/approx_const.stderr b/tests/ui/approx_const.stderr index dda28433d7a..f102dc5b5dc 100644 --- a/tests/ui/approx_const.stderr +++ b/tests/ui/approx_const.stderr @@ -114,5 +114,3 @@ error: approximate value of `f{32, 64}::consts::SQRT_2` found. Consider using it 55 | let my_sq2 = 1.4142; | ^^^^^^ -error: aborting due to 19 previous errors - diff --git a/tests/ui/arithmetic.rs b/tests/ui/arithmetic.rs index b281c239f36..7ed71b59707 100644 --- a/tests/ui/arithmetic.rs +++ b/tests/ui/arithmetic.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(integer_arithmetic, float_arithmetic)] #![allow(unused, shadow_reuse, shadow_unrelated, no_effect, unnecessary_operation)] diff --git a/tests/ui/arithmetic.stderr b/tests/ui/arithmetic.stderr index ad4a02e2190..ea32a005219 100644 --- a/tests/ui/arithmetic.stderr +++ b/tests/ui/arithmetic.stderr @@ -69,5 +69,3 @@ error: floating-point arithmetic detected 29 | -f; | ^^ -error: aborting due to 11 previous errors - diff --git a/tests/ui/array_indexing.rs b/tests/ui/array_indexing.rs index c38342daf68..faafa9a7a0d 100644 --- a/tests/ui/array_indexing.rs +++ b/tests/ui/array_indexing.rs @@ -1,5 +1,5 @@ #![feature(inclusive_range_syntax, plugin)] -#![plugin(clippy)] + #![warn(indexing_slicing)] #![warn(out_of_bounds_indexing)] diff --git a/tests/ui/array_indexing.stderr b/tests/ui/array_indexing.stderr index d730b012932..dd11247243c 100644 --- a/tests/ui/array_indexing.stderr +++ b/tests/ui/array_indexing.stderr @@ -116,5 +116,3 @@ error: range is out of bounds 44 | &empty[..4]; | ^^^^^^^^^^ -error: aborting due to 19 previous errors - diff --git a/tests/ui/assign_ops.rs b/tests/ui/assign_ops.rs index f92f2252114..2b49f2146ba 100644 --- a/tests/ui/assign_ops.rs +++ b/tests/ui/assign_ops.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[warn(assign_ops)] #[allow(unused_assignments)] diff --git a/tests/ui/assign_ops.stderr b/tests/ui/assign_ops.stderr index 2123507e2ef..c1cc5d24426 100644 --- a/tests/ui/assign_ops.stderr +++ b/tests/ui/assign_ops.stderr @@ -134,5 +134,3 @@ error: manual implementation of an assign operation 40 | s = s + "bla"; | ^^^^^^^^^^^^^ help: replace it with: `s += "bla"` -error: aborting due to 22 previous errors - diff --git a/tests/ui/assign_ops2.rs b/tests/ui/assign_ops2.rs index b5de5b712ff..8d6ef827f52 100644 --- a/tests/ui/assign_ops2.rs +++ b/tests/ui/assign_ops2.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[allow(unused_assignments)] #[warn(misrefactored_assign_op)] diff --git a/tests/ui/assign_ops2.stderr b/tests/ui/assign_ops2.stderr index 0ff211259c0..47528c315d4 100644 --- a/tests/ui/assign_ops2.stderr +++ b/tests/ui/assign_ops2.stderr @@ -48,5 +48,3 @@ error: variable appears on both sides of an assignment operation 15 | a &= a & 1; | ^^^^^^^^^^ help: replace it with: `a &= 1` -error: aborting due to 8 previous errors - diff --git a/tests/ui/attrs.rs b/tests/ui/attrs.rs index 1ff5edcd630..eb27b833ade 100644 --- a/tests/ui/attrs.rs +++ b/tests/ui/attrs.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(inline_always, deprecated_semver)] diff --git a/tests/ui/attrs.stderr b/tests/ui/attrs.stderr index f743399a606..9e4ac3d1283 100644 --- a/tests/ui/attrs.stderr +++ b/tests/ui/attrs.stderr @@ -20,5 +20,3 @@ error: the since field must contain a semver-compliant version 30 | #[deprecated(since = "1")] | ^^^^^^^^^^^ -error: aborting due to 3 previous errors - diff --git a/tests/ui/bit_masks.rs b/tests/ui/bit_masks.rs index c211b85d7e2..4843b4eba0d 100644 --- a/tests/ui/bit_masks.rs +++ b/tests/ui/bit_masks.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + const THREE_BITS : i64 = 7; const EVEN_MORE_REDIRECTION : i64 = THREE_BITS; diff --git a/tests/ui/bit_masks.stderr b/tests/ui/bit_masks.stderr index 40aa585d124..9f2c2d0a2c4 100644 --- a/tests/ui/bit_masks.stderr +++ b/tests/ui/bit_masks.stderr @@ -92,5 +92,3 @@ error: ineffective bit mask: `x | 1` compared to `8`, is the same as x compared 55 | x | 1 >= 8; | ^^^^^^^^^^ -error: aborting due to 15 previous errors - diff --git a/tests/ui/blacklisted_name.rs b/tests/ui/blacklisted_name.rs index dabce55883b..7baeb7bb75c 100644 --- a/tests/ui/blacklisted_name.rs +++ b/tests/ui/blacklisted_name.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(dead_code, similar_names, single_match, toplevel_ref_arg, unused_mut, unused_variables)] #![warn(blacklisted_name)] diff --git a/tests/ui/blacklisted_name.stderr b/tests/ui/blacklisted_name.stderr index 68fbe27a01e..a08a5326894 100644 --- a/tests/ui/blacklisted_name.stderr +++ b/tests/ui/blacklisted_name.stderr @@ -84,5 +84,3 @@ error: use of a blacklisted/placeholder name `baz` 35 | if let Some(ref mut baz) = Some(42) {} | ^^^ -error: aborting due to 14 previous errors - diff --git a/tests/ui/block_in_if_condition.rs b/tests/ui/block_in_if_condition.rs index 08e510317d9..9e65a127af2 100644 --- a/tests/ui/block_in_if_condition.rs +++ b/tests/ui/block_in_if_condition.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(block_in_if_condition_expr)] #![warn(block_in_if_condition_stmt)] diff --git a/tests/ui/block_in_if_condition.stderr b/tests/ui/block_in_if_condition.stderr index 4b7d12598ec..86a289c19a8 100644 --- a/tests/ui/block_in_if_condition.stderr +++ b/tests/ui/block_in_if_condition.stderr @@ -50,5 +50,3 @@ error: this boolean expression can be simplified | = note: `-D nonminimal-bool` implied by `-D warnings` -error: aborting due to 5 previous errors - diff --git a/tests/ui/bool_comparison.rs b/tests/ui/bool_comparison.rs index 9b32ed7304b..f05b9894fea 100644 --- a/tests/ui/bool_comparison.rs +++ b/tests/ui/bool_comparison.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[warn(bool_comparison)] fn main() { diff --git a/tests/ui/bool_comparison.stderr b/tests/ui/bool_comparison.stderr index 4436980bc11..e5e062e0246 100644 --- a/tests/ui/bool_comparison.stderr +++ b/tests/ui/bool_comparison.stderr @@ -24,5 +24,3 @@ error: equality checks against false can be replaced by a negation 10 | if false == x { "yes" } else { "no" }; | ^^^^^^^^^^ help: try simplifying it as shown: `!x` -error: aborting due to 4 previous errors - diff --git a/tests/ui/booleans.rs b/tests/ui/booleans.rs index ac60bf5e345..0434285a523 100644 --- a/tests/ui/booleans.rs +++ b/tests/ui/booleans.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(nonminimal_bool, logic_bug)] #[allow(unused, many_single_char_names)] diff --git a/tests/ui/booleans.stderr b/tests/ui/booleans.stderr index a76eb7a5cc0..0311e95a4f1 100644 --- a/tests/ui/booleans.stderr +++ b/tests/ui/booleans.stderr @@ -130,5 +130,3 @@ help: try 39 | let _ = !(a == b && c == d); | ^^^^^^^^^^^^^^^^^^^ -error: aborting due to 13 previous errors - diff --git a/tests/ui/borrow_box.rs b/tests/ui/borrow_box.rs index b5543da6e35..394b810ed86 100644 --- a/tests/ui/borrow_box.rs +++ b/tests/ui/borrow_box.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![deny(borrowed_box)] #![allow(blacklisted_name)] diff --git a/tests/ui/borrow_box.stderr b/tests/ui/borrow_box.stderr index 2cf0ea79626..74134f4f2b1 100644 --- a/tests/ui/borrow_box.stderr +++ b/tests/ui/borrow_box.stderr @@ -28,5 +28,3 @@ error: you seem to be trying to use `&Box`. Consider using just `&T` 22 | fn test4(a: &Box); | ^^^^^^^^^^ help: try: `&bool` -error: aborting due to 4 previous errors - diff --git a/tests/ui/box_vec.rs b/tests/ui/box_vec.rs index f8c5a80c59d..75b3b62643e 100644 --- a/tests/ui/box_vec.rs +++ b/tests/ui/box_vec.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(clippy)] #![allow(boxed_local, needless_pass_by_value)] diff --git a/tests/ui/box_vec.stderr b/tests/ui/box_vec.stderr index 254d0771386..c1badd0dc9b 100644 --- a/tests/ui/box_vec.stderr +++ b/tests/ui/box_vec.stderr @@ -7,5 +7,3 @@ error: you seem to be trying to use `Box>`. Consider using just `Vec` = note: `-D box-vec` implied by `-D warnings` = help: `Vec` is already on the heap, `Box>` makes an extra allocation. -error: aborting due to previous error - diff --git a/tests/ui/builtin-type-shadow.rs b/tests/ui/builtin-type-shadow.rs index a3609cfe104..4c4f5cbd3fe 100644 --- a/tests/ui/builtin-type-shadow.rs +++ b/tests/ui/builtin-type-shadow.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(builtin_type_shadow)] fn foo(a: u32) -> u32 { diff --git a/tests/ui/builtin-type-shadow.stderr b/tests/ui/builtin-type-shadow.stderr index eb4c73b65c6..058813356cd 100644 --- a/tests/ui/builtin-type-shadow.stderr +++ b/tests/ui/builtin-type-shadow.stderr @@ -17,5 +17,3 @@ error[E0308]: mismatched types = note: expected type `u32` found type `{integer}` -error: aborting due to 2 previous errors - diff --git a/tests/ui/bytecount.rs b/tests/ui/bytecount.rs index 8fc27c49f34..fc94667d968 100644 --- a/tests/ui/bytecount.rs +++ b/tests/ui/bytecount.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[deny(naive_bytecount)] fn main() { diff --git a/tests/ui/bytecount.stderr b/tests/ui/bytecount.stderr index 307edecfde1..c4f6b65a21e 100644 --- a/tests/ui/bytecount.stderr +++ b/tests/ui/bytecount.stderr @@ -22,5 +22,3 @@ error: You appear to be counting bytes the naive way 22 | let _ = x.iter().filter(|a| b + 1 == **a).count(); // naive byte count | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider using the bytecount crate: `bytecount::count(x, b + 1)` -error: aborting due to 3 previous errors - diff --git a/tests/ui/cast.rs b/tests/ui/cast.rs index 82427c128e4..1ad4630989d 100644 --- a/tests/ui/cast.rs +++ b/tests/ui/cast.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[warn(cast_precision_loss, cast_possible_truncation, cast_sign_loss, cast_possible_wrap, cast_lossless)] #[allow(no_effect, unnecessary_operation)] diff --git a/tests/ui/cast.stderr b/tests/ui/cast.stderr index 8787083b429..5e7ed6fae99 100644 --- a/tests/ui/cast.stderr +++ b/tests/ui/cast.stderr @@ -460,5 +460,3 @@ error: casting to the same type is unnecessary (`bool` -> `bool`) 88 | false as bool; | ^^^^^^^^^^^^^ -error: aborting due to 75 previous errors - diff --git a/tests/ui/char_lit_as_u8.rs b/tests/ui/char_lit_as_u8.rs index 6f07b60fb10..c69181c7649 100644 --- a/tests/ui/char_lit_as_u8.rs +++ b/tests/ui/char_lit_as_u8.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(char_lit_as_u8)] #![allow(unused_variables)] diff --git a/tests/ui/char_lit_as_u8.stderr b/tests/ui/char_lit_as_u8.stderr index fcf038fe002..4e7c1866a9a 100644 --- a/tests/ui/char_lit_as_u8.stderr +++ b/tests/ui/char_lit_as_u8.stderr @@ -8,5 +8,3 @@ error: casting character literal to u8. `char`s are 4 bytes wide in rust, so cas = help: Consider using a byte literal instead: b'a' -error: aborting due to previous error - diff --git a/tests/ui/cmp_nan.rs b/tests/ui/cmp_nan.rs index e8639273485..71dfdd43da7 100644 --- a/tests/ui/cmp_nan.rs +++ b/tests/ui/cmp_nan.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[warn(cmp_nan)] #[allow(float_cmp, no_effect, unnecessary_operation)] diff --git a/tests/ui/cmp_nan.stderr b/tests/ui/cmp_nan.stderr index 46f3d3d57e0..9ea1a29d29d 100644 --- a/tests/ui/cmp_nan.stderr +++ b/tests/ui/cmp_nan.stderr @@ -72,5 +72,3 @@ error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead 21 | y >= std::f64::NAN; | ^^^^^^^^^^^^^^^^^^ -error: aborting due to 12 previous errors - diff --git a/tests/ui/cmp_null.rs b/tests/ui/cmp_null.rs index 47ecacd5558..0f463bcfc30 100644 --- a/tests/ui/cmp_null.rs +++ b/tests/ui/cmp_null.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(cmp_null)] #![allow(unused_mut)] diff --git a/tests/ui/cmp_null.stderr b/tests/ui/cmp_null.stderr index 481a4d0f942..51c0ceea4b1 100644 --- a/tests/ui/cmp_null.stderr +++ b/tests/ui/cmp_null.stderr @@ -12,5 +12,3 @@ error: Comparing with null is better expressed by the .is_null() method 16 | if m == ptr::null_mut() { | ^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 2 previous errors - diff --git a/tests/ui/cmp_owned.rs b/tests/ui/cmp_owned.rs index 4b9b6434ebc..36d3140d246 100644 --- a/tests/ui/cmp_owned.rs +++ b/tests/ui/cmp_owned.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[warn(cmp_owned)] #[allow(unnecessary_operation)] diff --git a/tests/ui/cmp_owned.stderr b/tests/ui/cmp_owned.stderr index d40fb4b8add..e6996244664 100644 --- a/tests/ui/cmp_owned.stderr +++ b/tests/ui/cmp_owned.stderr @@ -36,5 +36,3 @@ error: this creates an owned instance just for comparison 30 | self.to_owned() == *other | ^^^^^^^^^^^^^^^ try calling implementing the comparison without allocating -error: aborting due to 6 previous errors - diff --git a/tests/ui/collapsible_if.rs b/tests/ui/collapsible_if.rs index d03a1ee1980..3c5c38525fe 100644 --- a/tests/ui/collapsible_if.rs +++ b/tests/ui/collapsible_if.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[warn(collapsible_if)] fn main() { diff --git a/tests/ui/collapsible_if.stderr b/tests/ui/collapsible_if.stderr index 940749d3f40..e726a36282b 100644 --- a/tests/ui/collapsible_if.stderr +++ b/tests/ui/collapsible_if.stderr @@ -252,5 +252,3 @@ help: try 112 | } | -error: aborting due to 13 previous errors - diff --git a/tests/ui/complex_types.rs b/tests/ui/complex_types.rs index 481a6a82cf5..7719a7a8632 100644 --- a/tests/ui/complex_types.rs +++ b/tests/ui/complex_types.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(clippy)] #![allow(unused, needless_pass_by_value)] #![feature(associated_type_defaults)] diff --git a/tests/ui/complex_types.stderr b/tests/ui/complex_types.stderr index 829a22c233f..8ce63652f0b 100644 --- a/tests/ui/complex_types.stderr +++ b/tests/ui/complex_types.stderr @@ -90,5 +90,3 @@ error: very complex type used. Consider factoring parts into `type` definitions 40 | let _y: Vec>> = vec![]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 15 previous errors - diff --git a/tests/ui/conf_bad_arg.rs b/tests/ui/conf_bad_arg.rs index 68b902719f6..b988fdb1385 100644 --- a/tests/ui/conf_bad_arg.rs +++ b/tests/ui/conf_bad_arg.rs @@ -1,6 +1,6 @@ // error-pattern: `conf_file` must be a named value -#![feature(plugin)] + #![plugin(clippy(conf_file))] fn main() {} diff --git a/tests/ui/conf_bad_arg.stderr b/tests/ui/conf_bad_arg.stderr index 92b3c82d458..d91729039b1 100644 --- a/tests/ui/conf_bad_arg.stderr +++ b/tests/ui/conf_bad_arg.stderr @@ -1,14 +1,8 @@ -error: `conf_file` must be a named value - --> $DIR/conf_bad_arg.rs:4:18 +error: compiler plugins are experimental and possibly buggy (see issue #29597) + --> $DIR/conf_bad_arg.rs:4:1 | 4 | #![plugin(clippy(conf_file))] - | ^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -note: Clippy will use default configuration - --> $DIR/conf_bad_arg.rs:4:18 - | -4 | #![plugin(clippy(conf_file))] - | ^^^^^^^^^ - -error: aborting due to previous error + = help: add #![feature(plugin)] to the crate attributes to enable diff --git a/tests/ui/conf_bad_toml.rs b/tests/ui/conf_bad_toml.rs index 22cbfca759e..4de2cf6ae73 100644 --- a/tests/ui/conf_bad_toml.rs +++ b/tests/ui/conf_bad_toml.rs @@ -1,6 +1,6 @@ // error-pattern: error reading Clippy's configuration file -#![feature(plugin)] + #![plugin(clippy(conf_file="./tests/ui/conf_bad_toml.toml"))] fn main() {} diff --git a/tests/ui/conf_bad_toml.stderr b/tests/ui/conf_bad_toml.stderr index 8ee392f8924..5ddf8c14f70 100644 --- a/tests/ui/conf_bad_toml.stderr +++ b/tests/ui/conf_bad_toml.stderr @@ -1,4 +1,8 @@ -error: error reading Clippy's configuration file: expected an equals, found an identifier at line 1 - -error: aborting due to previous error +error: compiler plugins are experimental and possibly buggy (see issue #29597) + --> $DIR/conf_bad_toml.rs:4:1 + | +4 | #![plugin(clippy(conf_file="./$DIR/conf_bad_toml.toml"))] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(plugin)] to the crate attributes to enable diff --git a/tests/ui/conf_bad_type.rs b/tests/ui/conf_bad_type.rs index d5cca60a301..4cb21b91582 100644 --- a/tests/ui/conf_bad_type.rs +++ b/tests/ui/conf_bad_type.rs @@ -1,6 +1,6 @@ // error-pattern: error reading Clippy's configuration file: `blacklisted-names` is expected to be a `Vec < String >` but is a `integer` -#![feature(plugin)] + #![plugin(clippy(conf_file="./tests/ui/conf_bad_type.toml"))] fn main() {} diff --git a/tests/ui/conf_bad_type.stderr b/tests/ui/conf_bad_type.stderr index 5cb4d05afef..961df381c99 100644 --- a/tests/ui/conf_bad_type.stderr +++ b/tests/ui/conf_bad_type.stderr @@ -1,4 +1,8 @@ -error: error reading Clippy's configuration file: invalid type: integer `42`, expected a sequence - -error: aborting due to previous error +error: compiler plugins are experimental and possibly buggy (see issue #29597) + --> $DIR/conf_bad_type.rs:4:1 + | +4 | #![plugin(clippy(conf_file="./$DIR/conf_bad_type.toml"))] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(plugin)] to the crate attributes to enable diff --git a/tests/ui/conf_french_blacklisted_name.rs b/tests/ui/conf_french_blacklisted_name.rs index 5bf1e896f5d..9f22ff659f2 100644 --- a/tests/ui/conf_french_blacklisted_name.rs +++ b/tests/ui/conf_french_blacklisted_name.rs @@ -1,4 +1,4 @@ -#![feature(plugin)] + #![plugin(clippy(conf_file="./tests/auxiliary/conf_french_blacklisted_name.toml"))] #![allow(dead_code)] diff --git a/tests/ui/conf_french_blacklisted_name.stderr b/tests/ui/conf_french_blacklisted_name.stderr index b2b0f26b140..c98adb6029f 100644 --- a/tests/ui/conf_french_blacklisted_name.stderr +++ b/tests/ui/conf_french_blacklisted_name.stderr @@ -1,46 +1,8 @@ -error: use of a blacklisted/placeholder name `toto` - --> $DIR/conf_french_blacklisted_name.rs:9:9 +error: compiler plugins are experimental and possibly buggy (see issue #29597) + --> $DIR/conf_french_blacklisted_name.rs:2:1 | -9 | fn test(toto: ()) {} - | ^^^^ +2 | #![plugin(clippy(conf_file="./tests/auxiliary/conf_french_blacklisted_name.toml"))] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D blacklisted-name` implied by `-D warnings` - -error: use of a blacklisted/placeholder name `toto` - --> $DIR/conf_french_blacklisted_name.rs:12:9 - | -12 | let toto = 42; - | ^^^^ - -error: use of a blacklisted/placeholder name `tata` - --> $DIR/conf_french_blacklisted_name.rs:13:9 - | -13 | let tata = 42; - | ^^^^ - -error: use of a blacklisted/placeholder name `titi` - --> $DIR/conf_french_blacklisted_name.rs:14:9 - | -14 | let titi = 42; - | ^^^^ - -error: use of a blacklisted/placeholder name `toto` - --> $DIR/conf_french_blacklisted_name.rs:20:10 - | -20 | (toto, Some(tata), titi @ Some(_)) => (), - | ^^^^ - -error: use of a blacklisted/placeholder name `tata` - --> $DIR/conf_french_blacklisted_name.rs:20:21 - | -20 | (toto, Some(tata), titi @ Some(_)) => (), - | ^^^^ - -error: use of a blacklisted/placeholder name `titi` - --> $DIR/conf_french_blacklisted_name.rs:20:28 - | -20 | (toto, Some(tata), titi @ Some(_)) => (), - | ^^^^ - -error: aborting due to 7 previous errors + = help: add #![feature(plugin)] to the crate attributes to enable diff --git a/tests/ui/conf_path_non_string.rs b/tests/ui/conf_path_non_string.rs index f6f40513be8..8d1f01358fc 100644 --- a/tests/ui/conf_path_non_string.rs +++ b/tests/ui/conf_path_non_string.rs @@ -1,5 +1,5 @@ #![feature(attr_literals)] -#![feature(plugin)] + #![plugin(clippy(conf_file=42))] fn main() {} diff --git a/tests/ui/conf_path_non_string.stderr b/tests/ui/conf_path_non_string.stderr index 3bf53f10cce..4b15b5d0e17 100644 --- a/tests/ui/conf_path_non_string.stderr +++ b/tests/ui/conf_path_non_string.stderr @@ -1,14 +1,8 @@ -error: `conf_file` value must be a string - --> $DIR/conf_path_non_string.rs:3:28 +error: compiler plugins are experimental and possibly buggy (see issue #29597) + --> $DIR/conf_path_non_string.rs:3:1 | 3 | #![plugin(clippy(conf_file=42))] - | ^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -note: Clippy will use default configuration - --> $DIR/conf_path_non_string.rs:3:28 - | -3 | #![plugin(clippy(conf_file=42))] - | ^^ - -error: aborting due to previous error + = help: add #![feature(plugin)] to the crate attributes to enable diff --git a/tests/ui/conf_unknown_key.rs b/tests/ui/conf_unknown_key.rs index b5c1b240e4d..aec2c883367 100644 --- a/tests/ui/conf_unknown_key.rs +++ b/tests/ui/conf_unknown_key.rs @@ -1,6 +1,6 @@ // error-pattern: error reading Clippy's configuration file: unknown key `foobar` -#![feature(plugin)] + #![plugin(clippy(conf_file="./tests/auxiliary/conf_unknown_key.toml"))] fn main() {} diff --git a/tests/ui/conf_unknown_key.stderr b/tests/ui/conf_unknown_key.stderr index 8de3cd93370..9fc7dbea563 100644 --- a/tests/ui/conf_unknown_key.stderr +++ b/tests/ui/conf_unknown_key.stderr @@ -1,4 +1,8 @@ -error: error reading Clippy's configuration file: unknown field `foobar`, expected one of `blacklisted-names`, `cyclomatic-complexity-threshold`, `doc-valid-idents`, `too-many-arguments-threshold`, `type-complexity-threshold`, `single-char-binding-names-threshold`, `too-large-for-stack`, `enum-variant-name-threshold`, `enum-variant-size-threshold`, `verbose-bit-mask-threshold`, `third-party` - -error: aborting due to previous error +error: compiler plugins are experimental and possibly buggy (see issue #29597) + --> $DIR/conf_unknown_key.rs:4:1 + | +4 | #![plugin(clippy(conf_file="./tests/auxiliary/conf_unknown_key.toml"))] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(plugin)] to the crate attributes to enable diff --git a/tests/ui/copies.rs b/tests/ui/copies.rs index 652afac6c68..4c4050c014f 100644 --- a/tests/ui/copies.rs +++ b/tests/ui/copies.rs @@ -1,5 +1,4 @@ -#![feature(plugin, dotdoteq_in_patterns, inclusive_range_syntax)] -#![plugin(clippy)] +#![feature(dotdoteq_in_patterns, inclusive_range_syntax)] #![allow(dead_code, no_effect, unnecessary_operation)] #![allow(let_and_return)] diff --git a/tests/ui/copies.stderr b/tests/ui/copies.stderr index bf9e8ed577d..4457e2b7d73 100644 --- a/tests/ui/copies.stderr +++ b/tests/ui/copies.stderr @@ -1,11 +1,11 @@ error: This else block is redundant. - --> $DIR/copies.rs:121:20 + --> $DIR/copies.rs:120:20 | -121 | } else { +120 | } else { | ____________________^ -122 | | continue; -123 | | } +121 | | continue; +122 | | } | |_____________^ | = note: `-D needless-continue` implied by `-D warnings` @@ -18,12 +18,12 @@ error: This else block is redundant. error: This else block is redundant. - --> $DIR/copies.rs:131:20 + --> $DIR/copies.rs:130:20 | -131 | } else { +130 | } else { | ____________________^ -132 | | continue; -133 | | } +131 | | continue; +132 | | } | |_____________^ | = help: Consider dropping the else clause and merging the code that follows (in the loop) with the if block, like so: @@ -33,5 +33,3 @@ error: This else block is redundant. } -error: aborting due to 2 previous errors - diff --git a/tests/ui/cyclomatic_complexity.rs b/tests/ui/cyclomatic_complexity.rs index a236d6e869f..0f5726e1ad7 100644 --- a/tests/ui/cyclomatic_complexity.rs +++ b/tests/ui/cyclomatic_complexity.rs @@ -1,5 +1,5 @@ #![feature(plugin, custom_attribute)] -#![plugin(clippy)] + #![allow(clippy)] #![warn(cyclomatic_complexity)] #![allow(unused)] diff --git a/tests/ui/cyclomatic_complexity.stderr b/tests/ui/cyclomatic_complexity.stderr index 43676762d6c..62fd5313ccb 100644 --- a/tests/ui/cyclomatic_complexity.stderr +++ b/tests/ui/cyclomatic_complexity.stderr @@ -269,5 +269,3 @@ error: the function has a cyclomatic complexity of 8 | = help: you could split it up into multiple smaller functions -error: aborting due to 20 previous errors - diff --git a/tests/ui/cyclomatic_complexity_attr_used.rs b/tests/ui/cyclomatic_complexity_attr_used.rs index 48ae12bc2d8..5284d60a524 100644 --- a/tests/ui/cyclomatic_complexity_attr_used.rs +++ b/tests/ui/cyclomatic_complexity_attr_used.rs @@ -1,5 +1,5 @@ #![feature(plugin, custom_attribute)] -#![plugin(clippy)] + #![warn(cyclomatic_complexity)] #![warn(unused)] diff --git a/tests/ui/cyclomatic_complexity_attr_used.stderr b/tests/ui/cyclomatic_complexity_attr_used.stderr index e671b34393b..a9cefe93e32 100644 --- a/tests/ui/cyclomatic_complexity_attr_used.stderr +++ b/tests/ui/cyclomatic_complexity_attr_used.stderr @@ -13,5 +13,3 @@ error: the function has a cyclomatic complexity of 3 = note: `-D cyclomatic-complexity` implied by `-D warnings` = help: you could split it up into multiple smaller functions -error: aborting due to previous error - diff --git a/tests/ui/deprecated.rs b/tests/ui/deprecated.rs index e0c856e3d7c..0598e174e50 100644 --- a/tests/ui/deprecated.rs +++ b/tests/ui/deprecated.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[warn(str_to_string)] diff --git a/tests/ui/deprecated.stderr b/tests/ui/deprecated.stderr index 7d5d594cfa1..4255959675a 100644 --- a/tests/ui/deprecated.stderr +++ b/tests/ui/deprecated.stderr @@ -24,5 +24,3 @@ error: lint unstable_as_mut_slice has been removed: `Vec::as_mut_slice` has been 10 | #[warn(unstable_as_mut_slice)] | ^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 4 previous errors - diff --git a/tests/ui/derive.rs b/tests/ui/derive.rs index 11cade0dc8e..6440f73f31b 100644 --- a/tests/ui/derive.rs +++ b/tests/ui/derive.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![feature(untagged_unions)] diff --git a/tests/ui/derive.stderr b/tests/ui/derive.stderr index ffeed948ba5..f336dc3a8e1 100644 --- a/tests/ui/derive.stderr +++ b/tests/ui/derive.stderr @@ -106,5 +106,3 @@ note: consider deriving `Clone` or removing `Copy` 87 | | } | |_^ -error: aborting due to 7 previous errors - diff --git a/tests/ui/diverging_sub_expression.rs b/tests/ui/diverging_sub_expression.rs index 7ae531cc6f2..d2aea93a77d 100644 --- a/tests/ui/diverging_sub_expression.rs +++ b/tests/ui/diverging_sub_expression.rs @@ -1,5 +1,5 @@ #![feature(plugin, never_type)] -#![plugin(clippy)] + #![warn(diverging_sub_expression)] #![allow(match_same_arms, logic_bug)] diff --git a/tests/ui/diverging_sub_expression.stderr b/tests/ui/diverging_sub_expression.stderr index 0d7b1ca6fd6..b39d1ae07e5 100644 --- a/tests/ui/diverging_sub_expression.stderr +++ b/tests/ui/diverging_sub_expression.stderr @@ -36,5 +36,3 @@ error: sub-expression diverges 37 | _ => true || break, | ^^^^^ -error: aborting due to 6 previous errors - diff --git a/tests/ui/dlist.rs b/tests/ui/dlist.rs index 5e4e1cb2a64..217a564742c 100644 --- a/tests/ui/dlist.rs +++ b/tests/ui/dlist.rs @@ -1,7 +1,7 @@ #![feature(plugin, alloc)] #![feature(associated_type_defaults)] -#![plugin(clippy)] + #![warn(clippy)] #![allow(dead_code, needless_pass_by_value)] diff --git a/tests/ui/dlist.stderr b/tests/ui/dlist.stderr index de0422e17ed..95872c02994 100644 --- a/tests/ui/dlist.stderr +++ b/tests/ui/dlist.stderr @@ -47,5 +47,3 @@ error: I see you're using a LinkedList! Perhaps you meant some other data struct | = help: a VecDeque might work -error: aborting due to 6 previous errors - diff --git a/tests/ui/doc.rs b/tests/ui/doc.rs index 70009d76f5d..45e25409b12 100644 --- a/tests/ui/doc.rs +++ b/tests/ui/doc.rs @@ -1,7 +1,7 @@ //! This file tests for the DOC_MARKDOWN lint -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(dead_code)] #![warn(doc_markdown)] diff --git a/tests/ui/doc.stderr b/tests/ui/doc.stderr index f38678e89aa..fc036d01b86 100644 --- a/tests/ui/doc.stderr +++ b/tests/ui/doc.stderr @@ -180,5 +180,3 @@ error: you should put bare URLs between `<`/`>` or make a proper Markdown link 168 | /// Not ok: http://www.unicode.org/reports/tr9/#Reordering_Resolved_Levels | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 30 previous errors - diff --git a/tests/ui/double_neg.rs b/tests/ui/double_neg.rs index d462e6f4ab6..641e334fd16 100644 --- a/tests/ui/double_neg.rs +++ b/tests/ui/double_neg.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[warn(double_neg)] fn main() { diff --git a/tests/ui/double_neg.stderr b/tests/ui/double_neg.stderr index fd4da8820a2..8c64eb37e15 100644 --- a/tests/ui/double_neg.stderr +++ b/tests/ui/double_neg.stderr @@ -6,5 +6,3 @@ error: `--x` could be misinterpreted as pre-decrement by C programmers, is usual | = note: `-D double-neg` implied by `-D warnings` -error: aborting due to previous error - diff --git a/tests/ui/double_parens.rs b/tests/ui/double_parens.rs index 8b57619edb0..19d17732867 100644 --- a/tests/ui/double_parens.rs +++ b/tests/ui/double_parens.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(double_parens)] #![allow(dead_code)] diff --git a/tests/ui/double_parens.stderr b/tests/ui/double_parens.stderr index a77b08528c4..ab3e844d7a7 100644 --- a/tests/ui/double_parens.stderr +++ b/tests/ui/double_parens.stderr @@ -30,5 +30,3 @@ error: Consider removing unnecessary double parentheses 32 | (()) | ^^^^ -error: aborting due to 5 previous errors - diff --git a/tests/ui/drop_forget_copy.rs b/tests/ui/drop_forget_copy.rs index 4e48a89b659..9fef06b0ede 100644 --- a/tests/ui/drop_forget_copy.rs +++ b/tests/ui/drop_forget_copy.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(drop_copy, forget_copy)] #![allow(toplevel_ref_arg, drop_ref, forget_ref, unused_mut)] diff --git a/tests/ui/drop_forget_copy.stderr b/tests/ui/drop_forget_copy.stderr index 3ea7bf9735a..f399c5a125f 100644 --- a/tests/ui/drop_forget_copy.stderr +++ b/tests/ui/drop_forget_copy.stderr @@ -72,5 +72,3 @@ note: argument has type SomeStruct 42 | forget(s4); | ^^ -error: aborting due to 6 previous errors - diff --git a/tests/ui/drop_forget_ref.rs b/tests/ui/drop_forget_ref.rs index 48811f03b6f..e8ab6a0d5d1 100644 --- a/tests/ui/drop_forget_ref.rs +++ b/tests/ui/drop_forget_ref.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(drop_ref, forget_ref)] #![allow(toplevel_ref_arg, similar_names, needless_pass_by_value)] diff --git a/tests/ui/drop_forget_ref.stderr b/tests/ui/drop_forget_ref.stderr index 1654fdd2861..6058b89c70f 100644 --- a/tests/ui/drop_forget_ref.stderr +++ b/tests/ui/drop_forget_ref.stderr @@ -216,5 +216,3 @@ note: argument has type &SomeStruct 59 | std::mem::forget(&SomeStruct); | ^^^^^^^^^^^ -error: aborting due to 18 previous errors - diff --git a/tests/ui/duplicate_underscore_argument.rs b/tests/ui/duplicate_underscore_argument.rs index 893cc43f364..df00f56aa62 100644 --- a/tests/ui/duplicate_underscore_argument.rs +++ b/tests/ui/duplicate_underscore_argument.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(duplicate_underscore_argument)] #[allow(dead_code, unused)] diff --git a/tests/ui/duplicate_underscore_argument.stderr b/tests/ui/duplicate_underscore_argument.stderr index c926f57f154..de9e6f1e056 100644 --- a/tests/ui/duplicate_underscore_argument.stderr +++ b/tests/ui/duplicate_underscore_argument.stderr @@ -6,5 +6,3 @@ error: `darth` already exists, having another argument having almost the same na | = note: `-D duplicate-underscore-argument` implied by `-D warnings` -error: aborting due to previous error - diff --git a/tests/ui/empty_enum.rs b/tests/ui/empty_enum.rs index 98138add0de..c6e6946de86 100644 --- a/tests/ui/empty_enum.rs +++ b/tests/ui/empty_enum.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(dead_code)] #![warn(empty_enum)] diff --git a/tests/ui/empty_enum.stderr b/tests/ui/empty_enum.stderr index ca377cee822..a0d491b6f96 100644 --- a/tests/ui/empty_enum.stderr +++ b/tests/ui/empty_enum.stderr @@ -11,5 +11,3 @@ help: consider using the uninhabited type `!` or a wrapper around it 7 | enum Empty {} | ^^^^^^^^^^^^^ -error: aborting due to previous error - diff --git a/tests/ui/entry.rs b/tests/ui/entry.rs index 1ae39689d8b..ccbc7038f13 100644 --- a/tests/ui/entry.rs +++ b/tests/ui/entry.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(unused, needless_pass_by_value)] #![warn(map_entry)] diff --git a/tests/ui/entry.stderr b/tests/ui/entry.stderr index 09c4a882280..e60c158d7c0 100644 --- a/tests/ui/entry.stderr +++ b/tests/ui/entry.stderr @@ -42,5 +42,3 @@ error: usage of `contains_key` followed by `insert` on a `BTreeMap` 37 | if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k)` -error: aborting due to 7 previous errors - diff --git a/tests/ui/enum_glob_use.rs b/tests/ui/enum_glob_use.rs index 514ef47c566..76d0d29bb53 100644 --- a/tests/ui/enum_glob_use.rs +++ b/tests/ui/enum_glob_use.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(clippy, clippy_pedantic)] #![allow(unused_imports, dead_code, missing_docs_in_private_items)] diff --git a/tests/ui/enum_glob_use.stderr b/tests/ui/enum_glob_use.stderr index 2d53618c1b1..1e0fffb9ac4 100644 --- a/tests/ui/enum_glob_use.stderr +++ b/tests/ui/enum_glob_use.stderr @@ -12,5 +12,3 @@ error: don't use glob imports for enum variants 12 | use self::Enum::*; | ^^^^^^^^^^^^^^^^^^ -error: aborting due to 2 previous errors - diff --git a/tests/ui/enum_variants.rs b/tests/ui/enum_variants.rs index a12eb3fd344..9901baf9e12 100644 --- a/tests/ui/enum_variants.rs +++ b/tests/ui/enum_variants.rs @@ -1,5 +1,5 @@ #![feature(plugin, non_ascii_idents)] -#![plugin(clippy)] + #![warn(clippy, pub_enum_variant_names)] enum FakeCallType { diff --git a/tests/ui/enum_variants.stderr b/tests/ui/enum_variants.stderr index e33e29ec78e..7e2716b8ea2 100644 --- a/tests/ui/enum_variants.stderr +++ b/tests/ui/enum_variants.stderr @@ -97,5 +97,3 @@ error: All variants have the same prefix: `With` = note: `-D pub-enum-variant-names` implied by `-D warnings` = help: remove the prefixes and use full paths to the variants instead of glob imports -error: aborting due to 10 previous errors - diff --git a/tests/ui/enums_clike.rs b/tests/ui/enums_clike.rs index fd2240353dd..618603683e8 100644 --- a/tests/ui/enums_clike.rs +++ b/tests/ui/enums_clike.rs @@ -1,6 +1,6 @@ // ignore-x86 -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(clippy)] #![allow(unused)] diff --git a/tests/ui/enums_clike.stderr b/tests/ui/enums_clike.stderr index d6a137c6fe4..e0555bb0239 100644 --- a/tests/ui/enums_clike.stderr +++ b/tests/ui/enums_clike.stderr @@ -48,5 +48,3 @@ error: Clike enum variant discriminant is not portable to 32-bit targets 37 | A = 0x1_0000_0000, | ^^^^^^^^^^^^^^^^^ -error: aborting due to 8 previous errors - diff --git a/tests/ui/eq_op.rs b/tests/ui/eq_op.rs index 12d62042dca..89d85d1b3e9 100644 --- a/tests/ui/eq_op.rs +++ b/tests/ui/eq_op.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[warn(eq_op)] #[allow(identity_op, double_parens, many_single_char_names)] diff --git a/tests/ui/eq_op.stderr b/tests/ui/eq_op.stderr index 46c0ac108cd..914a85719d0 100644 --- a/tests/ui/eq_op.stderr +++ b/tests/ui/eq_op.stderr @@ -204,5 +204,3 @@ error: taken reference of right operand | = note: `-D op-ref` implied by `-D warnings` -error: aborting due to 33 previous errors - diff --git a/tests/ui/escape_analysis.rs b/tests/ui/escape_analysis.rs index b4793198b7a..b99534d05e1 100644 --- a/tests/ui/escape_analysis.rs +++ b/tests/ui/escape_analysis.rs @@ -1,5 +1,5 @@ #![feature(plugin, box_syntax)] -#![plugin(clippy)] + #![allow(warnings, clippy)] #![warn(boxed_local)] diff --git a/tests/ui/eta.rs b/tests/ui/eta.rs index 46ac0ec8c73..0ff02a0b2cc 100644 --- a/tests/ui/eta.rs +++ b/tests/ui/eta.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(unknown_lints, unused, no_effect, redundant_closure_call, many_single_char_names, needless_pass_by_value)] #![warn(redundant_closure)] diff --git a/tests/ui/eta.stderr b/tests/ui/eta.stderr index 5dca265c2a4..34a6217cd70 100644 --- a/tests/ui/eta.stderr +++ b/tests/ui/eta.stderr @@ -32,5 +32,3 @@ error: redundant closure found 18 | let e = Some(1u8).map(|a| generic(a)); | ^^^^^^^^^^^^^^ help: remove closure as shown: `generic` -error: aborting due to 5 previous errors - diff --git a/tests/ui/eval_order_dependence.rs b/tests/ui/eval_order_dependence.rs index 853c61af2f2..e7ccb190d2c 100644 --- a/tests/ui/eval_order_dependence.rs +++ b/tests/ui/eval_order_dependence.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[warn(eval_order_dependence)] #[allow(unused_assignments, unused_variables, many_single_char_names, no_effect, dead_code, blacklisted_name)] diff --git a/tests/ui/eval_order_dependence.stderr b/tests/ui/eval_order_dependence.stderr index 2e01a167c01..e9bdc3b51d9 100644 --- a/tests/ui/eval_order_dependence.stderr +++ b/tests/ui/eval_order_dependence.stderr @@ -47,5 +47,3 @@ note: whether read occurs before this write depends on evaluation order 21 | x += { x = 20; 2 }; | ^^^^^^ -error: aborting due to 4 previous errors - diff --git a/tests/ui/filter_methods.rs b/tests/ui/filter_methods.rs index 77ebe9d12dd..29230c48ea3 100644 --- a/tests/ui/filter_methods.rs +++ b/tests/ui/filter_methods.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(clippy, clippy_pedantic)] #![allow(missing_docs_in_private_items)] diff --git a/tests/ui/filter_methods.stderr b/tests/ui/filter_methods.stderr index cec03a47bfd..8f1853c3952 100644 --- a/tests/ui/filter_methods.stderr +++ b/tests/ui/filter_methods.stderr @@ -36,5 +36,3 @@ error: called `filter_map(p).map(q)` on an `Iterator`. This is more succinctly e 25 | | .map(|x| x.checked_mul(2)) | |__________________________________________________________^ -error: aborting due to 4 previous errors - diff --git a/tests/ui/float_cmp.rs b/tests/ui/float_cmp.rs index f3f66f3c9c5..9dd9ea9b04d 100644 --- a/tests/ui/float_cmp.rs +++ b/tests/ui/float_cmp.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(float_cmp)] #![allow(unused, no_effect, unnecessary_operation, cast_lossless)] diff --git a/tests/ui/float_cmp.stderr b/tests/ui/float_cmp.stderr index a764403d039..d2903f501f5 100644 --- a/tests/ui/float_cmp.stderr +++ b/tests/ui/float_cmp.stderr @@ -95,5 +95,3 @@ note: std::f32::EPSILON and std::f64::EPSILON are available. 57 | twice(x) != twice(ONE as f64); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 8 previous errors - diff --git a/tests/ui/for_loop.rs b/tests/ui/for_loop.rs index 95d15776a36..083e6f9a6e5 100644 --- a/tests/ui/for_loop.rs +++ b/tests/ui/for_loop.rs @@ -1,5 +1,5 @@ #![feature(plugin, inclusive_range_syntax)] -#![plugin(clippy)] + use std::collections::*; use std::rc::Rc; diff --git a/tests/ui/for_loop.stderr b/tests/ui/for_loop.stderr index 09c4deb492a..620c32b6ab5 100644 --- a/tests/ui/for_loop.stderr +++ b/tests/ui/for_loop.stderr @@ -586,5 +586,3 @@ error: it looks like you're manually copying between slices 549 | | } | |_____^ help: try replacing the loop by: `dst[..src.len()].clone_from_slice(&src[..])` -error: aborting due to 59 previous errors - diff --git a/tests/ui/format.rs b/tests/ui/format.rs index 377bcc7ca8d..e9379d0a05b 100644 --- a/tests/ui/format.rs +++ b/tests/ui/format.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(useless_format)] fn main() { diff --git a/tests/ui/format.stderr b/tests/ui/format.stderr index d2c9f393831..67d97f295d8 100644 --- a/tests/ui/format.stderr +++ b/tests/ui/format.stderr @@ -18,5 +18,3 @@ error: useless use of `format!` 15 | format!("{}", arg); | ^^^^^^^^^^^^^^^^^^^ -error: aborting due to 3 previous errors - diff --git a/tests/ui/formatting.rs b/tests/ui/formatting.rs index 7e2691776bf..20b1c1655a7 100644 --- a/tests/ui/formatting.rs +++ b/tests/ui/formatting.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(clippy)] #![allow(unused_variables)] diff --git a/tests/ui/formatting.stderr b/tests/ui/formatting.stderr index 266de262ea0..d121929d0c2 100644 --- a/tests/ui/formatting.stderr +++ b/tests/ui/formatting.stderr @@ -86,5 +86,3 @@ error: possibly missing a comma here | = note: to remove this lint, add a comma or write the expr in a single line -error: aborting due to 10 previous errors - diff --git a/tests/ui/functions.rs b/tests/ui/functions.rs index 13d116542ac..5688c471d86 100644 --- a/tests/ui/functions.rs +++ b/tests/ui/functions.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(clippy)] #![allow(dead_code)] diff --git a/tests/ui/functions.stderr b/tests/ui/functions.stderr index 0a97748954f..c8b4db35245 100644 --- a/tests/ui/functions.stderr +++ b/tests/ui/functions.stderr @@ -75,5 +75,3 @@ error: this public function dereferences a raw pointer but is not marked `unsafe 63 | unsafe { std::ptr::read(p) }; | ^ -error: aborting due to 12 previous errors - diff --git a/tests/ui/ices.rs b/tests/ui/ices.rs deleted file mode 100644 index 9c5129654e4..00000000000 --- a/tests/ui/ices.rs +++ /dev/null @@ -1,5 +0,0 @@ - -// this used to ICE -fubar!(); - -fn main() {} diff --git a/tests/ui/ices.stderr b/tests/ui/ices.stderr deleted file mode 100644 index cadd7cd417d..00000000000 --- a/tests/ui/ices.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: cannot find macro `fubar!` in this scope - --> $DIR/ices.rs:3:1 - | -3 | fubar!(); - | ^^^^^ - -error: aborting due to previous error - diff --git a/tests/ui/identity_op.rs b/tests/ui/identity_op.rs index e6ebb972643..b474344977c 100644 --- a/tests/ui/identity_op.rs +++ b/tests/ui/identity_op.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + const ONE : i64 = 1; const NEG_ONE : i64 = -1; diff --git a/tests/ui/identity_op.stderr b/tests/ui/identity_op.stderr index 94b9b727a51..30367c989ec 100644 --- a/tests/ui/identity_op.stderr +++ b/tests/ui/identity_op.stderr @@ -42,5 +42,3 @@ error: the operation is ineffective. Consider reducing it to `x` 29 | -1 & x; | ^^^^^^ -error: aborting due to 7 previous errors - diff --git a/tests/ui/if_let_redundant_pattern_matching.rs b/tests/ui/if_let_redundant_pattern_matching.rs index 6444bd8ef68..0963caa62e2 100644 --- a/tests/ui/if_let_redundant_pattern_matching.rs +++ b/tests/ui/if_let_redundant_pattern_matching.rs @@ -1,6 +1,6 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(clippy)] #![warn(if_let_redundant_pattern_matching)] diff --git a/tests/ui/if_let_redundant_pattern_matching.stderr b/tests/ui/if_let_redundant_pattern_matching.stderr index e7bfd0275d8..b15d17e372e 100644 --- a/tests/ui/if_let_redundant_pattern_matching.stderr +++ b/tests/ui/if_let_redundant_pattern_matching.stderr @@ -24,5 +24,3 @@ error: redundant pattern matching, consider using `is_some()` 17 | if let Some(_) = Some(42) { | -------^^^^^^^----------- help: try this: `if Some(42).is_some()` -error: aborting due to 4 previous errors - diff --git a/tests/ui/if_not_else.rs b/tests/ui/if_not_else.rs index 7b838560ed1..9436af70cb8 100644 --- a/tests/ui/if_not_else.rs +++ b/tests/ui/if_not_else.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(clippy)] #![warn(if_not_else)] diff --git a/tests/ui/if_not_else.stderr b/tests/ui/if_not_else.stderr index b920ef3b625..f9462f422ea 100644 --- a/tests/ui/if_not_else.stderr +++ b/tests/ui/if_not_else.stderr @@ -23,5 +23,3 @@ error: Unnecessary `!=` operation | = help: change to `==` and swap the blocks of the if/else -error: aborting due to 2 previous errors - diff --git a/tests/ui/inconsistent_digit_grouping.rs b/tests/ui/inconsistent_digit_grouping.rs index 06e8996deb7..ed6dc06edb1 100644 --- a/tests/ui/inconsistent_digit_grouping.rs +++ b/tests/ui/inconsistent_digit_grouping.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[warn(inconsistent_digit_grouping)] #[allow(unused_variables)] fn main() { diff --git a/tests/ui/inconsistent_digit_grouping.stderr b/tests/ui/inconsistent_digit_grouping.stderr index 12d9e3cf0fd..2725d5f4ef7 100644 --- a/tests/ui/inconsistent_digit_grouping.stderr +++ b/tests/ui/inconsistent_digit_grouping.stderr @@ -39,5 +39,3 @@ error: digits grouped inconsistently by underscores | = help: consider: 1.234_567_8_f32 -error: aborting due to 5 previous errors - diff --git a/tests/ui/infinite_iter.rs b/tests/ui/infinite_iter.rs index deb5c5edd8c..08596ff2016 100644 --- a/tests/ui/infinite_iter.rs +++ b/tests/ui/infinite_iter.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] +#![feature(iterator_for_each)] + use std::iter::repeat; fn square_is_lower_64(x: &u32) -> bool { x * x < 64 } diff --git a/tests/ui/infinite_iter.stderr b/tests/ui/infinite_iter.stderr index f79db778488..87b7ca49322 100644 --- a/tests/ui/infinite_iter.stderr +++ b/tests/ui/infinite_iter.stderr @@ -96,5 +96,3 @@ error: possible infinite iteration detected 30 | (0..).all(|x| x == 24); // maybe infinite iter | ^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 14 previous errors - diff --git a/tests/ui/int_plus_one.stderr b/tests/ui/int_plus_one.stderr index 6f69ba9d714..92b012bd104 100644 --- a/tests/ui/int_plus_one.stderr +++ b/tests/ui/int_plus_one.stderr @@ -1,3 +1,5 @@ +warning: running cargo clippy on a crate that also imports the clippy plugin + error: Unnecessary `>= y + 1` or `x - 1 >=` --> $DIR/int_plus_one.rs:10:5 | @@ -43,5 +45,3 @@ help: change `>= y + 1` to `> y` as shown 14 | y < x; | ^^^^^ -error: aborting due to 4 previous errors - diff --git a/tests/ui/invalid_ref.stderr b/tests/ui/invalid_ref.stderr index 420fed01744..18064c91a01 100644 --- a/tests/ui/invalid_ref.stderr +++ b/tests/ui/invalid_ref.stderr @@ -1,3 +1,5 @@ +warning: running cargo clippy on a crate that also imports the clippy plugin + error: reference to zeroed memory --> $DIR/invalid_ref.rs:27:24 | @@ -47,5 +49,3 @@ error: reference to uninitialized memory | = help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html -error: aborting due to 6 previous errors - diff --git a/tests/ui/invalid_upcast_comparisons.rs b/tests/ui/invalid_upcast_comparisons.rs index 8d8e7bd8de1..5bf0bfdcb98 100644 --- a/tests/ui/invalid_upcast_comparisons.rs +++ b/tests/ui/invalid_upcast_comparisons.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(invalid_upcast_comparisons)] #![allow(unused, eq_op, no_effect, unnecessary_operation, cast_lossless)] diff --git a/tests/ui/invalid_upcast_comparisons.stderr b/tests/ui/invalid_upcast_comparisons.stderr index eb46802899e..3f11c373074 100644 --- a/tests/ui/invalid_upcast_comparisons.stderr +++ b/tests/ui/invalid_upcast_comparisons.stderr @@ -162,5 +162,3 @@ error: because of the numeric bounds on `u8` prior to casting, this expression i 78 | -5 >= (u8 as i32); | ^^^^^^^^^^^^^^^^^ -error: aborting due to 27 previous errors - diff --git a/tests/ui/is_unit_expr.rs b/tests/ui/is_unit_expr.rs index 164e391ff24..24a2587dc53 100644 --- a/tests/ui/is_unit_expr.rs +++ b/tests/ui/is_unit_expr.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(unit_expr)] #[allow(unused_variables)] diff --git a/tests/ui/is_unit_expr.stderr b/tests/ui/is_unit_expr.stderr index 2d9fcfff74f..5524f866488 100644 --- a/tests/ui/is_unit_expr.stderr +++ b/tests/ui/is_unit_expr.stderr @@ -51,5 +51,3 @@ note: Consider removing the trailing semicolon 42 | x; | ^^ -error: aborting due to 3 previous errors - diff --git a/tests/ui/item_after_statement.rs b/tests/ui/item_after_statement.rs index e3e4a4c7578..710a1adca56 100644 --- a/tests/ui/item_after_statement.rs +++ b/tests/ui/item_after_statement.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(items_after_statements)] fn ok() { diff --git a/tests/ui/item_after_statement.stderr b/tests/ui/item_after_statement.stderr index ec1296caf83..e98e7ee129d 100644 --- a/tests/ui/item_after_statement.stderr +++ b/tests/ui/item_after_statement.stderr @@ -12,5 +12,3 @@ error: adding items after statements is confusing, since items exist from the st 17 | fn foo() { println!("foo"); } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 2 previous errors - diff --git a/tests/ui/large_digit_groups.rs b/tests/ui/large_digit_groups.rs index 65bcdc7435e..5d0fb11dbea 100644 --- a/tests/ui/large_digit_groups.rs +++ b/tests/ui/large_digit_groups.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[warn(large_digit_groups)] #[allow(unused_variables)] fn main() { diff --git a/tests/ui/large_digit_groups.stderr b/tests/ui/large_digit_groups.stderr index 6fc285274a0..db49ded1d8a 100644 --- a/tests/ui/large_digit_groups.stderr +++ b/tests/ui/large_digit_groups.stderr @@ -47,5 +47,3 @@ error: digit groups should be smaller | = help: consider: 123_456.123_456_f32 -error: aborting due to 6 previous errors - diff --git a/tests/ui/large_enum_variant.rs b/tests/ui/large_enum_variant.rs index 31a7760aa19..aaf3e2924b3 100644 --- a/tests/ui/large_enum_variant.rs +++ b/tests/ui/large_enum_variant.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/large_enum_variant.stderr b/tests/ui/large_enum_variant.stderr index bb889087095..899a84edeaa 100644 --- a/tests/ui/large_enum_variant.stderr +++ b/tests/ui/large_enum_variant.stderr @@ -68,5 +68,3 @@ help: consider boxing the large fields to reduce the total size of the enum 49 | StructLikeLarge2 { x: Box<[i32; 8000]> }, | ^^^^^^^^^^^^^^^^ -error: aborting due to 6 previous errors - diff --git a/tests/ui/len_zero.rs b/tests/ui/len_zero.rs index 9c66d5a8148..aba1dd3055a 100644 --- a/tests/ui/len_zero.rs +++ b/tests/ui/len_zero.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(len_without_is_empty, len_zero)] #![allow(dead_code, unused)] diff --git a/tests/ui/len_zero.stderr b/tests/ui/len_zero.stderr index 6e3cf1b3ca1..d23a972dddc 100644 --- a/tests/ui/len_zero.stderr +++ b/tests/ui/len_zero.stderr @@ -94,5 +94,3 @@ error: trait `DependsOnFoo` has a `len` method but no (possibly inherited) `is_e 191 | | } | |_^ -error: aborting due to 12 previous errors - diff --git a/tests/ui/let_if_seq.rs b/tests/ui/let_if_seq.rs index 2d3ab7da996..564a67d2c8e 100644 --- a/tests/ui/let_if_seq.rs +++ b/tests/ui/let_if_seq.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(unused_variables, unused_assignments, similar_names, blacklisted_name)] #![warn(useless_let_if_seq)] diff --git a/tests/ui/let_if_seq.stderr b/tests/ui/let_if_seq.stderr index b912373f95c..39686a9dd07 100644 --- a/tests/ui/let_if_seq.stderr +++ b/tests/ui/let_if_seq.stderr @@ -46,5 +46,3 @@ error: `if _ { .. } else { .. }` is an expression | = note: you might not need `mut` at all -error: aborting due to 4 previous errors - diff --git a/tests/ui/let_return.rs b/tests/ui/let_return.rs index 6aab70dbd8a..1083603b2d6 100644 --- a/tests/ui/let_return.rs +++ b/tests/ui/let_return.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(unused)] #![warn(let_and_return)] diff --git a/tests/ui/let_return.stderr b/tests/ui/let_return.stderr index 459b2eafa26..b38c9ab2e91 100644 --- a/tests/ui/let_return.stderr +++ b/tests/ui/let_return.stderr @@ -23,5 +23,3 @@ note: this expression can be directly returned 15 | let x = 5; | ^ -error: aborting due to 2 previous errors - diff --git a/tests/ui/let_unit.rs b/tests/ui/let_unit.rs index d07cf8ede2f..032dc85f2cd 100644 --- a/tests/ui/let_unit.rs +++ b/tests/ui/let_unit.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(let_unit_value)] #![allow(unused_variables)] diff --git a/tests/ui/let_unit.stderr b/tests/ui/let_unit.stderr index da579ec80f3..196afc0570c 100644 --- a/tests/ui/let_unit.stderr +++ b/tests/ui/let_unit.stderr @@ -12,5 +12,3 @@ error: this let-binding has unit value. Consider omitting `let _a =` 18 | let _a = (); | ^^^^^^^^^^^^ -error: aborting due to 2 previous errors - diff --git a/tests/ui/lifetimes.rs b/tests/ui/lifetimes.rs index 5f3c3604d80..dce9c23da68 100644 --- a/tests/ui/lifetimes.rs +++ b/tests/ui/lifetimes.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(needless_lifetimes, unused_lifetimes)] #![allow(dead_code, needless_pass_by_value)] diff --git a/tests/ui/lifetimes.stderr b/tests/ui/lifetimes.stderr index 23b353d13d2..744e1ce21ec 100644 --- a/tests/ui/lifetimes.stderr +++ b/tests/ui/lifetimes.stderr @@ -86,5 +86,3 @@ error: explicit lifetimes given in parameter types where they could be elided 120 | fn trait_bound_ok<'a, T: WithLifetime<'static>>(_: &'a u8, _: T) { unimplemented!() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 14 previous errors - diff --git a/tests/ui/lint_pass.rs b/tests/ui/lint_pass.rs index 5ecbeb7f11a..1990e137e67 100644 --- a/tests/ui/lint_pass.rs +++ b/tests/ui/lint_pass.rs @@ -1,6 +1,6 @@ -#![feature(plugin)] + #![feature(rustc_private)] -#![plugin(clippy)] + #![warn(lint_without_lint_pass)] diff --git a/tests/ui/lint_pass.stderr b/tests/ui/lint_pass.stderr index 2f9a6813b96..66f2d62ed24 100644 --- a/tests/ui/lint_pass.stderr +++ b/tests/ui/lint_pass.stderr @@ -6,5 +6,3 @@ error: the lint `MISSING_LINT` is not added to any `LintPass` | = note: `-D lint-without-lint-pass` implied by `-D warnings` -error: aborting due to previous error - diff --git a/tests/ui/literals.rs b/tests/ui/literals.rs index e8105a74b5c..c11adc0b090 100644 --- a/tests/ui/literals.rs +++ b/tests/ui/literals.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(mixed_case_hex_literals)] #![warn(unseparated_literal_suffix)] #![warn(zero_prefixed_literal)] diff --git a/tests/ui/literals.stderr b/tests/ui/literals.stderr index 17210b6b275..82c651e6290 100644 --- a/tests/ui/literals.stderr +++ b/tests/ui/literals.stderr @@ -87,5 +87,3 @@ help: if you mean to use an octal constant, use `0o` 30 | let fail8 = 0o123; | ^^^^^ -error: aborting due to 11 previous errors - diff --git a/tests/ui/map_clone.rs b/tests/ui/map_clone.rs index 81e298390f5..f11d21d2dfa 100644 --- a/tests/ui/map_clone.rs +++ b/tests/ui/map_clone.rs @@ -1,6 +1,6 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(map_clone)] #![allow(clone_on_copy, unused)] diff --git a/tests/ui/map_clone.stderr b/tests/ui/map_clone.stderr index c29f3791851..272b868a278 100644 --- a/tests/ui/map_clone.stderr +++ b/tests/ui/map_clone.stderr @@ -98,5 +98,3 @@ error: you seem to be using .map() to clone the contents of an Option, consider = help: try x.as_ref().cloned() -error: aborting due to 11 previous errors - diff --git a/tests/ui/matches.rs b/tests/ui/matches.rs index be1ca72aece..f97038ca1f0 100644 --- a/tests/ui/matches.rs +++ b/tests/ui/matches.rs @@ -1,7 +1,7 @@ -#![feature(plugin)] + #![feature(exclusive_range_pattern)] -#![plugin(clippy)] + #![warn(clippy)] #![allow(unused, if_let_redundant_pattern_matching)] #![warn(single_match_else)] diff --git a/tests/ui/matches.stderr b/tests/ui/matches.stderr index 2f55428cca7..1c2452c46ce 100644 --- a/tests/ui/matches.stderr +++ b/tests/ui/matches.stderr @@ -392,5 +392,3 @@ note: consider refactoring into `Ok(3) | Ok(_)` | ^^^^^^^^^^^^^^ = note: this error originates in a macro outside of the current crate -error: aborting due to 33 previous errors - diff --git a/tests/ui/mem_forget.rs b/tests/ui/mem_forget.rs index 7854a373968..991a402e207 100644 --- a/tests/ui/mem_forget.rs +++ b/tests/ui/mem_forget.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + use std::sync::Arc; diff --git a/tests/ui/mem_forget.stderr b/tests/ui/mem_forget.stderr index 6e7a44694e1..c79afa829fe 100644 --- a/tests/ui/mem_forget.stderr +++ b/tests/ui/mem_forget.stderr @@ -18,5 +18,3 @@ error: usage of mem::forget on Drop type 24 | forgetSomething(eight); | ^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 3 previous errors - diff --git a/tests/ui/methods.rs b/tests/ui/methods.rs index 48132cc662c..08ff4771420 100644 --- a/tests/ui/methods.rs +++ b/tests/ui/methods.rs @@ -1,6 +1,6 @@ -#![feature(plugin)] + #![feature(const_fn)] -#![plugin(clippy)] + #![warn(clippy, clippy_pedantic)] #![allow(blacklisted_name, unused, print_stdout, non_ascii_literal, new_without_default, new_without_default_derive, missing_docs_in_private_items)] diff --git a/tests/ui/methods.stderr b/tests/ui/methods.stderr index 7f3d505a3cd..c5fab711fe1 100644 --- a/tests/ui/methods.stderr +++ b/tests/ui/methods.stderr @@ -836,5 +836,3 @@ error: you should use the `ends_with` method 578 | Some(' ') != "".chars().next_back(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with(' ')` -error: aborting due to 123 previous errors - diff --git a/tests/ui/min_max.rs b/tests/ui/min_max.rs index 9a077eae4d9..1199206e42c 100644 --- a/tests/ui/min_max.rs +++ b/tests/ui/min_max.rs @@ -1,6 +1,6 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(clippy)] use std::cmp::{min, max}; diff --git a/tests/ui/min_max.stderr b/tests/ui/min_max.stderr index de4c4e16fa0..e9225f93b5e 100644 --- a/tests/ui/min_max.stderr +++ b/tests/ui/min_max.stderr @@ -42,5 +42,3 @@ error: this min/max combination leads to constant result 30 | max(min(s, "Apple"), "Zoo"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 7 previous errors - diff --git a/tests/ui/missing-doc.rs b/tests/ui/missing-doc.rs index 596cec886f4..cbd6439d47e 100644 --- a/tests/ui/missing-doc.rs +++ b/tests/ui/missing-doc.rs @@ -11,8 +11,8 @@ * except according to those terms. */ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(missing_docs_in_private_items)] // When denying at the crate level, be sure to not get random warnings from the diff --git a/tests/ui/missing-doc.stderr b/tests/ui/missing-doc.stderr index e25edb64181..55eab4f5d69 100644 --- a/tests/ui/missing-doc.stderr +++ b/tests/ui/missing-doc.stderr @@ -270,5 +270,3 @@ error: missing documentation for a function 202 | fn main() {} | ^^^^^^^^^^^^ -error: aborting due to 40 previous errors - diff --git a/tests/ui/module_inception.rs b/tests/ui/module_inception.rs index e934c64023b..77bd446c569 100644 --- a/tests/ui/module_inception.rs +++ b/tests/ui/module_inception.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(module_inception)] mod foo { diff --git a/tests/ui/module_inception.stderr b/tests/ui/module_inception.stderr index c9d3319db1b..cb6ea951a17 100644 --- a/tests/ui/module_inception.stderr +++ b/tests/ui/module_inception.stderr @@ -16,5 +16,3 @@ error: module has the same name as its containing module 14 | | } | |_____^ -error: aborting due to 2 previous errors - diff --git a/tests/ui/modulo_one.rs b/tests/ui/modulo_one.rs index cda3f190f1e..847ea1d9ab6 100644 --- a/tests/ui/modulo_one.rs +++ b/tests/ui/modulo_one.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(modulo_one)] #![allow(no_effect, unnecessary_operation)] diff --git a/tests/ui/modulo_one.stderr b/tests/ui/modulo_one.stderr index ccfca7154e0..48cfe6c38cc 100644 --- a/tests/ui/modulo_one.stderr +++ b/tests/ui/modulo_one.stderr @@ -6,5 +6,3 @@ error: any number modulo 1 will be 0 | = note: `-D modulo-one` implied by `-D warnings` -error: aborting due to previous error - diff --git a/tests/ui/mut_from_ref.rs b/tests/ui/mut_from_ref.rs index 55498bad759..9e757155260 100644 --- a/tests/ui/mut_from_ref.rs +++ b/tests/ui/mut_from_ref.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(unused)] #![warn(mut_from_ref)] diff --git a/tests/ui/mut_from_ref.stderr b/tests/ui/mut_from_ref.stderr index a7cbc0b7a09..eacda70ce07 100644 --- a/tests/ui/mut_from_ref.stderr +++ b/tests/ui/mut_from_ref.stderr @@ -59,5 +59,3 @@ note: immutable borrow here 32 | fn fail_double<'a, 'b>(x: &'a u32, y: &'a u32, z: &'b mut u32) -> &'a mut u32 { | ^^^^^^^ ^^^^^^^ -error: aborting due to 5 previous errors - diff --git a/tests/ui/mut_mut.rs b/tests/ui/mut_mut.rs index 766276bc417..54176cd6d55 100644 --- a/tests/ui/mut_mut.rs +++ b/tests/ui/mut_mut.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(unused, no_effect, unnecessary_operation)] #![warn(mut_mut)] diff --git a/tests/ui/mut_mut.stderr b/tests/ui/mut_mut.stderr index 7a7bb840ba9..31f9178aa27 100644 --- a/tests/ui/mut_mut.stderr +++ b/tests/ui/mut_mut.stderr @@ -81,5 +81,3 @@ error: generally you want to avoid `&mut &mut _` if possible 35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2; | ^^^^^^^^^^^^^ -error: aborting due to 13 previous errors - diff --git a/tests/ui/mut_range_bound.stderr b/tests/ui/mut_range_bound.stderr index d7be7ae1e6f..f516ec9d95e 100644 --- a/tests/ui/mut_range_bound.stderr +++ b/tests/ui/mut_range_bound.stderr @@ -1,3 +1,5 @@ +warning: running cargo clippy on a crate that also imports the clippy plugin + error: attempt to mutate range bound within loop; note that the range of the loop is unchanged --> $DIR/mut_range_bound.rs:18:21 | @@ -30,5 +32,3 @@ error: attempt to mutate range bound within loop; note that the range of the loo 40 | let n = &mut m; // warning | ^ -error: aborting due to 5 previous errors - diff --git a/tests/ui/mut_reference.rs b/tests/ui/mut_reference.rs index d746fc5e529..ac40bf2a186 100644 --- a/tests/ui/mut_reference.rs +++ b/tests/ui/mut_reference.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(unused_variables)] diff --git a/tests/ui/mut_reference.stderr b/tests/ui/mut_reference.stderr index 73df19bf158..6708bca8b2e 100644 --- a/tests/ui/mut_reference.stderr +++ b/tests/ui/mut_reference.stderr @@ -18,5 +18,3 @@ error: The function/method `takes_an_immutable_reference` doesn't need a mutable 28 | my_struct.takes_an_immutable_reference(&mut 42); | ^^^^^^^ -error: aborting due to 3 previous errors - diff --git a/tests/ui/mutex_atomic.rs b/tests/ui/mutex_atomic.rs index b84ece497eb..96502738456 100644 --- a/tests/ui/mutex_atomic.rs +++ b/tests/ui/mutex_atomic.rs @@ -1,6 +1,6 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(clippy)] #![warn(mutex_integer)] diff --git a/tests/ui/mutex_atomic.stderr b/tests/ui/mutex_atomic.stderr index 354f9891c17..d46c713164a 100644 --- a/tests/ui/mutex_atomic.stderr +++ b/tests/ui/mutex_atomic.stderr @@ -44,5 +44,3 @@ error: Consider using an AtomicIsize instead of a Mutex here. If you just want t 16 | Mutex::new(0i32); | ^^^^^^^^^^^^^^^^ -error: aborting due to 7 previous errors - diff --git a/tests/ui/needless_bool.rs b/tests/ui/needless_bool.rs index bd44332a170..1213539c827 100644 --- a/tests/ui/needless_bool.rs +++ b/tests/ui/needless_bool.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(needless_bool)] #[allow(if_same_then_else)] diff --git a/tests/ui/needless_bool.stderr b/tests/ui/needless_bool.stderr index 63e0632445f..a25b34bfaaf 100644 --- a/tests/ui/needless_bool.stderr +++ b/tests/ui/needless_bool.stderr @@ -66,5 +66,3 @@ error: this if-then-else expression returns a bool literal 50 | if x && y { return false } else { return true }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `return !(x && y)` -error: aborting due to 11 previous errors - diff --git a/tests/ui/needless_borrow.rs b/tests/ui/needless_borrow.rs index 23d935e7df8..78c1a125c94 100644 --- a/tests/ui/needless_borrow.rs +++ b/tests/ui/needless_borrow.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + fn x(y: &i32) -> i32 { *y diff --git a/tests/ui/needless_borrow.stderr b/tests/ui/needless_borrow.stderr index fde38508b32..16962bb48f1 100644 --- a/tests/ui/needless_borrow.stderr +++ b/tests/ui/needless_borrow.stderr @@ -38,5 +38,3 @@ error: this pattern creates a reference to a reference 50 | let _ = v.iter().filter(|&ref a| a.is_empty()); | ^^^^^ help: change this to: `a` -error: aborting due to 6 previous errors - diff --git a/tests/ui/needless_borrowed_ref.rs b/tests/ui/needless_borrowed_ref.rs index 4e9986561bc..75ffa211180 100644 --- a/tests/ui/needless_borrowed_ref.rs +++ b/tests/ui/needless_borrowed_ref.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[warn(needless_borrowed_reference)] #[allow(unused_variables)] diff --git a/tests/ui/needless_borrowed_ref.stderr b/tests/ui/needless_borrowed_ref.stderr index 2a8cf4348d3..c85bf9f5a7c 100644 --- a/tests/ui/needless_borrowed_ref.stderr +++ b/tests/ui/needless_borrowed_ref.stderr @@ -24,5 +24,3 @@ error: this pattern takes a reference on something that is being de-referenced 42 | (&Animal::Cat(v), &ref k) | (&ref k, &Animal::Cat(v)) => (), // lifetime mismatch error if there is no '&ref' | ^^^^^^ help: try removing the `&ref` part and just keep: `k` -error: aborting due to 4 previous errors - diff --git a/tests/ui/needless_continue.rs b/tests/ui/needless_continue.rs index 6710867077d..3574b0fb3fd 100644 --- a/tests/ui/needless_continue.rs +++ b/tests/ui/needless_continue.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + macro_rules! zero { ($x:expr) => ($x == 0); diff --git a/tests/ui/needless_continue.stderr b/tests/ui/needless_continue.stderr index 3e0368892a4..f63f120fcc7 100644 --- a/tests/ui/needless_continue.stderr +++ b/tests/ui/needless_continue.stderr @@ -55,5 +55,3 @@ error: There is no need for an explicit `else` block for this `if` expression println!("Jabber"); ... -error: aborting due to 2 previous errors - diff --git a/tests/ui/needless_pass_by_value.rs b/tests/ui/needless_pass_by_value.rs index ea97e875ff7..6218bfb0920 100644 --- a/tests/ui/needless_pass_by_value.rs +++ b/tests/ui/needless_pass_by_value.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(needless_pass_by_value)] #![allow(dead_code, single_match, if_let_redundant_pattern_matching, many_single_char_names)] diff --git a/tests/ui/needless_pass_by_value.stderr b/tests/ui/needless_pass_by_value.stderr index 02293c9cb3c..c081574127a 100644 --- a/tests/ui/needless_pass_by_value.stderr +++ b/tests/ui/needless_pass_by_value.stderr @@ -56,5 +56,3 @@ help: consider taking a reference instead 56 | let Wrapper(_) = *y; // still not moved | -error: aborting due to 7 previous errors - diff --git a/tests/ui/needless_pass_by_value_proc_macro.rs b/tests/ui/needless_pass_by_value_proc_macro.rs index 0d5bc4172d8..652e11fee9d 100644 --- a/tests/ui/needless_pass_by_value_proc_macro.rs +++ b/tests/ui/needless_pass_by_value_proc_macro.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![crate_type = "proc-macro"] #![warn(needless_pass_by_value)] diff --git a/tests/ui/needless_return.rs b/tests/ui/needless_return.rs index 403e5b8342e..4739ded7b7e 100644 --- a/tests/ui/needless_return.rs +++ b/tests/ui/needless_return.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(needless_return)] diff --git a/tests/ui/needless_return.stderr b/tests/ui/needless_return.stderr index 42dc6e6594c..68c2654c863 100644 --- a/tests/ui/needless_return.stderr +++ b/tests/ui/needless_return.stderr @@ -48,5 +48,3 @@ error: unneeded return statement 39 | let _ = || return true; | ^^^^^^^^^^^ help: remove `return` as shown: `true` -error: aborting due to 8 previous errors - diff --git a/tests/ui/needless_update.rs b/tests/ui/needless_update.rs index 99876121ae7..35d5730dda1 100644 --- a/tests/ui/needless_update.rs +++ b/tests/ui/needless_update.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(needless_update)] #![allow(no_effect)] diff --git a/tests/ui/needless_update.stderr b/tests/ui/needless_update.stderr index 3e509870d00..978fd8e625b 100644 --- a/tests/ui/needless_update.stderr +++ b/tests/ui/needless_update.stderr @@ -6,5 +6,3 @@ error: struct update has no effect, all the fields in the struct have already be | = note: `-D needless-update` implied by `-D warnings` -error: aborting due to previous error - diff --git a/tests/ui/neg_multiply.rs b/tests/ui/neg_multiply.rs index 75dc7c381fd..367d2d5edfb 100644 --- a/tests/ui/neg_multiply.rs +++ b/tests/ui/neg_multiply.rs @@ -1,6 +1,6 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(neg_multiply)] #![allow(no_effect, unnecessary_operation)] diff --git a/tests/ui/neg_multiply.stderr b/tests/ui/neg_multiply.stderr index 1d52ba16eae..6ed31d384a0 100644 --- a/tests/ui/neg_multiply.stderr +++ b/tests/ui/neg_multiply.stderr @@ -12,5 +12,3 @@ error: Negation by multiplying with -1 32 | -1 * x; | ^^^^^^ -error: aborting due to 2 previous errors - diff --git a/tests/ui/never_loop.rs b/tests/ui/never_loop.rs index ff0126704b5..4866db1a541 100644 --- a/tests/ui/never_loop.rs +++ b/tests/ui/never_loop.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(single_match, unused_assignments, unused_variables)] fn test1() { diff --git a/tests/ui/never_loop.stderr b/tests/ui/never_loop.stderr index dace2b7e261..1ecdb5030f9 100644 --- a/tests/ui/never_loop.stderr +++ b/tests/ui/never_loop.stderr @@ -68,5 +68,3 @@ error: this loop never actually loops 103 | | } | |_____^ -error: aborting due to 7 previous errors - diff --git a/tests/ui/new_without_default.rs b/tests/ui/new_without_default.rs index a10db135c5e..9fd0fea137c 100644 --- a/tests/ui/new_without_default.rs +++ b/tests/ui/new_without_default.rs @@ -1,5 +1,5 @@ #![feature(plugin, const_fn)] -#![plugin(clippy)] + #![allow(dead_code)] #![warn(new_without_default, new_without_default_derive)] diff --git a/tests/ui/new_without_default.stderr b/tests/ui/new_without_default.stderr index 91e437a6eb5..0ced183b1e0 100644 --- a/tests/ui/new_without_default.stderr +++ b/tests/ui/new_without_default.stderr @@ -38,5 +38,3 @@ help: try this 69 | ... -error: aborting due to 3 previous errors - diff --git a/tests/ui/no_effect.rs b/tests/ui/no_effect.rs index 5c3a1a041c2..ba7826d653e 100644 --- a/tests/ui/no_effect.rs +++ b/tests/ui/no_effect.rs @@ -1,5 +1,5 @@ #![feature(plugin, box_syntax, inclusive_range_syntax)] -#![plugin(clippy)] + #![warn(no_effect, unnecessary_operation)] #![allow(dead_code)] diff --git a/tests/ui/no_effect.stderr b/tests/ui/no_effect.stderr index b6db8e7498e..43e7fbb3609 100644 --- a/tests/ui/no_effect.stderr +++ b/tests/ui/no_effect.stderr @@ -266,5 +266,3 @@ error: statement can be reduced 83 | {get_number()}; | ^^^^^^^^^^^^^^^ help: replace it with: `get_number();` -error: aborting due to 44 previous errors - diff --git a/tests/ui/non_expressive_names.rs b/tests/ui/non_expressive_names.rs index f32dad2080f..9eb3e5a82a7 100644 --- a/tests/ui/non_expressive_names.rs +++ b/tests/ui/non_expressive_names.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(clippy,similar_names)] #![allow(unused)] diff --git a/tests/ui/non_expressive_names.stderr b/tests/ui/non_expressive_names.stderr index 780d7d8aec9..014d4599271 100644 --- a/tests/ui/non_expressive_names.stderr +++ b/tests/ui/non_expressive_names.stderr @@ -129,5 +129,3 @@ error: 5th binding whose name is just one char 129 | e => panic!(), | ^ -error: aborting due to 11 previous errors - diff --git a/tests/ui/ok_if_let.rs b/tests/ui/ok_if_let.rs index dda38fec287..fdc01bcc7bc 100644 --- a/tests/ui/ok_if_let.rs +++ b/tests/ui/ok_if_let.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(if_let_some_result)] diff --git a/tests/ui/ok_if_let.stderr b/tests/ui/ok_if_let.stderr index e1371d924eb..b696672d2fd 100644 --- a/tests/ui/ok_if_let.stderr +++ b/tests/ui/ok_if_let.stderr @@ -11,5 +11,3 @@ error: Matching on `Some` with `ok()` is redundant = note: `-D if-let-some-result` implied by `-D warnings` = help: Consider matching on `Ok(y)` and removing the call to `ok` instead -error: aborting due to previous error - diff --git a/tests/ui/op_ref.rs b/tests/ui/op_ref.rs index 315e6535ef6..9eb697571b6 100644 --- a/tests/ui/op_ref.rs +++ b/tests/ui/op_ref.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(unused_variables, blacklisted_name)] @@ -21,4 +21,4 @@ fn main() { if b < &a { println!("OK"); } -} \ No newline at end of file +} diff --git a/tests/ui/op_ref.stderr b/tests/ui/op_ref.stderr index 715c7378e0c..dbe53933fd5 100644 --- a/tests/ui/op_ref.stderr +++ b/tests/ui/op_ref.stderr @@ -10,5 +10,3 @@ help: use the values directly 13 | let foo = 5 - 6; | ^ -error: aborting due to previous error - diff --git a/tests/ui/open_options.rs b/tests/ui/open_options.rs index c409aa564f8..514808d41f1 100644 --- a/tests/ui/open_options.rs +++ b/tests/ui/open_options.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + use std::fs::OpenOptions; #[allow(unused_must_use)] diff --git a/tests/ui/open_options.stderr b/tests/ui/open_options.stderr index f0d41904152..2f4070c2868 100644 --- a/tests/ui/open_options.stderr +++ b/tests/ui/open_options.stderr @@ -42,5 +42,3 @@ error: the method "truncate" is called more than once 15 | OpenOptions::new().truncate(true).truncate(false).open("foo.txt"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 7 previous errors - diff --git a/tests/ui/overflow_check_conditional.rs b/tests/ui/overflow_check_conditional.rs index a669f741f29..889c339c8fd 100644 --- a/tests/ui/overflow_check_conditional.rs +++ b/tests/ui/overflow_check_conditional.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(many_single_char_names)] #![warn(overflow_check_conditional)] diff --git a/tests/ui/overflow_check_conditional.stderr b/tests/ui/overflow_check_conditional.stderr index 8a80dbedaeb..9f23e96c065 100644 --- a/tests/ui/overflow_check_conditional.stderr +++ b/tests/ui/overflow_check_conditional.stderr @@ -48,5 +48,3 @@ error: You are trying to use classic C underflow conditions that will fail in Ru 32 | if a < a - b { | ^^^^^^^^^ -error: aborting due to 8 previous errors - diff --git a/tests/ui/panic.rs b/tests/ui/panic.rs index 03d3c3dc2d9..f621a5f636d 100644 --- a/tests/ui/panic.rs +++ b/tests/ui/panic.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(panic_params)] diff --git a/tests/ui/panic.stderr b/tests/ui/panic.stderr index 25113ed80b6..f2480dfea6e 100644 --- a/tests/ui/panic.stderr +++ b/tests/ui/panic.stderr @@ -18,5 +18,3 @@ error: you probably are missing some parameter in your format string 12 | assert!(true, "here be missing values: {}"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 3 previous errors - diff --git a/tests/ui/partialeq_ne_impl.rs b/tests/ui/partialeq_ne_impl.rs index 41772700109..36dd4df8a6e 100644 --- a/tests/ui/partialeq_ne_impl.rs +++ b/tests/ui/partialeq_ne_impl.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(dead_code)] diff --git a/tests/ui/partialeq_ne_impl.stderr b/tests/ui/partialeq_ne_impl.stderr index 5e536cc51d2..c332ce53c1a 100644 --- a/tests/ui/partialeq_ne_impl.stderr +++ b/tests/ui/partialeq_ne_impl.stderr @@ -6,5 +6,3 @@ error: re-implementing `PartialEq::ne` is unnecessary | = note: `-D partialeq-ne-impl` implied by `-D warnings` -error: aborting due to previous error - diff --git a/tests/ui/patterns.rs b/tests/ui/patterns.rs index 793b2b111d6..65e319e2f88 100644 --- a/tests/ui/patterns.rs +++ b/tests/ui/patterns.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(unused)] #![warn(clippy)] diff --git a/tests/ui/patterns.stderr b/tests/ui/patterns.stderr index 59bce3a9a8f..9a246c483b2 100644 --- a/tests/ui/patterns.stderr +++ b/tests/ui/patterns.stderr @@ -6,5 +6,3 @@ error: the `y @ _` pattern can be written as just `y` | = note: `-D redundant-pattern` implied by `-D warnings` -error: aborting due to previous error - diff --git a/tests/ui/precedence.rs b/tests/ui/precedence.rs index c6865632cf7..720637c94b5 100644 --- a/tests/ui/precedence.rs +++ b/tests/ui/precedence.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[warn(precedence)] #[allow(identity_op)] diff --git a/tests/ui/precedence.stderr b/tests/ui/precedence.stderr index 9f0e53ffca2..26fbd75164d 100644 --- a/tests/ui/precedence.stderr +++ b/tests/ui/precedence.stderr @@ -54,5 +54,3 @@ error: unary minus has lower precedence than method call 16 | -1f32.abs(); | ^^^^^^^^^^^ help: consider adding parentheses to clarify your intent: `-(1f32.abs())` -error: aborting due to 9 previous errors - diff --git a/tests/ui/print.rs b/tests/ui/print.rs index f1fb3cba8c1..91304d961a7 100644 --- a/tests/ui/print.rs +++ b/tests/ui/print.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(print_stdout, use_debug)] use std::fmt::{Debug, Display, Formatter, Result}; diff --git a/tests/ui/print.stderr b/tests/ui/print.stderr index 789e1218b78..fa547949bdb 100644 --- a/tests/ui/print.stderr +++ b/tests/ui/print.stderr @@ -50,5 +50,3 @@ error: use of `Debug`-based formatting 31 | print!("Hello {:#?}", "#orld"); | ^^^^^^^ -error: aborting due to 8 previous errors - diff --git a/tests/ui/print_with_newline.rs b/tests/ui/print_with_newline.rs index d852e375ded..5cc50dea810 100644 --- a/tests/ui/print_with_newline.rs +++ b/tests/ui/print_with_newline.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(print_with_newline)] fn main() { diff --git a/tests/ui/print_with_newline.stderr b/tests/ui/print_with_newline.stderr index 1bacc40bfb4..2ade3ae4ef5 100644 --- a/tests/ui/print_with_newline.stderr +++ b/tests/ui/print_with_newline.stderr @@ -24,5 +24,3 @@ error: using `print!()` with a format string that ends in a newline, consider us 9 | print!("{}/n", 1265); | ^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 4 previous errors - diff --git a/tests/ui/ptr_arg.rs b/tests/ui/ptr_arg.rs index 127ae703702..14b26e16847 100644 --- a/tests/ui/ptr_arg.rs +++ b/tests/ui/ptr_arg.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(unused, many_single_char_names)] #![warn(ptr_arg)] diff --git a/tests/ui/ptr_arg.stderr b/tests/ui/ptr_arg.stderr index e9ada9f8aaa..13be68d4cd4 100644 --- a/tests/ui/ptr_arg.stderr +++ b/tests/ui/ptr_arg.stderr @@ -79,5 +79,3 @@ help: change `y.as_str()` to 62 | let c = y; | ^ -error: aborting due to 6 previous errors - diff --git a/tests/ui/range.rs b/tests/ui/range.rs index bb1a04cfcf3..71f2f2b219b 100644 --- a/tests/ui/range.rs +++ b/tests/ui/range.rs @@ -1,7 +1,7 @@ #![feature(iterator_step_by)] #![feature(inclusive_range_syntax)] -#![feature(plugin)] -#![plugin(clippy)] + + struct NotARange; impl NotARange { diff --git a/tests/ui/range.stderr b/tests/ui/range.stderr index fc51f1a07f0..4098d32d08e 100644 --- a/tests/ui/range.stderr +++ b/tests/ui/range.stderr @@ -38,5 +38,3 @@ error: Iterator::step_by(0) will panic at runtime 33 | let _ = v1.iter().step_by(2/3); | ^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 6 previous errors - diff --git a/tests/ui/redundant_closure_call.rs b/tests/ui/redundant_closure_call.rs index 2c079273b7b..ab3897bc315 100644 --- a/tests/ui/redundant_closure_call.rs +++ b/tests/ui/redundant_closure_call.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(redundant_closure_call)] diff --git a/tests/ui/redundant_closure_call.stderr b/tests/ui/redundant_closure_call.stderr index e2865edc870..d8ec72fda92 100644 --- a/tests/ui/redundant_closure_call.stderr +++ b/tests/ui/redundant_closure_call.stderr @@ -30,5 +30,3 @@ error: Try not to call a closure in the expression where it is declared. 12 | k = (|a,b| a*b)(1,5); | ^^^^^^^^^^^^^^^^ -error: aborting due to 5 previous errors - diff --git a/tests/ui/reference.rs b/tests/ui/reference.rs index 9451e19e336..0bd000082e8 100644 --- a/tests/ui/reference.rs +++ b/tests/ui/reference.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + fn get_number() -> usize { 10 diff --git a/tests/ui/reference.stderr b/tests/ui/reference.stderr index 741c0cc1038..2e6b23f6dc0 100644 --- a/tests/ui/reference.stderr +++ b/tests/ui/reference.stderr @@ -66,5 +66,3 @@ error: immediately dereferencing a reference 53 | let y = **&mut &mut x; | ^^^^^^^^^^^^ help: try this: `&mut x` -error: aborting due to 11 previous errors - diff --git a/tests/ui/regex.rs b/tests/ui/regex.rs index 56539c5468f..3dd1f64202c 100644 --- a/tests/ui/regex.rs +++ b/tests/ui/regex.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(unused)] #![warn(invalid_regex, trivial_regex, regex_macro)] diff --git a/tests/ui/regex.stderr b/tests/ui/regex.stderr index 1c3a47b82be..1c244c1df12 100644 --- a/tests/ui/regex.stderr +++ b/tests/ui/regex.stderr @@ -149,5 +149,3 @@ error: trivial regex | = help: consider using consider using `str::is_empty` -error: aborting due to 21 previous errors - diff --git a/tests/ui/serde.rs b/tests/ui/serde.rs index 61c691c01c1..792ebc9b0ea 100644 --- a/tests/ui/serde.rs +++ b/tests/ui/serde.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(serde_api_misuse)] #![allow(dead_code)] diff --git a/tests/ui/serde.stderr b/tests/ui/serde.stderr index 58667e0f820..da0a96b2a3d 100644 --- a/tests/ui/serde.stderr +++ b/tests/ui/serde.stderr @@ -10,5 +10,3 @@ error: you should not implement `visit_string` without also implementing `visit_ | = note: `-D serde-api-misuse` implied by `-D warnings` -error: aborting due to previous error - diff --git a/tests/ui/shadow.rs b/tests/ui/shadow.rs index e1f2ffacf49..fbe695a7657 100644 --- a/tests/ui/shadow.rs +++ b/tests/ui/shadow.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(clippy, clippy_pedantic)] #![allow(unused_parens, unused_variables, missing_docs_in_private_items)] diff --git a/tests/ui/shadow.stderr b/tests/ui/shadow.stderr index 3fc2b7234f7..50f41627acb 100644 --- a/tests/ui/shadow.stderr +++ b/tests/ui/shadow.stderr @@ -134,5 +134,3 @@ note: previous binding is here 21 | let x = y; | ^ -error: aborting due to 9 previous errors - diff --git a/tests/ui/short_circuit_statement.rs b/tests/ui/short_circuit_statement.rs index e783c6e5e69..0f5773623be 100644 --- a/tests/ui/short_circuit_statement.rs +++ b/tests/ui/short_circuit_statement.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(short_circuit_statement)] diff --git a/tests/ui/short_circuit_statement.stderr b/tests/ui/short_circuit_statement.stderr index 7697cbd1c64..d7a02d7b9c3 100644 --- a/tests/ui/short_circuit_statement.stderr +++ b/tests/ui/short_circuit_statement.stderr @@ -18,5 +18,3 @@ error: boolean short circuit operator in statement may be clearer using an expli 9 | 1 == 2 || g(); | ^^^^^^^^^^^^^^ help: replace it with: `if !(1 == 2) { g(); }` -error: aborting due to 3 previous errors - diff --git a/tests/ui/should_assert_eq.rs b/tests/ui/should_assert_eq.rs index ac5fca8dd0b..5814e997753 100644 --- a/tests/ui/should_assert_eq.rs +++ b/tests/ui/should_assert_eq.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(needless_pass_by_value)] #![warn(should_assert_eq)] diff --git a/tests/ui/should_assert_eq.stderr b/tests/ui/should_assert_eq.stderr index 57abf800498..5b393e1dbe8 100644 --- a/tests/ui/should_assert_eq.stderr +++ b/tests/ui/should_assert_eq.stderr @@ -55,5 +55,3 @@ error: use `assert_ne` for better reporting | = note: this error originates in a macro outside of the current crate -error: aborting due to 7 previous errors - diff --git a/tests/ui/strings.rs b/tests/ui/strings.rs index 1cb5619dd1d..66d24a3c070 100644 --- a/tests/ui/strings.rs +++ b/tests/ui/strings.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[warn(string_add)] #[allow(string_add_assign)] diff --git a/tests/ui/strings.stderr b/tests/ui/strings.stderr index d098ce9df5e..a8fd59e12b2 100644 --- a/tests/ui/strings.stderr +++ b/tests/ui/strings.stderr @@ -72,5 +72,3 @@ error: manual implementation of an assign operation 65 | ; x = x + 1; | ^^^^^^^^^ help: replace it with: `x += 1` -error: aborting due to 11 previous errors - diff --git a/tests/ui/stutter.rs b/tests/ui/stutter.rs index 3fd410c08af..24612fd3b3e 100644 --- a/tests/ui/stutter.rs +++ b/tests/ui/stutter.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(stutter)] #![allow(dead_code)] diff --git a/tests/ui/stutter.stderr b/tests/ui/stutter.stderr index b68f561b483..38cbcaa32f5 100644 --- a/tests/ui/stutter.stderr +++ b/tests/ui/stutter.stderr @@ -24,5 +24,3 @@ error: item name ends with its containing module's name 11 | pub enum CakeFoo {} | ^^^^^^^^^^^^^^^^^^^ -error: aborting due to 4 previous errors - diff --git a/tests/ui/swap.rs b/tests/ui/swap.rs index abcafac4b9d..d1d12641c46 100644 --- a/tests/ui/swap.rs +++ b/tests/ui/swap.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(clippy)] #![allow(blacklisted_name, unused_assignments)] diff --git a/tests/ui/swap.stderr b/tests/ui/swap.stderr index a01ec375e63..0bda9bc8d2b 100644 --- a/tests/ui/swap.stderr +++ b/tests/ui/swap.stderr @@ -65,5 +65,3 @@ error: this looks like you are trying to swap `c.0` and `a` | = note: or maybe you should use `std::mem::replace`? -error: aborting due to 7 previous errors - diff --git a/tests/ui/temporary_assignment.rs b/tests/ui/temporary_assignment.rs index 4a12d38285c..8f25aad72bb 100644 --- a/tests/ui/temporary_assignment.rs +++ b/tests/ui/temporary_assignment.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(temporary_assignment)] diff --git a/tests/ui/temporary_assignment.stderr b/tests/ui/temporary_assignment.stderr index 979720c914d..73a4818ba16 100644 --- a/tests/ui/temporary_assignment.stderr +++ b/tests/ui/temporary_assignment.stderr @@ -12,5 +12,3 @@ error: assignment to temporary 30 | (0, 0).0 = 1; | ^^^^^^^^^^^^ -error: aborting due to 2 previous errors - diff --git a/tests/ui/toplevel_ref_arg.rs b/tests/ui/toplevel_ref_arg.rs index 7be52580c6f..a0d6dd2dabd 100644 --- a/tests/ui/toplevel_ref_arg.rs +++ b/tests/ui/toplevel_ref_arg.rs @@ -1,6 +1,6 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(clippy)] #![allow(unused)] diff --git a/tests/ui/toplevel_ref_arg.stderr b/tests/ui/toplevel_ref_arg.stderr index f360e85329f..525b181bf91 100644 --- a/tests/ui/toplevel_ref_arg.stderr +++ b/tests/ui/toplevel_ref_arg.stderr @@ -30,5 +30,3 @@ error: `ref` on an entire `let` pattern is discouraged, take a reference with `& 24 | let ref mut z = 1 + 2; | ----^^^^^^^^^--------- help: try: `let z = &mut (1 + 2);` -error: aborting due to 5 previous errors - diff --git a/tests/ui/trailing_zeros.rs b/tests/ui/trailing_zeros.rs index 9fc71506ffe..6a7b6b05e70 100644 --- a/tests/ui/trailing_zeros.rs +++ b/tests/ui/trailing_zeros.rs @@ -1,5 +1,5 @@ #![feature(plugin, custom_attribute, stmt_expr_attributes)] -#![plugin(clippy)] + #![allow(unused_parens)] fn main() { diff --git a/tests/ui/trailing_zeros.stderr b/tests/ui/trailing_zeros.stderr index 91e4d59da98..0a4b5361d86 100644 --- a/tests/ui/trailing_zeros.stderr +++ b/tests/ui/trailing_zeros.stderr @@ -12,5 +12,3 @@ error: bit mask could be simplified with a call to `trailing_zeros` 8 | let _ = x & 0b1_1111 == 0; // suggest trailing_zeros | ^^^^^^^^^^^^^^^^^ help: try: `x.trailing_zeros() >= 5` -error: aborting due to 2 previous errors - diff --git a/tests/ui/transmute.rs b/tests/ui/transmute.rs index a83e5194736..31cd8304eba 100644 --- a/tests/ui/transmute.rs +++ b/tests/ui/transmute.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(dead_code)] diff --git a/tests/ui/transmute.stderr b/tests/ui/transmute.stderr index a571fed24f0..0c5aff11b0c 100644 --- a/tests/ui/transmute.stderr +++ b/tests/ui/transmute.stderr @@ -154,5 +154,3 @@ error: transmute from a type (`Usize`) to a pointer to that type (`*mut Usize`) 117 | let _: *mut Usize = core::intrinsics::transmute(my_int()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 25 previous errors - diff --git a/tests/ui/transmute_32bit.rs b/tests/ui/transmute_32bit.rs index 4f9555297ff..08866c63ec6 100644 --- a/tests/ui/transmute_32bit.rs +++ b/tests/ui/transmute_32bit.rs @@ -1,6 +1,6 @@ //ignore-x86_64 -#![feature(plugin)] -#![plugin(clippy)] + + #[warn(wrong_transmute)] fn main() { diff --git a/tests/ui/transmute_64bit.rs b/tests/ui/transmute_64bit.rs index 9be1e37b13e..65240c80a48 100644 --- a/tests/ui/transmute_64bit.rs +++ b/tests/ui/transmute_64bit.rs @@ -1,7 +1,7 @@ //ignore-x86 //no-ignore-x86_64 -#![feature(plugin)] -#![plugin(clippy)] + + #[warn(wrong_transmute)] fn main() { diff --git a/tests/ui/transmute_64bit.stderr b/tests/ui/transmute_64bit.stderr index 3a6a6e73f57..b679b913877 100644 --- a/tests/ui/transmute_64bit.stderr +++ b/tests/ui/transmute_64bit.stderr @@ -12,5 +12,3 @@ error: transmute from a `f64` to a pointer 11 | let _: *mut usize = std::mem::transmute(6.0f64); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 2 previous errors - diff --git a/tests/ui/unicode.rs b/tests/ui/unicode.rs index 55dd0862700..5bb0e7edfed 100644 --- a/tests/ui/unicode.rs +++ b/tests/ui/unicode.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[warn(zero_width_space)] fn zero() { diff --git a/tests/ui/unicode.stderr b/tests/ui/unicode.stderr index 8a173daec9d..73599235ea8 100644 --- a/tests/ui/unicode.stderr +++ b/tests/ui/unicode.stderr @@ -28,5 +28,3 @@ error: literal non-ASCII character detected = help: Consider replacing the string with: ""/u{dc}ben!"" -error: aborting due to 3 previous errors - diff --git a/tests/ui/unit_cmp.rs b/tests/ui/unit_cmp.rs index ff57d2822cb..2b6d757845f 100644 --- a/tests/ui/unit_cmp.rs +++ b/tests/ui/unit_cmp.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(unit_cmp)] #![allow(no_effect, unnecessary_operation)] diff --git a/tests/ui/unit_cmp.stderr b/tests/ui/unit_cmp.stderr index 51ad3fca947..a85e4150a3e 100644 --- a/tests/ui/unit_cmp.stderr +++ b/tests/ui/unit_cmp.stderr @@ -12,5 +12,3 @@ error: >-comparison of unit values detected. This will always be false 19 | if { true; } > { false; } { | ^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 2 previous errors - diff --git a/tests/ui/unneeded_field_pattern.rs b/tests/ui/unneeded_field_pattern.rs index c2f5b11e24c..8c960602264 100644 --- a/tests/ui/unneeded_field_pattern.rs +++ b/tests/ui/unneeded_field_pattern.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(unneeded_field_pattern)] #[allow(dead_code, unused)] diff --git a/tests/ui/unneeded_field_pattern.stderr b/tests/ui/unneeded_field_pattern.stderr index 7e4c3a6cb9c..ef1a8d75732 100644 --- a/tests/ui/unneeded_field_pattern.stderr +++ b/tests/ui/unneeded_field_pattern.stderr @@ -15,5 +15,3 @@ error: All the struct fields are matched to a wildcard pattern, consider using ` | = help: Try with `Foo { .. }` instead -error: aborting due to 2 previous errors - diff --git a/tests/ui/unreadable_literal.rs b/tests/ui/unreadable_literal.rs index 45daf70b171..327fea254a8 100644 --- a/tests/ui/unreadable_literal.rs +++ b/tests/ui/unreadable_literal.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[warn(unreadable_literal)] #[allow(unused_variables)] fn main() { diff --git a/tests/ui/unreadable_literal.stderr b/tests/ui/unreadable_literal.stderr index 72cb160fafc..81b69937a6d 100644 --- a/tests/ui/unreadable_literal.stderr +++ b/tests/ui/unreadable_literal.stderr @@ -31,5 +31,3 @@ error: long literal lacking separators | = help: consider: 1.234_56_f32 -error: aborting due to 4 previous errors - diff --git a/tests/ui/unsafe_removed_from_name.rs b/tests/ui/unsafe_removed_from_name.rs index 8e90964da8c..29f34d31a8e 100644 --- a/tests/ui/unsafe_removed_from_name.rs +++ b/tests/ui/unsafe_removed_from_name.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(unused_imports)] #![allow(dead_code)] #![warn(unsafe_removed_from_name)] diff --git a/tests/ui/unsafe_removed_from_name.stderr b/tests/ui/unsafe_removed_from_name.stderr index 93f2ddd533f..7d455d31bce 100644 --- a/tests/ui/unsafe_removed_from_name.stderr +++ b/tests/ui/unsafe_removed_from_name.stderr @@ -18,5 +18,3 @@ error: removed "unsafe" from the name of `Unsafe` in use as `LieAboutModSafety` 23 | use mod_with_some_unsafe_things::Unsafe as LieAboutModSafety; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 3 previous errors - diff --git a/tests/ui/unused_io_amount.rs b/tests/ui/unused_io_amount.rs index 9beec63a6f0..ea72c1b1b70 100644 --- a/tests/ui/unused_io_amount.rs +++ b/tests/ui/unused_io_amount.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(dead_code)] #![warn(unused_io_amount)] diff --git a/tests/ui/unused_io_amount.stderr b/tests/ui/unused_io_amount.stderr index 0ce6887f5f2..8739ac245a7 100644 --- a/tests/ui/unused_io_amount.stderr +++ b/tests/ui/unused_io_amount.stderr @@ -39,5 +39,3 @@ error: handle read amount returned or use `Read::read_exact` instead 27 | s.read(&mut buf).unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 6 previous errors - diff --git a/tests/ui/unused_labels.rs b/tests/ui/unused_labels.rs index 6d1e8c2a31c..115121dc275 100644 --- a/tests/ui/unused_labels.rs +++ b/tests/ui/unused_labels.rs @@ -1,5 +1,5 @@ -#![plugin(clippy)] -#![feature(plugin)] + + #![allow(dead_code, items_after_statements, never_loop)] #![warn(unused_label)] diff --git a/tests/ui/unused_labels.stderr b/tests/ui/unused_labels.stderr index 19c91e2a6a3..338eb2f1551 100644 --- a/tests/ui/unused_labels.stderr +++ b/tests/ui/unused_labels.stderr @@ -22,5 +22,3 @@ error: unused label `'same_label_in_two_fns` 34 | | } | |_____^ -error: aborting due to 3 previous errors - diff --git a/tests/ui/unused_lt.rs b/tests/ui/unused_lt.rs index 722e19e6217..91bca47eb12 100644 --- a/tests/ui/unused_lt.rs +++ b/tests/ui/unused_lt.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![allow(unused, dead_code, needless_lifetimes, needless_pass_by_value)] #![warn(unused_lifetimes)] diff --git a/tests/ui/unused_lt.stderr b/tests/ui/unused_lt.stderr index b1fcebe6eed..a4f01de18f7 100644 --- a/tests/ui/unused_lt.stderr +++ b/tests/ui/unused_lt.stderr @@ -18,5 +18,3 @@ error: this lifetime isn't used in the function definition 50 | fn x<'a>(&self) {} | ^^ -error: aborting due to 3 previous errors - diff --git a/tests/ui/use_self.rs b/tests/ui/use_self.rs index 14e31aae8ee..b12900b7691 100644 --- a/tests/ui/use_self.rs +++ b/tests/ui/use_self.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(use_self)] #![allow(dead_code)] #![allow(should_implement_trait)] diff --git a/tests/ui/use_self.stderr b/tests/ui/use_self.stderr index bfd334335d8..9d316dd3e08 100644 --- a/tests/ui/use_self.stderr +++ b/tests/ui/use_self.stderr @@ -36,5 +36,3 @@ error: unnecessary structure name repetition 24 | Foo::new() | ^^^^^^^^ help: use the applicable keyword: `Self` -error: aborting due to 6 previous errors - diff --git a/tests/ui/used_underscore_binding.rs b/tests/ui/used_underscore_binding.rs index d8fc7c7cbca..60a2c4e8b4c 100644 --- a/tests/ui/used_underscore_binding.rs +++ b/tests/ui/used_underscore_binding.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(clippy)] #![allow(blacklisted_name)] diff --git a/tests/ui/used_underscore_binding.stderr b/tests/ui/used_underscore_binding.stderr index 712f81c1b6f..388a3491477 100644 --- a/tests/ui/used_underscore_binding.stderr +++ b/tests/ui/used_underscore_binding.stderr @@ -30,5 +30,3 @@ error: used binding `_underscore_field` which is prefixed with an underscore. A 36 | s._underscore_field += 1; | ^^^^^^^^^^^^^^^^^^^ -error: aborting due to 5 previous errors - diff --git a/tests/ui/useless_attribute.rs b/tests/ui/useless_attribute.rs index cd2636a5b6f..4c2fb221af8 100644 --- a/tests/ui/useless_attribute.rs +++ b/tests/ui/useless_attribute.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(useless_attribute)] #[allow(dead_code, unused_extern_crates)] diff --git a/tests/ui/useless_attribute.stderr b/tests/ui/useless_attribute.stderr index 707a11d55cc..0bb87f8c538 100644 --- a/tests/ui/useless_attribute.stderr +++ b/tests/ui/useless_attribute.stderr @@ -6,5 +6,3 @@ error: useless lint attribute | = note: `-D useless-attribute` implied by `-D warnings` -error: aborting due to previous error - diff --git a/tests/ui/vec.rs b/tests/ui/vec.rs index 1845b509af0..23e43872454 100644 --- a/tests/ui/vec.rs +++ b/tests/ui/vec.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(useless_vec)] diff --git a/tests/ui/vec.stderr b/tests/ui/vec.stderr index 6a47eb5b064..a1555bc7907 100644 --- a/tests/ui/vec.stderr +++ b/tests/ui/vec.stderr @@ -36,5 +36,3 @@ error: useless use of `vec!` 49 | for a in vec![1, 2, 3] { | ^^^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2, 3]` -error: aborting due to 6 previous errors - diff --git a/tests/ui/while_loop.rs b/tests/ui/while_loop.rs index 9bae1bc48e6..b7ef39da817 100644 --- a/tests/ui/while_loop.rs +++ b/tests/ui/while_loop.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(while_let_loop, empty_loop, while_let_on_iterator)] #![allow(dead_code, never_loop, unused, cyclomatic_complexity)] diff --git a/tests/ui/while_loop.stderr b/tests/ui/while_loop.stderr index 689c92d6fb6..edc88405c40 100644 --- a/tests/ui/while_loop.stderr +++ b/tests/ui/while_loop.stderr @@ -110,5 +110,3 @@ error: this loop could be written as a `for` loop 184 | | } | |_________^ help: try: `for v in y { .. }` -error: aborting due to 11 previous errors - diff --git a/tests/ui/wrong_self_convention.rs b/tests/ui/wrong_self_convention.rs index 91b60c8faaa..bef87e2bb01 100644 --- a/tests/ui/wrong_self_convention.rs +++ b/tests/ui/wrong_self_convention.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #![warn(wrong_self_convention)] #![warn(wrong_pub_self_convention)] diff --git a/tests/ui/wrong_self_convention.stderr b/tests/ui/wrong_self_convention.stderr index 216fd0bb82b..e57ffc3266b 100644 --- a/tests/ui/wrong_self_convention.stderr +++ b/tests/ui/wrong_self_convention.stderr @@ -72,5 +72,3 @@ error: methods called `from_*` usually take no self; consider choosing a less am 54 | pub fn from_i64(self) {} | ^^^^ -error: aborting due to 12 previous errors - diff --git a/tests/ui/zero_div_zero.rs b/tests/ui/zero_div_zero.rs index af61e1c8429..65e1e239980 100644 --- a/tests/ui/zero_div_zero.rs +++ b/tests/ui/zero_div_zero.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[allow(unused_variables)] #[warn(zero_divided_by_zero)] diff --git a/tests/ui/zero_div_zero.stderr b/tests/ui/zero_div_zero.stderr index b81e59c07f1..697432af408 100644 --- a/tests/ui/zero_div_zero.stderr +++ b/tests/ui/zero_div_zero.stderr @@ -57,5 +57,3 @@ error: constant division of 0.0 with 0.0 will always result in NaN | = help: Consider using `std::f64::NAN` if you would like a constant representing NaN -error: aborting due to 8 previous errors - diff --git a/tests/ui/zero_ptr.rs b/tests/ui/zero_ptr.rs index a72223ef54c..4a6010f4bd0 100644 --- a/tests/ui/zero_ptr.rs +++ b/tests/ui/zero_ptr.rs @@ -1,5 +1,5 @@ -#![feature(plugin)] -#![plugin(clippy)] + + #[allow(unused_variables)] fn main() { diff --git a/tests/ui/zero_ptr.stderr b/tests/ui/zero_ptr.stderr index 5155dc401bd..fb87a47536e 100644 --- a/tests/ui/zero_ptr.stderr +++ b/tests/ui/zero_ptr.stderr @@ -12,5 +12,3 @@ error: `0 as *mut _` detected. Consider using `ptr::null_mut()` 7 | let y = 0 as *mut f64; | ^^^^^^^^^^^^^ -error: aborting due to 2 previous errors -