如何使用夜间频道进行货物测试? [英] How to execute cargo test using the nightly channel?

查看:53
本文介绍了如何使用夜间频道进行货物测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Windows Powershell 使用夜间 Rust 运行我的测试.我在目录中运行cargo test,我得到

I'm trying to run my tests with nightly Rust using Windows Powershell. I run cargo test in the directory, and I get

Compiling 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)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^

显然,我必须告诉 Cargo 在夜间频道上编译它,但是怎么做?我在帮助部分或我找到的任何网站中找不到任何关于指定频道的参考.

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.

推荐答案

命令行解决方案可以帮助您配置您的 IDE:

The command line solution may help you to configure your IDE:

cargo +nightly test

当然,前提是您安装了夜间频道.如果没有,也许可以使用 rustup install nightly 安装它(无需切换到它,但请检查您是否仍处于稳定状态:rustup show).

Provided, 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).

这篇关于如何使用夜间频道进行货物测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