Skip to content

Commit 60cc6b9

Browse files
committed
Add renaming tests
1 parent 0516c2e commit 60cc6b9

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

tests/ui/rename.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution.
3+
//
4+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7+
// option. This file may not be copied, modified, or distributed
8+
// except according to those terms.
9+
10+
#![allow(stutter)]
11+
12+
#[warn(clippy::stutter)]
13+
fn main() {}

tests/ui/rename.stderr

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
error: unknown lint: `stutter`
2+
--> $DIR/rename.rs:10:10
3+
|
4+
10 | #![allow(stutter)]
5+
| ^^^^^^^
6+
|
7+
= note: `-D unknown-lints` implied by `-D warnings`
8+
9+
error: lint `clippy::stutter` has been renamed to `clippy::module_name_repeat`
10+
--> $DIR/rename.rs:12:8
11+
|
12+
12 | #[warn(clippy::stutter)]
13+
| ^^^^^^^^^^^^^^^ help: use the new name: `clippy::module_name_repeat`
14+
|
15+
= note: `-D renamed-and-removed-lints` implied by `-D warnings`
16+
17+
error: aborting due to 2 previous errors
18+

0 commit comments

Comments
 (0)