diff options
| author | David Wood <david.wood@huawei.com> | 2022-07-06 11:57:41 +0100 |
|---|---|---|
| committer | David Wood <david.wood@huawei.com> | 2022-07-06 17:43:33 +0100 |
| commit | 44c1fcc04dad7c59d1af5c7759afd121951e195c (patch) | |
| tree | ba8ba740232d4c976c40319267dbb4a270dccc00 /compiler/rustc_session | |
| parent | cd23af6793857f1b73ecd76764876c482f183d31 (diff) | |
| download | rust-44c1fcc04dad7c59d1af5c7759afd121951e195c.tar.gz rust-44c1fcc04dad7c59d1af5c7759afd121951e195c.zip | |
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>
Diffstat (limited to 'compiler/rustc_session')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 12 | ||||
| -rw-r--r-- | compiler/rustc_session/src/options.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_session/src/session.rs | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index bad9fb576bf..b7da0f22942 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -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, diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index b544965f6f2..b0c74ffb6dc 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -170,7 +170,7 @@ top_level_options!( test: bool [TRACKED], error_format: ErrorOutputType [UNTRACKED], - output_width: Option<usize> [UNTRACKED], + diagnostic_width: Option<usize> [UNTRACKED], /// If `Some`, enable incremental compilation, using the given /// directory to store intermediate results. @@ -1389,7 +1389,7 @@ options! { "panic strategy for out-of-memory handling"), osx_rpath_install_name: bool = (false, parse_bool, [TRACKED], "pass `-install_name @rpath/...` to the macOS linker (default: no)"), - output_width: Option<usize> = (None, parse_opt_number, [UNTRACKED], + diagnostic_width: Option<usize> = (None, parse_opt_number, [UNTRACKED], "set the current output width for diagnostic truncation"), panic_abort_tests: bool = (false, parse_bool, [TRACKED], "support compiling tests with panic=abort (default: no)"), diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index e22b7a5539f..52b9ee94718 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -1162,7 +1162,7 @@ fn default_emitter( fallback_bundle, short, sopts.debugging_opts.teach, - sopts.output_width, + sopts.diagnostic_width, macro_backtrace, ), Some(dst) => EmitterWriter::new( @@ -1173,7 +1173,7 @@ fn default_emitter( short, false, // no teach messages when writing to a buffer false, // no colors when writing to a buffer - None, // no terminal width + None, // no diagnostic width macro_backtrace, ), }; @@ -1188,7 +1188,7 @@ fn default_emitter( fallback_bundle, pretty, json_rendered, - sopts.output_width, + sopts.diagnostic_width, macro_backtrace, ) .ui_testing(sopts.debugging_opts.ui_testing), @@ -1202,7 +1202,7 @@ fn default_emitter( fallback_bundle, pretty, json_rendered, - sopts.output_width, + sopts.diagnostic_width, macro_backtrace, ) .ui_testing(sopts.debugging_opts.ui_testing), |
