Improve tests
This commit is contained in:
parent
5962fffcfe
commit
6e525fc7b1
18
tests/ui/unknown_clippy_lints.fixed
Normal file
18
tests/ui/unknown_clippy_lints.fixed
Normal file
@ -0,0 +1,18 @@
|
||||
// run-rustfix
|
||||
|
||||
#![warn(clippy::pedantic)]
|
||||
// Should suggest lowercase
|
||||
#![allow(clippy::all)]
|
||||
#![warn(clippy::cmp_nan)]
|
||||
|
||||
// Should suggest similar clippy lint name
|
||||
#[warn(clippy::if_not_else)]
|
||||
#[warn(clippy::unnecessary_cast)]
|
||||
#[warn(clippy::useless_transmute)]
|
||||
// Shouldn't suggest rustc lint name(`dead_code`)
|
||||
#[warn(clippy::drop_copy)]
|
||||
// Shouldn't suggest removed/deprecated clippy lint name(`unused_collect`)
|
||||
#[warn(clippy::unused_self)]
|
||||
// Shouldn't suggest renamed clippy lint name(`const_static_lifetime`)
|
||||
#[warn(clippy::redundant_static_lifetimes)]
|
||||
fn main() {}
|
@ -1,5 +1,18 @@
|
||||
#![allow(clippy::All)]
|
||||
#![warn(clippy::pedantic)]
|
||||
// run-rustfix
|
||||
|
||||
#![warn(clippy::pedantic)]
|
||||
// Should suggest lowercase
|
||||
#![allow(clippy::All)]
|
||||
#![warn(clippy::CMP_NAN)]
|
||||
|
||||
// Should suggest similar clippy lint name
|
||||
#[warn(clippy::if_not_els)]
|
||||
#[warn(clippy::UNNecsaRy_cAst)]
|
||||
#[warn(clippy::useles_transute)]
|
||||
// Shouldn't suggest rustc lint name(`dead_code`)
|
||||
#[warn(clippy::dead_cod)]
|
||||
// Shouldn't suggest removed/deprecated clippy lint name(`unused_collect`)
|
||||
#[warn(clippy::unused_colle)]
|
||||
// Shouldn't suggest renamed clippy lint name(`const_static_lifetime`)
|
||||
#[warn(clippy::const_static_lifetim)]
|
||||
fn main() {}
|
||||
|
@ -1,16 +1,52 @@
|
||||
error: unknown clippy lint: clippy::if_not_els
|
||||
--> $DIR/unknown_clippy_lints.rs:4:8
|
||||
--> $DIR/unknown_clippy_lints.rs:9:8
|
||||
|
|
||||
LL | #[warn(clippy::if_not_els)]
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^^^^^^^^ help: did you mean: `clippy::if_not_else`
|
||||
|
|
||||
= note: `-D clippy::unknown-clippy-lints` implied by `-D warnings`
|
||||
|
||||
error: unknown clippy lint: clippy::UNNecsaRy_cAst
|
||||
--> $DIR/unknown_clippy_lints.rs:10:8
|
||||
|
|
||||
LL | #[warn(clippy::UNNecsaRy_cAst)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `clippy::unnecessary_cast`
|
||||
|
||||
error: unknown clippy lint: clippy::useles_transute
|
||||
--> $DIR/unknown_clippy_lints.rs:11:8
|
||||
|
|
||||
LL | #[warn(clippy::useles_transute)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `clippy::useless_transmute`
|
||||
|
||||
error: unknown clippy lint: clippy::dead_cod
|
||||
--> $DIR/unknown_clippy_lints.rs:13:8
|
||||
|
|
||||
LL | #[warn(clippy::dead_cod)]
|
||||
| ^^^^^^^^^^^^^^^^ help: did you mean: `clippy::drop_copy`
|
||||
|
||||
error: unknown clippy lint: clippy::unused_colle
|
||||
--> $DIR/unknown_clippy_lints.rs:15:8
|
||||
|
|
||||
LL | #[warn(clippy::unused_colle)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^ help: did you mean: `clippy::unused_self`
|
||||
|
||||
error: unknown clippy lint: clippy::const_static_lifetim
|
||||
--> $DIR/unknown_clippy_lints.rs:17:8
|
||||
|
|
||||
LL | #[warn(clippy::const_static_lifetim)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `clippy::redundant_static_lifetimes`
|
||||
|
||||
error: unknown clippy lint: clippy::All
|
||||
--> $DIR/unknown_clippy_lints.rs:1:10
|
||||
--> $DIR/unknown_clippy_lints.rs:5:10
|
||||
|
|
||||
LL | #![allow(clippy::All)]
|
||||
| ^^^^^^^^^^^ help: lowercase the lint name: `all`
|
||||
| ^^^^^^^^^^^ help: lowercase the lint name: `clippy::all`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: unknown clippy lint: clippy::CMP_NAN
|
||||
--> $DIR/unknown_clippy_lints.rs:6:9
|
||||
|
|
||||
LL | #![warn(clippy::CMP_NAN)]
|
||||
| ^^^^^^^^^^^^^^^ help: lowercase the lint name: `clippy::cmp_nan`
|
||||
|
||||
error: aborting due to 8 previous errors
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user