remove unused function params
This commit is contained in:
parent
ac00fe89a1
commit
e839d05e11
3 changed files with 14 additions and 25 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue