Use of unstable library feature 'restricted_std' when bootstrapping rustc on new target

Hi,

I am in the process of porting rustc to a new target. So far so good except I am getting this error during the build process.

python x.py -v build --host x86_64-pc-windows-msvc --target opus3-octasic-opuskernel

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

For reference the full log is here: Pastie

In order to fix this error I had to add this line at the top of the file rust\library\test\src\lib.rs

   #![feature(restricted_std)]

But it seems to me that I shouldn't have to do that. Is there something I am missing?

Thank.

Especially since the unstable_features lint is on DUMMY_SPAN, it would seem that it's firing incorrectly. The other possibility is that it's firing on some code you're injecting (without e.g. #[allow_internal_unstable] like handling).

If you don't hit the lint when bootstrapping for a different target, it's something that you're doing for the new target. Grepping for what restricted_std feature gates may help diagnose.

1 Like

If this is not a no_std target, then you'll need to update the list here.

If this is a no_std target, then you'll either need to set no_std in config.toml, or update this auto-detection.

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.