session: output-width -> diagnostic-width

Rename the `--output-width` flag to `--diagnostic-width` as this appears
to be the preferred name within the compiler team.

Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
David Wood
2022-07-06 11:57:41 +01:00
parent cd23af6793
commit 44c1fcc04d
29 changed files with 48 additions and 48 deletions

View File

@@ -726,7 +726,7 @@ impl Default for Options {
prints: Vec::new(),
cg: Default::default(),
error_format: ErrorOutputType::default(),
output_width: None,
diagnostic_width: None,
externs: Externs(BTreeMap::new()),
crate_name: None,
libs: Vec::new(),
@@ -1430,8 +1430,8 @@ pub fn rustc_optgroups() -> Vec<RustcOptGroup> {
),
opt::opt_s(
"",
"output-width",
"Inform rustc of the width of the output so that errors can be truncated to fit",
"diagnostic-width",
"Inform rustc of the width of the output so that diagnostics can be truncated to fit",
"WIDTH",
),
opt::multi_s(
@@ -2209,8 +2209,8 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
let error_format = parse_error_format(matches, color, json_rendered);
let output_width = matches.opt_get("output-width").unwrap_or_else(|_| {
early_error(error_format, "`--output-width` must be an positive integer");
let diagnostic_width = matches.opt_get("diagnostic-width").unwrap_or_else(|_| {
early_error(error_format, "`--diagnostic-width` must be an positive integer");
});
let unparsed_crate_types = matches.opt_strs("crate-type");
@@ -2485,7 +2485,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
prints,
cg,
error_format,
output_width,
diagnostic_width,
externs,
unstable_features: UnstableFeatures::from_environment(crate_name.as_deref()),
crate_name,