Closed Bug 1622256 Opened 5 years ago Closed 5 years ago

Fix mozilla-central build errors with rust 1.42

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox76 fixed)

VERIFIED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: kats, Assigned: kats)

References

(Blocks 1 open bug)

Details

Attachments

(7 files)

This is causing CI failures on github because we always run with latest compiler there. https://github.com/servo/webrender/pull/3883#issuecomment-598715901

Type: defect → task
Priority: -- → P2

https://searchfox.org/mozilla-central/rev/278046367dab878316f60f0bd7f740cf73f3c447/testing/mozbase/rust/mozversion/src/lib.rs#264 has the same problem. I can fix that up too. /cc :ato and :jgraham who might see bugs filed for that.

Summary: Remove use of deprecated Error::description() in webrender → Remove use of deprecated Error::description() in webrender, mozversion

I'm running into other warnings-as-errors causing my build to fail. Expanding scope of this bug to fix all the things.

Type: task → defect
Component: Graphics: WebRender → General
Priority: P2 → --
Product: Core → Firefox Build System
Summary: Remove use of deprecated Error::description() in webrender, mozversion → Fix mozilla-central build errors with rust 1.42

An example of warnings with 1.42

   Compiling mozversion v0.2.1 (/root/firefox-gcc-last/testing/mozbase/rust/mozversion)
error: use of deprecated item 'std::error::Error::description': use the Display impl or to_string()
   --> testing/mozbase/rust/mozversion/src/lib.rs:264:44
    |
264 |             Error::SemVerError(ref e) => e.description(),
    |                                            ^^^^^^^^^^^

or

error: unnecessary parentheses around block return value
   --> media/mp4parse-rust/mp4parse_capi/src/lib.rs:981:25
    |
981 |                         (0 .. v.sample_count)
    |                         ^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses

I'll push up what I have so far but my build is still going so I might tack on some extra patches if there are additional failures.

The Display trait is already implemented a few lines up.

This causes compiler warnings which makes the build fail.

Depends on D66764

For people who are hit by this, you can run rustup override set 1.41.0 in the objdir (or source dir if it's the parent of the objdir) to temporarily switch to the previous Rust version for the build. You may need to rerun configure.

Pushed by kgupta@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2ac0f2fe7362 Remove deprecated Error::description implementation. r=jgraham,webdriver-reviewers https://hg.mozilla.org/integration/autoland/rev/cec2e115f4ca Remove unnecessary parentheses around block return value. r=kinetik https://hg.mozilla.org/integration/autoland/rev/73cd6351c700 Remove deprecated Error::description and use Display trait instead. r=jgraham,webdriver-reviewers https://hg.mozilla.org/integration/autoland/rev/0447d570189d Remove usage of deprecated Error::description. r=jgraham,webdriver-reviewers https://hg.mozilla.org/integration/autoland/rev/a0835622f3db Replace use of description() with to_string(). r=kvark,jrmuizel https://hg.mozilla.org/integration/autoland/rev/415064e7f439 Use Display trait instead of Error::description. r=kinetik https://hg.mozilla.org/integration/autoland/rev/52e8e9352773 Remove unnecessary parentheses producing compiler warning. r=kvark
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: