From 88b031e6efa417bb8cc0eecb18db13bfa93be19b Mon Sep 17 00:00:00 2001 From: Andrea Pretto Date: Thu, 13 Oct 2016 17:40:58 +0200 Subject: [PATCH] save-analysis: dump data only if get_path_data doesn't fail to resolve a path. Fixes #37126. --- src/librustc_save_analysis/dump_visitor.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/librustc_save_analysis/dump_visitor.rs b/src/librustc_save_analysis/dump_visitor.rs index 6d9cd88afb17b..1c60ccb976588 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; } };