Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error use of unstable feature on nightly-2023-08-25 #2734

Closed
CosmicHorrorDev opened this issue May 2, 2024 · 3 comments
Closed

Compile error use of unstable feature on nightly-2023-08-25 #2734

CosmicHorrorDev opened this issue May 2, 2024 · 3 comments

Comments

@CosmicHorrorDev
Copy link

CosmicHorrorDev commented May 2, 2024

serde's current master (cc865ac) fails to compile on nightly-2023-08-25 with a bunch of errors related to unstable saturating features not being enabled

$ cargo +nightly-2023-08-25 check
    Checking serde v1.0.200 (/home/wintermute/Programming/Repos/serde/serde)
error[E0658]: use of unstable library feature 'saturating_int_impl'
   --> serde/src/lib.rs:280:13
    |
280 |     pub use self::core::num::Saturating;
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #87920 <https://github.com/rust-lang/rust/issues/87920> for more information
    = help: add `#![feature(saturating_int_impl)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'saturating_int_impl'
   --> serde/src/de/impls.rs:109:40
    |
109 |           impl<'de> Deserialize<'de> for Saturating<$primitive> {
    |                                          ^^^^^^^^^^^^^^^^^^^^^^
...
383 | / impl_deserialize_num! {
384 | |     i8, NonZeroI8 cfg(not(no_num_nonzero_signed)), deserialize_i8
385 | |     num_self!(i8:visit_i8);
386 | |     int_to_int!(i16:visit_i16 i32:visit_i32 i64:visit_i64);
387 | |     uint_to_self!(u8:visit_u8 u16:visit_u16 u32:visit_u32 u64:visit_u64);
388 | | }
    | |_- in this macro invocation
    |
    = note: see issue #87920 <https://github.com/rust-lang/rust/issues/87920> for more information
    = help: add `#![feature(saturating_int_impl)]` to the crate attributes to enable
    = note: this error originates in the macro `impl_deserialize_num` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0658]: use of unstable library feature 'saturating_int_impl'
   --> serde/src/de/impls.rs:109:40
    |
109 |           impl<'de> Deserialize<'de> for Saturating<$primitive> {

...

Notably this is the minimum rust version supported by the public_api crate which is causing syntect's CI to fail from a test that makes use of it

@oli-obk
Copy link
Member

oli-obk commented May 2, 2024

Oh fun. That nightly is before stabilization, but already version 1.74

I guess we need to always check for one version after the version that stabilized a feature.

Since stable users can already rely on 1.74 supporting saturating in serde, we can't take this back. Sorry about the breakage, but please just bump your nightly by a few versions to get across the stabilization threshold

@CosmicHorrorDev
Copy link
Author

Makes total sense. Thanks!

@CosmicHorrorDev
Copy link
Author

CosmicHorrorDev commented May 2, 2024

For reference it looks like things start compiling on/after nightly-2023-09-18

@oli-obk oli-obk closed this as completed May 2, 2024
W95Psp added a commit to Nadrieril/hax that referenced this issue May 29, 2024
This is not breaking anything on hax, but unbreaks `serde`: serde-rs/serde#2734
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants