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

implicit dependency of "std" for "serde" feature in published 0.4.2 #40

Closed
kentfredric opened this issue Feb 20, 2020 · 0 comments · Fixed by #42
Closed

implicit dependency of "std" for "serde" feature in published 0.4.2 #40

kentfredric opened this issue Feb 20, 2020 · 0 comments · Fixed by #42
Assignees
Labels

Comments

@kentfredric
Copy link

I've just been testing a few things as part of my linux vendoring efforts, and I stumbled upon this:

cargo +system build --no-default-features --features 'serde'
    Updating crates.io index
   Compiling proc-macro2 v1.0.8
   Compiling unicode-xid v0.2.0
   Compiling syn v1.0.14
   Compiling serde v1.0.104
   Compiling quote v1.0.2
   Compiling serde_derive v1.0.104
   Compiling hex v0.4.2 (/home/kent/.cpanm/work/1582182020.22342/hex-0.4.2)
error[E0433]: failed to resolve: use of undeclared type or module `std`
  --> src/serde.rs:19:5
   |
19 | use std::marker::PhantomData;
   |     ^^^ use of undeclared type or module `std`

error[E0432]: unresolved import `std`
  --> src/serde.rs:18:5
   |
18 | use std::fmt;
   |     ^^^ help: a similar path exists: `serde::std`

error[E0412]: cannot find type `String` in this scope
  --> src/serde.rs:31:37
   |
31 |     let s = data.encode_hex_upper::<String>();
   |                                     ^^^^^^ not found in this scope
   |
help: possible candidates are found in other modules, you can import them into scope
   |
15 | use alloc::prelude::v1::String;
   |
15 | use alloc::string::String;
   |

error[E0412]: cannot find type `String` in this scope
  --> src/serde.rs:45:31
   |
45 |     let s = data.encode_hex::<String>();
   |                               ^^^^^^ not found in this scope
   |
help: possible candidates are found in other modules, you can import them into scope
   |
15 | use alloc::prelude::v1::String;
   |
15 | use alloc::string::String;
   |

error[E0412]: cannot find type `PhantomData` in this scope
  --> src/serde.rs:59:29
   |
59 |     struct HexStrVisitor<T>(PhantomData<T>);
   |                             ^^^^^^^^^^^ not found in this scope
   |
help: possible candidates are found in other modules, you can import them into scope
   |
15 | use core::marker::PhantomData;
   |
15 | use serde::export::PhantomData;
   |

error[E0425]: cannot find value `PhantomData` in this scope
  --> src/serde.rs:87:48
   |
87 |     deserializer.deserialize_str(HexStrVisitor(PhantomData))
   |                                                ^^^^^^^^^^^ not found in this scope
   |
help: possible candidates are found in other modules, you can import them into scope
   |
15 | use core::marker::PhantomData;
   |
15 | use serde::export::PhantomData;
   |

error: aborting due to 6 previous errors

Some errors have detailed explanations: E0412, E0425, E0432, E0433.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `hex`.
warning: build failed, waiting for other jobs to finish...
error: build failed

It may not be important shrug. Though I suspect this can be fixed.

@KokaKiwi KokaKiwi self-assigned this Feb 20, 2020
@Luro02 Luro02 mentioned this issue Mar 4, 2020
@KokaKiwi KokaKiwi added the bug label Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants