Cursor inference: The basic idea was like this: Elide 'destroy(x)' calls if only special literals are assigned to 'x' and 'x' is not mutated or passed by 'var T' to something else. Special literals are string literals or arrays / tuples of string literals etc.
However, there is a much more general rule here: Compute which variables can be annotated with .cursor. To see how and when we can do that, think about this question: In dest = src when do we really have to materialize the full copy? - Only if dest or src are mutated afterwards. dest is the potential cursor variable, so that is simple to analyse. And if src is a location derived from a formal parameter, we also know it is not mutated! In other words, we do a compile-time copy-on-write analysis.