From 7b717d3152e9ad1b3e874d9b5dd957521640f40b Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Wed, 17 Aug 2016 18:35:25 +0200 Subject: [PATCH] fallout --- src/lib.rs | 6 ++---- tests/camel_case.rs | 5 ++--- tests/compile-test.rs | 2 +- tests/consts.rs | 5 ++--- tests/matches.rs | 7 +++---- tests/trim_multiline.rs | 5 ++--- 6 files changed, 12 insertions(+), 18 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 5a02b5148..9e83a96fe 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 201b796af..b7efbde65 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 d21d97509..deadd4991 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 5f5f4cb47..47ea4d874 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 74433fc1f..1d9d3dedd 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 e29ee4922..90f1c76fb 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() {