]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #58180 - davidtwco:issue-58053, r=estebank
authorbors <bors@rust-lang.org>
Tue, 12 Feb 2019 00:44:24 +0000 (00:44 +0000)
committerbors <bors@rust-lang.org>
Tue, 12 Feb 2019 00:44:24 +0000 (00:44 +0000)
Fix span for closure return type when annotated.

Fixes #58053.

This PR adjusts the span used to label closure return types so that
if the user specifies the return type, i.e. `|_| -> X {}` instead of
`|_| {}`, we correctly highlight all of it and not just the last
character.

r? @pnkfelix

1  2 
src/librustc_mir/borrow_check/nll/region_infer/error_reporting/region_name.rs