@@ -1581,8 +1581,8 @@ pub enum BodyOwnerKind {
1581
1581
/// Closures
1582
1582
Closure ,
1583
1583
1584
- /// Constants and associated constants.
1585
- Const ,
1584
+ /// Constants and associated constants, also including inline constants .
1585
+ Const { inline : bool } ,
1586
1586
1587
1587
/// Initializer of a `static` item.
1588
1588
Static ( Mutability ) ,
@@ -1592,7 +1592,7 @@ impl BodyOwnerKind {
1592
1592
pub fn is_fn_or_closure ( self ) -> bool {
1593
1593
match self {
1594
1594
BodyOwnerKind :: Fn | BodyOwnerKind :: Closure => true ,
1595
- BodyOwnerKind :: Const | BodyOwnerKind :: Static ( _) => false ,
1595
+ BodyOwnerKind :: Const { .. } | BodyOwnerKind :: Static ( _) => false ,
1596
1596
}
1597
1597
}
1598
1598
}
@@ -1615,7 +1615,7 @@ pub enum ConstContext {
1615
1615
///
1616
1616
/// For the most part, other contexts are treated just like a regular `const`, so they are
1617
1617
/// lumped into the same category.
1618
- Const ,
1618
+ Const { inline : bool } ,
1619
1619
}
1620
1620
1621
1621
impl ConstContext {
@@ -1624,7 +1624,7 @@ impl ConstContext {
1624
1624
/// E.g. `const` or `static mut`.
1625
1625
pub fn keyword_name ( self ) -> & ' static str {
1626
1626
match self {
1627
- Self :: Const => "const" ,
1627
+ Self :: Const { .. } => "const" ,
1628
1628
Self :: Static ( Mutability :: Not ) => "static" ,
1629
1629
Self :: Static ( Mutability :: Mut ) => "static mut" ,
1630
1630
Self :: ConstFn => "const fn" ,
@@ -1637,7 +1637,7 @@ impl ConstContext {
1637
1637
impl fmt:: Display for ConstContext {
1638
1638
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
1639
1639
match * self {
1640
- Self :: Const => write ! ( f, "constant" ) ,
1640
+ Self :: Const { .. } => write ! ( f, "constant" ) ,
1641
1641
Self :: Static ( _) => write ! ( f, "static" ) ,
1642
1642
Self :: ConstFn => write ! ( f, "constant function" ) ,
1643
1643
}
0 commit comments