snippetrustCritical
How to execute cargo test using the nightly channel?
Viewed 0 times
howtheusingnightlychannelcargoexecutetest
Problem
I'm trying to run my tests with nightly Rust using Windows Powershell. I run
Obviously, I have to tell Cargo to compile it on the nightly channel, but how? I can't find any reference to specifying a channel in the help section, or any website I've found.
cargo test in the directory, and I getCompiling rustcraft v0.1.0 (file:///C:/Users/Phoenix/Desktop/Rust/rustcraft)
error[E0554]: #![feature] may not be used on the stable release channel
--> C:\Users\Phoenix\Desktop\Rust\rustcraft\src\main.rs:1:1
|
1 | #![feature(integer_atomics)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0554]: #![feature] may not be used on the stable release channel
--> C:\Users\Phoenix\Desktop\Rust\rustcraft\src\main.rs:2:1
|
2 | #![feature(collections)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
Obviously, I have to tell Cargo to compile it on the nightly channel, but how? I can't find any reference to specifying a channel in the help section, or any website I've found.
Solution
The command line solution may help you to configure your IDE:
Provided, of course, that you have the nightly channel installed. If not, perhaps install it with
cargo +nightly testProvided, of course, that you have the nightly channel installed. If not, perhaps install it with
rustup install nightly (no need to switch to it, but check you're still on stable: rustup show).Code Snippets
cargo +nightly testContext
Stack Overflow Q#48593858, score: 124
Revisions (0)
No revisions yet.