about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2016-10-26 23:49:26 +0200
committerGitHub <noreply@github.com>2016-10-26 23:49:26 +0200
commit6a1d4e911a6906332c1ec6a8bbb6d446855b29b8 (patch)
tree16137952fb0547bf374f6b1bc611aa6873ec89da /src
parenta5b6a9fa8ad2e13adbfcc5f3f624d9252379d745 (diff)
parent88b031e6efa417bb8cc0eecb18db13bfa93be19b (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/librustc_save_analysis/dump_visitor.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/librustc_save_analysis/dump_visitor.rs b/src/librustc_save_analysis/dump_visitor.rs
index 6d9cd88afb1..1c60ccb9765 100644
--- a/src/librustc_save_analysis/dump_visitor.rs
+++ b/src/librustc_save_analysis/dump_visitor.rs
@@ -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;
             }
         };