Closed Bug 1713212 Opened 4 years ago Closed 4 years ago

Make mozilla::Unused unused

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: sfink, Assigned: sfink)

References

(Blocks 1 open bug)

Details

Attachments

(7 files)

Before [[nodiscard]], you needed to do mozilla::Unused << expr in order to properly mark an expression as unused. Now, we can just cast to (void).

This bug is for removing the deprecated mozilla::Unused and preventing it from being added.

Assignee: nobody → sphink
Status: NEW → ASSIGNED
Assignee: nobody → sphink
Status: NEW → ASSIGNED

Whee, I spread out the reviews as a way to make sure people know.

See the thread https://groups.google.com/g/mozilla.dev.platform/c/0ySnEmxh12Y for what's going on here.

Thanks, cpeterson!

Nice! There are still 1000+ uses of Unused << in other directories, but your lint will keep that number from growing. Perhaps someday Unused itself can be removed (bug 1628542).

Blocks: 1628542
Severity: -- → N/A
Pushed by sfink@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f8a2d8249563 Convert uses of mozilla::Unused to void casts in gc/ r=jonco https://hg.mozilla.org/integration/autoland/rev/035615e942f1 Convert uses of mozilla::Unused to void casts in vm/ r=tcampbell https://hg.mozilla.org/integration/autoland/rev/0431e2e3f8f2 Convert uses of mozilla::Unused to void casts in jit/ r=iain https://hg.mozilla.org/integration/autoland/rev/0f7c74b50763 Convert uses of mozilla::Unused to void casts in wasm/ r=rhunt https://hg.mozilla.org/integration/autoland/rev/8137e1710fb5 Convert uses of mozilla::Unused to void casts in rest of JS code r=jandem https://hg.mozilla.org/integration/autoland/rev/eb812224c514 Add a check to prevent mozilla/Unused.h from being included r=mgaudet
Pushed by sfink@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/394f76022d39 followup - switch to DebugOnly<> to follow review comment
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: