Skip to content

Commit 40ce3a8

Browse files
committed
add tests for stutter lints
1 parent 12a82b2 commit 40ce3a8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/compile-fail/stutter.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#![feature(plugin)]
2+
#![plugin(clippy)]
3+
#![deny(stutter)]
4+
#![allow(dead_code)]
5+
6+
mod foo {
7+
pub fn foo() {}
8+
pub fn foo_bar() {} //~ ERROR: item name starts with its containing module's name
9+
pub fn bar_foo() {} //~ ERROR: item name ends with its containing module's name
10+
pub struct FooCake {} //~ ERROR: item name starts with its containing module's name
11+
pub enum CakeFoo {} //~ ERROR: item name ends with its containing module's name
12+
}
13+
14+
fn main() {}

0 commit comments

Comments
 (0)