Skip to content

Commit b776579

Browse files
flip1995Manishearth
authored andcommitted
Update tests
1 parent a59da03 commit b776579

File tree

3 files changed

+26
-17
lines changed

3 files changed

+26
-17
lines changed

Diff for: src/test/compile-fail-fulldeps/auxiliary/lint_group_plugin_test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
4949
#[plugin_registrar]
5050
pub fn plugin_registrar(reg: &mut Registry) {
5151
reg.register_late_lint_pass(box Pass);
52-
reg.register_lint_group("lint_me", vec![TEST_LINT, PLEASE_LINT]);
52+
reg.register_lint_group("lint_me", None, vec![TEST_LINT, PLEASE_LINT]);
5353
}

Diff for: src/test/ui-fulldeps/lint_tool_test.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@
1010

1111
// aux-build:lint_tool_test.rs
1212
// ignore-stage1
13+
// compile-flags: --cfg foo
1314
#![feature(plugin)]
1415
#![feature(tool_lints)]
1516
#![plugin(lint_tool_test)]
1617
#![allow(dead_code)]
18+
#![cfg_attr(foo, warn(test_lint))]
19+
//~^ WARNING lint name `test_lint` is deprecated and may not have an effect in the future
20+
//~^^ WARNING lint name `test_lint` is deprecated and may not have an effect in the future
1721
#![deny(clippy_group)]
1822
//~^ WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
19-
//~^^ WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
2023

2124
fn lintme() { } //~ ERROR item is named 'lintme'
2225

Diff for: src/test/ui-fulldeps/lint_tool_test.stderr

+21-15
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,58 @@
1-
warning: lint name `clippy_group` is deprecated and may not have an effect in the future Also `cfg_attr(cargo-clippy)` won't be necessary anymore
2-
--> $DIR/lint_tool_test.rs:17:9
1+
warning: lint name `test_lint` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
2+
--> $DIR/lint_tool_test.rs:18:23
33
|
4-
LL | #![deny(clippy_group)]
5-
| ^^^^^^^^^^^^ help: change it to: `clippy::group`
4+
LL | #![cfg_attr(foo, warn(test_lint))]
5+
| ^^^^^^^^^ help: change it to: `clippy::test_lint`
66
|
77
= note: #[warn(renamed_and_removed_lints)] on by default
88

9-
warning: lint name `test_group` is deprecated and may not have an effect in the future Also `cfg_attr(cargo-clippy)` won't be necessary anymore
10-
--> $DIR/lint_tool_test.rs:32:9
9+
warning: lint name `clippy_group` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
10+
--> $DIR/lint_tool_test.rs:21:9
11+
|
12+
LL | #![deny(clippy_group)]
13+
| ^^^^^^^^^^^^ help: change it to: `clippy::group`
14+
15+
warning: lint name `test_group` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
16+
--> $DIR/lint_tool_test.rs:35:9
1117
|
1218
LL | #[allow(test_group)]
1319
| ^^^^^^^^^^ help: change it to: `clippy::test_group`
1420

1521
warning: unknown lint: `this_lint_does_not_exist`
16-
--> $DIR/lint_tool_test.rs:34:8
22+
--> $DIR/lint_tool_test.rs:37:8
1723
|
1824
LL | #[deny(this_lint_does_not_exist)] //~ WARNING unknown lint: `this_lint_does_not_exist`
1925
| ^^^^^^^^^^^^^^^^^^^^^^^^
2026
|
2127
= note: #[warn(unknown_lints)] on by default
2228

23-
warning: lint name `clippy_group` is deprecated and may not have an effect in the future Also `cfg_attr(cargo-clippy)` won't be necessary anymore
24-
--> $DIR/lint_tool_test.rs:17:9
29+
warning: lint name `test_lint` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
30+
--> $DIR/lint_tool_test.rs:18:23
2531
|
26-
LL | #![deny(clippy_group)]
27-
| ^^^^^^^^^^^^ help: change it to: `clippy::group`
32+
LL | #![cfg_attr(foo, warn(test_lint))]
33+
| ^^^^^^^^^ help: change it to: `clippy::test_lint`
2834

2935
error: item is named 'lintme'
30-
--> $DIR/lint_tool_test.rs:21:1
36+
--> $DIR/lint_tool_test.rs:24:1
3137
|
3238
LL | fn lintme() { } //~ ERROR item is named 'lintme'
3339
| ^^^^^^^^^^^^^^^
3440
|
3541
note: lint level defined here
36-
--> $DIR/lint_tool_test.rs:17:9
42+
--> $DIR/lint_tool_test.rs:21:9
3743
|
3844
LL | #![deny(clippy_group)]
3945
| ^^^^^^^^^^^^
4046
= note: #[deny(clippy::test_lint)] implied by #[deny(clippy::group)]
4147

4248
error: item is named 'lintmetoo'
43-
--> $DIR/lint_tool_test.rs:29:5
49+
--> $DIR/lint_tool_test.rs:32:5
4450
|
4551
LL | fn lintmetoo() { } //~ ERROR item is named 'lintmetoo'
4652
| ^^^^^^^^^^^^^^^^^^
4753
|
4854
note: lint level defined here
49-
--> $DIR/lint_tool_test.rs:17:9
55+
--> $DIR/lint_tool_test.rs:21:9
5056
|
5157
LL | #![deny(clippy_group)]
5258
| ^^^^^^^^^^^^

0 commit comments

Comments
 (0)