mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Handle tuple fields as well
This commit is contained in:
parent
14ea21617a
commit
7f09083c6f
2 changed files with 7 additions and 1 deletions
|
@ -94,13 +94,18 @@ impl<DB: HirDatabase> SourceToDefCtx<'_, &'_ DB> {
|
|||
) -> Option<TypeAliasId> {
|
||||
self.to_def(src, keys::TYPE_ALIAS)
|
||||
}
|
||||
//TODO: tuple field
|
||||
pub(super) fn record_field_to_def(
|
||||
&mut self,
|
||||
src: InFile<ast::RecordFieldDef>,
|
||||
) -> Option<StructFieldId> {
|
||||
self.to_def(src, keys::RECORD_FIELD)
|
||||
}
|
||||
pub(super) fn tuple_field_to_def(
|
||||
&mut self,
|
||||
src: InFile<ast::TupleFieldDef>,
|
||||
) -> Option<StructFieldId> {
|
||||
self.to_def(src, keys::TUPLE_FIELD)
|
||||
}
|
||||
pub(super) fn enum_variant_to_def(
|
||||
&mut self,
|
||||
src: InFile<ast::EnumVariant>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue