Skip to content

Commit 2a5ab9f

Browse files
committed
Resolve TODO about macro 2.0 def
1 parent 73c6bc4 commit 2a5ab9f

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

crates/ra_syntax/src/ast/generated/nodes.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2537,17 +2537,15 @@ impl MetaItem {
25372537
pub fn attr_input(&self) -> Option<AttrInput> { support::child(&self.syntax) }
25382538
pub fn nested_meta_items(&self) -> AstChildren<MetaItem> { support::children(&self.syntax) }
25392539
}
2540-
/// Macro definition.
2541-
///
2540+
/// Macro 2.0 definition.
2541+
/// Their syntax is still WIP by rustc team...
25422542
/// ```
25432543
/// ❰
2544-
/// macro_rules! foo {
2545-
/// ($bar:tt) => {$bar}
2546-
/// }
2544+
/// macro foo { }
25472545
/// ❱
25482546
/// ```
25492547
///
2550-
/// [Reference](https://doc.rust-lang.org/reference/macros-by-example.html)
2548+
/// [RFC](https://github.com/rust-lang/rfcs/blob/master/text/1584-macros.md)
25512549
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
25522550
pub struct MacroDef {
25532551
pub(crate) syntax: SyntaxNode,

xtask/src/ast_src.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2049,19 +2049,15 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
20492049
Path, T![=], AttrInput, nested_meta_items: [MetaItem]
20502050
}
20512051

2052-
// TODO: is this a special case of `MacroCall` where `Name` = `macro_rules`?
2053-
// It doesn't seem this ast node is used anywhere
2054-
/// Macro definition.
2055-
///
2052+
/// Macro 2.0 definition.
2053+
/// Their syntax is still WIP by rustc team...
20562054
/// ```
20572055
/// ❰
2058-
/// macro_rules! foo {
2059-
/// ($bar:tt) => {$bar}
2060-
/// }
2056+
/// macro foo { }
20612057
/// ❱
20622058
/// ```
20632059
///
2064-
/// [Reference](https://doc.rust-lang.org/reference/macros-by-example.html)
2060+
/// [RFC](https://github.com/rust-lang/rfcs/blob/master/text/1584-macros.md)
20652061
struct MacroDef {
20662062
Name, TokenTree
20672063
}

0 commit comments

Comments
 (0)