@@ -645,34 +645,22 @@ impl<'tcx> Cx<'tcx> {
645
645
out_expr : out_expr. map ( |expr| self . mirror_expr ( expr) ) ,
646
646
} ,
647
647
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 ( ) ,
658
651
)
652
+ . instantiate_identity ( )
659
653
. normalize ( tcx, self . param_env ) ;
660
654
let span = tcx. def_span ( anon_const. def_id ) ;
661
655
662
656
InlineAsmOperand :: Const { value, span }
663
657
}
664
658
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 ( ) ,
675
662
)
663
+ . instantiate_identity ( )
676
664
. normalize ( tcx, self . param_env ) ;
677
665
let span = tcx. def_span ( anon_const. def_id ) ;
678
666
0 commit comments