diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-07-25 22:00:13 +0200 | 
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2023-07-30 13:18:33 +0200 | 
| commit | 23815467a2ba4a5219149cb96bada4c7bea741bf (patch) | |
| tree | d8d1459a45a207350907114dffebd6134b14be50 /compiler/rustc_session/src | |
| parent | 2e0136a131f6ed5f6071adf36db08dd8d2205d19 (diff) | |
| download | rust-23815467a2ba4a5219149cb96bada4c7bea741bf.tar.gz rust-23815467a2ba4a5219149cb96bada4c7bea741bf.zip | |
inline format!() args up to and including rustc_middle
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_session/src/options.rs | 3 | 
2 files changed, 4 insertions, 7 deletions
| diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 88bbadefe26..28ae88424ab 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -1539,9 +1539,8 @@ pub(super) fn build_target_config( ); let (target, target_warnings) = target_result.unwrap_or_else(|e| { handler.early_error(format!( - "Error loading target specification: {}. \ - Run `rustc --print target-list` for a list of built-in targets", - e + "Error loading target specification: {e}. \ + Run `rustc --print target-list` for a list of built-in targets" )) }); for warning in target_warnings.warning_messages() { @@ -1978,8 +1977,7 @@ pub fn parse_crate_edition(handler: &EarlyErrorHandler, matches: &getopts::Match let is_nightly = nightly_options::match_is_nightly_build(matches); let msg = if !is_nightly { format!( - "the crate requires edition {}, but the latest edition supported by this Rust version is {}", - edition, LATEST_STABLE_EDITION + "the crate requires edition {edition}, but the latest edition supported by this Rust version is {LATEST_STABLE_EDITION}" ) } else { format!("edition {edition} is unstable and only available with -Z unstable-options") diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index 4a535f80b8a..8eab0fb33a7 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -330,8 +330,7 @@ fn build_options<O: Default>( match value { None => handler.early_error( format!( - "{0} option `{1}` requires {2} ({3} {1}=<value>)", - outputname, key, type_desc, prefix + "{outputname} option `{key}` requires {type_desc} ({prefix} {key}=<value>)" ), ), Some(value) => handler.early_error( | 
