diff options
| author | kraktus <kraktus@users.noreply.github.com> | 2022-11-25 16:41:08 +0100 |
|---|---|---|
| committer | kraktus <kraktus@users.noreply.github.com> | 2022-11-25 16:49:05 +0100 |
| commit | 2fd10bc59b2c4c39691a1a9ec9de318a01cbf60c (patch) | |
| tree | 1c31da82f496f5ceab540bc8d4b843ee5c4d1b01 | |
| parent | 5610d22c8d58d12748308efb6e331e65618d11dc (diff) | |
| download | rust-2fd10bc59b2c4c39691a1a9ec9de318a01cbf60c.tar.gz rust-2fd10bc59b2c4c39691a1a9ec9de318a01cbf60c.zip | |
dogfood with expanded `uninlined_format_args`
| -rw-r--r-- | clippy_utils/src/ty.rs | 15 | ||||
| -rw-r--r-- | lintcheck/src/main.rs | 15 |
2 files changed, 12 insertions, 18 deletions
diff --git a/clippy_utils/src/ty.rs b/clippy_utils/src/ty.rs index 897edfc5495..09967f317f8 100644 --- a/clippy_utils/src/ty.rs +++ b/clippy_utils/src/ty.rs @@ -1005,14 +1005,12 @@ pub fn make_projection<'tcx>( debug_assert!( generic_count == substs.len(), - "wrong number of substs for `{:?}`: found `{}` expected `{}`.\n\ + "wrong number of substs for `{:?}`: found `{}` expected `{generic_count}`.\n\ note: the expected parameters are: {:#?}\n\ - the given arguments are: `{:#?}`", + the given arguments are: `{substs:#?}`", assoc_item.def_id, substs.len(), - generic_count, params.map(GenericParamDefKind::descr).collect::<Vec<_>>(), - substs, ); if let Some((idx, (param, arg))) = params @@ -1030,14 +1028,11 @@ pub fn make_projection<'tcx>( { debug_assert!( false, - "mismatched subst type at index {}: expected a {}, found `{:?}`\n\ + "mismatched subst type at index {idx}: expected a {}, found `{arg:?}`\n\ note: the expected parameters are {:#?}\n\ - the given arguments are {:#?}", - idx, + the given arguments are {substs:#?}", param.descr(), - arg, - params.map(GenericParamDefKind::descr).collect::<Vec<_>>(), - substs, + params.map(GenericParamDefKind::descr).collect::<Vec<_>>() ); } } diff --git a/lintcheck/src/main.rs b/lintcheck/src/main.rs index ee8ab7c1d7c..bd49f096072 100644 --- a/lintcheck/src/main.rs +++ b/lintcheck/src/main.rs @@ -120,8 +120,8 @@ impl ClippyWarning { format!("$CARGO_HOME/{}", stripped.display()) } else { format!( - "target/lintcheck/sources/{}-{}/{}", - crate_name, crate_version, span.file_name + "target/lintcheck/sources/{crate_name}-{crate_version}/{}", + span.file_name ) }; @@ -322,13 +322,13 @@ impl Crate { if config.max_jobs == 1 { println!( - "{}/{} {}% Linting {} {}", - index, total_crates_to_lint, perc, &self.name, &self.version + "{index}/{total_crates_to_lint} {perc}% Linting {} {}", + &self.name, &self.version ); } else { println!( - "{}/{} {}% Linting {} {} in target dir {:?}", - index, total_crates_to_lint, perc, &self.name, &self.version, thread_index + "{index}/{total_crates_to_lint} {perc}% Linting {} {} in target dir {thread_index:?}", + &self.name, &self.version ); } @@ -398,8 +398,7 @@ impl Crate { .output() .unwrap_or_else(|error| { panic!( - "Encountered error:\n{:?}\ncargo_clippy_path: {}\ncrate path:{}\n", - error, + "Encountered error:\n{error:?}\ncargo_clippy_path: {}\ncrate path:{}\n", &cargo_clippy_path.display(), &self.path.display() ); |
