Skip to content

Commit

Permalink
Update the ui tests to how ui_test likes them
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Mar 1, 2023
1 parent 43572a3 commit 29c179c
Show file tree
Hide file tree
Showing 1,568 changed files with 14,913 additions and 11,653 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/methods/obfuscated_if_else.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// run-rustfix
//@run-rustfix

use super::OBFUSCATED_IF_ELSE;
use clippy_utils::{diagnostics::span_lint_and_sugg, source::snippet_with_applicability};
Expand Down
20 changes: 20 additions & 0 deletions tests/ui-cargo/cargo_common_metadata/fail/Cargo.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
warning: package `cargo_common_metadata_fail` is missing `package.description` metadata
|
note: the lint level is defined here
--> src/main.rs:2:9
|
2 | #![warn(clippy::cargo_common_metadata)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: package `cargo_common_metadata_fail` is missing `either package.license or package.license_file` metadata

warning: package `cargo_common_metadata_fail` is missing `package.repository` metadata

warning: package `cargo_common_metadata_fail` is missing `package.readme` metadata

warning: package `cargo_common_metadata_fail` is missing `package.keywords` metadata

warning: package `cargo_common_metadata_fail` is missing `package.categories` metadata

warning: `cargo_common_metadata_fail` (bin "cargo_common_metadata_fail") generated 6 warnings
Finished dev [unoptimized + debuginfo] target(s)
2 changes: 1 addition & 1 deletion tests/ui-cargo/cargo_common_metadata/fail/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// compile-flags: --crate-name=cargo_common_metadata
//@compile-flags: --crate-name=cargo_common_metadata
#![warn(clippy::cargo_common_metadata)]

fn main() {}
16 changes: 0 additions & 16 deletions tests/ui-cargo/cargo_common_metadata/fail/src/main.stderr

This file was deleted.

20 changes: 20 additions & 0 deletions tests/ui-cargo/cargo_common_metadata/fail_publish/Cargo.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
warning: package `cargo_common_metadata_fail_publish` is missing `package.description` metadata
|
note: the lint level is defined here
--> src/main.rs:2:9
|
2 | #![warn(clippy::cargo_common_metadata)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: package `cargo_common_metadata_fail_publish` is missing `either package.license or package.license_file` metadata

warning: package `cargo_common_metadata_fail_publish` is missing `package.repository` metadata

warning: package `cargo_common_metadata_fail_publish` is missing `package.readme` metadata

warning: package `cargo_common_metadata_fail_publish` is missing `package.keywords` metadata

warning: package `cargo_common_metadata_fail_publish` is missing `package.categories` metadata

warning: `cargo_common_metadata_fail_publish` (bin "cargo_common_metadata_fail_publish") generated 6 warnings
Finished dev [unoptimized + debuginfo] target(s)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// compile-flags: --crate-name=cargo_common_metadata
//@compile-flags: --crate-name=cargo_common_metadata
#![warn(clippy::cargo_common_metadata)]

fn main() {}
16 changes: 0 additions & 16 deletions tests/ui-cargo/cargo_common_metadata/fail_publish/src/main.stderr

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
warning: package `cargo_common_metadata_fail_publish_true` is missing `package.description` metadata
|
note: the lint level is defined here
--> src/main.rs:2:9
|
2 | #![warn(clippy::cargo_common_metadata)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: package `cargo_common_metadata_fail_publish_true` is missing `either package.license or package.license_file` metadata

warning: package `cargo_common_metadata_fail_publish_true` is missing `package.repository` metadata

warning: package `cargo_common_metadata_fail_publish_true` is missing `package.readme` metadata

warning: package `cargo_common_metadata_fail_publish_true` is missing `package.keywords` metadata

warning: package `cargo_common_metadata_fail_publish_true` is missing `package.categories` metadata

warning: `cargo_common_metadata_fail_publish_true` (bin "cargo_common_metadata_fail_publish_true") generated 6 warnings
Finished dev [unoptimized + debuginfo] target(s)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// compile-flags: --crate-name=cargo_common_metadata
//@compile-flags: --crate-name=cargo_common_metadata
#![warn(clippy::cargo_common_metadata)]

fn main() {}

This file was deleted.

1 change: 1 addition & 0 deletions tests/ui-cargo/cargo_common_metadata/pass/Cargo.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Finished dev [unoptimized + debuginfo] target(s)
2 changes: 1 addition & 1 deletion tests/ui-cargo/cargo_common_metadata/pass/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// compile-flags: --crate-name=cargo_common_metadata
//@compile-flags: --crate-name=cargo_common_metadata
#![warn(clippy::cargo_common_metadata)]

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

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

fn main() {}
22 changes: 22 additions & 0 deletions tests/ui-cargo/cargo_rust_version/fail_both_diff/Cargo.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
warning: the MSRV in `clippy.toml` and `Cargo.toml` differ; using `1.59.0` from `clippy.toml`

