syntax: Use ast::MacArgs for macro definitions

This commit is contained in:
Vadim Petrochenkov 2019-12-01 17:53:59 +03:00
parent 1a496f3379
commit 537895535d
9 changed files with 37 additions and 42 deletions

View file

@ -1474,17 +1474,11 @@ impl MacDelimiter {
/// Represents a macro definition.
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct MacroDef {
pub tokens: TokenStream,
pub body: P<MacArgs>,
/// `true` if macro was defined with `macro_rules`.
pub legacy: bool,
}
impl MacroDef {
pub fn stream(&self) -> TokenStream {
self.tokens.clone().into()
}
}
// Clippy uses Hash and PartialEq
#[derive(Clone, RustcEncodable, RustcDecodable, Debug, Copy, Hash, PartialEq, HashStable_Generic)]
pub enum StrStyle {