This is a supreme yak-shave, but the type tstate::auxiliary::constraint
has a mutable vector (dvec) field called descs
, but it only needs to be mutable during the collect_locals
part of typestate. Ideally collect_locals
would use this type internally, then return a different type that has an immutable vector field. But I'm not sure if there's a good way to turn a dvec into an immutable vector.
Contingent on typestate not getting removed.