Fix emulate intrinsics return type.
This commit is contained in:
parent
c7aadcfa56
commit
99a864be39
@ -110,8 +110,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
||||
| sym::type_id
|
||||
| sym::type_name => {
|
||||
let gid = GlobalId { instance, promoted: None };
|
||||
let ty = instance.ty_env(*self.tcx, self.param_env);
|
||||
let val = self.const_eval(gid, ty)?;
|
||||
let val = self.const_eval(gid, dest.layout.ty)?;
|
||||
self.copy_op(val, dest)?;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user