@@ -1592,14 +1592,6 @@ pub struct AnonConst {
1592
1592
pub span : Span ,
1593
1593
}
1594
1594
1595
- /// An inline constant expression `const { something }`.
1596
- #[ derive( Copy , Clone , Debug , HashStable_Generic ) ]
1597
- pub struct ConstBlock {
1598
- pub hir_id : HirId ,
1599
- pub def_id : LocalDefId ,
1600
- pub body : BodyId ,
1601
- }
1602
-
1603
1595
/// An expression.
1604
1596
#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
1605
1597
pub struct Expr < ' hir > {
@@ -1886,7 +1878,7 @@ pub fn is_range_literal(expr: &Expr<'_>) -> bool {
1886
1878
#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
1887
1879
pub enum ExprKind < ' hir > {
1888
1880
/// Allow anonymous constants from an inline `const` block
1889
- ConstBlock ( ConstBlock ) ,
1881
+ ConstBlock ( & ' hir Expr < ' hir > ) ,
1890
1882
/// An array (e.g., `[a, b, c, d]`).
1891
1883
Array ( & ' hir [ Expr < ' hir > ] ) ,
1892
1884
/// A function call.
@@ -3609,7 +3601,6 @@ pub enum Node<'hir> {
3609
3601
Variant ( & ' hir Variant < ' hir > ) ,
3610
3602
Field ( & ' hir FieldDef < ' hir > ) ,
3611
3603
AnonConst ( & ' hir AnonConst ) ,
3612
- ConstBlock ( & ' hir ConstBlock ) ,
3613
3604
Expr ( & ' hir Expr < ' hir > ) ,
3614
3605
ExprField ( & ' hir ExprField < ' hir > ) ,
3615
3606
Stmt ( & ' hir Stmt < ' hir > ) ,
@@ -3670,7 +3661,6 @@ impl<'hir> Node<'hir> {
3670
3661
Node :: PreciseCapturingNonLifetimeArg ( a) => Some ( a. ident ) ,
3671
3662
Node :: Param ( ..)
3672
3663
| Node :: AnonConst ( ..)
3673
- | Node :: ConstBlock ( ..)
3674
3664
| Node :: Expr ( ..)
3675
3665
| Node :: Stmt ( ..)
3676
3666
| Node :: Block ( ..)
@@ -3768,7 +3758,6 @@ impl<'hir> Node<'hir> {
3768
3758
}
3769
3759
3770
3760
Node :: AnonConst ( constant) => Some ( ( constant. def_id , constant. body ) ) ,
3771
- Node :: ConstBlock ( constant) => Some ( ( constant. def_id , constant. body ) ) ,
3772
3761
3773
3762
_ => None ,
3774
3763
}
@@ -3837,7 +3826,6 @@ impl<'hir> Node<'hir> {
3837
3826
expect_variant, & ' hir Variant <' hir>, Node :: Variant ( n) , n;
3838
3827
expect_field, & ' hir FieldDef <' hir>, Node :: Field ( n) , n;
3839
3828
expect_anon_const, & ' hir AnonConst , Node :: AnonConst ( n) , n;
3840
- expect_inline_const, & ' hir ConstBlock , Node :: ConstBlock ( n) , n;
3841
3829
expect_expr, & ' hir Expr <' hir>, Node :: Expr ( n) , n;
3842
3830
expect_expr_field, & ' hir ExprField <' hir>, Node :: ExprField ( n) , n;
3843
3831
expect_stmt, & ' hir Stmt <' hir>, Node :: Stmt ( n) , n;
0 commit comments