Rust 1.17 发布了。Rust 是一门由 Mozilla 开发的专注于安全性,速度和并发性的系统编程语言。 总的来说,Rust 1.17.0 的主要更新是小幅度提高了写代码的效率。例如,'static 的生命周期现在假设在 statics 和 consts。当像这样写一个 const 或 static 时: const NAME: &'static str = "Ferris"; static NAME: &'static str = "Ferris"; Rust 1.17 将允许你去除 'static,因为这里只有唯一一个生命周期有意义 const NAME: &str = "Ferris"; static NAME: &str = "Ferris"; 在某些情况下,这可以清除大量的样板代码: // old const NAMES: &'static [&'static str; 2] = &["Ferris", "Bors"]; // new const NAMES: &[&str; 2] = &["Ferris", "Bors"]; 本次的更新内容较多,可点击下面的链接参阅详细信息。 发布主页和发行日志 下载地址 Source code (zip) Source code (tar.gz) Rust 1.17 发布,Mozilla 的编程语言下载地址