I speak only of myself since I do not wish to convince, I have no right to drag others into my river, I oblige no one to follow me and everybody practices his art in his own way.
class Point(var x, var y)
async fn main() {
p = Point(22, 44)
test(p).x += 1
print(p).await
}
async fn test(p) {
print("Hi").await
p
}
you get a panic right now:
thread 'main' panicked at 'cannot force local variable origin to be synthesized', components/dada-validate/src/validate/validator.rs:771:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
In general, we need to improve this to desugar to
tmp = test(p).lease
tmp.x = tmp.x + 1
or something like that.
I bellieve that form should also work for e.g. foo.x += 1 (where you would get tmp = foo.lease)
If you run
you get a panic right now:
In general, we need to improve this to desugar to
or something like that.
I bellieve that form should also work for e.g.
foo.x += 1
(where you would gettmp = foo.lease
)