Skip to content

Commit 8e50536

Browse files
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.
1 parent 4950b2b commit 8e50536

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/hir-ty/src/consteval.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ mod tests;
55

66
use base_db::Crate;
77
use hir_def::{
8-
EnumVariantId, GeneralConstId,
8+
EnumVariantId, GeneralConstId, HasModule, StaticId,
99
expr_store::{Body, HygieneId, path::Path},
1010
hir::{Expr, ExprId},
1111
resolver::{Resolver, ValueNs},
1212
type_ref::LiteralConstRef,
1313
};
14-
use hir_def::{HasModule, StaticId};
1514
use hir_expand::Lookup;
1615
use rustc_type_ir::{UnevaluatedConst, inherent::IntoKind};
1716
use stdx::never;

crates/hir-ty/src/db.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
9696
) -> Result<i128, ConstEvalError<'db>>;
9797

9898
#[salsa::invoke(crate::method_resolution::lookup_impl_method_query)]
99+
#[salsa::transparent]
99100
fn lookup_impl_method<'db>(
100101
&'db self,
101102
env: Arc<TraitEnvironment<'db>>,

0 commit comments

Comments
 (0)