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
This commit is contained in:
bors 2024-04-04 11:39:45 +00:00
commit 5a9e9b0e65
2 changed files with 5 additions and 6 deletions

View File

@ -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

View File

@ -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