(
self,
operands: impl IntoIterator<Item = impl Into<Operand<'heap>>>,
)
| 91 | /// Creates a tuple aggregate r-value. |
| 92 | #[must_use] |
| 93 | pub fn tuple( |
| 94 | self, |
| 95 | operands: impl IntoIterator<Item = impl Into<Operand<'heap>>>, |
| 96 | ) -> RValue<'heap> { |
| 97 | let mut ops = heap::Vec::new_in(self.interner.heap); |
| 98 | ops.extend(operands.into_iter().map(Into::into)); |
| 99 | |
| 100 | RValue::Aggregate(Aggregate { |
| 101 | kind: AggregateKind::Tuple, |
| 102 | operands: IdVec::from_raw(ops), |
| 103 | }) |
| 104 | } |
| 105 | |
| 106 | /// Creates a list aggregate r-value. |
| 107 | #[must_use] |