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
1 changed files with 1 additions and 0 deletions

View File

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