},
Block {
id: BlockId,
- statements: Vec<Statement>,
+ statements: Box<[Statement]>,
tail: Option<ExprId>,
label: Option<LabelId>,
},
},
Call {
callee: ExprId,
- args: Vec<ExprId>,
+ args: Box<[ExprId]>,
},
MethodCall {
receiver: ExprId,
method_name: Name,
- args: Vec<ExprId>,
+ args: Box<[ExprId]>,
generic_args: Option<Box<GenericArgs>>,
},
Match {
expr: ExprId,
- arms: Vec<MatchArm>,
+ arms: Box<[MatchArm]>,
},
Continue {
label: Option<Name>,
},
RecordLit {
path: Option<Box<Path>>,
- fields: Vec<RecordLitField>,
+ fields: Box<[RecordLitField]>,
spread: Option<ExprId>,
},
Field {
index: ExprId,
},
Lambda {
- args: Vec<PatId>,
- arg_types: Vec<Option<Interned<TypeRef>>>,
+ args: Box<[PatId]>,
+ arg_types: Box<[Option<Interned<TypeRef>>]>,
ret_type: Option<Interned<TypeRef>>,
body: ExprId,
},
Tuple {
- exprs: Vec<ExprId>,
+ exprs: Box<[ExprId]>,
},
Unsafe {
body: ExprId,
}
}
Expr::Block { statements, tail, .. } => {
- for stmt in statements {
+ for stmt in statements.iter() {
match stmt {
Statement::Let { initializer, .. } => {
if let Some(expr) = initializer {
}
Expr::Call { callee, args } => {
f(*callee);
- for arg in args {
+ for arg in args.iter() {
f(*arg);
}
}
Expr::MethodCall { receiver, args, .. } => {
f(*receiver);
- for arg in args {
+ for arg in args.iter() {
f(*arg);
}
}
Expr::Match { expr, arms } => {
f(*expr);
- for arm in arms {
+ for arm in arms.iter() {
f(arm.expr);
}
}
}
}
Expr::RecordLit { fields, spread, .. } => {
- for field in fields {
+ for field in fields.iter() {
f(field.expr);
}
if let Some(expr) = spread {
f(*expr);
}
Expr::Tuple { exprs } => {
- for expr in exprs {
+ for expr in exprs.iter() {
f(*expr);
}
}