1
Fork 0

Rollup merge of #135069 - matthiaskrgr:param_rec_usage, r=jieyouxu

remove unused function params
This commit is contained in:
Matthias Krüger 2025-01-04 09:54:39 +01:00 committed by GitHub
commit 725b799478
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 25 deletions

View file

@ -1496,8 +1496,8 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
ValuePairs::Terms(ExpectedFound { expected, found }) => {
match (expected.unpack(), found.unpack()) {
(ty::TermKind::Ty(expected), ty::TermKind::Ty(found)) => {
let is_simple_err = expected.is_simple_text(self.tcx)
&& found.is_simple_text(self.tcx);
let is_simple_err =
expected.is_simple_text() && found.is_simple_text();
OpaqueTypesVisitor::visit_expected_found(
self.tcx, expected, found, span,
)
@ -1736,8 +1736,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
(true, _) => format!(" ({})", ty.sort_string(self.tcx)),
(false, _) => "".to_string(),
};
if !(values.expected.is_simple_text(self.tcx)
&& values.found.is_simple_text(self.tcx))
if !(values.expected.is_simple_text() && values.found.is_simple_text())
|| (exp_found.is_some_and(|ef| {
// This happens when the type error is a subset of the expectation,
// like when you have two references but one is `usize` and the other