File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
compiler/rustc_const_eval/src/interpret Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ impl<'tcx, Tag: Provenance> Immediate<Tag> {
7171 }
7272
7373 #[ inline]
74+ #[ track_caller]
7475 pub fn to_scalar_or_uninit ( self ) -> ScalarMaybeUninit < Tag > {
7576 match self {
7677 Immediate :: Scalar ( val) => val,
@@ -79,11 +80,13 @@ impl<'tcx, Tag: Provenance> Immediate<Tag> {
7980 }
8081
8182 #[ inline]
83+ #[ track_caller]
8284 pub fn to_scalar ( self ) -> InterpResult < ' tcx , Scalar < Tag > > {
8385 self . to_scalar_or_uninit ( ) . check_init ( )
8486 }
8587
8688 #[ inline]
89+ #[ track_caller]
8790 pub fn to_scalar_or_uninit_pair ( self ) -> ( ScalarMaybeUninit < Tag > , ScalarMaybeUninit < Tag > ) {
8891 match self {
8992 Immediate :: ScalarPair ( val1, val2) => ( val1, val2) ,
@@ -92,6 +95,7 @@ impl<'tcx, Tag: Provenance> Immediate<Tag> {
9295 }
9396
9497 #[ inline]
98+ #[ track_caller]
9599 pub fn to_scalar_pair ( self ) -> InterpResult < ' tcx , ( Scalar < Tag > , Scalar < Tag > ) > {
96100 let ( val1, val2) = self . to_scalar_or_uninit_pair ( ) ;
97101 Ok ( ( val1. check_init ( ) ?, val2. check_init ( ) ?) )
You can’t perform that action at this time.
0 commit comments