Closed Bug 1563878 Opened 5 years ago Closed 5 years ago

--enable-warnings-as-errors fails due to -D deprecated with Rust 1.38

Categories

(Core :: Graphics: WebRender, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1564873
Tracking Status
firefox69 --- affected

People

(Reporter: jbeich, Unassigned)

Details

Regressed by https://github.com/rust-lang/rust/pull/60445

$ rustc -vV
rustc 1.38.0-nightly
binary: rustc
commit-hash: 481068a70767
commit-date: 2019-07-05
host: x86_64-unknown-freebsd
release: 1.38.0-nightly
LLVM version: 8.0

$ echo "ac_add_options --enable-warnings-as-errors" >>.mozconfig
$ ./mach build
[...]
error: use of deprecated item 'std::mem::uninitialized': use `mem::MaybeUninit` instead
   --> gfx/wr/webrender/src/prim_store/gradient.rs:665:77
    |
665 |         let mut entries: [GradientDataEntry; GRADIENT_DATA_SIZE] = unsafe { mem::uninitialized() };
    |                                                                             ^^^^^^^^^^^^^^^^^^
    |
    = note: `-D deprecated` implied by `-D warnings`
error: use of deprecated item 'std::mem::uninitialized': use `mem::MaybeUninit` instead
    --> gfx/wr/webrender/src/renderer.rs:1467:32
     |
1467 |             data.push(unsafe { mem::uninitialized() });
     |                                ^^^^^^^^^^^^^^^^^^
error: use of deprecated item 'std::mem::uninitialized': use `mem::MaybeUninit` instead
    --> gfx/wr/webrender/src/renderer.rs:1475:36
     |
1475 |                 data.push(unsafe { mem::uninitialized() });
     |                                    ^^^^^^^^^^^^^^^^^^
error: use of deprecated item 'std::mem::uninitialized': use `mem::MaybeUninit` instead
   --> gfx/wr/webrender/src/platform/unix/font.rs:546:42
    |
546 |         let mut cbox: FT_BBox = unsafe { mem::uninitialized() };
    |                                          ^^^^^^^^^^^^^^^^^^
error: use of deprecated item 'std::mem::uninitialized': use `mem::MaybeUninit` instead
   --> gfx/wr/webrender/src/platform/unix/font.rs:729:37
    |
729 |             let mut cbox: FT_BBox = mem::uninitialized();
    |                                     ^^^^^^^^^^^^^^^^^^
error: aborting due to 5 previous errors
error: Could not compile `webrender`.

Trying to use MaybeUninit on non-nightly rust I get told not to use an unstable library feature. So this will probably have to wait to be fixed.

Priority: -- → P3

Looks like Simon has patches for this. According to https://bugzilla.mozilla.org/show_bug.cgi?id=1563623#c0 1.36 stable has support for MaybeUninit, so maybe you need to bump your stable version?

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE

(In reply to Kartikaya Gupta (email:kats@mozilla.com) (away 17-Jul-2019 to Feb-2020) from comment #2)

Looks like Simon has patches for this. According to
https://bugzilla.mozilla.org/show_bug.cgi?id=1563623#c0 1.36 stable has
support for MaybeUninit, so maybe you need to bump your stable version?

*** This bug has been marked as a duplicate of bug 1564873 ***

I'm on 1.35, I did a mach bootstrap immediately before. So either 1.35 is still above the minimum required or there is a bug somewhere.

(In reply to Timothy Nikkel (:tnikkel) from comment #3)

I'm on 1.35, I did a mach bootstrap immediately before. So either 1.35 is
still above the minimum required or there is a bug somewhere.

Bug 1564873 is dependent on bug 1565193 which is to bump rust requirements from 1.35 to 1.36, so that explains it.

You need to log in before you can comment on or make changes to this bug.