Recommended update for rust, rust1.61

Announcement ID: SUSE-RU-2022:2387-1
Rating: moderate
References:
Affected Products:
  • Development Tools Module 15-SP3
  • Development Tools Module 15-SP4
  • openSUSE Leap 15.3
  • openSUSE Leap 15.4
  • SUSE Linux Enterprise Desktop 15 SP3
  • SUSE Linux Enterprise Desktop 15 SP4
  • SUSE Linux Enterprise High Performance Computing 15 SP3
  • SUSE Linux Enterprise High Performance Computing 15 SP4
  • SUSE Linux Enterprise Real Time 15 SP3
  • SUSE Linux Enterprise Real Time 15 SP4
  • SUSE Linux Enterprise Server 15 SP3
  • SUSE Linux Enterprise Server 15 SP3 Business Critical Linux 15-SP3
  • SUSE Linux Enterprise Server 15 SP4
  • SUSE Linux Enterprise Server for SAP Applications 15 SP3
  • SUSE Linux Enterprise Server for SAP Applications 15 SP4
  • SUSE Manager Proxy 4.2
  • SUSE Manager Proxy 4.3
  • SUSE Manager Retail Branch Server 4.2
  • SUSE Manager Retail Branch Server 4.3
  • SUSE Manager Server 4.2
  • SUSE Manager Server 4.3

An update that can now be installed.

Description:

This update for rust, rust1.61 fixes the following issues:

This updates ships rust1.61.

Version 1.61.0 (2022-05-19)

Language

  • const fn signatures can now include generic trait bounds
  • const fn signatures can now use impl Trait in argument and return position
  • Function pointers can now be created, cast, and passed around in a const fn
  • Recursive calls can now set the value of a function's opaque impl Trait return type

