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 3, 2019
1 parent e795b3c commit 0f862e9
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 @@ -275,7 +275,6 @@ atomic
:
{
AtomicUsize
ATOMIC_USIZE_INIT
Ordering
}
;
Expand Down Expand Up @@ -458,7 +457,13 @@ GPU_BYTES_ALLOCATED
:
AtomicUsize
=
ATOMIC_USIZE_INIT
AtomicUsize
:
:
new
(
0
)
;
/
/
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 @@ -373,7 +373,6 @@ atomic
:
{
AtomicUsize
ATOMIC_USIZE_INIT
Ordering
}
;
Expand Down Expand Up @@ -958,7 +957,13 @@ NEXT_TILE_ID
:
AtomicUsize
=
ATOMIC_USIZE_INIT
AtomicUsize
:
:
new
(
0
)
;
fn
clamp
Expand Down

0 comments on commit 0f862e9

Please sign in to comment.