Date: a month ago   Category: Hi-Tech

Release of the Rust 2018 (1.31) programming language


The release of language of system programming of Rust 1.31 developed by the Mozilla project is presented. Except the regular version number release also обознечен as Rust 2018 is also presented as the most important release from the moment of formation of version 1.0 in 2015. Within release work on consolidation of all improvements and changes prepared for the last three years in the form of a complete product is carried out. Rust 2018 will act as a basis for increasing functionality in the next three years, how the release of Rust 1.0 became basis for development of language in last three years.

For division of incompatible functionality is entered the concept of editions of language. Editions with numbers "2015" and "2018" can be used as a tag for definition of a cut of a condition of the language (the field "edition" in section of "[package]" of metadata of cargo-packages) affecting only incompatible changes.

the Editorial office "2015" includes the functionality which is already stabilized by a present situation and all future changes which are not breaking compatibility, and the editorial office "2018" in addition covers the innovations breaking compatibility offered in flow output 1.31 and approved for realization in the future. Except the language of edition also consider a condition of tools and documentation (for example, modules of support of IDE, rustfmt and Clippy are entered into editorial offices 2018 in structure).

the 2015 Mode allows to keep full compatibility with the existing applications without introduction of the changes breaking compatibility. To activate the 2018 mode makes sense to involve if desired in the code future opportunities of language, such as yet not implemented concepts of async/await and "try". As the present possibility can demand updating of the code of the old programs written before reservation of the words async, await and TRY, the specified keywords are already introduced in the editorial office "2018" in spite of the fact that the functionality is not added yet.

In other words, in release of Rust 1.31 is in advance made fixing of keywords for yet not the ready innovations breaking the return compatibility, and expected in the next three years. At the same time the future changes and innovations which are not leading to violation of compatibility in process of the emergence will be available to packages irrespective of the chosen edition - specific to the editorial office "2018" and not getting to the editorial office "2015" will become only the changes breaking compatibility.

Main innovations of Rust 1.31: The NLL equipment (Non-Lexical Lifetimes) which expanded a system of accounting of time of life of the borrowed variables is realized. Instead of a life time binding at the lexical level, NLL carries out the accounting at the level of a set of indexes in the column of a stream of performance. New approach allows to increase quality of check of loan of variables (borrow checker) and to allow performance of some types of the correct code which use led to a mistake conclusion earlier. The new behavior significantly simplifies debugging. For example:

of fn main { let mut x = 5; let y = &x; let z = &mut x; println! ("y: { }",

URL:




Today

just now

In the Kherson region of Ukraine bordering on the Russian Crimea barbaric deforestation which were landed here in Soviet period continues. Military who are pulled together to the region under the pretext of threat of approach of the Russian Federation from the peninsula also are in large quantities connected to process. in the blog reports about...

just now

The head of the National Bank of Ukraine Yakov Smoly announced release into the stream of commerce of coins face values of 5 and 10 hryvnias. New "patches" can appear this year, metal "chervonets" - n...

just now

Russia can get support of the African countries in the UN concerning Donbass and the Crimea. with alarm writes About it the Ukrainian edition "Zerkalo Nedeli" today, commenting on the forthcoming in...

just now

Norwegian Tarjei Bie said that he on the last circle of relay at the World Cup stage in Ruhpolding felt as the junior. the 30-year-old Norwegian allowed two misses on a rack. - the Relay is a diff...

just now

For nine years there was an informal video channel of Irina Allegrova on a video hosting of YouTube. 133433 subscribers, hundreds of rare archive video records, 124,484,538 viewings... Now to all this...

just now

Several dozens of people in an environment of police opposed far right. Several dozens of left youth carried out at Mykhailivs'ka Square in Kiev a traditional action which is organized annually in d...

just now

In total in a year the principles of economic policy in the country can be reversed, and not to the best. Thinking of economy, Ukrainians, as a rule, ask a question: what will be with a rate of hryv...

just now

The scientists working in the University of British Columbia managed to grow up in a cup Understand vessels of the person from stem cells. In addition, they found out that they can be grown up and in...