{"id":300139,"date":"2020-03-14T21:00:17","date_gmt":"2020-03-14T21:00:17","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=300139"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=300139","title":{"rendered":"\u0412\u044b\u043f\u0443\u0441\u043a Rust 1.42.0: \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0441\u0440\u0435\u0437\u043e\u0432 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e \u043f\u0430\u043d\u0438\u043a\u0435"},"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\/491956\/\">\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.42.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.42.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-1420-2020-03-12\" rel=\"nofollow\">\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u043a \u0432\u044b\u043f\u0443\u0441\u043a\u0443<\/a> \u043d\u0430 GitHub.<\/p>\n<p>  <\/p>\n<h2 id=\"chto-voshlo-v-stabilnuyu-versiyu-1420\">\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.42.0<\/h2>\n<p>  <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f\u043c\u0438 Rust 1.42.0 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e \u043f\u0430\u043d\u0438\u043a\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 <code>unwrap<\/code>, \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0441\u0440\u0435\u0437\u043e\u0432, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u043c <code>Error::description<\/code> \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435. \u0421\u043c\u043e\u0442\u0440\u0438\u0442\u0435 <a href=\"https:\/\/github.com\/rust-lang\/rust\/blob\/master\/RELEASES.md#version-1420-2020-03-12\" rel=\"nofollow\">\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u0443\u0441\u043a\u0430<\/a> \u0434\u043b\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h3 id=\"soobscheniya-o-panike-iz-option-i-result-teper-vklyuchayut-poleznye-nomera-strok\">\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e \u043f\u0430\u043d\u0438\u043a\u0435 \u0438\u0437 <code>Option<\/code> \u0438 <code>Result<\/code> \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u0441\u0442\u0440\u043e\u043a<\/h3>\n<p>  <\/p>\n<p>\u0412 Rust 1.41.1 \u0432\u044b\u0437\u043e\u0432 <code>unwrap()<\/code> \u0434\u043b\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>Option::None<\/code> \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u043b\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', \/...\/src\/libcore\/macros\/mod.rs:15:40<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u043d\u043e\u043c\u0435\u0440\u0430 \u0441\u0442\u0440\u043e\u043a \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u0445 \u043e \u043f\u0430\u043d\u0438\u043a\u0435, \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0435\u043c\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438 <code>unwrap_err<\/code>, <code>expect<\/code> \u0438 <code>expect_err<\/code>, \u043a\u0430\u043a \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0434\u043b\u044f \u0442\u0438\u043f\u0430 <code>Result<\/code>, \u0442\u043e\u0436\u0435 \u0441\u0441\u044b\u043b\u0430\u043b\u0438\u0441\u044c \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 <code>core<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0412 Rust 1.42.0 \u0432\u0441\u0435 \u044d\u0442\u0438 \u0432\u043e\u0441\u0435\u043c\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u044e\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e \u043f\u0430\u043d\u0438\u043a\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0442\u0430\u043a\u0438\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u0441\u0442\u0440\u043e\u043a, \u043e\u0442\u043a\u0443\u0434\u0430 \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u0432\u044b\u0437\u0432\u0430\u043d\u044b. \u041d\u043e\u0432\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src\/main.rs:2:5<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 <code>unwrap<\/code> \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0441\u044f \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0435 2 \u0432 \u0444\u0430\u0439\u043b\u0435 <code>src\/main.rs<\/code>.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u043b\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 <code>#[track_caller]<\/code>. \u042d\u0442\u0430 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0435\u0449\u0451 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 Rust, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0443\u0436\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u0432 \u0441\u0432\u043e\u0451\u043c \u043a\u043e\u0434\u0435, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441 <a href=\"https:\/\/github.com\/rust-lang\/rust\/issues\/47809\" rel=\"nofollow\">\u0432 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435<\/a>.<\/p>\n<p>  <\/p>\n<h3 id=\"obrazec-po-chasti-sreza\">\u041e\u0431\u0440\u0430\u0437\u0435\u0446 \u043f\u043e \u0447\u0430\u0441\u0442\u0438 \u0441\u0440\u0435\u0437\u0430<\/h3>\n<p>  <\/p>\n<p>\u0412 Rust 1.26 \u043c\u044b \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 &quot;<a href=\"https:\/\/blog.rust-lang.org\/2018\/05\/10\/Rust-1.26.html#basic-slice-patterns\" rel=\"nofollow\">\u043e\u0431\u0440\u0430\u0437\u0446\u044b \u043f\u043e \u0441\u0440\u0435\u0437\u0430\u043c<\/a>&quot;, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441 \u043e\u0431\u0440\u0430\u0437\u0446\u0430\u043c\u0438 \u043d\u0430 \u0441\u0440\u0435\u0437\u0430\u0445. \u0422\u0430\u043a\u0438\u0435 \u043e\u0431\u0440\u0430\u0437\u0446\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"rust\">fn foo(words: &amp;[&amp;str]) {     match words {         [] =&gt; println!(&quot;empty slice!&quot;),         [one] =&gt; println!(&quot;one element: {:?}&quot;, one),         [one, two] =&gt; println!(&quot;two elements: {:?} {:?}&quot;, one, two),         _ =&gt; println!(&quot;I'm not sure how many elements!&quot;),     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043e \u0441\u0440\u0435\u0437\u0430\u043c\u0438, \u043d\u043e \u0442\u0430\u043a\u0438\u0435 \u043e\u0431\u0440\u0430\u0437\u0446\u044b \u0431\u044b\u043b\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u043c\u0438. \u0412\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0441\u0440\u0435\u0437\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0438 \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d\u044b \u0431\u044b\u043b\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u043b\u0443\u0447\u0430\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0441\u0440\u0435\u0437\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u0438.<\/p>\n<p>  <\/p>\n<p>\u0412 Rust 1.42 \u0443 \u043d\u0430\u0441 \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/rust-lang\/rust\/pull\/67935\/\" rel=\"nofollow\">\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441 \u0447\u0430\u0441\u0442\u044c\u044e \u0441\u0440\u0435\u0437\u0430<\/a>:<\/p>\n<p>  <\/p>\n<pre><code class=\"rust\">fn foo(words: &amp;[&amp;str]) {     match words {         [&quot;Hello&quot;, &quot;World&quot;, &quot;!&quot;, ..] =&gt; println!(&quot;Hello World!&quot;),         [&quot;Foo&quot;, &quot;Bar&quot;, ..] =&gt; println!(&quot;Baz&quot;),         rest =&gt; println!(&quot;{:?}&quot;, rest),     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 <code>..<\/code> \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f &quot;\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437\u0435\u0446&quot; (rest pattern), \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0441\u0440\u0435\u0437\u0430. \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0447\u0443\u0442\u044c \u0432\u044b\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437\u0435\u0446 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0440\u0435\u0437\u0430, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043e\u0431\u0440\u0430\u0437\u0446\u044b \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"rust\">fn foo(words: &amp;[&amp;str]) {     match words {         \/\/ \u0418\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0451, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c &quot;!&quot;.         [.., &quot;!&quot;] =&gt; println!(&quot;!!!&quot;),          \/\/ `start` - \u044d\u0442\u043e \u0441\u0440\u0435\u0437 \u0438\u0437 \u0432\u0441\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u0440\u043e\u043c\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c &quot;z&quot;.         [start @ .., &quot;z&quot;] =&gt; println!(&quot;starts with: {:?}&quot;, start),          \/\/ `end` - \u044d\u0442\u043e \u0441\u0440\u0435\u0437 \u0438\u0437 \u0432\u0441\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u0440\u043e\u043c\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c &quot;a&quot;.         [&quot;a&quot;, end @ ..] =&gt; println!(&quot;ends with: {:?}&quot;, end),          rest =&gt; println!(&quot;{:?}&quot;, rest),     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435, \u043c\u044b \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b\u0438 <a href=\"https:\/\/blog.rust-lang.org\/inside-rust\/2020\/03\/04\/recent-future-pattern-matching-improvements.html\" rel=\"nofollow\">\u0441\u0442\u0430\u0442\u044c\u044e \u0432 \u0431\u043b\u043e\u0433\u0435 Inside Rust<\/a> \u0441 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435\u043c \u044d\u0442\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441 \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u044f\u0437\u044b\u043a\u0430 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c! \u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0431 \u043e\u0431\u0440\u0430\u0437\u0446\u0430\u0445 \u043f\u043e \u0441\u0440\u0435\u0437\u0430\u043c \u0432 <a href=\"https:\/\/thomashartmann.dev\/blog\/feature(slice_patterns)\/\" rel=\"nofollow\">\u0441\u0442\u0430\u0442\u044c\u0435 \u0422\u043e\u043c\u0430\u0441\u0430 \u0425\u0430\u0440\u0442\u043c\u0430\u043d\u043d\u0430<\/a>.<\/p>\n<p>  <\/p>\n<h3 id=\"matches\"><a href=\"https:\/\/doc.rust-lang.org\/stable\/std\/macro.matches.html\" rel=\"nofollow\"><code>matches!<\/code><\/a><\/h3>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0442 \u0440\u0435\u043b\u0438\u0437 \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u043c\u0430\u043a\u0440\u043e\u0441, <a href=\"https:\/\/doc.rust-lang.org\/nightly\/std\/macro.matches.html\" rel=\"nofollow\"><code>matches!<\/code><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438 \u043e\u0431\u0440\u0430\u0437\u0435\u0446, \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>true<\/code>, \u0435\u0441\u043b\u0438 \u043e\u0431\u0440\u0430\u0437\u0435\u0446 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0441 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"rust\">\/\/ \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 match: match self.partial_cmp(other) {     Some(Less) =&gt; true,     _ =&gt; false, }  \/\/ \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0430\u043a\u0440\u043e\u0441 `matches!`: matches!(self.partial_cmp(other), Some(Less))<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u0446\u044b \u0441 <code>|<\/code> \u0438 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f <code>if<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"rust\">let foo = 'f'; assert!(matches!(foo, 'A'..='Z' | 'a'..='z'));  let bar = Some(4); assert!(matches!(bar, Some(x) if x &gt; 2));<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"use-proc_macrotokenstream-teper-rabotaet\"><code>use proc_macro::TokenStream;<\/code> \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/h3>\n<p>  <\/p>\n<p>\u0412 Rust 2018 \u043c\u044b <a href=\"https:\/\/doc.rust-lang.org\/stable\/edition-guide\/rust-2018\/module-system\/path-clarity.html#no-more-extern-crate\" rel=\"nofollow\"><code>\u0438\u0437\u0431\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u043e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 extern crate<\/code><\/a>. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u044b\u0435 \u043c\u0430\u043a\u0440\u043e\u0441\u044b \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u044b\u043c\u0438 \u0438, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u044b\u0439 \u043c\u0430\u043a\u0440\u043e\u0441, \u0432\u0430\u043c \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c <code>extern crate proc_macro;<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0440\u0435\u043b\u0438\u0437\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 Cargo, <a href=\"https:\/\/github.com\/rust-lang\/rust\/pull\/67887\/\" rel=\"nofollow\"><code>\u0438 \u0435\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0441 \u0438\u0437\u0434\u0430\u043d\u0438\u0435\u043c 2018, \u0432\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430 \u044d\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u0430; \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c use<\/code> \u043f\u043e\u0434\u043e\u0431\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0443 \u0438\u0437 \u043b\u044e\u0431\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043a\u0440\u0435\u0439\u0442\u0430<\/a>. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u044b, \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 <code>use proc_macro::TokenStream;<\/code>, \u044d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 <code>extern crate proc_macro;<\/code> \u0438 \u0432\u0430\u0448 \u043a\u043e\u0434 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0447\u0438\u043c. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0445\u043e\u0442\u044c \u0438 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0435, \u043d\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u044b\u0445 \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432 \u0431\u043e\u043b\u0435\u0435 \u043e\u0440\u0433\u0430\u043d\u0438\u0447\u043d\u044b\u043c \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a \u043e\u0431\u044b\u0447\u043d\u043e\u043c\u0443 \u043a\u043e\u0434\u0443.<\/p>\n<p>  <\/p>\n<h3 id=\"biblioteki\">\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/h3>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/rust-lang\/rust\/pull\/68348\/\" rel=\"nofollow\"><code>iter::Empty&lt;T&gt;<\/code> \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 <code>Send<\/code> \u0438 <code>Sync<\/code> \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e <code>T<\/code>.<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/rust-lang\/rust\/pull\/67935\/\" rel=\"nofollow\"><code>Pin::{map_unchecked, map_unchecked_mut}<\/code> \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0439 \u0442\u0438\u043f, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f\u0430\u0436 <code>Sized<\/code>.<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/rust-lang\/rust\/pull\/67233\/\" rel=\"nofollow\"><code>io::Cursor<\/code> \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0442\u0438\u043f\u0430\u0436\u0438 <code>PartialEq<\/code> \u0438 <code>Eq<\/code>.<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/rust-lang\/rust\/pull\/66254\/\" rel=\"nofollow\"><code>Layout::new<\/code> \u0442\u0435\u043f\u0435\u0440\u044c <code>const<\/code>.<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<h3 id=\"stabilizirovannye-api\">\u0421\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 API<\/h3>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/doc.rust-lang.org\/stable\/std\/sync\/struct.Condvar.html#method.wait_while\" rel=\"nofollow\"><code>CondVar::wait_while<\/code><\/a> \u0438 <a href=\"https:\/\/doc.rust-lang.org\/stable\/std\/sync\/struct.Condvar.html#method.wait_timeout_while\" rel=\"nofollow\"><code>CondVar::wait_timeout_while<\/code><\/a><\/li>\n<li><a href=\"https:\/\/doc.rust-lang.org\/stable\/std\/fmt\/struct.DebugMap.html#method.key\" rel=\"nofollow\"><code>DebugMap::key<\/code><\/a> \u0438 <a href=\"https:\/\/doc.rust-lang.org\/stable\/std\/fmt\/struct.DebugMap.html#method.value\" rel=\"nofollow\"><code>DebugMap::value<\/code><\/a><\/li>\n<li><a href=\"https:\/\/doc.rust-lang.org\/stable\/std\/mem\/struct.ManuallyDrop.html#method.take\" rel=\"nofollow\"><code>ManuallyDrop::take<\/code><\/a><\/li>\n<li><a href=\"https:\/\/doc.rust-lang.org\/stable\/std\/ptr\/fn.slice_from_raw_parts_mut.html\" rel=\"nofollow\"><code>ptr::slice_from_raw_parts_mut<\/code><\/a> \u0438 <a href=\"https:\/\/doc.rust-lang.org\/stable\/std\/ptr\/fn.slice_from_raw_parts.html\" rel=\"nofollow\"><code>ptr::slice_from_raw_parts<\/code><\/a><\/li>\n<\/ul>\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>\u0415\u0441\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0440\u0435\u043b\u0438\u0437\u0435 Rust 1.42.0: \u0438\u0445 \u043f\u043e\u043b\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432 <a href=\"https:\/\/github.com\/rust-lang\/rust\/blob\/master\/RELEASES.md#version-1420-2020-03-12\" rel=\"nofollow\">Rust<\/a> \u0438 <a href=\"https:\/\/github.com\/rust-lang\/rust\/pull\/67131\/\" rel=\"nofollow\">Cargo<\/a>.<\/p>\n<p>  <\/p>\n<h3 id=\"zamechaniya-o-sovmestimosti\">\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438<\/h3>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0440\u0435\u043b\u0438\u0437\u0435 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043f\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438: \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u0438 \u043f\u043e\u043d\u0438\u0436\u0435\u043d\u0438\u0435 32-\u0431\u0438\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Apple \u0434\u043e \u0443\u0440\u043e\u0432\u043d\u044f 3.<\/p>\n<p>  <\/p>\n<h4 id=\"errordescription-ustarel\">Error::Description \u0443\u0441\u0442\u0430\u0440\u0435\u043b<\/h4>\n<p>  <\/p>\n<p>\u041e\u0448\u0438\u0431\u043a\u0438 \u0438\u043d\u043e\u0433\u0434\u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u044e\u0442\u0441\u044f. <code>Error::description<\/code> \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0434\u043d\u0430 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u043e\u0439 \u043c\u0435\u0442\u043e\u0434\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"rust\">fn description(&amp;self) -&gt; &amp;str<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u0435\u0442\u043e\u0434 <code>description<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>&amp;str<\/code>, \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043d \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0442\u0430\u043a \u043f\u043e\u043b\u0435\u0437\u0435\u043d, \u043a\u0430\u043a \u043c\u044b \u043e\u0436\u0438\u0434\u0430\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u043d\u044c\u0448\u0435. \u0422\u043e \u0435\u0441\u0442\u044c \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>Error<\/code> \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e; \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0435\u043b\u0438, \u0441\u043a\u0430\u0436\u0435\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0438 \u0434\u0440\u0443\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438, \u044d\u0442\u043e \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e: \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c <code>String<\/code>. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e, \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Rust \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u0438\u043f\u044b \u043e\u0448\u0438\u0431\u043e\u043a \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0442\u0438\u043f\u0430\u0436\u0438 <code>Display<\/code>\/<code>Debug<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0442 API \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Rust 1.0. \u041c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0432 \u044d\u0442\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f: \u0435\u0449\u0451 \u0432 Rust 1.27, \u043c\u044b <a href=\"https:\/\/github.com\/rust-lang\/rust\/pull\/50163\" rel=\"nofollow\">\u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438 \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 &quot;\u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u043c&quot;<\/a>. \u0427\u0442\u043e \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u043b\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u042d\u0442\u043e \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0442\u0438\u043f\u0430\u0436 <code>Error<\/code>. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0440\u0435\u043b\u0438\u0437\u0435 <a href=\"https:\/\/github.com\/rust-lang\/rust\/pull\/68122\/\" rel=\"nofollow\">\u043c\u044b <em>\u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435<\/em> \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438 \u0435\u0433\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u043c<\/a>, \u0438 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u044f\u043b\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0448\u0430\u0433\u0438, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u043b\u0430\u0431\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0442\u0438\u043f\u0430\u0436\u0430 <code>Error<\/code>. \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u044b \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0435\u043c\u0443 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044e \u043e \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0442\u043e \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <code>description<\/code> \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0451\u043d, \u0438 \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u043c \u2014 \u044d\u0442\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435, \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445.<\/p>\n<p>  <\/p>\n<h4 id=\"ponizheniya-prioriteta-dlya-32-bitnoy-platformy-apple\">\u041f\u043e\u043d\u0438\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0430 \u0434\u043b\u044f 32-\u0431\u0438\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Apple<\/h4>\n<p>  <\/p>\n<p>Apple \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 32-\u0431\u0438\u0442\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0442\u0430\u043a \u0447\u0442\u043e \u0438 \u043c\u044b \u0442\u043e\u0436\u0435 \u043d\u0435 \u0445\u043e\u0442\u0438\u043c. \u042d\u0442\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0431\u044b\u043b\u0430 \u043f\u043e\u043d\u0438\u0436\u0435\u043d\u0430 \u0434\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0423\u0440\u043e\u0432\u043d\u044f 3. \u0414\u0435\u0442\u0430\u043b\u044c\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u0447\u0438\u0442\u0430\u0439\u0442\u0435 <a href=\"https:\/\/blog.rust-lang.org\/2020\/01\/03\/reducing-support-for-32-bit-apple-targets.html\" rel=\"nofollow\">\u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e<\/a> \u0432\u044b\u0448\u0435\u0434\u0448\u0443\u044e \u0435\u0449\u0451 \u0432 \u042f\u043d\u0432\u0430\u0440\u0435, \u0442\u0430\u043c \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u044b \u0432\u0441\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  <\/p>\n<h2 id=\"uchastniki-1420\">\u0423\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 1.42.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.42.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.42.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>.<\/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\/andreevlex\/\" class=\"user_link\">andreevlex<\/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\/nlinker\/\" class=\"user_link\">nlinker<\/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\/491956\/\"> https:\/\/habr.com\/ru\/post\/491956\/<\/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\/491956\/\">\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.42.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.42.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-1420-2020-03-12\" rel=\"nofollow\">\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u043a \u0432\u044b\u043f\u0443\u0441\u043a\u0443<\/a> \u043d\u0430 GitHub.<\/p>\n<p>  <\/p>\n<h2 id=\"chto-voshlo-v-stabilnuyu-versiyu-1420\">\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.42.0<\/h2>\n<p>  <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f\u043c\u0438 Rust 1.42.0 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e \u043f\u0430\u043d\u0438\u043a\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 <code>unwrap<\/code>, \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0441\u0440\u0435\u0437\u043e\u0432, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u043c <code>Error::description<\/code> \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435. \u0421\u043c\u043e\u0442\u0440\u0438\u0442\u0435 <a href=\"https:\/\/github.com\/rust-lang\/rust\/blob\/master\/RELEASES.md#version-1420-2020-03-12\" rel=\"nofollow\">\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u0443\u0441\u043a\u0430<\/a> \u0434\u043b\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/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-300139","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/300139","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=300139"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/300139\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=300139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=300139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=300139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}