about summary refs log tree commit diff
path: root/tests/ui/tool-attributes
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2024-12-03 00:12:24 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2025-04-04 12:37:38 +0000
commit280a1d8edb8322280bb9b10fab41c7bfb43d67b2 (patch)
tree889135090759548e237ffb07de32b35be4696a31 /tests/ui/tool-attributes
parentf174fd716a429fa17eb1e98ba4e382f09312f8ad (diff)
downloadrust-280a1d8edb8322280bb9b10fab41c7bfb43d67b2.tar.gz
rust-280a1d8edb8322280bb9b10fab41c7bfb43d67b2.zip
Do not visit whole crate to compute `lints_that_dont_need_to_run`.
Diffstat (limited to 'tests/ui/tool-attributes')
-rw-r--r--tests/ui/tool-attributes/tool_lints.rs1
-rw-r--r--tests/ui/tool-attributes/tool_lints.stderr11
-rw-r--r--tests/ui/tool-attributes/unknown-lint-tool-name.rs1
-rw-r--r--tests/ui/tool-attributes/unknown-lint-tool-name.stderr11
4 files changed, 22 insertions, 2 deletions
diff --git a/tests/ui/tool-attributes/tool_lints.rs b/tests/ui/tool-attributes/tool_lints.rs
index ef27532f6de..9e4aa7a939a 100644
--- a/tests/ui/tool-attributes/tool_lints.rs
+++ b/tests/ui/tool-attributes/tool_lints.rs
@@ -1,4 +1,5 @@
 #[warn(foo::bar)]
 //~^ ERROR unknown tool name `foo` found in scoped lint: `foo::bar`
 //~| ERROR unknown tool name `foo` found in scoped lint: `foo::bar`
+//~| ERROR unknown tool name `foo` found in scoped lint: `foo::bar`
 fn main() {}
diff --git a/tests/ui/tool-attributes/tool_lints.stderr b/tests/ui/tool-attributes/tool_lints.stderr
index f1d825caba1..eee0a9784ec 100644
--- a/tests/ui/tool-attributes/tool_lints.stderr
+++ b/tests/ui/tool-attributes/tool_lints.stderr
@@ -15,6 +15,15 @@ LL | #[warn(foo::bar)]
    = help: add `#![register_tool(foo)]` to the crate root
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: aborting due to 2 previous errors
+error[E0710]: unknown tool name `foo` found in scoped lint: `foo::bar`
+  --> $DIR/tool_lints.rs:1:8
+   |
+LL | #[warn(foo::bar)]
+   |        ^^^
+   |
+   = help: add `#![register_tool(foo)]` to the crate root
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0710`.
diff --git a/tests/ui/tool-attributes/unknown-lint-tool-name.rs b/tests/ui/tool-attributes/unknown-lint-tool-name.rs
index 59fc56d820e..84ab7c1944a 100644
--- a/tests/ui/tool-attributes/unknown-lint-tool-name.rs
+++ b/tests/ui/tool-attributes/unknown-lint-tool-name.rs
@@ -4,4 +4,5 @@
 
 #[allow(foo::bar)] //~ ERROR unknown tool name `foo` found in scoped lint: `foo::bar`
                    //~| ERROR unknown tool name `foo` found in scoped lint: `foo::bar`
+                   //~| ERROR unknown tool name `foo` found in scoped lint: `foo::bar`
 fn main() {}
diff --git a/tests/ui/tool-attributes/unknown-lint-tool-name.stderr b/tests/ui/tool-attributes/unknown-lint-tool-name.stderr
index 5d99777a14a..91baf882737 100644
--- a/tests/ui/tool-attributes/unknown-lint-tool-name.stderr
+++ b/tests/ui/tool-attributes/unknown-lint-tool-name.stderr
@@ -41,6 +41,15 @@ LL | #![deny(foo::bar)]
    = help: add `#![register_tool(foo)]` to the crate root
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: aborting due to 5 previous errors
+error[E0710]: unknown tool name `foo` found in scoped lint: `foo::bar`
+  --> $DIR/unknown-lint-tool-name.rs:5:9
+   |
+LL | #[allow(foo::bar)]
+   |         ^^^
+   |
+   = help: add `#![register_tool(foo)]` to the crate root
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 6 previous errors
 
 For more information about this error, try `rustc --explain E0710`.