Skip to content

Commit c53fa9a

Browse files
committed
save-analysis: fix ICE on partially resolved path
Occurs when we produce save-analysis before type checking is complete (due to errors).
1 parent 5a6ca7a commit c53fa9a

File tree

1 file changed

+4
-0
lines changed
  • src/librustc_save_analysis

1 file changed

+4
-0
lines changed

src/librustc_save_analysis/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,11 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
545545
}
546546

547547
pub fn get_path_data(&self, id: NodeId, path: &ast::Path) -> Option<Data> {
548+
<<<<<<< HEAD
548549
let def = self.get_path_def(id);
550+
=======
551+
let def = option_try!(self.tcx.expect_resolution(id).maybe_full_def());
552+
>>>>>>> save-analysis: fix ICE on partially resolved path
549553
let sub_span = self.span_utils.span_for_last_ident(path.span);
550554
filter!(self.span_utils, sub_span, path.span, None);
551555
match def {

0 commit comments

Comments
 (0)