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

Handle a macro argument with a single keyword #3333

Merged
merged 1 commit into from
Feb 10, 2019

Conversation

topecongiro
Copy link
Contributor

Closes #3331.

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.

LGTM

src/macros.rs Outdated Show resolved Hide resolved
@dtolnay
Copy link
Member

dtolnay commented Feb 8, 2019

Thanks! Could this be applied more generally for any single token, even if that token is not a keyword or expression? For example:

let _ = Token![::];
let _ = Token![""s];

@topecongiro topecongiro force-pushed the macro-arg-single-keyword branch 2 times, most recently from 0855b04 to 9a7ea6a Compare February 10, 2019 15:35
@topecongiro
Copy link
Contributor Author

@dtolnay Yes it could. Currently rustfmt just keep those kind of macro calls as is.

@topecongiro topecongiro merged commit fca91bc into rust-lang:master Feb 10, 2019
@topecongiro topecongiro deleted the macro-arg-single-keyword branch February 10, 2019 15:45
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.

3 participants