diff options
| author | bors <bors@rust-lang.org> | 2025-02-03 16:42:25 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-02-03 16:42:25 +0000 |
| commit | 534d79adf938fc3839fad47832c7cf2b4927d7d9 (patch) | |
| tree | 5f7444cc62b501bfd1abfc8343c949d445d23dc3 /compiler/rustc_middle/src/hooks/mod.rs | |
| parent | f2c4ccd852f68fb36dedc033239cb7c0fb1921ef (diff) | |
| parent | f65c6afcecec891a48885ecefc1a234ad0029606 (diff) | |
| download | rust-534d79adf938fc3839fad47832c7cf2b4927d7d9.tar.gz rust-534d79adf938fc3839fad47832c7cf2b4927d7d9.zip | |
Auto merge of #136481 - jieyouxu:rollup-w0lnnqb, r=jieyouxu
Rollup of 8 pull requests Successful merges: - #136356 (Docs for f16 and f128: correct a typo and add details) - #136404 (Remove a footgun-y feature / relic of the past from the compiletest DSL) - #136432 (LTA: Actually check where-clauses for well-formedness at the def site) - #136438 (miri: improve error when offset_from preconditions are violated) - #136441 ([`compiletest`-related cleanups 1/7] Cleanup `is_rustdoc` logic and remove a useless path join in rustdoc-json runtest logic) - #136455 (Remove some `Clone` bounds and derives.) - #136464 (Remove hook calling via `TyCtxtAt`.) - #136467 (override default config profile on tarballs) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_middle/src/hooks/mod.rs')
| -rw-r--r-- | compiler/rustc_middle/src/hooks/mod.rs | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/compiler/rustc_middle/src/hooks/mod.rs b/compiler/rustc_middle/src/hooks/mod.rs index 2be242364c1..276a02b4e0f 100644 --- a/compiler/rustc_middle/src/hooks/mod.rs +++ b/compiler/rustc_middle/src/hooks/mod.rs @@ -6,11 +6,9 @@ use rustc_hir::def_id::{DefId, DefPathHash}; use rustc_session::StableCrateId; use rustc_span::def_id::{CrateNum, LocalDefId}; -use rustc_span::{DUMMY_SP, ExpnHash, ExpnId}; -use tracing::instrument; +use rustc_span::{ExpnHash, ExpnId}; use crate::mir; -use crate::query::TyCtxtAt; use crate::ty::{Ty, TyCtxt}; macro_rules! declare_hooks { @@ -22,26 +20,14 @@ macro_rules! declare_hooks { #[inline(always)] pub fn $name(self, $($arg: $K,)*) -> $V { - self.at(DUMMY_SP).$name($($arg,)*) - } - )* - } - - impl<'tcx> TyCtxtAt<'tcx> { - $( - $(#[$attr])* - #[inline(always)] - #[instrument(level = "debug", skip(self), ret)] - pub fn $name(self, $($arg: $K,)*) -> $V - { - (self.tcx.hooks.$name)(self, $($arg,)*) + (self.hooks.$name)(self, $($arg,)*) } )* } pub struct Providers { $(pub $name: for<'tcx> fn( - TyCtxtAt<'tcx>, + TyCtxt<'tcx>, $($arg: $K,)* ) -> $V,)* } |
