1
Fork 0

Rollup merge of #105875 - matthiaskrgr:needless_borrowed_reference, r=oli-obk

don't destuct references just to reborrow
This commit is contained in:
Matthias Krüger 2022-12-18 18:57:05 +01:00 committed by GitHub
commit 22379779b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 41 additions and 42 deletions

View file

@ -226,7 +226,7 @@ impl<'tcx> InferCtxtExt<'tcx> for InferCtxt<'tcx> {
let arg_length = arguments.len();
let distinct = matches!(other, &[ArgKind::Tuple(..)]);
match (arg_length, arguments.get(0)) {
(1, Some(&ArgKind::Tuple(_, ref fields))) => {
(1, Some(ArgKind::Tuple(_, fields))) => {
format!("a single {}-tuple as argument", fields.len())
}
_ => format!(