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.
This commit is contained in:
Chayim Refael Friedman 2025-10-12 16:15:13 +03:00
parent 4b247ba0a5
commit aa711f622f
2 changed files with 2 additions and 2 deletions

View file

@ -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;

View file

@ -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>>,