From 551220c48dccc839a00b490835b3962b1a838c82 Mon Sep 17 00:00:00 2001 From: "Samuel E. Moelius III" Date: Thu, 23 Sep 2021 22:05:26 -0400 Subject: [PATCH] Add known-tool-in-submodule test The test currently fails. The next commit fixes it. --- src/test/ui/lint/known-tool-in-submodule/root.rs | 10 ++++++++++ src/test/ui/lint/known-tool-in-submodule/submodule.rs | 4 ++++ 2 files changed, 14 insertions(+) create mode 100644 src/test/ui/lint/known-tool-in-submodule/root.rs create mode 100644 src/test/ui/lint/known-tool-in-submodule/submodule.rs diff --git a/src/test/ui/lint/known-tool-in-submodule/root.rs b/src/test/ui/lint/known-tool-in-submodule/root.rs new file mode 100644 index 00000000000..80806dcbd28 --- /dev/null +++ b/src/test/ui/lint/known-tool-in-submodule/root.rs @@ -0,0 +1,10 @@ +// check-pass + +#![feature(register_tool)] +#![register_tool(tool)] + +mod submodule; + +fn main() { + submodule::foo(); +} diff --git a/src/test/ui/lint/known-tool-in-submodule/submodule.rs b/src/test/ui/lint/known-tool-in-submodule/submodule.rs new file mode 100644 index 00000000000..bb25e10056f --- /dev/null +++ b/src/test/ui/lint/known-tool-in-submodule/submodule.rs @@ -0,0 +1,4 @@ +// ignore-test: not a test + +#[allow(tool::lint)] +pub fn foo() {}