]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/utils/author.rs
Document the author lint
[rust.git] / clippy_lints / src / utils / author.rs
index 192d6671bcba7975b4fbbde58248b097406f214b..9d708d637c3c93db8f9b0db61f4169769ddb2a7e 100644 (file)
@@ -14,6 +14,7 @@
 ///
 /// **Example:**
 /// ```rust
+/// // ./tests/ui/my_lint.rs
 /// fn foo() {
 ///     // detect the following pattern
 ///     #[clippy(author)]
 /// }
 /// ```
 ///
-/// prints
+/// Running `TESTNAME=ui/my_lint cargo test --test compile-test` will produce
+/// a `./tests/ui/new_lint.stdout` file with the generated code:
 ///
-/// ```
+/// ```rust
+/// // ./tests/ui/new_lint.stdout
 /// if_chain!{
 ///     if let Expr_::ExprIf(ref cond, ref then, None) = item.node,
 ///     if let Expr_::ExprBinary(BinOp::Eq, ref left, ref right) = cond.node,