Is there a breaking change between 1.0.0 and 1.0.2?
Closed this issue · 3 comments
I'm attempting to reproduce a build, and I find that in the working environment, it's using ryu 1.0.0.
In the broken environment, it's using ryu 1.0.2. In that environment, I'm getting "use of unstable library feature 'maybe_init'" errors.
I know that the fix for this is to use the nightly build, but the rest of my environment is tied to a specific build and it is not feasible to change it.
I also know that I can change my Cargo.toml file to specify 1.0.0. However, it is my understanding that the rules of Semantic Versioning dictate no breaking changes for patch releases (which is what this is, right?).
In any case, if this is an intentional change, I can work around it.
If not, I wanted the developers to know.
Sorry about the breakage! The behavior is intended to be that on compilers that have stable MaybeUninit we use it, on older compiler we do not.
Lines 32 to 36 in c72bd76
What compiler version is your failing build exactly? Can you share the exact error message?
My rust-toolchain file contents:
nightly-2019-05-20
The extact message:
error[E0658]: use of unstable library feature 'maybe_uninit'
--> <REDACTED>/.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.2/src/buffer/mod.rs:4:5
|
4 | use core::mem::MaybeUninit;
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/53491
= help: add #![feature(maybe_uninit)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'maybe_uninit'
--> <REDACTED>.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.2/src/buffer/mod.rs:27:13
|
27 | bytes: [MaybeUninit<u8>; 24],
| ^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/53491
= help: add #![feature(maybe_uninit)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'maybe_uninit'
--> <REDACTED>.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.2/src/buffer/mod.rs:41:30
|
41 | let bytes = unsafe { MaybeUninit::uninit().assume_init() };
| ^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/53491
= help: add #![feature(maybe_uninit)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'maybe_uninit'
--> <REDACTED>.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.2/src/d2s.rs:24:5
|
24 | use core::mem::MaybeUninit;
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/53491
= help: add #![feature(maybe_uninit)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'maybe_uninit'
--> <REDACTED>.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.2/src/d2s.rs:194:43
|
194 | let mut vp_uninit: MaybeUninit<u64> = MaybeUninit::uninit();
| ^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/53491
= help: add #![feature(maybe_uninit)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'maybe_uninit'
--> <REDACTED>.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.2/src/d2s.rs:194:24
|
194 | let mut vp_uninit: MaybeUninit<u64> = MaybeUninit::uninit();
| ^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/53491
= help: add #![feature(maybe_uninit)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'maybe_uninit'
--> <REDACTED>.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.2/src/d2s.rs:196:43
|
196 | let mut vm_uninit: MaybeUninit<u64> = MaybeUninit::uninit();
| ^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/53491
= help: add #![feature(maybe_uninit)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'maybe_uninit'
--> <REDACTED>.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.2/src/d2s.rs:196:24
|
196 | let mut vm_uninit: MaybeUninit<u64> = MaybeUninit::uninit();
| ^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/53491
= help: add #![feature(maybe_uninit)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'maybe_uninit'
--> <REDACTED>.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.2/src/buffer/mod.rs:41:52
|
41 | let bytes = unsafe { MaybeUninit::uninit().assume_init() };
| ^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/53491
= help: add #![feature(maybe_uninit)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'maybe_uninit'
--> <REDACTED>.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.2/src/buffer/mod.rs:98:23
|
98 | self.bytes[0].as_ptr()
| ^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/53491
= help: add #![feature(maybe_uninit)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'maybe_uninit'
--> <REDACTED>.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.2/src/buffer/mod.rs:110:23
|
110 | self.bytes[0].as_mut_ptr()
| ^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/53491
= help: add #![feature(maybe_uninit)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'maybe_uninit'
--> <REDACTED>.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.2/src/d2s.rs:220:31
|
220 | vp_uninit.as_mut_ptr()
| ^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/53491
= help: add #![feature(maybe_uninit)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'maybe_uninit'
--> <REDACTED>.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.2/src/d2s.rs:228:31
|
228 | vm_uninit.as_mut_ptr()
| ^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/53491
= help: add #![feature(maybe_uninit)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'maybe_uninit'
--> <REDACTED>.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.2/src/d2s.rs:239:37
|
239 | vp = unsafe { vp_uninit.assume_init() };
| ^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/53491
= help: add #![feature(maybe_uninit)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'maybe_uninit'
--> <REDACTED>.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.2/src/d2s.rs:240:37
|
240 | vm = unsafe { vm_uninit.assume_init() };
| ^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/53491
= help: add #![feature(maybe_uninit)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'maybe_uninit'
--> <REDACTED>.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.2/src/d2s.rs:279:31
|
279 | vp_uninit.as_mut_ptr()
| ^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/53491
= help: add #![feature(maybe_uninit)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'maybe_uninit'
--> <REDACTED>.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.2/src/d2s.rs:287:31
|
287 | vm_uninit.as_mut_ptr()
| ^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/53491
= help: add #![feature(maybe_uninit)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'maybe_uninit'
--> <REDACTED>.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.2/src/d2s.rs:298:37
|
298 | vp = unsafe { vp_uninit.assume_init() };
| ^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/53491
= help: add #![feature(maybe_uninit)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'maybe_uninit'
--> <REDACTED>.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.2/src/d2s.rs:299:37
|
299 | vm = unsafe { vm_uninit.assume_init() };
| ^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/53491
= help: add #![feature(maybe_uninit)] to the crate attributes to enable
error: aborting due to 19 previous errors
For more information about this error, try `rustc --explain E0658`.
error: Could not compile `ryu`.
Ah, it looks like it's an old nightly from between when 1.36 branched and when the MaybeUninit stabilization landed. :( Unfortunately it isn't possible for libraries to support old nightlies in general, since features often go through lots of change leading up to stabilization and libraries are always going to target the final stabilized form.
If you are going to be using a pinned compiler version for an extended period of time, and you need access to nightly features, I would strongly recommend taking one of the rustc commits corresponding to a stable release and building that exact commit in dev mode, rather than using a random nightly. So that would be rust-lang/rust@a53f9df if you want something equivalent to 1.36 or rust-lang/rust@3c235d5 if you want something equivalent to 1.35.