New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix span for closure return type when annotated. #58180

Merged
merged 1 commit into from Feb 12, 2019

Conversation

Projects
None yet
6 participants
@davidtwco
Copy link
Member

davidtwco commented Feb 5, 2019

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

Fix span for closure return type when annotated.
This commit 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.

@davidtwco davidtwco force-pushed the davidtwco:issue-58053 branch from 9ae3725 to b377d0b Feb 5, 2019

@estebank

This comment has been minimized.

Copy link
Contributor

estebank commented Feb 5, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 5, 2019

📌 Commit b377d0b has been approved by estebank

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 12, 2019

⌛️ Testing commit b377d0b with merge 16ca0b9...

bors added a commit that referenced this pull request Feb 12, 2019

Auto merge of #58180 - davidtwco:issue-58053, r=estebank
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
@Mark-Simulacrum

This comment has been minimized.

Copy link
Member

Mark-Simulacrum commented Feb 12, 2019

@bors treeclosed-

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 12, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: estebank
Pushing 16ca0b9 to master...

@bors bors added the merged-by-bors label Feb 12, 2019

@bors bors merged commit b377d0b into rust-lang:master Feb 12, 2019

1 check passed

homu Test successful
Details

@davidtwco davidtwco deleted the davidtwco:issue-58053 branch Feb 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment