Skip to content

Commit 67fb149

Browse files
committed
Add note about lint level attributes to pre-expansion lints
1 parent 3720735 commit 67fb149

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

clippy_lints/src/dbg_macro.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ declare_clippy_lint! {
1515
/// `dbg!` macro is intended as a debugging tool. It
1616
/// should not be in version control.
1717
///
18+
/// ### Known problems!
19+
/// * The lint level can't be changed by attributes, like most other lints.
20+
/// To change the lint level, please use command line flags instead.
21+
/// More information and a configuration example can be found in [clippy#6610].
22+
///
23+
/// [clippy#6610]: https://github.com/rust-lang/rust-clippy/issues/6610#issuecomment-977120558
24+
///
1825
/// ### Example
1926
/// ```rust,ignore
2027
/// // Bad

clippy_lints/src/write.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,12 @@ declare_clippy_lint! {
7272
/// application and might forget to remove those prints afterward.
7373
///
7474
/// ### Known problems
75-
/// Only catches `print!` and `println!` calls.
75+
/// * Only catches `print!` and `println!` calls.
76+
/// * The lint level can't be changed by attributes, like most other lints.
77+
/// To change the lint level, please use command line flags instead.
78+
/// More information and a configuration example can be found in [clippy#6610].
79+
///
80+
/// [clippy#6610]: https://github.com/rust-lang/rust-clippy/issues/6610#issuecomment-977120558
7681
///
7782
/// ### Example
7883
/// ```rust
@@ -94,7 +99,12 @@ declare_clippy_lint! {
9499
/// application and might forget to remove those prints afterward.
95100
///
96101
/// ### Known problems
97-
/// Only catches `eprint!` and `eprintln!` calls.
102+
/// * Only catches `eprint!` and `eprintln!` calls.
103+
/// * The lint level can't be changed by attributes, like most other lints.
104+
/// To change the lint level, please use command line flags instead.
105+
/// More information and a configuration example can be found in [clippy#6610].
106+
///
107+
/// [clippy#6610]: https://github.com/rust-lang/rust-clippy/issues/6610#issuecomment-977120558
98108
///
99109
/// ### Example
100110
/// ```rust

0 commit comments

Comments
 (0)