Finding compatible target for nightly feature

I'm trying to use nightly for #![feature(generic_const_exprs)] but can't build it for Windows / x86_64 / msvc on the latest release.

I've seen things about specifying an exact nightly release to deal with build targets being removed, but can't find anything about searching back to see if or when there was an available option previously.

Will I need to switch to Linux, or is it possible to find a working version?

What is the error message you get from the compiler when you try to build your project?

Maybe do a binary search, like you would do with git bisect?

warning: Force-skipping unavailable component 'generic_const_exprs-x86_64-pc-windows-msvc'

What happens if you just build your project? Like cargo +nightly build? If I run rustup toolchain install nightly --component generic_const_exprs on my x86_64-unknown-linux-gnu machine I get the following error:

info: skipping nightly which is missing installed component 'generic_const_exprs'
error: component 'generic_const_exprs' for target 'x86_64-unknown-linux-gnu' is unavailable for download for channel 'nightly'
Sometimes not all components are available in any given nightly. If you don't need the component, you could try a minimal installation with:

    rustup toolchain add nightly --profile minimal

But if I run cargo +nightly build in a project that has #![feature(generic_const_exprs)] enabled, it still compiles with today's version of nightly (without that component). I'm not familiar with rustup and its components, but to me it looks like the generic_const_exprs component you are trying to add to your nightly toolchain with rustup just doesn't exist. The rustup component history tool also does not list this component, nor a component for any other nightly feature.

That's correct. Features are not toolchain components, they're capabilities of the compiler.


Well, looks like I just set up rust-toolchain.toml incorrectly. Problem solved!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.