@@ -642,34 +642,22 @@ impl<'tcx> Cx<'tcx> {
642642 }
643643 }
644644 hir:: InlineAsmOperand :: Const { ref anon_const } => {
645- let value = mir:: Const :: Unevaluated (
646- mir:: UnevaluatedConst {
647- def : anon_const. def_id . to_def_id ( ) ,
648- args : GenericArgs :: identity_for_item (
649- self . tcx ,
650- anon_const. def_id ,
651- ) ,
652- promoted : None ,
653- } ,
654- tcx. type_of ( anon_const. def_id ) . instantiate_identity ( ) ,
645+ let value = mir:: Const :: identity_unevaluated (
646+ tcx,
647+ anon_const. def_id . to_def_id ( ) ,
655648 )
649+ . instantiate_identity ( )
656650 . normalize ( tcx, self . param_env ) ;
657651 let span = tcx. def_span ( anon_const. def_id ) ;
658652
659653 InlineAsmOperand :: Const { value, span }
660654 }
661655 hir:: InlineAsmOperand :: SymFn { ref anon_const } => {
662- let value = mir:: Const :: Unevaluated (
663- mir:: UnevaluatedConst {
664- def : anon_const. def_id . to_def_id ( ) ,
665- args : GenericArgs :: identity_for_item (
666- self . tcx ,
667- anon_const. def_id ,
668- ) ,
669- promoted : None ,
670- } ,
671- tcx. type_of ( anon_const. def_id ) . instantiate_identity ( ) ,
656+ let value = mir:: Const :: identity_unevaluated (
657+ tcx,
658+ anon_const. def_id . to_def_id ( ) ,
672659 )
660+ . instantiate_identity ( )
673661 . normalize ( tcx, self . param_env ) ;
674662 let span = tcx. def_span ( anon_const. def_id ) ;
675663
0 commit comments