pub fn expr_skip_clone(expr: &ResolvedExpr, ectx: &EmitCtx) -> boolExpand description
Should .clone() be skipped for this expression?
True for: Copy types, last-use locals, globals/namespaces.
False for: rc_wrapped, borrowed_params (need special clone paths).
For ResolvedExpr::Ident: in Rust codegen, Ident is used for both
globals AND locals (resolver still leaves bare globals as Ident).
Check ectx to distinguish:
- If name is in local_types → local/param, apply rc_wrapped/borrowed checks
- If name is NOT in local_types → global/namespace, skip clone