mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
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:
commit
5a9e9b0e65
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user