mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Various cleanups
- remove Valid, it serves no purpose and just obscures the diff - rename some things - don't use is_valid_candidate when searching for impl, it's not necessary
This commit is contained in:
parent
1064c7513a
commit
29f01cd9d2
2 changed files with 121 additions and 144 deletions
|
@ -281,7 +281,7 @@ impl SourceAnalyzer {
|
|||
_ => (),
|
||||
};
|
||||
let (func, self_ty) = fun_info?;
|
||||
let implied_trait = match func.lookup(db.upcast()).container {
|
||||
let impled_trait = match func.lookup(db.upcast()).container {
|
||||
ItemContainerId::TraitId(trait_id) => trait_id,
|
||||
_ => return None,
|
||||
};
|
||||
|
@ -293,13 +293,7 @@ impl SourceAnalyzer {
|
|||
);
|
||||
|
||||
let fun_data = db.function_data(func);
|
||||
method_resolution::lookup_trait_m_for_self_ty(
|
||||
&self_ty,
|
||||
db,
|
||||
trait_env,
|
||||
implied_trait,
|
||||
&fun_data.name,
|
||||
)
|
||||
method_resolution::lookup_impl_method(&self_ty, db, trait_env, impled_trait, &fun_data.name)
|
||||
}
|
||||
|
||||
pub(crate) fn resolve_field(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue