Skip to content

Commit e1c0a50

Browse files
committed
Auto merge of #5155 - krishna-veerareddy:remove-unused-imports, r=flip1995
Remove unnecessary `Lint{Array|Pass}` imports changelog: none
2 parents 63f818e + fcc3e72 commit e1c0a50

File tree

6 files changed

+5
-6
lines changed

6 files changed

+5
-6
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ It's worth noting that the majority of `clippy_lints/src/lib.rs` is autogenerate
110110
```rust
111111
// ./clippy_lints/src/else_if_without_else.rs
112112

113-
use rustc::lint::{EarlyLintPass, LintArray, LintPass};
113+
use rustc_lint::{EarlyLintPass, EarlyContext};
114114

115115
// ...
116116

clippy_dev/src/new_lint.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ fn get_lint_file_contents(
117117
context_import: &str,
118118
) -> String {
119119
format!(
120-
"use rustc_lint::{{LintArray, LintPass, {type}, {context_import}}};
120+
"use rustc_lint::{{{type}, {context_import}}};
121121
use rustc_session::{{declare_lint_pass, declare_tool_lint}};
122122
{pass_import}
123123

doc/adding_lints.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ at `clippy_lints/src/foo_functions.rs`. That's the crate where all the
138138
lint code is. This file has already imported some initial things we will need:
139139

140140
```rust
141-
use rustc::lint::{LintArray, LintPass, EarlyLintPass, EarlyContext};
141+
use rustc_lint::{EarlyLintPass, EarlyContext};
142142
use rustc_session::{declare_lint_pass, declare_tool_lint};
143143
use syntax::ast::*;
144144
```

tests/ui/default_lint.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ extern crate rustc;
66
#[macro_use]
77
extern crate rustc_session;
88
extern crate rustc_lint;
9-
use rustc_lint::{LintArray, LintPass};
109

1110
declare_tool_lint! {
1211
pub clippy::TEST_LINT,

tests/ui/default_lint.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: the lint `TEST_LINT_DEFAULT` has the default lint description
2-
--> $DIR/default_lint.rs:18:1
2+
--> $DIR/default_lint.rs:17:1
33
|
44
LL | / declare_tool_lint! {
55
LL | | pub clippy::TEST_LINT_DEFAULT,

tests/ui/lint_without_lint_pass.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ extern crate rustc;
66
#[macro_use]
77
extern crate rustc_session;
88
extern crate rustc_lint;
9-
use rustc_lint::{LintArray, LintPass};
9+
use rustc_lint::LintPass;
1010

1111
declare_tool_lint! {
1212
pub clippy::TEST_LINT,

0 commit comments

Comments
 (0)