Background
One of the good sides of familiarising oneself with a new programming language is that as one is learning, other areas of the toolsets are being thought of.
And, being built out.
Error
Here is an error that I have been getting:-
Image
Textual
error[E0554]: `#![feature]` may not be used on the stable release channel
Explanation
The feature that we are trying to use is not currently available on the stable release channel.
Troubleshooting
Outline
- Rust – ToolChain Management
- Review Installed
- Review Default
Rust – ToolChain Management
Review Installed
Syntax
rustup toolchain list
Sample
rustup toolchain list
Output
Image
Textual
>rustup toolchain list stable-x86_64-pc-windows-msvc (default) >
Review Default ToolChain
Syntax
rustup default
Sample
rustup default
Output
Image
Textual
>rustup default stable-x86_64-pc-windows-msvc (default)
Remediation
Outline
- Rust – ToolChain Management
- Install Toolchain
- Install Toolchain – Nightly
- Install Toolchain
Rust – ToolChain Management
Install
Install Toolchain – Nightly
Syntax
rustup toolchain install nightly
Sample
rustup toolchain install nightly --profile default
Output
Image
Textual
>rustup toolchain install nightly --profile default info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc' 752.1 KiB / 752.1 KiB (100 %) 671.4 KiB/s in 1s ETA: 0s info: latest update on 2023-04-19, rust version 1.71.0-nightly (c609da59d 2023-04-18) info: downloading component 'cargo' info: downloading component 'clippy' info: downloading component 'rust-docs' info: downloading component 'rust-std' info: downloading component 'rustc' info: downloading component 'rustfmt' info: installing component 'cargo' info: installing component 'clippy' info: installing component 'rust-docs' 13.5 MiB / 13.5 MiB (100 %) 1.1 MiB/s in 24s ETA: 0s info: installing component 'rust-std' 25.4 MiB / 25.4 MiB (100 %) 3.9 MiB/s in 5s ETA: 0s info: installing component 'rustc' 60.8 MiB / 60.8 MiB (100 %) 11.8 MiB/s in 5s ETA: 0s info: installing component 'rustfmt' nightly-x86_64-pc-windows-msvc installed - rustc 1.71.0-nightly (c609da59d 2023-04-18) info: checking for self-updates >
Post Install CheckList
Outline
- Rust – ToolChain Management
- Review Installed
- Review Default
Rust – ToolChain Management
Review Installed
Syntax
rustup toolchain list
Sample
rustup toolchain list
Output
Image
Textual
>rustup toolchain list stable-x86_64-pc-windows-msvc (default) nightly-x86_64-pc-windows-msvc
Explanation
Here are our installed toolchains:-
- stable-x86_64-pc-windows-msvc (default)
- nightly-x86_64-pc-windows-msvc
Review Default ToolChain
Syntax
rustup default
Sample
rustup default
Output
Image
Textual
>rustup default stable-x86_64-pc-windows-msvc (default)
Explanation
Our default toolchain stayed at
- stable-x86_64-pc-windows-msvc (default)
Usage
Outline
- Cargo Build and Run
- Build
- Run
Cargo Build and Run
Build
Syntax
cargo build
Sample – Cargo Build – Default
cargo build
Output – Textual
>cargo build Compiling ... error[E0554]: `#![feature]` may not be used on the stable release channel
Sample – Cargo Build – Nightly
cargo +nightly build
Output – Textual
>cargo +nightly build Finished dev [unoptimized + debuginfo] target(s) in 0.01s >
Explanation
Results.
- Build Targeting Default Fails
- error[E0554]: `#![feature]` may not be used on the stable release channel
- Build Targeting Nightly Succeeds
- Finished dev [unoptimized + debuginfo] target(s) in 0.01s
Run
Syntax
cargo run
Sample – Cargo Build – Default
cargo run
Output – Textual
cargo run error[E0554]: `#![feature]` may not be used on the stable release channel
Sample – Cargo Run – Nightly
cargo +nightly run
Output – Textual
>cargo +nightly run Compiling Finished dev [unoptimized + debuginfo] target(s) in 1.27s Running `target\debug\test.exe`
Explanation
Results.
- Build Targeting Default Fails
- error[E0554]: `#![feature]` may not be used on the stable release channel
- Build Targeting Nightly Succeeds
- Finished dev [unoptimized + debuginfo] target(s) in 0.01s
References
- Rust-Lang.Org
- Error codes index
- Error code E0554
Link
- Error code E0554
- Error codes index