mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-06 04:08:40 +00:00
Don't build a ty::Const just to take it apart again
This commit is contained in:
parent
5b6ddd5026
commit
c0e1191807
@ -171,8 +171,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||||||
};
|
};
|
||||||
let val =
|
let val =
|
||||||
self.tcx.const_eval_global_id(self.param_env, gid, Some(self.tcx.span))?;
|
self.tcx.const_eval_global_id(self.param_env, gid, Some(self.tcx.span))?;
|
||||||
let const_ = ty::Const { val: ty::ConstKind::Value(val), ty };
|
let val = self.const_val_to_op(val, ty, None)?;
|
||||||
let val = self.const_to_op(&const_, None)?;
|
|
||||||
self.copy_op(&val, dest)?;
|
self.copy_op(&val, dest)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user