about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-19 13:10:01 +0000
committerbors <bors@rust-lang.org>2024-03-19 13:10:01 +0000
commit200e3f7995e231535fdea3be9cb9a3f098b4c856 (patch)
tree2be50f3e9da214446715dad1446ebb2c24b23c55 /compiler/rustc_middle/src/ty
parentf296c162d8c6f84bcfee99c152d4fd63aaef3e38 (diff)
parenta8f71cf2893e03ec0ef7663f680f5d816e80f801 (diff)
downloadrust-200e3f7995e231535fdea3be9cb9a3f098b4c856.tar.gz
rust-200e3f7995e231535fdea3be9cb9a3f098b4c856.zip
Auto merge of #122037 - oli-obk:more_new_intrinsics, r=Nilstrieb
Move more intrinsics to rustc_intrinsic

cc https://github.com/rust-lang/rust/issues/63585
Diffstat (limited to 'compiler/rustc_middle/src/ty')
-rw-r--r--compiler/rustc_middle/src/ty/context/tls.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/context/tls.rs b/compiler/rustc_middle/src/ty/context/tls.rs
index 788ccd5dbbd..5e256dc8d26 100644
--- a/compiler/rustc_middle/src/ty/context/tls.rs
+++ b/compiler/rustc_middle/src/ty/context/tls.rs
@@ -85,6 +85,7 @@ where
 
 /// Allows access to the current `ImplicitCtxt` in a closure if one is available.
 #[inline]
+#[track_caller]
 pub fn with_context_opt<F, R>(f: F) -> R
 where
     F: for<'a, 'tcx> FnOnce(Option<&ImplicitCtxt<'a, 'tcx>>) -> R,
@@ -147,9 +148,13 @@ where
 /// Allows access to the `TyCtxt` in the current `ImplicitCtxt`.
 /// The closure is passed None if there is no `ImplicitCtxt` available.
 #[inline]
+#[track_caller]
 pub fn with_opt<F, R>(f: F) -> R
 where
     F: for<'tcx> FnOnce(Option<TyCtxt<'tcx>>) -> R,
 {
-    with_context_opt(|opt_context| f(opt_context.map(|context| context.tcx)))
+    with_context_opt(
+        #[track_caller]
+        |opt_context| f(opt_context.map(|context| context.tcx)),
+    )
 }