diff options
| author | Alik Aslanyan <inline0@protonmail.com> | 2021-09-20 20:22:55 +0400 |
|---|---|---|
| committer | Alik Aslanyan <inline0@protonmail.com> | 2021-09-21 00:41:44 +0400 |
| commit | 9da27f04293853b42080c7ab20e84c1da11ec5d8 (patch) | |
| tree | 9015c8871126eda50b4994ea2c03578249981fc9 /compiler/rustc_query_impl/src | |
| parent | db1fb85cff63ad5fffe435e17128f99f9e1d970c (diff) | |
| download | rust-9da27f04293853b42080c7ab20e84c1da11ec5d8.tar.gz rust-9da27f04293853b42080c7ab20e84c1da11ec5d8.zip | |
Disable visible path calculation for PrettyPrinter in Ok path of compiler
Diffstat (limited to 'compiler/rustc_query_impl/src')
| -rw-r--r-- | compiler/rustc_query_impl/src/plumbing.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs index 90a6ba474b4..bb686b5ef3f 100644 --- a/compiler/rustc_query_impl/src/plumbing.rs +++ b/compiler/rustc_query_impl/src/plumbing.rs @@ -321,10 +321,13 @@ macro_rules! define_queries { pub fn $name<$tcx>(tcx: QueryCtxt<$tcx>, key: query_keys::$name<$tcx>) -> QueryStackFrame { let kind = dep_graph::DepKind::$name; let name = stringify!($name); - let description = ty::print::with_forced_impl_filename_line( + // Disable visible paths printing for performance reasons. + // Showing visible path instead of any path is not that important in production. + let description = ty::print::with_no_visible_paths( + || ty::print::with_forced_impl_filename_line( // Force filename-line mode to avoid invoking `type_of` query. || queries::$name::describe(tcx, key) - ); + )); let description = if tcx.sess.verbose() { format!("{} [{}]", description, name) } else { |
