diff options
| author | bors <bors@rust-lang.org> | 2024-03-19 13:10:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-19 13:10:01 +0000 |
| commit | 200e3f7995e231535fdea3be9cb9a3f098b4c856 (patch) | |
| tree | 2be50f3e9da214446715dad1446ebb2c24b23c55 /compiler/rustc_middle/src/ty | |
| parent | f296c162d8c6f84bcfee99c152d4fd63aaef3e38 (diff) | |
| parent | a8f71cf2893e03ec0ef7663f680f5d816e80f801 (diff) | |
| download | rust-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.rs | 7 |
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)), + ) } |
