Improve span for consider adding an explicit lifetime bound
suggestions under NLL
Because NLL borrowck is run after typeck, `in_progress_typeck_results` was always `None` which was preventing the retrieval of the span to which the suggestion is suppose to add the lifetime bound. We now manually pass the `LocalDefId` owner to `construct_generic_bound_failure` so that under NLL, we give the owner id of the current body.
This commit is contained in:
parent
6b4563bf93
commit
7b0db3e7c8
13 changed files with 69 additions and 60 deletions
|
@ -171,6 +171,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
|
|||
None,
|
||||
type_test.generic_kind,
|
||||
lower_bound_region,
|
||||
self.body.source.def_id().as_local(),
|
||||
));
|
||||
} else {
|
||||
// FIXME. We should handle this case better. It
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue