File tree 1 file changed +4
-0
lines changed
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;
70
70
use rustc_metadata:: cstore:: CStore ;
71
71
use rustc:: util:: common:: time;
72
72
73
+ use std:: cmp:: max;
73
74
use std:: cmp:: Ordering :: Equal ;
74
75
use std:: env;
75
76
use std:: io:: { self , Read , Write } ;
@@ -632,6 +633,8 @@ Available lint options:
632
633
. map ( |& ( s, _) | s. chars ( ) . count ( ) )
633
634
. max ( )
634
635
. unwrap_or ( 0 ) ;
636
+ let max_name_len = std:: cmp:: max ( max_name_len, "warnings" . len ( ) ) ;
637
+
635
638
let padded = |x : & str | {
636
639
let mut s = repeat ( " " )
637
640
. take ( max_name_len - x. chars ( ) . count ( ) )
@@ -643,6 +646,7 @@ Available lint options:
643
646
println ! ( "Lint groups provided by rustc:\n " ) ;
644
647
println ! ( " {} {}" , padded( "name" ) , "sub-lints" ) ;
645
648
println ! ( " {} {}" , padded( "----" ) , "---------" ) ;
649
+ println ! ( " {} {}" , padded( "warnings" ) , "all built-in lints" ) ;
646
650
647
651
let print_lint_groups = |lints : Vec < ( & ' static str , Vec < lint:: LintId > ) > | {
648
652
for ( name, to) in lints {
You can’t perform that action at this time.
0 commit comments