diff --git a/src/lib.rs b/src/lib.rs index 5a02b514812..9e83a96fee6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,20 +9,18 @@ use rustc_plugin::Registry; extern crate clippy_lints; -pub use clippy_lints::*; - #[plugin_registrar] pub fn plugin_registrar(reg: &mut Registry) { if reg.sess.lint_store.borrow_state() == std::cell::BorrowState::Unused && reg.sess.lint_store.borrow().get_lint_groups().iter().any(|&(s, _, _)| s == "clippy") { reg.sess.struct_warn("running cargo clippy on a crate that also imports the clippy plugin").emit(); } else { - register_plugins(reg); + clippy_lints::register_plugins(reg); } } // only exists to let the dogfood integration test works. // Don't run clippy as an executable directly -#[allow(dead_code, print_stdout)] +#[allow(dead_code)] fn main() { panic!("Please use the cargo-clippy executable"); } diff --git a/tests/camel_case.rs b/tests/camel_case.rs index 201b796af1c..b7efbde6596 100644 --- a/tests/camel_case.rs +++ b/tests/camel_case.rs @@ -1,7 +1,6 @@ -#[allow(plugin_as_library)] -extern crate clippy; +extern crate clippy_lints; -use clippy::utils::{camel_case_from, camel_case_until}; +use clippy_lints::utils::{camel_case_from, camel_case_until}; #[test] fn from_full() { diff --git a/tests/compile-test.rs b/tests/compile-test.rs index d21d9750924..deadd499192 100644 --- a/tests/compile-test.rs +++ b/tests/compile-test.rs @@ -6,7 +6,7 @@ use std::env::{set_var, var}; fn run_mode(dir: &'static str, mode: &'static str) { let mut config = compiletest::default_config(); - let cfg_mode = mode.parse().ok().expect("Invalid mode"); + let cfg_mode = mode.parse().expect("Invalid mode"); config.target_rustcflags = Some("-L target/debug/ -L target/debug/deps".to_owned()); if let Ok(name) = var::<&str>("TESTNAME") { let s: String = name.to_owned(); diff --git a/tests/consts.rs b/tests/consts.rs index 5f5f4cb47d0..47ea4d874b6 100644 --- a/tests/consts.rs +++ b/tests/consts.rs @@ -1,13 +1,12 @@ -#![allow(plugin_as_library)] #![feature(rustc_private)] -extern crate clippy; +extern crate clippy_lints; extern crate rustc; extern crate rustc_const_eval; extern crate rustc_const_math; extern crate syntax; -use clippy::consts::{constant_simple, Constant, FloatWidth}; +use clippy_lints::consts::{constant_simple, Constant, FloatWidth}; use rustc_const_math::ConstInt; use rustc::hir::*; use syntax::ast::{LitIntType, LitKind, StrStyle}; diff --git a/tests/matches.rs b/tests/matches.rs index 74433fc1f56..1d9d3dedd5d 100644 --- a/tests/matches.rs +++ b/tests/matches.rs @@ -1,16 +1,15 @@ -#![allow(plugin_as_library)] #![feature(rustc_private)] -extern crate clippy; +extern crate clippy_lints; extern crate syntax; #[test] fn test_overlapping() { - use clippy::matches::overlapping; + use clippy_lints::matches::overlapping; use syntax::codemap::DUMMY_SP; let sp = |s, e| { - clippy::matches::SpannedRange { + clippy_lints::matches::SpannedRange { span: DUMMY_SP, node: (s, e), } diff --git a/tests/trim_multiline.rs b/tests/trim_multiline.rs index e29ee4922cd..90f1c76fb80 100644 --- a/tests/trim_multiline.rs +++ b/tests/trim_multiline.rs @@ -1,8 +1,7 @@ /// test the multiline-trim function -#[allow(plugin_as_library)] -extern crate clippy; +extern crate clippy_lints; -use clippy::utils::trim_multiline; +use clippy_lints::utils::trim_multiline; #[test] fn test_single_line() {