Skip to content

Commit b93ae21

Browse files
Do not eagerly recover malformed AST in rustfmt
1 parent 981e8b4 commit b93ae21

File tree

1 file changed

+1
-1
lines changed
  • src/tools/rustfmt/src/parse/macros

1 file changed

+1
-1
lines changed

Diff for: src/tools/rustfmt/src/parse/macros/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub(crate) mod cfg_if;
1515
pub(crate) mod lazy_static;
1616

1717
fn build_stream_parser<'a>(sess: &'a ParseSess, tokens: TokenStream) -> Parser<'a> {
18-
stream_to_parser(sess, tokens, MACRO_ARGUMENTS)
18+
stream_to_parser(sess, tokens, MACRO_ARGUMENTS).recovery(Recovery::Forbidden)
1919
}
2020

2121
fn build_parser<'a>(context: &RewriteContext<'a>, tokens: TokenStream) -> Parser<'a> {

0 commit comments

Comments
 (0)