Skip to content

The restricted_std error message is confusing #87

@ehuss

Description

@ehuss

If you attempt to build a no-std target, and you forget to include #![no_std] (or you forget to remove a std feature in a dependency, or use a std-needing dependency), then it results in a fairly confusing error:

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

I think that will be a frequent error that will be challenging for users to understand.

I don't know how to address that. It might be nice if cargo could know whether or not a target is intended to support "std", but that sounds challenging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-needs-designStatus: needs design workplan before stabilizationThis needs a plan for how to address before stabilization, but does not need to be implemented.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions