Closed
Bug 1408622
Opened 7 years ago
Closed 7 years ago
stylo: expected lifetime parameter with rust 1.21
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla58
Tracking | Status | |
---|---|---|
firefox57 | --- | unaffected |
firefox58 | --- | fixed |
People
(Reporter: rillian, Assigned: emilio)
References
Details
Building stylo with rust 1.21.0 started failing recently.
> error[E0106]: missing lifetime specifier
> --> /builds/worker/workspace/build/src/obj-firefox/toolkit/library/x86_64-unknown-linux-gnu/release/build/style-c4949dd4c23a1f5b/out/gecko/bindings.rs:2129:9
> |
> 2129 | -> RawGeckoElementBorrowedOrNull;
> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected lifetime parameter
> |
> = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2
> error: aborting due to previous error
> error: Could not compile `style`.
Reporter | ||
Comment 1•7 years ago
|
||
Looks like maybe an issue with the bindgen output.
Reporter | ||
Comment 2•7 years ago
|
||
Looks like the culprit is bug 1407952. geckolib/glue.rs defines:
> pub unsafe extern "C" fn Servo_SelectorList_Closest<'a>(
> element: RawGeckoElementBorrowed<'a>,
> selectors: RawServoSelectorListBorrowed,
> ) -> RawGeckoElementBorrowedOrNull<'a>
SERVO_BINDING_FUNC() + bindgen turn this into:
> extern "C" {
> pub fn Servo_SelectorList_Closest(arg1: RawGeckoElementBorrowed,
> arg2: RawServoSelectorListBorrowed)
> -> RawGeckoElementBorrowedOrNull;
> }
Dropping the lifetime annotation.
Blocks: 1407952
Assignee | ||
Comment 3•7 years ago
|
||
Yeah, I find our bindings stuff super over-engineered, and this is part of the problem with it :(
For now the easy solution is making that function use `const Element*` instead of `RawGeckoElementBorrowed`, and adjust the rust code too. We should look into removing all the boilerplate and magic of our binding functions IMO.
Pushed by ecoal95@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/de9496ac2ea8
Dumb down the return value of Servo_SelectorList_Closest. r=me
Comment 5•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Updated•7 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•