Create an [`Iterator`] for [`LocalId`] values that are guaranteed to be fresh within the scope of the given [`MirRelationExpr`].
(expr: &MirRelationExpr)
| 281 | // Create an [`Iterator`] for [`LocalId`] values that are guaranteed to be |
| 282 | // fresh within the scope of the given [`MirRelationExpr`]. |
| 283 | fn id_gen(expr: &MirRelationExpr) -> impl Iterator<Item = LocalId> + use<> { |
| 284 | let mut max_id = 0_u64; |
| 285 | |
| 286 | expr.visit_pre(|expr| { |
| 287 | match expr { |
| 288 | MirRelationExpr::Let { id, .. } => max_id = std::cmp::max(max_id, id.into()), |
| 289 | _ => (), |
| 290 | }; |
| 291 | }); |
| 292 | |
| 293 | (max_id + 1..).map(LocalId::new) |
| 294 | } |
| 295 | |
| 296 | impl ScalarOps for MirScalarExpr { |
| 297 | fn match_col_ref(&self) -> Option<usize> { |
no test coverage detected