Fix line lens

This commit is contained in:
Ryan Levick 2021-07-01 17:05:19 +02:00 committed by Joshua Nelson
parent e0f39fce3a
commit 7cfaceec67
1 changed files with 7 additions and 5 deletions

View File

@ -59,8 +59,9 @@ internally.
These are lints used just by the compiler or plugins like `clippy`. They can be found in
`rustc_lint::internal`.
An example of such a lint is the check that lint passes are implemented using the `declare_lint_pass!`
macro and not by hand. This is accomplished with the `LINT_PASS_IMPL_WITHOUT_MACRO` lint.
An example of such a lint is the check that lint passes are implemented using the
`declare_lint_pass!` macro and not by hand. This is accomplished with the
`LINT_PASS_IMPL_WITHOUT_MACRO` lint.
Registration of these lints happens in the [`rustc_lint::register_internals`] function which is
called when constructing a new lint store inside [`rustc_lint::new_lint_store`].
@ -77,9 +78,10 @@ with internal lints, this happens inside of [`rustc_lint::new_lint_store`].
#### Plugin lints
This is one of the primary use cases remaining for plugins/drivers. Plugins are given access to the
mutable `LintStore` during registration (which happens inside of [`rustc_interface::register_plugins`])
and they can call any functions they need on the `LintStore`, just like rustc code.
This is one of the primary use cases remaining for plugins/drivers. Plugins are given access
to the mutable `LintStore` during registration (which happens inside of
[`rustc_interface::register_plugins`]) and they can call any functions they need on
the `LintStore`, just like rustc code.
Plugins are intended to declare lints with the `plugin` field set to true (e.g., by
way of the [`declare_tool_lint!`] macro), but this is purely for diagnostics and help text;