We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This showed up as a part of RLS test failure. The string in question is
/// Bar variant\nBar,\n/// Baz variant\nBaz\n}\n\n/// Bar struct\npub struct Bar<T>{}
Repro: https://github.com/Xanewok/simple_fmt/tree/master
I'd expect the parser to catch possible panics:
rustfmt/src/formatting.rs
Line 622 in fbeabe9
however it seems to be an aborting panic? (no backtrace)
Is this completely on rustc side or can we do something here to not abort on parse error?
The text was updated successfully, but these errors were encountered:
The panic is successfully caught when parsing bare { but not with }
{
}
The error for } is emitted at https://github.com/rust-lang/rust/blob/bdef56a3245460d1fb28c3b4d8ac4b17373c66ce/src/libsyntax/parse/lexer/tokentrees.rs#L169.
Digging deeper it seems that (can't see other suspiciously panicking code paths):
parse_all_token_trees
maybe_file_to_stream
source_file_to_stream
panictry_buffer!
FatalError
Is this that can be fixed in the parser so we can catch parse error panics? (cc @estebank who I know worked on the diagnostics wrt braces, delimiters)
Sorry, something went wrong.
It seems that creating parser
Line 609 in fbeabe9
new_parser_from_source_str
maybe_new_parser_from_source_str
No branches or pull requests
This showed up as a part of RLS test failure. The string in question is
Repro: https://github.com/Xanewok/simple_fmt/tree/master
I'd expect the parser to catch possible panics:
rustfmt/src/formatting.rs
Line 622 in fbeabe9
however it seems to be an aborting panic? (no backtrace)
Is this completely on rustc side or can we do something here to not abort on parse error?
The text was updated successfully, but these errors were encountered: