Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zvariant fails to compile on latest nightly: size cannot be statically determined #89119

Closed
m-ou-se opened this issue Sep 20, 2021 · 5 comments
Closed
Labels
C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone

Comments

@m-ou-se
Copy link
Member

m-ou-se commented Sep 20, 2021

[package]
name = "scratchpad"
version = "0.1.0"

[dependencies]
zvariant = "2.8.0"
fn main() {}

Results in:

error[E0161]: cannot move a value of type owned_value::OwnedValue: the size of owned_value::OwnedValue cannot be statically determined
   --> /home/mara/.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/mara/.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/mara/.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/mara/.cargo/registry/src/github.com-1ecc6299db9ec823/zvariant-2.8.0/src/owned_value.rs:214:12
    |
214 |         Ok(Value::deserialize(deserializer)?.into())
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

But worked fine recently.

Version it worked on

rustc 1.57.0-nightly (9dd4ce80f 2021-09-17)
binary: rustc
commit-hash: 9dd4ce80fb01d1ff5cb5002f08b7b3847b59e664
commit-date: 2021-09-17
host: x86_64-unknown-linux-gnu
release: 1.57.0-nightly
LLVM version: 13.0.0

Version with regression

rustc 1.57.0-nightly (aa8f2d432 2021-09-18)
binary: rustc
commit-hash: aa8f2d432b23575929a48f87b8746f41ba723318
commit-date: 2021-09-18
host: x86_64-unknown-linux-gnu
release: 1.57.0-nightly
LLVM version: 13.0.0
@m-ou-se m-ou-se added regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. C-bug Category: This is a bug. labels Sep 20, 2021
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Sep 20, 2021
@m-ou-se m-ou-se added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 20, 2021
@Mark-Simulacrum Mark-Simulacrum added this to the 1.57.0 milestone Sep 20, 2021
@hkmatsumoto
Copy link
Member

Assigning priority as discussed in the Zulip thread of the Prioritization Working Group.

@rustbot label -I-prioritize +P-high

@rustbot

This comment has been minimized.

@m-ou-se m-ou-se added P-high High priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Sep 20, 2021
@Aaron1011
Copy link
Member

I opened #89125 with a fix.

@m-ou-se m-ou-se closed this as completed Sep 27, 2021
@pnkfelix pnkfelix added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Sep 30, 2021
@pnkfelix pnkfelix reopened this Sep 30, 2021
Manishearth added a commit to Manishearth/rust that referenced this issue Oct 1, 2021
Add regression test for issues rust-lang#88969 and rust-lang#89119

This adds a regression test to complete rust-lang#89125, and thus for issues rust-lang#88969 and rust-lang#89119, which needed a test.

Used with multiple crates, [this](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=f665e7e882059157e0f86cfb09c47187) minimized from `zvariant-2.8.0` reproduces the error on `nightly-2021-09-19`.

The test in this PR fails on master if the commit 6dbb9d4 from rust-lang#89125 is reverted, and passes otherwise since it's now fixed.

r? `@Aaron1011`
bors added a commit to rust-lang-ci/rust that referenced this issue Oct 1, 2021
…arth

Rollup of 7 pull requests

Successful merges:

 - rust-lang#88838 (Do not suggest importing inaccessible items)
 - rust-lang#89251 (Detect when negative literal indices are used and suggest appropriate code)
 - rust-lang#89321 (Rebase resume argument projections during state transform)
 - rust-lang#89327 (Pick one possible lifetime in case there are multiple choices)
 - rust-lang#89344 (Cleanup lower_generics_mut and make span be the bound itself)
 - rust-lang#89397 (Update `llvm` submodule to fix function name mangling on x86 Windows)
 - rust-lang#89412 (Add regression test for issues rust-lang#88969 and rust-lang#89119 )

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@Kobzol
Copy link
Contributor

Kobzol commented Oct 4, 2021

@pnkfelix This now has a test (#89412), so the issue can be probably closed.

@m-ou-se m-ou-se closed this as completed Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

7 participants