Skip to content

Commit

Permalink
Bug 1524822 - Fix warnings with rust 1.34+. r=jrmuizel
Browse files Browse the repository at this point in the history
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
rust-lang/cargo#6180. So also update those comments.

Differential Revision: https://phabricator.services.mozilla.com/D18495

UltraBlame original commit: 5f006a3c652c3a5def8800b9b0e65c4213b86785
  • Loading branch information
marco-c committed Oct 4, 2019
1 parent 5640139 commit 298a2c3
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 4 deletions.
18 changes: 18 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions gfx/wr/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions gfx/wr/webrender/src/device/gl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ atomic
:
{
AtomicUsize
ATOMIC_USIZE_INIT
Ordering
}
;
Expand Down Expand Up @@ -303,7 +302,13 @@ GPU_BYTES_ALLOCATED
:
AtomicUsize
=
ATOMIC_USIZE_INIT
AtomicUsize
:
:
new
(
0
)
;
pub
fn
Expand Down
9 changes: 7 additions & 2 deletions gfx/wr/webrender/src/picture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ atomic
:
{
AtomicUsize
ATOMIC_USIZE_INIT
Ordering
}
;
Expand Down Expand Up @@ -567,7 +566,13 @@ NEXT_TILE_ID
:
AtomicUsize
=
ATOMIC_USIZE_INIT
AtomicUsize
:
:
new
(
0
)
;
fn
clamp
Expand Down

0 comments on commit 298a2c3

Please sign in to comment.