Skip to content

Commit 6b69b7f

Browse files
committed
Ignore path attributes that point to invalid path
1 parent 1e31f62 commit 6b69b7f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/modules.rs

+3
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,9 @@ impl<'ast, 'sess, 'c> ModResolver<'ast, 'sess> {
354354
for path in path_visitor.paths() {
355355
let mut actual_path = self.directory.path.clone();
356356
actual_path.push(&path);
357+
if !actual_path.exists() {
358+
continue;
359+
}
357360
let file_name = syntax_pos::FileName::Real(actual_path.clone());
358361
if self
359362
.parse_sess

0 commit comments

Comments
 (0)