dbus2 / zbus-old

Rust D-Bus crate.
https://gitlab.freedesktop.org/dbus/zbus
Other
49 stars 13 forks source link

cannot move a value of type owned_value::OwnedValue: the size of owned_value::OwnedValue cannot be statically determine #214

Closed zeenix closed 1 year ago

zeenix commented 2 years ago

In GitLab by @aplanas on Sep 20, 2021, 09:44

In rust nightly (rustc 1.57.0-nightly (5ecc8ad84 2021-09-19)) I can produce this error for zvariant 2.8.0

error[E0161]: cannot move a value of type owned_value::OwnedValue: the size of owned_value::OwnedValue cannot be statically determined
   --> /home/aplanas/.cargo/registry/src/github.com-1ecc6299db9ec823/zvariant-2.8.0/src/value.rs:174:21
    |
174 |                 let o = OwnedValue::from(&**v);
    |                     ^

error[E0161]: cannot move a value of type owned_value::OwnedValue: the size of owned_value::OwnedValue cannot be statically determined
   --> /home/aplanas/.cargo/registry/src/github.com-1ecc6299db9ec823/zvariant-2.8.0/src/value.rs:175:39
    |
175 |                 Value::Value(Box::new(o.into_inner()))
    |                                       ^

error[E0161]: cannot move a value of type owned_value::OwnedValue: the size of owned_value::OwnedValue cannot be statically determined
   --> /home/aplanas/.cargo/registry/src/github.com-1ecc6299db9ec823/zvariant-2.8.0/src/owned_value.rs:197:9
    |
197 |         v.into_inner()
    |         ^

error[E0161]: cannot move a value of type owned_value::OwnedValue: the size of owned_value::OwnedValue cannot be statically determined
   --> /home/aplanas/.cargo/registry/src/github.com-1ecc6299db9ec823/zvariant-2.8.0/src/owned_value.rs:214:12
    |
214 |         Ok(Value::deserialize(deserializer)?.into())
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
zeenix commented 2 years ago

@aplanas Thanks for reporting this! Another user reported the same thing against nightly. It looks like it's a Rust nightly bug as we've not changed anything about this type recently to the best of my knowledge.

zeenix commented 2 years ago

In GitLab by @aplanas on Sep 20, 2021, 13:48

It looks like it's a Rust nightly bug

That can be, indeed. I will close this then!. Thanks!

zeenix commented 2 years ago

@aplanas Thanks. Will you be reporting it to rust repo? If not, please reopen this so I (or someone else) remember to do that.

zeenix commented 2 years ago

In GitLab by @aplanas on Sep 20, 2021, 13:57

Excellent. I am trying to dig into the issue, but so far I am not able to reproduce it from the package itself (i.e only via ncspot that uses notify as a dependency, and uses zbus as a second level dependency)

zeenix commented 2 years ago

In GitLab by @lucab on Sep 20, 2021, 17:32

In case it could be useful, the CI for the zincati crate captured it here: https://github.com/coreos/zincati/pull/647/checks?check_run_id=3653206832

zeenix commented 2 years ago

If anyone wants to help, providing a minimum reproduce will greatly help.

zeenix commented 2 years ago

In GitLab by @m-ou-se on Sep 20, 2021, 18:40

See https://github.com/rust-lang/rust/issues/89119

zeenix commented 2 years ago

@m-ou-se Thanks so much!