mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
Rollup merge of #114082 - ericmarkmartin:smir-nullary-op, r=spastorino
add stable NullaryOp r? `@spastorino`
This commit is contained in:
commit
17e4f80257
@ -156,7 +156,9 @@ impl<'tcx> Stable<'tcx> for mir::Rvalue<'tcx> {
|
||||
ops.0.stable(tables),
|
||||
ops.1.stable(tables),
|
||||
),
|
||||
NullaryOp(_, _) => todo!(),
|
||||
NullaryOp(null_op, ty) => {
|
||||
stable_mir::mir::Rvalue::NullaryOp(null_op.stable(tables), tables.intern_ty(*ty))
|
||||
}
|
||||
UnaryOp(un_op, op) => {
|
||||
stable_mir::mir::Rvalue::UnaryOp(un_op.stable(tables), op.stable(tables))
|
||||
}
|
||||
|
@ -218,6 +218,9 @@ pub enum Rvalue {
|
||||
/// nature of this operation?
|
||||
ThreadLocalRef(stable_mir::CrateItem),
|
||||
|
||||
/// Computes a value as described by the operation.
|
||||
NullaryOp(NullOp, Ty),
|
||||
|
||||
/// Exactly like `BinaryOp`, but less operands.
|
||||
///
|
||||
/// Also does two's-complement arithmetic. Negation requires a signed integer or a float;
|
||||
|
Loading…
Reference in New Issue
Block a user