Prettify rustc_session fmt with capturing args (nfc)

This commit is contained in:
Jubilee Young 2022-03-24 22:11:05 -07:00
parent 7941b3f147
commit de66e08957
8 changed files with 64 additions and 86 deletions

View file

@ -120,14 +120,13 @@ pub fn add_feature_diagnostics_for_issue<'a>(
) {
if let Some(n) = find_feature_issue(feature, issue) {
err.note(&format!(
"see issue #{} <https://github.com/rust-lang/rust/issues/{}> for more information",
n, n,
"see issue #{n} <https://github.com/rust-lang/rust/issues/{n}> for more information"
));
}
// #23973: do not suggest `#![feature(...)]` if we are in beta/stable
if sess.unstable_features.is_nightly_build() {
err.help(&format!("add `#![feature({})]` to the crate attributes to enable", feature));
err.help(&format!("add `#![feature({feature})]` to the crate attributes to enable"));
}
}