Rollup merge of #37144 - eulerdisk:fix_37126, r=nrc
save_analysis: Dump data only if get_path_data doesn't fail to resolve a path. Solves #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
This commit is contained in:
commit
6a1d4e911a
@ -854,9 +854,7 @@ impl<'l, 'tcx: 'l, 'll, D: Dump + 'll> DumpVisitor<'l, 'tcx, 'll, D> {
|
||||
let path_data = match path_data {
|
||||
Some(pd) => pd,
|
||||
None => {
|
||||
span_bug!(path.span,
|
||||
"Unexpected def kind while looking up path in `{}`",
|
||||
self.span.snippet(path.span))
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user