error: unnecessary structure name repetition
--> src/main.rs:6:21
|
6 | pub fn bar() -> Foo {
| ^^^ help: use the applicable keyword: `Self`
|
note: the lint level is defined here
--> src/main.rs:1:9
|
1 | #![deny(clippy::use_self)]
| ^^^^^^^^^^^^^^^^

error: unnecessary structure name repetition
--> src/main.rs:7:9
|
7 | Foo
| ^^^ help: use the applicable keyword: `Self`

warning: `fail-both-diff` (bin "fail-both-diff") generated 1 warning
error: could not compile `fail-both-diff` due to 2 previous errors; 1 warning emitted
22 changes: 0 additions & 22 deletions tests/ui-cargo/cargo_rust_version/fail_both_diff/src/main.stderr

This file was deleted.

19 changes: 19 additions & 0 deletions tests/ui-cargo/cargo_rust_version/fail_both_same/Cargo.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
error: unnecessary structure name repetition
--> src/main.rs:6:21
|
6 | pub fn bar() -> Foo {
| ^^^ help: use the applicable keyword: `Self`
|
note: the lint level is defined here
--> src/main.rs:1:9
|
1 | #![deny(clippy::use_self)]
| ^^^^^^^^^^^^^^^^

error: unnecessary structure name repetition
--> src/main.rs:7:9
|
7 | Foo
| ^^^ help: use the applicable keyword: `Self`

error: could not compile `fail-both-same` due to 2 previous errors
20 changes: 0 additions & 20 deletions tests/ui-cargo/cargo_rust_version/fail_both_same/src/main.stderr

This file was deleted.

19 changes: 19 additions & 0 deletions tests/ui-cargo/cargo_rust_version/fail_cargo/Cargo.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
error: unnecessary structure name repetition
--> src/main.rs:6:21
|
6 | pub fn bar() -> Foo {
| ^^^ help: use the applicable keyword: `Self`
|
note: the lint level is defined here
--> src/main.rs:1:9
|
1 | #![deny(clippy::use_self)]
| ^^^^^^^^^^^^^^^^

error: unnecessary structure name repetition
--> src/main.rs:7:9
|
7 | Foo
| ^^^ help: use the applicable keyword: `Self`

error: could not compile `fail-cargo` due to 2 previous errors
20 changes: 0 additions & 20 deletions tests/ui-cargo/cargo_rust_version/fail_cargo/src/main.stderr

This file was deleted.

19 changes: 19 additions & 0 deletions tests/ui-cargo/cargo_rust_version/fail_clippy/Cargo.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
error: unnecessary structure name repetition
--> src/main.rs:6:21
|
6 | pub fn bar() -> Foo {
| ^^^ help: use the applicable keyword: `Self`
|
note: the lint level is defined here
--> src/main.rs:1:9
|
1 | #![deny(clippy::use_self)]
| ^^^^^^^^^^^^^^^^

error: unnecessary structure name repetition
--> src/main.rs:7:9
|
7 | Foo
| ^^^ help: use the applicable keyword: `Self`

error: could not compile `fail-clippy` due to 2 previous errors
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
error: unnecessary structure name repetition
--> $DIR/main.rs:6:21
--> src/main.rs:11:21
|
LL | pub fn bar() -> Foo {
11 | pub fn bar() -> Foo {
| ^^^ help: use the applicable keyword: `Self`
|
note: the lint level is defined here
--> $DIR/main.rs:1:9
--> src/main.rs:6:9
|
LL | #![deny(clippy::use_self)]
6 | #![deny(clippy::use_self)]
| ^^^^^^^^^^^^^^^^

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

error: aborting due to 2 previous errors

error: could not compile `fail-file-attr` due to 2 previous errors
20 changes: 0 additions & 20 deletions tests/ui-cargo/cargo_rust_version/fail_file_attr/src/main.stderr

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Finished dev [unoptimized + debuginfo] target(s)
1 change: 1 addition & 0 deletions tests/ui-cargo/cargo_rust_version/pass_cargo/Cargo.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Finished dev [unoptimized + debuginfo] target(s)
1 change: 1 addition & 0 deletions tests/ui-cargo/cargo_rust_version/pass_clippy/Cargo.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Finished dev [unoptimized + debuginfo] target(s)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Finished dev [unoptimized + debuginfo] target(s)
4 changes: 4 additions & 0 deletions tests/ui-cargo/cargo_rust_version/warn_both_diff/Cargo.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
warning: the MSRV in `clippy.toml` and `Cargo.toml` differ; using `1.13.0` from `clippy.toml`

warning: `warn-both-diff` (bin "warn-both-diff") generated 1 warning
Finished dev [unoptimized + debuginfo] target(s)

This file was deleted.

Loading

0 comments on commit 29c179c

Please sign in to comment.