Opened 19 months ago

Closed 19 months ago

Last modified 19 months ago

#17120 closed enhancement (fixed)

rustc-1.64.0

Reported by: pierre Owned by: pierre
Priority: normal Milestone: 11.3
Component: BOOK Version: git
Severity: normal Keywords:
Cc:

Description

This version includes patches for llvm-15.0.x, so it's good time for an upgrade.

Change History (5)

comment:1 by pierre, 19 months ago

Owner: changed from blfs-book to pierre
Status: newassigned

Version 1.64.0 (2022-09-22)

Language

Unions with mutable references or tuples of allowed types are now allowed
It is now considered valid to deallocate memory pointed to by a shared reference &T if every byte in T is inside an UnsafeCell
Unused tuple struct fields are now warned against in an allow-by-default lint, unused_tuple_struct_fields, similar to the existing warning for unused struct fields. This lint will become warn-by-default in the future.

Compiler

Add Nintendo Switch as tier 3 target

Refer to Rust's platform support page for more information on Rust's tiered platform support.

Only compile #[used] as llvm.compiler.used for ELF targets
Add the --diagnostic-width compiler flag to define the terminal width.
Add support for link-flavor rust-lld for iOS, tvOS and watchOS

Libraries

Remove restrictions on compare-exchange memory ordering.
You can now write! or writeln! into an OsString: Implement fmt::Write for OsString
Make RwLockReadGuard covariant
Implement FusedIterator for std::net::[Into]Incoming
impl<T: AsRawFd> AsRawFd for {Arc,Box}<T>
ptr::copy and ptr::swap are doing untyped copies
Add cgroupv1 support to available_parallelism
Mitigate many incorrect uses of mem::uninitialized

Stabilized APIs

future::IntoFuture
future::poll_fn
task::ready[[BR]] num::NonZero*::checked_mul
num::NonZero*::checked_pow
num::NonZero*::saturating_mul
num::NonZero*::saturating_pow
num::NonZeroI*::abs
num::NonZeroI*::checked_abs
num::NonZeroI*::overflowing_abs
num::NonZeroI*::saturating_abs
num::NonZeroI*::unsigned_abs
num::NonZeroI*::wrapping_abs
num::NonZeroU*::checked_add
num::NonZeroU*::checked_next_power_of_two
num::NonZeroU*::saturating_add
num::NonZeroU*::saturating_add
os::unix::process::CommandExt::process_group
os::windows::fs::FileTypeExt::is_symlink_dir
os::windows::fs::FileTypeExt::is_symlink_file

These types were previously stable in std::ffi, but are now also available in core and alloc:

core::ffi::CStr
core::ffi::FromBytesWithNulError
alloc::ffi::CString
alloc::ffi::FromVecWithNulError
alloc::ffi::IntoStringError
alloc::ffi::NulError

These types were previously stable in std::os::raw, but are now also available in core::ffi and std::ffi:

ffi::c_char
ffi::c_double
ffi::c_float
ffi::c_int
ffi::c_long
ffi::c_longlong
ffi::c_schar
ffi::c_short
ffi::c_uchar
ffi::c_uint
ffi::c_ulong
ffi::c_ulonglong
ffi::c_ushort

These APIs are now usable in const contexts:

slice::from_raw_parts

Cargo

Packages can now inherit settings from the workspace so that the settings can be centralized in one place. See workspace.package and workspace.dependencies for more details on how to define these common settings.
Cargo commands can now accept multiple --target flags to build for multiple targets at once, and the build.target config option may now take an array of multiple targets.
The --jobs argument can now take a negative number to count backwards from the max CPUs.
cargo add will now update Cargo.lock.
Added the --crate-type flag to cargo rustc to override the crate type.
Significantly improved the performance fetching git dependencies from GitHub when using a hash in the rev field.

Misc

The rust-analyzer rustup component is now available on the stable channel.

Compatibility Notes

The minimum required versions for all -linux-gnu targets are now at least kernel 3.2 and glibc 2.17, for targets that previously supported older versions: Increase the minimum linux-gnu versions
Network primitives are now implemented with the ideal Rust layout, not the C system layout. This can cause problems when transmuting the types.
Add assertion that transmute_copy's U is not larger than T
A soundness bug in BTreeMap was fixed that allowed data it was borrowing to be dropped before the container.
The Drop behavior of C-like enums cast to ints has changed. These are already discouraged by a compiler warning.
Relate late-bound closure lifetimes to parent fn in NLL
Errors at const-eval time are now in future incompatibility reports
On the thumbv6m-none-eabi target, some incorrect asm! statements were erroneously accepted if they used the high registers (r8 to r14) as an input/output operand. This is no longer accepted.
impl Trait was accidentally accepted as the associated type value of return-position impl Trait, without fulfilling all the trait bounds of that associated type, as long as the hidden type satisfies said bounds. This has been fixed.

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

Windows builds now use profile-guided optimization, providing 10-20% improvements to compiler performance: Utilize PGO for windows x64 rustc dist builds
Stop keeping metadata in memory before writing it to disk
compiletest: strip debuginfo by default for mode=ui
Many improvements to generated code for derives, including performance improvements:

Don't use match-destructuring for derived ops on structs.
Many small deriving cleanups
More derive output improvements
Clarify deriving code
Final derive output improvements
Stop injecting #[allow(unused_qualifications)] in generated derive implementations
Improve derive(Debug)

Bump to clap 3
fully move dropck to mir
Optimize Vec::insert for the case where index == len.
Convert rust-analyzer to an in-tree tool

comment:2 by Xi Ruoyao, 19 months ago

I get only 1 test failure!

comment:3 by pierre, 19 months ago

Got 46 test failures in the assembly section, and five others (four of which are with the same file).

comment:4 by pierre, 19 months ago

Resolution: fixed
Status: assignedclosed

Everything (js, firefox, librsvg, etc) seems to build and run ok. Fixed at bf4b5fc3e7

in reply to:  3 comment:5 by Xi Ruoyao, 19 months ago

Replying to pierre:

Got 46 test failures in the assembly section, and five others (four of which are with the same file).

Let me rerun the tests and recheck my LLVM command... (Sometimes I enable more LLVM targets than the book.)

Note: See TracTickets for help on using tickets.