mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
internal: Remove name fields from MacroCallKind
This commit is contained in:
parent
fbe787ee10
commit
035bedc28b
5 changed files with 38 additions and 60 deletions
|
@ -336,6 +336,7 @@ fn censor_for_macro_input(loc: &MacroCallLoc, node: &SyntaxNode) -> FxHashSet<Sy
|
|||
ast::Item::cast(node.clone())?
|
||||
.attrs()
|
||||
.take(derive_attr_index as usize + 1)
|
||||
// FIXME
|
||||
.filter(|attr| attr.simple_name().as_deref() == Some("derive"))
|
||||
.map(|it| it.syntax().clone())
|
||||
.collect()
|
||||
|
|
|
@ -125,16 +125,16 @@ pub enum MacroCallKind {
|
|||
},
|
||||
Derive {
|
||||
ast_id: AstId<ast::Adt>,
|
||||
derive_name: Box<str>,
|
||||
/// Syntactical index of the invoking `#[derive]` attribute.
|
||||
///
|
||||
/// Outer attributes are counted first, then inner attributes. This does not support
|
||||
/// out-of-line modules, which may have attributes spread across 2 files!
|
||||
derive_attr_index: u32,
|
||||
/// Index of the derive macro in the derive attribute
|
||||
derive_index: u32,
|
||||
},
|
||||
Attr {
|
||||
ast_id: AstId<ast::Item>,
|
||||
attr_name: Box<str>,
|
||||
attr_args: Arc<(tt::Subtree, mbe::TokenMap)>,
|
||||
/// Syntactical index of the invoking `#[attribute]`.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue