mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
one macro def should be enough
This commit is contained in:
parent
2c28f5245d
commit
1b783e33e9
6 changed files with 25 additions and 33 deletions
|
@ -939,6 +939,15 @@ pub struct MacroDef {
|
|||
pub(crate) id: MacroDefId,
|
||||
}
|
||||
|
||||
impl MacroDef {
|
||||
pub fn source(
|
||||
&self,
|
||||
db: &(impl DefDatabase + AstDatabase),
|
||||
) -> (HirFileId, TreeArc<ast::MacroCall>) {
|
||||
(self.id.0.file_id(), self.id.0.to_node(db))
|
||||
}
|
||||
}
|
||||
|
||||
pub enum Container {
|
||||
Trait(Trait),
|
||||
ImplBlock(ImplBlock),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue