mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Reduce visibility
This commit is contained in:
parent
85532e2df3
commit
28adb8fe16
1 changed files with 3 additions and 3 deletions
|
@ -262,14 +262,14 @@ pub enum MacroCallKind {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl MacroCallKind {
|
impl MacroCallKind {
|
||||||
pub fn file_id(&self) -> HirFileId {
|
fn file_id(&self) -> HirFileId {
|
||||||
match self {
|
match self {
|
||||||
MacroCallKind::FnLike(ast_id) => ast_id.file_id,
|
MacroCallKind::FnLike(ast_id) => ast_id.file_id,
|
||||||
MacroCallKind::Attr(ast_id, _) => ast_id.file_id,
|
MacroCallKind::Attr(ast_id, _) => ast_id.file_id,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn node(&self, db: &dyn db::AstDatabase) -> InFile<SyntaxNode> {
|
fn node(&self, db: &dyn db::AstDatabase) -> InFile<SyntaxNode> {
|
||||||
match self {
|
match self {
|
||||||
MacroCallKind::FnLike(ast_id) => ast_id.with_value(ast_id.to_node(db).syntax().clone()),
|
MacroCallKind::FnLike(ast_id) => ast_id.with_value(ast_id.to_node(db).syntax().clone()),
|
||||||
MacroCallKind::Attr(ast_id, _) => {
|
MacroCallKind::Attr(ast_id, _) => {
|
||||||
|
@ -278,7 +278,7 @@ impl MacroCallKind {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn arg(&self, db: &dyn db::AstDatabase) -> Option<SyntaxNode> {
|
fn arg(&self, db: &dyn db::AstDatabase) -> Option<SyntaxNode> {
|
||||||
match self {
|
match self {
|
||||||
MacroCallKind::FnLike(ast_id) => {
|
MacroCallKind::FnLike(ast_id) => {
|
||||||
Some(ast_id.to_node(db).token_tree()?.syntax().clone())
|
Some(ast_id.to_node(db).token_tree()?.syntax().clone())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue