File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -591,6 +591,21 @@ If you need a combination of options that's not supported by the
591
591
- Later, change lint to error.
592
592
- Eventually, remove lint.
593
593
594
+ ### Renaming or removing a lint
595
+
596
+ A lint can be renamed or removed, which will trigger a warning if a user tries
597
+ to use the old lint name. To declare a rename/remove, add a line with
598
+ [ ` store.register_renamed ` ] or [ ` store.register_removed ` ] to the code of the
599
+ [ ` register_builtins ` ] function.
600
+
601
+ ``` rust,ignore
602
+ store.register_renamed("single_use_lifetime", "single_use_lifetimes");
603
+ ```
604
+
605
+ [ `store.register_renamed` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/struct.LintStore.html#method.register_renamed
606
+ [ `store.register_removed` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/struct.LintStore.html#method.register_removed
607
+ [ `register_builtins` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/fn.register_builtins.html
608
+
594
609
### Lint Groups
595
610
596
611
Lints can be turned on in groups. These groups are declared in the
You can’t perform that action at this time.
0 commit comments