]> git.lizzy.rs Git - rust.git/blob - tests/ui/module_name_repetitions.rs
Auto merge of #7059 - camsteffen:filter-map, r=flip1995
[rust.git] / tests / ui / module_name_repetitions.rs
1 // compile-flags: --test
2
3 #![warn(clippy::module_name_repetitions)]
4 #![allow(dead_code)]
5
6 mod foo {
7     pub fn foo() {}
8     pub fn foo_bar() {}
9     pub fn bar_foo() {}
10     pub struct FooCake {}
11     pub enum CakeFoo {}
12     pub struct Foo7Bar;
13
14     // Should not warn
15     pub struct Foobar;
16 }
17
18 #[cfg(test)]
19 mod test {
20     #[test]
21     fn it_works() {
22         assert_eq!(2 + 2, 4);
23     }
24 }
25
26 fn main() {}