{"id":307154,"date":"2020-07-18T21:01:39","date_gmt":"2020-07-18T21:01:39","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=307154"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-07-18T21:01:39","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=307154","title":{"rendered":"Rust 1.45.0: \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u044b\u0445 \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432, \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0435\u0444\u0435\u043a\u0442\u043e\u0432 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/511546\/\">\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 Rust \u0440\u0430\u0434\u0430 \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u043e \u0432\u044b\u043f\u0443\u0441\u043a\u0435 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438, 1.45.0. Rust \u2014 \u044d\u0442\u043e \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0435 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Rust \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 <code>rustup<\/code>, \u0442\u043e \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e \u0432\u0435\u0440\u0441\u0438\u0438 1.45.0 \u0432\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">rustup update stable<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0451 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d <code>rustup<\/code>, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 <a href=\"https:\/\/www.rust-lang.org\/install.html\" rel=\"nofollow\">\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0433\u043e<\/a> \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/github.com\/rust-lang\/rust\/blob\/master\/RELEASES.md#version-1450-2020-07-16\" rel=\"nofollow\">\u043d\u0430 GitHub<\/a>.<\/p>\n<p>  <\/p>\n<h2 id=\"chto-voshlo-v-stabilnuyu-versiyu-1450\">\u0427\u0442\u043e \u0432\u043e\u0448\u043b\u043e \u0432 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e 1.45.0<\/h2>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u043f\u0443\u0441\u043a \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f: \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0432\u043d\u0438\u0445 \u0434\u0435\u0444\u0435\u043a\u0442\u043e\u0432 \u043f\u0440\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u0446\u0435\u043b\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0444\u0438\u0447, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u0438\u043d \u0432\u0435\u0431-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0441\u043c\u043e\u0433 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u043c Rust.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"ispravlenie-defektov-v-preobrazovaniyah\">\u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0435\u0444\u0435\u043a\u0442\u043e\u0432 \u0432 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f\u0445<\/h2>\n<p>  <\/p>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e <a href=\"https:\/\/github.com\/rust-lang\/rust\/issues\/10184\" rel=\"nofollow\">Issue 10184<\/a> \u0431\u044b\u043b\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u0430 \u0432 \u043e\u043a\u0442\u044f\u0431\u0440\u0435 2013 \u0433\u043e\u0434\u0430, \u0437\u0430 \u043f\u043e\u043b\u0442\u043e\u0440\u0430 \u0433\u043e\u0434\u0430 \u0434\u043e \u0432\u044b\u043f\u0443\u0441\u043a\u0430 Rust 1.0. \u0422\u0430\u043a \u043a\u0430\u043a <code>rustc<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <a href=\"http:\/\/llvm.org\/\" rel=\"nofollow\">LLVM<\/a> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 backend-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u0438\u0448\u0435\u0442\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<p>  <\/p>\n<pre><code class=\"rust\">pub fn cast(x: f32) -&gt; u8 {     x as u8 }<\/code><\/pre>\n<p>  <\/p>\n<p>\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 Rust \u0432 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 1.44.0 \u0438 \u0440\u0430\u043d\u044c\u0448\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 LLVM-IR:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">define i8 @_ZN10playground4cast17h1bdf307357423fcfE(float %x) unnamed_addr #0 { start:   %0 = fptoui float %x to i8   ret i8 %0 }<\/code><\/pre>\n<p>  <\/p>\n<p><code>fptoui<\/code> \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u043c \u043e\u0442 &quot;floating point to unsigned integer&quot;.<\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u0437\u0434\u0435\u0441\u044c \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, <a href=\"https:\/\/llvm.org\/docs\/LangRef.html#fptoui-to-instruction\" rel=\"nofollow\">\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>:<\/p>\n<p>  <\/p>\n<blockquote><p>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u2018fptoui\u2019 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u043d\u0434 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0432 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0435 (\u043e\u043a\u0440\u0443\u0433\u043b\u044f\u044f \u0434\u043e \u043d\u0443\u043b\u044f) \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u0446\u0435\u043b\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0432 <code>ty2<\/code>, \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u0440\u0447\u0435\u043d\u043d\u044b\u043c.  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b<\/b>                         <\/p>\n<div class=\"spoiler_text\">The \u2018fptoui\u2019 instruction converts its floating-point operand into the nearest (rounding towards zero) unsigned integer value. If the value cannot fit in ty2, the result is a poison value.<\/div>\n<\/p><\/div>\n<\/blockquote>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0447\u0430\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u043d\u0435 \u043a\u043e\u043f\u0430\u0435\u0442\u0435\u0441\u044c \u0432 \u043d\u0435\u0434\u0440\u0430\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u043d\u0430. \u041e\u043d\u0430 \u043f\u043e\u043b\u043d\u0430 \u0436\u0430\u0440\u0433\u043e\u043d\u0430, \u043d\u043e \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435: \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u043a \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u043c\u0443 \u0446\u0435\u043b\u043e\u043c\u0443 \u0447\u0438\u0441\u043b\u0443, \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0447\u0442\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"rust\">fn cast(x: f32) -&gt; u8 {     x as u8 }  fn main() {     let f = 300.0;      let x = cast(f);      println!(&quot;x: {}&quot;, x); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430 \u043c\u043e\u0451\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0441 Rust 1.44.0 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043f\u0435\u0447\u0430\u0442\u0430\u0435\u0442 &quot;x: 0&quot;, \u043d\u043e \u0442.\u043a. \u0435\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e, \u043d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0432\u0441\u0451 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e. \u042d\u0442\u043e \u043c\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u00ab\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438\u00bb (\u0432\u0435\u0434\u044c <code>unsafe<\/code> \u043a\u043e\u0434\u0430 \u0442\u0443\u0442 \u043d\u0435\u0442) \u2014 \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0430, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0434\u0435\u043b\u0430\u0435\u0442 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u0449\u0438. \u041c\u044b \u043e\u0442\u043c\u0435\u0447\u0430\u0435\u043c \u0438\u0445 \u0432 \u043d\u0430\u0448\u0435\u043c \u0442\u0440\u0435\u043a\u0435\u0440\u0435 \u043a\u0430\u043a <a href=\"https:\/\/github.com\/rust-lang\/rust\/issues?q=is%3Aissue+is%3Aopen+label%3A%22I-unsound+%F0%9F%92%A5%22\" rel=\"nofollow\">I-unsound<\/a>, \u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u043c\u0441\u044f \u043a \u043d\u0438\u043c \u043e\u0447\u0435\u043d\u044c \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u043e.<\/p>\n<p>  <\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u043d\u044f\u043b\u0430 \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u043b\u044f \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u044f\u0441\u043d\u043e, \u043a\u0430\u043a\u0438\u043c \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>as<\/code> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c &quot;\u043d\u0430\u0441\u044b\u0449\u0430\u044e\u0449\u0435\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435&quot; (saturating cast),<\/li>\n<li>\u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u043d\u043e\u0432\u043e\u0435 <code>unsafe<\/code> \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043c\u0430\u0441\u0441\u0438\u0432\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>array[i]<\/code> \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e <code>array<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 <code>i + 1<\/code> \u044d\u043b\u0435\u043c\u0435\u043d\u0442,<\/li>\n<li>\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>unsafe { array.get_unchecked(i) }<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043d\u0430\u0441\u044b\u0449\u0430\u044e\u0449\u0435\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0441\u043b\u0435\u0433\u043a\u0430 \u0438\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"rust\">fn cast(x: f32) -&gt; u8 {     x as u8 }  fn main() {     let too_big = 300.0;     let too_small = -100.0;     let nan = f32::NAN;      println!(&quot;too_big_casted = {}&quot;, cast(too_big));     println!(&quot;too_small_casted = {}&quot;, cast(too_small));     println!(&quot;not_a_number_casted = {}&quot;, cast(nan)); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u044b\u0432\u0435\u0434\u0435\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">too_big_casted = 255 too_small_casted = 0 not_a_number_casted = 0<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0430\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0434\u0430\u044e\u0442 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (\u0440\u0430\u0432\u043d\u043e\u0435 \u043d\u0443\u043b\u044e). NaN \u0432\u044b\u0434\u0430\u0451\u0442 \u043d\u043e\u043b\u044c.<\/p>\n<p>  <\/p>\n<p>\u0410 \u044d\u0442\u043e \u043d\u043e\u0432\u044b\u0439 API \u0434\u043b\u044f \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"rust\">let x: f32 = 1.0; let y: u8 = unsafe { x.to_int_unchecked() };<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u043e, \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0432 \u043a\u0440\u0430\u0439\u043d\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445. \u041a\u0430\u043a \u0438 \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u043a \u043c\u0430\u0441\u0441\u0438\u0432\u0443, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0447\u0430\u0441\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0434\u0435\u043b\u0430\u044f \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b\u043c\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0435 \u0438 \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438, \u0433\u0434\u0435 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<h2 id=\"stabilizaciya-funkcionalnyh-procedurnyh-makrosov-v-vyrazheniyah-shablonah-i-steytmentah\">\u0421\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u044b\u0445 \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432 \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445, \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445 \u0438 \u0441\u0442\u0435\u0439\u0442\u043c\u0435\u043d\u0442\u0430\u0445<\/h2>\n<p>  <\/p>\n<p>\u0412 <a href=\"https:\/\/blog.rust-lang.org\/2018\/10\/25\/Rust-1.30.0.html\" rel=\"nofollow\">Rust 1.30.0<\/a> \u043c\u044b \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u00ab\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u044b\u0435 \u043c\u0430\u043a\u0440\u043e\u0441\u044b \u0432 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u00bb. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/gitlab.gnome.org\/federico\/gnome-class\" rel=\"nofollow\"><code>\u043a\u0440\u0435\u0439\u0442 gnome-class<\/code><\/a>:<\/p>\n<p>  <\/p>\n<blockquote><p>Gnome-\u043a\u043b\u0430\u0441\u0441 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u044b\u0439 \u043c\u0430\u043a\u0440\u043e\u0441 \u0434\u043b\u044f Rust. \u0412\u043d\u0443\u0442\u0440\u0438 \u043c\u0430\u043a\u0440\u043e\u0441\u0430 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c Rust-\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043c\u0438\u043d\u0438-\u044f\u0437\u044b\u043a, \u0438\u043c\u0435\u044e\u0449\u0438\u0439 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u0432\u0430\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u044b GObject, \u0438\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u0441\u0438\u0433\u043d\u0430\u043b\u044b, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 GObject. \u0426\u0435\u043b\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0441 \u0432\u0430\u0448\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b.<\/p><\/blockquote>\n<p>\u042d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"rust\">gobject_gen! {     class MyClass: GObject {         foo: Cell&lt;i32&gt;,         bar: RefCell&lt;String&gt;,     }      impl MyClass {         virtual fn my_virtual_method(&amp;self, x: i32) {             ... do something with x ...         }     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 &quot;\u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430&quot; \u2014 \u044d\u0442\u043e \u043d\u0435\u043a\u0438\u0439 \u0436\u0430\u0440\u0433\u043e\u043d, \u043d\u043e \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e <code>gobject_gen!<\/code> \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0432 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<p>Rust 1.45.0 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u044b\u0435 \u043c\u0430\u043a\u0440\u043e\u0441\u044b \u0432 \u0442\u0440\u0451\u0445 \u043d\u043e\u0432\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445:<\/p>\n<p>  <\/p>\n<pre><code class=\"rust\">\/\/ \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u044b\u0439 \u043c\u0430\u043a\u0440\u043e\u0441 &quot;mac&quot;  mac!(); \/\/ \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u0442\u043e, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0440\u0430\u043d\u0435\u0435  \/\/ \u043d\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b 3 \u043d\u043e\u0432\u044b\u0445: fn main() {   let expr = mac!(); \/\/ \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0438    match expr {       mac!() =&gt; {} \/\/ \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435   }    mac!(); \/\/ \u0432 \u0441\u0442\u0435\u0439\u0442\u043c\u0435\u043d\u0442\u0435 }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0440\u043e\u0441\u044b \u0432 \u0431\u043e\u043b\u044c\u0448\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u0435\u0441\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430, \u043d\u043e \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u043f\u0440\u0438\u0447\u0438\u043d\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0434\u0430\u0432\u043d\u043e \u0436\u0434\u0430\u043b\u0438 \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e: <a href=\"https:\/\/rocket.rs\" rel=\"nofollow\">Rocket<\/a>. \u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0432\u0435\u0431-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a Rocket, \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u0432 \u0434\u0435\u043a\u0430\u0431\u0440\u0435 2016 \u0433\u043e\u0434\u0430, \u0447\u0430\u0441\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043b\u0443\u0447\u0448\u0438\u0445 \u0432\u0435\u0449\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0430 Rust. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 &quot;\u041f\u0440\u0438\u0432\u0435\u0442, \u043c\u0438\u0440&quot; \u0438\u0437 \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u0440\u0435\u043b\u0438\u0437\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"rust\">#[macro_use] extern crate rocket;  #[get(&quot;\/&lt;name&gt;\/&lt;age&gt;&quot;)] fn hello(name: String, age: u8) -&gt; String {     format!(&quot;Hello, {} year old named {}!&quot;, age, name) }  #[launch] fn rocket() -&gt; rocket::Rocket {     rocket::ignite().mount(&quot;\/hello&quot;, routes![hello]) }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043e \u044d\u0442\u043e\u0433\u043e \u0434\u043d\u044f Rocket \u0437\u0430\u0432\u0438\u0441\u0435\u043b\u0430 \u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u0437 \u043d\u043e\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0439 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438 \u0438 \u044d\u0440\u0433\u043e\u043d\u043e\u043c\u0438\u043a\u0438. \u041f\u043e \u0444\u0430\u043a\u0442\u0443, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0430 <a href=\"https:\/\/rocket.rs\/v0.4\" rel=\"nofollow\">\u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a>, \u0442\u043e\u0442 \u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440 \u0447\u0442\u043e \u0432\u044b\u0448\u0435 \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 Rocket \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <code>proc_macro_hygiene<\/code> \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043e\u043d\u043e \u043f\u043e\u043f\u0430\u0434\u0451\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u043f\u0443\u0441\u043a! <a href=\"https:\/\/github.com\/SergioBenitez\/Rocket\/issues\/19\" rel=\"nofollow\">\u0414\u0430\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/a> \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043d\u043e\u0447\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 Rocket. \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043d\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u044b \u0438 \u0433\u043e\u0442\u043e\u0432\u044b \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e!<\/p>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Rocket \u0432\u0441\u0451 \u0435\u0449\u0451 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435, \u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0430 \u0432\u044b\u0439\u0434\u0435\u0442, \u043c\u043d\u043e\u0433\u0438\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0447\u0435\u043d\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u044b \ud83d\ude42<\/p>\n<p>  <\/p>\n<h3 id=\"izmeneniya-v-standartnoy-biblioteke\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435<\/h3>\n<p>  <\/p>\n<p>\u0412 Rust 1.45.0 \u0431\u044b\u043b\u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/doc.rust-lang.org\/stable\/std\/sync\/struct.Arc.html#method.as_ptr\" rel=\"nofollow\"><code>Arc::as_ptr<\/code><\/a>,<\/li>\n<li><a href=\"https:\/\/doc.rust-lang.org\/stable\/std\/collections\/struct.BTreeMap.html#method.remove_entry\" rel=\"nofollow\"><code>BTreeMap::remove_entry<\/code><\/a>,<\/li>\n<li><a href=\"https:\/\/doc.rust-lang.org\/stable\/std\/rc\/struct.Rc.html#method.as_ptr\" rel=\"nofollow\"><code>Rc::as_ptr<\/code><\/a>,<\/li>\n<li><a href=\"https:\/\/doc.rust-lang.org\/stable\/std\/rc\/struct.Weak.html#method.as_ptr\" rel=\"nofollow\"><code>rc::Weak::as_ptr<\/code><\/a>,<\/li>\n<li><a href=\"https:\/\/doc.rust-lang.org\/stable\/std\/rc\/struct.Weak.html#method.from_raw\" rel=\"nofollow\"><code>rc::Weak::from_raw<\/code><\/a>,<\/li>\n<li><a href=\"https:\/\/doc.rust-lang.org\/stable\/std\/rc\/struct.Weak.html#method.into_raw\" rel=\"nofollow\"><code>rc::Weak::into_raw<\/code><\/a>,<\/li>\n<li><a href=\"https:\/\/doc.rust-lang.org\/stable\/std\/sync\/struct.Weak.html#method.as_ptr\" rel=\"nofollow\"><code>sync::Weak::as_ptr<\/code><\/a>,<\/li>\n<li><a href=\"https:\/\/doc.rust-lang.org\/stable\/std\/sync\/struct.Weak.html#method.from_raw\" rel=\"nofollow\"><code>sync::Weak::from_raw<\/code><\/a>,<\/li>\n<li><a href=\"https:\/\/doc.rust-lang.org\/stable\/std\/sync\/struct.Weak.html#method.into_raw\" rel=\"nofollow\"><code>sync::Weak::into_raw<\/code><\/a>,<\/li>\n<li><a href=\"https:\/\/doc.rust-lang.org\/stable\/std\/primitive.str.html#method.strip_prefix\" rel=\"nofollow\"><code>str::strip_prefix<\/code><\/a>,<\/li>\n<li><a href=\"https:\/\/doc.rust-lang.org\/stable\/std\/primitive.str.html#method.strip_suffix\" rel=\"nofollow\"><code>str::strip_suffix<\/code><\/a>,<\/li>\n<li><a href=\"https:\/\/doc.rust-lang.org\/stable\/std\/char\/constant.UNICODE_VERSION.html\" rel=\"nofollow\"><code>char::UNICODE_VERSION<\/code><\/a>,<\/li>\n<li><a href=\"https:\/\/doc.rust-lang.org\/stable\/proc_macro\/struct.Span.html#method.resolved_at\" rel=\"nofollow\"><code>Span::resolved_at<\/code><\/a>,<\/li>\n<li><a href=\"https:\/\/doc.rust-lang.org\/stable\/proc_macro\/struct.Span.html#method.located_at\" rel=\"nofollow\"><code>Span::located_at<\/code><\/a>,<\/li>\n<li><a href=\"https:\/\/doc.rust-lang.org\/stable\/proc_macro\/struct.Span.html#method.mixed_site\" rel=\"nofollow\"><code>Span::mixed_site<\/code><\/a>,<\/li>\n<li><a href=\"https:\/\/doc.rust-lang.org\/std\/os\/unix\/process\/trait.CommandExt.html#tymethod.arg0\" rel=\"nofollow\"><code>unix::process::CommandExt::arg0<\/code><\/a>.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/github.com\/rust-lang\/rust\/pull\/72413\/\" rel=\"nofollow\"><code>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c char<\/code> \u0441 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430\u043c\u0438<\/a> \u0434\u043b\u044f \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"rust\">for ch in 'a'..='z' {     print!(&quot;{}&quot;, ch); } println!(); \/\/ \u0412\u044b\u0432\u0435\u0434\u0435\u0442 &quot;abcdefghijklmnopqrstuvwxyz&quot;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 <a href=\"https:\/\/github.com\/rust-lang\/rust\/blob\/master\/RELEASES.md#version-1450-2020-07-16\" rel=\"nofollow\">\u0434\u0435\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044f\u0445 \u043a \u0432\u044b\u043f\u0443\u0441\u043a\u0443<\/a>.<\/p>\n<p>  <\/p>\n<h3 id=\"drugie-izmeneniya\">\u0414\u0440\u0443\u0433\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f<\/h3>\n<p>  <\/p>\n<p><a href=\"https:\/\/github.com\/rust-lang\/rust\/blob\/master\/RELEASES.md#version-1450-2020-07-16\" rel=\"nofollow\">\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441<\/a>, <a href=\"https:\/\/github.com\/rust-lang\/cargo\/blob\/master\/CHANGELOG.md#cargo-145-2020-07-16\" rel=\"nofollow\">\u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 Cargo<\/a> \u0438 <a href=\"https:\/\/github.com\/rust-lang\/rust-clippy\/blob\/master\/CHANGELOG.md#rust-145\" rel=\"nofollow\">\u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 Clippy<\/a> \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<h2 id=\"uchastniki-1450\">\u0423\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 1.45.0<\/h2>\n<p>  <\/p>\n<p>\u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043b\u044e\u0434\u0435\u0439 \u0441\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0432\u043c\u0435\u0441\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c Rust 1.45.0. \u041c\u044b \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0431\u0435\u0437 \u0432\u0441\u0435\u0445 \u0432\u0430\u0441, <a href=\"https:\/\/thanks.rust-lang.org\/rust\/1.45.0\/\" rel=\"nofollow\">\u0441\u043f\u0430\u0441\u0438\u0431\u043e<\/a>!<\/p>\n<p>  <\/p>\n<h2 id=\"ot-perevodchikov\">\u041e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u043e\u0432<\/h2>\n<p>  <\/p>\n<p>\u0421 \u043b\u044e\u0431\u044b\u043c\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u043f\u043e \u044f\u0437\u044b\u043a\u0443 Rust \u0432\u0430\u043c \u0441\u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0432 <a href=\"https:\/\/t.me\/rustlang_ru\" rel=\"nofollow\">\u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u043c \u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c-\u0447\u0430\u0442\u0435<\/a> \u0438\u043b\u0438 \u0436\u0435 \u0432 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u043c <a href=\"https:\/\/t.me\/rust_beginners_ru\" rel=\"nofollow\">\u0447\u0430\u0442\u0435 \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432<\/a>. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430\u043c \u0438\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0442\u044c \u0441 \u043d\u0438\u043c\u0438, \u0442\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0439\u0442\u0435\u0441\u044c \u0432 <a href=\"https:\/\/t.me\/rustlang_ru_translations\" rel=\"nofollow\">\u0447\u0430\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u043e\u0432<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u044b\u043c\u0438 \u0443\u0441\u0438\u043b\u0438\u044f\u043c\u0438 \u043f\u0435\u0440\u0435\u0432\u0435\u043b\u0438 <a href=\"https:\/\/habr.com\/ru\/users\/nlinker\/\" class=\"user_link\">nlinker<\/a>, <a href=\"https:\/\/habr.com\/ru\/users\/funkill\/\" class=\"user_link\">funkill<\/a>, <a href=\"https:\/\/habr.com\/ru\/users\/hirrolot\/\" class=\"user_link\">Hirrolot<\/a> \u0438 <a href=\"https:\/\/habr.com\/ru\/users\/blandger\/\" class=\"user_link\">blandger<\/a>.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/511546\/\"> https:\/\/habr.com\/ru\/post\/511546\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/511546\/\">\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 Rust \u0440\u0430\u0434\u0430 \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u043e \u0432\u044b\u043f\u0443\u0441\u043a\u0435 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438, 1.45.0. Rust \u2014 \u044d\u0442\u043e \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0435 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Rust \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 <code>rustup<\/code>, \u0442\u043e \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e \u0432\u0435\u0440\u0441\u0438\u0438 1.45.0 \u0432\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">rustup update stable<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0451 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d <code>rustup<\/code>, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 <a href=\"https:\/\/www.rust-lang.org\/install.html\" rel=\"nofollow\">\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0433\u043e<\/a> \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/github.com\/rust-lang\/rust\/blob\/master\/RELEASES.md#version-1450-2020-07-16\" rel=\"nofollow\">\u043d\u0430 GitHub<\/a>.<\/p>\n<p>  <\/p>\n<h2 id=\"chto-voshlo-v-stabilnuyu-versiyu-1450\">\u0427\u0442\u043e \u0432\u043e\u0448\u043b\u043e \u0432 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e 1.45.0<\/h2>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u043f\u0443\u0441\u043a \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f: \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0432\u043d\u0438\u0445 \u0434\u0435\u0444\u0435\u043a\u0442\u043e\u0432 \u043f\u0440\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u0446\u0435\u043b\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0444\u0438\u0447, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u0438\u043d \u0432\u0435\u0431-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0441\u043c\u043e\u0433 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u043c Rust.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-307154","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/307154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=307154"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/307154\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=307154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=307154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=307154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}