Closed Bug 1570109 Opened 6 years ago Closed 5 years ago

Build is not working with rust error "use of unstable library feature 'maybe_uninit'"

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gregtatum, Unassigned)

Details

My builds are broken with:

0:12.16 error[E0658]: use of unstable library feature 'maybe_uninit'
 0:12.16    --> servo/components/servo_arc/lib.rs:148:19
 0:12.16     |
 0:12.16 148 | impl<T> UniqueArc<mem::MaybeUninit<T>> {
 0:12.16     |                   ^^^^^^^^^^^^^^^^^^^
 0:12.16     |
 0:12.16     = note: for more information, see https://github.com/rust-lang/rust/issues/53491
 0:12.16     = help: add #![feature(maybe_uninit)] to the crate attributes to enable

Emilio mentioned on IRC that it's probably because my build is using the wrong version of the rust compiler.

... bootstrap is not downloading the right rust version, and that configure is not erroring out. I guess they share the version check and that's why, but...

I'm building from macOS, and pulled the latest code after being out of the office for a week.

Bug 1565193 seems to have appropriately required rustc 1.36 and specified it in mach bootstrap, can you provide more details about you set up, in particular what version of rustc your currently building with?

So fortunately and unfortunately I got my builds working. I ran a lot of commands, and so the rustc -V only shows my currently working version of rustc 1.36.0 (a53f9df32 2019-07-03), which is correct. Previously I was definitely using an outdated version, and can confirm that rustc -V showed something before 1.36, I'm just not sure which. I think I was using a nightly from around May, which was about the last time I was working on a Rust side-project.

Here is what I have installed (in the working state now).

➤ rustup show
Default host: x86_64-apple-darwin

installed toolchains
--------------------

stable-x86_64-apple-darwin
nightly-2019-04-25-x86_64-apple-darwin
nightly-2019-07-03-x86_64-apple-darwin
nightly-x86_64-apple-darwin (default)

installed targets for active toolchain
--------------------------------------

wasm32-unknown-unknown
x86_64-apple-darwin

active toolchain
----------------

nightly-x86_64-apple-darwin (default)
rustc 1.36.0-nightly (08bfe1612 2019-05-02)

Hmm, it seems possible you had a nightly that was 1.36 but before MaybeUninit was stabilized on May 20th. I don't think there's anything that would keep a nightly in that range from failing in that fashion.

This started perma-failing on esr68: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=290850418&repo=mozilla-esr68&lineNumber=354

[task 2020-02-27T22:33:22.459Z] error[E0658]: use of unstable library feature 'alloc': this library is unlikely to be stabilized in its current form or name (see issue #27783)
[task 2020-02-27T22:33:22.460Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:35:1
[task 2020-02-27T22:33:22.460Z] |
[task 2020-02-27T22:33:22.460Z] 35 | pub extern crate alloc;
[task 2020-02-27T22:33:22.460Z] | ^^^^^^^^^^^^^^^^^^^^^^^
[task 2020-02-27T22:33:22.460Z]
[task 2020-02-27T22:33:22.460Z] error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
[task 2020-02-27T22:33:22.460Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:49:5
[task 2020-02-27T22:33:22.460Z] |
[task 2020-02-27T22:33:22.460Z] 49 | use core::mem::MaybeUninit;
[task 2020-02-27T22:33:22.460Z] | ^^^^^^^^^^^^^^^^^^^^^^
[task 2020-02-27T22:33:22.460Z]
[task 2020-02-27T22:33:22.460Z] error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
[task 2020-02-27T22:33:22.460Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:294:12
[task 2020-02-27T22:33:22.460Z] |
[task 2020-02-27T22:33:22.460Z] 294 | Inline(MaybeUninit<A>),
[task 2020-02-27T22:33:22.460Z] | ^^^^^^^^^^^^^^
[task 2020-02-27T22:33:22.460Z]
[task 2020-02-27T22:33:22.461Z] error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
[task 2020-02-27T22:33:22.461Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:315:28
[task 2020-02-27T22:33:22.461Z] |
[task 2020-02-27T22:33:22.461Z] 315 | fn from_inline(inline: MaybeUninit<A>) -> SmallVecData<A> {
[task 2020-02-27T22:33:22.461Z] | ^^^^^^^^^^^^^^
[task 2020-02-27T22:33:22.461Z]
[task 2020-02-27T22:33:22.461Z] error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
[task 2020-02-27T22:33:22.461Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:319:36
[task 2020-02-27T22:33:22.461Z] |
[task 2020-02-27T22:33:22.461Z] 319 | unsafe fn into_inline(self) -> MaybeUninit<A> {
[task 2020-02-27T22:33:22.462Z] | ^^^^^^^^^^^^^^
[task 2020-02-27T22:33:22.462Z]
[task 2020-02-27T22:33:22.462Z] error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
[task 2020-02-27T22:33:22.462Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:394:45
[task 2020-02-27T22:33:22.462Z] |
[task 2020-02-27T22:33:22.462Z] 394 | data: SmallVecData::from_inline(MaybeUninit::uninit()),
[task 2020-02-27T22:33:22.462Z] | ^^^^^^^^^^^^^^^^^^^
[task 2020-02-27T22:33:22.462Z]
[task 2020-02-27T22:33:22.462Z] error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
[task 2020-02-27T22:33:22.462Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:434:63
[task 2020-02-27T22:33:22.462Z] |
[task 2020-02-27T22:33:22.463Z] 434 | let mut data = SmallVecData::<A>::from_inline(MaybeUninit::uninit());
[task 2020-02-27T22:33:22.463Z] | ^^^^^^^^^^^^^^^^^^^
[task 2020-02-27T22:33:22.463Z]
[task 2020-02-27T22:33:22.463Z] error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
[task 2020-02-27T22:33:22.463Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:470:45
[task 2020-02-27T22:33:22.463Z] |
[task 2020-02-27T22:33:22.463Z] 470 | data: SmallVecData::from_inline(MaybeUninit::new(buf)),
[task 2020-02-27T22:33:22.463Z] | ^^^^^^^^^^^^^^^^
[task 2020-02-27T22:33:22.463Z]
[task 2020-02-27T22:33:22.463Z] error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
[task 2020-02-27T22:33:22.464Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:489:55
[task 2020-02-27T22:33:22.464Z] |
[task 2020-02-27T22:33:22.464Z] 489 | unsafe { SmallVec::from_buf_and_len_unchecked(MaybeUninit::new(buf), len) }
[task 2020-02-27T22:33:22.464Z] | ^^^^^^^^^^^^^^^^
[task 2020-02-27T22:33:22.464Z]
[task 2020-02-27T22:33:22.464Z] error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
[task 2020-02-27T22:33:22.464Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:508:51
[task 2020-02-27T22:33:22.464Z] |
[task 2020-02-27T22:33:22.464Z] 508 | pub unsafe fn from_buf_and_len_unchecked(buf: MaybeUninit<A>, len: usize) -> SmallVec<A> {
[task 2020-02-27T22:33:22.464Z] | ^^^^^^^^^^^^^^
[task 2020-02-27T22:33:22.464Z]
[task 2020-02-27T22:33:22.465Z] error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
[task 2020-02-27T22:33:22.465Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:670:55
[task 2020-02-27T22:33:22.465Z] |
[task 2020-02-27T22:33:22.465Z] 670 | self.data = SmallVecData::from_inline(MaybeUninit::uninit());
[task 2020-02-27T22:33:22.465Z] | ^^^^^^^^^^^^^^^^^^^
[task 2020-02-27T22:33:22.465Z]
[task 2020-02-27T22:33:22.465Z] error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
[task 2020-02-27T22:33:22.465Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:737:55
[task 2020-02-27T22:33:22.465Z] |
[task 2020-02-27T22:33:22.466Z] 737 | self.data = SmallVecData::from_inline(MaybeUninit::uninit());
[task 2020-02-27T22:33:22.466Z] | ^^^^^^^^^^^^^^^^^^^
[task 2020-02-27T22:33:22.466Z]
[task 2020-02-27T22:33:22.466Z] error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
[task 2020-02-27T22:33:22.466Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:1078:52
[task 2020-02-27T22:33:22.466Z] |
[task 2020-02-27T22:33:22.466Z] 1078 | let mut data: MaybeUninit<A> = MaybeUninit::uninit();
[task 2020-02-27T22:33:22.466Z] | ^^^^^^^^^^^^^^^^^^^
[task 2020-02-27T22:33:22.467Z]
[task 2020-02-27T22:33:22.467Z] error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
[task 2020-02-27T22:33:22.467Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:1078:35
[task 2020-02-27T22:33:22.467Z] |
[task 2020-02-27T22:33:22.467Z] 1078 | let mut data: MaybeUninit<A> = MaybeUninit::uninit();
[task 2020-02-27T22:33:22.467Z] | ^^^^^^^^^^^^^^
[task 2020-02-27T22:33:22.467Z]
[task 2020-02-27T22:33:22.563Z] error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
[task 2020-02-27T22:33:22.563Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:303:42
[task 2020-02-27T22:33:22.563Z] |
[task 2020-02-27T22:33:22.563Z] 303 | SmallVecData::Inline(a) => a.as_ptr() as *const A::Item,
[task 2020-02-27T22:33:22.563Z] | ^^^^^^
[task 2020-02-27T22:33:22.563Z]
[task 2020-02-27T22:33:22.564Z] error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
[task 2020-02-27T22:33:22.564Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:310:42
[task 2020-02-27T22:33:22.564Z] |
[task 2020-02-27T22:33:22.564Z] 310 | SmallVecData::Inline(a) => a.as_mut_ptr() as *mut A::Item,
[task 2020-02-27T22:33:22.564Z] | ^^^^^^^^^^
[task 2020-02-27T22:33:22.564Z]
[task 2020-02-27T22:33:22.584Z] error[E0599]: no function or associated item named uninit found for type core::mem::MaybeUninit<_> in the current scope
[task 2020-02-27T22:33:22.585Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:394:58
[task 2020-02-27T22:33:22.585Z] |
[task 2020-02-27T22:33:22.585Z] 394 | data: SmallVecData::from_inline(MaybeUninit::uninit()),
[task 2020-02-27T22:33:22.585Z] | -------------^^^^^^
[task 2020-02-27T22:33:22.585Z] | |
[task 2020-02-27T22:33:22.585Z] | function or associated item not found in core::mem::MaybeUninit<_>
[task 2020-02-27T22:33:22.585Z]
[task 2020-02-27T22:33:22.589Z] error[E0599]: no function or associated item named uninit found for type core::mem::MaybeUninit<_> in the current scope
[task 2020-02-27T22:33:22.589Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:434:76
[task 2020-02-27T22:33:22.589Z] |
[task 2020-02-27T22:33:22.589Z] 434 | let mut data = SmallVecData::<A>::from_inline(MaybeUninit::uninit());
[task 2020-02-27T22:33:22.589Z] | -------------^^^^^^
[task 2020-02-27T22:33:22.589Z] | |
[task 2020-02-27T22:33:22.589Z] | function or associated item not found in core::mem::MaybeUninit<_>
[task 2020-02-27T22:33:22.589Z]
[task 2020-02-27T22:33:22.601Z] error[E0599]: no function or associated item named uninit found for type core::mem::MaybeUninit<_> in the current scope
[task 2020-02-27T22:33:22.602Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:670:68
[task 2020-02-27T22:33:22.602Z] |
[task 2020-02-27T22:33:22.603Z] 670 | self.data = SmallVecData::from_inline(MaybeUninit::uninit());
[task 2020-02-27T22:33:22.603Z] | -------------^^^^^^
[task 2020-02-27T22:33:22.603Z] | |
[task 2020-02-27T22:33:22.603Z] | function or associated item not found in core::mem::MaybeUninit<_>
[task 2020-02-27T22:33:22.603Z]
[task 2020-02-27T22:33:22.605Z] error[E0599]: no function or associated item named uninit found for type core::mem::MaybeUninit<_> in the current scope
[task 2020-02-27T22:33:22.606Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:737:68
[task 2020-02-27T22:33:22.607Z] |
[task 2020-02-27T22:33:22.608Z] 737 | self.data = SmallVecData::from_inline(MaybeUninit::uninit());
[task 2020-02-27T22:33:22.609Z] | -------------^^^^^^
[task 2020-02-27T22:33:22.610Z] | |
[task 2020-02-27T22:33:22.611Z] | function or associated item not found in core::mem::MaybeUninit<_>
[task 2020-02-27T22:33:22.612Z]
[task 2020-02-27T22:33:22.617Z] error[E0599]: no method named assume_init found for type core::mem::MaybeUninit<A> in the current scope
[task 2020-02-27T22:33:22.619Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:916:39
[task 2020-02-27T22:33:22.619Z] |
[task 2020-02-27T22:33:22.620Z] 916 | Ok(data.into_inline().assume_init())
[task 2020-02-27T22:33:22.621Z] | ^^^^^^^^^^^
[task 2020-02-27T22:33:22.622Z]
[task 2020-02-27T22:33:22.646Z] error[E0599]: no function or associated item named uninit found for type core::mem::MaybeUninit<_> in the current scope
[task 2020-02-27T22:33:22.646Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:1078:65
[task 2020-02-27T22:33:22.646Z] |
[task 2020-02-27T22:33:22.646Z] 1078 | let mut data: MaybeUninit<A> = MaybeUninit::uninit();
[task 2020-02-27T22:33:22.646Z] | -------------^^^^^^
[task 2020-02-27T22:33:22.646Z] | |
[task 2020-02-27T22:33:22.646Z] | function or associated item not found in core::mem::MaybeUninit<_>
[task 2020-02-27T22:33:22.646Z]
[task 2020-02-27T22:33:22.647Z] error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
[task 2020-02-27T22:33:22.647Z] --> /builds/worker/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.2.0/lib.rs:1081:30
[task 2020-02-27T22:33:22.647Z] |
[task 2020-02-27T22:33:22.647Z] 1081 | data.as_mut_ptr() as *mut A::Item,
[task 2020-02-27T22:33:22.647Z] | ^^^^^^^^^^
[task 2020-02-27T22:33:22.647Z]
[task 2020-02-27T22:33:22.695Z] error: aborting due to 23 previous errors
[task 2020-02-27T22:33:22.696Z]
[task 2020-02-27T22:33:22.696Z] Some errors occurred: E0599, E0658.
[task 2020-02-27T22:33:22.696Z] For more information about an error, try rustc --explain E0599.
[task 2020-02-27T22:33:22.700Z] error: Could not compile smallvec.
[task 2020-02-27T22:33:22.700Z] warning: build failed, waiting for other jobs to finish...
[task 2020-02-27T22:33:26.206Z] error: failed to compile cargo-vendor v0.1.23, intermediate artifacts can be found at /tmp/cargo-installeTfuQ0
[task 2020-02-27T22:33:26.206Z]
[task 2020-02-27T22:33:26.206Z] Caused by:
[task 2020-02-27T22:33:26.206Z] build failed
[fetches 2020-02-27T22:33:26.208Z] removing /builds/worker/workspace/build

Chris is it something you can take a look at?

Flags: needinfo?(chmanchester)

It's failing to compile smallvec 1.2.0, which was released a month ago. And this is why we should have a Cargo.lock for this. But this is also not the same thing this bug was filed for. Please file a new one.

Flags: needinfo?(chmanchester)

We require an even newer version of rustc now (and we now even want the next version if you have a nightly), so I think this bug can be closed.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.