Add renaming tests

This commit is contained in:
flip1995 2018-12-17 13:59:09 +01:00
parent 0516c2e04a
commit 60cc6b9319
No known key found for this signature in database
GPG key ID: E8E897A5870E41C2
2 changed files with 31 additions and 0 deletions

13
tests/ui/rename.rs Normal file
View 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
View 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