]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/module_name_repetitions.rs
New upstream version 1.52.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / module_name_repetitions.rs
CommitLineData
f20569fa
XL
1// compile-flags: --test
2
3#![warn(clippy::module_name_repetitions)]
4#![allow(dead_code)]
5
6mod 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)]
19mod test {
20 #[test]
21 fn it_works() {
22 assert_eq!(2 + 2, 4);
23 }
24}
25
26fn main() {}