Skip to content

"use of unstable library feature 'restricted_std'" can't be fixed for deps #69

Open
@Manishearth

Description

@Manishearth

I'm trying to build code with dependencies for thumbv7m-none-eabi, and crates like serde fail due to the lack of restricted_std.

This makes sense, but there doesn't seem to be a way to globally disable it, so either I have to edit and patch each of my dependencies, or I have to edit the requirement out of std. Neither is good. It would be nice if there were a way to globally opt in to this.

$ cargo +nightly build -Zbuild-std --target=thumbv7m-none-eabi
warning: unused manifest key: bench.1.required_features
   Compiling serde v1.0.126
error[E0658]: use of unstable library feature 'restricted_std'
  |
  = help: add `#![feature(restricted_std)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'restricted_std'
   --> /home/manishearth/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.126/src/lib.rs:157:17
    |
157 |         pub use std::*;
    |                 ^^^
    |
    = help: add `#![feature(restricted_std)]` to the crate attributes to enable

error: aborting due to 2 previous errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions