@@ -1592,14 +1592,6 @@ pub struct AnonConst {
15921592 pub span : Span ,
15931593}
15941594
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-
16031595/// An expression.
16041596#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
16051597pub struct Expr < ' hir > {
@@ -1886,7 +1878,7 @@ pub fn is_range_literal(expr: &Expr<'_>) -> bool {
18861878#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
18871879pub enum ExprKind < ' hir > {
18881880 /// Allow anonymous constants from an inline `const` block
1889- ConstBlock ( ConstBlock ) ,
1881+ ConstBlock ( & ' hir Expr < ' hir > ) ,
18901882 /// An array (e.g., `[a, b, c, d]`).
18911883 Array ( & ' hir [ Expr < ' hir > ] ) ,
18921884 /// A function call.
@@ -3609,7 +3601,6 @@ pub enum Node<'hir> {
36093601 Variant ( & ' hir Variant < ' hir > ) ,
36103602 Field ( & ' hir FieldDef < ' hir > ) ,
36113603 AnonConst ( & ' hir AnonConst ) ,
3612- ConstBlock ( & ' hir ConstBlock ) ,
36133604 Expr ( & ' hir Expr < ' hir > ) ,
36143605 ExprField ( & ' hir ExprField < ' hir > ) ,
36153606 Stmt ( & ' hir Stmt < ' hir > ) ,
@@ -3670,7 +3661,6 @@ impl<'hir> Node<'hir> {
36703661 Node :: PreciseCapturingNonLifetimeArg ( a) => Some ( a. ident ) ,
36713662 Node :: Param ( ..)
36723663 | Node :: AnonConst ( ..)
3673- | Node :: ConstBlock ( ..)
36743664 | Node :: Expr ( ..)
36753665 | Node :: Stmt ( ..)
36763666 | Node :: Block ( ..)
@@ -3768,7 +3758,6 @@ impl<'hir> Node<'hir> {
37683758 }
37693759
37703760 Node :: AnonConst ( constant) => Some ( ( constant. def_id , constant. body ) ) ,
3771- Node :: ConstBlock ( constant) => Some ( ( constant. def_id , constant. body ) ) ,
37723761
37733762 _ => None ,
37743763 }
@@ -3837,7 +3826,6 @@ impl<'hir> Node<'hir> {
38373826 expect_variant, & ' hir Variant <' hir>, Node :: Variant ( n) , n;
38383827 expect_field, & ' hir FieldDef <' hir>, Node :: Field ( n) , n;
38393828 expect_anon_const, & ' hir AnonConst , Node :: AnonConst ( n) , n;
3840- expect_inline_const, & ' hir ConstBlock , Node :: ConstBlock ( n) , n;
38413829 expect_expr, & ' hir Expr <' hir>, Node :: Expr ( n) , n;
38423830 expect_expr_field, & ' hir ExprField <' hir>, Node :: ExprField ( n) , n;
38433831 expect_stmt, & ' hir Stmt <' hir>, Node :: Stmt ( n) , n;
0 commit comments