diff options
| author | bors <bors@rust-lang.org> | 2024-04-04 11:39:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-04 11:39:45 +0000 |
| commit | 5a9e9b0e65d27bb294a5e13ca554878b43af6224 (patch) | |
| tree | 05267a35c739fd8c912c5221cfeaeabd97f6f4cd | |
| parent | 398a52a8dc6aa96f2c942b24715288f4f96b9c31 (diff) | |
| parent | b6486fae5c9ce3610aa325a3c86d23871e05c1e8 (diff) | |
| download | rust-5a9e9b0e65d27bb294a5e13ca554878b43af6224.tar.gz rust-5a9e9b0e65d27bb294a5e13ca554878b43af6224.zip | |
Auto merge of #12628 - franciscoBSalgueiro:fix-book-links, r=flip1995
Add missing links in the book Added a few missing links marked with FIXME in the development book. changelog: none
| -rw-r--r-- | book/src/development/defining_lints.md | 9 | ||||
| -rw-r--r-- | book/src/development/lint_passes.md | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/book/src/development/defining_lints.md b/book/src/development/defining_lints.md index 54f77b00190..806ed0845f0 100644 --- a/book/src/development/defining_lints.md +++ b/book/src/development/defining_lints.md @@ -62,9 +62,8 @@ $ cargo dev new_lint --name=lint_name --pass=late --category=pedantic There are two things to note here: 1. `--pass`: We set `--pass=late` in this command to do a late lint pass. The - alternative is an `early` lint pass. We will discuss this difference in a - later chapter. - <!-- FIXME: Link that "later chapter" when lint_passes.md is merged --> + alternative is an `early` lint pass. We will discuss this difference in the + [Lint Passes] chapter. 2. `--category`: If not provided, the `category` of this new lint will default to `nursery`. @@ -194,8 +193,7 @@ store.register_late_pass(|_| Box::new(foo_functions::FooFunctions)); As you might have guessed, where there's something late, there is something early: in Clippy there is a `register_early_pass` method as well. More on early -vs. late passes in a later chapter. -<!-- FIXME: Link that "later chapter" when lint_passes.md is merged --> +vs. late passes in the [Lint Passes] chapter. Without a call to one of `register_early_pass` or `register_late_pass`, the lint pass in question will not be run. @@ -203,3 +201,4 @@ pass in question will not be run. [all_lints]: https://rust-lang.github.io/rust-clippy/master/ [lint_naming]: https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints +[Lint Passes]: lint_passes.md diff --git a/book/src/development/lint_passes.md b/book/src/development/lint_passes.md index 621fc20972e..dde9e1a273b 100644 --- a/book/src/development/lint_passes.md +++ b/book/src/development/lint_passes.md @@ -50,7 +50,7 @@ questions already, but the parser is okay with it. This is what we mean when we say `EarlyLintPass` deals with only syntax on the AST level. Alternatively, think of the `foo_functions` lint we mentioned in -define new lints <!-- FIXME: add link --> chapter. +the [Define New Lints](defining_lints.md) chapter. We want the `foo_functions` lint to detect functions with `foo` as their name. Writing a lint that only checks for the name of a function means that we only |
