Skip to content

Commit 6bbefbe

Browse files
committed
update cargo tests to match lint message changes from rust-lang/rust#140794
1 parent e04e0b6 commit 6bbefbe

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

tests/testsuite/fix.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,9 +1863,13 @@ fn non_edition_lint_migration() {
18631863
.with_stderr_data(str![[r#"
18641864
...
18651865
[..]use std::str::from_utf8;
1866-
...
1867-
= [NOTE] `#[warn(unused_imports)]` on by default
1868-
...
1866+
| ^^^^^^^^^^^^^^^^^^^
1867+
|
1868+
= [NOTE] `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
1869+
1870+
[WARNING] `foo` (lib) generated 1 warning (run `cargo fix --lib -p foo` to apply 1 suggestion)
1871+
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
1872+
18691873
"#]])
18701874
.run();
18711875
p.cargo("fix --edition --allow-no-vcs").run();

tests/testsuite/warning_override.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ fn rustc_caching_allow_first() {
4848
1 | fn main() { let x = 3; }
4949
| ^ [HELP] if this is intentional, prefix it with an underscore: `_x`
5050
|
51-
= [NOTE] `#[warn(unused_variables)]` on by default
51+
= [NOTE] `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
5252
5353
[WARNING] `foo` (bin "foo") generated 1 warning
5454
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
@@ -75,7 +75,7 @@ fn rustc_caching_deny_first() {
7575
1 | fn main() { let x = 3; }
7676
| ^ [HELP] if this is intentional, prefix it with an underscore: `_x`
7777
|
78-
= [NOTE] `#[warn(unused_variables)]` on by default
78+
= [NOTE] `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
7979
8080
[WARNING] `foo` (bin "foo") generated 1 warning
8181
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
@@ -112,7 +112,7 @@ fn config() {
112112
1 | fn main() { let x = 3; }
113113
| ^ [HELP] if this is intentional, prefix it with an underscore: `_x`
114114
|
115-
= [NOTE] `#[warn(unused_variables)]` on by default
115+
= [NOTE] `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
116116
117117
[WARNING] `foo` (bin "foo") generated 1 warning
118118
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
@@ -136,7 +136,7 @@ fn config() {
136136
1 | fn main() { let x = 3; }
137137
| ^ [HELP] if this is intentional, prefix it with an underscore: `_x`
138138
|
139-
= [NOTE] `#[warn(unused_variables)]` on by default
139+
= [NOTE] `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
140140
141141
[WARNING] `foo` (bin "foo") generated 1 warning
142142
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
@@ -160,7 +160,7 @@ fn requires_nightly() {
160160
1 | fn main() { let x = 3; }
161161
| ^ [HELP] if this is intentional, prefix it with an underscore: `_x`
162162
|
163-
= [NOTE] `#[warn(unused_variables)]` on by default
163+
= [NOTE] `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
164164
165165
[WARNING] `foo` (bin "foo") generated 1 warning
166166
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s

0 commit comments

Comments
 (0)