@@ -1581,8 +1581,8 @@ pub enum BodyOwnerKind {
15811581 /// Closures
15821582 Closure ,
15831583
1584- /// Constants and associated constants.
1585- Const ,
1584+ /// Constants and associated constants, also including inline constants .
1585+ Const { inline : bool } ,
15861586
15871587 /// Initializer of a `static` item.
15881588 Static ( Mutability ) ,
@@ -1592,7 +1592,7 @@ impl BodyOwnerKind {
15921592 pub fn is_fn_or_closure ( self ) -> bool {
15931593 match self {
15941594 BodyOwnerKind :: Fn | BodyOwnerKind :: Closure => true ,
1595- BodyOwnerKind :: Const | BodyOwnerKind :: Static ( _) => false ,
1595+ BodyOwnerKind :: Const { .. } | BodyOwnerKind :: Static ( _) => false ,
15961596 }
15971597 }
15981598}
@@ -1615,7 +1615,7 @@ pub enum ConstContext {
16151615 ///
16161616 /// For the most part, other contexts are treated just like a regular `const`, so they are
16171617 /// lumped into the same category.
1618- Const ,
1618+ Const { inline : bool } ,
16191619}
16201620
16211621impl ConstContext {
@@ -1624,7 +1624,7 @@ impl ConstContext {
16241624 /// E.g. `const` or `static mut`.
16251625 pub fn keyword_name ( self ) -> & ' static str {
16261626 match self {
1627- Self :: Const => "const" ,
1627+ Self :: Const { .. } => "const" ,
16281628 Self :: Static ( Mutability :: Not ) => "static" ,
16291629 Self :: Static ( Mutability :: Mut ) => "static mut" ,
16301630 Self :: ConstFn => "const fn" ,
@@ -1637,7 +1637,7 @@ impl ConstContext {
16371637impl fmt:: Display for ConstContext {
16381638 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
16391639 match * self {
1640- Self :: Const => write ! ( f, "constant" ) ,
1640+ Self :: Const { .. } => write ! ( f, "constant" ) ,
16411641 Self :: Static ( _) => write ! ( f, "static" ) ,
16421642 Self :: ConstFn => write ! ( f, "constant function" ) ,
16431643 }
0 commit comments