技术控

    今日:11| 主题:49448
收藏本版 (1)
最新软件应用技术尽在掌握

[其他] Major Rust rev overhauls error messages

[复制链接]
只是沒有結果 发表于 2016-10-3 18:49:59
168 2

立即注册CoLaBug.com会员,免费获得投稿人的专业资料,享用更多功能,玩转个人品牌!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x

Major Rust rev overhauls error messages-1 (previously,available,occurring,knowledge,relevant)

  Rust, positioned as a fast programming language for systems and native applications , is getting a new error message format and improved compilation with the newly released version 1.12.
  Out Sept. 29, Rust 1.12 is the 12th update to the language since Rust 1.0 arrived in May 2015. "The release of 1.12 might be one of the most significant Rust releases since 1.0," the Rust Core Team said.
Topping the list of user-facing changes in 1.12 is an error message format emitted by rustc. "We've previously talked about this format and this is the first stable release where they are broadly available," said the Rust team. The format helps surface internal knowledge about why an error is occurring. "It does this by putting your code front and center, highlighting the parts relevant to the error with annotations describing what went wrong." Errors are represented by showing the points in code that most matter, the team said, and errors can be shown be shown as JSON with a flag.
The upgrade moves to a compiler back end based on the new Rust MIR (Mid-level Intermediate Representation), intended to produce quicker compilation and execution times, as well as more precise type-checking. "While this feature does not result in anything user-visible today, it paves the way for a number of future compiler optimizations, and for some code bases it already results in improvements to compile times and reductions in code size," the team said. MIR exposes information about a program's control flow, letting the compiler know whether types are moved or not; thus, MIR means less work for the compiler and less bloat at runtime.
  Rust 1.12 also features documentation improvements, a warning when tests run more than 60 seconds, and the ability to build the compileragainst LLVM 3.9. Types in the standard library features a number of small "quality of life" improvements, and the Cargo package manager adds workspaces for a group of Rust packages to share the same Cargo.lock file. "If you have a project that's split up into multiple packages, this makes it much easier to keep shared dependencies on a single version," according to the team.
  Developers can override the source of a Cargo crate. "Using this with tools like cargo-vendor and cargo-local-registry allow vendoring dependencies locally in a robust fashion. Eventually this support will be the foundation of supporting mirrors of crates.io as well."
  Developed by Mozilla, Rust has been viewed as a safer alternative to C and C++ for system-level programming, offering security and multicore processor support. It has been gathering adherents, ranking 21st in the PyPL Popularity of Programming Language index , which assesses language popularity based on Google searches, in September and 45th in the September Tiobe Index , which looks at searches in several indexes.
友荐云推荐




上一篇:IntelliJ Idea 2016.3 EAP: Polyglot Maven, Grails View, Inspections, and More
下一篇:Go pro: The power user's guide to PowerShell
酷辣虫提示酷辣虫禁止发表任何与中华人民共和国法律有抵触的内容!所有内容由用户发布,并不代表酷辣虫的观点,酷辣虫无法对用户发布内容真实性提供任何的保证,请自行验证并承担风险与后果。如您有版权、违规等问题,请通过"联系我们"或"违规举报"告知我们处理。

风速2010 发表于 2016-10-7 21:23:44
传说中的沙发???哇卡卡
回复 支持 反对

使用道具 举报

董蔓玲 发表于 2016-10-11 15:05:28
这是一个KB的故事,当你在半夜12点的时候穿着黑色的衣服对着镜子用梳子梳下就会看到…头皮…屑!
回复 支持 反对

使用道具 举报

*滑动验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

我要投稿

推荐阅读

扫码访问 @iTTTTT瑞翔 的微博
回页顶回复上一篇下一篇回列表手机版
手机版/CoLaBug.com ( 粤ICP备05003221号 | 文网文[2010]257号 )|网站地图 酷辣虫

© 2001-2016 Comsenz Inc. Design: Dean. DiscuzFans.

返回顶部 返回列表