mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 07:00:55 +00:00
Add renaming tests
This commit is contained in:
parent
0516c2e04a
commit
60cc6b9319
2 changed files with 31 additions and 0 deletions
13
tests/ui/rename.rs
Normal file
13
tests/ui/rename.rs
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
// Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
// file at the top-level directory of this distribution.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
// option. This file may not be copied, modified, or distributed
|
||||||
|
// except according to those terms.
|
||||||
|
|
||||||
|
#![allow(stutter)]
|
||||||
|
|
||||||
|
#[warn(clippy::stutter)]
|
||||||
|
fn main() {}
|
18
tests/ui/rename.stderr
Normal file
18
tests/ui/rename.stderr
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
error: unknown lint: `stutter`
|
||||||
|
--> $DIR/rename.rs:10:10
|
||||||
|
|
|
||||||
|
10 | #![allow(stutter)]
|
||||||
|
| ^^^^^^^
|
||||||
|
|
|
||||||
|
= note: `-D unknown-lints` implied by `-D warnings`
|
||||||
|
|
||||||
|
error: lint `clippy::stutter` has been renamed to `clippy::module_name_repeat`
|
||||||
|
--> $DIR/rename.rs:12:8
|
||||||
|
|
|
||||||
|
12 | #[warn(clippy::stutter)]
|
||||||
|
| ^^^^^^^^^^^^^^^ help: use the new name: `clippy::module_name_repeat`
|
||||||
|
|
|
||||||
|
= note: `-D renamed-and-removed-lints` implied by `-D warnings`
|
||||||
|
|
||||||
|
error: aborting due to 2 previous errors
|
||||||
|
|
Loading…
Reference in a new issue