mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 09:44:08 +00:00
Restructure rename tests
This commit is contained in:
parent
fefa7e7f67
commit
7e07d1bed8
@ -1,4 +1,11 @@
|
||||
#![allow(stutter)]
|
||||
//! Test for Clippy lint renames.
|
||||
|
||||
// allow the new lint name here, to test if the new name works
|
||||
#![allow(clippy::module_name_repetitions)]
|
||||
#![allow(clippy::new_without_default)]
|
||||
#![allow(clippy::cognitive_complexity)]
|
||||
#![allow(clippy::redundant_static_lifetimes)]
|
||||
// warn for the old lint name here, to test if the renaming worked
|
||||
#![warn(clippy::cyclomatic_complexity)]
|
||||
|
||||
#[warn(clippy::stutter)]
|
||||
|
@ -1,13 +1,5 @@
|
||||
error: unknown lint: `stutter`
|
||||
--> $DIR/rename.rs:1:10
|
||||
|
|
||||
LL | #![allow(stutter)]
|
||||
| ^^^^^^^
|
||||
|
|
||||
= note: `-D unknown-lints` implied by `-D warnings`
|
||||
|
||||
error: lint `clippy::cyclomatic_complexity` has been renamed to `clippy::cognitive_complexity`
|
||||
--> $DIR/rename.rs:2:9
|
||||
--> $DIR/rename.rs:9:9
|
||||
|
|
||||
LL | #![warn(clippy::cyclomatic_complexity)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::cognitive_complexity`
|
||||
@ -15,42 +7,28 @@ LL | #![warn(clippy::cyclomatic_complexity)]
|
||||
= note: `-D renamed-and-removed-lints` implied by `-D warnings`
|
||||
|
||||
error: lint `clippy::stutter` has been renamed to `clippy::module_name_repetitions`
|
||||
--> $DIR/rename.rs:4:8
|
||||
--> $DIR/rename.rs:11:8
|
||||
|
|
||||
LL | #[warn(clippy::stutter)]
|
||||
| ^^^^^^^^^^^^^^^ help: use the new name: `clippy::module_name_repetitions`
|
||||
|
||||
error: lint `clippy::new_without_default_derive` has been renamed to `clippy::new_without_default`
|
||||
--> $DIR/rename.rs:7:8
|
||||
--> $DIR/rename.rs:14:8
|
||||
|
|
||||
LL | #[warn(clippy::new_without_default_derive)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::new_without_default`
|
||||
|
||||
error: lint `clippy::const_static_lifetime` has been renamed to `clippy::redundant_static_lifetimes`
|
||||
--> $DIR/rename.rs:10:8
|
||||
--> $DIR/rename.rs:17:8
|
||||
|
|
||||
LL | #[warn(clippy::const_static_lifetime)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::redundant_static_lifetimes`
|
||||
|
||||
error: unknown lint: `stutter`
|
||||
--> $DIR/rename.rs:1:10
|
||||
|
|
||||
LL | #![allow(stutter)]
|
||||
| ^^^^^^^
|
||||
|
||||
error: lint `clippy::cyclomatic_complexity` has been renamed to `clippy::cognitive_complexity`
|
||||
--> $DIR/rename.rs:2:9
|
||||
--> $DIR/rename.rs:9:9
|
||||
|
|
||||
LL | #![warn(clippy::cyclomatic_complexity)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::cognitive_complexity`
|
||||
|
||||
error: Statics have by default a `'static` lifetime
|
||||
--> $DIR/rename.rs:11:14
|
||||
|
|
||||
LL | static Bar: &'static str = "baz";
|
||||
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
||||
|
|
||||
= note: `-D clippy::redundant-static-lifetimes` implied by `-D warnings`
|
||||
|
||||
error: aborting due to 8 previous errors
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user