Skip to content

Commit d0e96ed

Browse files
committed
Do not look for external modules when the input is from stdin
1 parent 92f5721 commit d0e96ed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/formatting.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,10 @@ fn parse_crate(
624624
syntax::source_map::FileName::Custom("stdin".to_owned()),
625625
text,
626626
)
627+
.map(|mut parser| {
628+
parser.recurse_into_file_modules = false;
629+
parser
630+
})
627631
.map_err(|diags| {
628632
diags
629633
.into_iter()

0 commit comments

Comments
 (0)