Skip to content

compute the span after a struct-like item based on the ident description #3200

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

Merged
merged 1 commit into from
Nov 14, 2018

Conversation

scampi
Copy link
Contributor

@scampi scampi commented Nov 13, 2018

close #3194

As described in the issue, the generics.span.lo() value is equal to BytePos(0) which is incorrect in case of a struct with a where clause but no parameter. The issue is fixed by taking the span of the ident instead of the generics.
Do you think that problem should be reported upstream ?

@nrc
Copy link
Member

nrc commented Nov 14, 2018

Do you think that problem should be reported upstream ?

Yes, incorrect spans should be filed as issues on the Rust repo.

Copy link
Member

@nrc nrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

@nrc nrc merged commit ef75b72 into rust-lang:master Nov 14, 2018
@scampi scampi deleted the issue-3194 branch November 14, 2018 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid syntax and crash on unit struct with where-clause
2 participants