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

use of unstable library feature 'rustc_private' #49

Closed
DavidM-D opened this issue Jun 26, 2020 · 1 comment
Closed

use of unstable library feature 'rustc_private' #49

DavidM-D opened this issue Jun 26, 2020 · 1 comment

Comments

@DavidM-D
Copy link

If you try and compile the following code in a rust project without serde as a dependency:

use candid::Deserialize;

#[derive(Deserialize)]
pub struct A();

You will get the following error

error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?
 --> rust_canisters/dfn_http/src/lib.rs:3:10
  |
3 | #[derive(Deserialize)]
  |          ^^^^^^^^^^^
  |
  = note: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
  = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.

This is the case for any struct, but it is resolved as soon as you add serde as a dependency.

This is true for 0.25 and master at the time of writing.

@chenyan-dfinity
Copy link
Contributor

There is no supported way of doing this without adding serde as a dependency, see serde-rs/serde#1465. I will update the doc to reflect this.

chenyan-dfinity added a commit that referenced this issue Jul 8, 2020
We have three different field label types in `parser::types::TypeField`, `parser::values::IDLField`, and `types::internal::Field`. This PR unifies all the `Field` types to use the same `Label` enum.

This refactor also fixes #48 to give better error messages.
Update the doc to address #49
ninegua pushed a commit to ninegua/candid that referenced this issue Apr 22, 2022
…y#49)

Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](node-fetch/node-fetch@v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants