Auto merge of #76315 - lcnr:map-track-caller, r=Mark-Simulacrum

add `#[track_caller]` to `local_def_id_to_hir_id`

Improves one of the more frequent ICE
This commit is contained in:
bors 2020-09-04 19:05:20 +00:00
commit 42d896afbd

View File

@ -313,6 +313,7 @@ impl Definitions {
} }
#[inline] #[inline]
#[track_caller]
pub fn local_def_id_to_hir_id(&self, id: LocalDefId) -> hir::HirId { pub fn local_def_id_to_hir_id(&self, id: LocalDefId) -> hir::HirId {
self.def_id_to_hir_id[id].unwrap() self.def_id_to_hir_id[id].unwrap()
} }