1414//! - [`Generics`], [`GenericParam`], [`WhereClause`]: Metadata associated with generic parameters.
1515//! - [`EnumDef`] and [`Variant`]: Enum declaration.
1616//! - [`Lit`] and [`LitKind`]: Literal expressions.
17- //! - [`MacroDef`], [`MacStmtStyle`], [`Mac `], [`MacDelimeter`]: Macro definition and invocation.
17+ //! - [`MacroDef`], [`MacStmtStyle`], [`MacCall `], [`MacDelimeter`]: Macro definition and invocation.
1818//! - [`Attribute`]: Metadata associated with item.
1919//! - [`UnOp`], [`UnOpKind`], [`BinOp`], [`BinOpKind`]: Unary and binary operators.
2020
@@ -512,7 +512,7 @@ impl Pat {
512512 TyKind :: Path ( None , Path :: from_ident ( * ident) )
513513 }
514514 PatKind :: Path ( qself, path) => TyKind :: Path ( qself. clone ( ) , path. clone ( ) ) ,
515- PatKind :: Mac ( mac) => TyKind :: Mac ( mac. clone ( ) ) ,
515+ PatKind :: MacCall ( mac) => TyKind :: MacCall ( mac. clone ( ) ) ,
516516 // `&mut? P` can be reinterpreted as `&mut? T` where `T` is `P` reparsed as a type.
517517 PatKind :: Ref ( pat, mutbl) => {
518518 pat. to_ty ( ) . map ( |ty| TyKind :: Rptr ( None , MutTy { ty, mutbl : * mutbl } ) ) ?
@@ -566,7 +566,7 @@ impl Pat {
566566 | PatKind :: Range ( ..)
567567 | PatKind :: Ident ( ..)
568568 | PatKind :: Path ( ..)
569- | PatKind :: Mac ( _) => { }
569+ | PatKind :: MacCall ( _) => { }
570570 }
571571 }
572572
@@ -681,7 +681,7 @@ pub enum PatKind {
681681 Paren ( P < Pat > ) ,
682682
683683 /// A macro pattern; pre-expansion.
684- Mac ( Mac ) ,
684+ MacCall ( MacCall ) ,
685685}
686686
687687#[ derive(
@@ -880,9 +880,9 @@ impl Stmt {
880880 pub fn add_trailing_semicolon ( mut self ) -> Self {
881881 self . kind = match self . kind {
882882 StmtKind :: Expr ( expr) => StmtKind :: Semi ( expr) ,
883- StmtKind :: Mac ( mac) => {
884- StmtKind :: Mac ( mac. map ( |( mac, _style, attrs) | ( mac, MacStmtStyle :: Semicolon , attrs) ) )
885- }
883+ StmtKind :: MacCall ( mac) => StmtKind :: MacCall (
884+ mac. map ( |( mac, _style, attrs) | ( mac, MacStmtStyle :: Semicolon , attrs) ) ,
885+ ) ,
886886 kind => kind,
887887 } ;
888888 self
@@ -916,7 +916,7 @@ pub enum StmtKind {
916916 /// Just a trailing semi-colon.
917917 Empty ,
918918 /// Macro.
919- Mac ( P < ( Mac , MacStmtStyle , AttrVec ) > ) ,
919+ MacCall ( P < ( MacCall , MacStmtStyle , AttrVec ) > ) ,
920920}
921921
922922#[ derive( Clone , Copy , PartialEq , RustcEncodable , RustcDecodable , Debug ) ]
@@ -1056,7 +1056,7 @@ impl Expr {
10561056 let kind = match & self . kind {
10571057 // Trivial conversions.
10581058 ExprKind :: Path ( qself, path) => TyKind :: Path ( qself. clone ( ) , path. clone ( ) ) ,
1059- ExprKind :: Mac ( mac) => TyKind :: Mac ( mac. clone ( ) ) ,
1059+ ExprKind :: MacCall ( mac) => TyKind :: MacCall ( mac. clone ( ) ) ,
10601060
10611061 ExprKind :: Paren ( expr) => expr. to_ty ( ) . map ( TyKind :: Paren ) ?,
10621062
@@ -1126,7 +1126,7 @@ impl Expr {
11261126 ExprKind :: Continue ( ..) => ExprPrecedence :: Continue ,
11271127 ExprKind :: Ret ( ..) => ExprPrecedence :: Ret ,
11281128 ExprKind :: InlineAsm ( ..) => ExprPrecedence :: InlineAsm ,
1129- ExprKind :: Mac ( ..) => ExprPrecedence :: Mac ,
1129+ ExprKind :: MacCall ( ..) => ExprPrecedence :: Mac ,
11301130 ExprKind :: Struct ( ..) => ExprPrecedence :: Struct ,
11311131 ExprKind :: Repeat ( ..) => ExprPrecedence :: Repeat ,
11321132 ExprKind :: Paren ( ..) => ExprPrecedence :: Paren ,
@@ -1258,7 +1258,7 @@ pub enum ExprKind {
12581258 InlineAsm ( P < InlineAsm > ) ,
12591259
12601260 /// A macro invocation; pre-expansion.
1261- Mac ( Mac ) ,
1261+ MacCall ( MacCall ) ,
12621262
12631263 /// A struct literal expression.
12641264 ///
@@ -1344,13 +1344,13 @@ pub enum Movability {
13441344/// Represents a macro invocation. The `path` indicates which macro
13451345/// is being invoked, and the `args` are arguments passed to it.
13461346#[ derive( Clone , RustcEncodable , RustcDecodable , Debug ) ]
1347- pub struct Mac {
1347+ pub struct MacCall {
13481348 pub path : Path ,
13491349 pub args : P < MacArgs > ,
13501350 pub prior_type_ascription : Option < ( Span , bool ) > ,
13511351}
13521352
1353- impl Mac {
1353+ impl MacCall {
13541354 pub fn span ( & self ) -> Span {
13551355 self . path . span . to ( self . args . span ( ) . unwrap_or ( self . path . span ) )
13561356 }
@@ -1880,7 +1880,7 @@ pub enum TyKind {
18801880 /// Inferred type of a `self` or `&self` argument in a method.
18811881 ImplicitSelf ,
18821882 /// A macro in the type position.
1883- Mac ( Mac ) ,
1883+ MacCall ( MacCall ) ,
18841884 /// Placeholder for a kind that has failed to be defined.
18851885 Err ,
18861886 /// Placeholder for a `va_list`.
@@ -2573,7 +2573,7 @@ pub enum ItemKind {
25732573 /// A macro invocation.
25742574 ///
25752575 /// E.g., `foo!(..)`.
2576- Mac ( Mac ) ,
2576+ MacCall ( MacCall ) ,
25772577
25782578 /// A macro definition.
25792579 MacroDef ( MacroDef ) ,
@@ -2585,7 +2585,7 @@ impl ItemKind {
25852585 match self {
25862586 Use ( ..) | Static ( ..) | Const ( ..) | Fn ( ..) | Mod ( ..) | GlobalAsm ( ..) | TyAlias ( ..)
25872587 | Struct ( ..) | Union ( ..) | Trait ( ..) | TraitAlias ( ..) | MacroDef ( ..) => "a" ,
2588- ExternCrate ( ..) | ForeignMod ( ..) | Mac ( ..) | Enum ( ..) | Impl { .. } => "an" ,
2588+ ExternCrate ( ..) | ForeignMod ( ..) | MacCall ( ..) | Enum ( ..) | Impl { .. } => "an" ,
25892589 }
25902590 }
25912591
@@ -2605,7 +2605,7 @@ impl ItemKind {
26052605 ItemKind :: Union ( ..) => "union" ,
26062606 ItemKind :: Trait ( ..) => "trait" ,
26072607 ItemKind :: TraitAlias ( ..) => "trait alias" ,
2608- ItemKind :: Mac ( ..) => "item macro invocation" ,
2608+ ItemKind :: MacCall ( ..) => "item macro invocation" ,
26092609 ItemKind :: MacroDef ( ..) => "macro definition" ,
26102610 ItemKind :: Impl { .. } => "implementation" ,
26112611 }
@@ -2658,14 +2658,14 @@ pub enum AssocItemKind {
26582658 /// A type.
26592659 TyAlias ( Defaultness , Generics , GenericBounds , Option < P < Ty > > ) ,
26602660 /// A macro expanding to items.
2661- Macro ( Mac ) ,
2661+ MacCall ( MacCall ) ,
26622662}
26632663
26642664impl AssocItemKind {
26652665 pub fn defaultness ( & self ) -> Defaultness {
26662666 match * self {
26672667 Self :: Const ( def, ..) | Self :: Fn ( def, ..) | Self :: TyAlias ( def, ..) => def,
2668- Self :: Macro ( ..) | Self :: Static ( ..) => Defaultness :: Final ,
2668+ Self :: MacCall ( ..) | Self :: Static ( ..) => Defaultness :: Final ,
26692669 }
26702670 }
26712671}
@@ -2677,7 +2677,7 @@ impl IntoItemKind for AssocItemKind {
26772677 AssocItemKind :: Static ( a, b, c) => ItemKind :: Static ( a, b, c) ,
26782678 AssocItemKind :: Fn ( a, b, c, d) => ItemKind :: Fn ( a, b, c, d) ,
26792679 AssocItemKind :: TyAlias ( a, b, c, d) => ItemKind :: TyAlias ( a, b, c, d) ,
2680- AssocItemKind :: Macro ( a) => ItemKind :: Mac ( a) ,
2680+ AssocItemKind :: MacCall ( a) => ItemKind :: MacCall ( a) ,
26812681 }
26822682 }
26832683}
0 commit comments