mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
Discover type parameters in more cases
This commit is contained in:
parent
971df306ad
commit
6e2e60cbc9
@ -184,6 +184,11 @@ impl TypeParam {
|
||||
let res = match_ast! {
|
||||
match it {
|
||||
ast::FnDef(value) => { Function::from_source(db, InFile { value, file_id})?.id.into() },
|
||||
ast::StructDef(value) => { Struct::from_source(db, InFile { value, file_id})?.id.into() },
|
||||
ast::EnumDef(value) => { Enum::from_source(db, InFile { value, file_id})?.id.into() },
|
||||
ast::TraitDef(value) => { Trait::from_source(db, InFile { value, file_id})?.id.into() },
|
||||
ast::TypeAliasDef(value) => { TypeAlias::from_source(db, InFile { value, file_id})?.id.into() },
|
||||
ast::ImplBlock(value) => { ImplBlock::from_source(db, InFile { value, file_id})?.id.into() },
|
||||
_ => return None,
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user