diff options
| author | bors <bors@rust-lang.org> | 2020-09-04 19:05:20 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-09-04 19:05:20 +0000 |
| commit | 42d896afbd0314375a12465a14dc8d23b1b73a55 (patch) | |
| tree | 3dfaf5ddcdd82b7f47a7bd0c5c90703cfb1d83b7 | |
| parent | d2454643e137bde519786ee9e650c455d7ad6f34 (diff) | |
| parent | cdd5d60b47fef538e085620091fa70aeaa540d07 (diff) | |
| download | rust-42d896afbd0314375a12465a14dc8d23b1b73a55.tar.gz rust-42d896afbd0314375a12465a14dc8d23b1b73a55.zip | |
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
| -rw-r--r-- | compiler/rustc_hir/src/definitions.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_hir/src/definitions.rs b/compiler/rustc_hir/src/definitions.rs index 45735ead256..45befc7b115 100644 --- a/compiler/rustc_hir/src/definitions.rs +++ b/compiler/rustc_hir/src/definitions.rs @@ -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() } |
