Closed
Bug 1789509
Opened 3 years ago
Closed 3 years ago
[rust 1.64] error: unused return value of `Box::<T>::from_raw` that must be used
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
106 Branch
Tracking | Status | |
---|---|---|
firefox106 | --- | fixed |
People
(Reporter: glandium, Assigned: glandium)
References
Details
Attachments
(1 file)
[task 2022-09-06T20:53:49.449Z] 20:53:49 INFO - |
[task 2022-09-06T20:53:49.449Z] 20:53:49 INFO - 16 | #[xpcom(implement(nsIRunnable, nsINamed, nsIRunnablePriority), atomic)]
[task 2022-09-06T20:53:49.449Z] 20:53:49 INFO - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2022-09-06T20:53:49.450Z] 20:53:49 INFO - |
[task 2022-09-06T20:53:49.450Z] 20:53:49 INFO - = note: call `drop(from_raw(ptr))` if you intend to drop the `Box`
[task 2022-09-06T20:53:49.450Z] 20:53:49 INFO - = note: this error originates in the attribute macro `xpcom` (in Nightly builds, run with -Z macro-backtrace for more info)
[task 2022-09-06T20:53:49.450Z] 20:53:49 INFO - error: unused return value of `Box::<T>::from_raw` that must be used
[task 2022-09-06T20:53:49.450Z] 20:53:49 INFO - --> xpcom/rust/moz_task/src/event_loop.rs:14:1
[task 2022-09-06T20:53:49.450Z] 20:53:49 INFO - |
[task 2022-09-06T20:53:49.450Z] 20:53:49 INFO - 14 | #[xpcom(implement(nsINestedEventLoopCondition), nonatomic)]
[task 2022-09-06T20:53:49.451Z] 20:53:49 INFO - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2022-09-06T20:53:49.451Z] 20:53:49 INFO - |
[task 2022-09-06T20:53:49.451Z] 20:53:49 INFO - = note: call `drop(from_raw(ptr))` if you intend to drop the `Box`
[task 2022-09-06T20:53:49.451Z] 20:53:49 INFO - = note: this error originates in the attribute macro `xpcom` (in Nightly builds, run with -Z macro-backtrace for more info)
[task 2022-09-06T20:53:49.451Z] 20:53:49 INFO - error: could not compile `moz_task` due to 3 previous errors
[task 2022-09-06T20:53:49.451Z] 20:53:49 INFO - Caused by:
[task 2022-09-06T20:53:49.453Z] 20:53:49 INFO - process didn't exit successfully: `CARGO=/builds/worker/fetches/rustc/bin/cargo CARGO_CRATE_NAME=moz_task CARGO_MANIFEST_DIR=/builds/worker/checkouts/gecko/xpcom/rust/moz_task CARGO_PKG_AUTHORS='Myk Melez <myk@mykzilla.org>' CARGO_PKG_DESCRIPTION='Rust wrappers around XPCOM threading functions' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=MPL-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=moz_task CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.1.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/builds/worker/workspace/obj-build/debug/deps:/builds/worker/fetches/rustc/lib:/builds/worker/workspace/obj-build/dist/bin' /builds/worker/fetches/sccache/sccache /builds/worker/fetches/rustc/bin/rustc --crate-name moz_task --edition=2018 xpcom/rust/moz_task/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=2 -C panic=abort -C embed-bitcode=no -C debuginfo=2 -C debug-assertions=on -C metadata=102a64d5b1f8d938 -C extra-filename=-102a64d5b1f8d938 --out-dir /builds/worker/workspace/obj-build/i686-unknown-linux-gnu/debug/deps --target i686-unknown-linux-gnu -C linker=/builds/worker/checkouts/gecko/build/cargo-linker -L dependency=/builds/worker/workspace/obj-build/i686-unknown-linux-gnu/debug/deps -L dependency=/builds/worker/workspace/obj-build/debug/deps --extern async_task=/builds/worker/workspace/obj-build/i686-unknown-linux-gnu/debug/deps/libasync_task-1bbf2fb49888e9ea.rmeta --extern cstr=/builds/worker/workspace/obj-build/debug/deps/libcstr-6b53daf3e3ccc2d0.so --extern futures_task=/builds/worker/workspace/obj-build/i686-unknown-linux-gnu/debug/deps/libfutures_task-3536d8f02d12e4fe.rmeta --extern libc=/builds/worker/workspace/obj-build/i686-unknown-linux-gnu/debug/deps/liblibc-f2f08153de42e93d.rmeta --extern log=/builds/worker/workspace/obj-build/i686-unknown-linux-gnu/debug/deps/liblog-e2531347f80b951e.rmeta --extern nserror=/builds/worker/workspace/obj-build/i686-unknown-linux-gnu/debug/deps/libnserror-99abf60c58bc2125.rmeta --extern nsstring=/builds/worker/workspace/obj-build/i686-unknown-linux-gnu/debug/deps/libnsstring-3f286c63b1ecb300.rmeta --extern thiserror=/builds/worker/workspace/obj-build/i686-unknown-linux-gnu/debug/deps/libthiserror-306fc3c149e69f58.rmeta --extern xpcom=/builds/worker/workspace/obj-build/i686-unknown-linux-gnu/debug/deps/libxpcom-cdeaf94ab6da8bd4.rmeta -C debuginfo=2 -C force-frame-pointers=yes -Dwarnings -Aproc-macro-back-compat -C codegen-units=1` (exit status: 1)
[task 2022-09-06T20:53:49.453Z] 20:53:49 INFO - warning: build failed, waiting for other jobs to finish...
[task 2022-09-06T20:53:49.454Z] 20:53:49 INFO - error: unused return value of `Box::<T>::from_raw` that must be used
[task 2022-09-06T20:53:49.454Z] 20:53:49 INFO - --> toolkit/components/cascade_bloom_filter/src/lib.rs:20:1
[task 2022-09-06T20:53:49.454Z] 20:53:49 INFO - |
[task 2022-09-06T20:53:49.454Z] 20:53:49 INFO - 20 | #[xpcom(implement(nsICascadeFilter), nonatomic)]
[task 2022-09-06T20:53:49.454Z] 20:53:49 INFO - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2022-09-06T20:53:49.454Z] 20:53:49 INFO - |
[task 2022-09-06T20:53:49.454Z] 20:53:49 INFO - = note: `-D unused-must-use` implied by `-D warnings`
[task 2022-09-06T20:53:49.455Z] 20:53:49 INFO - = note: call `drop(from_raw(ptr))` if you intend to drop the `Box`
[task 2022-09-06T20:53:49.455Z] 20:53:49 INFO - = note: this error originates in the attribute macro `xpcom` (in Nightly builds, run with -Z macro-backtrace for more info)
[task 2022-09-06T20:53:49.455Z] 20:53:49 INFO - error: could not compile `cascade_bloom_filter` due to previous error
[task 2022-09-06T20:53:49.455Z] 20:53:49 INFO - Caused by:
[task 2022-09-06T20:53:49.457Z] 20:53:49 INFO - process didn't exit successfully: `CARGO=/builds/worker/fetches/rustc/bin/cargo CARGO_CRATE_NAME=cascade_bloom_filter CARGO_MANIFEST_DIR=/builds/worker/checkouts/gecko/toolkit/components/cascade_bloom_filter CARGO_PKG_AUTHORS='Rob Wu <rob@robwu.nl>' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=cascade_bloom_filter CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.1.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/builds/worker/workspace/obj-build/debug/deps:/builds/worker/fetches/rustc/lib:/builds/worker/workspace/obj-build/dist/bin' /builds/worker/fetches/sccache/sccache /builds/worker/fetches/rustc/bin/rustc --crate-name cascade_bloom_filter toolkit/components/cascade_bloom_filter/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=2 -C panic=abort -C embed-bitcode=no -C debuginfo=2 -C debug-assertions=on -C metadata=8f28c8570f3349c6 -C extra-filename=-8f28c8570f3349c6 --out-dir /builds/worker/workspace/obj-build/i686-unknown-linux-gnu/debug/deps --target i686-unknown-linux-gnu -C linker=/builds/worker/checkouts/gecko/build/cargo-linker -L dependency=/builds/worker/workspace/obj-build/i686-unknown-linux-gnu/debug/deps -L dependency=/builds/worker/workspace/obj-build/debug/deps --extern nserror=/builds/worker/workspace/obj-build/i686-unknown-linux-gnu/debug/deps/libnserror-99abf60c58bc2125.rmeta --extern nsstring=/builds/worker/workspace/obj-build/i686-unknown-linux-gnu/debug/deps/libnsstring-3f286c63b1ecb300.rmeta --extern rust_cascade=/builds/worker/workspace/obj-build/i686-unknown-linux-gnu/debug/deps/librust_cascade-044f91f626bb106d.rmeta --extern thin_vec=/builds/worker/workspace/obj-build/i686-unknown-linux-gnu/debug/deps/libthin_vec-c9643ff30439ad34.rmeta --extern xpcom=/builds/worker/workspace/obj-build/i686-unknown-linux-gnu/debug/deps/libxpcom-cdeaf94ab6da8bd4.rmeta -C debuginfo=2 -C force-frame-pointers=yes -Dwarnings -Aproc-macro-back-compat -C codegen-units=1` (exit status: 1)
[task 2022-09-06T20:53:49.457Z] 20:53:49 INFO - error: unused return value of `Box::<T>::from_raw` that must be used
[task 2022-09-06T20:53:49.457Z] 20:53:49 INFO - --> toolkit/components/processtools/src/lib.rs:46:1
[task 2022-09-06T20:53:49.457Z] 20:53:49 INFO - |
[task 2022-09-06T20:53:49.457Z] 20:53:49 INFO - 46 | #[xpcom(implement(nsIProcessToolsService), atomic)]
[task 2022-09-06T20:53:49.457Z] 20:53:49 INFO - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2022-09-06T20:53:49.457Z] 20:53:49 INFO - |
[task 2022-09-06T20:53:49.458Z] 20:53:49 INFO - = note: `-D unused-must-use` implied by `-D warnings`
[task 2022-09-06T20:53:49.458Z] 20:53:49 INFO - = note: call `drop(from_raw(ptr))` if you intend to drop the `Box`
[task 2022-09-06T20:53:49.458Z] 20:53:49 INFO - = note: this error originates in the attribute macro `xpcom` (in Nightly builds, run with -Z macro-backtrace for more info)
[task 2022-09-06T20:53:49.458Z] 20:53:49 INFO - error: could not compile `processtools` due to previous error
Assignee | ||
Comment 1•3 years ago
|
||
As of rustc 1.64, Box::from_raw is #[must_use].
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/51bcf81e53cc
Use drop(Box::from_raw). r=xpcom-reviewers,nika
Comment 3•3 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 3 years ago
status-firefox106:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•