Rust 1.26 版本釋出,系統程式語言

類別: IT
標籤: 程式語言 rust
Rust

Rust 1.26 版本釋出。Rust 是一門由 Mozilla 開發的專注於安全性,速度和併發性的系統程式語言。主要更新內容如下:

語言

  • 現在 Closures 實現了 Copy and/or Clone

  • Inclusive range 語法,如 for x in 0..=10現可用

  • Stablise '_. The underscore lifetime can be used anywhere where a lifetime can be elided.

  • impl Traitis now stable allowing you to have abstract types in returns or in function parameters. e.g. fn foo() -> impl Iterator<Item=u8>or fn open(path: impl AsRef<Path>).

  • Pattern matching will now automatically apply dereferences.

  • 128-bit integers in the form of u128and i128are now stable.

  • maincan now return Result<(), E: Debug>in addition to ().

  • A lot of operations are now available in a const context. E.g. You can now index into constant arrays, reference and dereference into constants, and use Tuple struct constructors.

更多內容

下載地址:

  • Source code(zip)

  • Source code(tar.gz)

Rust 1.26 版本釋出,系統程式語言原文請看這裡