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

rustfmt fails to format macro call after macro call with invalid syntax #1742

Closed
topecongiro opened this issue Jun 23, 2017 · 0 comments
Closed

Comments

@topecongiro
Copy link
Contributor

topecongiro commented Jun 23, 2017

fn main() {
    let json = json!({ "foo": "bar", });
    foo!( a );
}

In the above code snippet, rustfmt fails to parse json!({ "foo": "bar", }). After that, any macro call in the same file will not be formatted properly.

@topecongiro topecongiro changed the title Test inside macro.rs is broken rustfmt fails to format macro call after macro call with invalid syntax Jun 23, 2017
arielb1 pushed a commit to arielb1/rust that referenced this issue Aug 29, 2017
…, r=arielb1

Add reset_err_count() to errors::Handler

The motivation here is to allow rustfmt to recover from parse errors after failing to parse macros (cc rust-lang/rustfmt#1742).
r? @nrc
arielb1 pushed a commit to arielb1/rust that referenced this issue Aug 29, 2017
…, r=arielb1

Add reset_err_count() to errors::Handler

The motivation here is to allow rustfmt to recover from parse errors after failing to parse macros (cc rust-lang/rustfmt#1742).
r? @nrc
@nrc nrc closed this as completed in #1937 Aug 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant