设为首页收藏本站

LUPA开源社区

 找回密码
 注册
文章 帖子 博客
LUPA开源社区 首页 业界资讯 软件追踪 查看内容

Rust 1.34.0发布

2019-4-11 22:07| 发布者: joejoe0332| 查看: 456| 评论: 0|原作者: oschina|来自: oschina

摘要: Rust 1.34.0 发布了,更新内容如下: Language 现在可以使用 #作为# 的简写。现在可以在#、#]和#过程宏中接收 token 流。现在可以用extern crate self as foo;引入 crate 根到外部 prelude。 Compiler 现在可以编译 ...

Rust 1.34.0 发布了,更新内容如下:

Language

  • 现在可以使用 #[deprecated = "reason"] 作为 #[deprecated(note = "reason")] 的简写。
  • 现在可以在 #[attr()]、#[attr[]] 和 #[attr{}] 过程宏中接收 token 流。
  • 现在可以用 extern crate self as foo; 引入 crate 根到外部 prelude。

Compiler

  • 现在可以编译成 riscv64imac-unknown-none-elf 与 riscv64gc-unknown-none-elf
  • 现在可以使用 -C linker-plugin-lto 启用链接器插件LTO优化,这允许 rustc 将 Rust 代码编译为 LLVM bitcode,从而允许 LLVM 跨 C/C++ FFI 边界执行 LTO 优化。
  • 可以编译成 powerpc64-unknown-freebsd

Libraries

  • 在 HashMap <K, V, S> 和 HashSet <T, S> 的一些基本方法中删除了 trait bound,直观体现是不再需要 Hash trait 来创建迭代器。
  • 在 BinaryHeap <T> 的一些基本方法中删除了 Ord trait bound。
  • overflowing_neg 和 wrapping_neg 方法现在是所有数字类型的 const 函数。
  • 索引 str 现在通用于实现SliceIndex <str> 的所有类型。
  • str::trim、str::trim_matches、str::trim_ {start, end} 和 str::trim_ {start, end} _matches 现在是 #[must_use],如果它们的返回类型未使用,将产生警告。
  • check_pow、saturating_pow、wrapping_pow 和 overflowing_pow 方法可用于所有数字类型。

此外还有 API 与其它杂项的更新,详细内容查看更新说明


酷毙

雷人

鲜花

鸡蛋

漂亮
  • 快毕业了,没工作经验,
    找份工作好难啊?
    赶紧去人才芯片公司磨练吧!!

最新评论

关于LUPA|人才芯片工程|人才招聘|LUPA认证|LUPA教育|LUPA开源社区 ( 浙B2-20090187 浙公网安备 33010602006705号   

返回顶部