-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #17982 - IvarWithoutBones:generate-impl-indent, r=Veykril
fix: consider indentation in the "Generate impl" and "Generate trait impl" assists This makes the generated impl's indentation match the ADT it targets, improving formatting when using nested modules inside of the same file or when defining types inside of a function. See the added tests for an example. At first I tried to call some of the convenient helpers that delegate to `IndentLevel::increase_indent` on the generated impl, but as the comment on that function notes it does not indent the first token, making it inapplicable here. I hope the solution in this PR is acceptable, please let me know if I missed something :)
- Loading branch information
Showing
1 changed file
with
76 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters