New warnings in webrender with rust 1.34 lead to build failure with --enable-warnings-as-errors
Categories
(Core :: Graphics: WebRender, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: glandium, Assigned: emilio)
References
Details
Attachments
(1 file)
We enable warnings as errors on automation.
01:11:01 INFO - error: use of deprecated item 'std::sync::atomic::ATOMIC_USIZE_INIT': the new
function is now preferred
01:11:01 INFO - --> gfx\wr\webrender\src\device\gl.rs:30:38
01:11:01 INFO - |
01:11:01 INFO - 30 | use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering};
01:11:01 INFO - | ^^^^^^^^^^^^^^^^^
01:11:01 INFO - |
01:11:01 INFO - = note: -D deprecated
implied by -D warnings
01:11:01 INFO - error: use of deprecated item 'std::sync::atomic::ATOMIC_USIZE_INIT': the new
function is now preferred
01:11:01 INFO - --> gfx\wr\webrender\src\device\gl.rs:47:43
01:11:01 INFO - |
01:11:01 INFO - 47 | static GPU_BYTES_ALLOCATED: AtomicUsize = ATOMIC_USIZE_INIT;
01:11:01 INFO - | ^^^^^^^^^^^^^^^^^
01:11:01 INFO - error: use of deprecated item 'std::sync::atomic::ATOMIC_USIZE_INIT': the new
function is now preferred
01:11:01 INFO - --> gfx\wr\webrender\src\picture.rs:37:38
01:11:01 INFO - |
01:11:01 INFO - 37 | use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering};
01:11:01 INFO - | ^^^^^^^^^^^^^^^^^
01:11:01 INFO - error: use of deprecated item 'std::sync::atomic::ATOMIC_USIZE_INIT': the new
function is now preferred
01:11:01 INFO - --> gfx\wr\webrender\src\picture.rs:119:36
01:11:01 INFO - |
01:11:01 INFO - 119 | static NEXT_TILE_ID: AtomicUsize = ATOMIC_USIZE_INIT;
01:11:01 INFO - | ^^^^^^^^^^^^^^^^^
01:11:01 INFO - error: aborting due to 4 previous errors
01:11:01 ERROR - error: Could not compile webrender
.
Assignee | ||
Comment 1•5 years ago
|
||
I have a patch fixing these locally. Will push it to try to see if it breaks any builds and submit it otherwise.
Assignee | ||
Comment 2•5 years ago
|
||
There's some new limited const fn support in stable, and this is the recommended
way to initialize atomics now.
If this for some reason doesn't compile in all platforms / versions we support
I'll just sprinkle some #[allow(deprecated)] instead.
Also, cargo changes the output of Cargo.lock, see
https://github.com/rust-lang/cargo/issues/6180. So also update those comments.
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5f006a3c652c Fix warnings with rust 1.34+. r=jrmuizel
Comment 4•5 years ago
|
||
bugherder |
Description
•