diff options
Diffstat (limited to '')
6 files changed, 24 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/Cargo.toml b/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/Cargo.toml new file mode 100644 index 000000000..1c2991695 --- /dev/null +++ b/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "pass-mod" +version = "0.1.0" +edition = "2018" +publish = false + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/bad/mod.rs b/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/bad/mod.rs new file mode 100644 index 000000000..f19ab10d5 --- /dev/null +++ b/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/bad/mod.rs @@ -0,0 +1 @@ +pub struct Thing; diff --git a/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/main.rs b/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/main.rs new file mode 100644 index 000000000..9e08715fc --- /dev/null +++ b/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/main.rs @@ -0,0 +1,10 @@ +#![warn(clippy::self_named_module_files)] + +mod bad; +mod more; + +fn main() { + let _ = bad::Thing; + let _ = more::foo::Foo; + let _ = more::inner::Inner; +} diff --git a/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/more/foo.rs b/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/more/foo.rs new file mode 100644 index 000000000..4a835673a --- /dev/null +++ b/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/more/foo.rs @@ -0,0 +1 @@ +pub struct Foo; diff --git a/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/more/inner/mod.rs b/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/more/inner/mod.rs new file mode 100644 index 000000000..aa84f78cc --- /dev/null +++ b/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/more/inner/mod.rs @@ -0,0 +1 @@ +pub struct Inner; diff --git a/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/more/mod.rs b/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/more/mod.rs new file mode 100644 index 000000000..d79569f78 --- /dev/null +++ b/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/more/mod.rs @@ -0,0 +1,2 @@ +pub mod foo; +pub mod inner; |