From d04039efda99f23538a6ac1c6d5875fab712c273 Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Thu, 22 Apr 2021 10:02:26 +0200 Subject: [PATCH] Add track_caller to type lookups (#599) --- crates/rustc_codegen_spirv/src/codegen_cx/mod.rs | 1 + crates/rustc_codegen_spirv/src/spirv_type.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/crates/rustc_codegen_spirv/src/codegen_cx/mod.rs b/crates/rustc_codegen_spirv/src/codegen_cx/mod.rs index 4734236e01..43ead54a3b 100644 --- a/crates/rustc_codegen_spirv/src/codegen_cx/mod.rs +++ b/crates/rustc_codegen_spirv/src/codegen_cx/mod.rs @@ -124,6 +124,7 @@ impl<'tcx> CodegenCx<'tcx> { self.builder.builder(cursor) } + #[track_caller] pub fn lookup_type(&self, ty: Word) -> SpirvType { self.type_cache.lookup(ty) } diff --git a/crates/rustc_codegen_spirv/src/spirv_type.rs b/crates/rustc_codegen_spirv/src/spirv_type.rs index b94a8bf04f..49cc32ddf6 100644 --- a/crates/rustc_codegen_spirv/src/spirv_type.rs +++ b/crates/rustc_codegen_spirv/src/spirv_type.rs @@ -705,6 +705,7 @@ impl TypeCache<'_> { self.type_defs.borrow().get_by_right(ty).copied() } + #[track_caller] pub fn lookup(&self, word: Word) -> SpirvType { self.type_defs .borrow()