about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCatherine <114838443+Centri3@users.noreply.github.com>2023-06-27 05:25:54 -0500
committerCatherine <114838443+Centri3@users.noreply.github.com>2023-06-28 03:20:21 -0500
commit46aa8abf08057618038c60c11b98a3c6cff927de (patch)
treeada2917b5902ee07ede08783896d1741049d625e
parent8296a338dba7af1db8a6aff862c4ad46402dc111 (diff)
downloadrust-46aa8abf08057618038c60c11b98a3c6cff927de.tar.gz
rust-46aa8abf08057618038c60c11b98a3c6cff927de.zip
Change category and update to `ui_test`
-rw-r--r--clippy_lints/src/visibility.rs14
-rw-r--r--tests/ui/needless_pub_self.fixed2
-rw-r--r--tests/ui/needless_pub_self.rs2
-rw-r--r--tests/ui/pub_with_shorthand.fixed2
-rw-r--r--tests/ui/pub_with_shorthand.rs2
-rw-r--r--tests/ui/pub_without_shorthand.fixed2
-rw-r--r--tests/ui/pub_without_shorthand.rs2
7 files changed, 15 insertions, 11 deletions
diff --git a/clippy_lints/src/visibility.rs b/clippy_lints/src/visibility.rs
index 635d0ab9652..43248bccc13 100644
--- a/clippy_lints/src/visibility.rs
+++ b/clippy_lints/src/visibility.rs
@@ -23,16 +23,18 @@ declare_clippy_lint! {
     /// ```
     #[clippy::version = "1.72.0"]
     pub NEEDLESS_PUB_SELF,
-    complexity,
+    style,
     "checks for usage of `pub(self)` and `pub(in self)`."
 }
 declare_clippy_lint! {
     /// ### What it does
-    /// Checks for missing usage of the `pub(in <loc>)` shorthand.
+    /// Checks for usage of `pub(<loc>)` with `in`.
     ///
     /// ### Why is this bad?
     /// Consistency. Use it or don't, just be consistent about it.
     ///
+    /// Also see the `pub_without_shorthand` lint for an alternative.
+    ///
     /// ### Example
     /// ```rust,ignore
     /// pub(super) type OptBox<T> = Option<Box<T>>;
@@ -44,11 +46,11 @@ declare_clippy_lint! {
     #[clippy::version = "1.72.0"]
     pub PUB_WITH_SHORTHAND,
     restriction,
-    "disallows usage of the `pub(<loc>)`, suggesting use of the `in` shorthand"
+    "disallows usage of `pub(<loc>)`, without `in`"
 }
 declare_clippy_lint! {
     /// ### What it does
-    /// Checks for usage of the `pub(in <loc>)` shorthand.
+    /// Checks for usage of `pub(<loc>)` without `in`.
     ///
     /// Note: As you cannot write a module's path in `pub(<loc>)`, this will only trigger on
     /// `pub(super)` and the like.
@@ -56,6 +58,8 @@ declare_clippy_lint! {
     /// ### Why is this bad?
     /// Consistency. Use it or don't, just be consistent about it.
     ///
+    /// Also see the `pub_with_shorthand` lint for an alternative.
+    ///
     /// ### Example
     /// ```rust,ignore
     /// pub(in super) type OptBox<T> = Option<Box<T>>;
@@ -67,7 +71,7 @@ declare_clippy_lint! {
     #[clippy::version = "1.72.0"]
     pub PUB_WITHOUT_SHORTHAND,
     restriction,
-    "disallows usage of the `pub(in <loc>)` shorthand wherever possible"
+    "disallows usage of `pub(in <loc>)` with `in`"
 }
 declare_lint_pass!(Visibility => [NEEDLESS_PUB_SELF, PUB_WITH_SHORTHAND, PUB_WITHOUT_SHORTHAND]);
 
diff --git a/tests/ui/needless_pub_self.fixed b/tests/ui/needless_pub_self.fixed
index bf5e70d9a05..672b4c318a8 100644
--- a/tests/ui/needless_pub_self.fixed
+++ b/tests/ui/needless_pub_self.fixed
@@ -1,5 +1,5 @@
 //@run-rustfix
-//@aux-build:proc_macros.rs
+//@aux-build:proc_macros.rs:proc-macro
 #![feature(custom_inner_attributes)]
 #![allow(unused)]
 #![warn(clippy::needless_pub_self)]
diff --git a/tests/ui/needless_pub_self.rs b/tests/ui/needless_pub_self.rs
index a49a6658f8b..5ac1edf8e99 100644
--- a/tests/ui/needless_pub_self.rs
+++ b/tests/ui/needless_pub_self.rs
@@ -1,5 +1,5 @@
 //@run-rustfix
-//@aux-build:proc_macros.rs
+//@aux-build:proc_macros.rs:proc-macro
 #![feature(custom_inner_attributes)]
 #![allow(unused)]
 #![warn(clippy::needless_pub_self)]
diff --git a/tests/ui/pub_with_shorthand.fixed b/tests/ui/pub_with_shorthand.fixed
index c9487ed7fc3..a774faa0a67 100644
--- a/tests/ui/pub_with_shorthand.fixed
+++ b/tests/ui/pub_with_shorthand.fixed
@@ -1,5 +1,5 @@
 //@run-rustfix
-//@aux-build:proc_macros.rs
+//@aux-build:proc_macros.rs:proc-macro
 #![feature(custom_inner_attributes)]
 #![allow(clippy::needless_pub_self, unused)]
 #![warn(clippy::pub_with_shorthand)]
diff --git a/tests/ui/pub_with_shorthand.rs b/tests/ui/pub_with_shorthand.rs
index e47c926520b..4a4bbc18728 100644
--- a/tests/ui/pub_with_shorthand.rs
+++ b/tests/ui/pub_with_shorthand.rs
@@ -1,5 +1,5 @@
 //@run-rustfix
-//@aux-build:proc_macros.rs
+//@aux-build:proc_macros.rs:proc-macro
 #![feature(custom_inner_attributes)]
 #![allow(clippy::needless_pub_self, unused)]
 #![warn(clippy::pub_with_shorthand)]
diff --git a/tests/ui/pub_without_shorthand.fixed b/tests/ui/pub_without_shorthand.fixed
index 55159efb5bf..fdb49ac4d90 100644
--- a/tests/ui/pub_without_shorthand.fixed
+++ b/tests/ui/pub_without_shorthand.fixed
@@ -1,5 +1,5 @@
 //@run-rustfix
-//@aux-build:proc_macros.rs
+//@aux-build:proc_macros.rs:proc-macro
 #![feature(custom_inner_attributes)]
 #![allow(clippy::needless_pub_self, unused)]
 #![warn(clippy::pub_without_shorthand)]
diff --git a/tests/ui/pub_without_shorthand.rs b/tests/ui/pub_without_shorthand.rs
index 38f4da85a49..1f2ef7ece39 100644
--- a/tests/ui/pub_without_shorthand.rs
+++ b/tests/ui/pub_without_shorthand.rs
@@ -1,5 +1,5 @@
 //@run-rustfix
-//@aux-build:proc_macros.rs
+//@aux-build:proc_macros.rs:proc-macro
 #![feature(custom_inner_attributes)]
 #![allow(clippy::needless_pub_self, unused)]
 #![warn(clippy::pub_without_shorthand)]