Resolve TODO about macro 2.0 def

This commit is contained in:
veetaha 2020-05-10 22:08:06 +03:00
parent 73c6bc4dbd
commit 2a5ab9f5dd
2 changed files with 8 additions and 14 deletions

View file

@ -2537,17 +2537,15 @@ impl MetaItem {
pub fn attr_input(&self) -> Option<AttrInput> { support::child(&self.syntax) }
pub fn nested_meta_items(&self) -> AstChildren<MetaItem> { support::children(&self.syntax) }
}
/// Macro definition.
///
/// Macro 2.0 definition.
/// Their syntax is still WIP by rustc team...
/// ```
/// ❰
/// macro_rules! foo {
/// ($bar:tt) => {$bar}
/// }
/// macro foo { }
/// ❱
/// ```
///
/// [Reference](https://doc.rust-lang.org/reference/macros-by-example.html)
/// [RFC](https://github.com/rust-lang/rfcs/blob/master/text/1584-macros.md)
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct MacroDef {
pub(crate) syntax: SyntaxNode,