Skip to content

Commit 6c8dd52

Browse files
committed
Add mention of warnings lint group to help message
1 parent 191ff2d commit 6c8dd52

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/librustc_driver/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ use rustc_metadata::loader;
7070
use rustc_metadata::cstore::CStore;
7171
use rustc::util::common::time;
7272

73+
use std::cmp::max;
7374
use std::cmp::Ordering::Equal;
7475
use std::env;
7576
use 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 {

0 commit comments

Comments
 (0)