mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
add tests for stutter lints
This commit is contained in:
parent
12a82b2007
commit
40ce3a8f1c
1 changed files with 14 additions and 0 deletions
14
tests/compile-fail/stutter.rs
Normal file
14
tests/compile-fail/stutter.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
#![feature(plugin)]
|
||||
#![plugin(clippy)]
|
||||
#![deny(stutter)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
mod foo {
|
||||
pub fn foo() {}
|
||||
pub fn foo_bar() {} //~ ERROR: item name starts with its containing module's name
|
||||
pub fn bar_foo() {} //~ ERROR: item name ends with its containing module's name
|
||||
pub struct FooCake {} //~ ERROR: item name starts with its containing module's name
|
||||
pub enum CakeFoo {} //~ ERROR: item name ends with its containing module's name
|
||||
}
|
||||
|
||||
fn main() {}
|
Loading…
Add table
Reference in a new issue