Skip to content

Commit 6a1d4e9

Browse files
Rollup merge of rust-lang#37144 - eulerdisk:fix_37126, r=nrc
save_analysis: Dump data only if get_path_data doesn't fail to resolve a path. Solves rust-lang#37126 Dump data only if `get_path_data` doesn't fail to resolve a path. `get_path_data` returns `None` when it have to deals with `Def::Err`, which is used as placeholder for a failed resolution. Tell me if this is good enough, maybe I have to add some tests ? r? @nrc
2 parents a5b6a9f + 88b031e commit 6a1d4e9

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)