diff options
| author | bors <bors@rust-lang.org> | 2024-03-04 08:07:34 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-04 08:07:34 +0000 |
| commit | 7606c13961ddc1174b70638e934df0439b7dc515 (patch) | |
| tree | 62e3886ae09a1fdf90bea03909cd170505421967 /compiler/rustc_query_impl/src | |
| parent | f7cb53e54b0f2a403c12c123b5583a8d0d3ba3fe (diff) | |
| parent | de95c39a782fd0c51b327c61e7864a5c9f874952 (diff) | |
| download | rust-7606c13961ddc1174b70638e934df0439b7dc515.tar.gz rust-7606c13961ddc1174b70638e934df0439b7dc515.zip | |
Auto merge of #121964 - matthiaskrgr:rollup-rtcju5m, r=matthiaskrgr
Rollup of 3 pull requests Successful merges: - #121130 (Suggest moving definition if non-found macro_rules! is defined later) - #121912 (Properly deal with GATs when looking for method chains to point at) - #121927 (Add a proper `with_no_queries` to printing) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_query_impl/src')
| -rw-r--r-- | compiler/rustc_query_impl/src/plumbing.rs | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs index c7baca86d93..1b546bf9103 100644 --- a/compiler/rustc_query_impl/src/plumbing.rs +++ b/compiler/rustc_query_impl/src/plumbing.rs @@ -18,7 +18,7 @@ use rustc_middle::query::on_disk_cache::AbsoluteBytePos; use rustc_middle::query::on_disk_cache::{CacheDecoder, CacheEncoder, EncodedDepNodeIndex}; use rustc_middle::query::Key; use rustc_middle::ty::tls::{self, ImplicitCtxt}; -use rustc_middle::ty::{self, print::with_no_queries, TyCtxt}; +use rustc_middle::ty::{self, TyCtxt}; use rustc_query_system::dep_graph::{DepNodeParams, HasDepContext}; use rustc_query_system::ich::StableHashingContext; use rustc_query_system::query::{ @@ -305,20 +305,13 @@ pub(crate) fn create_query_frame< name: &'static str, ) -> QueryStackFrame { // Avoid calling queries while formatting the description - let description = ty::print::with_no_queries!( - // Disable visible paths printing for performance reasons. - // Showing visible path instead of any path is not that important in production. - ty::print::with_no_visible_paths!( - // Force filename-line mode to avoid invoking `type_of` query. - ty::print::with_forced_impl_filename_line!(do_describe(tcx, key)) - ) - ); + let description = ty::print::with_no_queries!(do_describe(tcx, key)); let description = if tcx.sess.verbose_internals() { format!("{description} [{name:?}]") } else { description }; - let span = if kind == dep_graph::dep_kinds::def_span || with_no_queries() { + let span = if kind == dep_graph::dep_kinds::def_span { // The `def_span` query is used to calculate `default_span`, // so exit to avoid infinite recursion. None @@ -326,7 +319,7 @@ pub(crate) fn create_query_frame< Some(key.default_span(tcx)) }; let def_id = key.key_as_def_id(); - let def_kind = if kind == dep_graph::dep_kinds::def_kind || with_no_queries() { + let def_kind = if kind == dep_graph::dep_kinds::def_kind { // Try to avoid infinite recursion. None } else { |
