14
14
//! - [`Generics`], [`GenericParam`], [`WhereClause`]: Metadata associated with generic parameters.
15
15
//! - [`EnumDef`] and [`Variant`]: Enum declaration.
16
16
//! - [`Lit`] and [`LitKind`]: Literal expressions.
17
- //! - [`MacroDef`], [`MacStmtStyle`], [`Mac `], [`MacDelimeter`]: Macro definition and invocation.
17
+ //! - [`MacroDef`], [`MacStmtStyle`], [`MacCall `], [`MacDelimeter`]: Macro definition and invocation.
18
18
//! - [`Attribute`]: Metadata associated with item.
19
19
//! - [`UnOp`], [`UnOpKind`], [`BinOp`], [`BinOpKind`]: Unary and binary operators.
20
20
@@ -512,7 +512,7 @@ impl Pat {
512
512
TyKind :: Path ( None , Path :: from_ident ( * ident) )
513
513
}
514
514
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 ( ) ) ,
516
516
// `&mut? P` can be reinterpreted as `&mut? T` where `T` is `P` reparsed as a type.
517
517
PatKind :: Ref ( pat, mutbl) => {
518
518
pat. to_ty ( ) . map ( |ty| TyKind :: Rptr ( None , MutTy { ty, mutbl : * mutbl } ) ) ?
@@ -566,7 +566,7 @@ impl Pat {
566
566
| PatKind :: Range ( ..)
567
567
| PatKind :: Ident ( ..)
568
568
| PatKind :: Path ( ..)
569
- | PatKind :: Mac ( _) => { }
569
+ | PatKind :: MacCall ( _) => { }
570
570
}
571
571
}
572
572
@@ -681,7 +681,7 @@ pub enum PatKind {
681
681
Paren ( P < Pat > ) ,
682
682
683
683
/// A macro pattern; pre-expansion.
684
- Mac ( Mac ) ,
684
+ MacCall ( MacCall ) ,
685
685
}
686
686
687
687
#[ derive(
@@ -880,9 +880,9 @@ impl Stmt {
880
880
pub fn add_trailing_semicolon ( mut self ) -> Self {
881
881
self . kind = match self . kind {
882
882
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
+ ) ,
886
886
kind => kind,
887
887
} ;
888
888
self
@@ -916,7 +916,7 @@ pub enum StmtKind {
916
916
/// Just a trailing semi-colon.
917
917
Empty ,
918
918
/// Macro.
919
- Mac ( P < ( Mac , MacStmtStyle , AttrVec ) > ) ,
919
+ MacCall ( P < ( MacCall , MacStmtStyle , AttrVec ) > ) ,
920
920
}
921
921
922
922
#[ derive( Clone , Copy , PartialEq , RustcEncodable , RustcDecodable , Debug ) ]
@@ -1056,7 +1056,7 @@ impl Expr {
1056
1056
let kind = match & self . kind {
1057
1057
// Trivial conversions.
1058
1058
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 ( ) ) ,
1060
1060
1061
1061
ExprKind :: Paren ( expr) => expr. to_ty ( ) . map ( TyKind :: Paren ) ?,
1062
1062
@@ -1126,7 +1126,7 @@ impl Expr {
1126
1126
ExprKind :: Continue ( ..) => ExprPrecedence :: Continue ,
1127
1127
ExprKind :: Ret ( ..) => ExprPrecedence :: Ret ,
1128
1128
ExprKind :: InlineAsm ( ..) => ExprPrecedence :: InlineAsm ,
1129
- ExprKind :: Mac ( ..) => ExprPrecedence :: Mac ,
1129
+ ExprKind :: MacCall ( ..) => ExprPrecedence :: Mac ,
1130
1130
ExprKind :: Struct ( ..) => ExprPrecedence :: Struct ,
1131
1131
ExprKind :: Repeat ( ..) => ExprPrecedence :: Repeat ,
1132
1132
ExprKind :: Paren ( ..) => ExprPrecedence :: Paren ,
@@ -1258,7 +1258,7 @@ pub enum ExprKind {
1258
1258
InlineAsm ( P < InlineAsm > ) ,
1259
1259
1260
1260
/// A macro invocation; pre-expansion.
1261
- Mac ( Mac ) ,
1261
+ MacCall ( MacCall ) ,
1262
1262
1263
1263
/// A struct literal expression.
1264
1264
///
@@ -1344,13 +1344,13 @@ pub enum Movability {
1344
1344
/// Represents a macro invocation. The `path` indicates which macro
1345
1345
/// is being invoked, and the `args` are arguments passed to it.
1346
1346
#[ derive( Clone , RustcEncodable , RustcDecodable , Debug ) ]
1347
- pub struct Mac {
1347
+ pub struct MacCall {
1348
1348
pub path : Path ,
1349
1349
pub args : P < MacArgs > ,
1350
1350
pub prior_type_ascription : Option < ( Span , bool ) > ,
1351
1351
}
1352
1352
1353
- impl Mac {
1353
+ impl MacCall {
1354
1354
pub fn span ( & self ) -> Span {
1355
1355
self . path . span . to ( self . args . span ( ) . unwrap_or ( self . path . span ) )
1356
1356
}
@@ -1880,7 +1880,7 @@ pub enum TyKind {
1880
1880
/// Inferred type of a `self` or `&self` argument in a method.
1881
1881
ImplicitSelf ,
1882
1882
/// A macro in the type position.
1883
- Mac ( Mac ) ,
1883
+ MacCall ( MacCall ) ,
1884
1884
/// Placeholder for a kind that has failed to be defined.
1885
1885
Err ,
1886
1886
/// Placeholder for a `va_list`.
@@ -2573,7 +2573,7 @@ pub enum ItemKind {
2573
2573
/// A macro invocation.
2574
2574
///
2575
2575
/// E.g., `foo!(..)`.
2576
- Mac ( Mac ) ,
2576
+ MacCall ( MacCall ) ,
2577
2577
2578
2578
/// A macro definition.
2579
2579
MacroDef ( MacroDef ) ,
@@ -2585,7 +2585,7 @@ impl ItemKind {
2585
2585
match self {
2586
2586
Use ( ..) | Static ( ..) | Const ( ..) | Fn ( ..) | Mod ( ..) | GlobalAsm ( ..) | TyAlias ( ..)
2587
2587
| Struct ( ..) | Union ( ..) | Trait ( ..) | TraitAlias ( ..) | MacroDef ( ..) => "a" ,
2588
- ExternCrate ( ..) | ForeignMod ( ..) | Mac ( ..) | Enum ( ..) | Impl { .. } => "an" ,
2588
+ ExternCrate ( ..) | ForeignMod ( ..) | MacCall ( ..) | Enum ( ..) | Impl { .. } => "an" ,
2589
2589
}
2590
2590
}
2591
2591
@@ -2605,7 +2605,7 @@ impl ItemKind {
2605
2605
ItemKind :: Union ( ..) => "union" ,
2606
2606
ItemKind :: Trait ( ..) => "trait" ,
2607
2607
ItemKind :: TraitAlias ( ..) => "trait alias" ,
2608
- ItemKind :: Mac ( ..) => "item macro invocation" ,
2608
+ ItemKind :: MacCall ( ..) => "item macro invocation" ,
2609
2609
ItemKind :: MacroDef ( ..) => "macro definition" ,
2610
2610
ItemKind :: Impl { .. } => "implementation" ,
2611
2611
}
@@ -2658,14 +2658,14 @@ pub enum AssocItemKind {
2658
2658
/// A type.
2659
2659
TyAlias ( Defaultness , Generics , GenericBounds , Option < P < Ty > > ) ,
2660
2660
/// A macro expanding to items.
2661
- Macro ( Mac ) ,
2661
+ MacCall ( MacCall ) ,
2662
2662
}
2663
2663
2664
2664
impl AssocItemKind {
2665
2665
pub fn defaultness ( & self ) -> Defaultness {
2666
2666
match * self {
2667
2667
Self :: Const ( def, ..) | Self :: Fn ( def, ..) | Self :: TyAlias ( def, ..) => def,
2668
- Self :: Macro ( ..) | Self :: Static ( ..) => Defaultness :: Final ,
2668
+ Self :: MacCall ( ..) | Self :: Static ( ..) => Defaultness :: Final ,
2669
2669
}
2670
2670
}
2671
2671
}
@@ -2677,7 +2677,7 @@ impl IntoItemKind for AssocItemKind {
2677
2677
AssocItemKind :: Static ( a, b, c) => ItemKind :: Static ( a, b, c) ,
2678
2678
AssocItemKind :: Fn ( a, b, c, d) => ItemKind :: Fn ( a, b, c, d) ,
2679
2679
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) ,
2681
2681
}
2682
2682
}
2683
2683
}
0 commit comments