Skip to content

Add more information for ForeignDef  #61

Closed
rust-lang/rust
#120982
@momvart

Description

@momvart

ForeignDef items may correspond to functions, statics, or types. Based on rustc_hir::ForeignItem, we need an equivalent of ForeignItemKind.

For these variants:

  • Fn: Can FnDef be reused?
  • Static: The existing information on CrateDef should be enough.
  • Ty: Not sure if it is stable yet (#rust/43467)

Similar to existing kind types, the following changes are expected:

  • adding method foreign_item_kind to Context
  • adding method kind to FnDef calling the method above

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions