Closed Bug 1524822 Opened 5 years ago Closed 5 years ago

New warnings in webrender with rust 1.34 lead to build failure with --enable-warnings-as-errors

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla67
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.

I have a patch fixing these locally. Will push it to try to see if it breaks any builds and submit it otherwise.

Assignee: nobody → emilio

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
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: