@@ -138,7 +138,7 @@ pub enum LocalValue<Tag = (), Id = AllocId> {
138
138
impl < ' tcx , Tag : Copy + ' static > LocalState < ' tcx , Tag > {
139
139
pub fn access ( & self ) -> InterpResult < ' tcx , Operand < Tag > > {
140
140
match self . value {
141
- LocalValue :: Dead => throw_unsup ! ( DeadLocal ) ,
141
+ LocalValue :: Dead => throw_ub ! ( DeadLocal ) ,
142
142
LocalValue :: Uninitialized => {
143
143
bug ! ( "The type checker should prevent reading from a never-written local" )
144
144
}
@@ -152,7 +152,7 @@ impl<'tcx, Tag: Copy + 'static> LocalState<'tcx, Tag> {
152
152
& mut self ,
153
153
) -> InterpResult < ' tcx , Result < & mut LocalValue < Tag > , MemPlace < Tag > > > {
154
154
match self . value {
155
- LocalValue :: Dead => throw_unsup ! ( DeadLocal ) ,
155
+ LocalValue :: Dead => throw_ub ! ( DeadLocal ) ,
156
156
LocalValue :: Live ( Operand :: Indirect ( mplace) ) => Ok ( Err ( mplace) ) ,
157
157
ref mut local @ LocalValue :: Live ( Operand :: Immediate ( _) )
158
158
| ref mut local @ LocalValue :: Uninitialized => Ok ( Ok ( local) ) ,
@@ -326,7 +326,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
326
326
if self . tcx . is_mir_available ( did) {
327
327
Ok ( self . tcx . optimized_mir ( did) . unwrap_read_only ( ) )
328
328
} else {
329
- throw_unsup ! ( NoMirFor ( self . tcx . def_path_str ( def_id) ) )
329
+ throw_unsup ! ( NoMirFor ( def_id) )
330
330
}
331
331
}
332
332
_ => Ok ( self . tcx . instance_mir ( instance) ) ,
0 commit comments