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

Fix unstable build #2540

Closed
wants to merge 1 commit into from
Closed

Fix unstable build #2540

wants to merge 1 commit into from

Conversation

mina86
Copy link

@mina86 mina86 commented Jul 28, 2023

Before:

$ cargo +nightly build --no-default-features --features unstable
   Compiling serde v1.0.177 (/srv/mpn/serde/serde)
error[E0432]: unresolved import `std_error`
   --> serde/src/de/mod.rs:134:9
134 | pub use std_error::Error as StdError;
    |         ^^^^^^^^^ maybe a missing crate `std_error`?

After:

$ cargo +nightly build --no-default-features --features unstable
   Compiling serde v1.0.177 (/srv/mpn/serde/serde)
    Finished dev [unoptimized] target(s) in 1.28s

Note that unstable and non-std tests are still failing.

Issue: #812

Before:

    $ cargo +nightly build --no-default-features --features unstable
       Compiling serde v1.0.177 (/srv/mpn/serde/serde)
    error[E0432]: unresolved import `std_error`
       --> serde/src/de/mod.rs:134:9
    134 | pub use std_error::Error as StdError;
        |         ^^^^^^^^^ maybe a missing crate `std_error`?

After:

    $ cargo +nightly build --no-default-features --features unstable
       Compiling serde v1.0.177 (/srv/mpn/serde/serde)
        Finished dev [unoptimized] target(s) in 1.28s

Note that `unstable` and non-`std` tests are still failing.

Issue: serde-rs#812
Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

Unconditionally using std_error makes the rendered documentation less clear. I opened #2541 with a different implementation that follows the one of serde::ser::StdError.

Before this PR:
Screenshot from 2023-07-28 16-02-07

After this PR:
Screenshot from 2023-07-28 16-02-10

@mina86 mina86 deleted the a branch July 28, 2023 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants