Skip to content

Commit e5d1b9c

Browse files
nrcalexcrichton
authored andcommitted
save-analysis: cope with lack of method data after a type error
Fixes rust-lang#39957
1 parent f573db4 commit e5d1b9c

File tree

1 file changed

+4
-1
lines changed
  • src/librustc_save_analysis

1 file changed

+4
-1
lines changed

src/librustc_save_analysis/lib.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,10 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
387387
}
388388
}
389389
None => {
390-
span_bug!(span, "Could not find container for method {}", id);
390+
debug!("Could not find container for method {} at {:?}", id, span);
391+
// This is not necessarily a bug, if there was a compilation error, the tables
392+
// we need might not exist.
393+
return None;
391394
}
392395
},
393396
};

0 commit comments

Comments
 (0)