Skip to content

Commit 99a864b

Browse files
committed
Fix emulate intrinsics return type.
1 parent c7aadcf commit 99a864b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustc_mir/interpret/intrinsics.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
110110
| sym::type_id
111111
| sym::type_name => {
112112
let gid = GlobalId { instance, promoted: None };
113-
let ty = instance.ty_env(*self.tcx, self.param_env);
114-
let val = self.const_eval(gid, ty)?;
113+
let val = self.const_eval(gid, dest.layout.ty)?;
115114
self.copy_op(val, dest)?;
116115
}
117116

0 commit comments

Comments
 (0)