@@ -23,7 +23,7 @@ because that's clearly a non-descriptive name.
2323 - [ Lint passes] ( #lint-passes )
2424 - [ Emitting a lint] ( #emitting-a-lint )
2525 - [ Adding the lint logic] ( #adding-the-lint-logic )
26- - [ Specifying the lint's minimum supported Rust version (MSRV)] ( #specifying-the-lints-minimum-supported-rust-version-msrv )
26+ - [ Specifying the lint's minimum supported Rust version (MSRV)] ( #specifying-the-lints-minimum-supported-rust-version-- msrv- )
2727 - [ Author lint] ( #author-lint )
2828 - [ Print HIR lint] ( #print-hir-lint )
2929 - [ Documentation] ( #documentation )
@@ -265,7 +265,7 @@ When declaring a new lint by hand and `cargo dev update_lints` is used, the lint
265265pass may have to be registered manually in the ` register_plugins ` function in
266266` clippy_lints/src/lib.rs ` :
267267
268- ``` rust
268+ ``` rust,ignore
269269store.register_early_pass(|| Box::new(foo_functions::FooFunctions));
270270```
271271
@@ -291,7 +291,7 @@ either [`EarlyLintPass`][early_lint_pass] or [`LateLintPass`][late_lint_pass].
291291
292292In short, the ` LateLintPass ` has access to type information while the
293293` EarlyLintPass ` doesn't. If you don't need access to type information, use the
294- ` EarlyLintPass ` . The ` EarlyLintPass ` is also faster. However linting speed
294+ ` EarlyLintPass ` . The ` EarlyLintPass ` is also faster. However, linting speed
295295hasn't really been a concern with Clippy so far.
296296
297297Since we don't need type information for checking the function name, we used
@@ -308,7 +308,7 @@ implementation of the lint logic.
308308
309309Let's start by implementing the ` EarlyLintPass ` for our ` FooFunctions ` :
310310
311- ``` rust
311+ ``` rust,ignore
312312impl EarlyLintPass for FooFunctions {
313313 fn check_fn(&mut self, cx: &EarlyContext<'_>, fn_kind: FnKind<'_>, span: Span, _: NodeId) {
314314 // TODO: Emit lint here
@@ -327,10 +327,10 @@ variety of lint emission functions. They can all be found in
327327[ ` clippy_utils/src/diagnostics.rs ` ] [ diagnostics ] .
328328
329329` span_lint_and_help ` seems most appropriate in this case. It allows us to
330- provide an extra help message and we can't really suggest a better name
330+ provide an extra help message, and we can't really suggest a better name
331331automatically. This is how it looks:
332332
333- ``` rust
333+ ``` rust,ignore
334334impl EarlyLintPass for FooFunctions {
335335 fn check_fn(&mut self, cx: &EarlyContext<'_>, fn_kind: FnKind<'_>, span: Span, _: NodeId) {
336336 span_lint_and_help(
@@ -469,7 +469,7 @@ the value from `clippy.toml`. This can be accounted for using the
469469` extract_msrv_attr!(LintContext) ` macro and passing
470470` LateContext ` /` EarlyContext ` .
471471
472- ``` rust
472+ ``` rust,ignore
473473impl<'tcx> LateLintPass<'tcx> for ManualStrip {
474474 fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
475475 ...
@@ -483,7 +483,7 @@ the lint's test file, `tests/ui/manual_strip.rs` in this example. It should
483483have a case for the version below the MSRV and one with the same contents but
484484for the MSRV version itself.
485485
486- ``` rust
486+ ``` rust,ignore
487487...
488488
489489#[clippy::msrv = "1.44"]
@@ -514,7 +514,7 @@ define_Conf! {
514514
515515If you have trouble implementing your lint, there is also the internal ` author `
516516lint to generate Clippy code that detects the offending pattern. It does not
517- work for all of the Rust syntax, but can give a good starting point.
517+ work for all the Rust syntax, but can give a good starting point.
518518
519519The quickest way to use it, is the [ Rust playground:
520520play.rust-lang.org] [ author_example ] . Put the code you want to lint into the
@@ -607,7 +607,7 @@ output in the `stdout` part.
607607
608608## PR Checklist
609609
610- Before submitting your PR make sure you followed all of the basic requirements:
610+ Before submitting your PR make sure you followed all the basic requirements:
611611
612612<!-- Sync this with `.github/PULL_REQUEST_TEMPLATE` -->
613613
@@ -627,7 +627,7 @@ for some users. Adding a configuration is done in the following steps:
627627
6286281 . Adding a new configuration entry to [ ` clippy_lints::utils::conf ` ] like this:
629629
630- ``` rust
630+ ``` rust,ignore
631631 /// Lint: LINT_NAME.
632632 ///
633633 /// <The configuration field doc comment>
@@ -680,7 +680,7 @@ for some users. Adding a configuration is done in the following steps:
680680 configuration value is now cloned or copied into a local value that is then
681681 passed to the impl struct like this :
682682
683- ```rust
683+ ```rust , ignore
684684 // Default generated registration:
685685 store . register_* _pass (|| box module :: StructName );
686686
0 commit comments