mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Use generic ItemLoc for impls
This commit is contained in:
parent
d137df0137
commit
1234dda9ee
5 changed files with 10 additions and 28 deletions
|
@ -134,7 +134,7 @@ impl Ty {
|
|||
LangItemTarget::ImplBlockId(it) => Some(it),
|
||||
_ => None,
|
||||
})
|
||||
.map(|it| it.lookup(db).container.krate)
|
||||
.map(|it| it.lookup(db).container.module(db).krate)
|
||||
.collect();
|
||||
Some(res)
|
||||
}
|
||||
|
|
|
@ -673,7 +673,7 @@ fn impl_block_datum(
|
|||
let bound_vars = Substs::bound_vars(&generic_params);
|
||||
let trait_ref = trait_ref.subst(&bound_vars);
|
||||
let trait_ = trait_ref.trait_;
|
||||
let impl_type = if impl_id.lookup(db).container.krate == krate {
|
||||
let impl_type = if impl_id.lookup(db).container.module(db).krate == krate {
|
||||
chalk_rust_ir::ImplType::Local
|
||||
} else {
|
||||
chalk_rust_ir::ImplType::External
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue