Skip to content

Commit 51078ce

Browse files
committed
fix ui-fulldeps & tests fallout
1 parent 8be2a04 commit 51078ce

File tree

7 files changed

+39
-39
lines changed

7 files changed

+39
-39
lines changed

src/librustc_interface/tests.rs

+21-21
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ extern crate getopts;
22

33
use crate::interface::parse_cfgspecs;
44

5-
use rustc::lint;
5+
use rustc::lint::Level;
66
use rustc::middle::cstore;
77
use rustc::session::config::{build_configuration, build_session_options, to_crate_config};
88
use rustc::session::config::{rustc_optgroups, ErrorOutputType, ExternLocation, Options, Passes};
@@ -186,24 +186,24 @@ fn test_lints_tracking_hash_different_values() {
186186
let mut v3 = Options::default();
187187

188188
v1.lint_opts = vec![
189-
(String::from("a"), lint::Allow),
190-
(String::from("b"), lint::Warn),
191-
(String::from("c"), lint::Deny),
192-
(String::from("d"), lint::Forbid),
189+
(String::from("a"), Level::Allow),
190+
(String::from("b"), Level::Warn),
191+
(String::from("c"), Level::Deny),
192+
(String::from("d"), Level::Forbid),
193193
];
194194

195195
v2.lint_opts = vec![
196-
(String::from("a"), lint::Allow),
197-
(String::from("b"), lint::Warn),
198-
(String::from("X"), lint::Deny),
199-
(String::from("d"), lint::Forbid),
196+
(String::from("a"), Level::Allow),
197+
(String::from("b"), Level::Warn),
198+
(String::from("X"), Level::Deny),
199+
(String::from("d"), Level::Forbid),
200200
];
201201

202202
v3.lint_opts = vec![
203-
(String::from("a"), lint::Allow),
204-
(String::from("b"), lint::Warn),
205-
(String::from("c"), lint::Forbid),
206-
(String::from("d"), lint::Deny),
203+
(String::from("a"), Level::Allow),
204+
(String::from("b"), Level::Warn),
205+
(String::from("c"), Level::Forbid),
206+
(String::from("d"), Level::Deny),
207207
];
208208

209209
assert!(v1.dep_tracking_hash() != v2.dep_tracking_hash());
@@ -222,17 +222,17 @@ fn test_lints_tracking_hash_different_construction_order() {
222222
let mut v2 = Options::default();
223223

224224
v1.lint_opts = vec![
225-
(String::from("a"), lint::Allow),
226-
(String::from("b"), lint::Warn),
227-
(String::from("c"), lint::Deny),
228-
(String::from("d"), lint::Forbid),
225+
(String::from("a"), Level::Allow),
226+
(String::from("b"), Level::Warn),
227+
(String::from("c"), Level::Deny),
228+
(String::from("d"), Level::Forbid),
229229
];
230230

231231
v2.lint_opts = vec![
232-
(String::from("a"), lint::Allow),
233-
(String::from("c"), lint::Deny),
234-
(String::from("b"), lint::Warn),
235-
(String::from("d"), lint::Forbid),
232+
(String::from("a"), Level::Allow),
233+
(String::from("c"), Level::Deny),
234+
(String::from("b"), Level::Warn),
235+
(String::from("d"), Level::Forbid),
236236
];
237237

238238
assert_eq!(v1.dep_tracking_hash(), v2.dep_tracking_hash());

src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
#![feature(box_syntax, plugin, plugin_registrar, rustc_private)]
22
#![crate_type = "dylib"]
33

4-
#[macro_use] extern crate rustc;
5-
#[macro_use] extern crate rustc_session;
64
extern crate rustc_driver;
75
extern crate rustc_hir;
6+
#[macro_use] extern crate rustc_lint;
7+
#[macro_use] extern crate rustc_session;
88
extern crate rustc_span;
99
extern crate syntax;
1010

1111
use rustc_hir::intravisit;
1212
use rustc_hir as hir;
1313
use rustc_hir::Node;
14-
use rustc::lint::{LateContext, LintPass, LintArray, LateLintPass, LintContext};
14+
use rustc_lint::{LateContext, LintPass, LintArray, LateLintPass, LintContext};
1515
use rustc_driver::plugin::Registry;
1616
use rustc_span::source_map;
1717
use syntax::print::pprust;

src/test/ui-fulldeps/auxiliary/lint-for-crate-rpass.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
#![feature(plugin_registrar, rustc_private)]
44
#![feature(box_syntax)]
5-
#[macro_use] extern crate rustc;
6-
#[macro_use] extern crate rustc_session;
75
extern crate rustc_driver;
86
extern crate rustc_hir;
97
extern crate rustc_span;
8+
#[macro_use] extern crate rustc_lint;
9+
#[macro_use] extern crate rustc_session;
1010
extern crate syntax;
1111

12-
use rustc::lint::{LateContext, LintContext, LintPass, LateLintPass};
12+
use rustc_lint::{LateContext, LintContext, LintPass, LateLintPass};
1313
use rustc_driver::plugin::Registry;
1414
use rustc_span::symbol::Symbol;
1515
use syntax::attr;

src/test/ui-fulldeps/auxiliary/lint-for-crate.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
#![feature(plugin_registrar, rustc_private)]
44
#![feature(box_syntax)]
55

6-
#[macro_use] extern crate rustc;
7-
#[macro_use] extern crate rustc_session;
86
extern crate rustc_driver;
97
extern crate rustc_hir;
8+
#[macro_use] extern crate rustc_lint;
9+
#[macro_use] extern crate rustc_session;
1010
extern crate rustc_span;
1111
extern crate syntax;
1212

13-
use rustc::lint::{LateContext, LintContext, LintPass, LateLintPass, LintArray};
13+
use rustc_lint::{LateContext, LintContext, LintPass, LateLintPass, LintArray};
1414
use rustc_driver::plugin::Registry;
1515
use rustc_span::symbol::Symbol;
1616
use syntax::attr;

src/test/ui-fulldeps/auxiliary/lint-group-plugin-test.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
#![feature(box_syntax, rustc_private)]
55

66
// Load rustc as a plugin to get macros.
7-
#[macro_use] extern crate rustc;
8-
#[macro_use] extern crate rustc_session;
97
extern crate rustc_driver;
108
extern crate rustc_hir;
9+
#[macro_use] extern crate rustc_lint;
10+
#[macro_use] extern crate rustc_session;
1111

12-
use rustc::lint::{LateContext, LintContext, LintPass, LateLintPass, LintArray, LintId};
12+
use rustc_lint::{LateContext, LintContext, LintPass, LateLintPass, LintArray, LintId};
1313
use rustc_driver::plugin::Registry;
1414

1515
declare_lint!(TEST_LINT, Warn, "Warn about items named 'lintme'");

src/test/ui-fulldeps/auxiliary/lint-plugin-test.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
extern crate syntax;
77

88
// Load rustc as a plugin to get macros
9-
#[macro_use] extern crate rustc;
10-
#[macro_use] extern crate rustc_session;
119
extern crate rustc_driver;
10+
#[macro_use] extern crate rustc_lint;
11+
#[macro_use] extern crate rustc_session;
1212

13-
use rustc::lint::{EarlyContext, LintContext, LintPass, EarlyLintPass, LintArray};
13+
use rustc_lint::{EarlyContext, LintContext, LintPass, EarlyLintPass, LintArray};
1414
use rustc_driver::plugin::Registry;
1515
use syntax::ast;
1616
declare_lint!(TEST_LINT, Warn, "Warn about items named 'lintme'");

src/test/ui-fulldeps/auxiliary/lint-tool-test.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
extern crate syntax;
55

66
// Load rustc as a plugin to get macros
7-
#[macro_use] extern crate rustc;
8-
#[macro_use] extern crate rustc_session;
97
extern crate rustc_driver;
8+
#[macro_use] extern crate rustc_lint;
9+
#[macro_use] extern crate rustc_session;
1010

11-
use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintContext, LintPass, LintId};
11+
use rustc_lint::{EarlyContext, EarlyLintPass, LintArray, LintContext, LintPass, LintId};
1212
use rustc_driver::plugin::Registry;
1313
use syntax::ast;
1414
declare_tool_lint!(pub clippy::TEST_LINT, Warn, "Warn about stuff");

0 commit comments

Comments
 (0)