@@ -645,34 +645,22 @@ impl<'tcx> Cx<'tcx> {
645645 out_expr : out_expr. map ( |expr| self . mirror_expr ( expr) ) ,
646646 } ,
647647 hir:: InlineAsmOperand :: Const { ref anon_const } => {
648- let value = mir:: Const :: Unevaluated (
649- mir:: UnevaluatedConst {
650- def : anon_const. def_id . to_def_id ( ) ,
651- args : GenericArgs :: identity_for_item (
652- self . tcx ,
653- anon_const. def_id ,
654- ) ,
655- promoted : None ,
656- } ,
657- tcx. type_of ( anon_const. def_id ) . instantiate_identity ( ) ,
648+ let value = mir:: Const :: identity_unevaluated (
649+ tcx,
650+ anon_const. def_id . to_def_id ( ) ,
658651 )
652+ . instantiate_identity ( )
659653 . normalize ( tcx, self . param_env ) ;
660654 let span = tcx. def_span ( anon_const. def_id ) ;
661655
662656 InlineAsmOperand :: Const { value, span }
663657 }
664658 hir:: InlineAsmOperand :: SymFn { ref anon_const } => {
665- let value = mir:: Const :: Unevaluated (
666- mir:: UnevaluatedConst {
667- def : anon_const. def_id . to_def_id ( ) ,
668- args : GenericArgs :: identity_for_item (
669- self . tcx ,
670- anon_const. def_id ,
671- ) ,
672- promoted : None ,
673- } ,
674- tcx. type_of ( anon_const. def_id ) . instantiate_identity ( ) ,
659+ let value = mir:: Const :: identity_unevaluated (
660+ tcx,
661+ anon_const. def_id . to_def_id ( ) ,
675662 )
663+ . instantiate_identity ( )
676664 . normalize ( tcx, self . param_env ) ;
677665 let span = tcx. def_span ( anon_const. def_id ) ;
678666
0 commit comments