Unnamed repository; edit this file 'description' to name the repository.
Make `lookup_impl_method()` query transparent
The bulk of the work is trait solving and cached in the trait solver's cache, and this will save memory.
| -rw-r--r-- | crates/hir-ty/src/consteval.rs | 3 | ||||
| -rw-r--r-- | crates/hir-ty/src/db.rs | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir-ty/src/consteval.rs b/crates/hir-ty/src/consteval.rs index 002e0823b9..761d72243e 100644 --- a/crates/hir-ty/src/consteval.rs +++ b/crates/hir-ty/src/consteval.rs @@ -5,13 +5,12 @@ mod tests; use base_db::Crate; use hir_def::{ - EnumVariantId, GeneralConstId, + EnumVariantId, GeneralConstId, HasModule, StaticId, expr_store::{Body, HygieneId, path::Path}, hir::{Expr, ExprId}, resolver::{Resolver, ValueNs}, type_ref::LiteralConstRef, }; -use hir_def::{HasModule, StaticId}; use hir_expand::Lookup; use rustc_type_ir::{UnevaluatedConst, inherent::IntoKind}; use stdx::never; diff --git a/crates/hir-ty/src/db.rs b/crates/hir-ty/src/db.rs index 4b33c8a84a..6c1d05ab1b 100644 --- a/crates/hir-ty/src/db.rs +++ b/crates/hir-ty/src/db.rs @@ -96,6 +96,7 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug { ) -> Result<i128, ConstEvalError<'db>>; #[salsa::invoke(crate::method_resolution::lookup_impl_method_query)] + #[salsa::transparent] fn lookup_impl_method<'db>( &'db self, env: Arc<TraitEnvironment<'db>>, |