atomic rmw intrinsics: RHS must be an integer
This commit is contained in:
parent
0dcc21b124
commit
69c7652a01
1 changed files with 2 additions and 1 deletions
|
|
@ -264,8 +264,9 @@ trait EvalContextPrivExt<'tcx>: MiriInterpCxExt<'tcx> {
|
|||
let place = this.deref_pointer(place)?;
|
||||
let rhs = this.read_immediate(rhs)?;
|
||||
|
||||
// The LHS can be a pointer, the RHS must be an integer.
|
||||
if !(place.layout.ty.is_integral() || place.layout.ty.is_raw_ptr())
|
||||
|| !(rhs.layout.ty.is_integral() || rhs.layout.ty.is_raw_ptr())
|
||||
|| !rhs.layout.ty.is_integral()
|
||||
{
|
||||
span_bug!(
|
||||
this.cur_span(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue