@@ -89,13 +89,14 @@ declare_clippy_lint! {
8989 ///
9090 /// ### Example
9191 /// ```ignore
92- /// // Bad
9392 /// #[deny(dead_code)]
9493 /// extern crate foo;
9594 /// #[forbid(dead_code)]
9695 /// use foo::bar;
96+ /// ```
9797 ///
98- /// // Ok
98+ /// Use instead:
99+ /// ```rust,ignore
99100 /// #[allow(unused_imports)]
100101 /// use foo::baz;
101102 /// #[allow(unused_imports)]
@@ -146,15 +147,19 @@ declare_clippy_lint! {
146147 ///
147148 /// ### Example
148149 /// ```rust
150+ /// #[allow(dead_code)]
151+ ///
152+ /// fn not_quite_good_code() { }
153+ /// ```
154+ ///
155+ /// Use instead:
156+ /// ```rust
149157 /// // Good (as inner attribute)
150158 /// #![allow(dead_code)]
151159 ///
152160 /// fn this_is_fine() { }
153161 ///
154- /// // Bad
155- /// #[allow(dead_code)]
156- ///
157- /// fn not_quite_good_code() { }
162+ /// // or
158163 ///
159164 /// // Good (as outer attribute)
160165 /// #[allow(dead_code)]
@@ -175,12 +180,11 @@ declare_clippy_lint! {
175180 /// These lints should only be enabled on a lint-by-lint basis and with careful consideration.
176181 ///
177182 /// ### Example
178- /// Bad:
179183 /// ```rust
180184 /// #![deny(clippy::restriction)]
181185 /// ```
182186 ///
183- /// Good :
187+ /// Use instead :
184188 /// ```rust
185189 /// #![deny(clippy::as_conversions)]
186190 /// ```
@@ -205,13 +209,12 @@ declare_clippy_lint! {
205209 /// [#3123](https://github.com/rust-lang/rust-clippy/pull/3123#issuecomment-422321765)
206210 ///
207211 /// ### Example
208- /// Bad:
209212 /// ```rust
210213 /// #[cfg_attr(rustfmt, rustfmt_skip)]
211214 /// fn main() { }
212215 /// ```
213216 ///
214- /// Good :
217+ /// Use instead :
215218 /// ```rust
216219 /// #[rustfmt::skip]
217220 /// fn main() { }
@@ -231,20 +234,20 @@ declare_clippy_lint! {
231234 /// by the conditional compilation engine.
232235 ///
233236 /// ### Example
234- /// Bad:
235237 /// ```rust
236238 /// #[cfg(linux)]
237239 /// fn conditional() { }
238240 /// ```
239241 ///
240- /// Good :
242+ /// Use instead :
241243 /// ```rust
244+ /// # mod hidden {
242245 /// #[cfg(target_os = "linux")]
243246 /// fn conditional() { }
244- /// ```
247+ /// # }
248+ ///
249+ /// // or
245250 ///
246- /// Or:
247- /// ```rust
248251 /// #[cfg(unix)]
249252 /// fn conditional() { }
250253 /// ```
@@ -266,14 +269,13 @@ declare_clippy_lint! {
266269 /// ensure that others understand the reasoning
267270 ///
268271 /// ### Example
269- /// Bad:
270272 /// ```rust
271273 /// #![feature(lint_reasons)]
272274 ///
273275 /// #![allow(clippy::some_lint)]
274276 /// ```
275277 ///
276- /// Good :
278+ /// Use instead :
277279 /// ```rust
278280 /// #![feature(lint_reasons)]
279281 ///
0 commit comments