问题描述
我现在有点束手无策.我的个人代码依赖于 rand
,它目前不能在 Nightly 1.7 上编译,但可以在 Beta 1.6 和稳定版上运行.
然而,我的工作也使用了不稳定的特性,例如 box
syntax/patterns/raw 和 convert
以一种无法(轻松)重构的方式.有什么办法,包括从源代码编译,让 Rust 1.6好像"它是一个夜间?我使用的是 Windows (10)/MSYS 2,如果这会使事情变得复杂,例如构建源代码.
你不能(简单地)编译任何稳定版本的 Rust 来使用不稳定的特性.您也不能下载稳定版本,就好像它不稳定一样.然而,Rust 的下载有一组
我可以弄清楚当前 Beta 版在技术上是哪一天是 Nightly.现在,假设之前的 Nightly 和 Beta 版本 1.6 之间没有重大错误修复,我转到文件夹(在本例中为 2015 年 12 月 9 日)并从列表中下载了相应的 Nightly 安装程序.
有些文件夹可以追溯到 2014 年 11 月 7 日,因此如果您需要过去特定版本的 Rust 来编译您的代码,您很可能会在那里找到它.
I'm in a bit of a bind right now. My personal code relies on rand
, which is currently not compiling on Nightly 1.7, but does work on Beta 1.6 and stable.
However, my work also uses unstable features such as box
syntax/patterns/raw and convert
in a way that can't (easily) be refactored out. Is there any way, including by compiling from source, to get Rust 1.6 "as if" it were a nightly? I'm on Windows (10)/MSYS 2 if that complicates things any, such as building the source.
You cannot (trivially) compile any stable version of Rust to use unstable features. Nor can you download the stable version as if it were unstable. However, Rust's downloads has a set of archives.
By checking when the most recent release happened:
I could figure out what day the current Beta was technically a Nightly. Now, presuming there wasn't a major bugfix between the previous Nightly and Beta releases of 1.6, I went to the folder (in this case, December 9, 2015) and downloaded the corresponding Nightly installer from the list.
There are folders going back to 2014-11-07, so if you need a specific version of Rust from the past to compile your code, you can likely find it there.
这篇关于有没有办法在稳定版或测试版的编译器版本上获得不稳定的功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!