Apologies for asking you to look into a quite complex problem, but I'm not sure whether it's me or Rust that's at fault here, or how to make a minimal example.
I spent some days writing a server module for my dbus bindings a while ago, and went to great extent to make it possible to make the callbacks from dbus transform into calling closures that borrow their environment. And it works...in 1.4. Then I upgraded my compiler, and now I get lifetime errors.
The easiest way to test it is to clone dbus-rs and run "cargo test". The test failing is called prop_lifetime_simple and it fails with
count does not live long enough, which does not make sense to me. (There is another more complex test case too, that also fails, for the same reason.)
Again, with 1.4 it works just fine. @bluss suggested it might have to do something with variance or Arc having a soundness bug fixed, but I don't know what to do about it or how to fix it (if possible) so that borrowing closures work as expected again. Or if it's a Rust compiler bug.
Thanks in advance.