Skip to content

Doesn't build with serde #113

Description

@Nodrance

Trying to build with serde, I get this:

PS C:\Users\esnar\Desktop\Temp\Code\Rust\InputBot> cargo build --features serde
    Blocking waiting for file lock on package cache
    Blocking waiting for file lock on package cache
    Blocking waiting for file lock on package cache
   Compiling inputbot v0.6.0 (C:\Users\esnar\Desktop\Temp\Code\Rust\InputBot)
error[E0432]: unresolved import `thiserror`                                                                                                           
   --> src\public.rs:463:17
    |
463 | #[derive(Debug, Error)]
    |                 ^^^^^ no `ThiserrorProvide` in `__private`
    |
note: found an item that was configured out
   --> C:\Users\esnar\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\thiserror-1.0.69\src\lib.rs:289:29
    |
287 |     #[cfg(error_generic_member_access)]
    |           --------------------------- the item is gated here
288 |     #[doc(hidden)]
289 |     pub use crate::provide::ThiserrorProvide;
    |                             ^^^^^^^^^^^^^^^^
    = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: unused import: `AtomicPtr`                                                                                                                   
 --> src\common.rs:5:20
  |
5 |     sync::atomic::{AtomicPtr, Ordering},
  |                    ^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default

error[E0658]: use of unstable library feature `error_generic_member_access`                                                                           
   --> src\public.rs:463:17
    |
463 | #[derive(Debug, Error)]
    |                 ^^^^^
    |
    = note: see issue #99301 <https://github.com/rust-lang/rust/issues/99301> for more information
    = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: no method named `thiserror_provide` found for reference `&ParseIntError` in the current scope                                           
   --> src\public.rs:468:9
    |
468 |         source: std::num::ParseIntError,
    |         ^^^^^^ method not found in `&ParseIntError`

Some errors have detailed explanations: E0432, E0599, E0658.                                                                                          
For more information about an error, try `rustc --explain E0432`.
warning: `inputbot` (lib) generated 1 warning                                                                                                         
error: could not compile `inputbot` (lib) due to 3 previous errors; 1 warning emitted

I'm pretty new to rust so I don't know a lot about how this all works, I apologize if there's a simple fix for this or I'm using it wrong. I'm trying to use this in a larger program. Is this an issue with the library, or am I just using it wrong?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions