@@ -184,27 +184,22 @@ impl<'hir> LoweringContext<'_, 'hir> {
184184 hir:: ItemKind :: Static ( * m, ident, ty, body_id)
185185 }
186186 ItemKind :: Const ( box ast:: ConstItem {
187- ident,
188- generics,
189- ty,
190- body,
191- define_opaque,
192- ..
187+ ident, generics, ty, rhs, define_opaque, ..
193188 } ) => {
194189 let ident = self . lower_ident ( * ident) ;
195- let ( generics, ( ty, body ) ) = self . lower_generics (
190+ let ( generics, ( ty, rhs ) ) = self . lower_generics (
196191 generics,
197192 id,
198193 ImplTraitContext :: Disallowed ( ImplTraitPosition :: Generic ) ,
199194 |this| {
200195 let ty = this
201196 . lower_ty ( ty, ImplTraitContext :: Disallowed ( ImplTraitPosition :: ConstTy ) ) ;
202- let body = this. lower_const_item_rhs ( attrs, body . as_ref ( ) , span) ;
203- ( ty, body )
197+ let rhs = this. lower_const_item_rhs ( attrs, rhs . as_ref ( ) , span) ;
198+ ( ty, rhs )
204199 } ,
205200 ) ;
206201 self . lower_define_opaque ( hir_id, & define_opaque) ;
207- hir:: ItemKind :: Const ( ident, generics, ty, body )
202+ hir:: ItemKind :: Const ( ident, generics, ty, rhs )
208203 }
209204 ItemKind :: Fn ( box Fn {
210205 sig : FnSig { decl, header, span : fn_sig_span } ,
@@ -797,12 +792,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
797792
798793 let ( ident, generics, kind, has_default) = match & i. kind {
799794 AssocItemKind :: Const ( box ConstItem {
800- ident,
801- generics,
802- ty,
803- body,
804- define_opaque,
805- ..
795+ ident, generics, ty, rhs, define_opaque, ..
806796 } ) => {
807797 let ( generics, kind) = self . lower_generics (
808798 generics,
@@ -811,15 +801,15 @@ impl<'hir> LoweringContext<'_, 'hir> {
811801 |this| {
812802 let ty = this
813803 . lower_ty ( ty, ImplTraitContext :: Disallowed ( ImplTraitPosition :: ConstTy ) ) ;
814- let body = body
804+ let rhs = rhs
815805 . as_ref ( )
816- . map ( |body | this. lower_const_item_rhs ( attrs, Some ( body ) , i. span ) ) ;
817- hir:: TraitItemKind :: Const ( ty, body )
806+ . map ( |rhs | this. lower_const_item_rhs ( attrs, Some ( rhs ) , i. span ) ) ;
807+ hir:: TraitItemKind :: Const ( ty, rhs )
818808 } ,
819809 ) ;
820810
821811 if define_opaque. is_some ( ) {
822- if body . is_some ( ) {
812+ if rhs . is_some ( ) {
823813 self . lower_define_opaque ( hir_id, & define_opaque) ;
824814 } else {
825815 self . dcx ( ) . span_err (
@@ -829,7 +819,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
829819 }
830820 }
831821
832- ( * ident, generics, kind, body . is_some ( ) )
822+ ( * ident, generics, kind, rhs . is_some ( ) )
833823 }
834824 AssocItemKind :: Fn ( box Fn {
835825 sig, ident, generics, body : None , define_opaque, ..
@@ -1016,12 +1006,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
10161006
10171007 let ( ident, ( generics, kind) ) = match & i. kind {
10181008 AssocItemKind :: Const ( box ConstItem {
1019- ident,
1020- generics,
1021- ty,
1022- body,
1023- define_opaque,
1024- ..
1009+ ident, generics, ty, rhs, define_opaque, ..
10251010 } ) => (
10261011 * ident,
10271012 self . lower_generics (
@@ -1032,8 +1017,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
10321017 let ty = this
10331018 . lower_ty ( ty, ImplTraitContext :: Disallowed ( ImplTraitPosition :: ConstTy ) ) ;
10341019 this. lower_define_opaque ( hir_id, & define_opaque) ;
1035- let body = this. lower_const_item_rhs ( attrs, body . as_ref ( ) , i. span ) ;
1036- hir:: ImplItemKind :: Const ( ty, body )
1020+ let rhs = this. lower_const_item_rhs ( attrs, rhs . as_ref ( ) , i. span ) ;
1021+ hir:: ImplItemKind :: Const ( ty, rhs )
10371022 } ,
10381023 ) ,
10391024 ) ,
0 commit comments