mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Enum variants are not generic def ids
This commit is contained in:
parent
3432ef4414
commit
3168ab5b99
22 changed files with 188 additions and 178 deletions
|
@ -13,7 +13,7 @@ use hir_def::{
|
|||
},
|
||||
lang_item::{LangItem, LangItemTarget},
|
||||
path::{GenericArgs, Path},
|
||||
BlockId, FieldId, GenericParamId, ItemContainerId, Lookup, TupleFieldId, TupleId,
|
||||
BlockId, FieldId, GenericDefId, GenericParamId, ItemContainerId, Lookup, TupleFieldId, TupleId,
|
||||
};
|
||||
use hir_expand::name::{name, Name};
|
||||
use stdx::always;
|
||||
|
@ -1895,7 +1895,8 @@ impl InferenceContext<'_> {
|
|||
let callable_ty = self.resolve_ty_shallow(callable_ty);
|
||||
if let TyKind::FnDef(fn_def, parameters) = callable_ty.kind(Interner) {
|
||||
let def: CallableDefId = from_chalk(self.db, *fn_def);
|
||||
let generic_predicates = self.db.generic_predicates(def.into());
|
||||
let generic_predicates =
|
||||
self.db.generic_predicates(GenericDefId::from(self.db.upcast(), def));
|
||||
for predicate in generic_predicates.iter() {
|
||||
let (predicate, binders) = predicate
|
||||
.clone()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue