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 @@ fn stable(&self, tables: &mut Tables<'tcx>) -> Self::T {
|
|||||||
ops.0.stable(tables),
|
ops.0.stable(tables),
|
||||||
ops.1.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) => {
|
UnaryOp(un_op, op) => {
|
||||||
stable_mir::mir::Rvalue::UnaryOp(un_op.stable(tables), op.stable(tables))
|
stable_mir::mir::Rvalue::UnaryOp(un_op.stable(tables), op.stable(tables))
|
||||||
}
|
}
|
||||||
|
@ -218,6 +218,9 @@ pub enum Rvalue {
|
|||||||
/// nature of this operation?
|
/// nature of this operation?
|
||||||
ThreadLocalRef(stable_mir::CrateItem),
|
ThreadLocalRef(stable_mir::CrateItem),
|
||||||
|
|
||||||
|
/// Computes a value as described by the operation.
|
||||||
|
NullaryOp(NullOp, Ty),
|
||||||
|
|
||||||
/// Exactly like `BinaryOp`, but less operands.
|
/// Exactly like `BinaryOp`, but less operands.
|
||||||
///
|
///
|
||||||
/// Also does two's-complement arithmetic. Negation requires a signed integer or a float;
|
/// Also does two's-complement arithmetic. Negation requires a signed integer or a float;
|
||||||
|
Loading…
Reference in New Issue
Block a user