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

avoid not to truncate necessary chars #3640

Merged
merged 3 commits into from
Jun 23, 2019

Conversation

rchaser53
Copy link
Contributor

fix: #3636

Copy link
Contributor

@scampi scampi 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 giving this issue a try!

While this does resolve the problem, I think this is a hack around the actual problem: sometimes the last statement in the block has an extra indentation which needs then to be truncated. This is mentioned in the FIXME, and we could profit with this issue to resolve it!

I think the best would be to resolve this, that there is not trailing indent, and therefore we could remove the truncate logic from close_block.

@rchaser53
Copy link
Contributor Author

This issue priority is high, so I think this issue should be fixed as soon as possible.
I propose that merge this PR as a temporary fix, and will fix correctly after.

I tried to remove the truncate logic from close_block. But close_block affected range is very large.
This method affect not only end of the block but also other block statements indent.

If this issue can be resolved easily, please send PR instead of me.
It take a time for me to resolve correctly. :-(

@scampi
Copy link
Contributor

scampi commented Jun 21, 2019

I propose that merge this PR as a temporary fix, and will fix correctly after.

Sounds good to me!

@topecongiro
Copy link
Contributor

Merging this, thank you @rchaser53!

@topecongiro topecongiro merged commit 5b0ce0e into rust-lang:master Jun 23, 2019
@rchaser53 rchaser53 deleted the issue-3636 branch June 23, 2019 05:32
@topecongiro topecongiro added this to the 1.3.1 milestone Jun 23, 2019
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.

Failed assertion with file_lines option
3 participants