Unnamed repository; edit this file 'description' to name the repository.
Merge #10160
10160: minor: Don't dump `DefMap`s to build the panic context r=jonas-schievink a=jonas-schievink
Fixes perf after https://github.com/rust-analyzer/rust-analyzer/pull/10159
bors r+
Co-authored-by: Jonas Schievink <[email protected]>
| -rw-r--r-- | crates/hir_def/src/data.rs | 5 | ||||
| -rw-r--r-- | crates/hir_ty/src/lower.rs | 6 |
2 files changed, 3 insertions, 8 deletions
diff --git a/crates/hir_def/src/data.rs b/crates/hir_def/src/data.rs index 3a3709f8f8..435073f675 100644 --- a/crates/hir_def/src/data.rs +++ b/crates/hir_def/src/data.rs @@ -345,10 +345,7 @@ fn collect_items( let ast_id_map = db.ast_id_map(tree_id.file_id()); let root = db.parse_or_expand(tree_id.file_id()).unwrap(); let call = ast_id_map.get(call.ast_id).to_node(&root); - let _cx = stdx::panic_context::enter(format!( - "collect_items MacroCall: {}\nexpander={:#?}", - call, expander - )); + let _cx = stdx::panic_context::enter(format!("collect_items MacroCall: {}", call)); let res = expander.enter_expand(db, call); if let Ok(res) = res { diff --git a/crates/hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs index 176ae3ad84..86678b802f 100644 --- a/crates/hir_ty/src/lower.rs +++ b/crates/hir_ty/src/lower.rs @@ -1450,10 +1450,8 @@ pub(crate) fn impl_self_ty_recover( pub(crate) fn impl_trait_query(db: &dyn HirDatabase, impl_id: ImplId) -> Option<Binders<TraitRef>> { let impl_data = db.impl_data(impl_id); let resolver = impl_id.resolver(db.upcast()); - let _cx = stdx::panic_context::enter(format!( - "impl_trait_query({:?} -> {:?}) resolver={:#?}", - impl_id, impl_data, resolver - )); + let _cx = + stdx::panic_context::enter(format!("impl_trait_query({:?} -> {:?})", impl_id, impl_data)); let ctx = TyLoweringContext::new(db, &resolver).with_type_param_mode(TypeParamLoweringMode::Variable); let (self_ty, binders) = db.impl_self_ty(impl_id).into_value_and_skipped_binders(); |