Skip to content

Commit 29c179c

Browse files
committed
Update the ui tests to how ui_test likes them
1 parent 43572a3 commit 29c179c

File tree

1,568 files changed

+14913
-11653
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,568 files changed

+14913
-11653
lines changed

clippy_lints/src/methods/obfuscated_if_else.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// run-rustfix
1+
//@run-rustfix
22

33
use super::OBFUSCATED_IF_ELSE;
44
use clippy_utils::{diagnostics::span_lint_and_sugg, source::snippet_with_applicability};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
warning: package `cargo_common_metadata_fail` is missing `package.description` metadata
2+
|
3+
note: the lint level is defined here
4+
--> src/main.rs:2:9
5+
|
6+
2 | #![warn(clippy::cargo_common_metadata)]
7+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8+
9+
warning: package `cargo_common_metadata_fail` is missing `either package.license or package.license_file` metadata
10+
11+
warning: package `cargo_common_metadata_fail` is missing `package.repository` metadata
12+
13+
warning: package `cargo_common_metadata_fail` is missing `package.readme` metadata
14+
15+
warning: package `cargo_common_metadata_fail` is missing `package.keywords` metadata
16+
17+
warning: package `cargo_common_metadata_fail` is missing `package.categories` metadata
18+
19+
warning: `cargo_common_metadata_fail` (bin "cargo_common_metadata_fail") generated 6 warnings
20+
Finished dev [unoptimized + debuginfo] target(s)
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: --crate-name=cargo_common_metadata
1+
//@compile-flags: --crate-name=cargo_common_metadata
22
#![warn(clippy::cargo_common_metadata)]
33

44
fn main() {}

tests/ui-cargo/cargo_common_metadata/fail/src/main.stderr

-16
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
warning: package `cargo_common_metadata_fail_publish` is missing `package.description` metadata
2+
|
3+
note: the lint level is defined here
4+
--> src/main.rs:2:9
5+
|
6+
2 | #![warn(clippy::cargo_common_metadata)]
7+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8+
9+
warning: package `cargo_common_metadata_fail_publish` is missing `either package.license or package.license_file` metadata
10+
11+
warning: package `cargo_common_metadata_fail_publish` is missing `package.repository` metadata
12+
13+
warning: package `cargo_common_metadata_fail_publish` is missing `package.readme` metadata
14+
15+
warning: package `cargo_common_metadata_fail_publish` is missing `package.keywords` metadata
16+
17+
warning: package `cargo_common_metadata_fail_publish` is missing `package.categories` metadata
18+
19+
warning: `cargo_common_metadata_fail_publish` (bin "cargo_common_metadata_fail_publish") generated 6 warnings
20+
Finished dev [unoptimized + debuginfo] target(s)
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: --crate-name=cargo_common_metadata
1+
//@compile-flags: --crate-name=cargo_common_metadata
22
#![warn(clippy::cargo_common_metadata)]
33

44
fn main() {}

tests/ui-cargo/cargo_common_metadata/fail_publish/src/main.stderr

-16
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
warning: package `cargo_common_metadata_fail_publish_true` is missing `package.description` metadata
2+
|
3+
note: the lint level is defined here
4+
--> src/main.rs:2:9
5+
|
6+
2 | #![warn(clippy::cargo_common_metadata)]
7+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8+
9+
warning: package `cargo_common_metadata_fail_publish_true` is missing `either package.license or package.license_file` metadata
10+
11+
warning: package `cargo_common_metadata_fail_publish_true` is missing `package.repository` metadata
12+
13+
warning: package `cargo_common_metadata_fail_publish_true` is missing `package.readme` metadata
14+
15+
warning: package `cargo_common_metadata_fail_publish_true` is missing `package.keywords` metadata
16+
17+
warning: package `cargo_common_metadata_fail_publish_true` is missing `package.categories` metadata
18+
19+
warning: `cargo_common_metadata_fail_publish_true` (bin "cargo_common_metadata_fail_publish_true") generated 6 warnings
20+
Finished dev [unoptimized + debuginfo] target(s)
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: --crate-name=cargo_common_metadata
1+
//@compile-flags: --crate-name=cargo_common_metadata
22
#![warn(clippy::cargo_common_metadata)]
33

44
fn main() {}

tests/ui-cargo/cargo_common_metadata/fail_publish_true/src/main.stderr

-16
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Finished dev [unoptimized + debuginfo] target(s)
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: --crate-name=cargo_common_metadata
1+
//@compile-flags: --crate-name=cargo_common_metadata
22
#![warn(clippy::cargo_common_metadata)]
33

44
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Finished dev [unoptimized + debuginfo] target(s)
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: --crate-name=cargo_common_metadata
1+
//@compile-flags: --crate-name=cargo_common_metadata
22
#![warn(clippy::cargo_common_metadata)]
33

44
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Finished dev [unoptimized + debuginfo] target(s)
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: --crate-name=cargo_common_metadata
1+
//@compile-flags: --crate-name=cargo_common_metadata
22
#![warn(clippy::cargo_common_metadata)]
33

