diff options
| author | blyxyas <blyxyas@gmail.com> | 2023-09-02 11:30:16 +0200 |
|---|---|---|
| committer | blyxyas <blyxyas@gmail.com> | 2023-09-02 11:46:20 +0200 |
| commit | a26937ff0ee654a46846dbdf50afb9866362b9ff (patch) | |
| tree | ceb2965013cd93c959ee8c56dc8a0afc0728d7ae | |
| parent | 9b8b83556b508076d9bc1d5195fc4dafff7fbd0e (diff) | |
| download | rust-a26937ff0ee654a46846dbdf50afb9866362b9ff.tar.gz rust-a26937ff0ee654a46846dbdf50afb9866362b9ff.zip | |
Fix links
| -rw-r--r-- | book/src/development/emitting_lints.md | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/book/src/development/emitting_lints.md b/book/src/development/emitting_lints.md index e803aa126d6..a12f6aa91b3 100644 --- a/book/src/development/emitting_lints.md +++ b/book/src/development/emitting_lints.md @@ -1,7 +1,7 @@ # Emitting a lint -Once we have [defined a lint](define_lints.md), written [UI -tests](write_tests.md) and chosen [the lint pass](lint_passes.md) for the lint, +Once we have [defined a lint](defining_lints.md), written [UI +tests](writing_tests.md) and chosen [the lint pass](lint_passes.md) for the lint, we can begin the implementation of the lint logic so that we can emit it and gradually work towards a lint that behaves as expected. @@ -119,7 +119,7 @@ impl<'tcx> LateLintPass<'tcx> for LintName { } ``` -Suggestions generally use the [`format!`](format_macro) macro to interpolate the +Suggestions generally use the [`format!`][format_macro] macro to interpolate the old values with the new ones. To get code snippets, use one of the `snippet*` functions from `clippy_utils::source`. @@ -193,7 +193,7 @@ span), you could use `snippet(cx, span, "..")`. ## Final: Run UI Tests to Emit the Lint -Now, if we run our [UI test](write_tests.md), we should see that Clippy now +Now, if we run our [UI test](writing_tests.md), we should see that Clippy now produces output that contains the lint message we designed. The next step is to implement the logic properly, which is a detail that we will @@ -214,3 +214,4 @@ cover in the next chapters. [inclusive_range]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html [applicability]: https://doc.rust-lang.org/beta/nightly-rustc/rustc_errors/enum.Applicability.html [snippet_fn]: https://doc.rust-lang.org/beta/nightly-rustc/clippy_utils/source/fn.snippet.html +[format_macro]: https://doc.rust-lang.org/std/macro.format.html |
