Shorten span for closures.

This commit is contained in:
Camille GILLOT 2022-06-27 07:45:35 +02:00
parent e78e747f53
commit 8cc87250ef
167 changed files with 877 additions and 1306 deletions

View file

@ -861,7 +861,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
let arg_pos = args
.iter()
.enumerate()
.filter(|(_, arg)| arg.span == self.body.span)
.filter(|(_, arg)| arg.hir_id == closure_id)
.map(|(pos, _)| pos)
.next();
let def_id = hir.local_def_id(item_id);