Rollup merge of #119891 - lcnr:rename-field, r=compiler-errors
rename `reported_signature_mismatch` to reflect its use it's used for a lot of things, not only closures
This commit is contained in:
commit
e79ccc4582
3 changed files with 4 additions and 6 deletions
|
@ -3459,14 +3459,12 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
|||
let found_node = found_did.and_then(|did| self.tcx.hir().get_if_local(did));
|
||||
let found_span = found_did.and_then(|did| self.tcx.hir().span_if_local(did));
|
||||
|
||||
if self.reported_closure_mismatch.borrow().contains(&(span, found_span)) {
|
||||
if !self.reported_signature_mismatch.borrow_mut().insert((span, found_span)) {
|
||||
// We check closures twice, with obligations flowing in different directions,
|
||||
// but we want to complain about them only once.
|
||||
return None;
|
||||
}
|
||||
|
||||
self.reported_closure_mismatch.borrow_mut().insert((span, found_span));
|
||||
|
||||
let mut not_tupled = false;
|
||||
|
||||
let found = match found_trait_ref.skip_binder().args.type_at(1).kind() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue