about summary refs log tree commit diff
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2025-02-04 04:18:51 +0800
committerGitHub <noreply@github.com>2025-02-04 04:18:51 +0800
commitca06fbc7627d9be751f969a4df584fd99f8035b5 (patch)
tree72be48ee949b299da534a50d56d74e2503569d54
parentd5796f5e719883752d591df04c2e6ae6cb4aabdf (diff)
parent99d2b3a996b8852122a07a9a06c416ec7a0f0b90 (diff)
downloadrust-ca06fbc7627d9be751f969a4df584fd99f8035b5.tar.gz
rust-ca06fbc7627d9be751f969a4df584fd99f8035b5.zip
Merge pull request #2241 from rust-lang/tshepang-patch-1
-rw-r--r--src/doc/rustc-dev-guide/src/diagnostics.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/doc/rustc-dev-guide/src/diagnostics.md b/src/doc/rustc-dev-guide/src/diagnostics.md
index 8f389640d27..972309b5cd3 100644
--- a/src/doc/rustc-dev-guide/src/diagnostics.md
+++ b/src/doc/rustc-dev-guide/src/diagnostics.md
@@ -601,8 +601,8 @@ The trait implementation allows you to check certain syntactic constructs
 as the linter walks the AST. You can then choose to emit lints in a
 very similar way to compile errors.
 
-You also declare the metadata of a particular lint via the `declare_lint!`
-macro. [This macro](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint_defs/macro.declare_lint.html) includes the name, the default level, a short description, and some
+You also declare the metadata of a particular lint via the [`declare_lint!`]
+macro. This macro includes the name, the default level, a short description, and some
 more details.
 
 Note that the lint and the lint pass must be registered with the compiler.
@@ -671,6 +671,8 @@ example-use-loop = denote infinite loops with `loop {"{"} ... {"}"}`
   .suggestion = use `loop`
 ```
 
+[`declare_lint!`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint_defs/macro.declare_lint.html
+
 ### Edition-gated lints
 
 Sometimes we want to change the behavior of a lint in a new edition. To do this,