Fix line lens
This commit is contained in:
parent
e0f39fce3a
commit
7cfaceec67
|
|
@ -59,8 +59,9 @@ internally.
|
||||||
These are lints used just by the compiler or plugins like `clippy`. They can be found in
|
These are lints used just by the compiler or plugins like `clippy`. They can be found in
|
||||||
`rustc_lint::internal`.
|
`rustc_lint::internal`.
|
||||||
|
|
||||||
An example of such a lint is the check that lint passes are implemented using the `declare_lint_pass!`
|
An example of such a lint is the check that lint passes are implemented using the
|
||||||
macro and not by hand. This is accomplished with the `LINT_PASS_IMPL_WITHOUT_MACRO` lint.
|
`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
|
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`].
|
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
|
#### Plugin lints
|
||||||
|
|
||||||
This is one of the primary use cases remaining for plugins/drivers. Plugins are given access to the
|
This is one of the primary use cases remaining for plugins/drivers. Plugins are given access
|
||||||
mutable `LintStore` during registration (which happens inside of [`rustc_interface::register_plugins`])
|
to the mutable `LintStore` during registration (which happens inside of
|
||||||
and they can call any functions they need on the `LintStore`, just like rustc code.
|
[`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
|
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;
|
way of the [`declare_tool_lint!`] macro), but this is purely for diagnostics and help text;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue