Rust 1.26 版本发布,系统编程语言

栏目: 软件资讯 · 发布时间: 6年前

内容简介:Rust 1.26 版本发布。Rust 是一门由 Mozilla 开发的专注于安全性,速度和并发性的系统编程语言。主要更新内容如下: 语言 现在 Closures 实现了 Copy and/or Clone Inclusive range 语法,如 for x in 0..=10 现...

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 Trait is 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 u128 and i128 are now stable.

  • main can 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.

更多内容

下载地址:


【声明】文章转载自:开源中国社区 [http://www.oschina.net]


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Bad Blood

Bad Blood

John Carreyrou / Knopf / 2018-5-21 / USD 27.95

The full inside story of the breathtaking rise and shocking collapse of Theranos, the multibillion-dollar biotech startup, by the prize-winning journalist who first broke the story and pursued it to t......一起来看看 《Bad Blood》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具