compiler: clippy::complexity fixes
This commit is contained in:
@@ -1283,9 +1283,9 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
||||
"the full type name has been written to '{}'",
|
||||
file.display()
|
||||
));
|
||||
err.note(format!(
|
||||
"consider using `--verbose` to print full type name to the console"
|
||||
));
|
||||
err.note(
|
||||
"consider using `--verbose` to print full type name to the console",
|
||||
);
|
||||
}
|
||||
|
||||
if imm_ref_self_ty_satisfies_pred && mut_ref_self_ty_satisfies_pred {
|
||||
@@ -2869,9 +2869,9 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
||||
"the full name for the type has been written to '{}'",
|
||||
file.display(),
|
||||
));
|
||||
err.note(format!(
|
||||
"consider using `--verbose` to print the full type name to the console"
|
||||
));
|
||||
err.note(
|
||||
"consider using `--verbose` to print the full type name to the console",
|
||||
);
|
||||
}
|
||||
}
|
||||
ObligationCauseCode::RepeatElementCopy {
|
||||
@@ -3339,9 +3339,9 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
||||
"the full type name has been written to '{}'",
|
||||
file.display(),
|
||||
));
|
||||
err.note(format!(
|
||||
"consider using `--verbose` to print the full type name to the console"
|
||||
));
|
||||
err.note(
|
||||
"consider using `--verbose` to print the full type name to the console",
|
||||
);
|
||||
}
|
||||
let mut parent_predicate = parent_trait_pred;
|
||||
let mut data = &data.derived;
|
||||
@@ -3395,9 +3395,9 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
||||
"the full type name has been written to '{}'",
|
||||
file.display(),
|
||||
));
|
||||
err.note(format!(
|
||||
"consider using `--verbose` to print the full type name to the console"
|
||||
));
|
||||
err.note(
|
||||
"consider using `--verbose` to print the full type name to the console",
|
||||
);
|
||||
}
|
||||
}
|
||||
// #74711: avoid a stack overflow
|
||||
|
||||
@@ -1031,12 +1031,9 @@ fn assemble_candidates_from_impls<'cx, 'tcx>(
|
||||
{
|
||||
candidate_set.mark_ambiguous();
|
||||
true
|
||||
} else if obligation.predicate.args.type_at(0).to_opt_closure_kind().is_some()
|
||||
&& obligation.predicate.args.type_at(1).to_opt_closure_kind().is_some()
|
||||
{
|
||||
true
|
||||
} else {
|
||||
false
|
||||
obligation.predicate.args.type_at(0).to_opt_closure_kind().is_some()
|
||||
&& obligation.predicate.args.type_at(1).to_opt_closure_kind().is_some()
|
||||
}
|
||||
} else if lang_items.discriminant_kind_trait() == Some(trait_ref.def_id) {
|
||||
match self_ty.kind() {
|
||||
|
||||
Reference in New Issue
Block a user