Skip to content

Commit 2fd10bc

Browse files
committed
dogfood with expanded uninlined_format_args
1 parent 5610d22 commit 2fd10bc

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

clippy_utils/src/ty.rs

+5-10
Original file line numberDiff line numberDiff line change
@@ -1005,14 +1005,12 @@ pub fn make_projection<'tcx>(
10051005

10061006
debug_assert!(
10071007
generic_count == substs.len(),
1008-
"wrong number of substs for `{:?}`: found `{}` expected `{}`.\n\
1008+
"wrong number of substs for `{:?}`: found `{}` expected `{generic_count}`.\n\
10091009
note: the expected parameters are: {:#?}\n\
1010-
the given arguments are: `{:#?}`",
1010+
the given arguments are: `{substs:#?}`",
10111011
assoc_item.def_id,
10121012
substs.len(),
1013-
generic_count,
10141013
params.map(GenericParamDefKind::descr).collect::<Vec<_>>(),
1015-
substs,
10161014
);
10171015

10181016
if let Some((idx, (param, arg))) = params
@@ -1030,14 +1028,11 @@ pub fn make_projection<'tcx>(
10301028
{
10311029
debug_assert!(
10321030
false,
1033-
"mismatched subst type at index {}: expected a {}, found `{:?}`\n\
1031+
"mismatched subst type at index {idx}: expected a {}, found `{arg:?}`\n\
10341032
note: the expected parameters are {:#?}\n\
1035-
the given arguments are {:#?}",
1036-
idx,
1033+
the given arguments are {substs:#?}",
10371034
param.descr(),
1038-
arg,
1039-
params.map(GenericParamDefKind::descr).collect::<Vec<_>>(),
1040-
substs,
1035+
params.map(GenericParamDefKind::descr).collect::<Vec<_>>()
10411036
);
10421037
}
10431038
}

lintcheck/src/main.rs

+7-8
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ impl ClippyWarning {
120120
format!("$CARGO_HOME/{}", stripped.display())
121121
} else {
122122
format!(
123-
"target/lintcheck/sources/{}-{}/{}",
124-
crate_name, crate_version, span.file_name
123+
"target/lintcheck/sources/{crate_name}-{crate_version}/{}",
124+
span.file_name
125125
)
126126
};
127127

@@ -322,13 +322,13 @@ impl Crate {
322322

323323
if config.max_jobs == 1 {
324324
println!(
325-
"{}/{} {}% Linting {} {}",
326-
index, total_crates_to_lint, perc, &self.name, &self.version
325+
"{index}/{total_crates_to_lint} {perc}% Linting {} {}",
326+
&self.name, &self.version
327327
);
328328
} else {
329329
println!(
330-
"{}/{} {}% Linting {} {} in target dir {:?}",
331-
index, total_crates_to_lint, perc, &self.name, &self.version, thread_index
330+
"{index}/{total_crates_to_lint} {perc}% Linting {} {} in target dir {thread_index:?}",
331+
&self.name, &self.version
332332
);
333333
}
334334

@@ -398,8 +398,7 @@ impl Crate {
398398
.output()
399399
.unwrap_or_else(|error| {
400400
panic!(
401-
"Encountered error:\n{:?}\ncargo_clippy_path: {}\ncrate path:{}\n",
402-
error,
401+
"Encountered error:\n{error:?}\ncargo_clippy_path: {}\ncrate path:{}\n",
403402
&cargo_clippy_path.display(),
404403
&self.path.display()
405404
);

0 commit comments

Comments
 (0)