Skip to content

Commit 88b031e

Browse files
committed
save-analysis: dump data only if get_path_data doesn't fail to resolve a path.
Fixes #37126.
1 parent d34318d commit 88b031e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/librustc_save_analysis/dump_visitor.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -854,9 +854,7 @@ impl<'l, 'tcx: 'l, 'll, D: Dump + 'll> DumpVisitor<'l, 'tcx, 'll, D> {
854854
let path_data = match path_data {
855855
Some(pd) => pd,
856856
None => {
857-
span_bug!(path.span,
858-
"Unexpected def kind while looking up path in `{}`",
859-
self.span.snippet(path.span))
857+
return;
860858
}
861859
};
862860

0 commit comments

Comments
 (0)