Compiler

  • Linking modifier syntax in #[link] attributes and on the command line, as well as the whole-archive modifier specifically, are now supported
  • The char type is now described as UTF-32 in debuginfo
  • he [#[target_feature]][target_feature] attribute [can now be used with aarch64 features
  • X86 [#[target_feature = "adx"] is now stable

Libraries

  • ManuallyDrop<T> is now documented to have the same layout as T
  • #[ignore = "…"] messages are printed when running tests
  • Consistently show absent stdio handles on Windows as NULL handles
  • Make std::io::stdio::lock() return 'static handles. Previously, the creation of locked handles to stdin/stdout/stderr would borrow the handles being locked, which prevented writing let out = std::io::stdout().lock(); because out would outlive the return value of stdout(). Such code now works, eliminating a common pitfall that affected many Rust users.
  • Vec::from_raw_parts is now less restrictive about its inputs
  • std::thread::available_parallelism now takes cgroup quotas into account. Since available_parallelism is often used to create a thread pool for parallel computation, which may be CPU-bound for performance, available_parallelism will return a value consistent with the ability to use that many threads continuously, if possible. For instance, in a container with 8 virtual CPUs but quotas only allowing for 50% usage, available_parallelism will return 4.

Stabilized APIs

  • Pin::static_mut
  • Pin::static_ref
  • Vec::retain_mut
  • VecDeque::retain_mut
  • Write for Cursor<[u8; N]>
  • std::os::unix::net::SocketAddr::from_pathname
  • std::process::ExitCode and std::process::Termination. The stabilization of these two APIs now makes it possible for programs to return errors from main with custom exit codes.
  • std::thread::JoinHandle::is_finished]

These APIs are now usable in const contexts:

  • <*const T>::offset and <*mut T>::offset
  • <*const T>::wrapping_offset and <*mut T>::wrapping_offset
  • <*const T>::add and <*mut T>::add
  • <*const T>::sub and <*mut T>::sub
  • <*const T>::wrapping_add and <*mut T>::wrapping_add
  • <*const T>::wrapping_sub and <*mut T>::wrapping_sub
  • <[T]>::as_mut_ptr
  • <[T]>::as_ptr_range
  • <[T]>::as_mut_ptr_range

Cargo

No feature changes, but see compatibility notes.

Compatibility Notes

  • Previously native static libraries were linked as whole-archive in some cases, but now rustc tries not to use whole-archive unless explicitly requested. This change may result in linking errors in some cases. To fix such errors, native libraries linked from the command line, build scripts, or [#[link] attributes][link-attr] need to
  • (more common) either be reordered to respect dependencies between them (if a depends on b then a should go first and b second)
  • (less common) or be updated to use the [+whole-archive] modifier.
  • Catching a second unwind from FFI code while cleaning up from a Rust panic now causes the process to abort
  • Proc macros no longer see ident matchers wrapped in groups
  • The number of # in r# raw string literals is now required to be less than 256
  • When checking that a dyn type satisfies a trait bound, supertrait bounds are now enforced
  • cargo vendor now only accepts one value for each --sync flag
  • cfg predicates in all() and any() are always evaluated to detect errors, instead of short-circuiting. The compatibility considerations here arise in nightly-only code that used the short-circuiting behavior of all to write something like cfg(all(feature = "nightly", syntax-requiring-nightly)), which will now fail to compile. Instead, use either cfg_attr(feature = "nightly", ...) or nested uses of cfg.
  • bootstrap: static-libstdcpp is now enabled by default, and can now be disabled when llvm-tools is enabled

Patch Instructions:

To install this SUSE update use the SUSE recommended installation methods like YaST online_update or "zypper patch".
Alternatively you can run the command listed for your product:

  • openSUSE Leap 15.3
    zypper in -t patch SUSE-2022-2387=1
  • openSUSE Leap 15.4
    zypper in -t patch openSUSE-SLE-15.4-2022-2387=1
  • Development Tools Module 15-SP3
    zypper in -t patch SUSE-SLE-Module-Development-Tools-15-SP3-2022-2387=1
  • Development Tools Module 15-SP4
    zypper in -t patch SUSE-SLE-Module-Development-Tools-15-SP4-2022-2387=1

Package List:

  • openSUSE Leap 15.3 (aarch64 ppc64le s390x x86_64 i586)
    • cargo1.61-debuginfo-1.61.0-150300.7.3.1
    • cargo-1.61.0-150300.21.26.1
    • rust1.61-debuginfo-1.61.0-150300.7.3.1
    • rust-1.61.0-150300.21.26.1
    • rust1.61-1.61.0-150300.7.3.1
    • cargo1.61-1.61.0-150300.7.3.1
  • openSUSE Leap 15.4 (aarch64 ppc64le s390x x86_64)
    • cargo1.61-debuginfo-1.61.0-150300.7.3.1
    • cargo-1.61.0-150300.21.26.1
    • rust1.61-debuginfo-1.61.0-150300.7.3.1
    • rust-1.61.0-150300.21.26.1
    • rust1.61-1.61.0-150300.7.3.1
    • cargo1.61-1.61.0-150300.7.3.1
  • Development Tools Module 15-SP3 (aarch64 ppc64le s390x x86_64)
    • cargo1.61-debuginfo-1.61.0-150300.7.3.1
    • cargo-1.61.0-150300.21.26.1
    • rust1.61-debuginfo-1.61.0-150300.7.3.1
    • rust-1.61.0-150300.21.26.1
    • rust1.61-1.61.0-150300.7.3.1
    • cargo1.61-1.61.0-150300.7.3.1
  • Development Tools Module 15-SP4 (aarch64 ppc64le s390x x86_64)
    • cargo1.61-debuginfo-1.61.0-150300.7.3.1
    • cargo-1.61.0-150300.21.26.1
    • rust1.61-debuginfo-1.61.0-150300.7.3.1
    • rust-1.61.0-150300.21.26.1
    • rust1.61-1.61.0-150300.7.3.1
    • cargo1.61-1.61.0-150300.7.3.1