44
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
warning: the MSRV in `clippy.toml` and `Cargo.toml` differ; using `1.59.0` from `clippy.toml`
2+
3+
error: unnecessary structure name repetition
4+
--> src/main.rs:6:21
5+
|
6+
6 | pub fn bar() -> Foo {
7+
| ^^^ help: use the applicable keyword: `Self`
8+
|
9+
note: the lint level is defined here
10+
--> src/main.rs:1:9
11+
|
12+
1 | #![deny(clippy::use_self)]
13+
| ^^^^^^^^^^^^^^^^
14+
15+
error: unnecessary structure name repetition
16+
--> src/main.rs:7:9
17+
|
18+
7 | Foo
19+
| ^^^ help: use the applicable keyword: `Self`
20+
21+
warning: `fail-both-diff` (bin "fail-both-diff") generated 1 warning
22+
error: could not compile `fail-both-diff` due to 2 previous errors; 1 warning emitted

tests/ui-cargo/cargo_rust_version/fail_both_diff/src/main.stderr

-22
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
error: unnecessary structure name repetition
2+
--> src/main.rs:6:21
3+
|
4+
6 | pub fn bar() -> Foo {
5+
| ^^^ help: use the applicable keyword: `Self`
6+
|
7+
note: the lint level is defined here
8+
--> src/main.rs:1:9
9+
|
10+
1 | #![deny(clippy::use_self)]
11+
| ^^^^^^^^^^^^^^^^
12+
13+
error: unnecessary structure name repetition
14+
--> src/main.rs:7:9
15+
|
16+
7 | Foo
17+
| ^^^ help: use the applicable keyword: `Self`
18+
19+
error: could not compile `fail-both-same` due to 2 previous errors

tests/ui-cargo/cargo_rust_version/fail_both_same/src/main.stderr

-20
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
error: unnecessary structure name repetition
2+
--> src/main.rs:6:21
3+
|
4+
6 | pub fn bar() -> Foo {
5+
| ^^^ help: use the applicable keyword: `Self`
6+
|
7+
note: the lint level is defined here
8+
--> src/main.rs:1:9
9+
|
10+
1 | #![deny(clippy::use_self)]
11+
| ^^^^^^^^^^^^^^^^
12+
13+
error: unnecessary structure name repetition
14+
--> src/main.rs:7:9
15+
|
16+
7 | Foo
17+
| ^^^ help: use the applicable keyword: `Self`
18+
19+
error: could not compile `fail-cargo` due to 2 previous errors

tests/ui-cargo/cargo_rust_version/fail_cargo/src/main.stderr

-20
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
error: unnecessary structure name repetition
2+
--> src/main.rs:6:21
3+
|
4+
6 | pub fn bar() -> Foo {
5+
| ^^^ help: use the applicable keyword: `Self`
6+
|
7+
note: the lint level is defined here
8+
--> src/main.rs:1:9
9+
|
10+
1 | #![deny(clippy::use_self)]
11+
| ^^^^^^^^^^^^^^^^
12+
13+
error: unnecessary structure name repetition
14+
--> src/main.rs:7:9
15+
|
16+
7 | Foo
17+
| ^^^ help: use the applicable keyword: `Self`
18+
19+
error: could not compile `fail-clippy` due to 2 previous errors
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
error: unnecessary structure name repetition
2-
--> $DIR/main.rs:6:21
2+
--> src/main.rs:11:21
33
|
4-
LL | pub fn bar() -> Foo {
4+
11 | pub fn bar() -> Foo {
55
| ^^^ help: use the applicable keyword: `Self`
66
|
77
note: the lint level is defined here
8-
--> $DIR/main.rs:1:9
8+
--> src/main.rs:6:9
99
|
10-
LL | #![deny(clippy::use_self)]
10+
6 | #![deny(clippy::use_self)]
1111
| ^^^^^^^^^^^^^^^^
1212

1313
error: unnecessary structure name repetition
14-
--> $DIR/main.rs:7:9
14+
--> src/main.rs:12:9
1515
|
16-
LL | Foo
16+
12 | Foo
1717
| ^^^ help: use the applicable keyword: `Self`
1818

19-
error: aborting due to 2 previous errors
20-
19+
error: could not compile `fail-file-attr` due to 2 previous errors

tests/ui-cargo/cargo_rust_version/fail_file_attr/src/main.stderr

-20
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Finished dev [unoptimized + debuginfo] target(s)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Finished dev [unoptimized + debuginfo] target(s)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Finished dev [unoptimized + debuginfo] target(s)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Finished dev [unoptimized + debuginfo] target(s)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
warning: the MSRV in `clippy.toml` and `Cargo.toml` differ; using `1.13.0` from `clippy.toml`
2+
3+
warning: `warn-both-diff` (bin "warn-both-diff") generated 1 warning
4+
Finished dev [unoptimized + debuginfo] target(s)

tests/ui-cargo/cargo_rust_version/warn_both_diff/src/main.stderr

-4
This file was deleted.

0 commit comments

Comments
 (0)