Skip to content

Don't generate V: { f: u8, // comment } - #2454

Merged
topecongiro merged 4 commits into
rust-lang:masterfrom
radix:issue-2446
Feb 17, 2018
Merged

Don't generate V: { f: u8, // comment }#2454
topecongiro merged 4 commits into
rust-lang:masterfrom
radix:issue-2446

Conversation

@radix

@radix radix commented Feb 16, 2018

Copy link
Copy Markdown
Contributor

Fixes #2446

My only concern is that since this uses contains_comment, it also reformats the following code unnecessarily:

enum E {
    V { f: u8, /* hi */ }
}

to

enum E {
    V {
        f: u8, /* hi */
    }
}

I couldn't find any functions like "contains_trailing_comment" which would probably be more appropriate

@radix

radix commented Feb 16, 2018

Copy link
Copy Markdown
Contributor Author

appveyor failure was a spurious network error. I dunno if there's a way to kick it...

@topecongiro

Copy link
Copy Markdown
Contributor

@radix Thank you for you PR!

You could use last_line_contains_single_line_comment over contains_comment.

@radix

radix commented Feb 17, 2018

Copy link
Copy Markdown
Contributor Author

thanks for the hint @topecongiro ! I've pushed a new revision and updated the test.

@topecongiro
topecongiro merged commit 4531921 into rust-lang:master Feb 17, 2018
@topecongiro

Copy link
Copy Markdown
Contributor

Thank you!

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.

2 participants