File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ use rustc_metadata::loader;
7070use rustc_metadata:: cstore:: CStore ;
7171use rustc:: util:: common:: time;
7272
73+ use std:: cmp:: max;
7374use std:: cmp:: Ordering :: Equal ;
7475use std:: env;
7576use std:: io:: { self , Read , Write } ;
@@ -632,6 +633,8 @@ Available lint options:
632633 . map ( |& ( s, _) | s. chars ( ) . count ( ) )
633634 . max ( )
634635 . unwrap_or ( 0 ) ;
636+ let max_name_len = std:: cmp:: max ( max_name_len, "warnings" . len ( ) ) ;
637+
635638 let padded = |x : & str | {
636639 let mut s = repeat ( " " )
637640 . take ( max_name_len - x. chars ( ) . count ( ) )
@@ -643,6 +646,7 @@ Available lint options:
643646 println ! ( "Lint groups provided by rustc:\n " ) ;
644647 println ! ( " {} {}" , padded( "name" ) , "sub-lints" ) ;
645648 println ! ( " {} {}" , padded( "----" ) , "---------" ) ;
649+ println ! ( " {} {}" , padded( "warnings" ) , "all built-in lints" ) ;
646650
647651 let print_lint_groups = |lints : Vec < ( & ' static str , Vec < lint:: LintId > ) > | {
648652 for ( name, to) in lints {
You can’t perform that action at this time.
0 commit comments