Auto merge of #5155 - krishna-veerareddy:remove-unused-imports, r=flip1995

Remove unnecessary `Lint{Array|Pass}` imports

changelog: none
This commit is contained in:
bors 2020-02-11 14:25:21 +00:00
commit e1c0a50ea9
6 changed files with 5 additions and 6 deletions

View file

@ -110,7 +110,7 @@ It's worth noting that the majority of `clippy_lints/src/lib.rs` is autogenerate
```rust
// ./clippy_lints/src/else_if_without_else.rs
use rustc::lint::{EarlyLintPass, LintArray, LintPass};
use rustc_lint::{EarlyLintPass, EarlyContext};
// ...

View file

@ -117,7 +117,7 @@ fn get_lint_file_contents(
context_import: &str,
) -> String {
format!(
"use rustc_lint::{{LintArray, LintPass, {type}, {context_import}}};
"use rustc_lint::{{{type}, {context_import}}};
use rustc_session::{{declare_lint_pass, declare_tool_lint}};
{pass_import}

View file

@ -138,7 +138,7 @@ at `clippy_lints/src/foo_functions.rs`. That's the crate where all the
lint code is. This file has already imported some initial things we will need:
```rust
use rustc::lint::{LintArray, LintPass, EarlyLintPass, EarlyContext};
use rustc_lint::{EarlyLintPass, EarlyContext};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use syntax::ast::*;
```

View file

@ -6,7 +6,6 @@ extern crate rustc;
#[macro_use]
extern crate rustc_session;
extern crate rustc_lint;
use rustc_lint::{LintArray, LintPass};
declare_tool_lint! {
pub clippy::TEST_LINT,

View file

@ -1,5 +1,5 @@
error: the lint `TEST_LINT_DEFAULT` has the default lint description
--> $DIR/default_lint.rs:18:1
--> $DIR/default_lint.rs:17:1
|
LL | / declare_tool_lint! {
LL | | pub clippy::TEST_LINT_DEFAULT,

View file

@ -6,7 +6,7 @@ extern crate rustc;
#[macro_use]
extern crate rustc_session;
extern crate rustc_lint;
use rustc_lint::{LintArray, LintPass};
use rustc_lint::LintPass;
declare_tool_lint! {
pub clippy::TEST_LINT,