Disable visible path calculation for PrettyPrinter in Ok path of compiler
This commit is contained in:
parent
db1fb85cff
commit
9da27f0429
10 changed files with 54 additions and 29 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue