inline format!() args up to and including rustc_middle
This commit is contained in:
parent
2e0136a131
commit
23815467a2
87 changed files with 378 additions and 437 deletions
|
@ -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")
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue