Commit e6b3398
committed
rust: update to 1.88
Prepared by he@ in wip/rust188.
Changes:
1.88
Language
Stabilize #![feature(let_chains)] in the 2024 edition. This feature allows &&-chaining let statements inside if and while, allowing intermixture with boolean expressions. The patterns inside the let sub-expressions can be irrefutable or refutable.
Stabilize #![feature(naked_functions)]. Naked functions allow writing functions with no compiler-generated epilogue and prologue, allowing full control over the generated assembly for a particular function.
Stabilize #![feature(cfg_boolean_literals)]. This allows using boolean literals as cfg predicates, e.g. #[cfg(true)] and #[cfg(false)].
Fully de-stabilize the #[bench] attribute. Usage of #[bench] without #![feature(custom_test_frameworks)] already triggered a deny-by-default future-incompatibility lint since Rust 1.77, but will now become a hard error.
Add warn-by-default dangerous_implicit_autorefs lint against implicit autoref of raw pointer dereference. The lint will be bumped to deny-by-default in the next version of Rust.
Add invalid_null_arguments lint to prevent invalid usage of null pointers. This lint is uplifted from clippy::invalid_null_ptr_usage.
Change trait impl candidate preference for builtin impls and trivial where-clauses.
Check types of generic const parameter defaults
Compiler
Stabilize -Cdwarf-version for selecting the version of DWARF debug information to generate.
Platform Support
Demote i686-pc-windows-gnu to Tier 2.
Refer to Rust’s platform support page for more information on Rust’s tiered platform support.
Libraries
Remove backticks from #[should_panic] test failure message.
Guarantee that [T; N]::from_fn is generated in order of increasing indices., for those passing it a stateful closure.
The libtest flag --nocapture is deprecated in favor of the more consistent --no-capture flag.
Guarantee that {float}::NAN is a quiet NaN.
Stabilized APIs
Cell::update
impl Default for *const T
impl Default for *mut T
HashMap::extract_if
HashSet::extract_if
proc_macro::Span::line
proc_macro::Span::column
proc_macro::Span::start
proc_macro::Span::end
proc_macro::Span::file
proc_macro::Span::local_file
These previously stable APIs are now stable in const contexts:
NonNull<T>::replace
<*mut T>::replace
std::ptr::swap_nonoverlapping
Cell::{replace, get, get_mut, from_mut, as_slice_of_cells}
Cargo
Stabilize automatic garbage collection.
use zlib-rs for gzip compression in rust code
Rustdoc
Doctests can be ignored based on target names using ignore-* attributes.
Stabilize the --test-runtool and --test-runtool-arg CLI options to specify a program (like qemu) and its arguments to run a doctest.
Compatibility Notes
Finish changing the internal representation of pasted tokens. Certain invalid declarative macros that were previously accepted in obscure circumstances are now correctly rejected by the compiler. Use of a tt fragment specifier can often fix these macros.
Fully de-stabilize the #[bench] attribute. Usage of #[bench] without #![feature(custom_test_frameworks)] already triggered a deny-by-default future-incompatibility lint since Rust 1.77, but will now become a hard error.
Fix borrow checking some always-true patterns. The borrow checker was overly permissive in some cases, allowing programs that shouldn’t have compiled.
Update the minimum external LLVM to 19.
Make it a hard error to use a vector type with a non-Rust ABI without enabling the required target feature.
1.87
Language
Stabilize asm_goto feature
Allow parsing open beginning ranges (..EXPR) after unary operators !, -, and *.
Don’t require method impls for methods with Self: Sized bounds in impls for unsized types
Stabilize feature(precise_capturing_in_traits) allowing use<...> bounds on return position impl Trait in traits
Compiler
x86: make SSE2 required for i686 targets and use it to pass SIMD types
Platform Support
Remove i586-pc-windows-msvc target
Refer to Rust’s platform support page for more information on Rust’s tiered platform support.
Libraries
Stabilize the anonymous pipe API
Add support for unbounded left/right shift operations
Print pointer metadata in Debug impl of raw pointers
Vec::with_capacity guarantees it allocates with the amount requested, even if Vec::capacity returns a different number.
Most std::arch intrinsics which don’t take pointer arguments can now be called from safe code if the caller has the appropriate target features already enabled (rust-lang/stdarch#1714, rust-lang/stdarch#1716, rust-lang/stdarch#1717)
Undeprecate env::home_dir
Denote ControlFlow as #[must_use]
Macros such as assert_eq! and vec! now support const {...} expressions
Stabilized APIs
Vec::extract_if
vec::ExtractIf
LinkedList::extract_if
linked_list::ExtractIf
<[T]>::split_off
<[T]>::split_off_mut
<[T]>::split_off_first
<[T]>::split_off_first_mut
<[T]>::split_off_last
<[T]>::split_off_last_mut
String::extend_from_within
os_str::Display
OsString::display
OsStr::display
io::pipe
io::PipeReader
io::PipeWriter
impl From<PipeReader> for OwnedHandle
impl From<PipeWriter> for OwnedHandle
impl From<PipeReader> for Stdio
impl From<PipeWriter> for Stdio
impl From<PipeReader> for OwnedFd
impl From<PipeWriter> for OwnedFd
Box<MaybeUninit<T>>::write
impl TryFrom<Vec<u8>> for String
<*const T>::offset_from_unsigned
<*const T>::byte_offset_from_unsigned
<*mut T>::offset_from_unsigned
<*mut T>::byte_offset_from_unsigned
NonNull::offset_from_unsigned
NonNull::byte_offset_from_unsigned
<uN>::cast_signed
NonZero::<uN>::cast_signed.
<iN>::cast_unsigned.
NonZero::<iN>::cast_unsigned.
<uN>::is_multiple_of
<uN>::unbounded_shl
<uN>::unbounded_shr
<iN>::unbounded_shl
<iN>::unbounded_shr
<iN>::midpoint
<str>::from_utf8
<str>::from_utf8_mut
<str>::from_utf8_unchecked
<str>::from_utf8_unchecked_mut
These previously stable APIs are now stable in const contexts:
core::str::from_utf8_mut
<[T]>::copy_from_slice
SocketAddr::set_ip
SocketAddr::set_port,
SocketAddrV4::set_ip
SocketAddrV4::set_port,
SocketAddrV6::set_ip
SocketAddrV6::set_port
SocketAddrV6::set_flowinfo
SocketAddrV6::set_scope_id
char::is_digit
char::is_whitespace
<[[T; N]]>::as_flattened
<[[T; N]]>::as_flattened_mut
String::into_bytes
String::as_str
String::capacity
String::as_bytes
String::len
String::is_empty
String::as_mut_str
String::as_mut_vec
Vec::as_ptr
Vec::as_slice
Vec::capacity
Vec::len
Vec::is_empty
Vec::as_mut_slice
Vec::as_mut_ptr
Cargo
Add terminal integration via ANSI OSC 9;4 sequences
chore: bump openssl to v3
feat(package): add –exclude-lockfile flag
Compatibility Notes
Rust now raises an error for macro invocations inside the #![crate_name] attribute
Unstable fields are now always considered to be inhabited
Macro arguments of unary operators followed by open beginning ranges may now be matched differently
Make Debug impl of raw pointers print metadata if present
Warn against function pointers using unsupported ABI strings in dependencies
Associated types on dyn types are no longer deduplicated
Forbid attributes on .. inside of struct patterns (let Struct { #[attribute] .. }) =
Make ptr_cast_add_auto_to_object lint into hard error
Many std::arch intrinsics are now safe to call in some contexts, there may now be new unused_unsafe warnings in existing codebases.
Limit width and precision formatting options to 16 bits on all targets
Turn order dependent trait objects future incompat warning into a hard error
Denote ControlFlow as #[must_use]
Windows: The standard library no longer links advapi32, except on win7. Code such as C libraries that were relying on this assumption may need to explicitly link advapi32.
Proc macros can no longer observe expanded cfg(true) attributes.
Start changing the internal representation of pasted tokens. Certain invalid declarative macros that were previously accepted in obscure circumstances are now correctly rejected by the compiler. Use of a tt fragment specifier can often fix these macros.
Don’t allow flattened format_args in const.
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.
Update to LLVM 201 parent be1cdf6 commit e6b3398
File tree
68 files changed
+704
-404
lines changed- lang/rust
- patches
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
68 files changed
+704
-404
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
229 | 228 | | |
230 | 229 | | |
231 | 230 | | |
232 | | - | |
| 231 | + | |
233 | 232 | | |
234 | 233 | | |
235 | 234 | | |
236 | 235 | | |
237 | 236 | | |
238 | 237 | | |
239 | | - | |
| 238 | + | |
240 | 239 | | |
241 | 240 | | |
242 | 241 | | |
243 | 242 | | |
244 | 243 | | |
245 | 244 | | |
246 | | - | |
| 245 | + | |
247 | 246 | | |
248 | 247 | | |
249 | 248 | | |
250 | 249 | | |
251 | 250 | | |
252 | 251 | | |
253 | | - | |
| 252 | + | |
254 | 253 | | |
255 | 254 | | |
256 | 255 | | |
257 | 256 | | |
258 | 257 | | |
259 | 258 | | |
260 | | - | |
| 259 | + | |
261 | 260 | | |
262 | 261 | | |
263 | 262 | | |
264 | 263 | | |
265 | 264 | | |
266 | 265 | | |
267 | | - | |
| 266 | + | |
268 | 267 | | |
269 | 268 | | |
270 | 269 | | |
271 | 270 | | |
272 | 271 | | |
273 | 272 | | |
274 | | - | |
| 273 | + | |
275 | 274 | | |
276 | 275 | | |
277 | 276 | | |
| |||
296 | 295 | | |
297 | 296 | | |
298 | 297 | | |
299 | | - | |
| 298 | + | |
300 | 299 | | |
301 | 300 | | |
302 | 301 | | |
303 | 302 | | |
304 | 303 | | |
305 | 304 | | |
306 | | - | |
| 305 | + | |
307 | 306 | | |
308 | 307 | | |
309 | 308 | | |
| |||
323 | 322 | | |
324 | 323 | | |
325 | 324 | | |
326 | | - | |
| 325 | + | |
327 | 326 | | |
328 | 327 | | |
329 | 328 | | |
330 | 329 | | |
331 | 330 | | |
332 | 331 | | |
333 | | - | |
| 332 | + | |
334 | 333 | | |
335 | 334 | | |
336 | 335 | | |
| |||
339 | 338 | | |
340 | 339 | | |
341 | 340 | | |
342 | | - | |
| 341 | + | |
343 | 342 | | |
344 | 343 | | |
345 | 344 | | |
| |||
348 | 347 | | |
349 | 348 | | |
350 | 349 | | |
351 | | - | |
| 350 | + | |
352 | 351 | | |
353 | 352 | | |
354 | 353 | | |
| |||
357 | 356 | | |
358 | 357 | | |
359 | 358 | | |
360 | | - | |
| 359 | + | |
361 | 360 | | |
362 | 361 | | |
363 | 362 | | |
| |||
367 | 366 | | |
368 | 367 | | |
369 | 368 | | |
370 | | - | |
| 369 | + | |
371 | 370 | | |
372 | 371 | | |
373 | 372 | | |
| |||
376 | 375 | | |
377 | 376 | | |
378 | 377 | | |
379 | | - | |
| 378 | + | |
380 | 379 | | |
381 | 380 | | |
382 | 381 | | |
| |||
385 | 384 | | |
386 | 385 | | |
387 | 386 | | |
388 | | - | |
| 387 | + | |
389 | 388 | | |
390 | 389 | | |
391 | 390 | | |
| |||
394 | 393 | | |
395 | 394 | | |
396 | 395 | | |
397 | | - | |
| 396 | + | |
398 | 397 | | |
399 | 398 | | |
400 | 399 | | |
| |||
438 | 437 | | |
439 | 438 | | |
440 | 439 | | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
446 | 447 | | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
452 | 453 | | |
453 | 454 | | |
454 | 455 | | |
455 | 456 | | |
456 | 457 | | |
457 | 458 | | |
458 | 459 | | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | 460 | | |
468 | 461 | | |
469 | 462 | | |
470 | 463 | | |
471 | | - | |
| 464 | + | |
472 | 465 | | |
473 | 466 | | |
474 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
475 | 486 | | |
476 | 487 | | |
477 | 488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
0 commit comments