Skip to content

Compile error[E0658]: use of unstable library feature 'restricted_std' #37

@ryanbaggs2

Description

@ryanbaggs2

When compiling for the target x86_64-unknown-none I get the error message:

error[E0658]: use of unstable library feature 'restricted_std'
  |
  = help: add `#![feature(restricted_std)]` to the crate attributes to enable

I added the attribute #![feature(restricted_std)] to the top of the lib.rs file and also had to add it to my project main.rs file which corrected the issue. The change also successfully compiled for the x86_64-pc-windows-msvc target. This occurs for the nightly-x86_64-pc-windows-msvc toolchain, but the attribute can't be applied for the 'stable' or 'beta' compilers: https://doc.rust-lang.org/error_codes/E0554.html

This is my first issue and I am not sure what the standard procedure would be for getting this fixed. Is there a way to add attributes for specific toolchains, or is that not recommended because the feature "may be removed or altered in the future"? Any input would be greatly appreciated.

Note: Edited as I found that the feature attribute does not compile for stable/beta channel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions