mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Add static semantic token modifier for associated functions with no &self
This commit is contained in:
parent
678a29e938
commit
3baa526fb0
8 changed files with 110 additions and 2 deletions
|
@ -787,6 +787,10 @@ impl Function {
|
|||
pub fn has_body(self, db: &dyn HirDatabase) -> bool {
|
||||
db.function_data(self.id).has_body
|
||||
}
|
||||
|
||||
pub fn source(self, db: &dyn HirDatabase) -> InFile<ast::Fn> {
|
||||
self.id.lookup(db.upcast()).source(db.upcast())
|
||||
}
|
||||
}
|
||||
|
||||
// Note: logically, this belongs to `hir_ty`, but we are not using it there yet.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue