gpt4 book ai didi

rust - Rust 版本(例如 2015)什么时候达到生命周期的尽头?

转载 作者:行者123 更新时间:2023-12-05 02:00:46 26 4
gpt4 key购买 nike

Rust 有不同的版本。最旧的版本是 Rust 2015 .当前版本是 Rust 2018 . Rust 2021 有计划发布. Rust 2015 什么时候结束生命并且不受 rustc 支持?

最佳答案

官方docs声称官方版本会不断更新。

Compatibility

When a new edition becomes available in the compiler,crates must explicitly opt in to it to take full advantage. This optin enables editions to contain incompatible changes, like adding a newkeyword that might conflict with identifiers in code, or turningwarnings into errors. A Rust compiler will support all editions thatexisted prior to the compiler's release, and can link crates of anysupported editions together. Edition changes only affect the way thecompiler initially parses the code. Therefore, if you're using Rust2015, and one of your dependencies uses Rust 2018, it all works justfine. The opposite situation works as well.

Just to be clear: most features will be available on all editions.People using any edition of Rust will continue to see improvements asnew stable releases are made. In some cases however, mainly when newkeywords are added, but sometimes for other reasons, there may be newfeatures that are only available in later editions. You only need toupgrade if you want to take advantage of such features.

(强调)

关于rust - Rust 版本(例如 2015)什么时候达到生命周期的尽头?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67062157/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com