about summary refs log tree commit diff
diff options
context:
space:
mode:
authorxFrednet <xFrednet@gmail.com>2021-12-03 19:29:57 +0100
committerxFrednet <xFrednet@gmail.com>2021-12-03 19:29:57 +0100
commit11ad5a26a97962e76ae532f09cd64ed032a3a598 (patch)
tree34edaf09ca4b5a3467402135b3c48832d2ce6f4e
parentbe1a73b8943bd8051faef511f011904a2c186cd8 (diff)
downloadrust-11ad5a26a97962e76ae532f09cd64ed032a3a598.tar.gz
rust-11ad5a26a97962e76ae532f09cd64ed032a3a598.zip
Add note about crate lint level attributes to pre-expansion lints
-rw-r--r--clippy_lints/src/dbg_macro.rs8
-rw-r--r--clippy_lints/src/write.rs16
2 files changed, 22 insertions, 2 deletions
diff --git a/clippy_lints/src/dbg_macro.rs b/clippy_lints/src/dbg_macro.rs
index 1aae4c81c73..5a0b60fdfbc 100644
--- a/clippy_lints/src/dbg_macro.rs
+++ b/clippy_lints/src/dbg_macro.rs
@@ -15,6 +15,14 @@ declare_clippy_lint! {
     /// `dbg!` macro is intended as a debugging tool. It
     /// should not be in version control.
     ///
+    /// ### Known problems
+    /// * The lint level is unaffected by crate attributes. The level can still
+    ///   be set for functions, modules and other items. To change the level for
+    ///   the entire crate, please use command line flags. More information and a
+    ///   configuration example can be found in [clippy#6610].
+    ///
+    /// [clippy#6610]: https://github.com/rust-lang/rust-clippy/issues/6610#issuecomment-977120558
+    ///
     /// ### Example
     /// ```rust,ignore
     /// // Bad
diff --git a/clippy_lints/src/write.rs b/clippy_lints/src/write.rs
index bfa9407285b..c90fca24ad4 100644
--- a/clippy_lints/src/write.rs
+++ b/clippy_lints/src/write.rs
@@ -72,7 +72,13 @@ declare_clippy_lint! {
     /// application and might forget to remove those prints afterward.
     ///
     /// ### Known problems
-    /// Only catches `print!` and `println!` calls.
+    /// * Only catches `print!` and `println!` calls.
+    /// * The lint level is unaffected by crate attributes. The level can still
+    ///   be set for functions, modules and other items. To change the level for
+    ///   the entire crate, please use command line flags. More information and a
+    ///   configuration example can be found in [clippy#6610].
+    ///
+    /// [clippy#6610]: https://github.com/rust-lang/rust-clippy/issues/6610#issuecomment-977120558
     ///
     /// ### Example
     /// ```rust
@@ -94,7 +100,13 @@ declare_clippy_lint! {
     /// application and might forget to remove those prints afterward.
     ///
     /// ### Known problems
-    /// Only catches `eprint!` and `eprintln!` calls.
+    /// * Only catches `eprint!` and `eprintln!` calls.
+    /// * The lint level is unaffected by crate attributes. The level can still
+    ///   be set for functions, modules and other items. To change the level for
+    ///   the entire crate, please use command line flags. More information and a
+    ///   configuration example can be found in [clippy#6610].
+    ///
+    /// [clippy#6610]: https://github.com/rust-lang/rust-clippy/issues/6610#issuecomment-977120558
     ///
     /// ### Example
     /// ```rust