stylo: the size of [gecko_bindings::structs::root::nsStyleCoord] cannot be statically determined with rust 1.18.0-beta.2

RESOLVED FIXED

Status

()

Core
CSS Parsing and Computation
P1
normal
RESOLVED FIXED
12 days ago
4 days ago

People

(Reporter: rillian, Assigned: rillian)

Tracking

(Depends on: 1 bug, Blocks: 3 bugs)

Firefox Tracking Flags

(Not tracked)

Details

rustc 1.18.0-beta.2 has trouble compiling stylo. I've filed rust-lang/rust#42042 for the internal compiler error, but also filing an issue here so we can track it.

> error[E0161]: cannot move a value of type [gecko_bindings::structs::root::nsStyleCoord]: the size of [gecko_bindings::structs::root::nsStyleCoord] cannot be statically determined
>     --> /home/giles/firefox/obj-x86_64-pc-linux-gnu/toolkit/library/x86_64-unknown-linux-gnu/debug/build/style-9cea8a5ed5bf5b1e/out/gecko_properties.rs:8177:29
>      |
> 8177 |                             shape.mCoordinates[2 * i].leaky_set_null();
>      |                             ^^^^^^^^^^^^^^^^^^
> 
> error[E0161]: cannot move a value of type [gecko_bindings::structs::root::nsStyleCoord]: the size of [gecko_bindings::structs::root::nsStyleCoord] cannot be statically determined
>     --> /home/giles/firefox/obj-x86_64-pc-linux-gnu/toolkit/library/x86_64-unknown-linux-gnu/debug/build/style-9cea8a5ed5bf5b1e/out/gecko_properties.rs:8178:29
>      |
> 8178 |                             shape.mCoordinates[2 * i + 1].leaky_set_null();
>      |                             ^^^^^^^^^^^^^^^^^^
> 
> error: internal compiler error: broken MIR (Terminator { source_info: SourceInfo { span: /home/giles/firefox/obj-x86_64-pc-linux-gnu/toolkit/library/x86_64-unknown-linux-gnu/debug/build/style-9cea8a5ed5bf5b1e/out/gecko_properties.rs:8177:29: 8177:54, scope: scope16 }, kind: _179 = const std::ops::Index::index(_180, _183) -> [return: bb87, unwind: bb21] }): bad arg #0 (&[gecko_bindings::structs::root::nsStyleCoord] <- [gecko_bindings::structs::root::nsStyleCoord]): Sorts(ExpectedFound { expected: &[gecko_bindings::structs::root::nsStyleCoord], found: [gecko_bindings::structs::root::nsStyleCoord] })
https://github.com/rust-lang/rust/issues/42042#issuecomment-301996853 suggests that the fix may be https://github.com/rust-lang/rust/pull/41651, which is now marked "accepted" for backport to beta.
Assignee: nobody → giles
Priority: -- → P1
The https://github.com/rust-lang/rust/pull/41651 backport has been merged to the Rust 1.18 beta branch. We're now waiting for  https://github.com/rust-lang/rust/pull/42161 to release 1.18.0-beta.3.

Rust 1.18 will fix bug 1302078 to improve win64 crash reporting of Rust panics.
Blocks: 1345321, 1302078
Rust 1.18.0-beta.3 is out, and builds ok for me locally. I pushed a rust bump to try to confirm on all platforms. https://treeherder.mozilla.org/#/jobs?repo=try&revision=db2dda574de48fd4c176b9caa7e08e2135f3cf06
Looks like this issue is resolved.
Status: NEW → RESOLVED
Last Resolved: 4 days ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.