Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e6014d6

Browse files
committedJan 22, 2024
Do not eagerly recover malformed AST in rustfmt
1 parent 9f47aa1 commit e6014d6

File tree

1 file changed

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

1 file changed

+1
-1
lines changed
 

‎src/tools/rustfmt/src/parse/macros/mod.rs

Lines changed: 1 addition & 1 deletion
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)
Please sign in to comment.