Merge pull request #2232 from yegeunyang/#2114

Add a link to declare_lint! macro doc in diagnostics.md
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2025-01-29 04:08:54 +00:00 committed by GitHub
commit d8cca31abf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -602,7 +602,7 @@ 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 includes the name, the default level, a short description, and some
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
more details.
Note that the lint and the lint pass must be registered with the compiler.