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 Fn supertraits indentation #6130

Closed

Conversation

Flowrey
Copy link

@Flowrey Flowrey commented Mar 29, 2024

Fixes #6127

In my opinion, the choose_rhs function wrongly presume that the orig_rhs is a single line and so indent only the beginning of the string instead of the whole block.
The changes have made fix the issues for #6127 but l’m really not convinced I've done it the right way 😓

@Flowrey Flowrey force-pushed the fix-multi-line-fn-supertraits branch 2 times, most recently from 5156f8b to 5cf30de Compare March 29, 2024 15:22
@Flowrey Flowrey force-pushed the fix-multi-line-fn-supertraits branch from 5cf30de to 0221eac Compare March 29, 2024 15:33
@Flowrey Flowrey changed the title Draft: fix: Fn supertraits indentation Draft: Fix Fn supertraits indentation Mar 29, 2024
@Flowrey Flowrey changed the title Draft: Fix Fn supertraits indentation Fix Fn supertraits indentation Mar 29, 2024
@ytmimi
Copy link
Contributor

ytmimi commented Mar 30, 2024

@Flowrey thanks so much for taking a look at this one. You're correct this isn't the approach that we'd want to take in order to solve this. We'd want the code that's responsible for rewriting the bound to add the proper indentation.

That said, I remembered that I'd opened #6048 a while ago and after some testing It seems that those code changes also address #6127. I'll be sure to add test cases for #6127 in my PR.

@ytmimi ytmimi closed this Mar 30, 2024
@Flowrey Flowrey deleted the fix-multi-line-fn-supertraits branch March 30, 2024 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi-line Fn supertraits are indented improperly
3 participants