don't restuct references just to reborrow

This commit is contained in:
Matthias Krüger 2022-12-18 17:01:58 +01:00
parent 35a99eef32
commit a108d55ce6
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!(