From 40ce3a8f1c62ec403ac9790c0d45f964efe2c504 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Tue, 13 Sep 2016 10:20:10 +0200 Subject: [PATCH] add tests for stutter lints --- tests/compile-fail/stutter.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/compile-fail/stutter.rs diff --git a/tests/compile-fail/stutter.rs b/tests/compile-fail/stutter.rs new file mode 100644 index 00000000000..0c99859c10d --- /dev/null +++ b/tests/compile-fail/stutter.rs @@ -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() {}