File tree 1 file changed +4
-0
lines changed
compiler/rustc_const_eval/src/interpret
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> {
71
71
}
72
72
73
73
#[ inline]
74
+ #[ track_caller]
74
75
pub fn to_scalar_or_uninit ( self ) -> ScalarMaybeUninit < Tag > {
75
76
match self {
76
77
Immediate :: Scalar ( val) => val,
@@ -79,11 +80,13 @@ impl<'tcx, Tag: Provenance> Immediate<Tag> {
79
80
}
80
81
81
82
#[ inline]
83
+ #[ track_caller]
82
84
pub fn to_scalar ( self ) -> InterpResult < ' tcx , Scalar < Tag > > {
83
85
self . to_scalar_or_uninit ( ) . check_init ( )
84
86
}
85
87
86
88
#[ inline]
89
+ #[ track_caller]
87
90
pub fn to_scalar_or_uninit_pair ( self ) -> ( ScalarMaybeUninit < Tag > , ScalarMaybeUninit < Tag > ) {
88
91
match self {
89
92
Immediate :: ScalarPair ( val1, val2) => ( val1, val2) ,
@@ -92,6 +95,7 @@ impl<'tcx, Tag: Provenance> Immediate<Tag> {
92
95
}
93
96
94
97
#[ inline]
98
+ #[ track_caller]
95
99
pub fn to_scalar_pair ( self ) -> InterpResult < ' tcx , ( Scalar < Tag > , Scalar < Tag > ) > {
96
100
let ( val1, val2) = self . to_scalar_or_uninit_pair ( ) ;
97
101
Ok ( ( val1. check_init ( ) ?, val2. check_init ( ) ?) )
You can’t perform that action at this time.
0 commit comments