mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
Remove MacroFileKind
This commit is contained in:
parent
9e551d5452
commit
509fedd9d2
7 changed files with 52 additions and 70 deletions
|
@ -117,14 +117,6 @@ impl HirFileId {
|
|||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct MacroFile {
|
||||
macro_call_id: MacroCallId,
|
||||
macro_file_kind: MacroFileKind,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub enum MacroFileKind {
|
||||
Items,
|
||||
Expr,
|
||||
Statements,
|
||||
}
|
||||
|
||||
/// `MacroCallId` identifies a particular macro invocation, like
|
||||
|
@ -205,9 +197,8 @@ impl MacroCallKind {
|
|||
}
|
||||
|
||||
impl MacroCallId {
|
||||
pub fn as_file(self, kind: MacroFileKind) -> HirFileId {
|
||||
let macro_file = MacroFile { macro_call_id: self, macro_file_kind: kind };
|
||||
macro_file.into()
|
||||
pub fn as_file(self) -> HirFileId {
|
||||
MacroFile { macro_call_id: self }.into()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue