pub trait VecCowNoop {
// Provided method
fn cow(&mut self) { ... }
}Expand description
A no-op cow() for an OWNED Vec — a scalarized (non-shared) sequence never aliases, so the
copy-on-write barrier the codegen emits before an in-place mutation is unnecessary. This keeps the
codegen’s cow() emission TOTAL: whether a Seq lowered to a shared LogosSeq (real copy-on-write)
or a scalarized owned Vec<T> (a proven-non-aliased buffer — e.g. a Seq of Real → Vec<f64>),
<seq>.cow() always type-checks. Without this, a scalarized float/int vector whose variable_types
entry still read LogosSeq made the emitter write vec.cow() on a Vec, which has no such method
(error[E0599]: no method named cow``), breaking every float-sequence program on the compiled tiers.
LogosSeq’s inherent cow() shadows this trait method, so shared handles keep the real barrier.