-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #12445 - y21:document-diagnostic-utils, r=xFrednet
add documentation to the `span_lint_hir` functions As far as I could tell, these weren't documented anywhere, and since this is sometimes needed over `span_lint` for `#[allow]` attrs to work, I thought I would add a little bit of documentation. When I started with clippy development, I also had no idea what these functions were for. changelog: none
- Loading branch information
Showing
3 changed files
with
129 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
avoid-breaking-exported-api = false | ||
|
||
# use the various `span_lint_*` methods instead, which also add a link to the docs | ||
disallowed-methods = [ | ||
"rustc_lint::context::LintContext::span_lint", | ||
"rustc_middle::ty::context::TyCtxt::node_span_lint" | ||
] | ||
[[disallowed-methods]] | ||
path = "rustc_lint::context::LintContext::span_lint" | ||
reason = "this function does not add a link to our documentation, please use the `clippy_utils::diagnostics::span_lint*` functions instead" | ||
|
||
|
||
[[disallowed-methods]] | ||
path = "rustc_middle::ty::context::TyCtxt::node_span_lint" | ||
reason = "this function does not add a link to our documentation, please use the `clippy_utils::diagnostics::span_lint_hir*` functions instead" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters