Chapter 4. Changes in Rust Toolset in Red Hat Developer Tools 2018.1
This chapter lists some notable changes in Rust Toolset since its previous release.
4.1. Rust Copy linkLink copied to clipboard!
Rust has been updated from version 1.20.0 to 1.22.1. Notable changes include:
-
The
Optiontype implements theTrytrait for the?operator. Assignment operations have been implemented for references on the right hand side of assignment:
x = &1; y += x;
x = &1; y += x;Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Types implementing the
Droptrait can beconstorstatic. - Static references to literals are allowed.
-
Arrays and tuples of
Clonetypes implement theClonetrait themselves. -
Tag values of enumerations can be read with the
std::mem::discriminant()function. -
The
Iterator::for_each()function has been added to apply a function to all items of an iterator. -
Functions
min()andmax()have been added to theOrdtrait. - The default amount of code generation units for debug builds has been changed to 16.
4.2. cargo Copy linkLink copied to clipboard!
The cargo tool has been updated from version 0.21.1 to 0.23.0. Notable changes include:
-
Support for specifying multiple crates at once has been added to the
cargo installcommand. -
Support for enhanced patterns has been added to the
includeandexcludefields ofCargo.tomlproject manifest files. -
Support for overriding parts of the crate dependency graph with the
[patch]section ofCargo.tomlfiles has been added. - Support for using dependencies vendored from git repositories has been added.
4.3. cargo-vendor Copy linkLink copied to clipboard!
The cargo-vendor plugin has been updated from version 0.1.12 to 0.1.13. Notable changes include:
-
An option
--disallow-duplicateshas been added to prevent duplication of vendored dependencies. Error messages are printed to the standard error output (
stderr).Note that this allows redirecting the output of the
cargo vendorcommand into a file for direct use.
4.4. Known Issues Copy linkLink copied to clipboard!
The outdated
rust-toolset-7-dockerfilespackage has been removed from Rust Toolset 7.1. The package is no longer present in fresh installations, but it remains installed on a system where Rust Toolset 7.0 is updated to version 7.1. To work around this problem, remove the package manually by using this command:yum remove rust-toolset-7-dockerfiles
# yum remove rust-toolset-7-dockerfilesCopy to Clipboard Copied! Toggle word wrap Toggle overflow