@@ -259,10 +259,8 @@ pub struct Lint {
259259 pub default_level : LintLevel ,
260260 pub edition_lint_opts : Option < ( Edition , LintLevel ) > ,
261261 pub feature_gate : Option < & ' static Feature > ,
262- /// This is a markdown formatted string that will be used when generating
263- /// the lint documentation. If docs is `None`, the lint will not be
264- /// documented.
265- pub docs : Option < & ' static str > ,
262+ /// Whether the lint should be hidden or documented.
263+ pub hidden : bool ,
266264}
267265
268266impl Lint {
@@ -436,7 +434,7 @@ const IM_A_TEAPOT: Lint = Lint {
436434 default_level : LintLevel :: Allow ,
437435 edition_lint_opts : None ,
438436 feature_gate : Some ( Feature :: test_dummy_unstable ( ) ) ,
439- docs : None ,
437+ hidden : true ,
440438} ;
441439
442440pub fn check_im_a_teapot (
@@ -488,33 +486,7 @@ const BLANKET_HINT_MOSTLY_UNUSED: Lint = Lint {
488486 default_level : LintLevel :: Warn ,
489487 edition_lint_opts : None ,
490488 feature_gate : None ,
491- docs : Some (
492- r#"
493- ### What it does
494- Checks if `hint-mostly-unused` being applied to all dependencies.
495-
496- ### Why it is bad
497- `hint-mostly-unused` indicates that most of a crate's API surface will go
498- unused by anything depending on it; this hint can speed up the build by
499- attempting to minimize compilation time for items that aren't used at all.
500- Misapplication to crates that don't fit that criteria will slow down the build
501- rather than speeding it up. It should be selectively applied to dependencies
502- that meet these criteria. Applying it globally is always a misapplication and
503- will likely slow down the build.
504-
505- ### Example
506- ```toml
507- [profile.dev.package."*"]
508- hint-mostly-unused = true
509- ```
510-
511- Should instead be:
512- ```toml
513- [profile.dev.package.huge-mostly-unused-dependency]
514- hint-mostly-unused = true
515- ```
516- "# ,
517- ) ,
489+ hidden : false ,
518490} ;
519491
520492pub fn blanket_hint_mostly_unused (
@@ -640,24 +612,7 @@ const UNKNOWN_LINTS: Lint = Lint {
640612 default_level : LintLevel :: Warn ,
641613 edition_lint_opts : None ,
642614 feature_gate : None ,
643- docs : Some (
644- r#"
645- ### What it does
646- Checks for unknown lints in the `[lints.cargo]` table
647-
648- ### Why it is bad
649- - The lint name could be misspelled, leading to confusion as to why it is
650- not working as expected
651- - The unknown lint could end up causing an error if `cargo` decides to make
652- a lint with the same name in the future
653-
654- ### Example
655- ```toml
656- [lints.cargo]
657- this-lint-does-not-exist = "warn"
658- ```
659- "# ,
660- ) ,
615+ hidden : false ,
661616} ;
662617
663618fn output_unknown_lints (
0 commit comments