Skip to content
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

davidtwco
Copy link
Member

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 5, 2019
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.
@estebank
Copy link
Contributor

estebank commented Feb 5, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Feb 5, 2019

📌 Commit b377d0b has been approved by estebank

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 5, 2019
@bors
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
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
Copy link
Member

@bors treeclosed-

@bors
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 This PR was explicitly merged by bors. label Feb 12, 2019
@bors bors merged commit b377d0b into rust-lang:master Feb 12, 2019
@davidtwco davidtwco deleted the issue-58053 branch February 12, 2019 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants