mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Treat extern blocks as item containers
This commit is contained in:
parent
b7afb6fc6c
commit
b365b6119c
26 changed files with 216 additions and 164 deletions
|
@ -14,7 +14,7 @@ use hir_def::{
|
|||
},
|
||||
path::{GenericArg, GenericArgs},
|
||||
resolver::resolver_for_expr,
|
||||
AssocContainerId, FieldId, FunctionId, Lookup,
|
||||
FieldId, FunctionId, ItemContainerId, Lookup,
|
||||
};
|
||||
use hir_expand::name::{name, Name};
|
||||
use stdx::always;
|
||||
|
@ -1167,8 +1167,7 @@ impl<'a> InferenceContext<'a> {
|
|||
// add obligation for trait implementation, if this is a trait method
|
||||
match def {
|
||||
CallableDefId::FunctionId(f) => {
|
||||
if let AssocContainerId::TraitId(trait_) = f.lookup(self.db.upcast()).container
|
||||
{
|
||||
if let ItemContainerId::TraitId(trait_) = f.lookup(self.db.upcast()).container {
|
||||
// construct a TraitRef
|
||||
let substs = crate::subst_prefix(
|
||||
&*parameters,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue