From 5e1ddfadfd5dc7a410ea024b612c793c3c2469d2 Mon Sep 17 00:00:00 2001 From: Arpit Jain Date: Fri, 15 May 2026 00:23:09 +0900 Subject: [PATCH 01/22] ci: declare contents:read on Tier 2 sysroots workflow Signed-off-by: Arpit Jain --- src/tools/miri/.github/workflows/sysroots.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tools/miri/.github/workflows/sysroots.yml b/src/tools/miri/.github/workflows/sysroots.yml index 178c1a5062779..a488e480c0c58 100644 --- a/src/tools/miri/.github/workflows/sysroots.yml +++ b/src/tools/miri/.github/workflows/sysroots.yml @@ -8,6 +8,9 @@ defaults: run: shell: bash +permissions: + contents: read + jobs: sysroots: name: Build the sysroots From 7dd6d8b17cc75a5ee6fe410775ca85f7c2338a5b Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 19 May 2026 14:32:49 +0200 Subject: [PATCH 02/22] rename set_last_error_and_return helper to make it clear what we return --- src/tools/miri/src/shims/io_error.rs | 6 +- src/tools/miri/src/shims/time.rs | 8 +- src/tools/miri/src/shims/unix/env.rs | 8 +- src/tools/miri/src/shims/unix/fd.rs | 36 +++--- .../miri/src/shims/unix/foreign_items.rs | 16 +-- .../src/shims/unix/freebsd/foreign_items.rs | 4 +- src/tools/miri/src/shims/unix/freebsd/sync.rs | 10 +- src/tools/miri/src/shims/unix/fs.rs | 90 +++++++------- .../miri/src/shims/unix/linux_like/epoll.rs | 18 +-- .../miri/src/shims/unix/linux_like/sync.rs | 12 +- src/tools/miri/src/shims/unix/macos/sync.rs | 14 +-- src/tools/miri/src/shims/unix/mem.rs | 4 +- src/tools/miri/src/shims/unix/socket.rs | 110 +++++++++--------- 13 files changed, 168 insertions(+), 168 deletions(-) diff --git a/src/tools/miri/src/shims/io_error.rs b/src/tools/miri/src/shims/io_error.rs index 2e5410429efee..c715e38169c04 100644 --- a/src/tools/miri/src/shims/io_error.rs +++ b/src/tools/miri/src/shims/io_error.rs @@ -291,7 +291,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } /// Sets the last OS error and writes -1 to dest place. - fn set_last_error_and_return( + fn set_errno_and_return_neg1( &mut self, err: impl Into, dest: &MPlaceTy<'tcx>, @@ -303,7 +303,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } /// Sets the last OS error and return `-1` as a `i32`-typed Scalar - fn set_last_error_and_return_i32( + fn set_errno_and_return_neg1_i32( &mut self, err: impl Into, ) -> InterpResult<'tcx, Scalar> { @@ -313,7 +313,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } /// Sets the last OS error and return `-1` as a `i64`-typed Scalar - fn set_last_error_and_return_i64( + fn set_errno_and_return_neg1_i64( &mut self, err: impl Into, ) -> InterpResult<'tcx, Scalar> { diff --git a/src/tools/miri/src/shims/time.rs b/src/tools/miri/src/shims/time.rs index 87dded0766ad8..9dfce51d2ea4a 100644 --- a/src/tools/miri/src/shims/time.rs +++ b/src/tools/miri/src/shims/time.rs @@ -81,7 +81,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { .now() .duration_since(this.machine.monotonic_clock.epoch()), None => { - return this.set_last_error_and_return(LibcError("EINVAL"), dest); + return this.set_errno_and_return_neg1(LibcError("EINVAL"), dest); } }; @@ -109,7 +109,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Using tz is obsolete and should always be null let tz = this.read_pointer(tz_op)?; if !this.ptr_is_null(tz)? { - return this.set_last_error_and_return_i32(LibcError("EINVAL")); + return this.set_errno_and_return_neg1_i32(LibcError("EINVAL")); } let duration = system_time_to_duration(&SystemTime::now())?; @@ -362,7 +362,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let _rem = this.read_pointer(rem)?; // Signal handlers are not supported, so rem will never be written to. let Some(duration) = this.read_timespec(&duration)? else { - return this.set_last_error_and_return_i32(LibcError("EINVAL")); + return this.set_errno_and_return_neg1_i32(LibcError("EINVAL")); }; let deadline = this.machine.monotonic_clock.now().add_lossy(duration); @@ -401,7 +401,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } let Some(duration) = this.read_timespec(×pec)? else { - return this.set_last_error_and_return_i32(LibcError("EINVAL")); + return this.set_errno_and_return_neg1_i32(LibcError("EINVAL")); }; let timeout_style = if flags == 0 { diff --git a/src/tools/miri/src/shims/unix/env.rs b/src/tools/miri/src/shims/unix/env.rs index 97cc0d8eacf57..bd82b1ee9a081 100644 --- a/src/tools/miri/src/shims/unix/env.rs +++ b/src/tools/miri/src/shims/unix/env.rs @@ -164,7 +164,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { interp_ok(Scalar::from_i32(0)) // return zero on success } else { // name argument is a null pointer, points to an empty string, or points to a string containing an '=' character. - this.set_last_error_and_return_i32(LibcError("EINVAL")) + this.set_errno_and_return_neg1_i32(LibcError("EINVAL")) } } @@ -188,7 +188,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { interp_ok(Scalar::from_i32(0)) } else { // name argument is a null pointer, points to an empty string, or points to a string containing an '=' character. - this.set_last_error_and_return_i32(LibcError("EINVAL")) + this.set_errno_and_return_neg1_i32(LibcError("EINVAL")) } } @@ -227,7 +227,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op { this.reject_in_isolation("`chdir`", reject_with)?; - return this.set_last_error_and_return_i32(ErrorKind::PermissionDenied); + return this.set_errno_and_return_neg1_i32(ErrorKind::PermissionDenied); } let result = env::set_current_dir(path).map(|()| 0); @@ -288,7 +288,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { }; if this.ptr_is_null(uname_ptr)? { - return this.set_last_error_and_return_i32(LibcError("EFAULT")); + return this.set_errno_and_return_neg1_i32(LibcError("EFAULT")); } let uname = this.deref_pointer_as(uname, this.libc_ty_layout("utsname"))?; diff --git a/src/tools/miri/src/shims/unix/fd.rs b/src/tools/miri/src/shims/unix/fd.rs index ab17be0e04f4e..dc13ced2b555f 100644 --- a/src/tools/miri/src/shims/unix/fd.rs +++ b/src/tools/miri/src/shims/unix/fd.rs @@ -88,7 +88,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let this = self.eval_context_mut(); let Some(fd) = this.machine.fds.get(old_fd_num) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; interp_ok(Scalar::from_i32(this.machine.fds.insert(fd))) } @@ -97,7 +97,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let this = self.eval_context_mut(); let Some(fd) = this.machine.fds.get(old_fd_num) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; if new_fd_num != old_fd_num { // Close new_fd if it is previously opened. @@ -113,7 +113,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { fn flock(&mut self, fd_num: i32, op: i32) -> InterpResult<'tcx, Scalar> { let this = self.eval_context_mut(); let Some(fd) = this.machine.fds.get(fd_num) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; // We need to check that there aren't unsupported options in `op`. @@ -159,7 +159,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let arg = varargs.first(); let Some(fd) = this.machine.fds.get(fd) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; // Handle common opcodes. @@ -201,7 +201,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // always sets this flag when opening a file. However we still need to check that the // file itself is open. if !this.machine.fds.is_fd_num(fd_num) { - this.set_last_error_and_return_i32(LibcError("EBADF")) + this.set_errno_and_return_neg1_i32(LibcError("EBADF")) } else { interp_ok(this.eval_libc("FD_CLOEXEC")) } @@ -223,13 +223,13 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { if let Some(fd) = this.machine.fds.get(fd_num) { interp_ok(Scalar::from_i32(this.machine.fds.insert_with_min_num(fd, start))) } else { - this.set_last_error_and_return_i32(LibcError("EBADF")) + this.set_errno_and_return_neg1_i32(LibcError("EBADF")) } } cmd if cmd == f_getfl => { // Check if this is a valid open file descriptor. let Some(fd) = this.machine.fds.get(fd_num) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; fd.get_flags(this) @@ -237,7 +237,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { cmd if cmd == f_setfl => { // Check if this is a valid open file descriptor. let Some(fd) = this.machine.fds.get(fd_num) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; let [flag] = check_min_vararg_count("fcntl(fd, F_SETFL, ...)", varargs)?; @@ -263,7 +263,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Reject if isolation is enabled. if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op { this.reject_in_isolation("`fcntl`", reject_with)?; - return this.set_last_error_and_return_i32(ErrorKind::PermissionDenied); + return this.set_errno_and_return_neg1_i32(ErrorKind::PermissionDenied); } this.ffullsync_fd(fd_num) @@ -280,7 +280,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let fd_num = this.read_scalar(fd_op)?.to_i32()?; let Some(fd) = this.machine.fds.remove(fd_num) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; let result = fd.close_ref(this.machine.communicate(), this)?; // return `0` if close is successful @@ -320,7 +320,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Get the FD. let Some(fd) = this.machine.fds.get(fd_num) else { trace!("read: FD not found"); - return this.set_last_error_and_return(LibcError("EBADF"), dest); + return this.set_errno_and_return_neg1(LibcError("EBADF"), dest); }; trace!("read: FD mapped to {fd:?}"); @@ -346,7 +346,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // This must fit since `count` fits. this.write_int(u64::try_from(read_size).unwrap(), &dest) } - Err(e) => this.set_last_error_and_return(e, &dest) + Err(e) => this.set_errno_and_return_neg1(e, &dest) }} ), ) @@ -376,7 +376,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // We temporarily dup the FD to be able to retain mutable access to `this`. let Some(fd) = this.machine.fds.get(fd_num) else { - return this.set_last_error_and_return(LibcError("EBADF"), dest); + return this.set_errno_and_return_neg1(LibcError("EBADF"), dest); }; let dest = dest.clone(); @@ -397,7 +397,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // This must fit since `count` fits. this.write_int(u64::try_from(write_size).unwrap(), &dest) } - Err(e) => this.set_last_error_and_return(e, &dest) + Err(e) => this.set_errno_and_return_neg1(e, &dest) }} ), @@ -435,7 +435,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Check that the FD exists. let Some(fd) = this.machine.fds.get(fd) else { - return this.set_last_error_and_return(LibcError("EBADF"), dest); + return this.set_errno_and_return_neg1(LibcError("EBADF"), dest); }; let iovec_layout = this.libc_array_ty_layout("iovec", iovcnt); @@ -488,7 +488,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { this.write_scalar(Scalar::from_target_isize(size.try_into().unwrap(), this), &dest)?; u64::try_from(size).unwrap() }, - Err(e) => return this.set_last_error_and_return(e, &dest) + Err(e) => return this.set_errno_and_return_neg1(e, &dest) }; let mut remaining_bytes = bytes_read; @@ -555,7 +555,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Check that the FD exists. let Some(fd) = this.machine.fds.get(fd) else { - return this.set_last_error_and_return(LibcError("EBADF"), dest); + return this.set_errno_and_return_neg1(LibcError("EBADF"), dest); }; let iovec_layout = this.libc_array_ty_layout("iovec", iovcnt); @@ -628,7 +628,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { this.deallocate_ptr(tmp_ptr, None, MemoryKind::Stack)?; match result { Ok(size) => this.write_scalar(Scalar::from_target_isize(size.try_into().unwrap(), this), &dest), - Err(e) => this.set_last_error_and_return(e, &dest) + Err(e) => this.set_errno_and_return_neg1(e, &dest) } }), ) diff --git a/src/tools/miri/src/shims/unix/foreign_items.rs b/src/tools/miri/src/shims/unix/foreign_items.rs index 67602a4fe88e2..467304defb9b6 100644 --- a/src/tools/miri/src/shims/unix/foreign_items.rs +++ b/src/tools/miri/src/shims/unix/foreign_items.rs @@ -1131,7 +1131,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } else if matches!(this.tcx.sess.target.os, Os::Linux | Os::Android) { // On Linux/Android, pid can be a TID as returned by `gettid`. let Some(thread_id) = this.get_thread_id_from_linux_tid(pid) else { - this.set_last_error_and_return(LibcError("ESRCH"), dest)?; + this.set_errno_and_return_neg1(LibcError("ESRCH"), dest)?; return interp_ok(EmulateItemResult::NeedsReturn); }; thread_id @@ -1145,10 +1145,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let chunk_size = CpuAffinityMask::chunk_size(this); if this.ptr_is_null(mask)? { - this.set_last_error_and_return(LibcError("EFAULT"), dest)?; + this.set_errno_and_return_neg1(LibcError("EFAULT"), dest)?; } else if cpusetsize == 0 || cpusetsize.checked_rem(chunk_size).unwrap() != 0 { // we only copy whole chunks of size_of::() - this.set_last_error_and_return(LibcError("EINVAL"), dest)?; + this.set_errno_and_return_neg1(LibcError("EINVAL"), dest)?; } else if let Some(cpuset) = this.machine.thread_cpu_affinity.get(&thread_id) { let cpuset = cpuset.clone(); // we only copy whole chunks of size_of::() @@ -1158,7 +1158,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { this.write_null(dest)?; } else { // The thread whose ID is pid could not be found - this.set_last_error_and_return(LibcError("ESRCH"), dest)?; + this.set_errno_and_return_neg1(LibcError("ESRCH"), dest)?; } } "sched_setaffinity" => { @@ -1176,7 +1176,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } else if matches!(this.tcx.sess.target.os, Os::Linux | Os::Android) { // On Linux/Android, pid can be a TID as returned by `gettid`. let Some(thread_id) = this.get_thread_id_from_linux_tid(pid) else { - this.set_last_error_and_return(LibcError("ESRCH"), dest)?; + this.set_errno_and_return_neg1(LibcError("ESRCH"), dest)?; return interp_ok(EmulateItemResult::NeedsReturn); }; thread_id @@ -1187,7 +1187,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { }; if this.ptr_is_null(mask)? { - this.set_last_error_and_return(LibcError("EFAULT"), dest)?; + this.set_errno_and_return_neg1(LibcError("EFAULT"), dest)?; } else { // NOTE: cpusetsize might be smaller than `CpuAffinityMask::CPU_MASK_BYTES`. // Any unspecified bytes are treated as zero here (none of the CPUs are configured). @@ -1204,7 +1204,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } None => { // The intersection between the mask and the available CPUs was empty. - this.set_last_error_and_return(LibcError("EINVAL"), dest)?; + this.set_errno_and_return_neg1(LibcError("EINVAL"), dest)?; } } } @@ -1245,7 +1245,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // macOS: https://keith.github.io/xcode-man-pages/getentropy.2.html // Solaris/Illumos: https://illumos.org/man/3C/getentropy if bufsize > 256 { - this.set_last_error_and_return(LibcError("EIO"), dest)?; + this.set_errno_and_return_neg1(LibcError("EIO"), dest)?; } else { this.gen_random(buf, bufsize)?; this.write_null(dest)?; diff --git a/src/tools/miri/src/shims/unix/freebsd/foreign_items.rs b/src/tools/miri/src/shims/unix/freebsd/foreign_items.rs index 332bd26eff899..db3975a5bdfa8 100644 --- a/src/tools/miri/src/shims/unix/freebsd/foreign_items.rs +++ b/src/tools/miri/src/shims/unix/freebsd/foreign_items.rs @@ -96,7 +96,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { }; if this.ptr_is_null(mask)? { - this.set_last_error_and_return(LibcError("EFAULT"), dest)?; + this.set_errno_and_return_neg1(LibcError("EFAULT"), dest)?; } // We only support CPU_LEVEL_WHICH and CPU_WHICH_PID for now. // This is the bare minimum to make the tests pass. @@ -111,7 +111,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // If it's large enough, copying the kernel mask to user space is safe, regardless of the actual size. // See https://github.com/freebsd/freebsd-src/blob/909aa6781340f8c0b4ae01c6366bf1556ee2d1be/sys/kern/kern_cpuset.c#L1985 if set_size < u64::from(this.machine.num_cpus).div_ceil(8) { - this.set_last_error_and_return(LibcError("ERANGE"), dest)?; + this.set_errno_and_return_neg1(LibcError("ERANGE"), dest)?; } else { let cpuset = cpuset.clone(); let byte_count = diff --git a/src/tools/miri/src/shims/unix/freebsd/sync.rs b/src/tools/miri/src/shims/unix/freebsd/sync.rs index 32338391f2dd8..28f912ab973fe 100644 --- a/src/tools/miri/src/shims/unix/freebsd/sync.rs +++ b/src/tools/miri/src/shims/unix/freebsd/sync.rs @@ -102,7 +102,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let umtx_time_place = this.ptr_to_mplace(uaddr2, umtx_time_layout); let Some(umtx_time) = this.read_umtx_time(&umtx_time_place)? else { - return this.set_last_error_and_return(LibcError("EINVAL"), dest); + return this.set_errno_and_return_neg1(LibcError("EINVAL"), dest); }; let style = if umtx_time.abs_time { @@ -123,7 +123,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // `uaddr2` points to a `struct timespec`. let timespec = this.ptr_to_mplace(uaddr2, timespec_layout); let Some(duration) = this.read_timespec(×pec)? else { - return this.set_last_error_and_return(LibcError("EINVAL"), dest); + return this.set_errno_and_return_neg1(LibcError("EINVAL"), dest); }; // FreeBSD does not seem to document which clock is used when the timeout @@ -137,7 +137,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { duration, )) } else { - return this.set_last_error_and_return(LibcError("EINVAL"), dest); + return this.set_errno_and_return_neg1(LibcError("EINVAL"), dest); } }; @@ -158,7 +158,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { ecx.write_int(0, &dest) } UnblockKind::TimedOut => { - ecx.set_last_error_and_return(LibcError("ETIMEDOUT"), &dest) + ecx.set_errno_and_return_neg1(LibcError("ETIMEDOUT"), &dest) } } ), @@ -182,7 +182,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Return an error code. (That seems nicer than silently doing something non-intuitive.) // This means that if an address gets reused by a new allocation, // we'll use an independent futex queue for this... that seems acceptable. - return this.set_last_error_and_return(LibcError("EFAULT"), dest); + return this.set_errno_and_return_neg1(LibcError("EFAULT"), dest); }; let futex_ref = futex_ref.futex.clone(); diff --git a/src/tools/miri/src/shims/unix/fs.rs b/src/tools/miri/src/shims/unix/fs.rs index a5b3f891d9ca7..67d25d78474e9 100644 --- a/src/tools/miri/src/shims/unix/fs.rs +++ b/src/tools/miri/src/shims/unix/fs.rs @@ -457,7 +457,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let o_tmpfile = this.eval_libc_i32("O_TMPFILE"); if flag & o_tmpfile == o_tmpfile { // if the flag contains `O_TMPFILE` then we return a graceful error - return this.set_last_error_and_return_i32(LibcError("EOPNOTSUPP")); + return this.set_errno_and_return_neg1_i32(LibcError("EOPNOTSUPP")); } } @@ -477,7 +477,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // O_NOFOLLOW only fails when the trailing component is a symlink; // the entire rest of the path can still contain symlinks. if path.is_symlink() { - return this.set_last_error_and_return_i32(LibcError("ELOOP")); + return this.set_errno_and_return_neg1_i32(LibcError("ELOOP")); } } } @@ -490,7 +490,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Reject if isolation is enabled. if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op { this.reject_in_isolation("`open`", reject_with)?; - return this.set_last_error_and_return_i32(ErrorKind::PermissionDenied); + return this.set_errno_and_return_neg1_i32(ErrorKind::PermissionDenied); } let fd = options @@ -514,7 +514,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let seek_from = if whence == this.eval_libc_i32("SEEK_SET") { if offset < 0 { // Negative offsets return `EINVAL`. - return this.set_last_error_and_return(LibcError("EINVAL"), dest); + return this.set_errno_and_return_neg1(LibcError("EINVAL"), dest); } else { SeekFrom::Start(u64::try_from(offset).unwrap()) } @@ -523,13 +523,13 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } else if whence == this.eval_libc_i32("SEEK_END") { SeekFrom::End(i64::try_from(offset).unwrap()) } else { - return this.set_last_error_and_return(LibcError("EINVAL"), dest); + return this.set_errno_and_return_neg1(LibcError("EINVAL"), dest); }; let communicate = this.machine.communicate(); let Some(fd) = this.machine.fds.get(fd_num) else { - return this.set_last_error_and_return(LibcError("EBADF"), dest); + return this.set_errno_and_return_neg1(LibcError("EBADF"), dest); }; let result = fd.seek(communicate, seek_from)?.map(|offset| i64::try_from(offset).unwrap()); drop(fd); @@ -547,7 +547,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Reject if isolation is enabled. if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op { this.reject_in_isolation("`unlink`", reject_with)?; - return this.set_last_error_and_return_i32(ErrorKind::PermissionDenied); + return this.set_errno_and_return_neg1_i32(ErrorKind::PermissionDenied); } let result = fs::remove_file(path).map(|_| 0); @@ -577,7 +577,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Reject if isolation is enabled. if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op { this.reject_in_isolation("`symlink`", reject_with)?; - return this.set_last_error_and_return_i32(ErrorKind::PermissionDenied); + return this.set_errno_and_return_neg1_i32(ErrorKind::PermissionDenied); } let result = create_link(&target, &linkpath).map(|_| 0); @@ -600,13 +600,13 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Reject if isolation is enabled. if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op { this.reject_in_isolation("`stat`", reject_with)?; - return this.set_last_error_and_return_i32(LibcError("EACCES")); + return this.set_errno_and_return_neg1_i32(LibcError("EACCES")); } // `stat` always follows symlinks. let metadata = match FileMetadata::from_path(this, &path, true)? { Ok(metadata) => metadata, - Err(err) => return this.set_last_error_and_return_i32(err), + Err(err) => return this.set_errno_and_return_neg1_i32(err), }; interp_ok(Scalar::from_i32(this.write_stat_buf(metadata, buf_op)?)) @@ -629,12 +629,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Reject if isolation is enabled. if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op { this.reject_in_isolation("`lstat`", reject_with)?; - return this.set_last_error_and_return_i32(LibcError("EACCES")); + return this.set_errno_and_return_neg1_i32(LibcError("EACCES")); } let metadata = match FileMetadata::from_path(this, &path, false)? { Ok(metadata) => metadata, - Err(err) => return this.set_last_error_and_return_i32(err), + Err(err) => return this.set_errno_and_return_neg1_i32(err), }; interp_ok(Scalar::from_i32(this.write_stat_buf(metadata, buf_op)?)) @@ -656,12 +656,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op { this.reject_in_isolation("`fstat`", reject_with)?; // Set error code as "EBADF" (bad fd) - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); } let metadata = match FileMetadata::from_fd_num(this, fd)? { Ok(metadata) => metadata, - Err(err) => return this.set_last_error_and_return_i32(err), + Err(err) => return this.set_errno_and_return_neg1_i32(err), }; interp_ok(Scalar::from_i32(this.write_stat_buf(metadata, buf_op)?)) } @@ -686,7 +686,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // If the statxbuf or pathname pointers are null, the function fails with `EFAULT`. if this.ptr_is_null(statxbuf_ptr)? || this.ptr_is_null(pathname_ptr)? { - return this.set_last_error_and_return_i32(LibcError("EFAULT")); + return this.set_errno_and_return_neg1_i32(LibcError("EFAULT")); } let statxbuf = this.deref_pointer_as(statxbuf_op, this.libc_ty_layout("statx"))?; @@ -727,7 +727,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { assert!(empty_path_flag); LibcError("EBADF") }; - return this.set_last_error_and_return_i32(ecode); + return this.set_errno_and_return_neg1_i32(ecode); } // If the `AT_SYMLINK_NOFOLLOW` flag is set, we query the file's metadata without following @@ -743,7 +743,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { }; let metadata = match metadata { Ok(metadata) => metadata, - Err(err) => return this.set_last_error_and_return_i32(err), + Err(err) => return this.set_errno_and_return_neg1_i32(err), }; // The `_mask_op` parameter specifies the file information that the caller requested. @@ -861,19 +861,19 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let mode = this.read_scalar(mode_op)?.to_uint(this.libc_ty_layout("mode_t").size)?; if this.ptr_is_null(path_ptr)? { - return this.set_last_error_and_return_i32(LibcError("EFAULT")); + return this.set_errno_and_return_neg1_i32(LibcError("EFAULT")); } let path = this.read_path_from_c_str(path_ptr)?; // Reject if isolation is enabled. if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op { this.reject_in_isolation("`chmod`", reject_with)?; - return this.set_last_error_and_return_i32(LibcError("EACCES")); + return this.set_errno_and_return_neg1_i32(LibcError("EACCES")); } let permissions = this.host_permissions_from_mode(mode.try_into().unwrap())?; if let Err(err) = fs::set_permissions(path, permissions) { - return this.set_last_error_and_return_i32(err); + return this.set_errno_and_return_neg1_i32(err); } interp_ok(Scalar::from_i32(0)) @@ -886,7 +886,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let mode = this.read_scalar(mode_op)?.to_uint(this.libc_ty_layout("mode_t").size)?; let Some(fd) = this.machine.fds.get(fd_num) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; let Some(file) = fd.downcast::() else { // The docs don't talk about what happens for non-regular files... @@ -896,12 +896,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Reject if isolation is enabled. if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op { this.reject_in_isolation("`fchmod`", reject_with)?; - return this.set_last_error_and_return_i32(LibcError("EACCES")); + return this.set_errno_and_return_neg1_i32(LibcError("EACCES")); } let permissions = this.host_permissions_from_mode(mode.try_into().unwrap())?; if let Err(err) = file.file.set_permissions(permissions) { - return this.set_last_error_and_return_i32(err); + return this.set_errno_and_return_neg1_i32(err); } interp_ok(Scalar::from_i32(0)) @@ -918,7 +918,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let newpath_ptr = this.read_pointer(newpath_op)?; if this.ptr_is_null(oldpath_ptr)? || this.ptr_is_null(newpath_ptr)? { - return this.set_last_error_and_return_i32(LibcError("EFAULT")); + return this.set_errno_and_return_neg1_i32(LibcError("EFAULT")); } let oldpath = this.read_path_from_c_str(oldpath_ptr)?; @@ -927,7 +927,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Reject if isolation is enabled. if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op { this.reject_in_isolation("`rename`", reject_with)?; - return this.set_last_error_and_return_i32(ErrorKind::PermissionDenied); + return this.set_errno_and_return_neg1_i32(ErrorKind::PermissionDenied); } let result = fs::rename(oldpath, newpath).map(|_| 0); @@ -950,7 +950,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Reject if isolation is enabled. if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op { this.reject_in_isolation("`mkdir`", reject_with)?; - return this.set_last_error_and_return_i32(ErrorKind::PermissionDenied); + return this.set_errno_and_return_neg1_i32(ErrorKind::PermissionDenied); } #[cfg_attr(not(unix), allow(unused_mut))] @@ -977,7 +977,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Reject if isolation is enabled. if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op { this.reject_in_isolation("`rmdir`", reject_with)?; - return this.set_last_error_and_return_i32(ErrorKind::PermissionDenied); + return this.set_errno_and_return_neg1_i32(ErrorKind::PermissionDenied); } let result = fs::remove_dir(path).map(|_| 0i32); @@ -1235,11 +1235,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Reject if isolation is enabled. if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op { this.reject_in_isolation("`closedir`", reject_with)?; - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); } let Some(mut open_dir) = this.machine.dirs.streams.remove(&dirp) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; if let Some(entry) = open_dir.entry.take() { this.deallocate_ptr(entry, None, MiriMemoryKind::Runtime.into())?; @@ -1257,11 +1257,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op { this.reject_in_isolation("`ftruncate64`", reject_with)?; // Set error code as "EBADF" (bad fd) - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); } let Some(fd) = this.machine.fds.get(fd_num) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; let Some(file) = fd.downcast::() else { @@ -1276,11 +1276,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let result = this.try_unwrap_io_result(result.map(|_| 0i32))?; interp_ok(Scalar::from_i32(result)) } else { - this.set_last_error_and_return_i32(LibcError("EINVAL")) + this.set_errno_and_return_neg1_i32(LibcError("EINVAL")) } } else { // The file is not writable - this.set_last_error_and_return_i32(LibcError("EINVAL")) + this.set_errno_and_return_neg1_i32(LibcError("EINVAL")) } } @@ -1356,7 +1356,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op { this.reject_in_isolation("`fsync`", reject_with)?; // Set error code as "EBADF" (bad fd) - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); } self.ffullsync_fd(fd) @@ -1365,7 +1365,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { fn ffullsync_fd(&mut self, fd_num: i32) -> InterpResult<'tcx, Scalar> { let this = self.eval_context_mut(); let Some(fd) = this.machine.fds.get(fd_num) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; // Only regular files support synchronization. let file = fd.downcast::().ok_or_else(|| { @@ -1384,11 +1384,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op { this.reject_in_isolation("`fdatasync`", reject_with)?; // Set error code as "EBADF" (bad fd) - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); } let Some(fd) = this.machine.fds.get(fd) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; // Only regular files support synchronization. let file = fd.downcast::().ok_or_else(|| { @@ -1413,24 +1413,24 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let flags = this.read_scalar(flags_op)?.to_i32()?; if offset < 0 || nbytes < 0 { - return this.set_last_error_and_return_i32(LibcError("EINVAL")); + return this.set_errno_and_return_neg1_i32(LibcError("EINVAL")); } let allowed_flags = this.eval_libc_i32("SYNC_FILE_RANGE_WAIT_BEFORE") | this.eval_libc_i32("SYNC_FILE_RANGE_WRITE") | this.eval_libc_i32("SYNC_FILE_RANGE_WAIT_AFTER"); if flags & allowed_flags != flags { - return this.set_last_error_and_return_i32(LibcError("EINVAL")); + return this.set_errno_and_return_neg1_i32(LibcError("EINVAL")); } // Reject if isolation is enabled. if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op { this.reject_in_isolation("`sync_file_range`", reject_with)?; // Set error code as "EBADF" (bad fd) - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); } let Some(fd) = this.machine.fds.get(fd) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; // Only regular files support synchronization. let file = fd.downcast::().ok_or_else(|| { @@ -1590,7 +1590,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Reject if isolation is enabled. if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op { this.reject_in_isolation("`mkstemp`", reject_with)?; - return this.set_last_error_and_return_i32(LibcError("EACCES")); + return this.set_errno_and_return_neg1_i32(LibcError("EACCES")); } // Get the bytes of the suffix we expect in _target_ encoding. @@ -1606,7 +1606,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // If we don't find the suffix, it is an error. if last_six_char_bytes != suffix_bytes { - return this.set_last_error_and_return_i32(LibcError("EINVAL")); + return this.set_errno_and_return_neg1_i32(LibcError("EINVAL")); } // At this point we know we have 6 ASCII 'X' characters as a suffix. @@ -1667,14 +1667,14 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { _ => { // "On error, -1 is returned, and errno is set to // indicate the error" - return this.set_last_error_and_return_i32(e); + return this.set_errno_and_return_neg1_i32(e); } }, } } // We ran out of attempts to create the file, return an error. - this.set_last_error_and_return_i32(LibcError("EEXIST")) + this.set_errno_and_return_neg1_i32(LibcError("EEXIST")) } } diff --git a/src/tools/miri/src/shims/unix/linux_like/epoll.rs b/src/tools/miri/src/shims/unix/linux_like/epoll.rs index d2d978bffee7d..3ecc2c1135de8 100644 --- a/src/tools/miri/src/shims/unix/linux_like/epoll.rs +++ b/src/tools/miri/src/shims/unix/linux_like/epoll.rs @@ -279,12 +279,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Throw EFAULT if epfd and fd have the same value. if epfd_value == fd { - return this.set_last_error_and_return_i32(LibcError("EFAULT")); + return this.set_errno_and_return_neg1_i32(LibcError("EFAULT")); } // Check if epfd is a valid epoll file descriptor. let Some(epfd) = this.machine.fds.get(epfd_value) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; let epfd = epfd .downcast::() @@ -293,7 +293,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let mut interest_list = epfd.interest_list.borrow_mut(); let Some(fd_ref) = this.machine.fds.get(fd) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; let id = fd_ref.id(); @@ -356,12 +356,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { }; if interest_list.try_insert(epoll_key, new_interest).is_err() { // We already had interest in this. - return this.set_last_error_and_return_i32(LibcError("EEXIST")); + return this.set_errno_and_return_neg1_i32(LibcError("EEXIST")); } } else { // Modify the existing interest. let Some(interest) = interest_list.get_mut(&epoll_key) else { - return this.set_last_error_and_return_i32(LibcError("ENOENT")); + return this.set_errno_and_return_neg1_i32(LibcError("ENOENT")); }; interest.relevant_events = events; interest.data = data; @@ -389,7 +389,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Remove epoll_event_interest from interest_list and ready_set. if interest_list.remove(&epoll_key).is_none() { // We did not have interest in this. - return this.set_last_error_and_return_i32(LibcError("ENOENT")); + return this.set_errno_and_return_neg1_i32(LibcError("ENOENT")); }; epfd.ready_set.borrow_mut().remove(&epoll_key); // If this was the last interest in this FD, remove us from the global list @@ -452,7 +452,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let timeout = this.read_scalar(timeout)?.to_i32()?; if epfd_value <= 0 || maxevents <= 0 { - return this.set_last_error_and_return(LibcError("EINVAL"), dest); + return this.set_errno_and_return_neg1(LibcError("EINVAL"), dest); } // This needs to come after the maxevents value check, or else maxevents.try_into().unwrap() @@ -463,10 +463,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { )?; let Some(epfd) = this.machine.fds.get(epfd_value) else { - return this.set_last_error_and_return(LibcError("EBADF"), dest); + return this.set_errno_and_return_neg1(LibcError("EBADF"), dest); }; let Some(epfd) = epfd.downcast::() else { - return this.set_last_error_and_return(LibcError("EBADF"), dest); + return this.set_errno_and_return_neg1(LibcError("EBADF"), dest); }; if timeout == 0 || !epfd.ready_set.borrow().is_empty() { diff --git a/src/tools/miri/src/shims/unix/linux_like/sync.rs b/src/tools/miri/src/shims/unix/linux_like/sync.rs index 5a1a9ed535941..87d73d7f2e286 100644 --- a/src/tools/miri/src/shims/unix/linux_like/sync.rs +++ b/src/tools/miri/src/shims/unix/linux_like/sync.rs @@ -64,7 +64,7 @@ pub fn futex<'tcx>( }; if bitset == 0 { - return ecx.set_last_error_and_return(LibcError("EINVAL"), dest); + return ecx.set_errno_and_return_neg1(LibcError("EINVAL"), dest); } let timeout = ecx.deref_pointer_as(timeout, ecx.libc_ty_layout("timespec"))?; @@ -72,7 +72,7 @@ pub fn futex<'tcx>( None } else { let Some(duration) = ecx.read_timespec(&timeout)? else { - return ecx.set_last_error_and_return(LibcError("EINVAL"), dest); + return ecx.set_errno_and_return_neg1(LibcError("EINVAL"), dest); }; let timeout_clock = if op & futex_realtime == futex_realtime { ecx.check_no_isolation( @@ -164,7 +164,7 @@ pub fn futex<'tcx>( ecx.write_int(0, &dest) } UnblockKind::TimedOut => { - ecx.set_last_error_and_return(LibcError("ETIMEDOUT"), &dest) + ecx.set_errno_and_return_neg1(LibcError("ETIMEDOUT"), &dest) } } ), @@ -172,7 +172,7 @@ pub fn futex<'tcx>( } else { // The futex value doesn't match the expected value, so we return failure // right away without sleeping: -1 and errno set to EAGAIN. - return ecx.set_last_error_and_return(LibcError("EAGAIN"), dest); + return ecx.set_errno_and_return_neg1(LibcError("EAGAIN"), dest); } } // FUTEX_WAKE: (int *addr, int op = FUTEX_WAKE, int val) @@ -189,7 +189,7 @@ pub fn futex<'tcx>( // Return an error code. (That seems nicer than silently doing something non-intuitive.) // This means that if an address gets reused by a new allocation, // we'll use an independent futex queue for this... that seems acceptable. - return ecx.set_last_error_and_return(LibcError("EFAULT"), dest); + return ecx.set_errno_and_return_neg1(LibcError("EFAULT"), dest); }; let futex_ref = futex_ref.futex.clone(); @@ -205,7 +205,7 @@ pub fn futex<'tcx>( u32::MAX }; if bitset == 0 { - return ecx.set_last_error_and_return(LibcError("EINVAL"), dest); + return ecx.set_errno_and_return_neg1(LibcError("EINVAL"), dest); } // Together with the SeqCst fence in futex_wait, this makes sure that futex_wait // will see the latest value on addr which could be changed by our caller diff --git a/src/tools/miri/src/shims/unix/macos/sync.rs b/src/tools/miri/src/shims/unix/macos/sync.rs index ea0fd5c5b0a3c..b93dc48714506 100644 --- a/src/tools/miri/src/shims/unix/macos/sync.rs +++ b/src/tools/miri/src/shims/unix/macos/sync.rs @@ -163,7 +163,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { || clock_timeout .is_some_and(|(clock, _, timeout)| clock != absolute_clock || timeout == 0) { - this.set_last_error_and_return(LibcError("EINVAL"), dest)?; + this.set_errno_and_return_neg1(LibcError("EINVAL"), dest)?; return interp_ok(()); } @@ -202,7 +202,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { futex.size.set(size); futex.shared.set(is_shared); } else if futex.size.get() != size || futex.shared.get() != is_shared { - this.set_last_error_and_return(LibcError("EINVAL"), dest)?; + this.set_errno_and_return_neg1(LibcError("EINVAL"), dest)?; return interp_ok(()); } @@ -226,7 +226,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { this.write_scalar(Scalar::from_i32(remaining), &dest) } UnblockKind::TimedOut => { - this.set_last_error_and_return(LibcError("ETIMEDOUT"), &dest) + this.set_errno_and_return_neg1(LibcError("ETIMEDOUT"), &dest) } } } @@ -264,7 +264,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Perform validation of the arguments. let addr = ptr.addr().bytes(); if addr == 0 || !matches!(size, 4 | 8) || (flags != none && flags != shared) { - this.set_last_error_and_return(LibcError("EINVAL"), dest)?; + this.set_errno_and_return_neg1(LibcError("EINVAL"), dest)?; return interp_ok(()); } @@ -282,19 +282,19 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // non-intuitive.) This means that if an address gets reused by a // new allocation, we'll use an independent futex queue for this... // that seems acceptable. - this.set_last_error_and_return(LibcError("ENOENT"), dest)?; + this.set_errno_and_return_neg1(LibcError("ENOENT"), dest)?; return interp_ok(()); }; if futex.futex.waiters() == 0 { - this.set_last_error_and_return(LibcError("ENOENT"), dest)?; + this.set_errno_and_return_neg1(LibcError("ENOENT"), dest)?; return interp_ok(()); // If there are waiters in the queue, they have all used the parameters // stored in `futex` (we check this in `os_sync_wait_on_address` above). // Detect mismatches between "our" parameters and the parameters used by // the waiters and return an error in that case. } else if futex.size.get() != size || futex.shared.get() != is_shared { - this.set_last_error_and_return(LibcError("EINVAL"), dest)?; + this.set_errno_and_return_neg1(LibcError("EINVAL"), dest)?; return interp_ok(()); } diff --git a/src/tools/miri/src/shims/unix/mem.rs b/src/tools/miri/src/shims/unix/mem.rs index 01aa5afafcc3d..c2ad7c0e9d0ab 100644 --- a/src/tools/miri/src/shims/unix/mem.rs +++ b/src/tools/miri/src/shims/unix/mem.rs @@ -132,11 +132,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // addr must be a multiple of the page size, but apart from that munmap is just implemented // as a dealloc. if !addr.addr().bytes().is_multiple_of(this.machine.page_size) { - return this.set_last_error_and_return_i32(LibcError("EINVAL")); + return this.set_errno_and_return_neg1_i32(LibcError("EINVAL")); } let Some(length) = length.checked_next_multiple_of(this.machine.page_size) else { - return this.set_last_error_and_return_i32(LibcError("EINVAL")); + return this.set_errno_and_return_neg1_i32(LibcError("EINVAL")); }; if length > this.target_usize_max() { this.set_last_error(LibcError("EINVAL"))?; diff --git a/src/tools/miri/src/shims/unix/socket.rs b/src/tools/miri/src/shims/unix/socket.rs index 2e9a26974eff5..e7754ceedd7c5 100644 --- a/src/tools/miri/src/shims/unix/socket.rs +++ b/src/tools/miri/src/shims/unix/socket.rs @@ -295,7 +295,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Reject if isolation is enabled if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op { this.reject_in_isolation("`socket`", reject_with)?; - return this.set_last_error_and_return_i32(LibcError("EACCES")); + return this.set_errno_and_return_neg1_i32(LibcError("EACCES")); } let mut is_sock_nonblock = false; @@ -369,17 +369,17 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let socket = this.read_scalar(socket)?.to_i32()?; let address = match this.read_socket_address(address, address_len, "bind")? { Ok(addr) => addr, - Err(e) => return this.set_last_error_and_return_i32(e), + Err(e) => return this.set_errno_and_return_neg1_i32(e), }; // Get the file handle let Some(fd) = this.machine.fds.get(socket) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; let Some(socket) = fd.downcast::() else { // Man page specifies to return ENOTSOCK if `fd` is not a socket. - return this.set_last_error_and_return_i32(LibcError("ENOTSOCK")); + return this.set_errno_and_return_neg1_i32(LibcError("ENOTSOCK")); }; assert!(this.machine.communicate(), "cannot have `Socket` with isolation enabled!"); @@ -407,7 +407,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // See LibcError("EAFNOSUPPORT") }; - return this.set_last_error_and_return_i32(err); + return this.set_errno_and_return_neg1_i32(err); } *state = SocketState::Bound(address); @@ -437,12 +437,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Get the file handle let Some(fd) = this.machine.fds.get(socket) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; let Some(socket) = fd.downcast::() else { // Man page specifies to return ENOTSOCK if `fd` is not a socket. - return this.set_last_error_and_return_i32(LibcError("ENOTSOCK")); + return this.set_errno_and_return_neg1_i32(LibcError("ENOTSOCK")); }; assert!(this.machine.communicate(), "cannot have `Socket` with isolation enabled!"); @@ -460,7 +460,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // we now have an associated host socket. this.machine.blocking_io.register(socket); } - Err(e) => return this.set_last_error_and_return_i32(e), + Err(e) => return this.set_errno_and_return_neg1_i32(e), }, SocketState::Initial => { throw_unsup_format!( @@ -500,12 +500,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Get the file handle let Some(fd) = this.machine.fds.get(socket) else { - return this.set_last_error_and_return(LibcError("EBADF"), dest); + return this.set_errno_and_return_neg1(LibcError("EBADF"), dest); }; let Some(socket) = fd.downcast::() else { // Man page specifies to return ENOTSOCK if `fd` is not a socket. - return this.set_last_error_and_return(LibcError("ENOTSOCK"), dest); + return this.set_errno_and_return_neg1(LibcError("ENOTSOCK"), dest); }; assert!(this.machine.communicate(), "cannot have `Socket` with isolation enabled!"); @@ -562,7 +562,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // See . this.write_scalar(Scalar::from_int(sockfd, dest.layout.size), dest) } - Err(e) => this.set_last_error_and_return(e, dest), + Err(e) => this.set_errno_and_return_neg1(e, dest), } } else { // The socket is in blocking mode and thus the accept call should block @@ -590,17 +590,17 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let socket = this.read_scalar(socket)?.to_i32()?; let address = match this.read_socket_address(address, address_len, "connect")? { Ok(address) => address, - Err(e) => return this.set_last_error_and_return(e, dest), + Err(e) => return this.set_errno_and_return_neg1(e, dest), }; // Get the file handle let Some(fd) = this.machine.fds.get(socket) else { - return this.set_last_error_and_return(LibcError("EBADF"), dest); + return this.set_errno_and_return_neg1(LibcError("EBADF"), dest); }; let Some(socket) = fd.downcast::() else { // Man page specifies to return ENOTSOCK if `fd` is not a socket - return this.set_last_error_and_return(LibcError("ENOTSOCK"), dest); + return this.set_errno_and_return_neg1(LibcError("ENOTSOCK"), dest); }; assert!(this.machine.communicate(), "cannot have `Socket` with isolation enabled!"); @@ -610,7 +610,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { SocketState::Initial => { /* fall-through to below */ } // The socket is already in a connecting state. SocketState::Connecting(_) => - return this.set_last_error_and_return(LibcError("EALREADY"), dest), + return this.set_errno_and_return_neg1(LibcError("EALREADY"), dest), // We don't return EISCONN for already connected sockets, for which we're // sure that the connection is established, since TCP sockets are usually // allowed to be connected multiple times. @@ -630,7 +630,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // we now have an associated host socket. this.machine.blocking_io.register(socket.clone()); } - Err(e) => return this.set_last_error_and_return(e, dest), + Err(e) => return this.set_errno_and_return_neg1(e, dest), }; if socket.is_non_block.get() { @@ -640,7 +640,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Since the [`TcpStream::connect`] function of mio hides the EINPROGRESS // we just always return EINPROGRESS and check whether the connection succeeded // once we want to use the connected socket. - this.set_last_error_and_return(LibcError("EINPROGRESS"), dest) + this.set_errno_and_return_neg1(LibcError("EINPROGRESS"), dest) } else { // The socket is in blocking mode and thus the connect call should block // until the connection with the server is established. @@ -661,7 +661,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // that it has been consumed by `ensure_connected` // and is now stored in `socket.error`. let err = socket.error.take().unwrap(); - this.set_last_error_and_return(err, &dest) + this.set_errno_and_return_neg1(err, &dest) } else { this.write_scalar(Scalar::from_i32(0), &dest) } @@ -691,12 +691,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Get the file handle let Some(fd) = this.machine.fds.get(socket) else { - return this.set_last_error_and_return(LibcError("EBADF"), dest); + return this.set_errno_and_return_neg1(LibcError("EBADF"), dest); }; let Some(socket) = fd.downcast::() else { // Man page specifies to return ENOTSOCK if `fd` is not a socket - return this.set_last_error_and_return(LibcError("ENOTSOCK"), dest); + return this.set_errno_and_return_neg1(LibcError("ENOTSOCK"), dest); }; let mut is_op_non_block = false; @@ -748,7 +748,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { dest: MPlaceTy<'tcx>, } |this, result: Result<(), ()>| { if result.is_err() { - return this.set_last_error_and_return(LibcError("ENOTCONN"), &dest) + return this.set_errno_and_return_neg1(LibcError("ENOTCONN"), &dest) } if is_op_non_block || socket.is_non_block.get() { @@ -756,7 +756,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // thus don't want to block until we can send. match this.try_non_block_send(&socket, buffer_ptr, length)? { Ok(size) => this.write_scalar(Scalar::from_target_isize(size.try_into().unwrap(), this), &dest), - Err(e) => this.set_last_error_and_return(e, &dest), + Err(e) => this.set_errno_and_return_neg1(e, &dest), } } else { // The socket is in blocking mode and thus the send call should block @@ -770,7 +770,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } |this, result: Result| { match result { Ok(size) => this.write_scalar(Scalar::from_target_isize(size.try_into().unwrap(), this), &dest), - Err(e) => this.set_last_error_and_return(e, &dest) + Err(e) => this.set_errno_and_return_neg1(e, &dest) } }), ) @@ -800,12 +800,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Get the file handle let Some(fd) = this.machine.fds.get(socket) else { - return this.set_last_error_and_return(LibcError("EBADF"), dest); + return this.set_errno_and_return_neg1(LibcError("EBADF"), dest); }; let Some(socket) = fd.downcast::() else { // Man page specifies to return ENOTSOCK if `fd` is not a socket - return this.set_last_error_and_return(LibcError("ENOTSOCK"), dest); + return this.set_errno_and_return_neg1(LibcError("ENOTSOCK"), dest); }; let mut should_peek = false; @@ -869,7 +869,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { dest: MPlaceTy<'tcx>, } |this, result: Result<(), ()>| { if result.is_err() { - return this.set_last_error_and_return(LibcError("ENOTCONN"), &dest) + return this.set_errno_and_return_neg1(LibcError("ENOTCONN"), &dest) } if is_op_non_block || socket.is_non_block.get() { @@ -877,7 +877,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // thus don't want to block until we can receive. match this.try_non_block_recv(&socket, buffer_ptr, length, should_peek)? { Ok(size) => this.write_scalar(Scalar::from_target_isize(size.try_into().unwrap(), this), &dest), - Err(e) => this.set_last_error_and_return(e, &dest), + Err(e) => this.set_errno_and_return_neg1(e, &dest), } } else { // The socket is in blocking mode and thus the receive call should block @@ -892,7 +892,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } |this, result: Result| { match result { Ok(size) => this.write_scalar(Scalar::from_target_isize(size.try_into().unwrap(), this), &dest), - Err(e) => this.set_last_error_and_return(e, &dest) + Err(e) => this.set_errno_and_return_neg1(e, &dest) } }), ) @@ -921,12 +921,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Get the file handle let Some(fd) = this.machine.fds.get(socket) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; let Some(socket) = fd.downcast::() else { // Man page specifies to return ENOTSOCK if `fd` is not a socket. - return this.set_last_error_and_return_i32(LibcError("ENOTSOCK")); + return this.set_errno_and_return_neg1_i32(LibcError("ENOTSOCK")); }; if level == this.eval_libc_i32("SOL_SOCKET") { @@ -939,7 +939,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { if option_name == opt_so_nosigpipe { if option_len != 4 { // Option value should be C-int which is usually 4 bytes. - return this.set_last_error_and_return_i32(LibcError("EINVAL")); + return this.set_errno_and_return_neg1_i32(LibcError("EINVAL")); } let option_value = this.ptr_to_mplace(option_value_ptr, this.machine.layouts.i32); @@ -953,7 +953,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { if option_name == opt_so_reuseaddr { if option_len != 4 { // Option value should be C-int which is usually 4 bytes. - return this.set_last_error_and_return_i32(LibcError("EINVAL")); + return this.set_errno_and_return_neg1_i32(LibcError("EINVAL")); } let option_value = this.ptr_to_mplace(option_value_ptr, this.machine.layouts.i32); let _val = this.read_scalar(&option_value)?.to_i32()?; @@ -971,7 +971,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { if option_name == opt_ip_ttl { if option_len != 4 { // Option value should be C-uint which is usually 4 bytes. - return this.set_last_error_and_return_i32(LibcError("EINVAL")); + return this.set_errno_and_return_neg1_i32(LibcError("EINVAL")); } let option_value = this.ptr_to_mplace(option_value_ptr, this.machine.layouts.u32); let ttl = this.read_scalar(&option_value)?.to_u32()?; @@ -990,7 +990,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { return match result { Ok(_) => interp_ok(Scalar::from_i32(0)), - Err(e) => this.set_last_error_and_return_i32(e), + Err(e) => this.set_errno_and_return_neg1_i32(e), }; } else { throw_unsup_format!( @@ -1003,7 +1003,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { if option_name == opt_tcp_nodelay { if option_len != 4 { // Option value should be C-int which is usually 4 bytes. - return this.set_last_error_and_return_i32(LibcError("EINVAL")); + return this.set_errno_and_return_neg1_i32(LibcError("EINVAL")); } let option_value = this.ptr_to_mplace(option_value_ptr, this.machine.layouts.i32); let nodelay = this.read_scalar(&option_value)?.to_i32()? != 0; @@ -1021,7 +1021,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { return match result { Ok(_) => interp_ok(Scalar::from_i32(0)), - Err(e) => this.set_last_error_and_return_i32(e), + Err(e) => this.set_errno_and_return_neg1_i32(e), }; } else { throw_unsup_format!( @@ -1059,18 +1059,18 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Get the file handle let Some(fd) = this.machine.fds.get(socket) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; let Some(socket) = fd.downcast::() else { // Man page specifies to return ENOTSOCK if `fd` is not a socket. - return this.set_last_error_and_return_i32(LibcError("ENOTSOCK")); + return this.set_errno_and_return_neg1_i32(LibcError("ENOTSOCK")); }; if option_value_ptr == Pointer::null() || option_len_ptr == Pointer::null() { // This socket option returns a value and thus we need to return EFAULT // when either the value or the length pointers are null pointers. - return this.set_last_error_and_return_i32(LibcError("EFAULT")); + return this.set_errno_and_return_neg1_i32(LibcError("EFAULT")); } let socklen_layout = this.libc_ty_layout("socklen_t"); @@ -1132,7 +1132,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let ttl = match ttl { Ok(ttl) => ttl, - Err(e) => return this.set_last_error_and_return_i32(e), + Err(e) => return this.set_errno_and_return_neg1_i32(e), }; // Allocate new buffer on the stack with the `u32` layout. @@ -1161,7 +1161,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let nodelay = match nodelay { Ok(nodelay) => nodelay, - Err(e) => return this.set_last_error_and_return_i32(e), + Err(e) => return this.set_errno_and_return_neg1_i32(e), }; // Allocate new buffer on the stack with the `i32` layout. @@ -1220,12 +1220,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Get the file handle let Some(fd) = this.machine.fds.get(socket) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; let Some(socket) = fd.downcast::() else { // Man page specifies to return ENOTSOCK if `fd` is not a socket. - return this.set_last_error_and_return_i32(LibcError("ENOTSOCK")); + return this.set_errno_and_return_neg1_i32(LibcError("ENOTSOCK")); }; assert!(this.machine.communicate(), "cannot have `Socket` with isolation enabled!"); @@ -1250,7 +1250,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { SocketState::Listening(listener) => match listener.local_addr() { Ok(address) => address, - Err(e) => return this.set_last_error_and_return_i32(e), + Err(e) => return this.set_errno_and_return_neg1_i32(e), }, SocketState::Connecting(stream) | SocketState::Connected(stream) => { if cfg!(windows) && matches!(&*state, SocketState::Connecting(_)) { @@ -1267,7 +1267,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } match stream.local_addr() { Ok(address) => address, - Err(e) => return this.set_last_error_and_return_i32(e), + Err(e) => return this.set_errno_and_return_neg1_i32(e), } } // For non-bound sockets the POSIX manual says the returned address is unspecified. @@ -1296,12 +1296,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Get the file handle let Some(fd) = this.machine.fds.get(socket) else { - return this.set_last_error_and_return(LibcError("EBADF"), dest); + return this.set_errno_and_return_neg1(LibcError("EBADF"), dest); }; let Some(socket) = fd.downcast::() else { // Man page specifies to return ENOTSOCK if `fd` is not a socket. - return this.set_last_error_and_return(LibcError("ENOTSOCK"), dest); + return this.set_errno_and_return_neg1(LibcError("ENOTSOCK"), dest); }; assert!(this.machine.communicate(), "cannot have `Socket` with isolation enabled!"); @@ -1322,7 +1322,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { dest: MPlaceTy<'tcx>, } |this, result: Result<(), ()>| { if result.is_err() { - return this.set_last_error_and_return(LibcError("ENOTCONN"), &dest) + return this.set_errno_and_return_neg1(LibcError("ENOTCONN"), &dest) }; let SocketState::Connected(stream) = &*socket.state.borrow() else { @@ -1331,7 +1331,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let address = match stream.peer_addr() { Ok(address) => address, - Err(e) => return this.set_last_error_and_return(e, &dest), + Err(e) => return this.set_errno_and_return_neg1(e, &dest), }; this.write_socket_address( @@ -1354,12 +1354,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Get the file handle let Some(fd) = this.machine.fds.get(socket) else { - return this.set_last_error_and_return_i32(LibcError("EBADF")); + return this.set_errno_and_return_neg1_i32(LibcError("EBADF")); }; let Some(socket) = fd.downcast::() else { // Man page specifies to return ENOTSOCK if `fd` is not a socket. - return this.set_last_error_and_return_i32(LibcError("ENOTSOCK")); + return this.set_errno_and_return_neg1_i32(LibcError("ENOTSOCK")); }; assert!(this.machine.communicate(), "cannot have `Socket` with isolation enabled!"); @@ -1368,7 +1368,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let state = socket.state.borrow(); let (SocketState::Connecting(stream) | SocketState::Connected(stream)) = &*state else { - return this.set_last_error_and_return_i32(LibcError("ENOTCONN")); + return this.set_errno_and_return_neg1_i32(LibcError("ENOTCONN")); }; let is_read_shutdown = how == this.eval_libc_i32("SHUT_RD"); @@ -1380,11 +1380,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { _ if is_write_shutdown => Shutdown::Write, _ if is_read_write_shutdown => Shutdown::Both, // An invalid value was passed to `how`. - _ => return this.set_last_error_and_return_i32(LibcError("EINVAL")), + _ => return this.set_errno_and_return_neg1_i32(LibcError("EINVAL")), }; if let Err(e) = stream.shutdown(how) { - return this.set_last_error_and_return_i32(e); + return this.set_errno_and_return_neg1_i32(e); }; drop(state); @@ -1458,7 +1458,7 @@ trait EvalContextPrivExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // We need to block the thread again as it would still block. this.block_for_accept(socket, address_ptr, address_len_ptr, is_client_sock_nonblock, dest) } - Err(e) => this.set_last_error_and_return(e, &dest), + Err(e) => this.set_errno_and_return_neg1(e, &dest), } }), ) From 1c4042bc61916ed22fe2b6bf37134b76ea1b6403 Mon Sep 17 00:00:00 2001 From: The Miri Cronjob Bot Date: Wed, 20 May 2026 06:13:28 +0000 Subject: [PATCH 03/22] Prepare for merging from rust-lang/rust This updates the rust-version file to 1f8e04d34ab0c1fd9574840aa6db670e41593bfb. --- src/tools/miri/rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/miri/rust-version b/src/tools/miri/rust-version index 5e581cb38e5e6..4a823e1b6430d 100644 --- a/src/tools/miri/rust-version +++ b/src/tools/miri/rust-version @@ -1 +1 @@ -281c97c3240a9abd984ca0c6a2cd7389115e80d5 +1f8e04d34ab0c1fd9574840aa6db670e41593bfb From d4406dde640abf96fdddb74cc867ce47e650bd01 Mon Sep 17 00:00:00 2001 From: WhySoBad <49595640+WhySoBad@users.noreply.github.com> Date: Wed, 20 May 2026 08:35:26 +0200 Subject: [PATCH 04/22] fix: enable filling up write buffer on Windows hosts --- .../pass-dep/libc/libc-socket-no-blocking.rs | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/tools/miri/tests/pass-dep/libc/libc-socket-no-blocking.rs b/src/tools/miri/tests/pass-dep/libc/libc-socket-no-blocking.rs index 4ae7436cac654..ff941fccf7950 100644 --- a/src/tools/miri/tests/pass-dep/libc/libc-socket-no-blocking.rs +++ b/src/tools/miri/tests/pass-dep/libc/libc-socket-no-blocking.rs @@ -337,23 +337,23 @@ fn test_send_recv_nonblock() { .unwrap() }; - if !cfg!(windows_host) { - // Keep sending data until the buffer is full and we block. - // We cannot test this on Windows since there apparently the send buffer - // never fills up, at least for localhost connections. - - let fill_buf = [1u8; 5_000_000]; - // This fills the socket receive buffer and thus should start blocking. - let err = unsafe { + let fill_buf = [1u8; 32_000]; + // Keep sending data until the buffer is full and we would block. + loop { + let result = unsafe { libc_utils::write_all_generic( fill_buf.as_ptr().cast(), fill_buf.len(), libc_utils::NoRetry, |buf, count| libc::send(client_sockfd, buf, count, 0), ) - .unwrap_err() }; - assert_eq!(err.kind(), ErrorKind::WouldBlock) + + match result { + Ok(_) => { /* continue to fill buffer */ } + Err(err) if err.kind() == ErrorKind::WouldBlock => break, + Err(err) => panic!("unexpected error whilst filling up buffer: {err}"), + } } server_thread.join().unwrap(); @@ -453,23 +453,23 @@ fn test_send_recv_dontwait() { .unwrap() }; - if !cfg!(windows_host) { - // Keep sending data until the buffer is full and we block. - // We cannot test this on Windows since there apparently the send buffer - // never fills up, at least for localhost connections. - - let fill_buf = [1u8; 5_000_000]; - // This fills the socket receive buffer and thus should start blocking. - let err = unsafe { + let fill_buf = [1u8; 32_000]; + // Keep sending data until the buffer is full and we would block. + loop { + let result = unsafe { libc_utils::write_all_generic( fill_buf.as_ptr().cast(), fill_buf.len(), libc_utils::NoRetry, |buf, count| libc::send(client_sockfd, buf, count, libc::MSG_DONTWAIT), ) - .unwrap_err() }; - assert_eq!(err.kind(), ErrorKind::WouldBlock) + + match result { + Ok(_) => { /* continue to fill buffer */ } + Err(err) if err.kind() == ErrorKind::WouldBlock => break, + Err(err) => panic!("unexpected error whilst filling up buffer: {err}"), + } } server_thread.join().unwrap(); @@ -540,23 +540,23 @@ fn test_write_read_nonblock() { // Writing into the empty buffer should succeed without blocking. libc_utils::write_all(client_sockfd, TEST_BYTES).unwrap(); - if !cfg!(windows_host) { - // Keep sending data until the buffer is full and we block. - // We cannot test this on Windows since there apparently the send buffer - // never fills up, at least for localhost connections. - - let fill_buf = [1u8; 5_000_000]; - // This fills the socket receive buffer and thus should start blocking. - let err = unsafe { + let fill_buf = [1u8; 32_000]; + // Keep sending data until the buffer is full and we would block. + loop { + let result = unsafe { libc_utils::write_all_generic( fill_buf.as_ptr().cast(), fill_buf.len(), libc_utils::NoRetry, |buf, count| libc::write(client_sockfd, buf, count), ) - .unwrap_err() }; - assert_eq!(err.kind(), ErrorKind::WouldBlock) + + match result { + Ok(_) => { /* continue to fill buffer */ } + Err(err) if err.kind() == ErrorKind::WouldBlock => break, + Err(err) => panic!("unexpected error whilst filling up buffer: {err}"), + } } server_thread.join().unwrap(); From d4a8031c1fd74436079c29d7b6227f08c70b4ba2 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 24 May 2026 09:09:50 +0200 Subject: [PATCH 05/22] restrict vendor intrinsics to little-endian targets --- src/tools/miri/src/shims/foreign_items.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/tools/miri/src/shims/foreign_items.rs b/src/tools/miri/src/shims/foreign_items.rs index 7cd80b85784ff..bff93a7bb9d7a 100644 --- a/src/tools/miri/src/shims/foreign_items.rs +++ b/src/tools/miri/src/shims/foreign_items.rs @@ -2,7 +2,7 @@ use std::collections::hash_map::Entry; use std::io::Write; use std::path::Path; -use rustc_abi::{Align, CanonAbi, ExternAbi, Size}; +use rustc_abi::{Align, CanonAbi, Endian, ExternAbi, Size}; use rustc_ast::expand::allocator::NO_ALLOC_SHIM_IS_UNSTABLE; use rustc_data_structures::either::Either; use rustc_hir::attrs::Linkage; @@ -817,7 +817,9 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> { } // Used to implement the x86 `_mm{,256,512}_popcnt_epi{8,16,32,64}` and wasm // `{i,u}8x16_popcnt` functions. - name if name.starts_with("llvm.ctpop.v") => { + name if name.starts_with("llvm.ctpop.v") + && this.tcx.sess.target.endian == Endian::Little => + { let [op] = this.check_shim_sig_lenient(abi, CanonAbi::C, link_name, args)?; let (op, op_len) = this.project_to_simd(op)?; @@ -840,14 +842,16 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> { // Target-specific shims name if name.starts_with("llvm.x86.") - && matches!(this.tcx.sess.target.arch, Arch::X86 | Arch::X86_64) => + && matches!(this.tcx.sess.target.arch, Arch::X86 | Arch::X86_64) + && this.tcx.sess.target.endian == Endian::Little => { return shims::x86::EvalContextExt::emulate_x86_intrinsic( this, link_name, abi, args, dest, ); } name if name.starts_with("llvm.aarch64.") - && this.tcx.sess.target.arch == Arch::AArch64 => + && this.tcx.sess.target.arch == Arch::AArch64 + && this.tcx.sess.target.endian == Endian::Little => { return shims::aarch64::EvalContextExt::emulate_aarch64_intrinsic( this, link_name, abi, args, dest, From da3727f1935b69f610f1fb3f2cc9c00b08061399 Mon Sep 17 00:00:00 2001 From: Ben Kimock Date: Tue, 14 Apr 2026 22:10:51 -0400 Subject: [PATCH 06/22] Support running no_core Linux programs Co-authored-by: Ralf Jung --- src/tools/miri/src/concurrency/thread.rs | 7 ++++-- src/tools/miri/src/eval.rs | 21 ++++++++++++------ src/tools/miri/src/helpers.rs | 5 +++++ src/tools/miri/src/machine.rs | 22 ++++++++++++++----- .../miri/src/shims/unix/foreign_items.rs | 22 +++++++++++++++++-- .../src/shims/unix/freebsd/foreign_items.rs | 10 ++++++++- src/tools/miri/tests/pass/no_core.rs | 22 +++++++++++++++++++ 7 files changed, 91 insertions(+), 18 deletions(-) create mode 100644 src/tools/miri/tests/pass/no_core.rs diff --git a/src/tools/miri/src/concurrency/thread.rs b/src/tools/miri/src/concurrency/thread.rs index 2b293a59ddb70..4dabdb48c4f6e 100644 --- a/src/tools/miri/src/concurrency/thread.rs +++ b/src/tools/miri/src/concurrency/thread.rs @@ -962,8 +962,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let old_thread_id = this.machine.threads.set_active_thread_id(new_thread_id); // The child inherits its parent's cpu affinity. - if let Some(cpuset) = this.machine.thread_cpu_affinity.get(&old_thread_id).cloned() { - this.machine.thread_cpu_affinity.insert(new_thread_id, cpuset); + // Skips this if `machine.thread_cpu_affinity` is not initialized. + if let Some(thread_cpu_affinity) = &mut this.machine.thread_cpu_affinity + && let Some(cpuset) = thread_cpu_affinity.get(&old_thread_id).cloned() + { + thread_cpu_affinity.insert(new_thread_id, cpuset); } // Perform the function pointer load in the new thread frame. diff --git a/src/tools/miri/src/eval.rs b/src/tools/miri/src/eval.rs index cf4f7d689ac22..c9b2b7634b7b6 100644 --- a/src/tools/miri/src/eval.rs +++ b/src/tools/miri/src/eval.rs @@ -21,6 +21,7 @@ use rustc_target::spec::Os; use crate::concurrency::GenmcCtx; use crate::concurrency::thread::TlsAllocAction; use crate::diagnostics::report_leaks; +use crate::helpers::is_no_core; use crate::shims::{global_ctor, tls}; use crate::*; @@ -289,14 +290,20 @@ pub fn create_ecx<'tcx>( MiriMachine::new(config, layout_cx, genmc_ctx), ); - // Make sure we have MIR. We check MIR for some stable monomorphic function in libcore. - let sentinel = - helpers::try_resolve_path(tcx, &["core", "ascii", "escape_default"], Namespace::ValueNS); - if !matches!(sentinel, Some(s) if tcx.is_mir_available(s.def.def_id())) { - tcx.dcx().fatal( - "the current sysroot was built without `-Zalways-encode-mir`, or libcore seems missing.\n\ - Note that directly invoking the `miri` binary is not supported; please use `cargo miri` instead." + // Make sure we have MIR. We check MIR for some stable monomorphic function in libcore. However, + // if the current crate is #![no_core] it's fine to be missing the usual items from libcore. + if !is_no_core(tcx) { + let sentinel = helpers::try_resolve_path( + tcx, + &["core", "ascii", "escape_default"], + Namespace::ValueNS, ); + if !matches!(sentinel, Some(s) if tcx.is_mir_available(s.def.def_id())) { + tcx.dcx().fatal( + "the current sysroot was built without `-Zalways-encode-mir`, or libcore seems missing.\n\ + Note that directly invoking the `miri` binary is not supported; please use `cargo miri` instead." + ); + } } // Compute argc and argv from `config.args`. diff --git a/src/tools/miri/src/helpers.rs b/src/tools/miri/src/helpers.rs index 349cb2d664827..926dd0c24da3d 100644 --- a/src/tools/miri/src/helpers.rs +++ b/src/tools/miri/src/helpers.rs @@ -1085,6 +1085,11 @@ pub(crate) fn windows_check_buffer_size((success, len): (bool, u64)) -> u32 { } } +/// Check whether the local crate has the `#![no_core]` attribute. +pub fn is_no_core(tcx: TyCtxt<'_>) -> bool { + rustc_hir::find_attr!(tcx, crate, NoCore) +} + /// We don't support 16-bit systems, so let's have ergonomic conversion from `u32` to `usize`. pub trait ToUsize { fn to_usize(self) -> usize; diff --git a/src/tools/miri/src/machine.rs b/src/tools/miri/src/machine.rs index d0bde4b1f0523..80f392363ba01 100644 --- a/src/tools/miri/src/machine.rs +++ b/src/tools/miri/src/machine.rs @@ -40,6 +40,7 @@ use crate::concurrency::sync::SyncObj; use crate::concurrency::{ AllocDataRaceHandler, GenmcCtx, GenmcEvalContextExt as _, GlobalDataRaceHandler, weak_memory, }; +use crate::helpers::is_no_core; use crate::*; /// First real-time signal. @@ -546,7 +547,8 @@ pub struct MiriMachine<'tcx> { /// Stores which thread is eligible to run on which CPUs. /// This has no effect at all, it is just tracked to produce the correct result /// in `sched_getaffinity` - pub(crate) thread_cpu_affinity: FxHashMap, + /// This will be `None` when running `#![no_core]` crates. + pub(crate) thread_cpu_affinity: Option>, /// Precomputed `TyLayout`s for primitive data types that are commonly used inside Miri. pub(crate) layouts: PrimitiveLayouts<'tcx>, @@ -735,11 +737,19 @@ impl<'tcx> MiriMachine<'tcx> { config.num_cpus ); let threads = ThreadManager::new(config); - let mut thread_cpu_affinity = FxHashMap::default(); - if matches!(&tcx.sess.target.os, Os::Linux | Os::FreeBsd | Os::Android) { - thread_cpu_affinity - .insert(threads.active_thread(), CpuAffinityMask::new(&layout_cx, config.num_cpus)); - } + let thread_cpu_affinity = + if matches!(&tcx.sess.target.os, Os::Linux | Os::FreeBsd | Os::Android) + && !is_no_core(tcx) + { + let mut affinity = FxHashMap::default(); + affinity.insert( + threads.active_thread(), + CpuAffinityMask::new(&layout_cx, config.num_cpus), + ); + Some(affinity) + } else { + None + }; let blocking_io = BlockingIoManager::new(config.isolated_op == IsolatedOp::Allow) .expect("Couldn't create poll instance"); let alloc_addresses = diff --git a/src/tools/miri/src/shims/unix/foreign_items.rs b/src/tools/miri/src/shims/unix/foreign_items.rs index 467304defb9b6..fa2af98b9fc8d 100644 --- a/src/tools/miri/src/shims/unix/foreign_items.rs +++ b/src/tools/miri/src/shims/unix/foreign_items.rs @@ -1126,6 +1126,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let cpusetsize = this.read_target_usize(cpusetsize)?; let mask = this.read_pointer(mask)?; + if this.machine.thread_cpu_affinity.is_none() { + throw_unsup_format!( + "`sched_getaffinity` is not supported on #![no_core] programs" + ) + } + let thread_id = if pid == 0 { this.active_thread() } else if matches!(this.tcx.sess.target.os, Os::Linux | Os::Android) { @@ -1149,7 +1155,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } else if cpusetsize == 0 || cpusetsize.checked_rem(chunk_size).unwrap() != 0 { // we only copy whole chunks of size_of::() this.set_errno_and_return_neg1(LibcError("EINVAL"), dest)?; - } else if let Some(cpuset) = this.machine.thread_cpu_affinity.get(&thread_id) { + } else if let Some(cpuset) = + this.machine.thread_cpu_affinity.as_ref().unwrap().get(&thread_id) + { let cpuset = cpuset.clone(); // we only copy whole chunks of size_of::() let byte_count = @@ -1171,6 +1179,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let cpusetsize = this.read_target_usize(cpusetsize)?; let mask = this.read_pointer(mask)?; + if this.machine.thread_cpu_affinity.is_none() { + throw_unsup_format!( + "`sched_setaffinity` is not supported on #![no_core] programs" + ) + } + let thread_id = if pid == 0 { this.active_thread() } else if matches!(this.tcx.sess.target.os, Os::Linux | Os::Android) { @@ -1199,7 +1213,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { std::array::from_fn(|i| bits_slice.get(i).copied().unwrap_or(0)); match CpuAffinityMask::from_array(this, this.machine.num_cpus, bits_array) { Some(cpuset) => { - this.machine.thread_cpu_affinity.insert(thread_id, cpuset); + this.machine + .thread_cpu_affinity + .as_mut() + .unwrap() + .insert(thread_id, cpuset); this.write_null(dest)?; } None => { diff --git a/src/tools/miri/src/shims/unix/freebsd/foreign_items.rs b/src/tools/miri/src/shims/unix/freebsd/foreign_items.rs index db3975a5bdfa8..1cc87050e59d8 100644 --- a/src/tools/miri/src/shims/unix/freebsd/foreign_items.rs +++ b/src/tools/miri/src/shims/unix/freebsd/foreign_items.rs @@ -75,6 +75,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let set_size = this.read_target_usize(set_size)?; // measured in bytes let mask = this.read_pointer(mask)?; + if this.machine.thread_cpu_affinity.is_none() { + throw_unsup_format!( + "`cpuset_getaffinity` is not supported on #![no_core] programs" + ) + } + let _level_root = this.eval_libc_i32("CPU_LEVEL_ROOT"); let _level_cpuset = this.eval_libc_i32("CPU_LEVEL_CPUSET"); let level_which = this.eval_libc_i32("CPU_LEVEL_WHICH"); @@ -104,7 +110,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { throw_unsup_format!( "`cpuset_getaffinity` is only supported with `level` set to CPU_LEVEL_WHICH and `which` set to CPU_WHICH_PID." ); - } else if let Some(cpuset) = this.machine.thread_cpu_affinity.get(&id) { + } else if let Some(cpuset) = + this.machine.thread_cpu_affinity.as_ref().unwrap().get(&id) + { // `cpusetsize` must be large enough to contain the entire CPU mask. // FreeBSD only uses `cpusetsize` to verify that it's sufficient for the kernel's CPU mask. // If it's too small, the syscall returns ERANGE. diff --git a/src/tools/miri/tests/pass/no_core.rs b/src/tools/miri/tests/pass/no_core.rs new file mode 100644 index 0000000000000..0cbffcb1ae594 --- /dev/null +++ b/src/tools/miri/tests/pass/no_core.rs @@ -0,0 +1,22 @@ +//! Test that Miri is able to run no_core programs. +//! This ensures that we don't depend on any paths from core when no_core is set. + +#![no_std] +#![no_core] +#![no_main] +#![feature(rustc_attrs, no_core, lang_items, intrinsics)] +#![allow(internal_features)] + +#[lang = "pointee_sized"] +pub trait PointeeSized {} + +#[lang = "meta_sized"] +pub trait MetaSized: PointeeSized {} + +#[lang = "sized"] +pub trait Sized: MetaSized {} + +#[no_mangle] +fn miri_start(_argc: isize, _argv: *const *const u8) -> isize { + 0 +} From 30b942df981c0f41cce1b818e8a88c24b50ff107 Mon Sep 17 00:00:00 2001 From: Dominik Schwaiger Date: Wed, 20 May 2026 20:31:46 +0200 Subject: [PATCH 07/22] as_mut_ptr test update description Updates the description in the `tests/fail/tree_borrows/implicit_writes/as_mut_ptr.rs` test. The referenced file no longer exists. Co-authored-by: Ralf Jung --- .../miri/tests/fail/tree_borrows/implicit_writes/as_mut_ptr.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tools/miri/tests/fail/tree_borrows/implicit_writes/as_mut_ptr.rs b/src/tools/miri/tests/fail/tree_borrows/implicit_writes/as_mut_ptr.rs index 4e273a617e11a..99584f27e93bd 100644 --- a/src/tools/miri/tests/fail/tree_borrows/implicit_writes/as_mut_ptr.rs +++ b/src/tools/miri/tests/fail/tree_borrows/implicit_writes/as_mut_ptr.rs @@ -1,5 +1,4 @@ -// This code no longer works using implicit writes in tree borrows. -// This code tests that. The passing version is in `pass/tree_borrows/implicit_writes/as_mut_ptr.rs`. +// This code works in Tree Borrows without implicit writes, but is expected to fail with implicit writes. //@compile-flags: -Zmiri-tree-borrows -Zmiri-tree-borrows-implicit-writes fn main() { From cebc29f482754f34c8bc263653392ba1573236c6 Mon Sep 17 00:00:00 2001 From: WhySoBad <49595640+WhySoBad@users.noreply.github.com> Date: Wed, 20 May 2026 10:46:09 +0200 Subject: [PATCH 08/22] fix: deallocate temporary buffer on failed `readv` --- src/tools/miri/src/shims/unix/fd.rs | 5 +- .../pass-dep/libc/libc-socket-no-blocking.rs | 84 ++++++++++++++++++- 2 files changed, 87 insertions(+), 2 deletions(-) diff --git a/src/tools/miri/src/shims/unix/fd.rs b/src/tools/miri/src/shims/unix/fd.rs index dc13ced2b555f..d3e2d63e20765 100644 --- a/src/tools/miri/src/shims/unix/fd.rs +++ b/src/tools/miri/src/shims/unix/fd.rs @@ -488,7 +488,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { this.write_scalar(Scalar::from_target_isize(size.try_into().unwrap(), this), &dest)?; u64::try_from(size).unwrap() }, - Err(e) => return this.set_errno_and_return_neg1(e, &dest) + Err(e) => { + this.deallocate_ptr(tmp_ptr, None, MemoryKind::Stack)?; + return this.set_errno_and_return_neg1(e, &dest) + } }; let mut remaining_bytes = bytes_read; diff --git a/src/tools/miri/tests/pass-dep/libc/libc-socket-no-blocking.rs b/src/tools/miri/tests/pass-dep/libc/libc-socket-no-blocking.rs index 4ae7436cac654..71d62c1ce2bd2 100644 --- a/src/tools/miri/tests/pass-dep/libc/libc-socket-no-blocking.rs +++ b/src/tools/miri/tests/pass-dep/libc/libc-socket-no-blocking.rs @@ -10,8 +10,8 @@ mod libc_utils; use std::io::ErrorKind; -use std::thread; use std::time::Duration; +use std::{ptr, thread}; use libc_utils::*; @@ -50,6 +50,8 @@ fn main() { ))] test_send_recv_dontwait(); test_write_read_nonblock(); + test_readv_nonblock_err(); + test_writev_nonblock_err(); test_getsockname_ipv4_connect_nonblock(); @@ -562,6 +564,86 @@ fn test_write_read_nonblock() { server_thread.join().unwrap(); } +/// Test that Miri's internal temporary read buffer gets correctly deallocated when the +/// vectored read produces an error due to the socket read buffer being empty. +fn test_readv_nonblock_err() { + let (server_sockfd, addr) = net::make_listener_ipv4().unwrap(); + let client_sockfd = + unsafe { errno_result(libc::socket(libc::AF_INET, libc::SOCK_STREAM, 0)).unwrap() }; + + net::connect_ipv4(client_sockfd, addr).unwrap(); + net::accept_ipv4(server_sockfd).unwrap(); + + unsafe { + // Change client socket to be non-blocking. + errno_check(libc::fcntl(client_sockfd, libc::F_SETFL, libc::O_NONBLOCK)); + } + + let mut buffer = [0u8; TEST_BYTES.len()]; + let (buffer1, buffer2) = buffer.split_at_mut(2); + + let iov = [ + libc::iovec { iov_base: ptr::null_mut::(), iov_len: 0 as libc::size_t }, + libc::iovec { + iov_base: buffer1.as_mut_ptr().cast::(), + iov_len: buffer1.len() as libc::size_t, + }, + libc::iovec { + iov_base: buffer2.as_mut_ptr().cast::(), + iov_len: buffer2.len() as libc::size_t, + }, + ]; + + let err = unsafe { + errno_result(libc::readv(client_sockfd, iov.as_ptr(), iov.len() as libc::c_int)) + .unwrap_err() + }; + assert_eq!(err.kind(), ErrorKind::WouldBlock); +} + +/// Test that Miri's internal temporary write buffer gets correctly deallocated when the +/// vectored write produces an error due to the socket write buffer being full. +fn test_writev_nonblock_err() { + let (server_sockfd, addr) = net::make_listener_ipv4().unwrap(); + let client_sockfd = + unsafe { errno_result(libc::socket(libc::AF_INET, libc::SOCK_STREAM, 0)).unwrap() }; + + net::connect_ipv4(client_sockfd, addr).unwrap(); + net::accept_ipv4(server_sockfd).unwrap(); + + unsafe { + // Change client socket to be non-blocking. + errno_check(libc::fcntl(client_sockfd, libc::F_SETFL, libc::O_NONBLOCK)); + } + + let mut write_buffer = [1u8; 32_000]; + let (buffer1, buffer2) = write_buffer.split_at_mut(15_000); + + let iov = [ + libc::iovec { iov_base: ptr::null_mut::(), iov_len: 0 as libc::size_t }, + libc::iovec { + iov_base: buffer1.as_mut_ptr().cast::(), + iov_len: buffer1.len() as libc::size_t, + }, + libc::iovec { + iov_base: buffer2.as_mut_ptr().cast::(), + iov_len: buffer2.len() as libc::size_t, + }, + ]; + + loop { + let result = unsafe { + errno_result(libc::writev(client_sockfd, iov.as_ptr(), iov.len() as libc::c_int)) + }; + + match result { + Ok(_) => { /* continue filling buffer */ } + Err(err) if err.kind() == ErrorKind::WouldBlock => break, + Err(err) => panic!("unexpected error whilst filling up buffer: {err}"), + } + } +} + /// Test the `getsockname` syscall on a connecting IPv4 socket /// which is not connected. fn test_getsockname_ipv4_connect_nonblock() { From a799d97630d75b22e64780bb20687454baa72d60 Mon Sep 17 00:00:00 2001 From: Arpit Jain Date: Tue, 26 May 2026 16:15:20 +0900 Subject: [PATCH 09/22] ci(ci): declare workflow-level contents: read per RalfJung Per @RalfJung's review at #5040, adding the same permissions block to ci.yml as the sysroots PR. Signed-off-by: Arpit Jain --- src/tools/miri/.github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tools/miri/.github/workflows/ci.yml b/src/tools/miri/.github/workflows/ci.yml index b325a121c9a6a..14978c2b967b1 100644 --- a/src/tools/miri/.github/workflows/ci.yml +++ b/src/tools/miri/.github/workflows/ci.yml @@ -12,6 +12,9 @@ defaults: run: shell: bash +permissions: + contents: read + jobs: test: name: test (${{ matrix.host_target }}) From d9accd4d8ae784866c558a672930ad7d88244719 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 26 May 2026 15:01:47 +0200 Subject: [PATCH 10/22] mkstemp: do not silently do the wrong thing on non-Unix/Windows hosts --- src/tools/miri/src/shims/unix/fs.rs | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/tools/miri/src/shims/unix/fs.rs b/src/tools/miri/src/shims/unix/fs.rs index 67d25d78474e9..d221dc52a5852 100644 --- a/src/tools/miri/src/shims/unix/fs.rs +++ b/src/tools/miri/src/shims/unix/fs.rs @@ -1624,18 +1624,23 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let mut fopts = OpenOptions::new(); fopts.read(true).write(true).create_new(true); - #[cfg(unix)] - { - use std::os::unix::fs::OpenOptionsExt; - // Do not allow others to read or modify this file. - fopts.mode(0o600); - fopts.custom_flags(libc::O_EXCL); - } - #[cfg(windows)] - { - use std::os::windows::fs::OpenOptionsExt; - // Do not allow others to read or modify this file. - fopts.share_mode(0); + cfg_select! { + unix => + { + use std::os::unix::fs::OpenOptionsExt; + // Do not allow others to read or modify this file. + fopts.mode(0o600); + fopts.custom_flags(libc::O_EXCL); + } + windows => + { + use std::os::windows::fs::OpenOptionsExt; + // Do not allow others to read or modify this file. + fopts.share_mode(0); + } + _ => { + throw_unsup_format!("`mkstemp` is not supported on this host OS"); + } } // If the generated file already exists, we will try again `max_attempts` many times. From 2914eb788bdea26c2ba4bb4d85e9dd5e21828635 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 26 May 2026 15:03:07 +0200 Subject: [PATCH 11/22] non-Windows path handling: make the code match the comment --- src/tools/miri/src/shims/os_str.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/miri/src/shims/os_str.rs b/src/tools/miri/src/shims/os_str.rs index 78e7f2d418c30..7de1e7ed4081a 100644 --- a/src/tools/miri/src/shims/os_str.rs +++ b/src/tools/miri/src/shims/os_str.rs @@ -346,7 +346,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } Cow::Owned(OsString::from_wide(&path)) }; - #[cfg(unix)] + #[cfg(not(windows))] return if *target_os == Os::Windows { // Windows target, Unix host. let mut path: Vec = os_str.into_owned().into_encoded_bytes(); From ee8da29feb2be6a1e8a5c891840ff89bd452df46 Mon Sep 17 00:00:00 2001 From: WhySoBad <49595640+WhySoBad@users.noreply.github.com> Date: Wed, 13 May 2026 15:16:36 +0200 Subject: [PATCH 12/22] Add support for socket read and write timeouts --- src/tools/miri/src/clock.rs | 6 +- src/tools/miri/src/helpers.rs | 26 --- src/tools/miri/src/provenance_gc.rs | 2 +- src/tools/miri/src/shims/time.rs | 47 ++++ src/tools/miri/src/shims/unix/socket.rs | 207 ++++++++++++++---- .../miri/tests/pass-dep/libc/libc-socket.rs | 97 +++++++- src/tools/miri/tests/pass/shims/socket.rs | 56 +++++ 7 files changed, 366 insertions(+), 75 deletions(-) diff --git a/src/tools/miri/src/clock.rs b/src/tools/miri/src/clock.rs index 6556975095528..25b645189ce2a 100644 --- a/src/tools/miri/src/clock.rs +++ b/src/tools/miri/src/clock.rs @@ -11,12 +11,12 @@ use crate::MiriMachine; const NANOSECONDS_PER_BASIC_BLOCK: u128 = 5000; /// An instant (a fixed moment in time) in Miri's monotone clock. -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct Instant { kind: InstantKind, } -#[derive(Debug)] +#[derive(Clone, Debug)] enum InstantKind { Host(StdInstant), Virtual { nanoseconds: u128 }, @@ -134,7 +134,7 @@ impl MonotonicClock { } /// A deadline for some event to occur. -#[derive(Debug)] +#[derive(Clone, Debug)] pub enum Deadline { Monotonic(Instant), RealTime(SystemTime), diff --git a/src/tools/miri/src/helpers.rs b/src/tools/miri/src/helpers.rs index 349cb2d664827..c65ff125f61c6 100644 --- a/src/tools/miri/src/helpers.rs +++ b/src/tools/miri/src/helpers.rs @@ -1,6 +1,5 @@ use std::num::NonZero; use std::sync::Mutex; -use std::time::Duration; use std::{cmp, iter}; use rand::Rng; @@ -714,31 +713,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { this.write_scalar(value, &value_place) } - /// Parse a `timespec` struct and return it as a `std::time::Duration`. It returns `None` - /// if the value in the `timespec` struct is invalid. Some libc functions will return - /// `EINVAL` in this case. - fn read_timespec(&mut self, tp: &MPlaceTy<'tcx>) -> InterpResult<'tcx, Option> { - let this = self.eval_context_mut(); - let seconds_place = this.project_field(tp, FieldIdx::ZERO)?; - let seconds_scalar = this.read_scalar(&seconds_place)?; - let seconds = seconds_scalar.to_target_isize(this)?; - let nanoseconds_place = this.project_field(tp, FieldIdx::ONE)?; - let nanoseconds_scalar = this.read_scalar(&nanoseconds_place)?; - let nanoseconds = nanoseconds_scalar.to_target_isize(this)?; - - interp_ok(try { - // tv_sec must be non-negative. - let seconds: u64 = seconds.try_into().ok()?; - // tv_nsec must be non-negative. - let nanoseconds: u32 = nanoseconds.try_into().ok()?; - if nanoseconds >= 1_000_000_000 { - // tv_nsec must not be greater than 999,999,999. - None? - } - Duration::new(seconds, nanoseconds) - }) - } - /// Read bytes from a byte slice. fn read_byte_slice<'a>(&'a self, slice: &ImmTy<'tcx>) -> InterpResult<'tcx, &'a [u8]> where diff --git a/src/tools/miri/src/provenance_gc.rs b/src/tools/miri/src/provenance_gc.rs index 3656a9eaa87c2..c292f764d6d19 100644 --- a/src/tools/miri/src/provenance_gc.rs +++ b/src/tools/miri/src/provenance_gc.rs @@ -19,7 +19,7 @@ macro_rules! no_provenance { )+ } } -no_provenance!(i8 i16 i32 i64 isize u8 u16 u32 u64 usize bool ThreadId); +no_provenance!(i8 i16 i32 i64 isize u8 u16 u32 u64 usize bool ThreadId Deadline); impl VisitProvenance for &'static str { fn visit_provenance(&self, _visit: &mut VisitWith<'_>) {} diff --git a/src/tools/miri/src/shims/time.rs b/src/tools/miri/src/shims/time.rs index 9dfce51d2ea4a..acc0d5bc8841d 100644 --- a/src/tools/miri/src/shims/time.rs +++ b/src/tools/miri/src/shims/time.rs @@ -459,4 +459,51 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { ); interp_ok(()) } + + /// Parse a `timespec` struct and return it as a [`Duration`]. It returns [`None`] + /// if the value in the `timespec` struct is invalid. Some libc functions will return + /// EINVAL in this case. + fn read_timespec(&mut self, tp: &MPlaceTy<'tcx>) -> InterpResult<'tcx, Option> { + let this = self.eval_context_mut(); + let sec_field = this.project_field_named(tp, "tv_sec")?; + let sec = this.read_scalar(&sec_field)?.to_int(sec_field.layout.size)?; + let nsec_field = this.project_field_named(tp, "tv_nsec")?; + let nsec = this.read_scalar(&nsec_field)?.to_int(nsec_field.layout.size)?; + + interp_ok(try { + // tv_sec must be non-negative. + let seconds: u64 = sec.try_into().ok()?; + // tv_nsec must be non-negative. + let nanoseconds: u32 = nsec.try_into().ok()?; + if nanoseconds >= 1_000_000_000 { + // tv_nsec must not be greater than 999,999,999. + None? + } + Duration::new(seconds, nanoseconds) + }) + } + + /// Parse a `timeval` struct and return it as a [`Duration`]. It returns [`None`] + /// if the value in the `timeval` struct is invalid. Some libc functions will return + /// EINVAL in this case. + fn read_timeval(&mut self, tp: &MPlaceTy<'tcx>) -> InterpResult<'tcx, Option> { + let this = self.eval_context_mut(); + let sec_field = this.project_field_named(tp, "tv_sec")?; + let sec = this.read_scalar(&sec_field)?.to_int(sec_field.layout.size)?; + + let usec_field = this.project_field_named(tp, "tv_usec")?; + let usec = this.read_scalar(&usec_field)?.to_int(usec_field.layout.size)?; + + interp_ok(try { + // tv_sec must be non-negative. + let seconds: u64 = sec.try_into().ok()?; + // tv_usec must be non-negative. + let microseconds: u32 = usec.try_into().ok()?; + if microseconds >= 1_000_000 { + // tv_usec must not be greater than 999,999. + None? + } + Duration::new(seconds, microseconds.strict_mul(1000)) + }) + } } diff --git a/src/tools/miri/src/shims/unix/socket.rs b/src/tools/miri/src/shims/unix/socket.rs index e7754ceedd7c5..ae882f8ff3a40 100644 --- a/src/tools/miri/src/shims/unix/socket.rs +++ b/src/tools/miri/src/shims/unix/socket.rs @@ -3,6 +3,7 @@ use std::io; use std::io::Read; use std::net::{Ipv4Addr, Shutdown, SocketAddr, SocketAddrV4}; use std::sync::atomic::AtomicBool; +use std::time::Duration; use mio::event::Source; use mio::net::{TcpListener, TcpStream}; @@ -67,6 +68,18 @@ struct Socket { io_readiness: RefCell, /// [`Some`] when the socket had an async error which has not yet been fetched via `SO_ERROR`. error: RefCell>, + /// Read timeout of the socket. [`None`] means that reads can block indefinitely. + /// The timeout is applied to the monotonic clock (the Unix specification doesn't + /// specify which clock to use, but the monotonic clock is more common for + /// relative timeouts). + /// This is ignored when the socket is non-blocking. + read_timeout: Cell>, + /// Write timeout of the socket. [`None`] means that writes can block indefinitely. + /// The timeout is applied to the monotonic clock (the Unix specification doesn't + /// specify which clock to use, but the monotonic clock is more common + /// for relative timeouts). + /// This is ignored when the socket is non-blocking. + write_timeout: Cell>, } impl FileDescription for Socket { @@ -108,14 +121,16 @@ impl FileDescription for Socket { assert!(communicate_allowed, "cannot have `Socket` with isolation enabled!"); let socket = self; + let deadline = ecx.action_deadline(socket.is_non_block.get(), socket.read_timeout.get()); ecx.ensure_connected( socket.clone(), - !socket.is_non_block.get(), + deadline.clone(), "read", callback!( @capture<'tcx> { socket: FileDescriptionRef, + deadline: Option, ptr: Pointer, len: usize, finish: DynMachineCallback<'tcx, Result>, @@ -134,8 +149,8 @@ impl FileDescription for Socket { finish.call(this, result) } else { // The socket is in blocking mode and thus the read call should block - // until we can read some bytes from the socket. - this.block_for_recv(socket, ptr, len, /* should_peek */ false, finish) + // until we can read some bytes from the socket or the timeout exceeded. + this.block_for_recv(socket, deadline, ptr, len, /* should_peek */ false, finish) } } ), @@ -153,14 +168,16 @@ impl FileDescription for Socket { assert!(communicate_allowed, "cannot have `Socket` with isolation enabled!"); let socket = self; + let deadline = ecx.action_deadline(socket.is_non_block.get(), socket.write_timeout.get()); ecx.ensure_connected( socket.clone(), - !socket.is_non_block.get(), + deadline.clone(), "write", callback!( @capture<'tcx> { socket: FileDescriptionRef, + deadline: Option, ptr: Pointer, len: usize, finish: DynMachineCallback<'tcx, Result> @@ -179,8 +196,8 @@ impl FileDescription for Socket { return finish.call(this, result) } else { // The socket is in blocking mode and thus the write call should block - // until we can write some bytes into the socket. - this.block_for_send(socket, ptr, len, finish) + // until we can write some bytes into the socket or the timeout exceeded. + this.block_for_send(socket, deadline, ptr, len, finish) } } ), @@ -353,6 +370,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { is_non_block: Cell::new(is_sock_nonblock), io_readiness: RefCell::new(BlockingIoSourceReadiness::empty()), error: RefCell::new(None), + read_timeout: Cell::new(None), + write_timeout: Cell::new(None), }); interp_ok(Scalar::from_i32(fds.insert(fd))) @@ -567,6 +586,17 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } else { // The socket is in blocking mode and thus the accept call should block // until an incoming connection is ready. + + if socket.read_timeout.get().is_some() { + // Some Unixes like Linux also apply the SO_RCVTIMEO socket option + // to `accept` calls: + // + // This is currently not supported by Miri. + throw_unsup_format!( + "accept4: blocking accept is not supported when SO_RCVTIMEO is non-zero" + ) + } + this.block_for_accept( socket, address_ptr, @@ -645,11 +675,20 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // The socket is in blocking mode and thus the connect call should block // until the connection with the server is established. - let dest = dest.clone(); + if socket.write_timeout.get().is_some() { + // Some Unixes like Linux also apply the SO_SNDTIMEO socket option + // to `connect` calls: + // + // This is currently not supported by Miri. + throw_unsup_format!( + "connect: blocking connect is not supported when SO_SNDTIMEO is non-zero" + ) + } + let dest = dest.clone(); this.ensure_connected( socket.clone(), - /* should_wait */ true, + /* deadline */ None, "connect", callback!( @capture<'tcx> { @@ -729,29 +768,29 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { ); } - // If either the operation or the socket is non-blocking, we don't want - // to wait until the connection is established. - let should_wait = !is_op_non_block && !socket.is_non_block.get(); + let is_non_block = is_op_non_block || socket.is_non_block.get(); + let deadline = this.action_deadline(is_non_block, socket.write_timeout.get()); let dest = dest.clone(); this.ensure_connected( socket.clone(), - should_wait, + deadline.clone(), "send", callback!( @capture<'tcx> { socket: FileDescriptionRef, + deadline: Option, flags: i32, buffer_ptr: Pointer, length: usize, - is_op_non_block: bool, + is_non_block: bool, dest: MPlaceTy<'tcx>, } |this, result: Result<(), ()>| { if result.is_err() { return this.set_errno_and_return_neg1(LibcError("ENOTCONN"), &dest) } - if is_op_non_block || socket.is_non_block.get() { + if is_non_block { // We have a non-blocking operation or a non-blocking socket and // thus don't want to block until we can send. match this.try_non_block_send(&socket, buffer_ptr, length)? { @@ -760,9 +799,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } } else { // The socket is in blocking mode and thus the send call should block - // until we can send some bytes into the socket. + // until we can send some bytes into the socket or the timeout exceeded. this.block_for_send( socket, + deadline, buffer_ptr, length, callback!(@capture<'tcx> { @@ -850,29 +890,29 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { ); } - // If either the operation or the socket is non-blocking, we don't want - // to wait until the connection is established. - let should_wait = !is_op_non_block && !socket.is_non_block.get(); + let is_non_block = is_op_non_block || socket.is_non_block.get(); + let deadline = this.action_deadline(is_non_block, socket.read_timeout.get()); let dest = dest.clone(); this.ensure_connected( socket.clone(), - should_wait, + deadline.clone(), "recv", callback!( @capture<'tcx> { socket: FileDescriptionRef, + deadline: Option, buffer_ptr: Pointer, length: usize, should_peek: bool, - is_op_non_block: bool, + is_non_block: bool, dest: MPlaceTy<'tcx>, } |this, result: Result<(), ()>| { if result.is_err() { return this.set_errno_and_return_neg1(LibcError("ENOTCONN"), &dest) } - if is_op_non_block || socket.is_non_block.get() { + if is_non_block { // We have a non-blocking operation or a non-blocking socket and // thus don't want to block until we can receive. match this.try_non_block_recv(&socket, buffer_ptr, length, should_peek)? { @@ -881,9 +921,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } } else { // The socket is in blocking mode and thus the receive call should block - // until we can receive some bytes from the socket. + // until we can receive some bytes from the socket or the timeout exceeded. this.block_for_recv( socket, + deadline, buffer_ptr, length, should_peek, @@ -930,6 +971,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { }; if level == this.eval_libc_i32("SOL_SOCKET") { + let opt_so_rcvtimeo = this.eval_libc_i32("SO_RCVTIMEO"); + let opt_so_sndtimeo = this.eval_libc_i32("SO_SNDTIMEO"); let opt_so_reuseaddr = this.eval_libc_i32("SO_REUSEADDR"); if matches!(this.tcx.sess.target.os, Os::MacOs | Os::FreeBsd | Os::NetBsd) { @@ -950,6 +993,25 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } } + if option_name == opt_so_rcvtimeo || option_name == opt_so_sndtimeo { + let timeval_layout = this.libc_ty_layout("timeval"); + let option_value = this.ptr_to_mplace(option_value_ptr, timeval_layout); + + let timeout = match this.read_timeval(&option_value)? { + None => return this.set_errno_and_return_neg1_i32(LibcError("EINVAL")), + Some(Duration::ZERO) => None, + Some(duration) => Some(duration), + }; + + if option_name == opt_so_rcvtimeo { + socket.read_timeout.set(timeout); + } else { + socket.write_timeout.set(timeout); + } + + return interp_ok(Scalar::from_i32(0)); + } + if option_name == opt_so_reuseaddr { if option_len != 4 { // Option value should be C-int which is usually 4 bytes. @@ -1085,6 +1147,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // buffer, in which case we have to truncate. let value_buffer = if level == this.eval_libc_i32("SOL_SOCKET") { let opt_so_error = this.eval_libc_i32("SO_ERROR"); + let opt_so_rcvtimeo = this.eval_libc_i32("SO_RCVTIMEO"); + let opt_so_sndtimeo = this.eval_libc_i32("SO_SNDTIMEO"); if option_name == opt_so_error { // Reading SO_ERROR should always return the latest async error. Because our stored @@ -1109,6 +1173,28 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let value_buffer = this.allocate(this.machine.layouts.i32, MemoryKind::Stack)?; this.write_int(return_value, &value_buffer)?; value_buffer + } else if option_name == opt_so_rcvtimeo || option_name == opt_so_sndtimeo { + let timeout = if option_name == opt_so_rcvtimeo { + socket.read_timeout.get() + } else { + socket.write_timeout.get() + } + .unwrap_or_default(); + + let secs = timeout.as_secs(); + let usecs = timeout.subsec_micros(); + + let timeval_layout = this.libc_ty_layout("timeval"); + // Allocate new buffer on the stack with the `timeval` layout. + let timeval_buffer = this.allocate(timeval_layout, MemoryKind::Stack)?; + + let sec_field = this.project_field_named(&timeval_buffer, "tv_sec")?; + this.write_int(secs, &sec_field)?; + + let usec_field = this.project_field_named(&timeval_buffer, "tv_usec")?; + this.write_int(usecs, &usec_field)?; + + timeval_buffer } else { throw_unsup_format!( "getsockopt: option {option_name:#x} is unsupported for level SOL_SOCKET", @@ -1312,7 +1398,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // UNIX targets should return ENOTCONN when the connection is not yet established. this.ensure_connected( socket.clone(), - /* should_wait */ false, + // Check whether the socket is connected without blocking. + Some(this.machine.monotonic_clock.now().into()), "getpeername", callback!( @capture<'tcx> { @@ -1415,6 +1502,28 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { impl<'tcx> EvalContextPrivExt<'tcx> for crate::MiriInterpCx<'tcx> {} trait EvalContextPrivExt<'tcx>: crate::MiriInterpCxExt<'tcx> { + /// Get the deadline for an action (e.g. reading or writing). + /// When `is_non_block` is [`true`], the returned deadline is "now", i.e., + /// we wake up immediately if the action cannot be completed. + /// If `action_timeout` is `Some(duration)`, the returned deadline is in the + /// future be the specified `duration`. Otherwise, no deadline ([`None`]) is + /// returned, indicating that the action can block indefinitely. + fn action_deadline( + &self, + is_non_block: bool, + action_timeout: Option, + ) -> Option { + let this = self.eval_context_ref(); + + if is_non_block { + // Non-blocking sockets always have a zero timeout. + Some(this.machine.monotonic_clock.now().into()) + } else { + action_timeout + .map(|duration| this.machine.monotonic_clock.now().add_lossy(duration).into()) + } + } + /// Block the thread until there's an incoming connection or an error occurred. /// /// This recursively calls itself should the operation still block for some reason. @@ -1433,19 +1542,23 @@ trait EvalContextPrivExt<'tcx>: crate::MiriInterpCxExt<'tcx> { this.block_thread_for_io( socket.clone(), BlockingIoInterest::Read, - None, + /* deadline */ None, callback!(@capture<'tcx> { + socket: FileDescriptionRef, address_ptr: Pointer, address_len_ptr: Pointer, is_client_sock_nonblock: bool, - socket: FileDescriptionRef, dest: MPlaceTy<'tcx>, } |this, kind: UnblockKind| { - assert_eq!(kind, UnblockKind::Ready); - // Remove the blocking I/O interest for unblocking this thread. this.machine.blocking_io.remove_blocked_thread(socket.id(), this.machine.threads.active_thread()); + match kind { + UnblockKind::Ready => { /* fall-through to below */ }, + // When the read timeout is exceeded EAGAIN/EWOULDBLOCK is returned. + UnblockKind::TimedOut => return this.set_errno_and_return_neg1(LibcError("EWOULDBLOCK"), &dest) + } + match this.try_non_block_accept(&socket, address_ptr, address_len_ptr, is_client_sock_nonblock)? { Ok(sockfd) => { // We need to create the scalar using the destination size since @@ -1515,6 +1628,8 @@ trait EvalContextPrivExt<'tcx>: crate::MiriInterpCxExt<'tcx> { is_non_block: Cell::new(is_client_sock_nonblock), io_readiness: RefCell::new(BlockingIoSourceReadiness::empty()), error: RefCell::new(None), + read_timeout: Cell::new(None), + write_timeout: Cell::new(None), }); // Register the socket to the blocking I/O manager because // there is an associated host socket. @@ -1533,6 +1648,7 @@ trait EvalContextPrivExt<'tcx>: crate::MiriInterpCxExt<'tcx> { fn block_for_send( &mut self, socket: FileDescriptionRef, + deadline: Option, buffer_ptr: Pointer, length: usize, finish: DynMachineCallback<'tcx, Result>, @@ -1541,22 +1657,27 @@ trait EvalContextPrivExt<'tcx>: crate::MiriInterpCxExt<'tcx> { this.block_thread_for_io( socket.clone(), BlockingIoInterest::Write, - None, + deadline.clone(), callback!(@capture<'tcx> { socket: FileDescriptionRef, + deadline: Option, buffer_ptr: Pointer, length: usize, finish: DynMachineCallback<'tcx, Result>, } |this, kind: UnblockKind| { - assert_eq!(kind, UnblockKind::Ready); - // Remove the blocking I/O interest for unblocking this thread. this.machine.blocking_io.remove_blocked_thread(socket.id(), this.machine.threads.active_thread()); + match kind { + UnblockKind::Ready => { /* fall-through to below */ }, + // When the write timeout is exceeded EAGAIN/EWOULDBLOCK is returned. + UnblockKind::TimedOut => return finish.call(this, Err(LibcError("EWOULDBLOCK"))) + } + match this.try_non_block_send(&socket, buffer_ptr, length)? { Err(IoError::HostError(e)) if e.kind() == io::ErrorKind::WouldBlock => { // We need to block the thread again as it would still block. - this.block_for_send(socket, buffer_ptr, length, finish) + this.block_for_send(socket, deadline, buffer_ptr, length, finish) }, result => finish.call(this, result) } @@ -1647,6 +1768,7 @@ trait EvalContextPrivExt<'tcx>: crate::MiriInterpCxExt<'tcx> { fn block_for_recv( &mut self, socket: FileDescriptionRef, + deadline: Option, buffer_ptr: Pointer, length: usize, should_peek: bool, @@ -1656,23 +1778,28 @@ trait EvalContextPrivExt<'tcx>: crate::MiriInterpCxExt<'tcx> { this.block_thread_for_io( socket.clone(), BlockingIoInterest::Read, - None, + deadline.clone(), callback!(@capture<'tcx> { socket: FileDescriptionRef, + deadline: Option, buffer_ptr: Pointer, length: usize, should_peek: bool, finish: DynMachineCallback<'tcx, Result>, } |this, kind: UnblockKind| { - assert_eq!(kind, UnblockKind::Ready); - // Remove the blocking I/O interest for unblocking this thread. this.machine.blocking_io.remove_blocked_thread(socket.id(), this.machine.threads.active_thread()); + match kind { + UnblockKind::Ready => { /* fall-through to below */ }, + // When the read timeout is exceeded EAGAIN/EWOULDBLOCK is returned. + UnblockKind::TimedOut => return finish.call(this, Err(LibcError("EWOULDBLOCK"))) + } + match this.try_non_block_recv(&socket, buffer_ptr, length, should_peek)? { Err(IoError::HostError(e)) if e.kind() == io::ErrorKind::WouldBlock => { // We need to block the thread again as it would still block. - this.block_for_recv(socket, buffer_ptr, length, should_peek, finish) + this.block_for_recv(socket, deadline, buffer_ptr, length, should_peek, finish) }, result => finish.call(this, result) } @@ -1777,7 +1904,7 @@ trait EvalContextPrivExt<'tcx>: crate::MiriInterpCxExt<'tcx> { fn ensure_connected( &mut self, socket: FileDescriptionRef, - should_wait: bool, + deadline: Option, foreign_name: &'static str, action: DynMachineCallback<'tcx, Result<(), ()>>, ) -> InterpResult<'tcx> { @@ -1801,11 +1928,6 @@ trait EvalContextPrivExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // We're currently connecting. Since the underlying mio socket is non-blocking, // the only way to determine whether we are done connecting is by polling. - // If we should wait until the connection is established, the timeout is `None`. - // Otherwise, we use a zero duration timeout, i.e. we return immediately - // (but we still go through the scheduler once -- which is fine). - let deadline = - if should_wait { None } else { Some(this.machine.monotonic_clock.now().into()) }; this.block_thread_for_io( socket.clone(), @@ -1814,7 +1936,6 @@ trait EvalContextPrivExt<'tcx>: crate::MiriInterpCxExt<'tcx> { callback!( @capture<'tcx> { socket: FileDescriptionRef, - should_wait: bool, foreign_name: &'static str, action: DynMachineCallback<'tcx, Result<(), ()>>, } |this, kind: UnblockKind| { @@ -1822,9 +1943,7 @@ trait EvalContextPrivExt<'tcx>: crate::MiriInterpCxExt<'tcx> { this.machine.blocking_io.remove_blocked_thread(socket.id(), this.machine.threads.active_thread()); if UnblockKind::TimedOut == kind { - // We can only time out when `should_wait` is false. // This then means that the socket is not yet connected. - assert!(!should_wait); return action.call(this, Err(())) } diff --git a/src/tools/miri/tests/pass-dep/libc/libc-socket.rs b/src/tools/miri/tests/pass-dep/libc/libc-socket.rs index 1ecfba3ff6ff0..9262bfc8829a1 100644 --- a/src/tools/miri/tests/pass-dep/libc/libc-socket.rs +++ b/src/tools/miri/tests/pass-dep/libc/libc-socket.rs @@ -7,7 +7,7 @@ mod libc_utils; mod utils; use std::io::ErrorKind; -use std::time::Duration; +use std::time::{Duration, Instant}; use std::{ptr, thread}; use libc_utils::*; @@ -55,6 +55,9 @@ fn main() { test_shutdown_writable_after_read_close(); test_getsockopt_truncate(); + + test_sockopt_sndtimeo(); + test_sockopt_rcvtimeo(); } /// Test creating a socket and then closing it afterwards. @@ -759,3 +762,95 @@ fn test_getsockopt_truncate() { let long_ttl = unsafe { option_value.assume_init() }; assert_eq!(long_ttl, ttl); } + +/// Test setting and getting the SO_SNDTIMEO socket option. +/// Also test that writes don't block indefinitely when we +/// have a nonzero timeout. +fn test_sockopt_sndtimeo() { + let (server_sockfd, addr) = net::make_listener_ipv4().unwrap(); + let client_sockfd = + unsafe { errno_result(libc::socket(libc::AF_INET, libc::SOCK_STREAM, 0)).unwrap() }; + + net::connect_ipv4(client_sockfd, addr).unwrap(); + net::accept_ipv4(server_sockfd).unwrap(); + + let timeout = + net::getsockopt::(client_sockfd, libc::SOL_SOCKET, libc::SO_SNDTIMEO) + .unwrap(); + // By default, no write timeout should be set. + assert_eq!(timeout.tv_sec, 0); + assert_eq!(timeout.tv_usec, 0); + + // A 50 millisecond timeout. + let short_timeout = libc::timeval { tv_sec: 0, tv_usec: 50_000 }; + net::setsockopt(client_sockfd, libc::SOL_SOCKET, libc::SO_SNDTIMEO, short_timeout).unwrap(); + + let timeout = + net::getsockopt::(client_sockfd, libc::SOL_SOCKET, libc::SO_SNDTIMEO) + .unwrap(); + // We should now read the same value as we wrote above. + assert_eq!(timeout.tv_sec, short_timeout.tv_sec); + assert_eq!(timeout.tv_usec, short_timeout.tv_usec); + + let buffer = [1u8; 32_000]; + loop { + let before = Instant::now(); + let result = unsafe { + errno_result(libc::write(client_sockfd, buffer.as_ptr().cast(), buffer.len())) + }; + match result { + Ok(_) => { /* continue to fill up buffer */ } + // When we get an EAGAIN/EWOULDBLOCK when writing into a blocking socket, we know + // it's because of the write timeout exceeding because the write buffer + // is full. + Err(err) if err.kind() == ErrorKind::WouldBlock => { + // The last write should return an EAGAIN/EWOULDBLOCK after ~50ms instead + // of blocking indefinitely. + assert!(Instant::now().duration_since(before) >= Duration::from_millis(50)); + break; + } + Err(err) => panic!("unexpected error whilst filling up buffer: {err}"), + } + } +} + +/// Test setting and getting the SO_RCVTIMEO socket option. +/// Also test that reads don't block indefinitely when we +/// have a nonzero timeout. +fn test_sockopt_rcvtimeo() { + let (server_sockfd, addr) = net::make_listener_ipv4().unwrap(); + let client_sockfd = + unsafe { errno_result(libc::socket(libc::AF_INET, libc::SOCK_STREAM, 0)).unwrap() }; + + net::connect_ipv4(client_sockfd, addr).unwrap(); + net::accept_ipv4(server_sockfd).unwrap(); + + let timeout = + net::getsockopt::(client_sockfd, libc::SOL_SOCKET, libc::SO_RCVTIMEO) + .unwrap(); + // By default, no read timeout should be set. + assert_eq!(timeout.tv_sec, 0); + assert_eq!(timeout.tv_usec, 0); + + // A 50 millisecond timeout. + let short_timeout = libc::timeval { tv_sec: 0, tv_usec: 50_000 }; + net::setsockopt(client_sockfd, libc::SOL_SOCKET, libc::SO_RCVTIMEO, short_timeout).unwrap(); + + let timeout = + net::getsockopt::(client_sockfd, libc::SOL_SOCKET, libc::SO_RCVTIMEO) + .unwrap(); + // We should now read the same value as we wrote above. + assert_eq!(timeout.tv_sec, short_timeout.tv_sec); + assert_eq!(timeout.tv_usec, short_timeout.tv_usec); + + let mut buffer = [0u8; 16]; + // The read should return an EAGAIN/EWOULDBLOCK after ~10ms instead of blocking indefinitely. + let before = Instant::now(); + let err = unsafe { + errno_result(libc::read(client_sockfd, buffer.as_mut_ptr().cast(), buffer.len())) + .unwrap_err() + }; + assert_eq!(err.kind(), ErrorKind::WouldBlock); + // Ensure that we blocked for at least 50 milliseconds. + assert!(Instant::now().duration_since(before) >= Duration::from_millis(50)) +} diff --git a/src/tools/miri/tests/pass/shims/socket.rs b/src/tools/miri/tests/pass/shims/socket.rs index 335df02b54f82..785be17e2c0dc 100644 --- a/src/tools/miri/tests/pass/shims/socket.rs +++ b/src/tools/miri/tests/pass/shims/socket.rs @@ -4,6 +4,7 @@ use std::io::{ErrorKind, Read, Write}; use std::net::{Shutdown, TcpListener, TcpStream}; use std::thread; +use std::time::Duration; const TEST_BYTES: &[u8] = b"these are some test bytes!"; @@ -17,6 +18,8 @@ fn main() { test_shutdown(); test_sockopt_ttl(); test_sockopt_nodelay(); + test_sockopt_read_timeout(); + test_sockopt_write_timeout(); } fn test_create_ipv4_listener() { @@ -167,3 +170,56 @@ fn test_sockopt_nodelay() { stream.set_nodelay(false).unwrap(); assert_eq!(stream.nodelay().unwrap(), false); } + +/// Test setting and reading the SNDTIMEO socket option. +/// This also tests that a read won't block indefinitely +/// when the read timeout is set to [`Some`] duration. +fn test_sockopt_read_timeout() { + let listener = TcpListener::bind("127.0.0.1:0").unwrap(); + let address = listener.local_addr().unwrap(); + + let mut stream = TcpStream::connect(address).unwrap(); + let _other_end = listener.accept().unwrap(); + + // By default, reads on blocking sockets should block indefinitely. + assert_eq!(stream.read_timeout().unwrap(), None); + + let short_read_timeout = Some(Duration::from_millis(10)); + stream.set_read_timeout(short_read_timeout).unwrap(); + assert_eq!(stream.read_timeout().unwrap(), short_read_timeout); + + let mut buffer = [0u8; 128]; + // This should not block indefinitely and instead return EAGAIN/EWOULDBLOCK. + let err = stream.read(&mut buffer).unwrap_err(); + assert_eq!(err.kind(), ErrorKind::WouldBlock); +} + +/// Test setting and reading the RCVTIMEO socket option. +/// This also tests that a write won't block indefinitely when +/// the write timeout is set to [`Some`] duration. +fn test_sockopt_write_timeout() { + let listener = TcpListener::bind("127.0.0.1:0").unwrap(); + let address = listener.local_addr().unwrap(); + + let mut stream = TcpStream::connect(address).unwrap(); + let _other_end = listener.accept().unwrap(); + + // By default, writes on blocking sockets should block indefinitely. + assert_eq!(stream.write_timeout().unwrap(), None); + + let short_write_timeout = Some(Duration::from_millis(10)); + stream.set_write_timeout(short_write_timeout).unwrap(); + assert_eq!(stream.write_timeout().unwrap(), short_write_timeout); + + let fill_buffer = [1u8; 1024]; + loop { + match stream.write_all(&fill_buffer) { + Ok(_) => { /* continue to fill up buffer */ } + // When we get an EAGAIN/EWOULDBLOCK when writing into a blocking socket, + // we know it's because of the write timeout exceeding because the write + // buffer is full. + Err(err) if err.kind() == ErrorKind::WouldBlock => break, + Err(err) => panic!("unexpected error whilst filling up buffer: {err}"), + } + } +} From 5af8307320c6bfe115a8d07af89ce79648365c21 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 25 May 2026 14:23:00 -0700 Subject: [PATCH 13/22] Replace version placeholders with 1.97.0 (cherry picked from commit 54bca41297a0a7527f521675debe733efa224ae3) --- compiler/rustc_feature/src/accepted.rs | 2 +- compiler/rustc_feature/src/removed.rs | 2 +- compiler/rustc_feature/src/unstable.rs | 18 ++++++++--------- library/core/src/char/methods.rs | 2 +- library/core/src/iter/sources/repeat_n.rs | 2 +- library/core/src/num/int_macros.rs | 16 +++++++-------- library/core/src/num/nonzero.rs | 20 +++++++++---------- library/core/src/num/uint_macros.rs | 20 +++++++++---------- .../std_detect/src/detect/arch/loongarch.rs | 10 +++++----- 9 files changed, 46 insertions(+), 46 deletions(-) diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs index eaf8eddfff3a5..63c35ad4e122b 100644 --- a/compiler/rustc_feature/src/accepted.rs +++ b/compiler/rustc_feature/src/accepted.rs @@ -109,7 +109,7 @@ declare_features! ( /// Allows `cfg(target_feature = "...")`. (accepted, cfg_target_feature, "1.27.0", Some(29717)), /// Allows `cfg(target_has_atomic_primitive_alignment = "...")`. - (accepted, cfg_target_has_atomic_equal_alignment, "CURRENT_RUSTC_VERSION", Some(93822)), + (accepted, cfg_target_has_atomic_equal_alignment, "1.97.0", Some(93822)), /// Allows `cfg(target_vendor = "...")`. (accepted, cfg_target_vendor, "1.33.0", Some(29718)), /// Allows implementing `Clone` for closures where possible (RFC 2132). diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs index 53d5dda6d7f3f..431461e1ddf15 100644 --- a/compiler/rustc_feature/src/removed.rs +++ b/compiler/rustc_feature/src/removed.rs @@ -283,7 +283,7 @@ declare_features! ( (removed, string_deref_patterns, "1.94.0", Some(87121), Some("superseded by `deref_patterns`"), 150530), (removed, struct_inherit, "1.0.0", None, None), /// Allows the use of target_feature when a function is marked inline(always). - (removed, target_feature_inline_always, "CURRENT_RUSTC_VERSION", Some(145574), + (removed, target_feature_inline_always, "1.97.0", Some(145574), Some("removed because of unfixable soundness issues")), (removed, test_removed_feature, "1.0.0", None, None), /// Allows using items which are missing stability attributes diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index da45596d0b74e..39eedd5dc3d03 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -257,7 +257,7 @@ declare_features! ( /// Allows identifying the `compiler_builtins` crate. (internal, compiler_builtins, "1.13.0", None), /// Allows skipping `ConstParamTy_` trait implementation checks - (internal, const_param_ty_unchecked, "CURRENT_RUSTC_VERSION", None), + (internal, const_param_ty_unchecked, "1.97.0", None), /// Allows writing custom MIR (internal, custom_mir, "1.65.0", None), /// Implementation details of externally implementable items @@ -381,7 +381,7 @@ declare_features! ( /// Allows `extern "riscv-interrupt-m" fn()` and `extern "riscv-interrupt-s" fn()`. (unstable, abi_riscv_interrupt, "1.73.0", Some(111889)), /// Allows `extern "Swift" fn()`. - (unstable, abi_swift, "CURRENT_RUSTC_VERSION", Some(156481)), + (unstable, abi_swift, "1.97.0", Some(156481)), /// Allows `extern "x86-interrupt" fn()`. (unstable, abi_x86_interrupt, "1.17.0", Some(40180)), /// Allows additional const parameter types, such as `[u8; 10]` or user defined types @@ -426,7 +426,7 @@ declare_features! ( (unstable, c_variadic, "1.34.0", Some(44930)), /// Allows defining c-variadic functions on targets where this feature has not yet /// undergone sufficient testing for stabilization. - (unstable, c_variadic_experimental_arch, "CURRENT_RUSTC_VERSION", Some(155973)), + (unstable, c_variadic_experimental_arch, "1.97.0", Some(155973)), /// Allows defining c-variadic naked functions with any extern ABI that is allowed /// on c-variadic foreign functions. (unstable, c_variadic_naked_functions, "1.93.0", Some(148767)), @@ -445,7 +445,7 @@ declare_features! ( /// Allows `cfg(target_has_atomic_load_store = "...")`. (unstable, cfg_target_has_atomic, "1.60.0", Some(94039)), /// Allows `cfg(target_object_format = "...")`. - (unstable, cfg_target_object_format, "CURRENT_RUSTC_VERSION", Some(152586)), + (unstable, cfg_target_object_format, "1.97.0", Some(152586)), /// Allows `cfg(target_thread_local)`. (unstable, cfg_target_thread_local, "1.7.0", Some(29594)), /// Allows the use of `#[cfg(ub_checks)` to check if UB checks are enabled. @@ -513,7 +513,7 @@ declare_features! ( /// Allows giving unresolved imports a custom diagnostic message (unstable, diagnostic_on_unknown, "1.96.0", Some(152900)), /// Allows macros to customize macro argument matcher diagnostics. - (unstable, diagnostic_on_unmatch_args, "CURRENT_RUSTC_VERSION", Some(155642)), + (unstable, diagnostic_on_unmatch_args, "1.97.0", Some(155642)), /// Allows `#[doc(cfg(...))]`. (unstable, doc_cfg, "1.21.0", Some(43781)), /// Allows `#[doc(masked)]`. @@ -549,7 +549,7 @@ declare_features! ( /// Allows marking trait functions as `final` to prevent overriding impls (unstable, final_associated_functions, "1.95.0", Some(131179)), /// fma4 target feature on x86. - (unstable, fma4_target_feature, "CURRENT_RUSTC_VERSION", Some(155233)), + (unstable, fma4_target_feature, "1.97.0", Some(155233)), /// Controlling the behavior of fmt::Debug (unstable, fmt_debug, "1.82.0", Some(129709)), /// Allows using `#[align(...)]` on function items @@ -582,7 +582,7 @@ declare_features! ( /// Target features on hexagon. (unstable, hexagon_target_feature, "1.27.0", Some(150250)), /// Allows `impl(crate) trait Foo` restrictions. - (unstable, impl_restriction, "CURRENT_RUSTC_VERSION", Some(105077)), + (unstable, impl_restriction, "1.97.0", Some(105077)), /// Allows `impl Trait` to be used inside associated types (RFC 2515). (unstable, impl_trait_in_assoc_type, "1.70.0", Some(63063)), /// Allows `impl Trait` in bindings (`let`). @@ -639,7 +639,7 @@ declare_features! ( /// Allows qualified paths in struct expressions, struct patterns and tuple struct patterns. (unstable, more_qualified_paths, "1.54.0", Some(86935)), /// Allows `move(expr)` in closures. - (incomplete, move_expr, "CURRENT_RUSTC_VERSION", Some(155050)), + (incomplete, move_expr, "1.97.0", Some(155050)), /// The `movrs` target feature on x86. (unstable, movrs_target_feature, "1.88.0", Some(137976)), /// Allows the `multiple_supertrait_upcastable` lint. @@ -760,7 +760,7 @@ declare_features! ( /// Allows using the `#[used(linker)]` (or `#[used(compiler)]`) attribute. (unstable, used_with_arg, "1.60.0", Some(93798)), /// Allows view types. - (unstable, view_types, "CURRENT_RUSTC_VERSION", Some(155938)), + (unstable, view_types, "1.97.0", Some(155938)), /// Target features on wasm. (unstable, wasm_target_feature, "1.30.0", Some(150260)), /// Allows use of attributes in `where` clauses. diff --git a/library/core/src/char/methods.rs b/library/core/src/char/methods.rs index 13c20908c7d67..d8b7fe44e453a 100644 --- a/library/core/src/char/methods.rs +++ b/library/core/src/char/methods.rs @@ -1050,7 +1050,7 @@ impl char { /// ``` #[must_use] #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_const_stable(feature = "const_is_control", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "const_is_control", since = "1.97.0")] #[inline] pub const fn is_control(self) -> bool { // According to diff --git a/library/core/src/iter/sources/repeat_n.rs b/library/core/src/iter/sources/repeat_n.rs index 0d4ced1b0c8a6..c89026c16c5c6 100644 --- a/library/core/src/iter/sources/repeat_n.rs +++ b/library/core/src/iter/sources/repeat_n.rs @@ -104,7 +104,7 @@ impl fmt::Debug for RepeatN { /// Creates an empty iterator, like [`repeat_n(value, 0)`][`repeat_n`] /// but without needing any such value at hand. -#[stable(feature = "iter_repeat_n_default", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "iter_repeat_n_default", since = "1.97.0")] impl Default for RepeatN { fn default() -> Self { RepeatN { inner: None } diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs index 4e7be6f065c9b..01b846548547f 100644 --- a/library/core/src/num/int_macros.rs +++ b/library/core/src/num/int_macros.rs @@ -178,8 +178,8 @@ macro_rules! int_impl { /// assert_eq!(n.isolate_highest_one(), 0b_01000000); #[doc = concat!("assert_eq!(0_", stringify!($SelfT), ".isolate_highest_one(), 0);")] /// ``` - #[stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "isolate_most_least_significant_one", since = "1.97.0")] + #[rustc_const_stable(feature = "isolate_most_least_significant_one", since = "1.97.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] @@ -198,8 +198,8 @@ macro_rules! int_impl { /// assert_eq!(n.isolate_lowest_one(), 0b_00000100); #[doc = concat!("assert_eq!(0_", stringify!($SelfT), ".isolate_lowest_one(), 0);")] /// ``` - #[stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "isolate_most_least_significant_one", since = "1.97.0")] + #[rustc_const_stable(feature = "isolate_most_least_significant_one", since = "1.97.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] @@ -218,8 +218,8 @@ macro_rules! int_impl { #[doc = concat!("assert_eq!(0b1_0000_", stringify!($SelfT), ".highest_one(), Some(4));")] #[doc = concat!("assert_eq!(0b1_1111_", stringify!($SelfT), ".highest_one(), Some(4));")] /// ``` - #[stable(feature = "int_lowest_highest_one", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "int_lowest_highest_one", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "int_lowest_highest_one", since = "1.97.0")] + #[rustc_const_stable(feature = "int_lowest_highest_one", since = "1.97.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] @@ -238,8 +238,8 @@ macro_rules! int_impl { #[doc = concat!("assert_eq!(0b1_0000_", stringify!($SelfT), ".lowest_one(), Some(4));")] #[doc = concat!("assert_eq!(0b1_1111_", stringify!($SelfT), ".lowest_one(), Some(0));")] /// ``` - #[stable(feature = "int_lowest_highest_one", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "int_lowest_highest_one", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "int_lowest_highest_one", since = "1.97.0")] + #[rustc_const_stable(feature = "int_lowest_highest_one", since = "1.97.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs index 59c37a7ce9633..063657503bb8a 100644 --- a/library/core/src/num/nonzero.rs +++ b/library/core/src/num/nonzero.rs @@ -660,8 +660,8 @@ macro_rules! nonzero_integer { /// # Some(()) /// # } /// ``` - #[stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "isolate_most_least_significant_one", since = "1.97.0")] + #[rustc_const_stable(feature = "isolate_most_least_significant_one", since = "1.97.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] @@ -692,8 +692,8 @@ macro_rules! nonzero_integer { /// # Some(()) /// # } /// ``` - #[stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "isolate_most_least_significant_one", since = "1.97.0")] + #[rustc_const_stable(feature = "isolate_most_least_significant_one", since = "1.97.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] @@ -720,8 +720,8 @@ macro_rules! nonzero_integer { /// # Some(()) /// # } /// ``` - #[stable(feature = "int_lowest_highest_one", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "int_lowest_highest_one", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "int_lowest_highest_one", since = "1.97.0")] + #[rustc_const_stable(feature = "int_lowest_highest_one", since = "1.97.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] @@ -743,8 +743,8 @@ macro_rules! nonzero_integer { /// # Some(()) /// # } /// ``` - #[stable(feature = "int_lowest_highest_one", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "int_lowest_highest_one", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "int_lowest_highest_one", since = "1.97.0")] + #[rustc_const_stable(feature = "int_lowest_highest_one", since = "1.97.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] @@ -1962,8 +1962,8 @@ macro_rules! nonzero_integer_signedness_dependent_methods { /// # Some(()) /// # } /// ``` - #[stable(feature = "uint_bit_width", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "uint_bit_width", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "uint_bit_width", since = "1.97.0")] + #[rustc_const_stable(feature = "uint_bit_width", since = "1.97.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs index 9bf765f1c4ed9..3170143da9b30 100644 --- a/library/core/src/num/uint_macros.rs +++ b/library/core/src/num/uint_macros.rs @@ -237,8 +237,8 @@ macro_rules! uint_impl { #[doc = concat!("assert_eq!(0b1110_", stringify!($SelfT), ".bit_width(), 4);")] #[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.bit_width(), ", stringify!($BITS), ");")] /// ``` - #[stable(feature = "uint_bit_width", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "uint_bit_width", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "uint_bit_width", since = "1.97.0")] + #[rustc_const_stable(feature = "uint_bit_width", since = "1.97.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] @@ -257,8 +257,8 @@ macro_rules! uint_impl { /// assert_eq!(n.isolate_highest_one(), 0b_01000000); #[doc = concat!("assert_eq!(0_", stringify!($SelfT), ".isolate_highest_one(), 0);")] /// ``` - #[stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "isolate_most_least_significant_one", since = "1.97.0")] + #[rustc_const_stable(feature = "isolate_most_least_significant_one", since = "1.97.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] @@ -277,8 +277,8 @@ macro_rules! uint_impl { /// assert_eq!(n.isolate_lowest_one(), 0b_00000100); #[doc = concat!("assert_eq!(0_", stringify!($SelfT), ".isolate_lowest_one(), 0);")] /// ``` - #[stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "isolate_most_least_significant_one", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "isolate_most_least_significant_one", since = "1.97.0")] + #[rustc_const_stable(feature = "isolate_most_least_significant_one", since = "1.97.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] @@ -297,8 +297,8 @@ macro_rules! uint_impl { #[doc = concat!("assert_eq!(0b1_0000_", stringify!($SelfT), ".highest_one(), Some(4));")] #[doc = concat!("assert_eq!(0b1_1111_", stringify!($SelfT), ".highest_one(), Some(4));")] /// ``` - #[stable(feature = "int_lowest_highest_one", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "int_lowest_highest_one", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "int_lowest_highest_one", since = "1.97.0")] + #[rustc_const_stable(feature = "int_lowest_highest_one", since = "1.97.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] @@ -320,8 +320,8 @@ macro_rules! uint_impl { #[doc = concat!("assert_eq!(0b1_0000_", stringify!($SelfT), ".lowest_one(), Some(4));")] #[doc = concat!("assert_eq!(0b1_1111_", stringify!($SelfT), ".lowest_one(), Some(0));")] /// ``` - #[stable(feature = "int_lowest_highest_one", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "int_lowest_highest_one", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "int_lowest_highest_one", since = "1.97.0")] + #[rustc_const_stable(feature = "int_lowest_highest_one", since = "1.97.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] diff --git a/library/std_detect/src/detect/arch/loongarch.rs b/library/std_detect/src/detect/arch/loongarch.rs index 2e021cb4352fe..b37f44972a74f 100644 --- a/library/std_detect/src/detect/arch/loongarch.rs +++ b/library/std_detect/src/detect/arch/loongarch.rs @@ -35,19 +35,19 @@ features! { /// D @FEATURE: #[stable(feature = "stdarch_loongarch_feature", since = "1.89.0")] frecipe: "frecipe"; /// Frecipe - @FEATURE: #[stable(feature = "stdarch_loongarch_div32", since = "CURRENT_RUSTC_VERSION")] div32: "div32"; + @FEATURE: #[stable(feature = "stdarch_loongarch_div32", since = "1.97.0")] div32: "div32"; /// Div32 @FEATURE: #[stable(feature = "stdarch_loongarch_feature", since = "1.89.0")] lsx: "lsx"; /// LSX @FEATURE: #[stable(feature = "stdarch_loongarch_feature", since = "1.89.0")] lasx: "lasx"; /// LASX - @FEATURE: #[stable(feature = "stdarch_loongarch_lam_bh", since = "CURRENT_RUSTC_VERSION")] lam_bh: "lam-bh"; + @FEATURE: #[stable(feature = "stdarch_loongarch_lam_bh", since = "1.97.0")] lam_bh: "lam-bh"; /// LAM-BH - @FEATURE: #[stable(feature = "stdarch_loongarch_lamcas", since = "CURRENT_RUSTC_VERSION")] lamcas: "lamcas"; + @FEATURE: #[stable(feature = "stdarch_loongarch_lamcas", since = "1.97.0")] lamcas: "lamcas"; /// LAM-CAS - @FEATURE: #[stable(feature = "stdarch_loongarch_ld_seq_sa", since = "CURRENT_RUSTC_VERSION")] ld_seq_sa: "ld-seq-sa"; + @FEATURE: #[stable(feature = "stdarch_loongarch_ld_seq_sa", since = "1.97.0")] ld_seq_sa: "ld-seq-sa"; /// LD-SEQ-SA - @FEATURE: #[stable(feature = "stdarch_loongarch_scq", since = "CURRENT_RUSTC_VERSION")] scq: "scq"; + @FEATURE: #[stable(feature = "stdarch_loongarch_scq", since = "1.97.0")] scq: "scq"; /// SCQ @FEATURE: #[stable(feature = "stdarch_loongarch_feature", since = "1.89.0")] lbt: "lbt"; /// LBT From ff501bb91ee01b8b5385b30d282254d6477c56c2 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 26 May 2026 15:54:27 -0700 Subject: [PATCH 14/22] Bump stage0 to 1.97.0-beta.1 --- src/stage0 | 1136 ++++++++++++++++++++++++++-------------------------- 1 file changed, 568 insertions(+), 568 deletions(-) diff --git a/src/stage0 b/src/stage0 index 4261ef43e8e6c..207490176a7a4 100644 --- a/src/stage0 +++ b/src/stage0 @@ -13,574 +13,574 @@ nightly_branch=main # All changes below this comment will be overridden the next time the # tool is executed. -compiler_channel_manifest_hash=6887616f401b27dd030fbcbfc4b009cbfb9ee3e9faa6b0c92d516211718c689d -compiler_git_commit_hash=ef0fb8a2563200e322fa4419f09f65a63742038c -compiler_date=2026-04-14 +compiler_channel_manifest_hash=617bc268c4bf823b68da1570ee86c3b909d8b6bf9d26c2ce74290f445513b51b +compiler_git_commit_hash=96f70397ed7ba8baf8d1bb541a1ba8e06e3d6f57 +compiler_date=2026-05-26 compiler_version=beta -rustfmt_channel_manifest_hash=3668522db987dc630cd478b113f7d3c0963a1a7ee9fdd645841c10889a38af8f -rustfmt_git_commit_hash=17584a181979f04f2aaad867332c22db1caa511a -rustfmt_date=2026-04-14 +rustfmt_channel_manifest_hash=0fc1a419df8caef3f207e758f7849af13ff39c0112c8283c3f7390df45fcdc03 +rustfmt_git_commit_hash=31a9463c6e2794a59ce57a8f37abc6966afc2a58 +rustfmt_date=2026-05-26 rustfmt_version=nightly -dist/2026-04-14/rustc-beta-aarch64-apple-darwin.tar.gz=35f25ddeafd7e641a8ffe09e5a84a132d4fd6bb471e09ba21a63b38f570bc715 -dist/2026-04-14/rustc-beta-aarch64-apple-darwin.tar.xz=473e64fbc9a2deac6f46b31edf71fc603cefacca8717be50c24d43a3f83f08f4 -dist/2026-04-14/rustc-beta-aarch64-pc-windows-gnullvm.tar.gz=07e340e93aef14aa31589d9b943f378a7f14161ba0aa22166f0088b23815a9a2 -dist/2026-04-14/rustc-beta-aarch64-pc-windows-gnullvm.tar.xz=c02bc76f45b04abcfbd8b1e3dadceda3449ece891687c269b76d4454d7842081 -dist/2026-04-14/rustc-beta-aarch64-pc-windows-msvc.tar.gz=4e7825713c1669ecabc919008038f6ccc43058cb28f868f934cfd05d4b1933ea -dist/2026-04-14/rustc-beta-aarch64-pc-windows-msvc.tar.xz=8ab15aafba975b1bf9d23351bd79c166eb8373381095d62a711ae5b1e47f293e -dist/2026-04-14/rustc-beta-aarch64-unknown-linux-gnu.tar.gz=be0ec6c0b1902dd46dc58ce4f8f87ac2c5e2d099413b0b591276f6faa340da4e -dist/2026-04-14/rustc-beta-aarch64-unknown-linux-gnu.tar.xz=2b08bdbce7d9cd7278abf4842152f3957a1beff5d2c43814d0c6ac8f12825c55 -dist/2026-04-14/rustc-beta-aarch64-unknown-linux-musl.tar.gz=377a556df12cfd34bae6eeb7f86f9e698240172397c54faf0217a682a3149d95 -dist/2026-04-14/rustc-beta-aarch64-unknown-linux-musl.tar.xz=d9794218a33e6d4ca77c15b60484c889078f82652a5ee7a9077aac897419c978 -dist/2026-04-14/rustc-beta-aarch64-unknown-linux-ohos.tar.gz=556e659a00cfab1fcc383b220588c58409ab7173350d0fab723f355f38d8cdb9 -dist/2026-04-14/rustc-beta-aarch64-unknown-linux-ohos.tar.xz=25b78160b0beedc1fe55eb2012177c8c9a03bd515f2619a301a1b7a996d52ac8 -dist/2026-04-14/rustc-beta-arm-unknown-linux-gnueabi.tar.gz=da8ee89c4864aeafc89256f49f9d40371bd1dbbb2b91553176d2aaa51cfa4a5e -dist/2026-04-14/rustc-beta-arm-unknown-linux-gnueabi.tar.xz=c62ac733b962cc8dc559c17aae4bb55fcd1c2d5fee93d04a47591a7374523e7c -dist/2026-04-14/rustc-beta-arm-unknown-linux-gnueabihf.tar.gz=c042154d4dc18b8fdcd9734d60857d763d34a56f794a1f9a01c1d9b721145474 -dist/2026-04-14/rustc-beta-arm-unknown-linux-gnueabihf.tar.xz=891067bb73618e7e6ff113c838dc0a564fba2941f12613330d26ed8cc5ede956 -dist/2026-04-14/rustc-beta-armv7-unknown-linux-gnueabihf.tar.gz=68364bce32e6afea3041cf8c476b758530237da26000c3b413faa62a728333cd -dist/2026-04-14/rustc-beta-armv7-unknown-linux-gnueabihf.tar.xz=21e91d05d546da1e98b256b094e1fb59a9a242fa599c3a664a499a90376de45f -dist/2026-04-14/rustc-beta-i686-pc-windows-gnu.tar.gz=bd4b9dc494a5adf72743209d8aca90d24192583c3eb9977465f052153cfd29fe -dist/2026-04-14/rustc-beta-i686-pc-windows-gnu.tar.xz=7577925f53dbc54a2872c702a17e7a1462c4fd6611b3daa12d38f4d08c0d5cde -dist/2026-04-14/rustc-beta-i686-pc-windows-msvc.tar.gz=709cf263932ab4190afde559bdc0862a432df6ab7e30aa4e34d3b4148a4d5bff -dist/2026-04-14/rustc-beta-i686-pc-windows-msvc.tar.xz=63b8831ea62b767007808e477298bda0acf31528f8ca7ce0de4c31890b9ed6b9 -dist/2026-04-14/rustc-beta-i686-unknown-linux-gnu.tar.gz=fb5d2be390ec9e6355698716f5fa292b41626a737f245dfb6c9d8c118cc3798f -dist/2026-04-14/rustc-beta-i686-unknown-linux-gnu.tar.xz=bf11c8a24b4fcf42b8ea23a941527c1d0060f222c1870aac4175a924c449ccdb -dist/2026-04-14/rustc-beta-loongarch64-unknown-linux-gnu.tar.gz=61b6e6c27e233bb9236215682c2e452074af77a5d383a76fe597913713ff3474 -dist/2026-04-14/rustc-beta-loongarch64-unknown-linux-gnu.tar.xz=1f7b6574bd9c8f3c58d854ef432db4c8c1007fdee14c7469966f5099aa05899c -dist/2026-04-14/rustc-beta-loongarch64-unknown-linux-musl.tar.gz=b02f0c7e4c395768286626180f5e216d5dc6cb6e4adb71f9b55ab3d0e5c50312 -dist/2026-04-14/rustc-beta-loongarch64-unknown-linux-musl.tar.xz=1513939ceb7afc3b7447af603b3243efbf2cca37b4b098eb9f3d5088567c701c -dist/2026-04-14/rustc-beta-powerpc-unknown-linux-gnu.tar.gz=57499fe1370d53c02ed33ea3ab0cd6baf131a6540b397c2f09916299c819923c -dist/2026-04-14/rustc-beta-powerpc-unknown-linux-gnu.tar.xz=7680b0b82da4e15cef8d934ef5cd335c7153148f43b42757b9558f94429ef016 -dist/2026-04-14/rustc-beta-powerpc64-unknown-linux-gnu.tar.gz=d8caa79cfb8bc32f6f03c6a36724ba514d0e4df1e593f4ec5008952f4433ad2a -dist/2026-04-14/rustc-beta-powerpc64-unknown-linux-gnu.tar.xz=d81a68da3d62ffbd0696d910918617d3595460b2c96001514f8975f6d7888e83 -dist/2026-04-14/rustc-beta-powerpc64-unknown-linux-musl.tar.gz=5de50635b8b3a30ebcd1771510e443b5937aeb772ab072e4ffda9994c9001983 -dist/2026-04-14/rustc-beta-powerpc64-unknown-linux-musl.tar.xz=6d80c9118b3b49393c6b0d00112cc4007f1edaed072e2e552dc9c610ca15eb6e -dist/2026-04-14/rustc-beta-powerpc64le-unknown-linux-gnu.tar.gz=b3fe7785ab29c9bd9d7bd3e7dec03f9246573c9cf398363280341d447ed39c94 -dist/2026-04-14/rustc-beta-powerpc64le-unknown-linux-gnu.tar.xz=328679b15b417075d3de53c6a6265e7cf5bd4c8f364ea43e710490ba00d433eb -dist/2026-04-14/rustc-beta-powerpc64le-unknown-linux-musl.tar.gz=ed6dc8119a3f7ab3377b2b9544ba5dbabb7e63dc6a49f8b4d73a61c0ea80d4b5 -dist/2026-04-14/rustc-beta-powerpc64le-unknown-linux-musl.tar.xz=cf7a33c3ff04e20f742b0ed412a32c8c79262efa9bffb32f47ff03d649c90beb -dist/2026-04-14/rustc-beta-riscv64gc-unknown-linux-gnu.tar.gz=932d92f0697bc41c4389d4974ba99f748d1a3fcf8f5c1e8d9a8a53a02cc1d009 -dist/2026-04-14/rustc-beta-riscv64gc-unknown-linux-gnu.tar.xz=4570f362bf9e98cb0cac2ccf6e18f9a368bf48890b16f210b5ef859ee48fabb4 -dist/2026-04-14/rustc-beta-s390x-unknown-linux-gnu.tar.gz=03200e8cbc3e1fbba6134ed493cb14b09ca991c4aeb6086db9ee550fffa1d7a6 -dist/2026-04-14/rustc-beta-s390x-unknown-linux-gnu.tar.xz=d5650e8231957fdf3690aaf82b9537f0b62a5d0ee4efed72e4daebef37f2ff17 -dist/2026-04-14/rustc-beta-sparcv9-sun-solaris.tar.gz=73f228287087fa532f5044a11cc1aedc3378ab1afc965bdc84e53994100525e7 -dist/2026-04-14/rustc-beta-sparcv9-sun-solaris.tar.xz=010660cbf726fb142a9a6d3543963118866e0c4b4d52c2948fa9bee254a418d8 -dist/2026-04-14/rustc-beta-x86_64-apple-darwin.tar.gz=bbc772f0cd4a39df28611eeee0a0593ab43511ae67907bb2e984887855d7bcc4 -dist/2026-04-14/rustc-beta-x86_64-apple-darwin.tar.xz=e27070e6b35e442b86b2a4d6f8e0ed8f415113f3bd053fc4368fa9fe4e82c674 -dist/2026-04-14/rustc-beta-x86_64-pc-solaris.tar.gz=01520a9bd5adf08224f09e4d1e61641a87c54e091daea7269a5f259d5c9fea3c -dist/2026-04-14/rustc-beta-x86_64-pc-solaris.tar.xz=41cd1a0146efbee090a0e3a2520413e27c4bf68889d61ce149bcf2a40e65dc73 -dist/2026-04-14/rustc-beta-x86_64-pc-windows-gnu.tar.gz=e6896b94e55f7ca6b6321ec699274dfdee1dc463c6ec6a693403c439f9337352 -dist/2026-04-14/rustc-beta-x86_64-pc-windows-gnu.tar.xz=bc45a96370da93dd620434a5ba8137634b721d0ce4162daf88c437d3cbfc3115 -dist/2026-04-14/rustc-beta-x86_64-pc-windows-gnullvm.tar.gz=5c8aea2aab8599728bb90a8be7b478c48419c17a4debede8163db7329ba0bf17 -dist/2026-04-14/rustc-beta-x86_64-pc-windows-gnullvm.tar.xz=8dcb3daa1e82820559d9a0669083f76b10333d1a048954d2e0299e11794d1380 -dist/2026-04-14/rustc-beta-x86_64-pc-windows-msvc.tar.gz=9996f298c0f7c3be6d9779dabff2e9060a826916b6d800b9a7b738c25dd9a389 -dist/2026-04-14/rustc-beta-x86_64-pc-windows-msvc.tar.xz=594d187719c353b51e7681b5d539831f11fadc92aa6c0f8c11acd92e5855db2d -dist/2026-04-14/rustc-beta-x86_64-unknown-freebsd.tar.gz=d418464becfe0fcefee10ccdaa19d3dd64aaf243eb79413becd47290c99b192a -dist/2026-04-14/rustc-beta-x86_64-unknown-freebsd.tar.xz=0bb7405b32596f9c4ada34687d15d4a264ac9b3fc081f58eae75837fd23a85ec -dist/2026-04-14/rustc-beta-x86_64-unknown-illumos.tar.gz=c789b633bb6d0ac7f8a882afd122d3706fa71213f33acbf411480f3e114d03f4 -dist/2026-04-14/rustc-beta-x86_64-unknown-illumos.tar.xz=a807261bb4636143a601ac034cb7ff24c4ebc86e6abb26d7b08a356758facd72 -dist/2026-04-14/rustc-beta-x86_64-unknown-linux-gnu.tar.gz=202b2110c143dad291f88bb2b87434fdf212bd295cd0cb5d0ec5c9f052c1bb3a -dist/2026-04-14/rustc-beta-x86_64-unknown-linux-gnu.tar.xz=cb641db912cbb560398b13b76d8125b59269d315642000b347b227401b2b7f54 -dist/2026-04-14/rustc-beta-x86_64-unknown-linux-musl.tar.gz=d64ffbe28d8257b4028bfb678894e33d30e30389b23a08b92edcae5c6045e07a -dist/2026-04-14/rustc-beta-x86_64-unknown-linux-musl.tar.xz=c800e2b4529d16ea48dfc812e00d37ce9996ba481fee6f005bdc2307d86eba18 -dist/2026-04-14/rustc-beta-x86_64-unknown-netbsd.tar.gz=8b73e9015f0192a385a8d4ddcad7ecad6122bb30b1b2d8018037e30ca791d136 -dist/2026-04-14/rustc-beta-x86_64-unknown-netbsd.tar.xz=d591f95eb864c9c81f108b12479f67af3e42fe4b208c1464bf34e1ad8fa332ea -dist/2026-04-14/rust-std-beta-aarch64-apple-darwin.tar.gz=6013c542875c4b7b06807389ce943eda6bf421a753953ff4a0ba478cf0f065bd -dist/2026-04-14/rust-std-beta-aarch64-apple-darwin.tar.xz=dba5d472e74055928a7a491b3849be5e20d1d4c75e327943a5358cb8e2253027 -dist/2026-04-14/rust-std-beta-aarch64-apple-ios.tar.gz=9e0b167ef52cfae2ea2d8c6ca15618c78bb668967d542189c3896cb409428c06 -dist/2026-04-14/rust-std-beta-aarch64-apple-ios.tar.xz=f5a033f658cb9d93fde9d4ffe5f26d1d2ce58233ee17f92e39dc9ff76668a59a -dist/2026-04-14/rust-std-beta-aarch64-apple-ios-macabi.tar.gz=735b6a2edab54666c12a3f1d3b5f9240b1441b94a975c5a88be8d926076072d3 -dist/2026-04-14/rust-std-beta-aarch64-apple-ios-macabi.tar.xz=eb305a445467e97178e9fff0793463e1dea44bf6c151407d2523ba2e5a38d246 -dist/2026-04-14/rust-std-beta-aarch64-apple-ios-sim.tar.gz=31af0e360e24eb1454f6baf45fe0630d0c65bd34282da7711d510b78447ad82d -dist/2026-04-14/rust-std-beta-aarch64-apple-ios-sim.tar.xz=c1eaa173b821dba5734269037798ce8294dddf902d6f884ecacf394288799094 -dist/2026-04-14/rust-std-beta-aarch64-apple-tvos.tar.gz=71e2a7b730b09596e15ac381daff9d922d8ab30cbfa889f140a98ebd2cbbb4c4 -dist/2026-04-14/rust-std-beta-aarch64-apple-tvos.tar.xz=ea7c093c9207b2eff5400d81d21df012af45288aea2f995bcc1880db37f5353b -dist/2026-04-14/rust-std-beta-aarch64-apple-tvos-sim.tar.gz=bc07c413c1404078d34f538a4bf40a29a5cea948c1be8063a76798d42f5a5bfe -dist/2026-04-14/rust-std-beta-aarch64-apple-tvos-sim.tar.xz=1837af58ed6b5da3fd459b85688be51332d4fce184b5c8d38146d7f8af82f87a -dist/2026-04-14/rust-std-beta-aarch64-apple-visionos.tar.gz=78978e79491e79ce51b89457cc8963902b76e716607d040a0ffd964a63b5459e -dist/2026-04-14/rust-std-beta-aarch64-apple-visionos.tar.xz=6353c8dc2c985672f1a152d7ac54912a2c1d1674180d978fbcc21e690339ff17 -dist/2026-04-14/rust-std-beta-aarch64-apple-visionos-sim.tar.gz=94ef4b756be1ac66b070fb0fbadeacadc6c4757facd0dce31e085b106c6f0ca9 -dist/2026-04-14/rust-std-beta-aarch64-apple-visionos-sim.tar.xz=62620485e8b392afe687671fe35486fcabc63b3575ecbd44f5b51a114608ed88 -dist/2026-04-14/rust-std-beta-aarch64-apple-watchos.tar.gz=a052c22f70d8234638b84a7abedf0483db9e2613dcb2882398576ba1f9849b5c -dist/2026-04-14/rust-std-beta-aarch64-apple-watchos.tar.xz=4552d9f691172dcde035ec51392cf91670309eafbbf2b9720ab7b09afc3c8cc3 -dist/2026-04-14/rust-std-beta-aarch64-apple-watchos-sim.tar.gz=8ead96cbdff29205ce3d5895ab7e8ff49113ca118b6ff2670db0934de56546f5 -dist/2026-04-14/rust-std-beta-aarch64-apple-watchos-sim.tar.xz=62617e7919793f7fc1b10a2e035f803b2b335b6b6ac0f502109b34b034abc994 -dist/2026-04-14/rust-std-beta-aarch64-linux-android.tar.gz=29737a87bb764152092cca224752ed6742844f743881ff838967f50999d8e111 -dist/2026-04-14/rust-std-beta-aarch64-linux-android.tar.xz=d6ebc87683d7a7a57b4ff185bfbc72ac50e8fca236d45f9413817639aad8aa22 -dist/2026-04-14/rust-std-beta-aarch64-pc-windows-gnullvm.tar.gz=16eea786343a6e6673e4de75cd6869773a0093125faa4e83c398ab499c04e41f -dist/2026-04-14/rust-std-beta-aarch64-pc-windows-gnullvm.tar.xz=5dd472ff328477365a2d23d8db27446b512d37d164f471b0165ac1c9a8f78a7f -dist/2026-04-14/rust-std-beta-aarch64-pc-windows-msvc.tar.gz=c7085f64ab100996c4ac3e28ff3a40f14a9a0fc9a3675aaa4ed791bb55a64687 -dist/2026-04-14/rust-std-beta-aarch64-pc-windows-msvc.tar.xz=9b4c2cbdac918a479c470a3bc201018e85e0d08da60645c9170d3428e763112d -dist/2026-04-14/rust-std-beta-aarch64-unknown-fuchsia.tar.gz=c80021f80402373e2cfd6c32b582bf97c18f3ea16547ec5b22841e70418eaff9 -dist/2026-04-14/rust-std-beta-aarch64-unknown-fuchsia.tar.xz=22978a760d34ade1abb5f215a27c2f25a1ee06c07f54bee31de2f8f14fe0ae27 -dist/2026-04-14/rust-std-beta-aarch64-unknown-linux-gnu.tar.gz=2bf09520399cd185460d1f80d7fb43bee4687ac55e03f665efce36e8f4faedad -dist/2026-04-14/rust-std-beta-aarch64-unknown-linux-gnu.tar.xz=4adb753ff1779d939082479c3fb24225b17e787c8216a591790a01e2c1510aae -dist/2026-04-14/rust-std-beta-aarch64-unknown-linux-musl.tar.gz=431bc53cfe5d2af7df326ca828743c55e577dcaee221a774a89f76d05bea7752 -dist/2026-04-14/rust-std-beta-aarch64-unknown-linux-musl.tar.xz=fbc2ec3fcadc3be21fa7918eb5a48c15c67f24a89788cd7728554358fd2ad0e3 -dist/2026-04-14/rust-std-beta-aarch64-unknown-linux-ohos.tar.gz=4fcdf0a3f818680b824259b9706080ec72aa342546d9e1d0162ed0833972a91e -dist/2026-04-14/rust-std-beta-aarch64-unknown-linux-ohos.tar.xz=6d24aefad9a2bfdd89322b28e2ab575fb4be439acdc167c397744bcd444ff539 -dist/2026-04-14/rust-std-beta-aarch64-unknown-none.tar.gz=34c67bcd0023e34fccb38e058dc27b27eb17ba48ee253a8fa6e4f4acc10d5853 -dist/2026-04-14/rust-std-beta-aarch64-unknown-none.tar.xz=fbe5279433bc7c596f09b500039c1a7a2d7276b4603f313b45d53d95dbb73d09 -dist/2026-04-14/rust-std-beta-aarch64-unknown-none-softfloat.tar.gz=963fd60c364013ca92907f811f0bcb55e877b10268eb00cd7691cbe6f5064295 -dist/2026-04-14/rust-std-beta-aarch64-unknown-none-softfloat.tar.xz=34442b8c9dbb730fb1f26cd7860c50be3e2820602db3aadc91cea6431128ea2b -dist/2026-04-14/rust-std-beta-aarch64-unknown-uefi.tar.gz=e2081f1714511927cb7e9e40c60c0b22642acdc212c64a48f95cc74e8acc9516 -dist/2026-04-14/rust-std-beta-aarch64-unknown-uefi.tar.xz=eb1ed4fc8023833458ca440bc91a840d0b637d95318ae7afb7ca4fce491df148 -dist/2026-04-14/rust-std-beta-arm-linux-androideabi.tar.gz=0899ae7e5a589508fd0df89fd45d7a1abd94d36d805158dca97c2992c33a584e -dist/2026-04-14/rust-std-beta-arm-linux-androideabi.tar.xz=f7d8f81f8240779461ea59e876abc5ca3e2f044ca6e52a6247e70c063a3d89cf -dist/2026-04-14/rust-std-beta-arm-unknown-linux-gnueabi.tar.gz=5df31d51a698beca3102d435c1af4982977eaba1127882411943c52180793775 -dist/2026-04-14/rust-std-beta-arm-unknown-linux-gnueabi.tar.xz=98725b1a1d8c0424342d6266b928bef38149e77e897a22bb57a4f6580107b5a5 -dist/2026-04-14/rust-std-beta-arm-unknown-linux-gnueabihf.tar.gz=2647a387059502e99afaff27957a6e3ef720a913b60b0acdeb9a27c1d6d401c0 -dist/2026-04-14/rust-std-beta-arm-unknown-linux-gnueabihf.tar.xz=8b4b9d03b0eb3bac92edda744f1856e106d37e5ca043422c07a71b6272d4d0a3 -dist/2026-04-14/rust-std-beta-arm-unknown-linux-musleabi.tar.gz=3ece1c0e137abfaac49646fcdbd100158f9ee0d769dc797f9c3bb2a38430c134 -dist/2026-04-14/rust-std-beta-arm-unknown-linux-musleabi.tar.xz=cab1ee3d87656db41dad895c18d8433eb30c0745980108457199625be496eb39 -dist/2026-04-14/rust-std-beta-arm-unknown-linux-musleabihf.tar.gz=7fd296fc85874bd63f40173884f72134e1af4d072fc8e17cca4bc322a11857f9 -dist/2026-04-14/rust-std-beta-arm-unknown-linux-musleabihf.tar.xz=01e1760ed2b7bb0b22b1bdb74d49361354cc73a6a888b1c41644e736da8ca7be -dist/2026-04-14/rust-std-beta-arm64ec-pc-windows-msvc.tar.gz=a7b3ef47be710c1b2cf0e00103e7ca84a127ab7831466ba0c246c9d5ebc25ab3 -dist/2026-04-14/rust-std-beta-arm64ec-pc-windows-msvc.tar.xz=4ddd59b23ba17f2082b1d17ffc86b9eab8961dbf6a415ac8deb04471272ab21d -dist/2026-04-14/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.gz=a56cafa93dd40ee8282919d8dab0b2de139980c68f8620bd4930ee3fc89109da -dist/2026-04-14/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.xz=7bc9bfbcb43cab04c36b4e488eb56fd5cd9398cc98859734bf3244cbe8fa8d71 -dist/2026-04-14/rust-std-beta-armv5te-unknown-linux-musleabi.tar.gz=ce1ccf6e97504c9e3f23683a3c303be5cead92f09e8fad500a905140f63e7064 -dist/2026-04-14/rust-std-beta-armv5te-unknown-linux-musleabi.tar.xz=f439632779986064d0c01791a9d6a8751ec4a73158ae6f8f37b849d0df2f6d14 -dist/2026-04-14/rust-std-beta-armv7-linux-androideabi.tar.gz=d75524e780850e7002ddd0d1a6bf2deaf1ddeb7f5d0b7ace1b5c63960d3ff0b5 -dist/2026-04-14/rust-std-beta-armv7-linux-androideabi.tar.xz=5d1075a1ea9fa9ed6cc4cda2e5ce3d2ce36a26a19046acf03b8d089e6518a430 -dist/2026-04-14/rust-std-beta-armv7-unknown-linux-gnueabi.tar.gz=752e169ce834ebe749e85c5b488dc87c9e82c3426aa59dbb76ee5ca949862156 -dist/2026-04-14/rust-std-beta-armv7-unknown-linux-gnueabi.tar.xz=acd4eef57e45323ccf8723700c6fbd9eac5bd52c80789ebc8506531a5395be1d -dist/2026-04-14/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.gz=7e4461d47c5c5780c0e2d14f8ed6bc07a141a542f38d1b627ab8afd194a2faf6 -dist/2026-04-14/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.xz=101299bd2db6e850418953e2782cf73f061b527ec1358747da3fe02510085bab -dist/2026-04-14/rust-std-beta-armv7-unknown-linux-musleabi.tar.gz=26e4048241c1ab874733100979afe3e7e20e0f2442cbf4c11e95b2f9aa8e78ba -dist/2026-04-14/rust-std-beta-armv7-unknown-linux-musleabi.tar.xz=61febc0edc1d7218fd8d954315cdb89a7ee1d90e6deab058acce1ad66ab9834c -dist/2026-04-14/rust-std-beta-armv7-unknown-linux-musleabihf.tar.gz=408eac371812ec1b8de499211f789c1b482e922e13d7d363651fb32e51a39c35 -dist/2026-04-14/rust-std-beta-armv7-unknown-linux-musleabihf.tar.xz=b16eaead90adecd12f8381ee882ff2ada16e55db8e458754e1323c936bcd13cc -dist/2026-04-14/rust-std-beta-armv7-unknown-linux-ohos.tar.gz=677263360535c84b3b97b24dbea5b13aabfe7031747d398caacdbe9b7321a17c -dist/2026-04-14/rust-std-beta-armv7-unknown-linux-ohos.tar.xz=3b08ab85ec8007c61d24a01845a1f3e45004cb15b1db2e108e324d466420df27 -dist/2026-04-14/rust-std-beta-armv7a-none-eabi.tar.gz=9c7ef17269b7720c2253f7c144e04f9f35f59441f40f2b5436cb2ae4e8d80d3b -dist/2026-04-14/rust-std-beta-armv7a-none-eabi.tar.xz=1f7739485143042f4790c21f4fdb0c75728097a51818f3347efc2d47963003da -dist/2026-04-14/rust-std-beta-armv7a-none-eabihf.tar.gz=fec1cf11cc3ec00fa2ba8c1a94e8be086e816a6e97ae64cc6efaacfec128f118 -dist/2026-04-14/rust-std-beta-armv7a-none-eabihf.tar.xz=fff07a142494aac0211524a4068b2192a71a6247475294f2b82308a9c73b4076 -dist/2026-04-14/rust-std-beta-armv7r-none-eabi.tar.gz=f0f5e5727d0a056b7486331cd79ca6a29afc2cf9b1c685cb778273fd6d18b3a5 -dist/2026-04-14/rust-std-beta-armv7r-none-eabi.tar.xz=92c269149082ed79107ff60490a3ba918f10d2c6465b1360c1261e9ed09f8588 -dist/2026-04-14/rust-std-beta-armv7r-none-eabihf.tar.gz=8706ce7c43b54b1d60aff89dc6134078e1efcdd855e9824b8a0289021a4f731d -dist/2026-04-14/rust-std-beta-armv7r-none-eabihf.tar.xz=87426a3b108879e926231621a65f45d52847c53162c64b5e7ae91db4f50be2a0 -dist/2026-04-14/rust-std-beta-armv8r-none-eabihf.tar.gz=b35d31f454cbf07b75132cb6d22b404bf391a84cc20972ea28ea6bf534fcc1ea -dist/2026-04-14/rust-std-beta-armv8r-none-eabihf.tar.xz=4c8c438e4ce34ff3e09dae7bb3777cfba15b6d82b66b1665cddd536eef79458e -dist/2026-04-14/rust-std-beta-i586-unknown-linux-gnu.tar.gz=7b25c21325961de4a9e2eb9d0d597f89b84a0aad24aaf056d141c8bbe9a31c59 -dist/2026-04-14/rust-std-beta-i586-unknown-linux-gnu.tar.xz=60d7f231e43b8c4f19d910775f501ff422a715cdf2accfd7da1c5fed4608f722 -dist/2026-04-14/rust-std-beta-i586-unknown-linux-musl.tar.gz=66fdf2186dab3ab7ce4e8e80d9c06e1dec9443b1b346e13b41edbd1a1c0102f0 -dist/2026-04-14/rust-std-beta-i586-unknown-linux-musl.tar.xz=d84fb8a2e32ce007bb684a2c7343765f67308dba819c318a67f124ec4931a1f3 -dist/2026-04-14/rust-std-beta-i686-linux-android.tar.gz=1bcda5b307283fa1a09d068af8a34903b9dc8cf0a0e9df78c7cc6e9bd6d9c67d -dist/2026-04-14/rust-std-beta-i686-linux-android.tar.xz=5c5b8cd75d90750dce6f712ce48a5b8ec36d8956a342a9bcccfb5a23c3735d6e -dist/2026-04-14/rust-std-beta-i686-pc-windows-gnu.tar.gz=4667a8be20fcc3fc22d03fa61f7372ae7e481dc3410e55d0803102b4d8a5d8dd -dist/2026-04-14/rust-std-beta-i686-pc-windows-gnu.tar.xz=b2e91eb407e0244e8d6261f21bd6c9dbac6e8b6b984eaf4cd5b0ed60a5e9f1b7 -dist/2026-04-14/rust-std-beta-i686-pc-windows-gnullvm.tar.gz=64888f2e06df70ad3e9946512dbdad7d4af33e6603de982daa1a240fafbe530b -dist/2026-04-14/rust-std-beta-i686-pc-windows-gnullvm.tar.xz=71209cb50e94b17b3f935fd2218781d3674573f9bf106225895f3cdf81593670 -dist/2026-04-14/rust-std-beta-i686-pc-windows-msvc.tar.gz=0948bbf181985b79d1f5e6aa5f839f3d609b4c54fda4e29d421f84b71136e357 -dist/2026-04-14/rust-std-beta-i686-pc-windows-msvc.tar.xz=33a732cc6e7bf8aaabe2a178ac0bfa70e6d242f152a59a7878a924a0e8d8bf47 -dist/2026-04-14/rust-std-beta-i686-unknown-freebsd.tar.gz=1b797a89bc8a1c6bfcddc2c910244f4c50bf65f6d2ad10a02ed3b2433b177b77 -dist/2026-04-14/rust-std-beta-i686-unknown-freebsd.tar.xz=690cb307bf3370d0420b75e9b840c7650d2270aa7558cd32bc9f1e29498e9c3f -dist/2026-04-14/rust-std-beta-i686-unknown-linux-gnu.tar.gz=87d824e3729b9563fc204ffe6802041cec062a5fa31900c584272999d791c501 -dist/2026-04-14/rust-std-beta-i686-unknown-linux-gnu.tar.xz=6a07723ee0fbdbc21f09471b00d041be3f840c988a63a174312854c3a0fcda10 -dist/2026-04-14/rust-std-beta-i686-unknown-linux-musl.tar.gz=0068d602b3b6bcd22ad055690c96a6defd909ea12dbb7a8c39474f33526b5981 -dist/2026-04-14/rust-std-beta-i686-unknown-linux-musl.tar.xz=eeb31d7361dae97764346f42ef57eb1b3dc1616d60c43f4bd42a76d50b1839c7 -dist/2026-04-14/rust-std-beta-i686-unknown-uefi.tar.gz=3f2183ec3e0a66602ac8b5f01a400affe85fa8f776e72911d777235a9c25a265 -dist/2026-04-14/rust-std-beta-i686-unknown-uefi.tar.xz=f37ea30acea8e74db40928e051d15d046758de864d87e90ae249b625d90cd5e3 -dist/2026-04-14/rust-std-beta-loongarch64-unknown-linux-gnu.tar.gz=67512594c23ee664f9d924d0487639d0a642018f27d943345cb00e0f5a8fa97a -dist/2026-04-14/rust-std-beta-loongarch64-unknown-linux-gnu.tar.xz=43b724a9bd522900c7f658217ce48d02ea7a8c89d8f5f3f51e7df02087405bef -dist/2026-04-14/rust-std-beta-loongarch64-unknown-linux-musl.tar.gz=986c985e096ea86ed7b2d1a12130f526362dc28bc27d21b9bf642c06fdf7d036 -dist/2026-04-14/rust-std-beta-loongarch64-unknown-linux-musl.tar.xz=39f0c3ec23c6be8c573ea03dddad7b61aa84956ee774ad0d7049fac78dca9282 -dist/2026-04-14/rust-std-beta-loongarch64-unknown-none.tar.gz=57b90f6817daa0b28ea117219321a03f8ca9be26b3873d5bdeaa08f94caea8bc -dist/2026-04-14/rust-std-beta-loongarch64-unknown-none.tar.xz=23e84ca4d43fc6f78bf473e181f09639061eae3020d1f4a1525a980967ba897e -dist/2026-04-14/rust-std-beta-loongarch64-unknown-none-softfloat.tar.gz=0b95e470f9564a9899420efc641abfb7b46120f27eb277c0d8dcdef692815f6b -dist/2026-04-14/rust-std-beta-loongarch64-unknown-none-softfloat.tar.xz=8923893c37f660aa08587bf9c06f796bbe4c8f469da33e9841f24697a65befb0 -dist/2026-04-14/rust-std-beta-nvptx64-nvidia-cuda.tar.gz=b4a7eadb59dfcdddfc882c59fc059b8ac968c5c45c66ad2504e0048a712a314d -dist/2026-04-14/rust-std-beta-nvptx64-nvidia-cuda.tar.xz=ad408710eecf9353b3565d24cbce684b810265fac9324e96995eeeb6948f9fa4 -dist/2026-04-14/rust-std-beta-powerpc-unknown-linux-gnu.tar.gz=735d1b011f57704fb553be29ec5ec27703025dde6f4d9623fcee8e0ba60c13d4 -dist/2026-04-14/rust-std-beta-powerpc-unknown-linux-gnu.tar.xz=6a8ee3e6bfebe6f619ab33401da28385df423ab814c55c05d6eb156ce4903014 -dist/2026-04-14/rust-std-beta-powerpc64-unknown-linux-gnu.tar.gz=06a4273f82bcdcc301a8dbef9b3c9cd3dbf2f88b4c242e69c23b87cab201d990 -dist/2026-04-14/rust-std-beta-powerpc64-unknown-linux-gnu.tar.xz=8ca85e52af77b2f4aed7b5cf5bbe50ce5c233e86e82a9eb29bf2814202d1031f -dist/2026-04-14/rust-std-beta-powerpc64-unknown-linux-musl.tar.gz=3b9d40c90eae335fae3ab7436484fc91802d2c6d0f94427a615ccd9781ffcf0c -dist/2026-04-14/rust-std-beta-powerpc64-unknown-linux-musl.tar.xz=7f86fd52fb0c3290d2401d444c3687c9274abb69d707925c298cc319be46137a -dist/2026-04-14/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.gz=e37d1cb29035269a9c5d15cf27e30fa8d81a44d393da65ea01dd73c8564d46fa -dist/2026-04-14/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.xz=bb73b66a977404ed1edca3e619505929e2c6170a06852c90e12a9417d50954f2 -dist/2026-04-14/rust-std-beta-powerpc64le-unknown-linux-musl.tar.gz=7ff24f319f4a0ada9cc1a38e4ac87049769e4d1dae617c7069b80591124060cb -dist/2026-04-14/rust-std-beta-powerpc64le-unknown-linux-musl.tar.xz=c20fb415904b6d2bf8d689719a2c53ed134dc94b5a7a818bd612a4e9d7ca4450 -dist/2026-04-14/rust-std-beta-riscv32i-unknown-none-elf.tar.gz=3bf45887fe9517b57728e83cedd23bec736206ce3b6f3ad6ca647d6e2cbbe517 -dist/2026-04-14/rust-std-beta-riscv32i-unknown-none-elf.tar.xz=561b4b200f2f1f96be5e915c28a0d42c81f419f754efdb158935baab3066758c -dist/2026-04-14/rust-std-beta-riscv32im-unknown-none-elf.tar.gz=c29a80ee52e8b07afb75f804b5b2a29127a45c2a1774c8fc1efd48fa5629e87f -dist/2026-04-14/rust-std-beta-riscv32im-unknown-none-elf.tar.xz=0ff4d4e0d749c1e40aa7b59f9ee52b1594718a9bbf8d79b7627fe01e9bfa461e -dist/2026-04-14/rust-std-beta-riscv32imac-unknown-none-elf.tar.gz=379fcac072950044871aacdda137e32fbf934976537ca2e49a23f718e8fdad9e -dist/2026-04-14/rust-std-beta-riscv32imac-unknown-none-elf.tar.xz=64b9f736957ba67c3e0bd62bd5157fca4a788ad979e57dedaf2e601312353a9f -dist/2026-04-14/rust-std-beta-riscv32imafc-unknown-none-elf.tar.gz=f8f97c8dc2a8c1729ea90320f0760d19be0929d57abcafaf3ec2733626067554 -dist/2026-04-14/rust-std-beta-riscv32imafc-unknown-none-elf.tar.xz=6339b9293a9fe88928716dd87604c018398ed678206353e8c1bc59ecbc211846 -dist/2026-04-14/rust-std-beta-riscv32imc-unknown-none-elf.tar.gz=89172756ad74df0ea7d7a03e63d44f83d5aa4a8fcecc3c6935ccf9138dfecf37 -dist/2026-04-14/rust-std-beta-riscv32imc-unknown-none-elf.tar.xz=5e87760598d9f4eb40bb664d12eff5f69832d4f8ecc97776c19ec2f592742943 -dist/2026-04-14/rust-std-beta-riscv64a23-unknown-linux-gnu.tar.gz=148bba9bf536446383c80cf9bf866c2f882b37a7536de632b1cae77d6c4c6cd7 -dist/2026-04-14/rust-std-beta-riscv64a23-unknown-linux-gnu.tar.xz=5df62d006ace8216d4bf5da398fd11038c1180e355d09ba4aa5d135b9e87d643 -dist/2026-04-14/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.gz=69eb4a6ac52e8928e8ae3062a486cb487547720eccbc3c6d19b9f7cf261e4756 -dist/2026-04-14/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.xz=03fe5f8bf31fdea6ae8c82eb7997581bd9e79f1faae924e02651b843877dea57 -dist/2026-04-14/rust-std-beta-riscv64gc-unknown-linux-musl.tar.gz=8c3c29f64aacf0ebaedbe1c4c5f5718b043833d23af8a9f5deb63844c3031870 -dist/2026-04-14/rust-std-beta-riscv64gc-unknown-linux-musl.tar.xz=dbd8aff208458242ee2b24240cb09f8489657775aaa2851bf3e4b7899665bb41 -dist/2026-04-14/rust-std-beta-riscv64gc-unknown-none-elf.tar.gz=29c2d5ae7991ba8c13a84182a463d49eff6883381a9e5d56b72620a307efeb72 -dist/2026-04-14/rust-std-beta-riscv64gc-unknown-none-elf.tar.xz=405f36827c61e88081ce530ccdf4cd10b04792ce147da969cddc49848c060ae8 -dist/2026-04-14/rust-std-beta-riscv64imac-unknown-none-elf.tar.gz=bd4fdb1540d9efc276705a6c6bb885a7b2eb2576a7d898d9652b2c76f9c4d3f7 -dist/2026-04-14/rust-std-beta-riscv64imac-unknown-none-elf.tar.xz=50ecd65092814939440809320ad26e1f513b69440f9fd096cbb98febb9d73613 -dist/2026-04-14/rust-std-beta-s390x-unknown-linux-gnu.tar.gz=c7347cd70f6e6043998f95778dd866e90d36e3869620f4911cec8c1fba8dd37e -dist/2026-04-14/rust-std-beta-s390x-unknown-linux-gnu.tar.xz=3fb46ec1f8b524951d726777808d02eccb60d993ffc6dd9257eb123c2608e1df -dist/2026-04-14/rust-std-beta-sparc64-unknown-linux-gnu.tar.gz=a21c41a777bc49c7fbe1a94db0bbd967da6dbf78ea6585e8caaa979910b3e2d2 -dist/2026-04-14/rust-std-beta-sparc64-unknown-linux-gnu.tar.xz=3087f50de1e9ded03eaaaf3b0dd6df496ddc1af850760e819fabc3cc8edc35bc -dist/2026-04-14/rust-std-beta-sparcv9-sun-solaris.tar.gz=631e3bc0c65eb53e285068141a704dc6d3f332e03b5317d001d50eabe92040db -dist/2026-04-14/rust-std-beta-sparcv9-sun-solaris.tar.xz=fbed5576340f2edb94a6e40e851c94d3f3cc20cdaf29210a6d9868efb7ad7047 -dist/2026-04-14/rust-std-beta-thumbv6m-none-eabi.tar.gz=b5b49246ea75b70be44f75f133b5769efb0bc7e837b2bb5e73e6a633a9a0d89f -dist/2026-04-14/rust-std-beta-thumbv6m-none-eabi.tar.xz=c20183595eb818240f2d6ae5ac2f290545f336a79a13b3d0ff47d026e97324c8 -dist/2026-04-14/rust-std-beta-thumbv7em-none-eabi.tar.gz=2350814e9a23bc50ef752c030a91d193af1ebcb472c69bb86a2a8eca1df82fde -dist/2026-04-14/rust-std-beta-thumbv7em-none-eabi.tar.xz=ee8bd68fff8785984394be950e5a2670fab6bc97fba0fe07fc8c6b0ea4a21c7b -dist/2026-04-14/rust-std-beta-thumbv7em-none-eabihf.tar.gz=52b95f6490f605c705f51271c3a51670b93ef656dc0f362cf80c55a8dd6a4d6c -dist/2026-04-14/rust-std-beta-thumbv7em-none-eabihf.tar.xz=6561a6492671fed31cde55f7cc9f26ceea264d39ea8956019b191950070aa2e8 -dist/2026-04-14/rust-std-beta-thumbv7m-none-eabi.tar.gz=25be4ca3b6a10305d4a2635097c8a7004a5c7559a09c50624bdc0b702217796e -dist/2026-04-14/rust-std-beta-thumbv7m-none-eabi.tar.xz=5aa785888c25c28f9c8dcca2b2a997ee1d98cc4d48862a54d30899623166002a -dist/2026-04-14/rust-std-beta-thumbv7neon-linux-androideabi.tar.gz=6a40fd7bcce8973a5d43beb7e0ad44f2642fb005f2390fb53a143d695345d0f6 -dist/2026-04-14/rust-std-beta-thumbv7neon-linux-androideabi.tar.xz=753dbd9da49cfa43c48e4517b6fa978fb2f9bdac3af44969d69257cfb7db69db -dist/2026-04-14/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.gz=1d74c05b74148be14a7906898e388e2767087e9c7463470f4cd267d7af342e87 -dist/2026-04-14/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.xz=7fc7ff79ba5f51588267f39c0818ff36b38a44a95aadc68313239305430cf9cc -dist/2026-04-14/rust-std-beta-thumbv8m.base-none-eabi.tar.gz=676370ac7fe9e68008c5d34b551375b011b462caa1615b6742887c368c92fb74 -dist/2026-04-14/rust-std-beta-thumbv8m.base-none-eabi.tar.xz=bbd1fdc73a5fd3041a10a3d0a691ac6ad555b7e607728141561a87f6be445b71 -dist/2026-04-14/rust-std-beta-thumbv8m.main-none-eabi.tar.gz=4775806ee6bbc4a1b3dff3d69ee9e4bbc7f24fd5f69c8fae9b1c6492ebeac0df -dist/2026-04-14/rust-std-beta-thumbv8m.main-none-eabi.tar.xz=83f2bd359159a9cee03d101dd81f072598f3d29e16d4ee51375fd8c6be3002a8 -dist/2026-04-14/rust-std-beta-thumbv8m.main-none-eabihf.tar.gz=0ee91403953c903c944a2095bf43712be9b8580ddc2027727cd2b9fd908d3cda -dist/2026-04-14/rust-std-beta-thumbv8m.main-none-eabihf.tar.xz=19770040efed493c454a379c5867a559ab2aab077600179f965e6d55c00d8772 -dist/2026-04-14/rust-std-beta-wasm32-unknown-emscripten.tar.gz=17d72ddb5df498a29de994097171eb65f39e43142f9fea44c7c588a8cf7f8c89 -dist/2026-04-14/rust-std-beta-wasm32-unknown-emscripten.tar.xz=4fa5dba0405cc2bc8893de48ad0bbd47dc6b1b89897a522e5294aad405f9cb4c -dist/2026-04-14/rust-std-beta-wasm32-unknown-unknown.tar.gz=9a214857ed14b5e99cd8a42ee597c3462f24903c5df5ed6ef18505403836fafd -dist/2026-04-14/rust-std-beta-wasm32-unknown-unknown.tar.xz=4f8538320fa5d6a0be80b7b0cde55685e2a99f6fabae31588cb69b4664262382 -dist/2026-04-14/rust-std-beta-wasm32-wasip1.tar.gz=28ce59923c406c04da99e8042f99a3243f93dd48c4e8a7b0b48fab23a9fd4a4a -dist/2026-04-14/rust-std-beta-wasm32-wasip1.tar.xz=dc4fc5da651395ca3d777e50fe8e756a593584848902a4bfc6a095db50ae5952 -dist/2026-04-14/rust-std-beta-wasm32-wasip1-threads.tar.gz=1e18820b7a3269c9ca89d54a2fb22c77b2803860802d9ab62085c1d28f5a70d8 -dist/2026-04-14/rust-std-beta-wasm32-wasip1-threads.tar.xz=f34935b5c8524549f6cf42d88e41f49a745149dcadf862da8b70e577af18d50b -dist/2026-04-14/rust-std-beta-wasm32-wasip2.tar.gz=699eaba1de898d9c88bebdc2228846a53a2692ea9bcd1b53af90904f1fc905a5 -dist/2026-04-14/rust-std-beta-wasm32-wasip2.tar.xz=fbcb1d9aa12c31c26ccde00793bc3bc6d6dcc8ea2f5d42d29a9de1344a34d2dc -dist/2026-04-14/rust-std-beta-wasm32v1-none.tar.gz=73ef93d8c72a79ff25062e8d4acee6145127edcf1d7fc2debc16d79846e931af -dist/2026-04-14/rust-std-beta-wasm32v1-none.tar.xz=a7bd4d7ef9a6d22ba67e9f7bf2644e906ea13250e00c5799c6472433691f0540 -dist/2026-04-14/rust-std-beta-x86_64-apple-darwin.tar.gz=50c82762dba2482a5cb2d57760ed9741de19ef54b6bc23d2a8fcec01addb21c4 -dist/2026-04-14/rust-std-beta-x86_64-apple-darwin.tar.xz=57682df246caf478ba3a36a99a562276d9be91efcb43625f52f4c33efc4a24a2 -dist/2026-04-14/rust-std-beta-x86_64-apple-ios.tar.gz=40d1aeca1d258a3ba9030e718bff4d98974a1a1a9b7690c03f13771e4d9b2835 -dist/2026-04-14/rust-std-beta-x86_64-apple-ios.tar.xz=b47d2de0b8dc7374778f60f38ec4c51718cce2ce03d6b6d52f10cddd95d47e22 -dist/2026-04-14/rust-std-beta-x86_64-apple-ios-macabi.tar.gz=42819ce12cff11d91a384a7f7c16acb31e5ed0796dbf118dcc6f09fb49989896 -dist/2026-04-14/rust-std-beta-x86_64-apple-ios-macabi.tar.xz=44344c81123c8ff8ef719ec60bf5ef1cfe9f2c6f072fc3e6e68b67113008ae7a -dist/2026-04-14/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.gz=9a9a50924691cd00640c4f548637a0d0f9c0cc49992d2a18e04829b4bd979533 -dist/2026-04-14/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.xz=cf7cae05b5426a2e6005b2b58e4aeb25e7311bba8adf619ca47dc0123f098f46 -dist/2026-04-14/rust-std-beta-x86_64-linux-android.tar.gz=7d8cdf37883335691b9d03cf32c42eccfe218bc9423d6906be8c661852759f2c -dist/2026-04-14/rust-std-beta-x86_64-linux-android.tar.xz=9d5b7d6c2ea90a3dea1fcd0819f22ec7f5b1bdf16c1e3bd92846f21cacdfdab7 -dist/2026-04-14/rust-std-beta-x86_64-pc-solaris.tar.gz=6f478f919242151b96db59f5d76d71183a0ce84fa6d00622d386f9d084d60961 -dist/2026-04-14/rust-std-beta-x86_64-pc-solaris.tar.xz=3028c3306991de15b2b3036a6cb890550ef207adda362c087359f439f48a93cc -dist/2026-04-14/rust-std-beta-x86_64-pc-windows-gnu.tar.gz=5b43f65b66f87ca4fc7233265584ec1659978cd124419a08cde3d027c6d6bbdb -dist/2026-04-14/rust-std-beta-x86_64-pc-windows-gnu.tar.xz=b260fead983056e8783a222ba79bf3226114ccacd580d6202a192508d29f1b33 -dist/2026-04-14/rust-std-beta-x86_64-pc-windows-gnullvm.tar.gz=f70153e96e4f488ee7e2ecf4d75dd4df4d9575026bf53106bf3d3bb9ba8bf3a7 -dist/2026-04-14/rust-std-beta-x86_64-pc-windows-gnullvm.tar.xz=65b5ad8f6e187acde0ecf5c19ab8e655c2cc8f0583305d718cc234c90971c836 -dist/2026-04-14/rust-std-beta-x86_64-pc-windows-msvc.tar.gz=58406c05ce0d5b3fb66eb9817fd15e9c395b09d5787e141a15ca78a68fb98304 -dist/2026-04-14/rust-std-beta-x86_64-pc-windows-msvc.tar.xz=868d2c22302fbec4fd0a2ba3487ab18fe42869a0220310282adc5b447c04719b -dist/2026-04-14/rust-std-beta-x86_64-unknown-freebsd.tar.gz=f31ff0364cf1be7c402a14cc8ce405f80077beb8ca962818cc285824b8db40ad -dist/2026-04-14/rust-std-beta-x86_64-unknown-freebsd.tar.xz=2e5675d3aad9dfdb4a1d75de9a400fa57e38b222d0719c3e52e8c289ca1047a6 -dist/2026-04-14/rust-std-beta-x86_64-unknown-fuchsia.tar.gz=2820e5e7cdde029a1174c400c83cc41469d380c02d8221361280d8bff814434b -dist/2026-04-14/rust-std-beta-x86_64-unknown-fuchsia.tar.xz=e21ccec9aad3efabc99140f2a44fe9de1815eae4a58de385b2ce1d22ae7fab6f -dist/2026-04-14/rust-std-beta-x86_64-unknown-illumos.tar.gz=bd5010155c3549a1a1bfa2b893feecf4a2793c5f816d1cb742a86f6358a65a81 -dist/2026-04-14/rust-std-beta-x86_64-unknown-illumos.tar.xz=ca1e90e5b466c94efd7a096f6fd2d374afcfeb84d8399720f05ed72017bb79c7 -dist/2026-04-14/rust-std-beta-x86_64-unknown-linux-gnu.tar.gz=88f44c8abc2c0aa5c70ddea59dfbb89be53b5b85368176f56c076ab79174f8b7 -dist/2026-04-14/rust-std-beta-x86_64-unknown-linux-gnu.tar.xz=fdd83dfeeeaf49f74e2e497130c21837890497f4c7d58c0a06c2ae58d1b027dd -dist/2026-04-14/rust-std-beta-x86_64-unknown-linux-gnuasan.tar.gz=6eebf35f6a4ca2a3b6e9edbd14c8f744500d0099e5e4d15011db61baca5dac28 -dist/2026-04-14/rust-std-beta-x86_64-unknown-linux-gnuasan.tar.xz=58bb277404b0411c874c8166998c5eb9e65ad62dfc6f3ba86afd73a0914130c2 -dist/2026-04-14/rust-std-beta-x86_64-unknown-linux-gnumsan.tar.gz=15b046a6e773c4320254f458c55086d89a3fdaab38b74b8d5114501586287299 -dist/2026-04-14/rust-std-beta-x86_64-unknown-linux-gnumsan.tar.xz=ebf82cf26e6501fbcfd38bef06cd6f909511e153498b18396ecab0ebd1121406 -dist/2026-04-14/rust-std-beta-x86_64-unknown-linux-gnutsan.tar.gz=a38f891a40d4f1bdbe3bbf07aa110424ff2c5df9cc63563910011e87e467b5a5 -dist/2026-04-14/rust-std-beta-x86_64-unknown-linux-gnutsan.tar.xz=f9757ff55c259b7ff1fcd492ec06d69553938f99f0eaa711278f3d1f3bac7c0a -dist/2026-04-14/rust-std-beta-x86_64-unknown-linux-gnux32.tar.gz=23a89fb8c8aacbfdc67e99413bed782c36a0cea5d2180a454da8b721aee11ae5 -dist/2026-04-14/rust-std-beta-x86_64-unknown-linux-gnux32.tar.xz=08675069d43335aa0b0a4edbd65a976fb9d81b75da057fe88f95d7ba0f2a98cb -dist/2026-04-14/rust-std-beta-x86_64-unknown-linux-musl.tar.gz=3b0a9acfaba18dd71ffe8f2d2f370b2e6d4edcacaee2ff7df7024a233c2b1d32 -dist/2026-04-14/rust-std-beta-x86_64-unknown-linux-musl.tar.xz=c6a1e40a41795fcab0f197eeabc053360f59c62c3e03f94cc11d903b796f61fc -dist/2026-04-14/rust-std-beta-x86_64-unknown-linux-ohos.tar.gz=4d51229b6c2f4d7401a8e857152b775ee1cad28a2979279c4e177fbdb36a30a2 -dist/2026-04-14/rust-std-beta-x86_64-unknown-linux-ohos.tar.xz=174154d57be317c14591c395921eaf84577d1940f7c8bac41511c382215db391 -dist/2026-04-14/rust-std-beta-x86_64-unknown-netbsd.tar.gz=d85c23928b7ce3c8712dae2219241ee087fcfa999a719624f4d1a71096304a6a -dist/2026-04-14/rust-std-beta-x86_64-unknown-netbsd.tar.xz=4b8115444b5c858f36979b7c4a48e5d8c4a30ffa3dc1ddbeebb31260ddfa44c7 -dist/2026-04-14/rust-std-beta-x86_64-unknown-none.tar.gz=5d4e27304c962a66c43086a8fe8e97e76a582cefcf70ba7bb552b7497998081b -dist/2026-04-14/rust-std-beta-x86_64-unknown-none.tar.xz=d58340f1ae3119ff10c63dec6cb6d75260a4f3f5439f18795f12e64d81414fa9 -dist/2026-04-14/rust-std-beta-x86_64-unknown-redox.tar.gz=1b0f178e222e70b2ef524a6148edc8e4097dad79e4c9bc74a1b91b68eea62b4f -dist/2026-04-14/rust-std-beta-x86_64-unknown-redox.tar.xz=7545a14f2ce4a2358a850a6196061e70f98966e52122d9835666c09a1059e5ed -dist/2026-04-14/rust-std-beta-x86_64-unknown-uefi.tar.gz=19ef7d625c8118c5dc283c57fdc07ae3d5a503bcb04d36156146ca919893c310 -dist/2026-04-14/rust-std-beta-x86_64-unknown-uefi.tar.xz=d79bd625887bdc6339e22fecc0711b9ff211c2531fa8e9a4e1e344468da8745f -dist/2026-04-14/cargo-beta-aarch64-apple-darwin.tar.gz=213adf0915f775399a516647bd90e4f88cd25c4b2c95eeea441939cb4ecc677d -dist/2026-04-14/cargo-beta-aarch64-apple-darwin.tar.xz=b1b5bee9c4f4791b91c40104f18c337ca280b4c322cf3b84178fdcc0f021948b -dist/2026-04-14/cargo-beta-aarch64-pc-windows-gnullvm.tar.gz=ce484bc7863789505f68e2df118d5819621fdb52756fc0c5ad1ec6cc7139e249 -dist/2026-04-14/cargo-beta-aarch64-pc-windows-gnullvm.tar.xz=25b0600034fd9af3a7a1c09715525782fd4c821932359c2a1e539fa6718a17df -dist/2026-04-14/cargo-beta-aarch64-pc-windows-msvc.tar.gz=f8b9669ec25f47ac98eac797d988dfa30c6d0e9f8506b4176c7fa57a4eb4fba0 -dist/2026-04-14/cargo-beta-aarch64-pc-windows-msvc.tar.xz=0c980f162ece80ed34fbc41a78d43f6a1486388d7b0e042b160c29186718470f -dist/2026-04-14/cargo-beta-aarch64-unknown-linux-gnu.tar.gz=9c9a9c217ad3ffea38dd9868645e33b913de984e13b6fc5f06635ea45e47d57f -dist/2026-04-14/cargo-beta-aarch64-unknown-linux-gnu.tar.xz=1ebfe88245ec5262f98676bee6b662b5988b6ef9f9eceb5deba88ab4f6adf498 -dist/2026-04-14/cargo-beta-aarch64-unknown-linux-musl.tar.gz=6132fda7de92ea586481f7caac8aabf900e76cc5e15e1c9cf1ec66d25ce2267a -dist/2026-04-14/cargo-beta-aarch64-unknown-linux-musl.tar.xz=ba2a97b47df7a33eb77d66e3fb36a051e16d3b86e09ba9d7d430c71ad49970a2 -dist/2026-04-14/cargo-beta-aarch64-unknown-linux-ohos.tar.gz=f834b14156554d76f10ae7be9e67d39d88f3f86fd019a57560ac8d22a4fb4e2f -dist/2026-04-14/cargo-beta-aarch64-unknown-linux-ohos.tar.xz=33065b9cf13e4f3bcae8b447a57bd91c1e7420f33f4a5f10768def727fb6ac01 -dist/2026-04-14/cargo-beta-arm-unknown-linux-gnueabi.tar.gz=32ec7cde4277b3eb8092fe7a316af3d53ff200f4e1cb4a679d0bed86781a3dd4 -dist/2026-04-14/cargo-beta-arm-unknown-linux-gnueabi.tar.xz=542428bf11f888825351a2330092d89e6e84ef64fc04e6f283a4d589f2f2dead -dist/2026-04-14/cargo-beta-arm-unknown-linux-gnueabihf.tar.gz=5ffb33982db8438b6a70301ed62113aaff95762831dda734d70527a19aca98ac -dist/2026-04-14/cargo-beta-arm-unknown-linux-gnueabihf.tar.xz=5df4b9b37067678f5b6082a9e8c78ced917a316e21abfa1558537cda8cb0a5d7 -dist/2026-04-14/cargo-beta-armv7-unknown-linux-gnueabihf.tar.gz=43cb17ecb56bd720c3149826aebd7eeda20a9a94fa6ddd421cacc1c26c593a4e -dist/2026-04-14/cargo-beta-armv7-unknown-linux-gnueabihf.tar.xz=deaa36c83c4ea2debfb2ef764e8d7c3032ab78f3013ebc54ccd88bb14fa9a669 -dist/2026-04-14/cargo-beta-i686-pc-windows-gnu.tar.gz=60deced1cf0893e5041304d0b011a6c1ecb2607c73f832a07bdca51eca1db86f -dist/2026-04-14/cargo-beta-i686-pc-windows-gnu.tar.xz=5f135deca4203757c494822f9cfcb309f014afc280855b759033b735277f5e88 -dist/2026-04-14/cargo-beta-i686-pc-windows-msvc.tar.gz=c3c180c8a2ae512b1114a10b0780436edd205ca0a0c4fbdea037f23dbed06a72 -dist/2026-04-14/cargo-beta-i686-pc-windows-msvc.tar.xz=9e5c5582ae00ef80426cb4d4de8dccf546395ddd30c67cd40f4ec477b7324ce7 -dist/2026-04-14/cargo-beta-i686-unknown-linux-gnu.tar.gz=588bba2636c67b505e8d2db45111ca23e37fde5473d33ba87d4f4a1cb69c4e85 -dist/2026-04-14/cargo-beta-i686-unknown-linux-gnu.tar.xz=0fc96483c3d372ea591bff13e06f3a0ecfb2ae2c611cc08ec3a2ba6158b12217 -dist/2026-04-14/cargo-beta-loongarch64-unknown-linux-gnu.tar.gz=57fec616e8429e94b8007539a1cba2d0d6352a7406157fb524b7293225fe9945 -dist/2026-04-14/cargo-beta-loongarch64-unknown-linux-gnu.tar.xz=854bc5862045d907f62ab4372ae8805c3decc3dbe97d688515fa2c8f65cefa29 -dist/2026-04-14/cargo-beta-loongarch64-unknown-linux-musl.tar.gz=ad3fb29c460353031f542d923cc0a8812c6bb4a9bba887dc6496479eb71aefe1 -dist/2026-04-14/cargo-beta-loongarch64-unknown-linux-musl.tar.xz=e8facd620a406bf3dbdbe5d76621f7fb560f13d86b52286564a25b0eb567dcef -dist/2026-04-14/cargo-beta-powerpc-unknown-linux-gnu.tar.gz=2a86ea9a1c2a1a2503cd676b71c3576d3ab19a06abf07d36357daf90f2bf932d -dist/2026-04-14/cargo-beta-powerpc-unknown-linux-gnu.tar.xz=7bf26293463c40551d53452d26753bb43e3731729f71090a2ec72474b75e8d5e -dist/2026-04-14/cargo-beta-powerpc64-unknown-linux-gnu.tar.gz=1a9eb79a7ee2f4ec769a884ec253a8cf133fe58dbaed032248c9b6ad65d6f2f3 -dist/2026-04-14/cargo-beta-powerpc64-unknown-linux-gnu.tar.xz=a1dffc50cfb99386cd8a2896ccfa781b297cbf7949563cc84c6ff7c4fe1e4df6 -dist/2026-04-14/cargo-beta-powerpc64-unknown-linux-musl.tar.gz=aae0e1c8dfb0ebf5efa4fb8c2d8766dd6f0a97a92b401de288693198716df969 -dist/2026-04-14/cargo-beta-powerpc64-unknown-linux-musl.tar.xz=37725c9c02e32a98b9b0bf214c248757e5fed39e3ac70218a5fba7372e9df049 -dist/2026-04-14/cargo-beta-powerpc64le-unknown-linux-gnu.tar.gz=722430e82753479347676a6ac17930903fc2be8e11ef63a683a1289e0ff23d97 -dist/2026-04-14/cargo-beta-powerpc64le-unknown-linux-gnu.tar.xz=a2e7fee4d916323833c6f9af13da057a419b85a6bca89817dde79b8683f01a79 -dist/2026-04-14/cargo-beta-powerpc64le-unknown-linux-musl.tar.gz=931df7278f7718e96ea2585a5a39e436204686f32fb4a84fce55c689f918e9fe -dist/2026-04-14/cargo-beta-powerpc64le-unknown-linux-musl.tar.xz=38de6ee97d0e830e9eb07551632179fd821385c3578070801c4ec290ba49952f -dist/2026-04-14/cargo-beta-riscv64gc-unknown-linux-gnu.tar.gz=27f35cc8add94c5269d5228193a97d2400d1b36170426047275266f0ad93b762 -dist/2026-04-14/cargo-beta-riscv64gc-unknown-linux-gnu.tar.xz=f228ebbdf135314552ed9640dd19119c4b9d064a015e93f5ca489dcc6faff050 -dist/2026-04-14/cargo-beta-s390x-unknown-linux-gnu.tar.gz=6d95df12df479b04a276bad4f41f5ec2bfc9004ec6161a1fac8b9fe0771daf34 -dist/2026-04-14/cargo-beta-s390x-unknown-linux-gnu.tar.xz=fe3e88044788f3e85bb158271a0ec9b034c9818c896ac983e990a441a82a79f6 -dist/2026-04-14/cargo-beta-sparcv9-sun-solaris.tar.gz=0654f1574b4f48a4ce71ecfd353e6bedc260112891d4516fabc5335ddda227b1 -dist/2026-04-14/cargo-beta-sparcv9-sun-solaris.tar.xz=ac52160aceb03a6dbef33d3d02585533d39308e587a2c4a365f5b50000c09d53 -dist/2026-04-14/cargo-beta-x86_64-apple-darwin.tar.gz=3937531fbf60f4eb0a153543b65c4085e63fb0f7a24f9031b39efa3aaabbbbf9 -dist/2026-04-14/cargo-beta-x86_64-apple-darwin.tar.xz=55ded2e0e71ced8150c5aad0ed3ec803e61605cba72e3f6e3310d18adde88dc5 -dist/2026-04-14/cargo-beta-x86_64-pc-solaris.tar.gz=cf270a0fa52af2bc2dcfb5e4a4a53fb63ef4104c4ceeed4db2947aead6f43aca -dist/2026-04-14/cargo-beta-x86_64-pc-solaris.tar.xz=a9e6be85459a60a23b71f60b8d3b36cc7b30f07c22ed11d4cc0e165cf0f11396 -dist/2026-04-14/cargo-beta-x86_64-pc-windows-gnu.tar.gz=1fccdb6f7a4e0ce9f8f874e7e40e346f1d8a12b483c577476eaf374ff5f68313 -dist/2026-04-14/cargo-beta-x86_64-pc-windows-gnu.tar.xz=81c0dbec9baefb620d51bc90f3974ef520686c3ca9479e1eb51fc75a08b66a5f -dist/2026-04-14/cargo-beta-x86_64-pc-windows-gnullvm.tar.gz=2655f6e1570112c4b059641d41e9fdbfa162e1f353500acb6bbadf1597bd3e05 -dist/2026-04-14/cargo-beta-x86_64-pc-windows-gnullvm.tar.xz=de098a48e37880a82529fcece1bd696ca2333d9014565e1e6871d5fbd163c073 -dist/2026-04-14/cargo-beta-x86_64-pc-windows-msvc.tar.gz=f35f2076d05aad7e2c18741958c4e11ff6d684c123c3311a4b10d53cd8b5485b -dist/2026-04-14/cargo-beta-x86_64-pc-windows-msvc.tar.xz=e2867131b82d110755209a81eff1ab178eb01c2b0db72b76bc9d3818b4e26bf1 -dist/2026-04-14/cargo-beta-x86_64-unknown-freebsd.tar.gz=28d105b9cd197d6f79dd0dc3ed641b00db411da99bc7458570928507e24d9fe1 -dist/2026-04-14/cargo-beta-x86_64-unknown-freebsd.tar.xz=b825bad21b29c0152c94bbf6d30e4b84ffb73e7669a786a91b4d01c25e0d26c6 -dist/2026-04-14/cargo-beta-x86_64-unknown-illumos.tar.gz=3760b75f3b6cfa2424a145548d70657accc3c53e55b1f4ecf9d5f1ff05c7f567 -dist/2026-04-14/cargo-beta-x86_64-unknown-illumos.tar.xz=c7edd008d2c0b288d4f3ca1d3e51510bc5fa181149f7c874e46875e1f646a6bc -dist/2026-04-14/cargo-beta-x86_64-unknown-linux-gnu.tar.gz=ecc8fbb9a4423376f66096086c0b3a33747563dfc1e0221bb5ad00de2483e59f -dist/2026-04-14/cargo-beta-x86_64-unknown-linux-gnu.tar.xz=d08610c85372207fe77e0e9d5b0d1550d693a34cd983a8fe3e608816b6a8f9a2 -dist/2026-04-14/cargo-beta-x86_64-unknown-linux-musl.tar.gz=348988e5348c6a4c6542e7be10468b31b02d2fb2ba230b95331bff4291324b29 -dist/2026-04-14/cargo-beta-x86_64-unknown-linux-musl.tar.xz=caaf97cfad81738cd18f62a4f32e03568f5879f452001b78483457525e4911f3 -dist/2026-04-14/cargo-beta-x86_64-unknown-netbsd.tar.gz=b11d6f71aa41d5a97ace1e6ef5f0e87fc334bedf7c5b666a0c6748b4b9850a83 -dist/2026-04-14/cargo-beta-x86_64-unknown-netbsd.tar.xz=d637902fc57d547bef7d020c0ee4e673ebaab557cd422eab5574db3fac46fb93 -dist/2026-04-14/clippy-beta-aarch64-apple-darwin.tar.gz=fdfc08f98f9fc6281dc7af4ea6ae00e713515fa7d25821fe6bfa4e4c0266b8ca -dist/2026-04-14/clippy-beta-aarch64-apple-darwin.tar.xz=0c44e33c08f00ce950ec5490478cc1f18a4d55a2f6855410a7fb541659f4b0d8 -dist/2026-04-14/clippy-beta-aarch64-pc-windows-gnullvm.tar.gz=06da22269fef9e3fd5127b1089fdf96aae9c67ff6839d22f2bb8010f7046d68b -dist/2026-04-14/clippy-beta-aarch64-pc-windows-gnullvm.tar.xz=6d92cae636ff0731b4aeeaa7e8abd8a0d6f41df23afd8d9bbac45d977cfa168f -dist/2026-04-14/clippy-beta-aarch64-pc-windows-msvc.tar.gz=f1cbe38245fb1350662872743e06edf824f83b86af9cb775d8231c25428f1032 -dist/2026-04-14/clippy-beta-aarch64-pc-windows-msvc.tar.xz=06aaf155e5660a17a220eb99e29fe76e9e90c4d4864b556e9b2e0091bfc0563a -dist/2026-04-14/clippy-beta-aarch64-unknown-linux-gnu.tar.gz=997b59820b2628d043076a6a6085dc99267ad3ed9a2e78b1b90c58a6e3a6fe35 -dist/2026-04-14/clippy-beta-aarch64-unknown-linux-gnu.tar.xz=584aab51a31eaa66001a69cdf95cf0003abd378631f5bf44731f35c7aa5a1195 -dist/2026-04-14/clippy-beta-aarch64-unknown-linux-musl.tar.gz=ed573079fc0e3e33bd297b0d76bc01e3f15dcbf83f8461a5f4b43836452867fa -dist/2026-04-14/clippy-beta-aarch64-unknown-linux-musl.tar.xz=fe5762b039fd7decf8ce9163904e6293169ab235ac7551902a1d2fbf88ea520c -dist/2026-04-14/clippy-beta-aarch64-unknown-linux-ohos.tar.gz=01337c1c5fc537d1c447a3bf17a44d3e37e319cffa1a52996dbed7fc6c05ac30 -dist/2026-04-14/clippy-beta-aarch64-unknown-linux-ohos.tar.xz=0f36a948f1472aaa6d2191b6295b996ab59e2bea2b64ce203f9e2d90b496189d -dist/2026-04-14/clippy-beta-arm-unknown-linux-gnueabi.tar.gz=40a26ee6db3512212e2a57770f236976225088deacc9a339a8bab19a9f00cf6d -dist/2026-04-14/clippy-beta-arm-unknown-linux-gnueabi.tar.xz=27fc628812f1265c637ceeef0b7cd39cede6d0d8e3cdbc8eadd3a360c4d8fd92 -dist/2026-04-14/clippy-beta-arm-unknown-linux-gnueabihf.tar.gz=3c9317e362605e3d2b6468e5564a7342384aab333479da48e32bd36996e96f76 -dist/2026-04-14/clippy-beta-arm-unknown-linux-gnueabihf.tar.xz=38291528c671589a84c1d73bdd08a1a25fea8e2b82f0493879b6f3b9581f3cf0 -dist/2026-04-14/clippy-beta-armv7-unknown-linux-gnueabihf.tar.gz=75ab9dad5a01f3ac1053fb0c8c308b0381c67c85615ec4f85b2e736a1e80e4b1 -dist/2026-04-14/clippy-beta-armv7-unknown-linux-gnueabihf.tar.xz=7d13b495206767a813f9011d317b5e447d23a8cde412a298b22624c2e907e98b -dist/2026-04-14/clippy-beta-i686-pc-windows-gnu.tar.gz=d0de80d6858023f7192060c45f0bc20b594ecf980d352820939e7e3c07781c8c -dist/2026-04-14/clippy-beta-i686-pc-windows-gnu.tar.xz=605dbe4cace24eaaefdded781d63e4c0fb7af4ad936b883348d3ab49e27f25fc -dist/2026-04-14/clippy-beta-i686-pc-windows-msvc.tar.gz=6514ae9b9d0218b2699d7d14d8f1ccac841a28a61da6c2afd66584cbdfd8ffd4 -dist/2026-04-14/clippy-beta-i686-pc-windows-msvc.tar.xz=51793da4bde32228d9c0864cb3a321311e45d95f8a3dd0df9bbc92eea1301366 -dist/2026-04-14/clippy-beta-i686-unknown-linux-gnu.tar.gz=d8b9c4dce2d3d0b4e2aa3ff853d1fbeef272da7775588fead90d4375d1b16891 -dist/2026-04-14/clippy-beta-i686-unknown-linux-gnu.tar.xz=630996c9b6ecddaf72614f5455a94cd2a9a4421213e9984aaf0b55f1fd1c2ff2 -dist/2026-04-14/clippy-beta-loongarch64-unknown-linux-gnu.tar.gz=ad9645ffc7fdd42ed47f7ae975a2f3664b71776e1848e254f31303dd125403db -dist/2026-04-14/clippy-beta-loongarch64-unknown-linux-gnu.tar.xz=195fc7cf769385dcc28a33ca0c529bd1a2a2f68b8e63e6b5a63257593eb85e94 -dist/2026-04-14/clippy-beta-loongarch64-unknown-linux-musl.tar.gz=996ed71e21cf46a41151a7929cde94baf0be95886a30449ba4f037376d4b2e89 -dist/2026-04-14/clippy-beta-loongarch64-unknown-linux-musl.tar.xz=07353278f796d7fb8195fddb9c6864f279817c9fc47797ec594658d44e02aa70 -dist/2026-04-14/clippy-beta-powerpc-unknown-linux-gnu.tar.gz=7730841926bda3faebfdfc8b556cc6ab536bc9ea63b915f5c26fcb7b623a6651 -dist/2026-04-14/clippy-beta-powerpc-unknown-linux-gnu.tar.xz=e7a7c37d7adcc0732b608efd73c080d322864992a3180bdb44b49375ec2fb6e3 -dist/2026-04-14/clippy-beta-powerpc64-unknown-linux-gnu.tar.gz=915aa0e233eefe2ed15eea8b1dccf23ea6540c3b8f917eb457bd4529a6ae4723 -dist/2026-04-14/clippy-beta-powerpc64-unknown-linux-gnu.tar.xz=eaea79157d9a9af8ff4ef361e3735a915dfccc508e8a3addf873666fe3191949 -dist/2026-04-14/clippy-beta-powerpc64-unknown-linux-musl.tar.gz=df714b07886cafe14c2a2fd095ab6cc0bf4d892f988549817947f4aa00b7ed13 -dist/2026-04-14/clippy-beta-powerpc64-unknown-linux-musl.tar.xz=66fef5a4671e3a86a12f749dcc36361b564a218f815f3c69f72baac8a89b11b2 -dist/2026-04-14/clippy-beta-powerpc64le-unknown-linux-gnu.tar.gz=6f39657ad070bf33f683cef5e3e19521c8c0c58012f6bb36f30f728d497e4c19 -dist/2026-04-14/clippy-beta-powerpc64le-unknown-linux-gnu.tar.xz=75f77ed2701ddf7b9c2c0fee5edd5e6e99b63b994522c132c5f4f1e01ce4328e -dist/2026-04-14/clippy-beta-powerpc64le-unknown-linux-musl.tar.gz=6ea666b900910f65319e819948a9dd68340d73b399b45c903a8d712f6484746d -dist/2026-04-14/clippy-beta-powerpc64le-unknown-linux-musl.tar.xz=6fc51ab9a2ec683106ce8064728ee89f795b0bbf2acbb1489ecaa094167b6e7a -dist/2026-04-14/clippy-beta-riscv64gc-unknown-linux-gnu.tar.gz=820ff2d0aeab4e2863af6e6369f8420d024c691714dd0a9d1f2c7c46615501ca -dist/2026-04-14/clippy-beta-riscv64gc-unknown-linux-gnu.tar.xz=3dd9a04d86dd975328b97137d5ac315f51736b7c72fe38c69fe9b306d28afb24 -dist/2026-04-14/clippy-beta-s390x-unknown-linux-gnu.tar.gz=08bee1014c5ef701574b1c03a41de7cedfa1ed01c5313526fb9d3c621559f957 -dist/2026-04-14/clippy-beta-s390x-unknown-linux-gnu.tar.xz=352b3f4c20087b3d331a7d758ffd0f7d37ae95c74c51a3adb497caed30b15e57 -dist/2026-04-14/clippy-beta-sparcv9-sun-solaris.tar.gz=967ab7ee344e265a24227ffc16da947499723f7108923d5a41eb1b6aec1565aa -dist/2026-04-14/clippy-beta-sparcv9-sun-solaris.tar.xz=47304c45cf09fc4d79e1120b8800cd6f8660bb92dacf0a24dcf3d9488fecd978 -dist/2026-04-14/clippy-beta-x86_64-apple-darwin.tar.gz=dff3f80b3a32b592397e38694e698d6bf7b7e060b1d3c43474a8da706c6f1f14 -dist/2026-04-14/clippy-beta-x86_64-apple-darwin.tar.xz=2e5ec7a1f4e521712e73ee95fe8a3037319c4a1fb7f711786e342f09396cbbfc -dist/2026-04-14/clippy-beta-x86_64-pc-solaris.tar.gz=d9b0a9f21f4f0f03e61870fca7aecd0fc77e2cda7307354eba8617c70b731628 -dist/2026-04-14/clippy-beta-x86_64-pc-solaris.tar.xz=c5b1ef728c858a5635e85e830900fb559f00bedf05f9e915b177dbceec02bb1d -dist/2026-04-14/clippy-beta-x86_64-pc-windows-gnu.tar.gz=6e8c4fb6de025286e48cfbd6733a4da6e0a00932754f88d909323db4dc61f657 -dist/2026-04-14/clippy-beta-x86_64-pc-windows-gnu.tar.xz=b7d6838c62dd07d94adced58add5de7d2df5fdc5d208f8f6673e3f09f059880c -dist/2026-04-14/clippy-beta-x86_64-pc-windows-gnullvm.tar.gz=d56b5dec0a95f17e2c5582aa34f8de45202c115e7b985d54325e4a59843e24b3 -dist/2026-04-14/clippy-beta-x86_64-pc-windows-gnullvm.tar.xz=137fd932794796421c95be2395ce79bd1dd1c4fb1b5c3f043c886ee99a113aef -dist/2026-04-14/clippy-beta-x86_64-pc-windows-msvc.tar.gz=2bd3935f7ad29706c964250dfc46e324dc23de4366976918c4f7fa67887cdc15 -dist/2026-04-14/clippy-beta-x86_64-pc-windows-msvc.tar.xz=b1180408bacb681fa5be86fdd26b13ef4b09e60add0058de3b499ffd9d97f85b -dist/2026-04-14/clippy-beta-x86_64-unknown-freebsd.tar.gz=3377d3e117613e3375321905d0bb2b4dfd1661ebc21efea10c203459ddca11ff -dist/2026-04-14/clippy-beta-x86_64-unknown-freebsd.tar.xz=2767076c74035ce97a2a3748df99bc35a908015a50a389317bdf3c6c563dcfb7 -dist/2026-04-14/clippy-beta-x86_64-unknown-illumos.tar.gz=8da6742093b92af4eb0ad2e92ba74c0135c7274960ecc2ac67cbb9dabec9ea90 -dist/2026-04-14/clippy-beta-x86_64-unknown-illumos.tar.xz=7893063f13ae3b3804da9a76c2ef86d2b1f850cc8f7a21ab1d0713090f315de9 -dist/2026-04-14/clippy-beta-x86_64-unknown-linux-gnu.tar.gz=4b7e20a25c85c6387af23b07498c0305d78ffc9677f7f3f29fd6d688f49f6804 -dist/2026-04-14/clippy-beta-x86_64-unknown-linux-gnu.tar.xz=822b901903aec0c08fa19816d852fc1df0bd38358af9114703529ad0d3207ed1 -dist/2026-04-14/clippy-beta-x86_64-unknown-linux-musl.tar.gz=a54f5f0b0bef55b30b69b581c3ec878431900b1aebd105ade1009b68d8fc59e7 -dist/2026-04-14/clippy-beta-x86_64-unknown-linux-musl.tar.xz=a4ac345d6574e5676fcce0819d56a22b5f7e26a0cb17e9c78ae84c3868c92bf2 -dist/2026-04-14/clippy-beta-x86_64-unknown-netbsd.tar.gz=53408e1388d3978741702cfc6678b925afdbb8a746368c3bf55d02822b059e85 -dist/2026-04-14/clippy-beta-x86_64-unknown-netbsd.tar.xz=40fa8d9d3c146e0e8cf4ac59a4720ebfc84aacd7986b5bac6655c05d062bf745 -dist/2026-04-14/rust-beta-aarch64-pc-windows-gnullvm.msi=27c559058f6946ee7903b218eaf2fcb920ac9f68431e1f087cd88ce9b376029e -dist/2026-04-14/rust-beta-aarch64-pc-windows-msvc.msi=c2288c1aec98c255c786860c8920a11e9c1c66af7585df6c4a4046cb78782fde -dist/2026-04-14/rust-beta-i686-pc-windows-gnu.msi=c2043bde4fbcef4a696b0e64fa590fa8c59ef0c3240c40050e9c7a8c3a0b5dbd -dist/2026-04-14/rust-beta-i686-pc-windows-msvc.msi=a59ee54ba0f2b365c2e2d309d788fbb6c7bfe73bfcc02032f757b68dff6a8c9c -dist/2026-04-14/rust-beta-x86_64-pc-windows-gnu.msi=99d55a913842ea31b92546f7a4e94d418fbef38edccfa8f81ad3b32dd0ae796d -dist/2026-04-14/rust-beta-x86_64-pc-windows-gnullvm.msi=5960a87ccbc894c0dfb6150efea9d6ee02a4174764f37a45a4a25712b7ef8550 -dist/2026-04-14/rust-beta-x86_64-pc-windows-msvc.msi=69facef2e9e21de88dd680993242995f774ced5ebf2c89cca1ee225942777833 -dist/2026-04-14/rust-beta-aarch64-apple-darwin.pkg=0b5c82f82bd01814050add207c3aed0db18f9c8e42060859227d74cd1911c2c4 -dist/2026-04-14/rust-beta-x86_64-apple-darwin.pkg=be21af65a60626a081308b98de96c21187009c3aa457e918caf37f75d17d76b5 -dist/2026-04-14/rustc-beta-src.tar.gz=bd594961759ac8a575f2bdfb803a7e223fbccb1bbac5cf87fe541cee7c96decb -dist/2026-04-14/rustc-beta-src.tar.xz=202f45516b821164e617244725fbf014742dd00664ed11525e81f7ad0882f3a5 -dist/2026-04-14/rustfmt-nightly-aarch64-apple-darwin.tar.gz=4988e2b3c6ba0c18523b8bf980827d45d5d5d21cca50726a47c19203bc95e14f -dist/2026-04-14/rustfmt-nightly-aarch64-apple-darwin.tar.xz=dacce0fa1c73685f979ee4cb5dd91824773f08408370ea74e719c171a044c8ed -dist/2026-04-14/rustfmt-nightly-aarch64-pc-windows-gnullvm.tar.gz=532847f2799ba84e4049c1a984886370cf42f3d599ab7df28d3d6e7eca8fcd27 -dist/2026-04-14/rustfmt-nightly-aarch64-pc-windows-gnullvm.tar.xz=8abbd6f8803f214e8ed870de328822dac330051f5c0aafa5179c7eb48cb817fc -dist/2026-04-14/rustfmt-nightly-aarch64-pc-windows-msvc.tar.gz=e83b58941e1a885043024e7c1841b84facfd2285b960c895881b1f23655d74d0 -dist/2026-04-14/rustfmt-nightly-aarch64-pc-windows-msvc.tar.xz=d2ff3bc238daa09ae041d88bf9a895ae4174f50757ebefadc50a90e5fe74098b -dist/2026-04-14/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.gz=5a9a858ea2cbe6bfbee4eb48e819bc9e06732795883364105ff6187c551097cb -dist/2026-04-14/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz=269ccbdb5fa3aaad14a43b0d987626a34aac6676e98082661419cbe341ec6bec -dist/2026-04-14/rustfmt-nightly-aarch64-unknown-linux-musl.tar.gz=fd4b5bc3ca04fff7324d3c9b478f4ea495d3f76237a4b605fc0611345188d049 -dist/2026-04-14/rustfmt-nightly-aarch64-unknown-linux-musl.tar.xz=7301952d391b41c022ab2c7a8ce6d336d7a08865cce07798aeb0ce122ac523dc -dist/2026-04-14/rustfmt-nightly-aarch64-unknown-linux-ohos.tar.gz=c65d5e893228d1ebc675cfe3f748592b585ada56f6325071d3548473094ba50c -dist/2026-04-14/rustfmt-nightly-aarch64-unknown-linux-ohos.tar.xz=7e9a1f7d40f6eeba5b3ae18dd7038f3837e918df5e17ce13b60331bf5ea1b36b -dist/2026-04-14/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.gz=65a223192828d09cd5d74aa36ef96d725c828d5dfca405a053c8c7a8925a0b03 -dist/2026-04-14/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.xz=eb8dd1fd0e686add3dbae3e3f7cf94a356c103e3449cace417148e88a8f30b23 -dist/2026-04-14/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.gz=7a3fff9db4c2141ac743ae2edfa5b5ab08de588c56c4eff1bad28c3068792924 -dist/2026-04-14/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.xz=9fc87cce59f38e5397c7105ce2d48013b5e5e490c2fdfe610fa0278a297d3748 -dist/2026-04-14/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.gz=3ca8a9fa7acde741ece6bd8e7f30717b6315b4fa804ef153fa1913c95ca28c9d -dist/2026-04-14/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.xz=9c8a21411f6fea0caf3532e62fe6d0e54f2ad2280b56b202491fc562cd81b558 -dist/2026-04-14/rustfmt-nightly-i686-pc-windows-gnu.tar.gz=9fda7a3ce38f7e6ebaea9a5c0efb3c75079bfb202a8b03570e0a49a5b4fbf442 -dist/2026-04-14/rustfmt-nightly-i686-pc-windows-gnu.tar.xz=7c1853f533eef11a23d4c4618885528f6e22c0a48e60de0f552df90cfb9a1488 -dist/2026-04-14/rustfmt-nightly-i686-pc-windows-msvc.tar.gz=1f1907befe3fd07d33ad69afaa06358003074b4d8242e09a2b28185c676d9438 -dist/2026-04-14/rustfmt-nightly-i686-pc-windows-msvc.tar.xz=829e2618dd59669c2ba4ad56b58535c52a83eb49ec44a36c6ade93411aec244e -dist/2026-04-14/rustfmt-nightly-i686-unknown-linux-gnu.tar.gz=e7a92c0c1bb0de3a05b61c7b1674170f9628d7e941f63e44a98e0e10d49cb427 -dist/2026-04-14/rustfmt-nightly-i686-unknown-linux-gnu.tar.xz=78c9c255cefc103e68f71212522ef8aed9ced49890b173bca8d08e74e6fcd3c7 -dist/2026-04-14/rustfmt-nightly-loongarch64-unknown-linux-gnu.tar.gz=033e48f2213258d4836a67b4e03882599272e227870d588d597455858fffd4d0 -dist/2026-04-14/rustfmt-nightly-loongarch64-unknown-linux-gnu.tar.xz=ece1e2a2375d4da3931ad65da0ce15dd8a21d224fd1c7d663e6575c5eefdb6f5 -dist/2026-04-14/rustfmt-nightly-loongarch64-unknown-linux-musl.tar.gz=c63aced5a2243c8563021ccda76ad493120a9fc65b38e044d43c48a002d0181d -dist/2026-04-14/rustfmt-nightly-loongarch64-unknown-linux-musl.tar.xz=f277ff7ed2574b7b348f2f52a83988035a6e52a949806ac70e8ad082ad1412fb -dist/2026-04-14/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.gz=0050277d6fda982c243746a09b0aba02735bbb940864f9d910e54216665ed676 -dist/2026-04-14/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.xz=f0702c9e3a203dcb35d2b68f2bbecfccd9bc9c3f558cc9265f20dbd9e1120825 -dist/2026-04-14/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.gz=d401f1d7ab50200ce67dc4cafe0691197183d7d57115e2838e14125be00c64e4 -dist/2026-04-14/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.xz=3ebabe3f3f5d8c70382d0bd25d6391eb7f903189b0ca16ff7377cb88e43c179a -dist/2026-04-14/rustfmt-nightly-powerpc64-unknown-linux-musl.tar.gz=65fe9a35de40d66fc4091e8ebb887395e5df510cae883b396ec11219961e5488 -dist/2026-04-14/rustfmt-nightly-powerpc64-unknown-linux-musl.tar.xz=929456f8a5ef40256242b0ebf0600c5bd41434e6f1bb538d08fd89ca1c58c175 -dist/2026-04-14/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.gz=edc55ab2314c81295776e2348672c9a5ff1c29161fe7379fc937479c2e36df98 -dist/2026-04-14/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.xz=212a4ac158b0fd2fad5557e893fd1b0d97613f0695a3aee3133e3274cf646920 -dist/2026-04-14/rustfmt-nightly-powerpc64le-unknown-linux-musl.tar.gz=1f190928db5257cd20760a898b46463693aeb40ad5d2488c05ffe2e8221e4e18 -dist/2026-04-14/rustfmt-nightly-powerpc64le-unknown-linux-musl.tar.xz=53d26b847383e643ee9cdc331a6b7a29c7986b91a32f1580f0f640e644f175fb -dist/2026-04-14/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.gz=eca26358c02964a2e9691a2aa83e66150e4f96364e418dedfe3466439a82d4eb -dist/2026-04-14/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.xz=bc37420bde24aed17be23ccd56c151fe66b48e6dc3dd705a6c3ffc6fb4276b37 -dist/2026-04-14/rustfmt-nightly-s390x-unknown-linux-gnu.tar.gz=133f46731c8f52ec0b5ed9683241a7a833bfa7477a072ae3a9e312bce26ec12e -dist/2026-04-14/rustfmt-nightly-s390x-unknown-linux-gnu.tar.xz=9995837171346bcdfdda9718074f8374df276753eecd4031b586123af0ddfaf3 -dist/2026-04-14/rustfmt-nightly-sparcv9-sun-solaris.tar.gz=ef1f83580055a3cc717fed9af5240941c1477fe33fe1dfd9c3d049cc37180185 -dist/2026-04-14/rustfmt-nightly-sparcv9-sun-solaris.tar.xz=587af349e6c6cb0e25f23b0a2c087caf4ca413e731bfffe00dcadd77ea8c2212 -dist/2026-04-14/rustfmt-nightly-x86_64-apple-darwin.tar.gz=c10f72edd02d6792f706f769d27cf162abf9dc88eda0ed1fc9205bee14575177 -dist/2026-04-14/rustfmt-nightly-x86_64-apple-darwin.tar.xz=78ae63443d8edd4d4f5eba8d9611f2dde46936a1563be7128af82e9b5d4f730f -dist/2026-04-14/rustfmt-nightly-x86_64-pc-solaris.tar.gz=0ac6f569443662279cd071353f01d9b6b41a2d6610971f35a4ecebe34b7d9c52 -dist/2026-04-14/rustfmt-nightly-x86_64-pc-solaris.tar.xz=3c6ccc0e763adca27b8faae4d8a8a851006d3fd7ef0671edc2573a90d3461757 -dist/2026-04-14/rustfmt-nightly-x86_64-pc-windows-gnu.tar.gz=12e61bd14af8a8acfeda678e7cb348f6537534fccea8b6866ab91f4621a0aae5 -dist/2026-04-14/rustfmt-nightly-x86_64-pc-windows-gnu.tar.xz=1b995011d7e89b730d6b77a27c46596788a188a2571dcb70ed28fa14a2052cec -dist/2026-04-14/rustfmt-nightly-x86_64-pc-windows-gnullvm.tar.gz=bad8817ff2785961ec1bb79357657963ddbc1f3a8856aef93d8cfc459250e462 -dist/2026-04-14/rustfmt-nightly-x86_64-pc-windows-gnullvm.tar.xz=27a61211a0ce149bb502909fd828f99a3e9128f66c05194443f6e1e9b2e04586 -dist/2026-04-14/rustfmt-nightly-x86_64-pc-windows-msvc.tar.gz=885f882e2a5e66c05e348f3617ba90399da734e21e76b6933eee4f23a83ba9d2 -dist/2026-04-14/rustfmt-nightly-x86_64-pc-windows-msvc.tar.xz=afbbc1dd8cf74d92378287ab44e6e1af4f532894767dab00eba428228f3c6c66 -dist/2026-04-14/rustfmt-nightly-x86_64-unknown-freebsd.tar.gz=b928d87957ccdbedab31b1b6fa549f5c2958e9a811792b9c862469e3d8435fb8 -dist/2026-04-14/rustfmt-nightly-x86_64-unknown-freebsd.tar.xz=4c71a9a131e2a97b6bba902e97da1c6e953b435f6e322ea9508ee1f060293cc2 -dist/2026-04-14/rustfmt-nightly-x86_64-unknown-illumos.tar.gz=d12933f927b321fb4c579ec894e4372d14b33df9ac772df86824a1019925e042 -dist/2026-04-14/rustfmt-nightly-x86_64-unknown-illumos.tar.xz=91229ad6671f25d347453a49ef1b25971fc200985d7f4862457310e61deb1ada -dist/2026-04-14/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.gz=71acc8c0c52483725dcce94f5098c5a3d042f7faf478fcda60de2e809b2d642a -dist/2026-04-14/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz=333fc4731da2c724e70f9e60ece6ad932fd5eda912aa188149275dda1997c0b9 -dist/2026-04-14/rustfmt-nightly-x86_64-unknown-linux-musl.tar.gz=36eb2999e9d542f540b5ed9c9b7dfe62db95c43f168752f32efaa4f874a085c5 -dist/2026-04-14/rustfmt-nightly-x86_64-unknown-linux-musl.tar.xz=51e35060d731ef9b5917315915621a8b0e924d9c3dd8f346bfd32e20d17c4711 -dist/2026-04-14/rustfmt-nightly-x86_64-unknown-netbsd.tar.gz=8cd2a11a20148e96b8b030329d0830b3ee168d8c71d31eae4893d77a5e0fae6d -dist/2026-04-14/rustfmt-nightly-x86_64-unknown-netbsd.tar.xz=1f2da033ccebd5e1f055019e9e6d0f6d3ce2fd57e46a08ff6a3357572050a234 -dist/2026-04-14/rustc-nightly-aarch64-apple-darwin.tar.gz=13a70dbb3aaf2a5296367832e92975d4a6636d944275de5b9cc1d4592a9b1805 -dist/2026-04-14/rustc-nightly-aarch64-apple-darwin.tar.xz=78f8b383c22eef6e27f9e2f2255af63eed306a96adfc851a305a6a33e11d1f2a -dist/2026-04-14/rustc-nightly-aarch64-pc-windows-gnullvm.tar.gz=772b59c215cb8dec79bd3a537681c8b37051390e52d75986db8af5843c2f7341 -dist/2026-04-14/rustc-nightly-aarch64-pc-windows-gnullvm.tar.xz=d29721ff7624cd3df53ec69f78c9d8f75e24455b7dd2c0dd3dd1ca53f66b71e2 -dist/2026-04-14/rustc-nightly-aarch64-pc-windows-msvc.tar.gz=4f9cf47d1560dc516b63913e4e89c17d1b89b5c8cfa677ecd8fa538bfc4afe12 -dist/2026-04-14/rustc-nightly-aarch64-pc-windows-msvc.tar.xz=67fa760544169a924211457b5150f4bcef0b2e3deb717c67677b346edaad3f4e -dist/2026-04-14/rustc-nightly-aarch64-unknown-linux-gnu.tar.gz=f51048b6622957f10a314a09889c8749234c8456b5c826958069a6856e0166fe -dist/2026-04-14/rustc-nightly-aarch64-unknown-linux-gnu.tar.xz=2c22b92466453884f6afed1f6f733c982492f247e03740892d253930c66b6d45 -dist/2026-04-14/rustc-nightly-aarch64-unknown-linux-musl.tar.gz=d478bb6dc0af51fd4e7e007a825e09d26fdefe8d2eff251e8a055e67dc82830a -dist/2026-04-14/rustc-nightly-aarch64-unknown-linux-musl.tar.xz=335947b16552795ec3c5f525b1bcb2b82c54bd0726146d3d8685f7b0202e8b4e -dist/2026-04-14/rustc-nightly-aarch64-unknown-linux-ohos.tar.gz=3ac6ea0c484ca7c4b020a2b333cefdd01830fa1ba2d3fa8efbd911ca810bfa3c -dist/2026-04-14/rustc-nightly-aarch64-unknown-linux-ohos.tar.xz=4125e5b0940f0859a3778b0cb441a8504c8276064e1b7413c174e5cecab05795 -dist/2026-04-14/rustc-nightly-arm-unknown-linux-gnueabi.tar.gz=e764a83c5818b6ec8c06a448bcba7d89e02b071a3e8666ddef61943e1b3c9952 -dist/2026-04-14/rustc-nightly-arm-unknown-linux-gnueabi.tar.xz=c2b69576d1fc1bf8e2803bbada5766af3dd388912f9609125d514e28d7898b09 -dist/2026-04-14/rustc-nightly-arm-unknown-linux-gnueabihf.tar.gz=909e94363fdc0f04e0e2fa43afce22f85626a89d6305f0e578d0c45ab1b41e2f -dist/2026-04-14/rustc-nightly-arm-unknown-linux-gnueabihf.tar.xz=75581145a7bcd75e628bbb29f833b4faab31647bc2a846ac5a5403047974a594 -dist/2026-04-14/rustc-nightly-armv7-unknown-linux-gnueabihf.tar.gz=e0fb27cd6686bb340754ce148eb99ea07d1b0a0cacdb47d555979159d3238bf3 -dist/2026-04-14/rustc-nightly-armv7-unknown-linux-gnueabihf.tar.xz=5f2dd01b77130d610ea5f0c964f8d90a556619a9ac8be27ca194ab3fb69548f0 -dist/2026-04-14/rustc-nightly-i686-pc-windows-gnu.tar.gz=a75f7a65711135059bbfa680d0e1008accdc01bedaa281de20f4a6243a8a9702 -dist/2026-04-14/rustc-nightly-i686-pc-windows-gnu.tar.xz=be1bcad0c88c3e1b513d316cb944d2d292dbc76fbf9e5f65e7932d45187ef6b0 -dist/2026-04-14/rustc-nightly-i686-pc-windows-msvc.tar.gz=a910ea7aba73b75b330b4fafbf519c708659f85e6cc76b2701f12b93619fb7d8 -dist/2026-04-14/rustc-nightly-i686-pc-windows-msvc.tar.xz=693e043882ebc1ebea21d65bfd1babc96bfe80a0d43f8ae2b9a70a9070683b33 -dist/2026-04-14/rustc-nightly-i686-unknown-linux-gnu.tar.gz=c1cd472c333178e1566687758a3e8026e6c686ec825c48730eb99a5133645fd4 -dist/2026-04-14/rustc-nightly-i686-unknown-linux-gnu.tar.xz=c30771464bbbcfa1ce7843644c461222e8c0ddd41a339af857d71e64929aca36 -dist/2026-04-14/rustc-nightly-loongarch64-unknown-linux-gnu.tar.gz=716ea63ccbf0578e96aa70909a4855f68c577da5c08874a10750e217df480966 -dist/2026-04-14/rustc-nightly-loongarch64-unknown-linux-gnu.tar.xz=f8d499e4777cbd664e12d475caa50728464ee3f430d1ce01ed13b6d23534ff70 -dist/2026-04-14/rustc-nightly-loongarch64-unknown-linux-musl.tar.gz=fca3a60606670897286d5ba99629051d79fb5f8a58c775eacd630e22f2f6c0c0 -dist/2026-04-14/rustc-nightly-loongarch64-unknown-linux-musl.tar.xz=29c2d67bf1cb3200821dbf50125b478b131a6a5c122c543770897716a5b5ba72 -dist/2026-04-14/rustc-nightly-powerpc-unknown-linux-gnu.tar.gz=dd15b14de18d033d47ca8329b61f1908f34de0255dfce43f5e215ae5274b1bdf -dist/2026-04-14/rustc-nightly-powerpc-unknown-linux-gnu.tar.xz=3501229024c2474d887a8b0c6d7a06454209c472cd70884e6f90bd507d62e3af -dist/2026-04-14/rustc-nightly-powerpc64-unknown-linux-gnu.tar.gz=799a80733eb84738fe79719177ffb17d81382369159393fb8c5b03f88650c406 -dist/2026-04-14/rustc-nightly-powerpc64-unknown-linux-gnu.tar.xz=6f3b41f9d936e70f1a2e617068a999f02c051f1e6211481c0630c9bbdf6e7f25 -dist/2026-04-14/rustc-nightly-powerpc64-unknown-linux-musl.tar.gz=1cc73dd3187a70c20d8e790fa56a2d6ecb278e4547fdf77e562fa22d69e2177a -dist/2026-04-14/rustc-nightly-powerpc64-unknown-linux-musl.tar.xz=4da7e7cc44d8370c911969f8e35454f23a6284029ca6ebf81ab6ff6c100072f8 -dist/2026-04-14/rustc-nightly-powerpc64le-unknown-linux-gnu.tar.gz=ef97408edbc38ab58f8e86261e53f60196790b186567bdff3924ad959d755976 -dist/2026-04-14/rustc-nightly-powerpc64le-unknown-linux-gnu.tar.xz=d3a3cb98454f10d0a27009a4a3bcc38d164a81ab592dbc722381f62654d309c7 -dist/2026-04-14/rustc-nightly-powerpc64le-unknown-linux-musl.tar.gz=d8f15c170e7a8bc856e28012eca5c45686f194f0c21e45de9008cf92170646d2 -dist/2026-04-14/rustc-nightly-powerpc64le-unknown-linux-musl.tar.xz=4e616a529c502fb4b445eb8d55cac1247c037a2e9800b614187a4a86936eb9b2 -dist/2026-04-14/rustc-nightly-riscv64gc-unknown-linux-gnu.tar.gz=5162ebc9cfc3ff76226c0ed3d4a718939be4a74fca1aa5288e0dcddaab7fa7d3 -dist/2026-04-14/rustc-nightly-riscv64gc-unknown-linux-gnu.tar.xz=82879c0c9b55855204f3d6869aae565a5553b9cc281a97d427ce81101f1658ae -dist/2026-04-14/rustc-nightly-s390x-unknown-linux-gnu.tar.gz=cc40c7d8d692719b7f3e5a8dd85272d42af4ce3f33528fa945b335d0639adeff -dist/2026-04-14/rustc-nightly-s390x-unknown-linux-gnu.tar.xz=cd36435e1c3a8f888ee7fc531f5efc0e5a1d375b9df8e64efe977ae8a6f7b2b0 -dist/2026-04-14/rustc-nightly-sparcv9-sun-solaris.tar.gz=ddee30c3e11f137cc02679949c5e8b808d50f70090cf074d0eecbdeb3b9610e7 -dist/2026-04-14/rustc-nightly-sparcv9-sun-solaris.tar.xz=21fdb743e692f55bd0a66fb131cc5906f13adb023e51e1a29b385cde3a5932f5 -dist/2026-04-14/rustc-nightly-x86_64-apple-darwin.tar.gz=e391518e93bbc18fcf3e46360afe00ad1ea9f6798aec64124818a152715f922c -dist/2026-04-14/rustc-nightly-x86_64-apple-darwin.tar.xz=14e16b07cf7c1d001568085eda8112a8a11c1736518eb743205f6b049b75b39f -dist/2026-04-14/rustc-nightly-x86_64-pc-solaris.tar.gz=fa1ba81680171e30652b18923a67d9875500ec5a4a5ca2b9d58bfa0a6a605091 -dist/2026-04-14/rustc-nightly-x86_64-pc-solaris.tar.xz=8133fe568daca53cfc8b7d7dc5ff4451e82bbb68ed315c678cc00335323550fb -dist/2026-04-14/rustc-nightly-x86_64-pc-windows-gnu.tar.gz=8011fcdcc2c893e6035fc57b1dd364ecdd8cd7e6a0aa4e283d12466c0e7c4dc6 -dist/2026-04-14/rustc-nightly-x86_64-pc-windows-gnu.tar.xz=5a6cefdf79ed1cd62ab6f9f72c2cba9096c0f4ee22639fd64cdf97b5370dd0d0 -dist/2026-04-14/rustc-nightly-x86_64-pc-windows-gnullvm.tar.gz=801f914fcd1b4b322b3aa5951b81b53a207ceee4ba097d8224c756de115643e5 -dist/2026-04-14/rustc-nightly-x86_64-pc-windows-gnullvm.tar.xz=3532130975072968bf35fdce94f98115de2d2a0cd5e25aed9c29162795f3a297 -dist/2026-04-14/rustc-nightly-x86_64-pc-windows-msvc.tar.gz=500703a85e38b7a4ce00e36655e931558ef23db4b32fd5c7bc676676c84c4faa -dist/2026-04-14/rustc-nightly-x86_64-pc-windows-msvc.tar.xz=2bd9987d711b7e1206398b7a9d7d4352b5c917259728f1de223d57e61b5451f2 -dist/2026-04-14/rustc-nightly-x86_64-unknown-freebsd.tar.gz=ad67954b068b5e4c0390344b7821141a5586958ba40c93ba50b59f0f16579850 -dist/2026-04-14/rustc-nightly-x86_64-unknown-freebsd.tar.xz=2dc93c054383ad661700450419c0b634cb7f07d4785db1bf8282b418c30ced35 -dist/2026-04-14/rustc-nightly-x86_64-unknown-illumos.tar.gz=cdd1e60cdec961885d8257e326e9aa4fcad01e254de05d3d06c72f5ae8a6c968 -dist/2026-04-14/rustc-nightly-x86_64-unknown-illumos.tar.xz=fed43cb199d09a8bc21eff285fae0307fba8b75e9f94173d4016eee53e51c59b -dist/2026-04-14/rustc-nightly-x86_64-unknown-linux-gnu.tar.gz=75ff840114825b1d828c478d77db5617f17329e8309868ba94cdfd994172ae52 -dist/2026-04-14/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz=a54f0205c6b7068f54e424a5b923834e8222d28ddcfa7da677ce268e88ff2c52 -dist/2026-04-14/rustc-nightly-x86_64-unknown-linux-musl.tar.gz=43071bdad63347cf9deaa0b860ad9bc086323fa0cb4c5519f2246d39180586c2 -dist/2026-04-14/rustc-nightly-x86_64-unknown-linux-musl.tar.xz=d8ed67a9d66e9536827df84157770ff04fac04283afd4f2eff791cdf6a83a282 -dist/2026-04-14/rustc-nightly-x86_64-unknown-netbsd.tar.gz=8c16b7deaeacd2a2631a7ecc7338d47ac4bdecfa52f71ac70d7b93513fb0e2ed -dist/2026-04-14/rustc-nightly-x86_64-unknown-netbsd.tar.xz=6c20270030613b1f2c98b33dd8310929558e6f58048e21f7a36423e50de0fc98 -dist/2026-04-14/rust-nightly-aarch64-pc-windows-gnullvm.msi=f78cc56f163c90311b025181a8e1db9dda59d58b3556968c0cdf3dbb4507097f -dist/2026-04-14/rust-nightly-aarch64-pc-windows-msvc.msi=95550ae060542483ad774574b2fc8cb79a5f2f70a3b06bb82cbf5a40bc871757 -dist/2026-04-14/rust-nightly-i686-pc-windows-gnu.msi=97efc785c12cb0fdb6906456e4726d0eb2adbf85a4dacb2daa61f6a6319b036b -dist/2026-04-14/rust-nightly-i686-pc-windows-msvc.msi=26a28eac06d0aa20aa226747ad8e1629552c2550b572a8c97a85cc2d1d8ea1db -dist/2026-04-14/rust-nightly-x86_64-pc-windows-gnu.msi=01e35ac3cbfd26ccdffe93e9d2eea55381cc9b6faff8d65326bece13527fbbc9 -dist/2026-04-14/rust-nightly-x86_64-pc-windows-gnullvm.msi=8d0454333d8b187eaa6fd3a2275948999a2208f2b6a88706c2ace747b112a85f -dist/2026-04-14/rust-nightly-x86_64-pc-windows-msvc.msi=72b999b71ccbbd63f0603640a0e6152d2ba2d285bf0879e5dab8f5576e5aeb9a -dist/2026-04-14/rust-nightly-aarch64-apple-darwin.pkg=09cf7f8fb13d38435739546cf11e690fab6011a8aae6cb23661c839f7e1a5318 -dist/2026-04-14/rust-nightly-x86_64-apple-darwin.pkg=ad30ba52b79c11e3dc7e00f50fea9d411d37d52b44f1e6cc6fa320a81bfa8ea3 -dist/2026-04-14/rustc-nightly-src.tar.gz=57aa9382fbcf1cce748da037f94062404652d9f48514567a973322304e8c6975 -dist/2026-04-14/rustc-nightly-src.tar.xz=5ab46adda987bcc2bdf2335088c5c4114b80d8bdd657803ddb9b775e67743e67 +dist/2026-05-26/rustc-beta-aarch64-apple-darwin.tar.gz=229cb22eecacc4805bbcecc5393f73b423f797fa56188689c39019b715daca1f +dist/2026-05-26/rustc-beta-aarch64-apple-darwin.tar.xz=850038a96fe42226f3b9285e42c0de9da4001da30a480114c76e7fc6c04aaef1 +dist/2026-05-26/rustc-beta-aarch64-pc-windows-gnullvm.tar.gz=3e6521448072cb3467a08482805c0d11db1a22056fd3e8d87b51f372220dfe06 +dist/2026-05-26/rustc-beta-aarch64-pc-windows-gnullvm.tar.xz=562d5cff7ea1dfba4a4e002fcf897eddfc64ee996b1ad00cb276af9bd0d51edf +dist/2026-05-26/rustc-beta-aarch64-pc-windows-msvc.tar.gz=6453c889b08d9749036b0199f304205fb764e5610a5c432c2286bbc53089202c +dist/2026-05-26/rustc-beta-aarch64-pc-windows-msvc.tar.xz=df63d8aaeb233924c8e5ad100438956655e554461d8c01a649f99431df153966 +dist/2026-05-26/rustc-beta-aarch64-unknown-linux-gnu.tar.gz=ec199d4ea3cb8b844c0945020362b07752b16f6862a812b77e7c4df969c94ca5 +dist/2026-05-26/rustc-beta-aarch64-unknown-linux-gnu.tar.xz=ca353a2d9051773a60b2a1a0712f5399981ab419b6262cee64f65fa72d77895b +dist/2026-05-26/rustc-beta-aarch64-unknown-linux-musl.tar.gz=1ab4aaeac2182c84a199535b79ed5db0003a4517a526c87f7ceb7a1563c35507 +dist/2026-05-26/rustc-beta-aarch64-unknown-linux-musl.tar.xz=2adc6179ea01c0f16e08a6c29d627d72fb3c4b4d4cca4346444ce549977691cb +dist/2026-05-26/rustc-beta-aarch64-unknown-linux-ohos.tar.gz=9ca48154c6d0c7694a780adb76f74136ec149fe8478c3de582e698971d51476d +dist/2026-05-26/rustc-beta-aarch64-unknown-linux-ohos.tar.xz=311435e998426407e246af8bb40cf904f5328633e1721227b081885728c1fd18 +dist/2026-05-26/rustc-beta-arm-unknown-linux-gnueabi.tar.gz=3ccd3427a96ba061f963dfffc6e91064dd0c3ce7872d91560493b5864c6cd482 +dist/2026-05-26/rustc-beta-arm-unknown-linux-gnueabi.tar.xz=a734eb5a4d86d13c0914f1cd4c48b4ddb08ad77cf851d12ee2002b8e25343672 +dist/2026-05-26/rustc-beta-arm-unknown-linux-gnueabihf.tar.gz=395f97eae958c25932ceb400bc26c8419c3063cffe995297fdad03ea81d69172 +dist/2026-05-26/rustc-beta-arm-unknown-linux-gnueabihf.tar.xz=ae34e976192945cc23481a9f737a427e8ade1cdbb0ac15fc803526616d88e592 +dist/2026-05-26/rustc-beta-armv7-unknown-linux-gnueabihf.tar.gz=915fca5bd03008919c8dc85b1fa2711c88296ea745737097d2093aa7da6a5405 +dist/2026-05-26/rustc-beta-armv7-unknown-linux-gnueabihf.tar.xz=946288db649eddf7b59602ee95457d6378048ba5909420fef1981c706ff65411 +dist/2026-05-26/rustc-beta-i686-pc-windows-gnu.tar.gz=22a0575fd15d52267fac5efd49333c9af31045b2281e25892ff2c814fd0df9d0 +dist/2026-05-26/rustc-beta-i686-pc-windows-gnu.tar.xz=90ef8bfdfe213dcfef2c040c5a14ed7f1ad4bcd7b4b6e3d1d4349232aad74a9b +dist/2026-05-26/rustc-beta-i686-pc-windows-msvc.tar.gz=810a0a591448e719e533fcbf2989cc87e2b25098ef2abf1bb2161460d76ffefa +dist/2026-05-26/rustc-beta-i686-pc-windows-msvc.tar.xz=7b5f2f14bb90681935784e31292de6d245e35793badbe971f581ad296c22128b +dist/2026-05-26/rustc-beta-i686-unknown-linux-gnu.tar.gz=fcccd2ed3b81dd7799e29d26b3bae4121e2f98c0e6ca34b95326e0044e81daa6 +dist/2026-05-26/rustc-beta-i686-unknown-linux-gnu.tar.xz=5281fad8a4d45e6daea19ed2a5f8210a0f52a1fe0c769771dd3736928fafbff4 +dist/2026-05-26/rustc-beta-loongarch64-unknown-linux-gnu.tar.gz=05db1fdcfcd9e8d48f7eef40aaae4a0ba1592fb835cda0d9011f544dde131d5c +dist/2026-05-26/rustc-beta-loongarch64-unknown-linux-gnu.tar.xz=e7c5bb737889a27735e2b61006229f119068e6519173a61b101dcdf941fc4448 +dist/2026-05-26/rustc-beta-loongarch64-unknown-linux-musl.tar.gz=dcfbd2dc45f6f4df8a774782db746e5dccc078ab504a2aae38c426ce6f01725b +dist/2026-05-26/rustc-beta-loongarch64-unknown-linux-musl.tar.xz=d1501b019e728be227398c5b554f082228e21366ae8296ce925157b46d0846b8 +dist/2026-05-26/rustc-beta-powerpc-unknown-linux-gnu.tar.gz=be61baf452e1e28b46c84c3b1ab2c5a1cf1419414982c0b419e6aa96762761a9 +dist/2026-05-26/rustc-beta-powerpc-unknown-linux-gnu.tar.xz=65566d6a2b0c29c0134254d7d1c56309cd6071c950a6b6e91b42b1a0f55919c4 +dist/2026-05-26/rustc-beta-powerpc64-unknown-linux-gnu.tar.gz=926234817b44dc29c59f2e8c7715a1ce759d89de0436998f65d17ea3e678da24 +dist/2026-05-26/rustc-beta-powerpc64-unknown-linux-gnu.tar.xz=ccc2faa6fd5dbc9ea8e77bfc26c8103481edad0858bdbf36d960269473be2a07 +dist/2026-05-26/rustc-beta-powerpc64-unknown-linux-musl.tar.gz=1a1c30a7bc89a15ea74faf077d6fd36b587fa314375b459fc82a45f5ae335937 +dist/2026-05-26/rustc-beta-powerpc64-unknown-linux-musl.tar.xz=1bf6b79dc624e9d3c34088ae7577bd2a2a2c3f58876b3dd1ef94a5851ee2a24b +dist/2026-05-26/rustc-beta-powerpc64le-unknown-linux-gnu.tar.gz=73f60b47ce3cbefc9fdf6ead4aad7607d066da3bcc05af2c721f4ceb9bb30f76 +dist/2026-05-26/rustc-beta-powerpc64le-unknown-linux-gnu.tar.xz=cd4789af6800ff000b74682b58bb2fdab90eedd62d15da5095efec61b1e93189 +dist/2026-05-26/rustc-beta-powerpc64le-unknown-linux-musl.tar.gz=1ad0967b9d21d11fa7e9cd212a2f25a05e4fbcd8f75719fa64ddf492af758589 +dist/2026-05-26/rustc-beta-powerpc64le-unknown-linux-musl.tar.xz=7a590a8a516c430d9d58b7d070d2aecc979e1f6185ba51d27122cfc9f6ddb1eb +dist/2026-05-26/rustc-beta-riscv64gc-unknown-linux-gnu.tar.gz=ee2748b7ee0faf53f58427310f63911696a4a706150bbd3cfd466c4e273d8ec4 +dist/2026-05-26/rustc-beta-riscv64gc-unknown-linux-gnu.tar.xz=adffbf319f66021e7f2f2951bda274378178697538eb572e8ed315f76ed62ca5 +dist/2026-05-26/rustc-beta-s390x-unknown-linux-gnu.tar.gz=bf962caf5173a3dd90928e5e6d2e7b885df76591ebfc4c3a8d242d22f79868df +dist/2026-05-26/rustc-beta-s390x-unknown-linux-gnu.tar.xz=45ee5cbb7a5d9da8f894e2db7962a8db3ce8ad37b62d1538a66440ef3f34484b +dist/2026-05-26/rustc-beta-sparcv9-sun-solaris.tar.gz=72220a684d34d53b9dc299323b25a17e2b617224e81002ff4a43d2241bfbc438 +dist/2026-05-26/rustc-beta-sparcv9-sun-solaris.tar.xz=3ab0a7b26b5cb41fffa2faa0ddb6d00af839fa3fb03a80e859e7b3ca0397afd9 +dist/2026-05-26/rustc-beta-x86_64-apple-darwin.tar.gz=5e67f4cf4898ad871a511eb307714991aecaf79c428997f75321365f2f933182 +dist/2026-05-26/rustc-beta-x86_64-apple-darwin.tar.xz=dc36c74ed262eba4170d911c9e57dc52dd2fc4f4d61e55c1719483d8479b2605 +dist/2026-05-26/rustc-beta-x86_64-pc-solaris.tar.gz=282696b6e5ddfbce2e7402556134758990124c04ac511b0c647ff0c9878821f3 +dist/2026-05-26/rustc-beta-x86_64-pc-solaris.tar.xz=18f5483a7ff8548da0d8499927b531332c33fb339d8b2b32bd84a333a387bdd2 +dist/2026-05-26/rustc-beta-x86_64-pc-windows-gnu.tar.gz=ed7082e6f94637476a5a1d95ef8f243e41af6f9e23a242231a1ca8f52f989808 +dist/2026-05-26/rustc-beta-x86_64-pc-windows-gnu.tar.xz=5bd91616ec8450cc7cc32aafcd1af3cb7bfd5353f55d9ff64e4cd03f8f35feee +dist/2026-05-26/rustc-beta-x86_64-pc-windows-gnullvm.tar.gz=0526ba1e8f22354d2dc163b3a66ef81653c1f4bfa45f256dfa62fe82e0dc0930 +dist/2026-05-26/rustc-beta-x86_64-pc-windows-gnullvm.tar.xz=762b25c357257c2d53d0fa808e69cf48b911752e6954d39d59641981b01721d4 +dist/2026-05-26/rustc-beta-x86_64-pc-windows-msvc.tar.gz=3b7598bb28ebfa50a6d7dd13848ccc1398b513b90de47c935c485faa118be0ec +dist/2026-05-26/rustc-beta-x86_64-pc-windows-msvc.tar.xz=627b3c4fbe67e46b26f47644c28de48d6c0890251b8722cff72f7a6f23e2bd7a +dist/2026-05-26/rustc-beta-x86_64-unknown-freebsd.tar.gz=2c24dec4b1572eaea17d7b39a76104a536a3e62bfecb8fe1a424fa04c74d431c +dist/2026-05-26/rustc-beta-x86_64-unknown-freebsd.tar.xz=6025a4dbd249b4e718ea5990ca315fcfd155643d37620390c0a2f11c81a40969 +dist/2026-05-26/rustc-beta-x86_64-unknown-illumos.tar.gz=c8f028fb2f244f853b101e1e9f95a9a3630bfb2d419ec68cbd1a3f1d4d98368e +dist/2026-05-26/rustc-beta-x86_64-unknown-illumos.tar.xz=4a6df372c576e6eefa2e68e85e497236ff7768e4aa7b339e40cb9429fbdb377d +dist/2026-05-26/rustc-beta-x86_64-unknown-linux-gnu.tar.gz=98b2ee2885dcdef94334d31521868002e6368626f2adbe54bd77d6ea8469f245 +dist/2026-05-26/rustc-beta-x86_64-unknown-linux-gnu.tar.xz=ae97173a3bee6f47f90b58951a5d8978866d535f82c4d1a72f908dd9c4be833a +dist/2026-05-26/rustc-beta-x86_64-unknown-linux-musl.tar.gz=c52859f69b84420b13c239e69b55bc68039e3275f7b58363b54406a6e0f738de +dist/2026-05-26/rustc-beta-x86_64-unknown-linux-musl.tar.xz=54dad752f351c67664ccd1db8f13c2a2c945d1c1efee8570b37c8ad7f8abe736 +dist/2026-05-26/rustc-beta-x86_64-unknown-netbsd.tar.gz=911c7496f5ec12b410baa304d8dade218b9d1ff6c4cf8df9157ae8ab14897eaa +dist/2026-05-26/rustc-beta-x86_64-unknown-netbsd.tar.xz=2914525285f6eaa611d21cbfcda9c8499815f72bc8635427218741f537fc60fb +dist/2026-05-26/rust-std-beta-aarch64-apple-darwin.tar.gz=daf1d24e4e3e384b56220b7651ec092b38eca7a6664b905f49074f47cd9f0ae9 +dist/2026-05-26/rust-std-beta-aarch64-apple-darwin.tar.xz=87aef39af2b314310f6c8731f0889d1fee1e02a44b0c2f98f208bfdf9824ecea +dist/2026-05-26/rust-std-beta-aarch64-apple-ios.tar.gz=db30ee81c4785691b13a8c2e26615dca689b7eafe8e9d639bd3abb95b1168c5a +dist/2026-05-26/rust-std-beta-aarch64-apple-ios.tar.xz=5e854e806b07484163dae9aba07936796a1e89df9a1b35b0e1f052331e29448c +dist/2026-05-26/rust-std-beta-aarch64-apple-ios-macabi.tar.gz=f801d2515df6bd30a19bc64daacc3b9563e35cc5a9139491c3dc747daf1a26e4 +dist/2026-05-26/rust-std-beta-aarch64-apple-ios-macabi.tar.xz=df538be1d6efe33b8385ba126444d9057ccd188f290623ba4304c8ef1e45b735 +dist/2026-05-26/rust-std-beta-aarch64-apple-ios-sim.tar.gz=17d025f7319a56878d81a6ff97bdac6be7736fe90f10bb2933d6b48f7c2a7d16 +dist/2026-05-26/rust-std-beta-aarch64-apple-ios-sim.tar.xz=2deb0e50d94339e291e6aef968e36cb5cf6697ef5fdf033a6041974cc25aa8d5 +dist/2026-05-26/rust-std-beta-aarch64-apple-tvos.tar.gz=363e6acd98c84a53e60e4b8e8fa885e001ca8888eb6316dd0bd7cfec879b5772 +dist/2026-05-26/rust-std-beta-aarch64-apple-tvos.tar.xz=51290cb97677ca3d5ac9eabb35a2e87e4802f3ef3aba16e4baa11630787994f6 +dist/2026-05-26/rust-std-beta-aarch64-apple-tvos-sim.tar.gz=3ff5e50852acb8462fce772e7b75ad1b7dce52358eca8877e3b488f6853b19ec +dist/2026-05-26/rust-std-beta-aarch64-apple-tvos-sim.tar.xz=74ea30b86f73c073fa789a10037dbbe9d1bbe4fcc24e5663d2bd494df669f699 +dist/2026-05-26/rust-std-beta-aarch64-apple-visionos.tar.gz=624b3268e9ef96db2006fd2afa7908a24715087e9459923a279e49ac89b1df47 +dist/2026-05-26/rust-std-beta-aarch64-apple-visionos.tar.xz=1d6413350db7a95cabc9654ec27ccce3aad1605fa63874341e63d45c50ab25d1 +dist/2026-05-26/rust-std-beta-aarch64-apple-visionos-sim.tar.gz=4f1ceec949b3636e4155c54c4d8606032c4a08f079fdf108d390359d52871c36 +dist/2026-05-26/rust-std-beta-aarch64-apple-visionos-sim.tar.xz=a8c3d9afb5b5d9fd2874089923c841b4281c5efb42b0c6ab1a40898af39285c8 +dist/2026-05-26/rust-std-beta-aarch64-apple-watchos.tar.gz=7741579afcfa0988ee2cccf88e9cb2ac97439a628b5ac7f809bdbbdf372a4236 +dist/2026-05-26/rust-std-beta-aarch64-apple-watchos.tar.xz=0042860837d07eb7a8c97b83e3eb4c84eebdc0c026b19f4829bc0f56487b65cc +dist/2026-05-26/rust-std-beta-aarch64-apple-watchos-sim.tar.gz=b408ef4aa0cde8472d4210c86196b26704283f9ecca2eac20c6c8fc7989823dd +dist/2026-05-26/rust-std-beta-aarch64-apple-watchos-sim.tar.xz=4edcfcda5573880d8879f100554010667af3be53936fdc1dff0e7c8cdfc06ff5 +dist/2026-05-26/rust-std-beta-aarch64-linux-android.tar.gz=3461a7caaff78fa6ef2d4f3a7ff953510b30ac2826030a37dbdbbd368d63bc31 +dist/2026-05-26/rust-std-beta-aarch64-linux-android.tar.xz=b8c3cde7b27015cb604afc8dba1488c8dbfffbb4a73300a8de9be0e868c01487 +dist/2026-05-26/rust-std-beta-aarch64-pc-windows-gnullvm.tar.gz=6d90e74fd7a25242c590b68d70e64d6b98ec4bd4b946efaf8b96e252a7f0eb46 +dist/2026-05-26/rust-std-beta-aarch64-pc-windows-gnullvm.tar.xz=5fd655b4ec048ecd30c49c5f88b1159717cb6eea0042ecfad72f1efccaca5e74 +dist/2026-05-26/rust-std-beta-aarch64-pc-windows-msvc.tar.gz=423bf6e435f9e556eed613a05ac59b3d7822a4bf3a821fdfcb77a9fe76ad6ceb +dist/2026-05-26/rust-std-beta-aarch64-pc-windows-msvc.tar.xz=45a367bf6713281dac7bc30cf97642beb25052eb3ee488fad788e0c26c78c185 +dist/2026-05-26/rust-std-beta-aarch64-unknown-fuchsia.tar.gz=4c0706b499d00042c4dd1aec1fc304df5a1b736d08e881086b257c828ffcb0ea +dist/2026-05-26/rust-std-beta-aarch64-unknown-fuchsia.tar.xz=71be21ee48c1f37a383551e4891a3adabb22571f5a80fc7255d67df9ac6b28aa +dist/2026-05-26/rust-std-beta-aarch64-unknown-linux-gnu.tar.gz=92fea0b3633c658cd4799ac43105c3b9c86cd0d890487fd623a7173a74c2bb6f +dist/2026-05-26/rust-std-beta-aarch64-unknown-linux-gnu.tar.xz=1a1d8b5c718db9d333d8196cf2e93ad235bdc7fb34212f487bb00b3fa6ceb184 +dist/2026-05-26/rust-std-beta-aarch64-unknown-linux-musl.tar.gz=30fa52ebfa9070dd3bebfba797a5115608fb00a628f4c59581fbcda2398e372e +dist/2026-05-26/rust-std-beta-aarch64-unknown-linux-musl.tar.xz=29a551a232833639f41f7110d4d97fb9be044ad411debb24a1446fc5adab41b3 +dist/2026-05-26/rust-std-beta-aarch64-unknown-linux-ohos.tar.gz=3ada64c54dd453f1c7e5428f2cdff56e7a70a879e9cacf6090d3b975447a7b90 +dist/2026-05-26/rust-std-beta-aarch64-unknown-linux-ohos.tar.xz=e863354594ef9ae69b32da4aa21cd59925106cbb278bec9b79661d202351175a +dist/2026-05-26/rust-std-beta-aarch64-unknown-none.tar.gz=2e06d206cdb7d66cefc0ffc702a0e6ad8b664ae8bcc790e8122a87f7afef9402 +dist/2026-05-26/rust-std-beta-aarch64-unknown-none.tar.xz=962340f39ff48e63903996de479c89e0e962fb3f83d75ab290f03ca6ef8a4cbe +dist/2026-05-26/rust-std-beta-aarch64-unknown-none-softfloat.tar.gz=7a6d6e1e41a872873bf735871df874fec1beb438c59662f81e0884d6f77191a3 +dist/2026-05-26/rust-std-beta-aarch64-unknown-none-softfloat.tar.xz=0ce3b0761b96de2f65cae83b8ecae29152b5bea73568658a824d426b447b2cc1 +dist/2026-05-26/rust-std-beta-aarch64-unknown-uefi.tar.gz=eaa30ca4bdd3c4182a3b5ec9b2220c95017dfee06f2af89b5539796fd97c3dd8 +dist/2026-05-26/rust-std-beta-aarch64-unknown-uefi.tar.xz=86e916f77c5544bab5a423390f680641b0339674e386cb3e243655f3ded12b64 +dist/2026-05-26/rust-std-beta-arm-linux-androideabi.tar.gz=412b2c66068bed6babe6493e5ae9ad5a27379bbe2f007fbce5396e429e3c6757 +dist/2026-05-26/rust-std-beta-arm-linux-androideabi.tar.xz=0aee12bbe12df75704d30bdc6fcaa5dfc579b395998ee0a9f21825e2b6139556 +dist/2026-05-26/rust-std-beta-arm-unknown-linux-gnueabi.tar.gz=1b3539c0907499c086d11f2a8af3c214e56e6c327201dd296001e55bdd3cd7bb +dist/2026-05-26/rust-std-beta-arm-unknown-linux-gnueabi.tar.xz=e6d40b4d490f0bf83a2b96e0fec14418640cd21a0a957c1224ce791e71364056 +dist/2026-05-26/rust-std-beta-arm-unknown-linux-gnueabihf.tar.gz=09128dc4b35034f883d97e65a89a3a32d523f6f92ee980f22ded5f3e139d4448 +dist/2026-05-26/rust-std-beta-arm-unknown-linux-gnueabihf.tar.xz=c82669e220bdb6d62a787e6c59b8497e9f95e77edf13453219e3ed8cd9647671 +dist/2026-05-26/rust-std-beta-arm-unknown-linux-musleabi.tar.gz=3f270b0e94ccad193ab17623c64c7f56d19005c42b5e4b283e6fe91bac799c5d +dist/2026-05-26/rust-std-beta-arm-unknown-linux-musleabi.tar.xz=1913f4f200916c2ce4dbc74113aaea358b9306eb3fd2245c2ef9c87e86ba1f64 +dist/2026-05-26/rust-std-beta-arm-unknown-linux-musleabihf.tar.gz=bdc87df2753f66b05368ffda808d0c39ed840d6e89bf3a064b577807ff88f528 +dist/2026-05-26/rust-std-beta-arm-unknown-linux-musleabihf.tar.xz=ab828dc90934b05628bda80db8f70c8842eef5b9704dcecfd82e5713f5af9951 +dist/2026-05-26/rust-std-beta-arm64ec-pc-windows-msvc.tar.gz=3396b32d4c97aa53179ee6695603f3357b063c915b28234ad3b08387b0c93d1e +dist/2026-05-26/rust-std-beta-arm64ec-pc-windows-msvc.tar.xz=a352e1b383b9dc0d4e4aa82b2ffb8f5708cc4c65a239d2186cc20c0297f22d39 +dist/2026-05-26/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.gz=d51c9c98cab92f3383181a9f3934bd67efdfa393cd5ec54cb66d43bcddb8d488 +dist/2026-05-26/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.xz=3c18e4758cfbf3f00447ae55f86e50fcc0d9eb8bc2348a5e522f357402a04f6b +dist/2026-05-26/rust-std-beta-armv5te-unknown-linux-musleabi.tar.gz=f3123224ebdc107e295eacd2bfd340d64689fde506a672329d804111bdaa67c6 +dist/2026-05-26/rust-std-beta-armv5te-unknown-linux-musleabi.tar.xz=f981c12ca5057339858c351a1e8ee3deb3bbb6690c4910bad8ba971c065c9776 +dist/2026-05-26/rust-std-beta-armv7-linux-androideabi.tar.gz=194baaddf63bd2350e057d70684ca2764f278f6adc403b3a508d64c95b9e4ce4 +dist/2026-05-26/rust-std-beta-armv7-linux-androideabi.tar.xz=8bb787911b6d1247d3f0347ff6d2cd5eec31442bbeb35b585016ce03b3687e7e +dist/2026-05-26/rust-std-beta-armv7-unknown-linux-gnueabi.tar.gz=23e4071a62a12e1e4209cda609a02455dea72cfbd06d5243ab445516a069c4a6 +dist/2026-05-26/rust-std-beta-armv7-unknown-linux-gnueabi.tar.xz=896069ad631b8216ff115201ffae80caf5e1e3f1d9e54fc6cbde5d67162b013e +dist/2026-05-26/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.gz=2647c167633c9ec90936c059d2d0bc1cc52f47fb6cfb10ae3aa22f8dc9d9a34b +dist/2026-05-26/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.xz=de9d85bb8cec10cc414c0bbbc41409304403011209ef6feda2358f3eb17eabf8 +dist/2026-05-26/rust-std-beta-armv7-unknown-linux-musleabi.tar.gz=36a2c759da47647e8149f1e56378b3d53691e1d164d08f1da2ce71ef3b42e01e +dist/2026-05-26/rust-std-beta-armv7-unknown-linux-musleabi.tar.xz=9aa6a3f6405a90ea9b514ff7d1628c29288a0a38bed746cd0fe5c3060d9a9314 +dist/2026-05-26/rust-std-beta-armv7-unknown-linux-musleabihf.tar.gz=eeb6e68d90f6b689c37867c67a3f2d78990c2715ceec63be71d76d8a12e7972b +dist/2026-05-26/rust-std-beta-armv7-unknown-linux-musleabihf.tar.xz=f098f782400d2eea13abc0f45bd9597b07098c2204f15f1dd97647192788c0f4 +dist/2026-05-26/rust-std-beta-armv7-unknown-linux-ohos.tar.gz=0b8cf941d6f4f6f09a9ab503fe9321a915625b55cc982af1b55bae4f070c4ef5 +dist/2026-05-26/rust-std-beta-armv7-unknown-linux-ohos.tar.xz=886faa97290fc7ecf85bf1073c8f6de58a5117617498d34a0f641836922b552f +dist/2026-05-26/rust-std-beta-armv7a-none-eabi.tar.gz=ccf1c741b8d6bb2b6f4c47381c7b83e7b6d3d89c2ecda543c7bccb73be050463 +dist/2026-05-26/rust-std-beta-armv7a-none-eabi.tar.xz=d381c180a2da7eb80b85e234e08182abbb2b855bee843fbf4c245eaf99559095 +dist/2026-05-26/rust-std-beta-armv7a-none-eabihf.tar.gz=46fea614974fa00d90a1bcd46031517373443a058da08d3f5c4e4722a06003ba +dist/2026-05-26/rust-std-beta-armv7a-none-eabihf.tar.xz=6ea29de6db7e0ab9f9c4e202d7d36dcdcb9f2e33aa3d8b7d2145f3e62b00e39b +dist/2026-05-26/rust-std-beta-armv7r-none-eabi.tar.gz=b5cd46be3755cb186d3ea519000dbcacc9ae9d3db58abf41efe81853fedaea48 +dist/2026-05-26/rust-std-beta-armv7r-none-eabi.tar.xz=b27bed29e661543ae1ee7514fa9f9f7f38676e45c3a2858b7638e6c357af9963 +dist/2026-05-26/rust-std-beta-armv7r-none-eabihf.tar.gz=4dab92015cafee141b12a7d20f0f115d1eaad23fc45a6d3b1f53a56ed01dac01 +dist/2026-05-26/rust-std-beta-armv7r-none-eabihf.tar.xz=0f68bb97124641ff4905e3db32ea82538c79b3524bf4020ad24896158d6b7aa1 +dist/2026-05-26/rust-std-beta-armv8r-none-eabihf.tar.gz=d6e60399449892d29271869819ce68422251fa3d7eed3cd74109afca9181b47a +dist/2026-05-26/rust-std-beta-armv8r-none-eabihf.tar.xz=7420894e7b4866c06abec2843471478c902b92f14f3c0945701e0cebccbfd583 +dist/2026-05-26/rust-std-beta-i586-unknown-linux-gnu.tar.gz=c77af64ab989b39fa7c42c670cb362266ab4165fd388ef3ca9e1b7df711c0ee8 +dist/2026-05-26/rust-std-beta-i586-unknown-linux-gnu.tar.xz=ddef5d441871af941489a3a53a380fdbb22610a7e04ac25c5409ecd8a7717867 +dist/2026-05-26/rust-std-beta-i586-unknown-linux-musl.tar.gz=5eb2cc5dd0c380556bb9e3cd93f89b623a7c4cb8f9e84b5fa3d261a94006fb1f +dist/2026-05-26/rust-std-beta-i586-unknown-linux-musl.tar.xz=1d3587cb1b03146116a87b64ed909c7c87c198849fa2b98cdf2a4a77acd3bf6e +dist/2026-05-26/rust-std-beta-i686-linux-android.tar.gz=cc4880d27a82038f19c0e833d348f61a42f3b2ba8435af575c069eacdd5a31e3 +dist/2026-05-26/rust-std-beta-i686-linux-android.tar.xz=3419d82b9f7025a00e91b3a954cea07a2be2e027baa61abb1064434343cc4a82 +dist/2026-05-26/rust-std-beta-i686-pc-windows-gnu.tar.gz=0e772787a0bfdfbc6bdc5aa9964310337f150169cec853aebf8647643e2eb2fc +dist/2026-05-26/rust-std-beta-i686-pc-windows-gnu.tar.xz=7ba64755246b869e0d8d17d9d6c2897c1dda4f9fe12b5895d1fa6e5c837d07d3 +dist/2026-05-26/rust-std-beta-i686-pc-windows-gnullvm.tar.gz=c34f22b4a1c3e36628e77e3a11a9db53295018b1114d995271699dbc54ee6fcf +dist/2026-05-26/rust-std-beta-i686-pc-windows-gnullvm.tar.xz=cc06ebb38d756e8f85e7d77f3e91350d2dafc995962e90c861a3b5346eeadef2 +dist/2026-05-26/rust-std-beta-i686-pc-windows-msvc.tar.gz=cac7874472aefe7f7e51b510ff1c861739199c194392caa5b7b650ff50dc650c +dist/2026-05-26/rust-std-beta-i686-pc-windows-msvc.tar.xz=165f75835c50e16ce20d08b3d2425498d63f9f79645773d129d783e9d9199b6a +dist/2026-05-26/rust-std-beta-i686-unknown-freebsd.tar.gz=e8bcd41d0f1e6b01a44184490b7a269ebf23d50011fb82abcd20badef5c2e132 +dist/2026-05-26/rust-std-beta-i686-unknown-freebsd.tar.xz=24594ddcb9bf42af28e339b8f6e0adc9ab7b3b4185b113f7e872c84a8f57bb19 +dist/2026-05-26/rust-std-beta-i686-unknown-linux-gnu.tar.gz=2115c237523e857875e6b9b4952b2d3ac92c4d7b64f182c9912b68324e586dc7 +dist/2026-05-26/rust-std-beta-i686-unknown-linux-gnu.tar.xz=bdf8a2807e3eaa2b5538afbdf8aab005c5dc3796444115df6167745935be7afe +dist/2026-05-26/rust-std-beta-i686-unknown-linux-musl.tar.gz=b0ff44adc7329a9003e89f0b767014def2d7c3e699fe7646858b41d530c83a54 +dist/2026-05-26/rust-std-beta-i686-unknown-linux-musl.tar.xz=1cfe0a142c86229749acd20bf809936d17fa9a0808a6ebc335bcad1ed52aaa90 +dist/2026-05-26/rust-std-beta-i686-unknown-uefi.tar.gz=d961861845f3d29affc24ae78e702544b3b886fa5ef45f694b8708b20b715331 +dist/2026-05-26/rust-std-beta-i686-unknown-uefi.tar.xz=7be795ee7fd23b32edbe0775cc8704513ba5028e803fb4c8461e2b52c07a01bb +dist/2026-05-26/rust-std-beta-loongarch64-unknown-linux-gnu.tar.gz=926f3c01a88e54a91cae25550356a4f7def1c4a9651383278cc06bd6ce7628e5 +dist/2026-05-26/rust-std-beta-loongarch64-unknown-linux-gnu.tar.xz=fdd9f7bb7dff61ac2436d82bef789d604b0da4800b478f64408fc64b5b3ed425 +dist/2026-05-26/rust-std-beta-loongarch64-unknown-linux-musl.tar.gz=492c06b3a5c42902e66a89fde87c2ee5be04e169c6709459a00486f3d785a120 +dist/2026-05-26/rust-std-beta-loongarch64-unknown-linux-musl.tar.xz=25a2f9ed43768790115d0aa8309eba2579f8b7fd24b026585ce2afda507f884a +dist/2026-05-26/rust-std-beta-loongarch64-unknown-none.tar.gz=d746d6b5f1904cb8b7d961f26083ceed40ef5c32a48f374183c3406ff6a287cf +dist/2026-05-26/rust-std-beta-loongarch64-unknown-none.tar.xz=ec2ec396b55471bf321168bae544e5597cfdbfe68c50c613454ce70ebc01fa87 +dist/2026-05-26/rust-std-beta-loongarch64-unknown-none-softfloat.tar.gz=554d6f9fe3f2c7eb54e2dc797ba3f536197e05c72f247c35f1505d409434b7fe +dist/2026-05-26/rust-std-beta-loongarch64-unknown-none-softfloat.tar.xz=62bf58251726f209564c52435b38ef388d125d879a701dbd35815691038f637c +dist/2026-05-26/rust-std-beta-nvptx64-nvidia-cuda.tar.gz=c6d6fe7ab2591f2107dce468d9e5ee5f44ce42c74355dc53739fba4236855c82 +dist/2026-05-26/rust-std-beta-nvptx64-nvidia-cuda.tar.xz=07f72fc2525f59c54da7c7b64e1215822f36bf39abd0996156458fef6ef50aa6 +dist/2026-05-26/rust-std-beta-powerpc-unknown-linux-gnu.tar.gz=ba0bcd01816c88b5361fa7285aa44184daeca0021375daa836077e84acb31012 +dist/2026-05-26/rust-std-beta-powerpc-unknown-linux-gnu.tar.xz=b22c226c86a886f67a37c2122eb68bba40e587fa50ce1596268c44e5bb5edb97 +dist/2026-05-26/rust-std-beta-powerpc64-unknown-linux-gnu.tar.gz=a25b0b14b32c8f5e9274c0e46f75daf1e228f5ce1d3483932f2e5dadd8d7c8e2 +dist/2026-05-26/rust-std-beta-powerpc64-unknown-linux-gnu.tar.xz=b02ebaf1979abaa09082bf7892d99a2183eb49171cdf3083614ac05f410a16a5 +dist/2026-05-26/rust-std-beta-powerpc64-unknown-linux-musl.tar.gz=b418e2b774a9d6e86574c1b2eed982c145e068fae1f19535255c52a806104e12 +dist/2026-05-26/rust-std-beta-powerpc64-unknown-linux-musl.tar.xz=6ea2a263fa2fd8799ec7955f6263df64e8e54ab568a110b11ffeec86e55d424d +dist/2026-05-26/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.gz=cf3165216f7c0e4df28bff1201a87ce54124a9d02f0a43651a7dcaa994d11a2e +dist/2026-05-26/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.xz=07497459f03b37b192b5653f38720211004d6a2361f6310b866c177ada183879 +dist/2026-05-26/rust-std-beta-powerpc64le-unknown-linux-musl.tar.gz=9612f2e7012dcf39c83c27dd8ffeb4aa740cad56803e509552c9f6bffad24956 +dist/2026-05-26/rust-std-beta-powerpc64le-unknown-linux-musl.tar.xz=2098e030184e9bd939bc64d8f2f1fca224b80a8aee7a7351679f26e4ff1e4737 +dist/2026-05-26/rust-std-beta-riscv32i-unknown-none-elf.tar.gz=cfb79df87ad210a70b60e90779fbd33c1087652d0f77bee23de95a4a77bc15e9 +dist/2026-05-26/rust-std-beta-riscv32i-unknown-none-elf.tar.xz=6e9702348472f53b2e8c7ccaa983a67604d9950351bc0946b87fce30d2a25750 +dist/2026-05-26/rust-std-beta-riscv32im-unknown-none-elf.tar.gz=46228bf7fed3481e76b63963191e8e11f5aa4199a4a92025db40011049374ec1 +dist/2026-05-26/rust-std-beta-riscv32im-unknown-none-elf.tar.xz=bf12e284c616d189aa4e042644c0bcd816bf6a2c72cb1650d5e46332175aff6f +dist/2026-05-26/rust-std-beta-riscv32imac-unknown-none-elf.tar.gz=945ad577c2b7007d32ecb30afb9fed117016e1981403de0fb972e186acab433b +dist/2026-05-26/rust-std-beta-riscv32imac-unknown-none-elf.tar.xz=06600da1c320d731dbce09ef9cd008e399e665749b404bb270ad0b645e88043d +dist/2026-05-26/rust-std-beta-riscv32imafc-unknown-none-elf.tar.gz=c784b69efed57bafc05601e4fabaa66a2c5bca1381c664907d09875142a26b10 +dist/2026-05-26/rust-std-beta-riscv32imafc-unknown-none-elf.tar.xz=8fc742ae630713148399a6ce5e75d52ddbe4c0988c0dd00f3a615756bc7da883 +dist/2026-05-26/rust-std-beta-riscv32imc-unknown-none-elf.tar.gz=b2112ffc4dc2e65a3fd0f091bd50c458cb79c0f31f1425757873267c7aa1c330 +dist/2026-05-26/rust-std-beta-riscv32imc-unknown-none-elf.tar.xz=293ae10faa539f2c9e01a115c66eb57a1038d352d331d548beb67a79a39aa16b +dist/2026-05-26/rust-std-beta-riscv64a23-unknown-linux-gnu.tar.gz=066a1b02fc716a6bb052bea133ab46cda3db94dd628547590edcf6446ae9cc89 +dist/2026-05-26/rust-std-beta-riscv64a23-unknown-linux-gnu.tar.xz=7f3d8c2c99d543fe8e414dbd0140f0125e91bd16bb6ad9e08379f5f93de02741 +dist/2026-05-26/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.gz=583a12c498dedf52e0870a03876c1e52bace87be800e9b16f00765f08c3799f2 +dist/2026-05-26/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.xz=8e8b184f7333e33b75483e6909e899be55416aa82d45c2b63fdbc95d2f46417c +dist/2026-05-26/rust-std-beta-riscv64gc-unknown-linux-musl.tar.gz=8759ce423911e625ac3e3a6264b33f542b44e9ffcd109358b9b5cf6fc79a03a3 +dist/2026-05-26/rust-std-beta-riscv64gc-unknown-linux-musl.tar.xz=db8fcbf19f23f9441dd3484c5199ae0b6dc9a18a40bcbf4a1f7e3d303733a9f9 +dist/2026-05-26/rust-std-beta-riscv64gc-unknown-none-elf.tar.gz=3eaa9f44b30f133b36e940fef2b2a6d4243ac67a9ec51cffde7dad75ced9d5c2 +dist/2026-05-26/rust-std-beta-riscv64gc-unknown-none-elf.tar.xz=b8e40709232d7f2ee975cc583671ba38cdb41ef126a03c0318d3f538c142b345 +dist/2026-05-26/rust-std-beta-riscv64imac-unknown-none-elf.tar.gz=de21a2fc84455b69c36b0457cfee3a5b959981b45be1d91774d744f022e587e3 +dist/2026-05-26/rust-std-beta-riscv64imac-unknown-none-elf.tar.xz=00df854c6031e29cfe1c3bab069692401e8b3713d521b34c6c7afff575931a75 +dist/2026-05-26/rust-std-beta-s390x-unknown-linux-gnu.tar.gz=d26d0f820f43990852f55c87f0b029d39b003c2356acf34c8df327e0e7034880 +dist/2026-05-26/rust-std-beta-s390x-unknown-linux-gnu.tar.xz=e400001965c94ce5e012561f03e5bd356dc699cb1c567f56e9af6a0d0f9927e5 +dist/2026-05-26/rust-std-beta-sparc64-unknown-linux-gnu.tar.gz=d06da09f2e19dd4c5ed8e91050537ef04bce8d2ffdd41b0d98f8dfa583ed0f09 +dist/2026-05-26/rust-std-beta-sparc64-unknown-linux-gnu.tar.xz=d83c4bf753a7962495a827972592786db018ce95ddc75d31190cb727d77efa86 +dist/2026-05-26/rust-std-beta-sparcv9-sun-solaris.tar.gz=21076ff50e9bbfda52f1c32078d219c8bbefc0b682d52111f98c8c8b12851eea +dist/2026-05-26/rust-std-beta-sparcv9-sun-solaris.tar.xz=2c8971dfdf711ad7edcf5da2d20db6fa0c81a6422ae9bded172c6c0fc66d1d1a +dist/2026-05-26/rust-std-beta-thumbv6m-none-eabi.tar.gz=a4bd93809d28370c89b77c9f3722a88c7727d5b339e10aa22efef503416b06a0 +dist/2026-05-26/rust-std-beta-thumbv6m-none-eabi.tar.xz=0f46bb8716878780049b009dac910ba69449b158ec8a612e1a65168b5ec495f6 +dist/2026-05-26/rust-std-beta-thumbv7em-none-eabi.tar.gz=2804f4d1b88003f8672b06e197fe01ee732cdb2c736802e0f6dea995087c6e8b +dist/2026-05-26/rust-std-beta-thumbv7em-none-eabi.tar.xz=cdaff117730ce03c37e01f9a9040ca682c6723ce42bb64ed6d6836c953925264 +dist/2026-05-26/rust-std-beta-thumbv7em-none-eabihf.tar.gz=270b1325218e6f2421bb8d9eb927a5e9d7d4be5362e053ccb83de3ca9ed7157f +dist/2026-05-26/rust-std-beta-thumbv7em-none-eabihf.tar.xz=debf74c0e2a3887a46ec1013d2eea756b4d72500cc6cb1ff7a1c2b286a069d83 +dist/2026-05-26/rust-std-beta-thumbv7m-none-eabi.tar.gz=dcfd1f841d190234da3257c1515e3398240f90bfa9cc13cbf018b97195b3629b +dist/2026-05-26/rust-std-beta-thumbv7m-none-eabi.tar.xz=9f80dbafaf8c69f2c12e34aa4e1905e04779d75d2907b88472cbcf17c724f011 +dist/2026-05-26/rust-std-beta-thumbv7neon-linux-androideabi.tar.gz=66bda230ae87e79c0793c1feaf8a73547015a51541faf16fa4bb2ee59102ee84 +dist/2026-05-26/rust-std-beta-thumbv7neon-linux-androideabi.tar.xz=0283fc71ef9fa43d55e6c16aa5874b049c2133398deb6efdff83264acfe64751 +dist/2026-05-26/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.gz=68827a50673b82a91f89622f3e0e09942f70ac0e085ac45e26ea0a4f6b23a810 +dist/2026-05-26/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.xz=55e0c1edaca1322a2a3e50999dd94f1cf32b91ef819eb6039f99a5027fe6670e +dist/2026-05-26/rust-std-beta-thumbv8m.base-none-eabi.tar.gz=d3a13f72072d1f17b3456aa15b8ba0ca6236aa42b549f6e10ecd090f971a4dbf +dist/2026-05-26/rust-std-beta-thumbv8m.base-none-eabi.tar.xz=4146910a2fd0b820b08b187a3f397e8c753a6b5410bf6e849b98402806df8b4c +dist/2026-05-26/rust-std-beta-thumbv8m.main-none-eabi.tar.gz=595cb69bd2e0cbc0787af5442be2d5897f118ce29ae3c98aa62452ebebf7004f +dist/2026-05-26/rust-std-beta-thumbv8m.main-none-eabi.tar.xz=63d5a8e72adec22fd857274e5110e24a03fed1b5298a8167616d5931e5485df5 +dist/2026-05-26/rust-std-beta-thumbv8m.main-none-eabihf.tar.gz=0ddc61a3f97ae29d15d884deee7768209695e63cc0b7f763da7ce60418cf55c1 +dist/2026-05-26/rust-std-beta-thumbv8m.main-none-eabihf.tar.xz=ce6820a5fee2a4ddcc768d74f348608bb603ad3917b55452ef3f33b1f1c3e660 +dist/2026-05-26/rust-std-beta-wasm32-unknown-emscripten.tar.gz=bf15dec604c8b907abadd321a58a7254ef47b1c7847fad65607745c42e53aee5 +dist/2026-05-26/rust-std-beta-wasm32-unknown-emscripten.tar.xz=0c46499638659f2fe31501bcec0485732af5a86ea14a0b63a6b79fb70477b97d +dist/2026-05-26/rust-std-beta-wasm32-unknown-unknown.tar.gz=ce5d2aa9fad79b6c182e1d918407d7be470e8b9eab020d6182ac3e74ab7e56fa +dist/2026-05-26/rust-std-beta-wasm32-unknown-unknown.tar.xz=b24c6cd9a3794b4b7c9308503909be9dae4a19de0dbf4c7669fa79c59c438be3 +dist/2026-05-26/rust-std-beta-wasm32-wasip1.tar.gz=cc433b2eaf0cb93761e00ca71c9fc343eacf53e315765d6416323f273e734515 +dist/2026-05-26/rust-std-beta-wasm32-wasip1.tar.xz=497e718f6787612ca3f73488f865a6704dc4e92cc4e3da243280728e41ac5c2d +dist/2026-05-26/rust-std-beta-wasm32-wasip1-threads.tar.gz=46082435c2b937a80e0f39b668e2b4b07f6aa03e2bb40430e30ddae10285fc92 +dist/2026-05-26/rust-std-beta-wasm32-wasip1-threads.tar.xz=16487f0fccc060aaa9c62a5b8f0a6dae325c6d42b585ece641baa2d76c4a9fca +dist/2026-05-26/rust-std-beta-wasm32-wasip2.tar.gz=555b08c458ec3dbb975cc7c5d85ba6bdc3c3927d65b5272e9d477a7875905337 +dist/2026-05-26/rust-std-beta-wasm32-wasip2.tar.xz=72569327310a43f5c25b3cfaac4e47d0641b768160ff89bf32b71eed948e0749 +dist/2026-05-26/rust-std-beta-wasm32v1-none.tar.gz=15582b624357a54e74a66f344d244deae22b8f4f73e32c1bad2706726f663586 +dist/2026-05-26/rust-std-beta-wasm32v1-none.tar.xz=0d7c4057289629de4ae4db84fc3123cd6a203e54c938589d17e5f48c233aa56d +dist/2026-05-26/rust-std-beta-x86_64-apple-darwin.tar.gz=a5e69865623a3e71984d11fa10fb2fef45710adb6b7b4da72ee6d3d0b6da58a3 +dist/2026-05-26/rust-std-beta-x86_64-apple-darwin.tar.xz=2ca074e1bd0940c22c79141daab86e5229c192446ddf250b2ed0ce61fd6c958a +dist/2026-05-26/rust-std-beta-x86_64-apple-ios.tar.gz=8a06c997501b52857174bcedeaf483d155c38efd0ff5c70e3b90cfa1066c66f7 +dist/2026-05-26/rust-std-beta-x86_64-apple-ios.tar.xz=f3193a793d0b17bd7d34d555d5e894fd4fd03fe78adb382db2f1786d085850eb +dist/2026-05-26/rust-std-beta-x86_64-apple-ios-macabi.tar.gz=04b996f742fa1bdfaca43126a49f87b9f801cee08117dc231eb53f5b57ce9302 +dist/2026-05-26/rust-std-beta-x86_64-apple-ios-macabi.tar.xz=1c4a8c2967cd6573e9851b9b9ddceae84a3d984d787e09d119774085ab8c3f98 +dist/2026-05-26/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.gz=9eba7db94877d39623cc9069e3fbafd95710dbd65b5632359a0955ddaa5b5776 +dist/2026-05-26/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.xz=f155d2de696f27fc240e2a0411511989a19c0c4ac6bd1991f0f0ae2082e92fb5 +dist/2026-05-26/rust-std-beta-x86_64-linux-android.tar.gz=1da6cf0d3ca5efb89bc5be58b50bb8eebdab79886ef6f9b2491bcf59e4f53921 +dist/2026-05-26/rust-std-beta-x86_64-linux-android.tar.xz=23ca92958fd000dcc80222acc83825d766fbc6486229cff752ef52a73804f504 +dist/2026-05-26/rust-std-beta-x86_64-pc-solaris.tar.gz=78290256553e37a0fc60734ed1c933b8ee937532bd17f2890d28ab7197d94cd2 +dist/2026-05-26/rust-std-beta-x86_64-pc-solaris.tar.xz=17db3d6653cfdca421433615d6f03eed13774245b26d875decf3d366ba2a094e +dist/2026-05-26/rust-std-beta-x86_64-pc-windows-gnu.tar.gz=72c5f4e59cb4244888926328bc516e0cdf42a95657690465f7f823f5988ea839 +dist/2026-05-26/rust-std-beta-x86_64-pc-windows-gnu.tar.xz=aa27a5ba32ef18cf6d8603fdf59b993409ad521b6c050591d91d7d8b13c1ce8c +dist/2026-05-26/rust-std-beta-x86_64-pc-windows-gnullvm.tar.gz=7e06600543e7443ca56e6eacd96240f3134a45f4709d55905687e50722d639df +dist/2026-05-26/rust-std-beta-x86_64-pc-windows-gnullvm.tar.xz=c16d8987b407c2eb5536822bd1117c157a0ffb837cea87d7056db56a61451b5e +dist/2026-05-26/rust-std-beta-x86_64-pc-windows-msvc.tar.gz=377d7b1db4def86f67701799f7ac08bc39d4d1896f0ece6d4e814cc9463a69c6 +dist/2026-05-26/rust-std-beta-x86_64-pc-windows-msvc.tar.xz=fa73ad3a6ce7dbe73d4fb558554879cef0dfb9e9ce1b64b24568c6d55846b858 +dist/2026-05-26/rust-std-beta-x86_64-unknown-freebsd.tar.gz=151ec9e523a148e400ff4a956849b00596905d37e9e936816857cdf1b0fec674 +dist/2026-05-26/rust-std-beta-x86_64-unknown-freebsd.tar.xz=f4878899d095d9b4ba774188dc0376b452ee1f833093173f2f0a7ba2810d30b0 +dist/2026-05-26/rust-std-beta-x86_64-unknown-fuchsia.tar.gz=b88b68da0659dfc4bfd7141f6d701351f7394f36045a9f1bf603d79b9184cbea +dist/2026-05-26/rust-std-beta-x86_64-unknown-fuchsia.tar.xz=1f8f405f8f47c1017f5a04f4cbd9ef6923383a7954a5bff2c144f23ed4448899 +dist/2026-05-26/rust-std-beta-x86_64-unknown-illumos.tar.gz=e296b74446c7a739045f12d4fb3ea3dc954362333717529ad1e87ddb6c55db73 +dist/2026-05-26/rust-std-beta-x86_64-unknown-illumos.tar.xz=2b1287a16224eee1ddc15c1932a1a8ae98deed261c11eb42c54d3d7e7ff4dd6a +dist/2026-05-26/rust-std-beta-x86_64-unknown-linux-gnu.tar.gz=67929ee444c3cc3c4097e62a3a87a567a9e688e1ba920b0277926f662ca7bc6a +dist/2026-05-26/rust-std-beta-x86_64-unknown-linux-gnu.tar.xz=08ab5e6147a280cb6095203a0cec7024ed263a53bbdbe51c00406cd403f055d2 +dist/2026-05-26/rust-std-beta-x86_64-unknown-linux-gnuasan.tar.gz=a6ffb3c3ce1c5232287809a08421b459f3d84e026692d2d8204a7648a49afcaa +dist/2026-05-26/rust-std-beta-x86_64-unknown-linux-gnuasan.tar.xz=4ce80b4565cf9e2f64d4d26aa13d011fe341eb57dcf75e0970a07e2eb128830c +dist/2026-05-26/rust-std-beta-x86_64-unknown-linux-gnumsan.tar.gz=f31426a8d8690c4ba928679f6ff2f2552be87c895774ecdb3493955c265fd00d +dist/2026-05-26/rust-std-beta-x86_64-unknown-linux-gnumsan.tar.xz=7e139f01bbfb9f1fc2b360508c816c04150caf44c427c7ef7885967aba5b0901 +dist/2026-05-26/rust-std-beta-x86_64-unknown-linux-gnutsan.tar.gz=61811b1109cc1faeaad5e09bc37d13ad8bf428066b4ca31c10901afefc582e71 +dist/2026-05-26/rust-std-beta-x86_64-unknown-linux-gnutsan.tar.xz=de1b706fa0043ca177a4493a4b6914e4438899053e045299fdfc99fbc187ae44 +dist/2026-05-26/rust-std-beta-x86_64-unknown-linux-gnux32.tar.gz=612949bbe6672deda28a09d2bd7f1be67b4ff5cffc00cea3bc2aa27774d78335 +dist/2026-05-26/rust-std-beta-x86_64-unknown-linux-gnux32.tar.xz=f2d78c87e3037ad7371d2ded2c1d583937c46764753770126ec8d76dbe61c61a +dist/2026-05-26/rust-std-beta-x86_64-unknown-linux-musl.tar.gz=95184d55feaf4fc2fb1b39562a635fe5142bb2a521a2f878a63ac02b08d23b2c +dist/2026-05-26/rust-std-beta-x86_64-unknown-linux-musl.tar.xz=d15ee75962da76b781420d8289dd5ca558dae93594257639fa9b11c5844bf4f2 +dist/2026-05-26/rust-std-beta-x86_64-unknown-linux-ohos.tar.gz=fd51291e8a3885b2f206021f45878f5a1a6754aa7fc61098af50ef6d1121477a +dist/2026-05-26/rust-std-beta-x86_64-unknown-linux-ohos.tar.xz=6324a1c39a1f3ae6675677ab980bebd64055a9638a55d1215db2212c8bbb0ebb +dist/2026-05-26/rust-std-beta-x86_64-unknown-netbsd.tar.gz=2bea75995d8679d7e3b8ac3ecf644f4c14c724002790a375dff2575f10145a82 +dist/2026-05-26/rust-std-beta-x86_64-unknown-netbsd.tar.xz=9928cefbf9c85caf59c27de0ea985e3d2dd2e50169a3a8205962cfa6b4b85466 +dist/2026-05-26/rust-std-beta-x86_64-unknown-none.tar.gz=aeb6cbf8c36a76cd57615980491ccb7bef6430ded9133ac2fbf74f5453b30b14 +dist/2026-05-26/rust-std-beta-x86_64-unknown-none.tar.xz=9c77581e1a7255a12aaf8041e4b02b8818019c5d4eb12483b346c88fef79add0 +dist/2026-05-26/rust-std-beta-x86_64-unknown-redox.tar.gz=7138fd31d78bf86780478e964ebcfd3d7db86596a4efd38402659f7dd540eeda +dist/2026-05-26/rust-std-beta-x86_64-unknown-redox.tar.xz=5f37ce603b0114f6d86cdfd2c6743ea8f82daec2f158ad9cf67422a07db8bbc0 +dist/2026-05-26/rust-std-beta-x86_64-unknown-uefi.tar.gz=d5e82e8e7ac0bcab0232ce8bf74ba94f52848ede129d2710f57ac0f365448f95 +dist/2026-05-26/rust-std-beta-x86_64-unknown-uefi.tar.xz=e48c1187c33d75e3fb1746202bfcb95a2db0a016f94fea3c4b7652ef1f5bd9b8 +dist/2026-05-26/cargo-beta-aarch64-apple-darwin.tar.gz=29a2d1417885a4480422514c8742f226a5578ca31e4239d2331d2f06fc7c0e96 +dist/2026-05-26/cargo-beta-aarch64-apple-darwin.tar.xz=f62f4042446ac463c026820c3fd345fafdcade4893a2e454f6b1db0d52720657 +dist/2026-05-26/cargo-beta-aarch64-pc-windows-gnullvm.tar.gz=b1720c8cdceed183933fa444853f1d1125239e0162ce26a5595c3d9b6e4c3c0a +dist/2026-05-26/cargo-beta-aarch64-pc-windows-gnullvm.tar.xz=c4ed98bb80d12f0d7b6a725347802839343cac38987833dd7b511c01d5cf5416 +dist/2026-05-26/cargo-beta-aarch64-pc-windows-msvc.tar.gz=b1850ef047875088295882501ccea709836caf585131a4e4517d87c6cd3ef18f +dist/2026-05-26/cargo-beta-aarch64-pc-windows-msvc.tar.xz=c9f93000e9c28e217bea7d19aec01bcd1388e0bd99c9391c5152178ed4ac6286 +dist/2026-05-26/cargo-beta-aarch64-unknown-linux-gnu.tar.gz=fc2ff94b280994ac03255e578b10a546ada0890199877120d0ba18cf5e5d82f8 +dist/2026-05-26/cargo-beta-aarch64-unknown-linux-gnu.tar.xz=3028518ce284d06493029db0ba374b6537bc061441617f573e8bab2eb6e92b7c +dist/2026-05-26/cargo-beta-aarch64-unknown-linux-musl.tar.gz=39e87ff1310bf9e733c4984c2152206abf9c3528df2b0cca47fb373e9a6f0c7c +dist/2026-05-26/cargo-beta-aarch64-unknown-linux-musl.tar.xz=61c0dbc95e14a9398fd51596254f8c325716f73ac8e92cbd07ed1b6b1c3a53a6 +dist/2026-05-26/cargo-beta-aarch64-unknown-linux-ohos.tar.gz=0f5f90246646df581b4ac64a35a8a57e4df8769154a180acaa4a816070d07fbc +dist/2026-05-26/cargo-beta-aarch64-unknown-linux-ohos.tar.xz=f27e40ed1711e86bfbe80dc18c4661429b23419c54d8241c1e033823f9228b45 +dist/2026-05-26/cargo-beta-arm-unknown-linux-gnueabi.tar.gz=7f6652ee545ae55e35099ca56595f47f2468e3dd981211090ae18aa0e48b884f +dist/2026-05-26/cargo-beta-arm-unknown-linux-gnueabi.tar.xz=6b206f137b00982ed87feccabfa317b42558ee8e5f21e30b9840d66c8c8069dd +dist/2026-05-26/cargo-beta-arm-unknown-linux-gnueabihf.tar.gz=e1d9bbf03231f83e958d72ac40e60eb96ca86b6a43cd61c1ed8661e952e4fee4 +dist/2026-05-26/cargo-beta-arm-unknown-linux-gnueabihf.tar.xz=4ebd73c9b25c299c127bb3d5656282d2de0015f1cb23b554e06eb7baeaad763c +dist/2026-05-26/cargo-beta-armv7-unknown-linux-gnueabihf.tar.gz=35f1ed59f22799936aa11edeb585c3d3267242d64fcec0df696790eeef64686e +dist/2026-05-26/cargo-beta-armv7-unknown-linux-gnueabihf.tar.xz=606088b2fdf024836f219e9c50d4f91150e7d34fb14d3934e1e7912219db6d57 +dist/2026-05-26/cargo-beta-i686-pc-windows-gnu.tar.gz=a06940a25d9f6594a423144544884a8c86876424c9e24a34f623473277ce4d31 +dist/2026-05-26/cargo-beta-i686-pc-windows-gnu.tar.xz=3c3807eaec33d3e2e74b73428ee7cd2dbc2afc0937b4883f65a78eaeaf897269 +dist/2026-05-26/cargo-beta-i686-pc-windows-msvc.tar.gz=58fba90ea4da6a00118f847cdf1b5e1a356b55e680234eeff39959a2ec795ee0 +dist/2026-05-26/cargo-beta-i686-pc-windows-msvc.tar.xz=307f0b08b6839c577f8a98fee834c31d3f4ecdfa898e46e01d03329946af6214 +dist/2026-05-26/cargo-beta-i686-unknown-linux-gnu.tar.gz=58c88e7620bed2c2b1614fce41f966e4aee0ce516c2ec049d548c2a8d69558eb +dist/2026-05-26/cargo-beta-i686-unknown-linux-gnu.tar.xz=b8df744237a73dc848194a317bd3a75ca3d24dbb203a8fbaa68e561e75168aba +dist/2026-05-26/cargo-beta-loongarch64-unknown-linux-gnu.tar.gz=8d3766aa20173ec478b324fc196122d9e0272994e65ac38c5abb2c883fbc57a6 +dist/2026-05-26/cargo-beta-loongarch64-unknown-linux-gnu.tar.xz=c64bd517aa09289066717359207a6c669db19cfee900f411c7fcdc3cb3e385fa +dist/2026-05-26/cargo-beta-loongarch64-unknown-linux-musl.tar.gz=6f77a9d2439ea2b322c9bd01d69fdc63c3ce55d084f6f7a10f6235101d1dcb05 +dist/2026-05-26/cargo-beta-loongarch64-unknown-linux-musl.tar.xz=6c77b461d92ebc13f9bf092884646a5233b61d9537dea5141b13e1b436ba1789 +dist/2026-05-26/cargo-beta-powerpc-unknown-linux-gnu.tar.gz=fd1d12423add1384dbb44f7c81857c8b070f93e8a96360462f85701aee2b62bf +dist/2026-05-26/cargo-beta-powerpc-unknown-linux-gnu.tar.xz=22106aef7a26cb761368eaeba237211c9a18a2f889772971e31facced024b23c +dist/2026-05-26/cargo-beta-powerpc64-unknown-linux-gnu.tar.gz=cf0e873505283c1ceae32ce6e9a506c5955be8b83a8b619f0fb9f06926cc4551 +dist/2026-05-26/cargo-beta-powerpc64-unknown-linux-gnu.tar.xz=ea52f7ff8dc9201f748051c9286c601fad1f9d6ff6b1d42e72b75f435b9ce125 +dist/2026-05-26/cargo-beta-powerpc64-unknown-linux-musl.tar.gz=cb5a086d2f252b8d348ef708335fd833e230fd34c6558038212032f20ee8e497 +dist/2026-05-26/cargo-beta-powerpc64-unknown-linux-musl.tar.xz=4653249a34e7036f0e3d20e5b2d6f899a6ce9f406173cdbd0e1d248f63aa1e83 +dist/2026-05-26/cargo-beta-powerpc64le-unknown-linux-gnu.tar.gz=e7a4e892b3b9b870563bf6a741c1d50b4d1816c06c37ca724a0a3266f7673a54 +dist/2026-05-26/cargo-beta-powerpc64le-unknown-linux-gnu.tar.xz=66c59a1c17b1e54c7ea32f151fdb8cbba8ee41987bbcdea55c3d3f263011086c +dist/2026-05-26/cargo-beta-powerpc64le-unknown-linux-musl.tar.gz=49f6f09b0a8761023bf0baa9d0883a222525d98a05a27e60139ca46646007fa5 +dist/2026-05-26/cargo-beta-powerpc64le-unknown-linux-musl.tar.xz=49912c3db018a009584739fb7b3954e8c9b0f88e3554e17f0ceb7af29fb2bd88 +dist/2026-05-26/cargo-beta-riscv64gc-unknown-linux-gnu.tar.gz=9c587b33e5119934abe8638c9bc83f3c9e8456db172e07ac4d5ba7a9011ce983 +dist/2026-05-26/cargo-beta-riscv64gc-unknown-linux-gnu.tar.xz=0547ecb2fb44a9b50e9db8841fce8138684c839c934361638565c5413919906c +dist/2026-05-26/cargo-beta-s390x-unknown-linux-gnu.tar.gz=2eef81d82212cf136498eeb5222ea7ea231143c7236c29cb94b792661084ff50 +dist/2026-05-26/cargo-beta-s390x-unknown-linux-gnu.tar.xz=5b25960e1b5fae658758a323bb9141550191a03838081f7433781480273ebe05 +dist/2026-05-26/cargo-beta-sparcv9-sun-solaris.tar.gz=173f7541a82560c6870d78c97e7e1e294cfaf908db61a5c5b4efedf94e2abe8d +dist/2026-05-26/cargo-beta-sparcv9-sun-solaris.tar.xz=beb7a5a159816cdd33aa11df75698239f88baa56f47dcf0d0d09a978f9e1c9ae +dist/2026-05-26/cargo-beta-x86_64-apple-darwin.tar.gz=f08a9e02e0a9a0d200d77f3b31a640f6992654d779b4e25c35de4f35b95b569e +dist/2026-05-26/cargo-beta-x86_64-apple-darwin.tar.xz=72522275bc67ba180d8c87359c5a789bc4fee5434e07e851aa00aa22da326c79 +dist/2026-05-26/cargo-beta-x86_64-pc-solaris.tar.gz=72b61e883293a10133c2755ca5f12e8e9b59d2e456ed49ec05c4bfc49f45a9bf +dist/2026-05-26/cargo-beta-x86_64-pc-solaris.tar.xz=d2f88d28ed1064c85c55fb820d46501c0e13fab76890331735a68b8af69baf59 +dist/2026-05-26/cargo-beta-x86_64-pc-windows-gnu.tar.gz=3b332d6a27a8486d9a5432f6664a52abb7acc72b55af3d1d48bd86af72257a5a +dist/2026-05-26/cargo-beta-x86_64-pc-windows-gnu.tar.xz=3a4dbf7b9fa1c6d7ecb1ab59c1211067b5ee55a4293cc3725edc3af0c471e479 +dist/2026-05-26/cargo-beta-x86_64-pc-windows-gnullvm.tar.gz=c927d5d8a2237991ec6929a71b5fca8edd2a3e4874e1657c9c54df1733e64748 +dist/2026-05-26/cargo-beta-x86_64-pc-windows-gnullvm.tar.xz=d81f5f4928479d90f43debd3d53d6ada11aa6431aadc1c6b123c133051914898 +dist/2026-05-26/cargo-beta-x86_64-pc-windows-msvc.tar.gz=95be8d4d1deee874794e9cc6197d736470e466e2ac1ce6188aef42e3cbe40688 +dist/2026-05-26/cargo-beta-x86_64-pc-windows-msvc.tar.xz=5b6140aa584c014d0c125e11a08fbea95a105dc32c96201d8ace688725acf5cd +dist/2026-05-26/cargo-beta-x86_64-unknown-freebsd.tar.gz=9a1713dd27f2e3975be92c3bd0934857513c317b2ccdaac6724b42a5e9614c67 +dist/2026-05-26/cargo-beta-x86_64-unknown-freebsd.tar.xz=940a31be12ad7761857bef08312d7092d1c90bea131d7ae2768ad72434cfd39b +dist/2026-05-26/cargo-beta-x86_64-unknown-illumos.tar.gz=9473b7c2a5916c106a5d32d2395b6e26f57cde6d41ddbdf9b19ff57f97d48656 +dist/2026-05-26/cargo-beta-x86_64-unknown-illumos.tar.xz=567a02d87448532c917f9e83e90af953621a3230f439e0f8ddad13226755a581 +dist/2026-05-26/cargo-beta-x86_64-unknown-linux-gnu.tar.gz=35556fcf404d7e8b77da4dfff61de5bc1e3832ccf0d44dd05fca92160dd64ab2 +dist/2026-05-26/cargo-beta-x86_64-unknown-linux-gnu.tar.xz=2ff444e9900367f5d99186441879f6dd177de1b018a27a981b2b5c766c453a35 +dist/2026-05-26/cargo-beta-x86_64-unknown-linux-musl.tar.gz=41082305565dcf036a1d59e804ca156fadb3f461470f117d4aee97b2af97fc83 +dist/2026-05-26/cargo-beta-x86_64-unknown-linux-musl.tar.xz=dc37dc11a7893fb75086ed5080c6c130aef7f9d12a289dff1259a7a7c2c89ed6 +dist/2026-05-26/cargo-beta-x86_64-unknown-netbsd.tar.gz=c09c8421f89c27169c13d153812e28a70b7d6a6bdfcd3088db08ed31c36181ec +dist/2026-05-26/cargo-beta-x86_64-unknown-netbsd.tar.xz=d32516e8adf7776976ccb7245e175bac33be9f10f1cc4a21646fb931922cb74f +dist/2026-05-26/clippy-beta-aarch64-apple-darwin.tar.gz=9ed4e38b5fd38cc3a8dbb2cfc746f86c5492bf3368a1aec988ab264e25e7ac6a +dist/2026-05-26/clippy-beta-aarch64-apple-darwin.tar.xz=b39deab770c468163ac3f3ec3964d8f2ee0aaaaf315d638d4b3a640ef65d0ab8 +dist/2026-05-26/clippy-beta-aarch64-pc-windows-gnullvm.tar.gz=8189ef53d20475583a0ac1390f80eb6b510bb5e8d48ffc4a886718bf54839580 +dist/2026-05-26/clippy-beta-aarch64-pc-windows-gnullvm.tar.xz=8d9c70cbf7c94975ca0a7f09fa7ba203f82b7f9fb530f7525d3cda4fa719b7b4 +dist/2026-05-26/clippy-beta-aarch64-pc-windows-msvc.tar.gz=5b630dee548111ffb7836394c1fe737401fdd22bbda44f7eeb7f7300322023a6 +dist/2026-05-26/clippy-beta-aarch64-pc-windows-msvc.tar.xz=e8ccc28e0120b9f0061a9a8c95fc298e2e4987567888a058636de25fca4bc6dc +dist/2026-05-26/clippy-beta-aarch64-unknown-linux-gnu.tar.gz=ccd0ee4cc3ec4a5ad2259dab586a94fba3fa496cc3df9826a6fde8a3f827e798 +dist/2026-05-26/clippy-beta-aarch64-unknown-linux-gnu.tar.xz=08f92a35a14352473d36b31b8ba3cac4c51a730bb9c165965412bc037a743afc +dist/2026-05-26/clippy-beta-aarch64-unknown-linux-musl.tar.gz=83c3690a58d4ca776bf17ca1ae5e6b4b68296ec38d8843a3dd11b6a837668cbd +dist/2026-05-26/clippy-beta-aarch64-unknown-linux-musl.tar.xz=0e0817d88a61b037548f6a1738dd34237de90d03efad034d5528cbd213232ad9 +dist/2026-05-26/clippy-beta-aarch64-unknown-linux-ohos.tar.gz=69bf622d71dd57f747ed7a88dc27c87840968096726a75be372a0b969eb5e761 +dist/2026-05-26/clippy-beta-aarch64-unknown-linux-ohos.tar.xz=5e311c2dca9e68ad3097404ed0ccffea3644ad4f43922668fa0b4a5f37fe5322 +dist/2026-05-26/clippy-beta-arm-unknown-linux-gnueabi.tar.gz=c11b1ba047c0102de26f291c29fbf3d176b2a5c3d7adc18dfd4d5a0e7f100d07 +dist/2026-05-26/clippy-beta-arm-unknown-linux-gnueabi.tar.xz=275ff6056baa1d723f713e099b0879c0b88cbf63b4c44b3ad33095345296094b +dist/2026-05-26/clippy-beta-arm-unknown-linux-gnueabihf.tar.gz=b2fa59eb1c14ace5712e5130ad0b77173c13d913b6dc19146b934f7c7f07ad63 +dist/2026-05-26/clippy-beta-arm-unknown-linux-gnueabihf.tar.xz=84c4b45f3c47fffe4dd6980bfc97f2ba03e4ebbc4b0f685cd884729d72d2bb16 +dist/2026-05-26/clippy-beta-armv7-unknown-linux-gnueabihf.tar.gz=2976b43c2a99be98f5c961fd838556c9f393eb065a5864391726a25339c283da +dist/2026-05-26/clippy-beta-armv7-unknown-linux-gnueabihf.tar.xz=8c20beec4050615ddba2f6c70c47168a1ca9fedb01ecbdddd6cf87306c027996 +dist/2026-05-26/clippy-beta-i686-pc-windows-gnu.tar.gz=bfe81a70fda6b9e135b50beed2ec562e5f7e38122ae4fbdde6e1da7e0aae4948 +dist/2026-05-26/clippy-beta-i686-pc-windows-gnu.tar.xz=621e1f6af0f51d83901bf04d6d776a9aa6ba46348a7c18b465339b34f5bf16a5 +dist/2026-05-26/clippy-beta-i686-pc-windows-msvc.tar.gz=26f7c25988026da22d9f83e872d4ea7a0d959bd2ddc1d775a76570f5c8179a01 +dist/2026-05-26/clippy-beta-i686-pc-windows-msvc.tar.xz=9b806c3c97af45a5d16aadd3126fe7db3c36cefad1d07f7e1d27f8ead3d6de15 +dist/2026-05-26/clippy-beta-i686-unknown-linux-gnu.tar.gz=4770bcd7b6e61d2fb84ea8e85f8e3e8b96f462a0de3785e895aa9df4197c3140 +dist/2026-05-26/clippy-beta-i686-unknown-linux-gnu.tar.xz=f87fb6944661e6e5157c68cd754f6f79d49107c433521825224562b284e577b2 +dist/2026-05-26/clippy-beta-loongarch64-unknown-linux-gnu.tar.gz=5f66c73341889956fd89738e09c908ddd296129c3c180c85881d23db45fc35c7 +dist/2026-05-26/clippy-beta-loongarch64-unknown-linux-gnu.tar.xz=5e98beed5a7ac782616dd4f74392e5daf4485d89c27a69af92974c801d84dad5 +dist/2026-05-26/clippy-beta-loongarch64-unknown-linux-musl.tar.gz=a6b3cd92f25a9e0b7ac287acdb9f86be07e29a9f694acf828d8b6034a1e8240e +dist/2026-05-26/clippy-beta-loongarch64-unknown-linux-musl.tar.xz=554eb95cf6bd5aec41e8ad065f7f352d87363740d725deae342764ed310374b9 +dist/2026-05-26/clippy-beta-powerpc-unknown-linux-gnu.tar.gz=ae9b3b4ab8d8f719d65ffc2f53cdedfffeaab9f73da46cd607d742d3e06c6f0b +dist/2026-05-26/clippy-beta-powerpc-unknown-linux-gnu.tar.xz=36cbedbf1ebacc743c1b349ee83698f90aa14ce4320bff8b5cdafbc1d62da016 +dist/2026-05-26/clippy-beta-powerpc64-unknown-linux-gnu.tar.gz=d94325f7be392071a12f3b1a3081151bcc4e3ef7e1224a5663998adb04d77e67 +dist/2026-05-26/clippy-beta-powerpc64-unknown-linux-gnu.tar.xz=b80904d3266ccf9aaf559b91a71b254da3bd3ab1795a89d1be64b4db8616c3ee +dist/2026-05-26/clippy-beta-powerpc64-unknown-linux-musl.tar.gz=2538f3bd7cdb6bf963676bdd269542ea038d574d017c3342c8003b69980e7e9c +dist/2026-05-26/clippy-beta-powerpc64-unknown-linux-musl.tar.xz=50235ef14f00bdf9d37850ed4610da1a7a6fdcdc539130c1bf75b2fa4063272a +dist/2026-05-26/clippy-beta-powerpc64le-unknown-linux-gnu.tar.gz=3fc42dfb8609afe5511f33e7a1927d48ca4dba8fddf5921f95dbb1d42048dc0f +dist/2026-05-26/clippy-beta-powerpc64le-unknown-linux-gnu.tar.xz=1ba1e587dfa73de1935110ee81cf8c9d278d9e4925035512f7dd976534e98067 +dist/2026-05-26/clippy-beta-powerpc64le-unknown-linux-musl.tar.gz=0e86d7904d8c3bc4aef1dc8937e3a532fd59838d2c28fff86ef30a00cb46d421 +dist/2026-05-26/clippy-beta-powerpc64le-unknown-linux-musl.tar.xz=a238cbc5bf2716879d8d408289c24f06a41acac182617a55b753f3b0e26f1388 +dist/2026-05-26/clippy-beta-riscv64gc-unknown-linux-gnu.tar.gz=65adcf03daabb3fada6c3027e93fcb45ee18e98ae56e3764da9e1d0a21a6b3f0 +dist/2026-05-26/clippy-beta-riscv64gc-unknown-linux-gnu.tar.xz=aebdf73a8a1ca14f33a9f48920c224e9afaf4dd0ce71a589991982b9c157df3f +dist/2026-05-26/clippy-beta-s390x-unknown-linux-gnu.tar.gz=f905d89e92280c27952ae6b983c954d686ee5823abd552a718f2c97e673697a3 +dist/2026-05-26/clippy-beta-s390x-unknown-linux-gnu.tar.xz=32990494a8230da8ac1eb66ac6740a3830010f86dc8a7993a287e8aff55dbcf8 +dist/2026-05-26/clippy-beta-sparcv9-sun-solaris.tar.gz=1531cfab943c8c98b14b686130069f43db1ec388f1e5a663aa13a2099a1b62d4 +dist/2026-05-26/clippy-beta-sparcv9-sun-solaris.tar.xz=5a96dec4856047e279d099a4337a85d167790ceebc453ef602f96d233f63d2a3 +dist/2026-05-26/clippy-beta-x86_64-apple-darwin.tar.gz=b0c0bfd7f7320e25a9b48a1349af2bb58da080628623112a973496c2d57f4769 +dist/2026-05-26/clippy-beta-x86_64-apple-darwin.tar.xz=3c24a8f1c6cb0d6187673761f8773f36628596b67a95c9bf1e822d21008145c4 +dist/2026-05-26/clippy-beta-x86_64-pc-solaris.tar.gz=1f8d852ae34027ad93b511f93486654bcf89248b132d210d17cb9341335864fe +dist/2026-05-26/clippy-beta-x86_64-pc-solaris.tar.xz=f64227d6da4d561157639bf551e42a79dd00e9d656853c6296247cea924cb978 +dist/2026-05-26/clippy-beta-x86_64-pc-windows-gnu.tar.gz=cf26b0b62d6ad841b2673c936a5540449abd61c8e6d2f0c30fa038a98c6c6f37 +dist/2026-05-26/clippy-beta-x86_64-pc-windows-gnu.tar.xz=3f1f110634f5dfa7eb47cb8344f56dff63415cb1c84e00cb1e47a70a4551cc1a +dist/2026-05-26/clippy-beta-x86_64-pc-windows-gnullvm.tar.gz=8f545ae58afa0fe437c9871d6bc015504ade39e4b88a0aeb491012de346fde55 +dist/2026-05-26/clippy-beta-x86_64-pc-windows-gnullvm.tar.xz=e6386c5853736dc94c53f25141de046708c90988613806c8cffc8ec6b4a1f0e7 +dist/2026-05-26/clippy-beta-x86_64-pc-windows-msvc.tar.gz=5f0e66a72d4221bdc4f6542d438a79fb1b57ffe9e76f41a89232a94d9d63679e +dist/2026-05-26/clippy-beta-x86_64-pc-windows-msvc.tar.xz=e77f9cfbd9c835268b19d8254aa2550e36a8c8e03a724ecd3c6057995e192a29 +dist/2026-05-26/clippy-beta-x86_64-unknown-freebsd.tar.gz=2a7bcafdc45e09597e6fead972f03db64df720e0338c2808af08d9a582fefe0e +dist/2026-05-26/clippy-beta-x86_64-unknown-freebsd.tar.xz=87e59c1a85782adc0544de964e5d67af71f6ddd5ac736d82f5411068c0c95a88 +dist/2026-05-26/clippy-beta-x86_64-unknown-illumos.tar.gz=fd722e3e5c121ca8d10806a994ce9a344f1fcc1578df4d51c78c3f810201360d +dist/2026-05-26/clippy-beta-x86_64-unknown-illumos.tar.xz=04a762ae79b2d015a6f030aa9aa6b714fbaccba07c7b605144049d9c17b155ce +dist/2026-05-26/clippy-beta-x86_64-unknown-linux-gnu.tar.gz=f5320cac9b445380c63ee689e0715a8484467465fd086c58e4d686b9655a4282 +dist/2026-05-26/clippy-beta-x86_64-unknown-linux-gnu.tar.xz=13b7d7d8e484cf880f8dbe4f2fb24b253008cc3c1eccf61d67c6b5ab0aed0662 +dist/2026-05-26/clippy-beta-x86_64-unknown-linux-musl.tar.gz=589317c1d9686493df4588b61a79cb8ac97646d946b50c728161fe33f9cb4329 +dist/2026-05-26/clippy-beta-x86_64-unknown-linux-musl.tar.xz=f225a2e95dfd586eda32fdf61ff2a94a790399ac6efc3f4b122a3804b54b386e +dist/2026-05-26/clippy-beta-x86_64-unknown-netbsd.tar.gz=d2169d2ad33b36a5d6d4f8d977cf8bd412995b5e608c8ec2a42420a9f6f938ae +dist/2026-05-26/clippy-beta-x86_64-unknown-netbsd.tar.xz=b87babc28fefa92fd38276ad8f8227f4375774c30e45923595334258a8dba3ee +dist/2026-05-26/rust-beta-aarch64-pc-windows-gnullvm.msi=9ea6727d53c7fbae6ea767fdcdd8694455c0d7276b12e34b3bab00a0d7086cef +dist/2026-05-26/rust-beta-aarch64-pc-windows-msvc.msi=7e42681dfda2ebb95d3f2471c6a5ecf3e5334ae8375f5061e07fa45dabce7154 +dist/2026-05-26/rust-beta-i686-pc-windows-gnu.msi=d874559c17cf8fedd0e5b7894b0422b339d221cb264021ad43594b258dd7c389 +dist/2026-05-26/rust-beta-i686-pc-windows-msvc.msi=8f8ddbc6b3f70a1c17b6553f212e67a91503ced85dde1ba3ea21fd83a5343b7e +dist/2026-05-26/rust-beta-x86_64-pc-windows-gnu.msi=fec3d3e33b4827cfd82dc0f86f166c74cb6f7ef89e6fe378e28bd2c6a39da7f4 +dist/2026-05-26/rust-beta-x86_64-pc-windows-gnullvm.msi=e4e78d2870411c12f95a9a81f3dd99dd283451a554796b184fa7a282f662c3f8 +dist/2026-05-26/rust-beta-x86_64-pc-windows-msvc.msi=bbd3f3027f4b8f48e0e5d62a9a02ebb40a5bc8ad23057e4c8c5424d69fe01b51 +dist/2026-05-26/rust-beta-aarch64-apple-darwin.pkg=554bd24e5a581c26ebdc24eb803a3d12bdc8da6cdf3c2a2e961b6d4679ac1913 +dist/2026-05-26/rust-beta-x86_64-apple-darwin.pkg=f2ee826522337ad2f7c6b1c7afa94ac61aa6892406e8716e3d5bae6d585743d6 +dist/2026-05-26/rustc-beta-src.tar.gz=68650f1dd1ec94aaa7ee746fd1e274a34d94bd1bbda2dbe7cd1572d9b0fce521 +dist/2026-05-26/rustc-beta-src.tar.xz=c07d941b0c613580bd2cbb54c27542df097a0ba09ab8a897d526b149b7bbc79c +dist/2026-05-26/rustfmt-nightly-aarch64-apple-darwin.tar.gz=e80ad9ac41727f0545440e7c4add7f4c78bf54fc93a6c25269a3da67ecf80c07 +dist/2026-05-26/rustfmt-nightly-aarch64-apple-darwin.tar.xz=cc561be2705d55f6f0a70b3a21b4afa353ba5129d04bd3eec8d0f123f03b17aa +dist/2026-05-26/rustfmt-nightly-aarch64-pc-windows-gnullvm.tar.gz=481c96db63150e216c192c49b8dcf7e85f9ad8deb53163a2a6a0f29127b23efa +dist/2026-05-26/rustfmt-nightly-aarch64-pc-windows-gnullvm.tar.xz=a5f8b09197fde855b60055128b35e26d4979b973ff9e8e4548144d9d48c7b15a +dist/2026-05-26/rustfmt-nightly-aarch64-pc-windows-msvc.tar.gz=72e9126a07ee4ba43468a278ef25018dd64a957bc04ff394eed12c3659e27b47 +dist/2026-05-26/rustfmt-nightly-aarch64-pc-windows-msvc.tar.xz=22cbcb4ee86135c627eb7de498cae08bf4c8c4550e32379764d17535a832185b +dist/2026-05-26/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.gz=c2abc8f7249a2c72d4ad09728f1382683161f8555e41733a51f07d20140bee8f +dist/2026-05-26/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz=59a1c883c2f58f1a2faba71c9a06ff97001c8ede21359a645e682979aec1a60f +dist/2026-05-26/rustfmt-nightly-aarch64-unknown-linux-musl.tar.gz=d0d6295ece0e358b8d62f83f661001b9faaf2a1e52cfec37660719f31529d096 +dist/2026-05-26/rustfmt-nightly-aarch64-unknown-linux-musl.tar.xz=1e436b623d83aed2b500bafaab02eb9a77d6572009cb9e002c0d7ef27b32ba5e +dist/2026-05-26/rustfmt-nightly-aarch64-unknown-linux-ohos.tar.gz=61c719d3adf512f623d3abac6719caca3f3c92d5a70f2ed0adcfc5c32fdb67ca +dist/2026-05-26/rustfmt-nightly-aarch64-unknown-linux-ohos.tar.xz=5150e3e2549572c780f5280890d86d3f45e299c86f4e9ded2e34cbdd94da0ac3 +dist/2026-05-26/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.gz=782adb3f3a69eaef25b469016c4ec5074023cdd42782df123f6ec6ef0278797b +dist/2026-05-26/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.xz=f85a5b146ff44d0a0a835f4c352cbee3eb36350cb93287573ffd30f9dd11eb65 +dist/2026-05-26/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.gz=b05f23a4aaca45758a82f39ebb2376d6f88bb891f7c1181b66023922f3f52882 +dist/2026-05-26/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.xz=3743596074aefa27bf4b75bba708e5702f5833adedbe2c752fa8b19fe78cae3a +dist/2026-05-26/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.gz=9dadd6eeffebe9f32f1e295dab36b32448ee1810577f1607c155663b4a5a782d +dist/2026-05-26/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.xz=44f1f823073ad80f1d8fef29b8909cf53c0794ace2c35a70026dd33d0d4c6714 +dist/2026-05-26/rustfmt-nightly-i686-pc-windows-gnu.tar.gz=b78b0a1a6c0be21c881920a8be0d1316035a74cde58d01c95189be5a5e902965 +dist/2026-05-26/rustfmt-nightly-i686-pc-windows-gnu.tar.xz=c57b91a9fbe413e2413456bc137d16e4a43503aec74884c7430c5862c7c532e9 +dist/2026-05-26/rustfmt-nightly-i686-pc-windows-msvc.tar.gz=d3dfcd99ebab73a9d35e7e27f1ea2c34e4a1b408cb88cfdff2155e4649bc8242 +dist/2026-05-26/rustfmt-nightly-i686-pc-windows-msvc.tar.xz=9c568746440d02c3918ae49b21c4b3c399034ec35bd4bb7c50f456168c8f58c8 +dist/2026-05-26/rustfmt-nightly-i686-unknown-linux-gnu.tar.gz=9971211bc673e9e95bd9dbd86713680266bcb3f23eb052b91325be177ca418bf +dist/2026-05-26/rustfmt-nightly-i686-unknown-linux-gnu.tar.xz=3a202c5698ca0801fc570207a36266c05d2538eaa4e8a843254a21d9594c8f43 +dist/2026-05-26/rustfmt-nightly-loongarch64-unknown-linux-gnu.tar.gz=64aae7ad1b9d771213c14e1a12b93721ab356a06ec981d8a7f2b2871b1ef08e7 +dist/2026-05-26/rustfmt-nightly-loongarch64-unknown-linux-gnu.tar.xz=bf72c39ad1e3fe687cee7734dcaee724796d58c4366b741e45a14667aeb1d5b5 +dist/2026-05-26/rustfmt-nightly-loongarch64-unknown-linux-musl.tar.gz=d32a55f0cd29963a1bbf3daa9e9317f6769e6344c2b82c2a01ffa359eed6f96e +dist/2026-05-26/rustfmt-nightly-loongarch64-unknown-linux-musl.tar.xz=a5d102c8705a0382070411604f9c9c13f687ac72c016bbe7b98e297eaf7e200f +dist/2026-05-26/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.gz=28af509281b32067632d5973314f81996989f98bb636a06f8e1622e658908d79 +dist/2026-05-26/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.xz=aa3b093314ceee9e4625f397dc793037ee6a77ee47a059d805a52918355dbe9e +dist/2026-05-26/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.gz=daaf9504f03fb452eb31fb8d55fa7c3eaaeab9d4a8ab739b2e02b0d48deff4c2 +dist/2026-05-26/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.xz=0d3c5103abf5053adc2414af66a8934e29ea845cfe3e30e6f685792fcb460439 +dist/2026-05-26/rustfmt-nightly-powerpc64-unknown-linux-musl.tar.gz=54f99e3539dc2b55d5356be6f87cd4d0fd2f561c1f9b847f8e4208ab70b21735 +dist/2026-05-26/rustfmt-nightly-powerpc64-unknown-linux-musl.tar.xz=5badecd08500e15374e5d7def7ba9fc819bd605da2b61e725e703583f1092740 +dist/2026-05-26/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.gz=52c23053140b7cdaa0a55b61a7ab1163ffd9b7f44e0cdb31e48119774edb4fea +dist/2026-05-26/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.xz=652b49a99387755cd653a98641b686993645b007873cdfd5e088d381bb1a7305 +dist/2026-05-26/rustfmt-nightly-powerpc64le-unknown-linux-musl.tar.gz=d8cec230ae23895028aab7010d54b4ed9b7e9d6d468a7b8f0a13d7608eeedc84 +dist/2026-05-26/rustfmt-nightly-powerpc64le-unknown-linux-musl.tar.xz=c804b35a0838d927ffabea5fdc867c462ec2be705a74a7ffc848640632b1d957 +dist/2026-05-26/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.gz=d75852a560d99f0f457a03f054395f525625841551e0563568be91978398b889 +dist/2026-05-26/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.xz=5c286da7d4229536944bf38497524a50aecbec322918c35b97f8e1ff59af2879 +dist/2026-05-26/rustfmt-nightly-s390x-unknown-linux-gnu.tar.gz=55c1e9426307ea73360ec2672306779c5ebb4a1f80b652854edefdbb8e3d7382 +dist/2026-05-26/rustfmt-nightly-s390x-unknown-linux-gnu.tar.xz=4e9a24c9c5da605bddb4fa2b17a9416182d6dcf56037d405f50a257506538e2d +dist/2026-05-26/rustfmt-nightly-sparcv9-sun-solaris.tar.gz=1a2b1f65e36c58e64a164e6e5c3d0044d0197b9d851f17dc1c958dbdd730bdca +dist/2026-05-26/rustfmt-nightly-sparcv9-sun-solaris.tar.xz=ab5fd44c9eb3ae746994a9258953667033be35c4462427e03a1030091a1f6a4e +dist/2026-05-26/rustfmt-nightly-x86_64-apple-darwin.tar.gz=5bdfbae758bc73df2630355e0a377e1c390935e002e8dba14e647617c5f0f48e +dist/2026-05-26/rustfmt-nightly-x86_64-apple-darwin.tar.xz=a60f435a2ae8744c1a271b4ebf9238b52f20990f17d1a436a141e646e4bebd24 +dist/2026-05-26/rustfmt-nightly-x86_64-pc-solaris.tar.gz=edf3abe7cf568f1e58a585836e24a04d126e5832fc8c897c8e3fe4d528e6361d +dist/2026-05-26/rustfmt-nightly-x86_64-pc-solaris.tar.xz=e556ed26598676aca5cd603583eca2ee790ba42a05b221ee83e21735a2405664 +dist/2026-05-26/rustfmt-nightly-x86_64-pc-windows-gnu.tar.gz=f5e438ce51dbe755c13f8af6736cfb0b3d4601bb20069a181a2e2fc64eaeb2c0 +dist/2026-05-26/rustfmt-nightly-x86_64-pc-windows-gnu.tar.xz=f86077bf1db8c3df1ae62a10a16910389a09dbb9ffdab04c4c3340c1b6de4472 +dist/2026-05-26/rustfmt-nightly-x86_64-pc-windows-gnullvm.tar.gz=20c5fd72c0fc96e52572c092d396f730e04e67346c8d637b5554d2c369b72a84 +dist/2026-05-26/rustfmt-nightly-x86_64-pc-windows-gnullvm.tar.xz=1ef0d0a40b75a91856867168b10807e62f891a7d28b4aa2aca96d7ad02f4bcd1 +dist/2026-05-26/rustfmt-nightly-x86_64-pc-windows-msvc.tar.gz=a89690fc0e716b3016883d3dfd144d66428866cabbbed22db30c2c72bf6643a4 +dist/2026-05-26/rustfmt-nightly-x86_64-pc-windows-msvc.tar.xz=4a1bf9cd23e4abab93496e4282b80aea0e13642c9b5fa1752f45e00028cd3545 +dist/2026-05-26/rustfmt-nightly-x86_64-unknown-freebsd.tar.gz=2fae3aeb7e2f8331f3b2664a094bbdd4e986eb968715b6d06f232f2694421a06 +dist/2026-05-26/rustfmt-nightly-x86_64-unknown-freebsd.tar.xz=5900286d6c705caf45920ac35ba1cb40fc37f2a84a4a4bde0e0c157f9bf19f9e +dist/2026-05-26/rustfmt-nightly-x86_64-unknown-illumos.tar.gz=33ca902f0b6a326cb5de3aa7d8a6a0f1cd13937b161478c324e9af52f215e34a +dist/2026-05-26/rustfmt-nightly-x86_64-unknown-illumos.tar.xz=dc2c000c3aedb03e90ffb5d978da9731f3e0a800b4108d64952a94052a5d6286 +dist/2026-05-26/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.gz=8467bd8fdfaab106d27e8049961c5f67049a6dd48baa3c4ddfaffa9eb03d7166 +dist/2026-05-26/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz=009d93c43c8e0d74c73cf856eee829bff2876fd97dd37382a2fb1f6af83f1da6 +dist/2026-05-26/rustfmt-nightly-x86_64-unknown-linux-musl.tar.gz=649a2e289a35546d6d0b53febac375ebe5f10cc6679e66b063009a66f61827b1 +dist/2026-05-26/rustfmt-nightly-x86_64-unknown-linux-musl.tar.xz=ad83b34163ad6fc9dd25baf55f7102baac3ac33c1b022beafcf1406561709d73 +dist/2026-05-26/rustfmt-nightly-x86_64-unknown-netbsd.tar.gz=3bf783728c95e27ef411842e78ebb3380236b587812b0305f7f9d117e0a861de +dist/2026-05-26/rustfmt-nightly-x86_64-unknown-netbsd.tar.xz=20d99aaf68b5daa7b11754ed5e77e63baa307c7978d2a572ed70593ecea6fc79 +dist/2026-05-26/rustc-nightly-aarch64-apple-darwin.tar.gz=40b4769ea3c179e7d4552402000ea42c26e19edd3d7d05475bb96da30a184a8c +dist/2026-05-26/rustc-nightly-aarch64-apple-darwin.tar.xz=3fc46e7206b0c7d441c12764a3d00f4b87fc11d095982b5aa901f203270b3bcb +dist/2026-05-26/rustc-nightly-aarch64-pc-windows-gnullvm.tar.gz=cb7f30e7e5ec39de6b14ffa9e89c04f90406e95560ccadbaa550acb88baa9583 +dist/2026-05-26/rustc-nightly-aarch64-pc-windows-gnullvm.tar.xz=880798dc90d7671771f6cbfa0b3af69168b29b15cb813cf4918eecee954a5e2f +dist/2026-05-26/rustc-nightly-aarch64-pc-windows-msvc.tar.gz=5d49c854be4c74fffe9b2f5e54d035f709c6c03d6868e322c9e981c700179bba +dist/2026-05-26/rustc-nightly-aarch64-pc-windows-msvc.tar.xz=31d8031e63e06240399a547af00b9038e2f6e5cbd25d6a774c05cccc3f417c5c +dist/2026-05-26/rustc-nightly-aarch64-unknown-linux-gnu.tar.gz=194bfc9263b71cf1724a98676307ec9507f0c314eff16abf8020f78ba2f2470f +dist/2026-05-26/rustc-nightly-aarch64-unknown-linux-gnu.tar.xz=834d833e8c9e7651bf805f6b5f127c4c959d1d7582fd9c7eeceddc3e9ca83ff2 +dist/2026-05-26/rustc-nightly-aarch64-unknown-linux-musl.tar.gz=1287b99b6a9840b824d7fd27f02b14fa73a99241d10ab6bde9c96db1c97aaf9d +dist/2026-05-26/rustc-nightly-aarch64-unknown-linux-musl.tar.xz=8a64eb839b7b222bafb0f4c78ffbed4b953a2e85f62e249b73860c9f5bc42c05 +dist/2026-05-26/rustc-nightly-aarch64-unknown-linux-ohos.tar.gz=00ccd7fe66e30fd3e0635b36ca8b581048837d31a55c4d3d8de2a59f00f06f96 +dist/2026-05-26/rustc-nightly-aarch64-unknown-linux-ohos.tar.xz=84e31ec9274a1aa5151a7500fdd23b1c3547de7e48526e15912055c80c38d79b +dist/2026-05-26/rustc-nightly-arm-unknown-linux-gnueabi.tar.gz=c1ca0894f88666cfbf15e51991bb642bbf770b36b40ffdd06511a89988eb32f0 +dist/2026-05-26/rustc-nightly-arm-unknown-linux-gnueabi.tar.xz=788173efe5d0c98db7b37b76d398a5b80ad8b8ad0a4eb9fdee6c79a285b641c7 +dist/2026-05-26/rustc-nightly-arm-unknown-linux-gnueabihf.tar.gz=2a306141be198e8404632f296263d846943c9d6fb4396e46756be599fefe2f2c +dist/2026-05-26/rustc-nightly-arm-unknown-linux-gnueabihf.tar.xz=1bdca505161aaa1d9ab48fec33469e88cbfb41894b6fc33c325dc5c4c3db86bd +dist/2026-05-26/rustc-nightly-armv7-unknown-linux-gnueabihf.tar.gz=eb150ef559778eb095df4183904bf58ded507df37a370204ab308010b533e3ef +dist/2026-05-26/rustc-nightly-armv7-unknown-linux-gnueabihf.tar.xz=37f77767799fb003a3fa529b117cc40244f823830c73db74776cb3b469e6a972 +dist/2026-05-26/rustc-nightly-i686-pc-windows-gnu.tar.gz=0affe886ff8415b8113c558df639076ae1e31a1f455a4e2275ec6e90e697b4bb +dist/2026-05-26/rustc-nightly-i686-pc-windows-gnu.tar.xz=62fabd4940ddffb1bb14e6b5588d290b17022b64938a6212e63f180c5ff220d9 +dist/2026-05-26/rustc-nightly-i686-pc-windows-msvc.tar.gz=97dd07e60c5f12551d4e7dd0edb80b3b6e19c6d0abbe0b69e31c6de0c2fbaa49 +dist/2026-05-26/rustc-nightly-i686-pc-windows-msvc.tar.xz=114b4fc8df2036f3a27780c208ee412a62df134c990752cbcf6ef79b4f811058 +dist/2026-05-26/rustc-nightly-i686-unknown-linux-gnu.tar.gz=099cf673153031ba8c17c74f40ee1418ba2f31b4c4f378e95293244569d08786 +dist/2026-05-26/rustc-nightly-i686-unknown-linux-gnu.tar.xz=9bc5892813cb553c03238992a8c027383ad1763ab122c3b2efb9f0ade97bd79c +dist/2026-05-26/rustc-nightly-loongarch64-unknown-linux-gnu.tar.gz=8aa0a2d5e63a7e0e2576c33f5ed009eb1258a5aa2aff2099f412fbdfadd340a9 +dist/2026-05-26/rustc-nightly-loongarch64-unknown-linux-gnu.tar.xz=129dc56b37c6344b0ee89accae30eed8d46c7538f25bf8601b5c26fd68fd7e63 +dist/2026-05-26/rustc-nightly-loongarch64-unknown-linux-musl.tar.gz=6692f88b6d3119acd6a9375ee6cfc35ececfbdf205f4ad5329192e4bec282bf9 +dist/2026-05-26/rustc-nightly-loongarch64-unknown-linux-musl.tar.xz=4408fab7c8d43dd3dbf3b4f0b07563237e89ef5c0d693ce7516761cd83db3b55 +dist/2026-05-26/rustc-nightly-powerpc-unknown-linux-gnu.tar.gz=61be952957ed9a8c81508ef6feeb31b05c6e548f9ff71119c3c0fc2a040dfed8 +dist/2026-05-26/rustc-nightly-powerpc-unknown-linux-gnu.tar.xz=7aa075a2ce591be3ced87f9cab08b16dbfd7ff4916e11d61c0870a7f4cb709c6 +dist/2026-05-26/rustc-nightly-powerpc64-unknown-linux-gnu.tar.gz=c3034a0f164826a776be2cf8e6793664507be47a9db7b27ca6304478215d0386 +dist/2026-05-26/rustc-nightly-powerpc64-unknown-linux-gnu.tar.xz=3718bfb3e6fecdbf0c23364b8aef03be70cd5d6cb81ec631e8d7f926e1497a5f +dist/2026-05-26/rustc-nightly-powerpc64-unknown-linux-musl.tar.gz=c8b7747b53db56361a4d61db23708e6a71e69a9a6c873d4878746d8a6b8e1080 +dist/2026-05-26/rustc-nightly-powerpc64-unknown-linux-musl.tar.xz=c8f29b4284c33ca66ab95408e197443350ce45e41109a6949f495c4f3427c4d4 +dist/2026-05-26/rustc-nightly-powerpc64le-unknown-linux-gnu.tar.gz=3cb4b26e6c0d221b5e070644e5ff59fca4326f49b143bc2199272662233d8eea +dist/2026-05-26/rustc-nightly-powerpc64le-unknown-linux-gnu.tar.xz=6885ceca72aedcab30984b97c16042e2e0d61dd912235a67367386b562480c7d +dist/2026-05-26/rustc-nightly-powerpc64le-unknown-linux-musl.tar.gz=8a7efa9d415c35aa1460480ee7302cef6591b9d1c7db194785da6b5daefbf0c8 +dist/2026-05-26/rustc-nightly-powerpc64le-unknown-linux-musl.tar.xz=f111d9519cd451af6ef758e2935f8e7b51a9de490f1c83bcb73267a9d3197880 +dist/2026-05-26/rustc-nightly-riscv64gc-unknown-linux-gnu.tar.gz=a96c5c1c0028945f7b250de3f777167bb5a9f61ac8811b8a40cd5a073e93b16a +dist/2026-05-26/rustc-nightly-riscv64gc-unknown-linux-gnu.tar.xz=40652e5540c8a60ec25205bae2b645d595503f0c8e29e5b72a6ac4bdcceb30bc +dist/2026-05-26/rustc-nightly-s390x-unknown-linux-gnu.tar.gz=1b132256644da6207b035b8ed02ae2de1e6c0042373e4e4f6a8dfd9c1f44a594 +dist/2026-05-26/rustc-nightly-s390x-unknown-linux-gnu.tar.xz=d5a917f7defc438af57ab365b763cd141fc838a187a5e3df57d73a351360f2a7 +dist/2026-05-26/rustc-nightly-sparcv9-sun-solaris.tar.gz=353a2447d9e6977e3a610c5e54cdbe5a0bb29c15832b687d6f4e9725c33a7877 +dist/2026-05-26/rustc-nightly-sparcv9-sun-solaris.tar.xz=e33927926602ee78687f440b7006276c6aaedb0e5b0d68ade6e414f421c9499c +dist/2026-05-26/rustc-nightly-x86_64-apple-darwin.tar.gz=53ea52127d03d680bf10a1bc27ac109c9b3b7eae02db76a4798995f8ad19be4c +dist/2026-05-26/rustc-nightly-x86_64-apple-darwin.tar.xz=16376a6e6e378c51146fbbce19dbd6696c1e33249c01b9ed80c7be185c92eaf5 +dist/2026-05-26/rustc-nightly-x86_64-pc-solaris.tar.gz=935e42374a58edfbb65c5e7f222513a9ce7097ca32ea5e80b6f2d89d097f8f9f +dist/2026-05-26/rustc-nightly-x86_64-pc-solaris.tar.xz=352dcd76dbee2743a398dac989101578917667a8c633cfe21a9b4b8831187cfe +dist/2026-05-26/rustc-nightly-x86_64-pc-windows-gnu.tar.gz=6e829f09110549c7d02f31dd60f27c778a0e345ecb77f8df41544f5e2ca17692 +dist/2026-05-26/rustc-nightly-x86_64-pc-windows-gnu.tar.xz=87e54ad0ec8acd8f7869207954be616d34a8268a70b27d2293059befb9fd6726 +dist/2026-05-26/rustc-nightly-x86_64-pc-windows-gnullvm.tar.gz=e5f659813d4a2cc3ef9d2031f482fa619c82c0f9473527041a886d29f3eda9cc +dist/2026-05-26/rustc-nightly-x86_64-pc-windows-gnullvm.tar.xz=1e37fdcda18f6d72cf269dd179d2e9b0c23c1b7d68c43bc4a549009c75cb4910 +dist/2026-05-26/rustc-nightly-x86_64-pc-windows-msvc.tar.gz=b1bfcebf40ec937b40d8060f30f85626e007fa196a898c844c5bfe3a6062ca94 +dist/2026-05-26/rustc-nightly-x86_64-pc-windows-msvc.tar.xz=0280a8bcc0b5d55619e0bdf1b183b988bfb443a1ff494c25cabadff71d0ce24c +dist/2026-05-26/rustc-nightly-x86_64-unknown-freebsd.tar.gz=8b4383cd6cb38a68a6743069b2b409440bd7da5b355945c534f8e27ee9bb1e17 +dist/2026-05-26/rustc-nightly-x86_64-unknown-freebsd.tar.xz=08509072a848e238804d0537c28218b1bf719d3f71c0dc2c629b6bf4373aa2f3 +dist/2026-05-26/rustc-nightly-x86_64-unknown-illumos.tar.gz=684f4c13b6be3829c2a3c703e24b64bf649a5995f7e98c087e8af7439cbd7925 +dist/2026-05-26/rustc-nightly-x86_64-unknown-illumos.tar.xz=b33d5fe10186fff14871e33d97425baab3e9db990a1b6c184c8578d7641f300b +dist/2026-05-26/rustc-nightly-x86_64-unknown-linux-gnu.tar.gz=299bd2dee8c0555d471f2f7cc57700bd64a8a52dfc3e5a129c665862047e66f1 +dist/2026-05-26/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz=85496b508462d6328910feaaca680bb6c0dd70d147322eb4322a33808e157283 +dist/2026-05-26/rustc-nightly-x86_64-unknown-linux-musl.tar.gz=6ba167a88589bb37be9f37c59fa57b84f0f6ed3131d59fc932b6987fa2ecd156 +dist/2026-05-26/rustc-nightly-x86_64-unknown-linux-musl.tar.xz=4e6859e355bff16246b7e642f6f27b88efabeb4fdd4c64b7628a4946ee6b9d73 +dist/2026-05-26/rustc-nightly-x86_64-unknown-netbsd.tar.gz=71269b9c396329955f1e45718120237ba709456b3de66f03ba57601480d3de07 +dist/2026-05-26/rustc-nightly-x86_64-unknown-netbsd.tar.xz=3acbacbe66c66eeba7d0d113c7d4e73b6fb7b3d9e01ac3dc39b33048f39e7d02 +dist/2026-05-26/rust-nightly-aarch64-pc-windows-gnullvm.msi=3e3ece62bbb86add328cab64af90e09ea7422436d1a14751119ebab6f5df2da1 +dist/2026-05-26/rust-nightly-aarch64-pc-windows-msvc.msi=670afa3826990ab1d89fb5571cd9065c2ecf2f7bcb9e5db537db4f6c180d9f55 +dist/2026-05-26/rust-nightly-i686-pc-windows-gnu.msi=f80bf82bedfa6abc54a7f8406de9b11d4f5a7cc31a826a90a54cb84883e308d0 +dist/2026-05-26/rust-nightly-i686-pc-windows-msvc.msi=65bb072ae20f63fe8d33aeb44324c67a06403bee7274c7e1d98d28b21143ece0 +dist/2026-05-26/rust-nightly-x86_64-pc-windows-gnu.msi=20fc8163b860aba73e7781e6cb1d7c8bc870d3505c037c34a0797b230eab9a9b +dist/2026-05-26/rust-nightly-x86_64-pc-windows-gnullvm.msi=e3e16af0e20b5fcd487813efd49f5a42322a9a24e698b21a462ca393c045746a +dist/2026-05-26/rust-nightly-x86_64-pc-windows-msvc.msi=84faa1c25aa4bd43b3b61e612d836735d09763ec0dee0feed6184cb2a4a998a7 +dist/2026-05-26/rust-nightly-aarch64-apple-darwin.pkg=1c05dbe70697caf3520d96d2c6efe298e798e5892fdb77da0d30380c696f5546 +dist/2026-05-26/rust-nightly-x86_64-apple-darwin.pkg=71a0ef7a235a644aec3635a7bbddad186e056590cf11ba134f51e575388f375d +dist/2026-05-26/rustc-nightly-src.tar.gz=ca58f5a168a37deb777019516d914eb490a88306c272e91a12b4d57693f025c2 +dist/2026-05-26/rustc-nightly-src.tar.xz=b128326b31bf31aa943ee49c5dfbfac8b7a92660bffddbc774ac4937ff4034b7 From 59428e76e821e7320d9579f1f5c8e291d3fb7a75 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 10 May 2026 17:02:34 +0200 Subject: [PATCH 15/22] MIR inlining: allow backends to opt-in to inlining intrinsics --- compiler/rustc_codegen_cranelift/src/lib.rs | 4 +++ compiler/rustc_codegen_gcc/src/lib.rs | 6 +++- compiler/rustc_codegen_llvm/src/lib.rs | 8 +++++ .../rustc_codegen_ssa/src/traits/backend.rs | 6 ++++ compiler/rustc_interface/src/interface.rs | 1 + .../rustc_mir_transform/src/check_inline.rs | 12 +++---- compiler/rustc_mir_transform/src/inline.rs | 16 +++++++-- compiler/rustc_session/src/session.rs | 4 +++ library/core/src/any.rs | 25 +------------ library/core/src/intrinsics/mod.rs | 4 ++- .../inline/type_id_eq.call.Inline.diff | 36 +++++++++++++++++++ tests/mir-opt/inline/type_id_eq.rs | 20 +++++++++++ .../ui/consts/const_transmute_type_id2.stderr | 7 ---- .../ui/consts/const_transmute_type_id3.stderr | 7 ---- .../ui/consts/const_transmute_type_id4.stderr | 7 ---- .../ui/consts/const_transmute_type_id5.stderr | 7 ---- .../ui/consts/const_transmute_type_id6.stderr | 7 ---- 17 files changed, 108 insertions(+), 69 deletions(-) create mode 100644 tests/mir-opt/inline/type_id_eq.call.Inline.diff create mode 100644 tests/mir-opt/inline/type_id_eq.rs diff --git a/compiler/rustc_codegen_cranelift/src/lib.rs b/compiler/rustc_codegen_cranelift/src/lib.rs index acfe8188e360e..48858e20381dd 100644 --- a/compiler/rustc_codegen_cranelift/src/lib.rs +++ b/compiler/rustc_codegen_cranelift/src/lib.rs @@ -237,6 +237,10 @@ impl CodegenBackend for CraneliftCodegenBackend { ) -> (CompiledModules, FxIndexMap) { ongoing_codegen.downcast::().unwrap().join(sess, outputs) } + + fn fallback_intrinsics(&self) -> Vec { + vec![sym::type_id_eq] + } } /// Determine if the Cranelift ir verifier should run. diff --git a/compiler/rustc_codegen_gcc/src/lib.rs b/compiler/rustc_codegen_gcc/src/lib.rs index 6ca2ef88ef291..8e7611ed4939c 100644 --- a/compiler/rustc_codegen_gcc/src/lib.rs +++ b/compiler/rustc_codegen_gcc/src/lib.rs @@ -98,7 +98,7 @@ use rustc_middle::ty::TyCtxt; use rustc_middle::util::Providers; use rustc_session::Session; use rustc_session::config::{OptLevel, OutputFilenames}; -use rustc_span::Symbol; +use rustc_span::{Symbol, sym}; use rustc_target::spec::{Arch, RelocModel}; use tempfile::TempDir; @@ -311,6 +311,10 @@ impl CodegenBackend for GccCodegenBackend { fn target_config(&self, sess: &Session) -> TargetConfig { target_config(sess, &self.target_info) } + + fn fallback_intrinsics(&self) -> Vec { + vec![sym::type_id_eq] + } } fn new_context<'gcc, 'tcx>(tcx: TyCtxt<'tcx>) -> Context<'gcc> { diff --git a/compiler/rustc_codegen_llvm/src/lib.rs b/compiler/rustc_codegen_llvm/src/lib.rs index a697f8fe70bbc..31ef5b8fdc4f4 100644 --- a/compiler/rustc_codegen_llvm/src/lib.rs +++ b/compiler/rustc_codegen_llvm/src/lib.rs @@ -333,6 +333,14 @@ impl CodegenBackend for LlvmCodegenBackend { will_not_use_fallback } + fn fallback_intrinsics(&self) -> Vec { + // `type_id_eq` is a safe choice since *all* backends use the fallback body for that. + // When adding more intrinsics, keep in mind that the distributed standard library + // is compiled with the LLVM backend but might later be included in a project built + // with cranelift or GCC. + vec![sym::type_id_eq] + } + fn target_cpu(&self, sess: &Session) -> String { crate::llvm_util::target_cpu(sess).to_string() } diff --git a/compiler/rustc_codegen_ssa/src/traits/backend.rs b/compiler/rustc_codegen_ssa/src/traits/backend.rs index cbb75836f979b..26c80a0afc185 100644 --- a/compiler/rustc_codegen_ssa/src/traits/backend.rs +++ b/compiler/rustc_codegen_ssa/src/traits/backend.rs @@ -79,6 +79,12 @@ pub trait CodegenBackend { vec![] } + /// Returns a list of all intrinsics that this backend definitely + /// does *not* replace, which means their fallback bodies can be MIR-inlined. + fn fallback_intrinsics(&self) -> Vec { + vec![] + } + /// Is ThinLTO supported by this backend? fn thin_lto_supported(&self) -> bool { true diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs index 875ed4ae5d307..95aeb1f7a234f 100644 --- a/compiler/rustc_interface/src/interface.rs +++ b/compiler/rustc_interface/src/interface.rs @@ -449,6 +449,7 @@ pub fn run_compiler(config: Config, f: impl FnOnce(&Compiler) -> R + Se }; codegen_backend.init(&sess); sess.replaced_intrinsics = FxHashSet::from_iter(codegen_backend.replaced_intrinsics()); + sess.fallback_intrinsics = FxHashSet::from_iter(codegen_backend.fallback_intrinsics()); sess.thin_lto_supported = codegen_backend.thin_lto_supported(); let cfg = parse_cfg(sess.dcx(), config.crate_cfg); diff --git a/compiler/rustc_mir_transform/src/check_inline.rs b/compiler/rustc_mir_transform/src/check_inline.rs index 4158869f265b1..50ef94f623dc5 100644 --- a/compiler/rustc_mir_transform/src/check_inline.rs +++ b/compiler/rustc_mir_transform/src/check_inline.rs @@ -59,12 +59,12 @@ pub(super) fn is_inline_valid_on_fn<'tcx>( return Err("cold"); } - // Intrinsic fallback bodies are automatically made cross-crate inlineable, - // but at this stage we don't know whether codegen knows the intrinsic, - // so just conservatively don't inline it. This also ensures that we do not - // accidentally inline the body of an intrinsic that *must* be overridden. - if find_attr!(tcx, def_id, RustcIntrinsic) { - return Err("callee is an intrinsic"); + // Intrinsics without fallback body cannot be inlined. The logic for which intrinsics *with* + // body can be inlined is in the inlining pass. + if let Some(intrinsic) = tcx.intrinsic(def_id) + && intrinsic.must_be_overridden + { + return Err("callee is an intrinsic without fallback body"); } Ok(()) diff --git a/compiler/rustc_mir_transform/src/inline.rs b/compiler/rustc_mir_transform/src/inline.rs index 31871c62fa7a2..434f96996eeaf 100644 --- a/compiler/rustc_mir_transform/src/inline.rs +++ b/compiler/rustc_mir_transform/src/inline.rs @@ -565,12 +565,24 @@ fn resolve_callsite<'tcx, I: Inliner<'tcx>>( let args = tcx .try_normalize_erasing_regions(inliner.typing_env(), Unnormalized::new_wip(args)) .ok()?; - let callee = + let mut callee = Instance::try_resolve(tcx, inliner.typing_env(), def_id, args).ok().flatten()?; - if let InstanceKind::Virtual(..) | InstanceKind::Intrinsic(_) = callee.def { + if let InstanceKind::Virtual(..) = callee.def { return None; } + if let InstanceKind::Intrinsic(..) = callee.def { + let intrinsic = tcx.intrinsic(def_id).unwrap(); + if intrinsic.must_be_overridden { + return None; // intrinsic without fallback body + } + if !tcx.sess.fallback_intrinsics.contains(&intrinsic.name) { + return None; // intrinsic that the backend may want to overwrite + } + // The callee is the fallback body. + debug!("callsite is fallback body: {def_id:?}"); + callee = ty::Instance { def: ty::InstanceKind::Item(def_id), args: callee.args }; + } if inliner.history().contains(&callee.def_id()) { return None; diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index 003164e8f9054..c83bb62324e76 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -164,6 +164,9 @@ pub struct Session { /// The names of intrinsics that the current codegen backend replaces /// with its own implementations. pub replaced_intrinsics: FxHashSet, + /// The names of intrinsics that the current codegen backend does *not* replace + /// with its own implementations. + pub fallback_intrinsics: FxHashSet, /// Does the codegen backend support ThinLTO? pub thin_lto_supported: bool, @@ -1124,6 +1127,7 @@ pub fn build_session( target_filesearch, host_filesearch, replaced_intrinsics: FxHashSet::default(), // filled by `run_compiler` + fallback_intrinsics: FxHashSet::default(), // filled by `run_compiler` thin_lto_supported: true, // filled by `run_compiler` mir_opt_bisect_eval_count: AtomicUsize::new(0), used_features: Lock::default(), diff --git a/library/core/src/any.rs b/library/core/src/any.rs index 62300d8b70a96..54a6408a06321 100644 --- a/library/core/src/any.rs +++ b/library/core/src/any.rs @@ -742,30 +742,7 @@ unsafe impl Sync for TypeId {} impl const PartialEq for TypeId { #[inline] fn eq(&self, other: &Self) -> bool { - #[cfg(miri)] - return crate::intrinsics::type_id_eq(*self, *other); - #[cfg(not(miri))] - { - let this = self; - crate::intrinsics::const_eval_select!( - @capture { this: &TypeId, other: &TypeId } -> bool: - if const { - crate::intrinsics::type_id_eq(*this, *other) - } else { - // Ideally we would just invoke `type_id_eq` unconditionally here, - // but since we do not MIR inline intrinsics, because backends - // may want to override them (and miri does!), MIR opts do not - // clean up this call sufficiently for LLVM to turn repeated calls - // of `TypeId` comparisons against one specific `TypeId` into - // a lookup table. - // SAFETY: We know that at runtime none of the bits have provenance and all bits - // are initialized. So we can just convert the whole thing to a `u128` and compare that. - unsafe { - crate::mem::transmute::<_, u128>(*this) == crate::mem::transmute::<_, u128>(*other) - } - } - ) - } + crate::intrinsics::type_id_eq(*self, *other) } } diff --git a/library/core/src/intrinsics/mod.rs b/library/core/src/intrinsics/mod.rs index 1aeb1a0eb3972..9ef9c226f3cda 100644 --- a/library/core/src/intrinsics/mod.rs +++ b/library/core/src/intrinsics/mod.rs @@ -2934,7 +2934,9 @@ pub const fn type_id() -> crate::any::TypeId; #[rustc_intrinsic] #[rustc_do_not_const_check] pub const fn type_id_eq(a: crate::any::TypeId, b: crate::any::TypeId) -> bool { - a.data == b.data + // SAFETY: we know `TypeId` is 16 bytes of initialized data. + // This is runtime-only code so we do not have to worry about provenance. + unsafe { crate::mem::transmute::<_, u128>(a) == crate::mem::transmute::<_, u128>(b) } } /// Gets the size of the type represented by this `TypeId`. diff --git a/tests/mir-opt/inline/type_id_eq.call.Inline.diff b/tests/mir-opt/inline/type_id_eq.call.Inline.diff new file mode 100644 index 0000000000000..85090e0a2738b --- /dev/null +++ b/tests/mir-opt/inline/type_id_eq.call.Inline.diff @@ -0,0 +1,36 @@ +- // MIR for `call` before Inline ++ // MIR for `call` after Inline + + fn call(_1: TypeId, _2: TypeId) -> bool { + debug a => _1; + debug b => _2; + let mut _0: bool; + let mut _3: std::any::TypeId; + let mut _4: std::any::TypeId; ++ scope 1 (inlined type_id_eq) { ++ let mut _5: u128; ++ let mut _6: u128; ++ } + + bb0: { + StorageLive(_3); + _3 = copy _1; + StorageLive(_4); + _4 = copy _2; +- _0 = type_id_eq(move _3, move _4) -> [return: bb1, unwind unreachable]; +- } +- +- bb1: { ++ StorageLive(_5); ++ _5 = copy _3 as u128 (Transmute); ++ StorageLive(_6); ++ _6 = copy _4 as u128 (Transmute); ++ _0 = Eq(move _5, move _6); ++ StorageDead(_6); ++ StorageDead(_5); + StorageDead(_4); + StorageDead(_3); + return; + } + } + diff --git a/tests/mir-opt/inline/type_id_eq.rs b/tests/mir-opt/inline/type_id_eq.rs new file mode 100644 index 0000000000000..72348447cdc45 --- /dev/null +++ b/tests/mir-opt/inline/type_id_eq.rs @@ -0,0 +1,20 @@ +#![feature(core_intrinsics)] +//@ test-mir-pass: Inline +//@ compile-flags: --crate-type=lib -C panic=abort + +use std::any::{Any, TypeId}; +use std::intrinsics::type_id_eq; + +struct A { + a: i32, + b: T, +} + +// EMIT_MIR type_id_eq.call.Inline.diff +// CHECK-LABEL: fn call( +pub fn call(a: TypeId, b: TypeId) -> bool { + // CHECK: as u128 (Transmute) + // CHECK: as u128 (Transmute) + // CHECK: Eq + type_id_eq(a, b) +} diff --git a/tests/ui/consts/const_transmute_type_id2.stderr b/tests/ui/consts/const_transmute_type_id2.stderr index b420deaa49ce9..9c103c5c2ba6b 100644 --- a/tests/ui/consts/const_transmute_type_id2.stderr +++ b/tests/ui/consts/const_transmute_type_id2.stderr @@ -5,14 +5,7 @@ LL | assert!(a == b); | ^^^^^^ evaluation of `_` failed inside this call | note: inside `::eq` - --> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL --> $SRC_DIR/core/src/any.rs:LL:COL - ::: $SRC_DIR/core/src/any.rs:LL:COL - | - = note: in this macro invocation -note: inside `::eq::compiletime` - --> $SRC_DIR/core/src/any.rs:LL:COL - = note: this error originates in the macro `$crate::intrinsics::const_eval_select` which comes from the expansion of the macro `crate::intrinsics::const_eval_select` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/consts/const_transmute_type_id3.stderr b/tests/ui/consts/const_transmute_type_id3.stderr index 9f796cda61454..679b048c1ab73 100644 --- a/tests/ui/consts/const_transmute_type_id3.stderr +++ b/tests/ui/consts/const_transmute_type_id3.stderr @@ -5,14 +5,7 @@ LL | assert!(a == b); | ^^^^^^ evaluation of `_` failed inside this call | note: inside `::eq` - --> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL --> $SRC_DIR/core/src/any.rs:LL:COL - ::: $SRC_DIR/core/src/any.rs:LL:COL - | - = note: in this macro invocation -note: inside `::eq::compiletime` - --> $SRC_DIR/core/src/any.rs:LL:COL - = note: this error originates in the macro `$crate::intrinsics::const_eval_select` which comes from the expansion of the macro `crate::intrinsics::const_eval_select` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/consts/const_transmute_type_id4.stderr b/tests/ui/consts/const_transmute_type_id4.stderr index c844b10d78cfb..4060f086cbac4 100644 --- a/tests/ui/consts/const_transmute_type_id4.stderr +++ b/tests/ui/consts/const_transmute_type_id4.stderr @@ -5,14 +5,7 @@ LL | assert!(a == b); | ^^^^^^ evaluation of `_` failed inside this call | note: inside `::eq` - --> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL --> $SRC_DIR/core/src/any.rs:LL:COL - ::: $SRC_DIR/core/src/any.rs:LL:COL - | - = note: in this macro invocation -note: inside `::eq::compiletime` - --> $SRC_DIR/core/src/any.rs:LL:COL - = note: this error originates in the macro `$crate::intrinsics::const_eval_select` which comes from the expansion of the macro `crate::intrinsics::const_eval_select` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/consts/const_transmute_type_id5.stderr b/tests/ui/consts/const_transmute_type_id5.stderr index 9a7384eb95b42..ac057d829562f 100644 --- a/tests/ui/consts/const_transmute_type_id5.stderr +++ b/tests/ui/consts/const_transmute_type_id5.stderr @@ -5,14 +5,7 @@ LL | assert!(b == b); | ^^^^^^ evaluation of `_` failed inside this call | note: inside `::eq` - --> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL --> $SRC_DIR/core/src/any.rs:LL:COL - ::: $SRC_DIR/core/src/any.rs:LL:COL - | - = note: in this macro invocation -note: inside `::eq::compiletime` - --> $SRC_DIR/core/src/any.rs:LL:COL - = note: this error originates in the macro `$crate::intrinsics::const_eval_select` which comes from the expansion of the macro `crate::intrinsics::const_eval_select` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/consts/const_transmute_type_id6.stderr b/tests/ui/consts/const_transmute_type_id6.stderr index c0b35f3d1081d..fd3ac663505fc 100644 --- a/tests/ui/consts/const_transmute_type_id6.stderr +++ b/tests/ui/consts/const_transmute_type_id6.stderr @@ -5,14 +5,7 @@ LL | id == id | ^^^^^^^^ evaluation of `X` failed inside this call | note: inside `::eq` - --> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL --> $SRC_DIR/core/src/any.rs:LL:COL - ::: $SRC_DIR/core/src/any.rs:LL:COL - | - = note: in this macro invocation -note: inside `::eq::compiletime` - --> $SRC_DIR/core/src/any.rs:LL:COL - = note: this error originates in the macro `$crate::intrinsics::const_eval_select` which comes from the expansion of the macro `crate::intrinsics::const_eval_select` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error From ac2e825fb553a99b3dc2faf02516e9264b033907 Mon Sep 17 00:00:00 2001 From: WhySoBad <49595640+WhySoBad@users.noreply.github.com> Date: Sat, 23 May 2026 16:21:20 +0200 Subject: [PATCH 16/22] fix: make socket tests work on native host --- .../libc/libc-socket-no-blocking-epoll.rs | 15 ++- .../miri/tests/pass-dep/libc/libc-socket.rs | 110 +++++++++++++----- 2 files changed, 89 insertions(+), 36 deletions(-) diff --git a/src/tools/miri/tests/pass-dep/libc/libc-socket-no-blocking-epoll.rs b/src/tools/miri/tests/pass-dep/libc/libc-socket-no-blocking-epoll.rs index 9c8c5be647d4c..abfadb1919138 100644 --- a/src/tools/miri/tests/pass-dep/libc/libc-socket-no-blocking-epoll.rs +++ b/src/tools/miri/tests/pass-dep/libc/libc-socket-no-blocking-epoll.rs @@ -294,10 +294,17 @@ fn test_send_nonblock() { if written as usize == fill_buf.len() { // When we didn't have a short write we should still be able to write more. // Ensure the socket is still writable. - assert_eq!( - current_epoll_readiness::<8>(client_sockfd, EPOLLOUT | EPOLLET), - EPOLLOUT - ); + let readiness = current_epoll_readiness::<8>(client_sockfd, EPOLLOUT | EPOLLET); + if cfg!(miri) { + // With Miri we keep the writable readiness until EWOULDBLOCK is returned. + assert_eq!(readiness, EPOLLOUT); + } else { + // On native Linux hosts, the writable readiness is removed when the buffer + // is "almost" full. We can't emulate this with Miri. + // The buffer must not be "almost" full at the first write. + let is_not_first_write = total_written > fill_buf.len(); + assert!(readiness == EPOLLOUT || (is_not_first_write && readiness == 0)); + } } } Err(err) if err.kind() == ErrorKind::WouldBlock => break, diff --git a/src/tools/miri/tests/pass-dep/libc/libc-socket.rs b/src/tools/miri/tests/pass-dep/libc/libc-socket.rs index 9262bfc8829a1..b1d0a90105ccc 100644 --- a/src/tools/miri/tests/pass-dep/libc/libc-socket.rs +++ b/src/tools/miri/tests/pass-dep/libc/libc-socket.rs @@ -8,7 +8,7 @@ mod utils; use std::io::ErrorKind; use std::time::{Duration, Instant}; -use std::{ptr, thread}; +use std::{ptr, slice, thread}; use libc_utils::*; @@ -121,11 +121,26 @@ fn test_set_reuseaddr_invalid_len() { let sockfd = unsafe { errno_result(libc::socket(libc::AF_INET, libc::SOCK_STREAM, 0)).unwrap() }; // Value should be of type `libc::c_int` which has size 4 bytes. - // By providing a u64 of size 8 bytes we trigger an invalid length error. - let err = net::setsockopt(sockfd, libc::SOL_SOCKET, libc::SO_REUSEADDR, 1u64).unwrap_err(); + // By providing an u16 of size 2 bytes we trigger an invalid length error. + let err = net::setsockopt(sockfd, libc::SOL_SOCKET, libc::SO_REUSEADDR, 1u16).unwrap_err(); assert_eq!(err.kind(), ErrorKind::InvalidInput); // Check that it is the right kind of `InvalidInput`. assert_eq!(err.raw_os_error(), Some(libc::EINVAL)); + + // By providing an u64 of size 8 bytes the behavior differs between native hosts and Miri. + let result = net::setsockopt(sockfd, libc::SOL_SOCKET, libc::SO_REUSEADDR, 1u64); + match result { + Err(err) => { + // Check that this is the right error. + assert_eq!(err.kind(), ErrorKind::InvalidInput); + assert_eq!(err.raw_os_error(), Some(libc::EINVAL)); + } + Ok(_) => { + // Some native hosts just ignore too large inputs and only look at a prefix. + // On Miri we require an exact size. + assert!(!cfg!(miri)); + } + } } #[cfg(any( @@ -174,18 +189,35 @@ fn test_bind_ipv4_invalid_addr_len() { let sockfd = unsafe { errno_result(libc::socket(libc::AF_INET, libc::SOCK_STREAM, 0)).unwrap() }; let addr = net::sock_addr_ipv4(net::IPV4_LOCALHOST, 0); + // A too small size is invalid. let err = unsafe { errno_result(libc::bind( sockfd, (&addr as *const libc::sockaddr_in).cast::(), - // Add 1 to the address to make the size invalid. - (size_of::() + 1) as libc::socklen_t, + (size_of::() - 1) as libc::socklen_t, )) .unwrap_err() }; assert_eq!(err.kind(), ErrorKind::InvalidInput); // Check that it is the right kind of `InvalidInput`. assert_eq!(err.raw_os_error(), Some(libc::EINVAL)); + + if cfg!(miri) { + // A too big size is also invalid. Some native hosts (e.g. Linux) + // allow too big sizes, so we skip this test on native hosts: + // + let err = unsafe { + errno_result(libc::bind( + sockfd, + (&addr as *const libc::sockaddr_in).cast::(), + (size_of::() + 1) as libc::socklen_t, + )) + .unwrap_err() + }; + assert_eq!(err.kind(), ErrorKind::InvalidInput); + // Check that it is the right kind of `InvalidInput`. + assert_eq!(err.raw_os_error(), Some(libc::EINVAL)); + } } fn test_bind_ipv6() { @@ -719,48 +751,62 @@ fn test_shutdown_writable_after_read_close() { fn test_getsockopt_truncate() { let (sockfd, _) = net::make_listener_ipv4().unwrap(); - // The actual TTL with a correctly sized buffer. - let ttl = net::getsockopt::(sockfd, libc::IPPROTO_IP, libc::IP_TTL).unwrap(); + // Set the read timeout for the socket. + // We use a multiple of 4ms for the `usec` since Linux seems to do rounding. + let new_timeout = libc::timeval { tv_sec: 123, tv_usec: 40_000 }; + net::setsockopt(sockfd, libc::SOL_SOCKET, libc::SO_RCVTIMEO, new_timeout).unwrap(); + + let mut option_value = std::mem::MaybeUninit::<[u8; 5]>::zeroed(); + // The actual `timeval` length is more than 5 bytes. + let mut short_option_len = 5 as libc::socklen_t; + assert!(short_option_len < size_of::() as libc::socklen_t); - let mut option_value = std::mem::MaybeUninit::::zeroed(); - // The actual length is 4 bytes. - let mut short_option_len = 2 as libc::socklen_t; + let timeout = + net::getsockopt::(sockfd, libc::SOL_SOCKET, libc::SO_RCVTIMEO).unwrap(); + // Ensure that we get the same value back as we just set. + assert_eq!(timeout.tv_sec, new_timeout.tv_sec); + assert_eq!(timeout.tv_usec, new_timeout.tv_usec); errno_result(unsafe { libc::getsockopt( sockfd, - libc::IPPROTO_IP, - libc::IP_TTL, + libc::SOL_SOCKET, + libc::SO_RCVTIMEO, option_value.as_mut_ptr().cast(), &mut short_option_len, ) }) .unwrap(); // Ensure that the size wasn't changed. - assert_eq!(short_option_len, 2); - let short_ttl = unsafe { option_value.assume_init() }; + assert_eq!(short_option_len, 5); + let truncated_timeout = unsafe { option_value.assume_init() }; - // Assert that the value was silently truncated. - assert_eq!(short_ttl.to_ne_bytes()[0..2], ttl.to_ne_bytes()[0..2]); + unsafe { + let timeout_ptr = (&new_timeout) as *const libc::timeval as *const u8; + // Assert that the value was silently truncated. + assert_eq!(&truncated_timeout, slice::from_raw_parts(timeout_ptr, 5)); + } - let mut option_value = std::mem::MaybeUninit::::zeroed(); - // The actual length is 4 bytes. - let mut long_option_len = 6 as libc::socklen_t; + let mut option_value = std::mem::MaybeUninit::::zeroed(); + // The actual length is smaller than this. + let mut long_option_len = (size_of::() + 2) as libc::socklen_t; errno_result(unsafe { libc::getsockopt( sockfd, - libc::IPPROTO_IP, - libc::IP_TTL, + libc::SOL_SOCKET, + libc::SO_RCVTIMEO, option_value.as_mut_ptr().cast(), &mut long_option_len, ) }) .unwrap(); // Ensure that the size was shortened to the actual length. - assert_eq!(long_option_len, 4); - let long_ttl = unsafe { option_value.assume_init() }; - assert_eq!(long_ttl, ttl); + assert_eq!(long_option_len, size_of::() as libc::socklen_t); + // The returned timeout should be the same value as we just set. + let untruncated_timeout = unsafe { option_value.assume_init() }; + assert_eq!(untruncated_timeout.tv_sec, new_timeout.tv_sec); + assert_eq!(untruncated_timeout.tv_usec, new_timeout.tv_usec); } /// Test setting and getting the SO_SNDTIMEO socket option. @@ -781,8 +827,8 @@ fn test_sockopt_sndtimeo() { assert_eq!(timeout.tv_sec, 0); assert_eq!(timeout.tv_usec, 0); - // A 50 millisecond timeout. - let short_timeout = libc::timeval { tv_sec: 0, tv_usec: 50_000 }; + // A 40 millisecond timeout. + let short_timeout = libc::timeval { tv_sec: 0, tv_usec: 40_000 }; net::setsockopt(client_sockfd, libc::SOL_SOCKET, libc::SO_SNDTIMEO, short_timeout).unwrap(); let timeout = @@ -804,9 +850,9 @@ fn test_sockopt_sndtimeo() { // it's because of the write timeout exceeding because the write buffer // is full. Err(err) if err.kind() == ErrorKind::WouldBlock => { - // The last write should return an EAGAIN/EWOULDBLOCK after ~50ms instead + // The last write should return an EAGAIN/EWOULDBLOCK after ~40ms instead // of blocking indefinitely. - assert!(Instant::now().duration_since(before) >= Duration::from_millis(50)); + assert!(Instant::now().duration_since(before) >= Duration::from_millis(40)); break; } Err(err) => panic!("unexpected error whilst filling up buffer: {err}"), @@ -832,8 +878,8 @@ fn test_sockopt_rcvtimeo() { assert_eq!(timeout.tv_sec, 0); assert_eq!(timeout.tv_usec, 0); - // A 50 millisecond timeout. - let short_timeout = libc::timeval { tv_sec: 0, tv_usec: 50_000 }; + // A 40 millisecond timeout. + let short_timeout = libc::timeval { tv_sec: 0, tv_usec: 40_000 }; net::setsockopt(client_sockfd, libc::SOL_SOCKET, libc::SO_RCVTIMEO, short_timeout).unwrap(); let timeout = @@ -851,6 +897,6 @@ fn test_sockopt_rcvtimeo() { .unwrap_err() }; assert_eq!(err.kind(), ErrorKind::WouldBlock); - // Ensure that we blocked for at least 50 milliseconds. - assert!(Instant::now().duration_since(before) >= Duration::from_millis(50)) + // Ensure that we blocked for at least 40 milliseconds. + assert!(Instant::now().duration_since(before) >= Duration::from_millis(40)) } From d8cc2670ba17c497ad457ee27515d4cf622dda1e Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 26 May 2026 16:14:23 -0700 Subject: [PATCH 17/22] Update `cfg(bootstrap)` for the new stage0 --- compiler/rustc_lint_defs/src/builtin.rs | 5 ++--- library/rtstartup/rsbegin.rs | 3 +-- library/rtstartup/rsend.rs | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs index caa41fd0f6ab3..f7668766b24e3 100644 --- a/compiler/rustc_lint_defs/src/builtin.rs +++ b/compiler/rustc_lint_defs/src/builtin.rs @@ -5453,8 +5453,7 @@ declare_lint! { /// /// ### Example /// - #[cfg_attr(bootstrap, doc = "```rust")] - #[cfg_attr(not(bootstrap), doc = "```rust,compile_fail")] + /// ```rust,compile_fail /// // Using `...` in non-foreign function definitions is unstable, however stability is /// // currently only checked after attributes are expanded, so using `#[cfg(false)]` here will /// // allow this to compile on stable Rust. @@ -5462,7 +5461,7 @@ declare_lint! { /// fn foo(...) { /// /// } - #[doc = "```"] + /// ``` /// /// {{produces}} /// diff --git a/library/rtstartup/rsbegin.rs b/library/rtstartup/rsbegin.rs index a8265a3011d27..d268090fe77ae 100644 --- a/library/rtstartup/rsbegin.rs +++ b/library/rtstartup/rsbegin.rs @@ -39,8 +39,7 @@ auto trait Freeze {} impl Copy for *mut T {} -#[cfg_attr(not(bootstrap), lang = "drop_glue")] -#[cfg_attr(bootstrap, lang = "drop_in_place")] +#[lang = "drop_glue"] #[inline] pub unsafe fn drop_glue(_to_drop: &mut T) {} diff --git a/library/rtstartup/rsend.rs b/library/rtstartup/rsend.rs index 2e69559ed885a..8121135debef3 100644 --- a/library/rtstartup/rsend.rs +++ b/library/rtstartup/rsend.rs @@ -27,8 +27,7 @@ auto trait Freeze {} impl Copy for *mut T {} -#[cfg_attr(not(bootstrap), lang = "drop_glue")] -#[cfg_attr(bootstrap, lang = "drop_in_place")] +#[lang = "drop_glue"] #[inline] pub unsafe fn drop_glue(_to_drop: &mut T) {} From 24b5e78480369e197b083857217d47dafba6b490 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 26 May 2026 16:15:23 -0700 Subject: [PATCH 18/22] Drop `-Zwarnings` since cargo `build.warnings` is now stable --- src/bootstrap/bootstrap.py | 1 - src/bootstrap/bootstrap_test.py | 2 -- src/bootstrap/src/core/builder/cargo.rs | 5 ----- 3 files changed, 8 deletions(-) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index ad256c2e97be2..563792868f5d2 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -1147,7 +1147,6 @@ def build_bootstrap_cmd(self, env): else: deny_warnings = self.warnings == "deny" if deny_warnings: - args += ["-Zwarnings"] env["CARGO_BUILD_WARNINGS"] = "deny" # Add RUSTFLAGS_BOOTSTRAP to RUSTFLAGS for bootstrap compilation. diff --git a/src/bootstrap/bootstrap_test.py b/src/bootstrap/bootstrap_test.py index 1dbe997d23f3a..b9cd0d7aa34a7 100644 --- a/src/bootstrap/bootstrap_test.py +++ b/src/bootstrap/bootstrap_test.py @@ -246,8 +246,6 @@ def test_warnings(self): args, env = self.build_args(configure_args, args=["--warnings=warn"]) self.assertFalse("CARGO_BUILD_WARNINGS" in env) - self.assertFalse("-Zwarnings" in args) args, env = self.build_args(configure_args, args=["--warnings=deny"]) self.assertEqual("deny", env["CARGO_BUILD_WARNINGS"]) - self.assertTrue("-Zwarnings" in args) diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs index 8247e8739f35c..24d7a24152a32 100644 --- a/src/bootstrap/src/core/builder/cargo.rs +++ b/src/bootstrap/src/core/builder/cargo.rs @@ -525,11 +525,6 @@ impl Builder<'_> { let out_dir = self.stage_out(compiler, mode); cargo.env("CARGO_TARGET_DIR", &out_dir); - // Set this unconditionally. Cargo silently ignores `CARGO_BUILD_WARNINGS` when `-Z - // warnings` isn't present, which is hard to debug, and it's not worth the effort to keep - // them in sync. - cargo.arg("-Zwarnings"); - // Bootstrap makes a lot of assumptions about the artifacts produced in the target // directory. If users override the "build directory" using `build-dir` // (https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#build-dir), then From 3ccd1cb8122ed2a7119516c4d58fd59878e80866 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 26 May 2026 16:22:29 -0700 Subject: [PATCH 19/22] Reformat with the new stage0 --- compiler/rustc_data_structures/src/unord.rs | 4 +- .../src/middle/codegen_fn_attrs.rs | 2 +- library/alloc/src/alloc.rs | 2 +- library/alloc/src/collections/mod.rs | 6 +-- library/alloc/src/string.rs | 2 +- library/alloc/src/vec/mod.rs | 10 ++-- library/core/src/alloc/mod.rs | 2 +- library/core/src/any.rs | 2 +- library/core/src/array/drain.rs | 6 +-- library/core/src/array/equality.rs | 20 ++++---- library/core/src/array/mod.rs | 32 ++++++------- library/core/src/borrow.rs | 10 ++-- library/core/src/bstr/mod.rs | 20 ++++---- library/core/src/cell.rs | 28 +++++------ library/core/src/cell/lazy.rs | 2 +- library/core/src/cell/once.rs | 4 +- library/core/src/char/convert.rs | 16 +++---- library/core/src/clone.rs | 16 +++---- library/core/src/cmp.rs | 42 ++++++++--------- library/core/src/convert/mod.rs | 36 +++++++-------- library/core/src/convert/num.rs | 4 +- library/core/src/default.rs | 2 +- library/core/src/ffi/c_str.rs | 4 +- library/core/src/ffi/va_list.rs | 4 +- library/core/src/hash/mod.rs | 2 +- library/core/src/hash/sip.rs | 2 +- library/core/src/intrinsics/fallback.rs | 4 +- library/core/src/iter/range.rs | 8 ++-- library/core/src/iter/sources/empty.rs | 2 +- library/core/src/iter/traits/collect.rs | 2 +- library/core/src/marker.rs | 2 +- library/core/src/mem/alignment.rs | 14 +++--- library/core/src/mem/drop_guard.rs | 6 +-- library/core/src/mem/manually_drop.rs | 4 +- library/core/src/net/ip_addr.rs | 40 ++++++++-------- library/core/src/net/socket_addr.rs | 6 +-- library/core/src/num/error.rs | 4 +- library/core/src/num/niche_types.rs | 2 +- library/core/src/num/nonzero.rs | 34 +++++++------- library/core/src/num/wrapping.rs | 16 +++---- library/core/src/ops/bit.rs | 10 ++-- library/core/src/ops/control_flow.rs | 6 +-- library/core/src/ops/deref.rs | 6 +-- library/core/src/ops/function.rs | 10 ++-- library/core/src/ops/range.rs | 46 +++++++++---------- library/core/src/ops/try_trait.rs | 6 +-- library/core/src/option.rs | 32 ++++++------- library/core/src/panic/unwind_safe.rs | 4 +- library/core/src/pat.rs | 2 +- library/core/src/pin.rs | 8 ++-- library/core/src/pin/unsafe_pinned.rs | 2 +- library/core/src/ptr/non_null.rs | 6 +-- library/core/src/ptr/unique.rs | 4 +- library/core/src/range.rs | 40 ++++++++-------- library/core/src/result.rs | 8 ++-- library/core/src/slice/cmp.rs | 34 +++++++------- library/core/src/slice/index.rs | 28 +++++------ library/core/src/slice/mod.rs | 8 ++-- library/core/src/str/mod.rs | 6 +-- library/core/src/str/traits.rs | 28 +++++------ library/core/src/sync/atomic.rs | 4 +- library/core/src/sync/sync_view.rs | 26 +++++------ library/core/src/task/poll.rs | 2 +- library/core/src/task/wake.rs | 2 +- library/core/src/time.rs | 18 ++++---- library/coretests/tests/array.rs | 2 +- library/coretests/tests/cmp.rs | 4 +- library/coretests/tests/hint.rs | 2 +- library/coretests/tests/manually_drop.rs | 2 +- library/std/src/collections/hash/map.rs | 2 +- library/std/src/collections/hash/set.rs | 2 +- library/std/src/ffi/os_str.rs | 2 +- library/std/src/hash/random.rs | 2 +- library/std/src/path.rs | 6 +-- library/std/src/sync/lazy_lock.rs | 2 +- library/std/src/sync/once_lock.rs | 2 +- 76 files changed, 399 insertions(+), 399 deletions(-) diff --git a/compiler/rustc_data_structures/src/unord.rs b/compiler/rustc_data_structures/src/unord.rs index 806d52be92a9c..42dbe37db7951 100644 --- a/compiler/rustc_data_structures/src/unord.rs +++ b/compiler/rustc_data_structures/src/unord.rs @@ -257,7 +257,7 @@ pub struct UnordSet { impl UnordCollection for UnordSet {} -impl const Default for UnordSet { +const impl Default for UnordSet { #[inline] fn default() -> Self { Self { inner: FxHashSet::with_hasher(FxBuildHasher) } @@ -456,7 +456,7 @@ pub struct UnordMap { impl UnordCollection for UnordMap {} -impl const Default for UnordMap { +const impl Default for UnordMap { #[inline] fn default() -> Self { Self { inner: FxHashMap::with_hasher(FxBuildHasher) } diff --git a/compiler/rustc_middle/src/middle/codegen_fn_attrs.rs b/compiler/rustc_middle/src/middle/codegen_fn_attrs.rs index 94a7f4d960126..18f93e050e745 100644 --- a/compiler/rustc_middle/src/middle/codegen_fn_attrs.rs +++ b/compiler/rustc_middle/src/middle/codegen_fn_attrs.rs @@ -272,7 +272,7 @@ pub struct SanitizerFnAttrs { pub rtsan_setting: RtsanSetting, } -impl const Default for SanitizerFnAttrs { +const impl Default for SanitizerFnAttrs { fn default() -> Self { Self { disabled: SanitizerSet::empty(), rtsan_setting: RtsanSetting::default() } } diff --git a/library/alloc/src/alloc.rs b/library/alloc/src/alloc.rs index 52f099e77255b..8ffef255bbe25 100644 --- a/library/alloc/src/alloc.rs +++ b/library/alloc/src/alloc.rs @@ -442,7 +442,7 @@ impl Global { #[unstable(feature = "allocator_api", issue = "32838")] #[rustc_const_unstable(feature = "const_heap", issue = "79597")] -unsafe impl const Allocator for Global { +const unsafe impl Allocator for Global { #[inline] #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces fn allocate(&self, layout: Layout) -> Result, AllocError> { diff --git a/library/alloc/src/collections/mod.rs b/library/alloc/src/collections/mod.rs index d11cf5a594148..2cc6b8e894664 100644 --- a/library/alloc/src/collections/mod.rs +++ b/library/alloc/src/collections/mod.rs @@ -129,7 +129,7 @@ pub enum TryReserveErrorKind { )] #[rustc_const_unstable(feature = "const_heap", issue = "79597")] #[cfg(not(test))] -impl const Clone for TryReserveErrorKind { +const impl Clone for TryReserveErrorKind { fn clone(&self) -> Self { match self { TryReserveErrorKind::CapacityOverflow => TryReserveErrorKind::CapacityOverflow, @@ -150,7 +150,7 @@ pub use realalloc::collections::TryReserveErrorKind; )] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] #[cfg(not(test))] -impl const From for TryReserveError { +const impl From for TryReserveError { #[inline] fn from(kind: TryReserveErrorKind) -> Self { Self { kind } @@ -160,7 +160,7 @@ impl const From for TryReserveError { #[unstable(feature = "try_reserve_kind", issue = "48043")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] #[cfg(not(test))] -impl const From for TryReserveErrorKind { +const impl From for TryReserveErrorKind { /// Always evaluates to [`TryReserveErrorKind::CapacityOverflow`]. #[inline] fn from(_: LayoutError) -> Self { diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index 1d9a4347a9616..7c6befa95718c 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -2710,7 +2710,7 @@ impl_eq! { Cow<'_, str>, String } #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for String { +const impl Default for String { /// Creates an empty `String`. #[inline] fn default() -> String { diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index d2b7837d98fa6..39f2d577ec6b8 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -3786,7 +3786,7 @@ impl ExtendFromWithinSpec for Vec { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const ops::Deref for Vec { +const impl ops::Deref for Vec { type Target = [T]; #[inline] @@ -3797,7 +3797,7 @@ impl const ops::Deref for Vec { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const ops::DerefMut for Vec { +const impl ops::DerefMut for Vec { #[inline] fn deref_mut(&mut self) -> &mut [T] { self.as_mut_slice() @@ -3863,7 +3863,7 @@ impl Hash for Vec { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -impl, A: Allocator> const Index for Vec { +const impl, A: Allocator> Index for Vec { type Output = I::Output; #[inline] @@ -3874,7 +3874,7 @@ impl, A: Allocator> const Index for Vec { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -impl, A: Allocator> const IndexMut for Vec { +const impl, A: Allocator> IndexMut for Vec { #[inline] fn index_mut(&mut self, index: I) -> &mut Self::Output { IndexMut::index_mut(&mut **self, index) @@ -4297,7 +4297,7 @@ unsafe impl<#[may_dangle] T, A: Allocator> Drop for Vec { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for Vec { +const impl Default for Vec { /// Creates an empty `Vec`. /// /// The vector will not allocate until elements are pushed onto it. diff --git a/library/core/src/alloc/mod.rs b/library/core/src/alloc/mod.rs index 18310cf98918d..102fb19efc8ea 100644 --- a/library/core/src/alloc/mod.rs +++ b/library/core/src/alloc/mod.rs @@ -377,7 +377,7 @@ pub const unsafe trait Allocator { #[unstable(feature = "allocator_api", issue = "32838")] #[rustc_const_unstable(feature = "const_heap", issue = "79597")] -unsafe impl const Allocator for &A +const unsafe impl Allocator for &A where A: [const] Allocator + ?Sized, { diff --git a/library/core/src/any.rs b/library/core/src/any.rs index 62300d8b70a96..5c5b815e3ba18 100644 --- a/library/core/src/any.rs +++ b/library/core/src/any.rs @@ -739,7 +739,7 @@ unsafe impl Sync for TypeId {} #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialEq for TypeId { +const impl PartialEq for TypeId { #[inline] fn eq(&self, other: &Self) -> bool { #[cfg(miri)] diff --git a/library/core/src/array/drain.rs b/library/core/src/array/drain.rs index 329b0e18b982b..96a5a3178c11e 100644 --- a/library/core/src/array/drain.rs +++ b/library/core/src/array/drain.rs @@ -52,7 +52,7 @@ pub(super) struct Drain<'l, 'f, T, F> { #[rustc_const_unstable(feature = "array_try_map", issue = "79711")] #[unstable(feature = "array_try_map", issue = "79711")] -impl const FnOnce<(usize,)> for &mut Drain<'_, '_, T, F> +const impl FnOnce<(usize,)> for &mut Drain<'_, '_, T, F> where F: [const] FnMut(T) -> U, { @@ -65,7 +65,7 @@ where } #[rustc_const_unstable(feature = "array_try_map", issue = "79711")] #[unstable(feature = "array_try_map", issue = "79711")] -impl const FnMut<(usize,)> for &mut Drain<'_, '_, T, F> +const impl FnMut<(usize,)> for &mut Drain<'_, '_, T, F> where F: [const] FnMut(T) -> U, { @@ -100,7 +100,7 @@ where } #[rustc_const_unstable(feature = "array_try_map", issue = "79711")] #[unstable(feature = "array_try_map", issue = "79711")] -impl const Drop for Drain<'_, '_, T, F> { +const impl Drop for Drain<'_, '_, T, F> { fn drop(&mut self) { let slice = if T::IS_ZST { from_raw_parts_mut::<[T]>( diff --git a/library/core/src/array/equality.rs b/library/core/src/array/equality.rs index ec79a657e58e2..d4692ca478388 100644 --- a/library/core/src/array/equality.rs +++ b/library/core/src/array/equality.rs @@ -2,7 +2,7 @@ use crate::cmp::BytewiseEq; #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialEq<[U; N]> for [T; N] +const impl PartialEq<[U; N]> for [T; N] where T: [const] PartialEq, { @@ -18,7 +18,7 @@ where #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialEq<[U]> for [T; N] +const impl PartialEq<[U]> for [T; N] where T: [const] PartialEq, { @@ -40,7 +40,7 @@ where #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialEq<[U; N]> for [T] +const impl PartialEq<[U; N]> for [T] where T: [const] PartialEq, { @@ -62,7 +62,7 @@ where #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialEq<&[U]> for [T; N] +const impl PartialEq<&[U]> for [T; N] where T: [const] PartialEq, { @@ -78,7 +78,7 @@ where #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialEq<[U; N]> for &[T] +const impl PartialEq<[U; N]> for &[T] where T: [const] PartialEq, { @@ -94,7 +94,7 @@ where #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialEq<&mut [U]> for [T; N] +const impl PartialEq<&mut [U]> for [T; N] where T: [const] PartialEq, { @@ -110,7 +110,7 @@ where #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialEq<[U; N]> for &mut [T] +const impl PartialEq<[U; N]> for &mut [T] where T: [const] PartialEq, { @@ -130,7 +130,7 @@ where #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const Eq for [T; N] {} +const impl Eq for [T; N] {} #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] const trait SpecArrayEq: Sized { @@ -139,7 +139,7 @@ const trait SpecArrayEq: Sized { } #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl, Other, const N: usize> const SpecArrayEq for T { +const impl, Other, const N: usize> SpecArrayEq for T { default fn spec_eq(a: &[Self; N], b: &[Other; N]) -> bool { a[..] == b[..] } @@ -149,7 +149,7 @@ impl, Other, const N: usize> const SpecArrayEq, U, const N: usize> const SpecArrayEq for T { +const impl, U, const N: usize> SpecArrayEq for T { fn spec_eq(a: &[T; N], b: &[U; N]) -> bool { // SAFETY: Arrays are compared element-wise, and don't add any padding // between elements, so when the elements are `BytewiseEq`, we can diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs index 56f188cfa622a..5784dbed03634 100644 --- a/library/core/src/array/mod.rs +++ b/library/core/src/array/mod.rs @@ -195,7 +195,7 @@ impl Error for TryFromSliceError {} #[stable(feature = "try_from_slice_error", since = "1.36.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for TryFromSliceError { +const impl From for TryFromSliceError { fn from(x: Infallible) -> TryFromSliceError { match x {} } @@ -203,7 +203,7 @@ impl const From for TryFromSliceError { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsRef<[T]> for [T; N] { +const impl AsRef<[T]> for [T; N] { #[inline] fn as_ref(&self) -> &[T] { &self[..] @@ -212,7 +212,7 @@ impl const AsRef<[T]> for [T; N] { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsMut<[T]> for [T; N] { +const impl AsMut<[T]> for [T; N] { #[inline] fn as_mut(&mut self) -> &mut [T] { &mut self[..] @@ -221,7 +221,7 @@ impl const AsMut<[T]> for [T; N] { #[stable(feature = "array_borrow", since = "1.4.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const Borrow<[T]> for [T; N] { +const impl Borrow<[T]> for [T; N] { fn borrow(&self) -> &[T] { self } @@ -229,7 +229,7 @@ impl const Borrow<[T]> for [T; N] { #[stable(feature = "array_borrow", since = "1.4.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const BorrowMut<[T]> for [T; N] { +const impl BorrowMut<[T]> for [T; N] { fn borrow_mut(&mut self) -> &mut [T] { self } @@ -249,7 +249,7 @@ impl const BorrowMut<[T]> for [T; N] { /// ``` #[stable(feature = "try_from", since = "1.34.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const TryFrom<&[T]> for [T; N] +const impl TryFrom<&[T]> for [T; N] where T: Copy, { @@ -275,7 +275,7 @@ where /// ``` #[stable(feature = "try_from_mut_slice_to_array", since = "1.59.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const TryFrom<&mut [T]> for [T; N] +const impl TryFrom<&mut [T]> for [T; N] where T: Copy, { @@ -301,7 +301,7 @@ where /// ``` #[stable(feature = "try_from", since = "1.34.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl<'a, T, const N: usize> const TryFrom<&'a [T]> for &'a [T; N] { +const impl<'a, T, const N: usize> TryFrom<&'a [T]> for &'a [T; N] { type Error = TryFromSliceError; #[inline] @@ -324,7 +324,7 @@ impl<'a, T, const N: usize> const TryFrom<&'a [T]> for &'a [T; N] { /// ``` #[stable(feature = "try_from", since = "1.34.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl<'a, T, const N: usize> const TryFrom<&'a mut [T]> for &'a mut [T; N] { +const impl<'a, T, const N: usize> TryFrom<&'a mut [T]> for &'a mut [T; N] { type Error = TryFromSliceError; #[inline] @@ -380,7 +380,7 @@ impl<'a, T, const N: usize> IntoIterator for &'a mut [T; N] { #[stable(feature = "index_trait_on_arrays", since = "1.50.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -impl const Index for [T; N] +const impl Index for [T; N] where [T]: [const] Index, { @@ -394,7 +394,7 @@ where #[stable(feature = "index_trait_on_arrays", since = "1.50.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -impl const IndexMut for [T; N] +const impl IndexMut for [T; N] where [T]: [const] IndexMut, { @@ -407,7 +407,7 @@ where /// Implements comparison of arrays [lexicographically](Ord#lexicographical-comparison). #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialOrd for [T; N] { +const impl PartialOrd for [T; N] { #[inline] fn partial_cmp(&self, other: &[T; N]) -> Option { PartialOrd::partial_cmp(&&self[..], &&other[..]) @@ -433,7 +433,7 @@ impl const PartialOrd for [T; N] { /// Implements comparison of arrays [lexicographically](Ord#lexicographical-comparison). #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const Ord for [T; N] { +const impl Ord for [T; N] { #[inline] fn cmp(&self, other: &[T; N]) -> Ordering { Ord::cmp(&&self[..], &&other[..]) @@ -958,7 +958,7 @@ impl Guard<'_, T> { } #[rustc_const_unstable(feature = "array_try_from_fn", issue = "89379")] -impl const Drop for Guard<'_, T> { +const impl Drop for Guard<'_, T> { #[inline] fn drop(&mut self) { debug_assert!(self.initialized <= self.array_mut.len()); @@ -993,7 +993,7 @@ pub(crate) const trait SpecNextChunk: Iterator { fn spec_next_chunk(&mut self) -> Result<[T; N], IntoIter>; } #[rustc_const_unstable(feature = "const_iter", issue = "92476")] -impl, T, const N: usize> const SpecNextChunk for I { +const impl, T, const N: usize> SpecNextChunk for I { #[inline] default fn spec_next_chunk(&mut self) -> Result<[T; N], IntoIter> { let mut array = [const { MaybeUninit::uninit() }; N]; @@ -1011,7 +1011,7 @@ impl, T, const N: usize> const SpecNextChunk } } #[rustc_const_unstable(feature = "const_iter", issue = "92476")] -impl + TrustedLen, T, const N: usize> const SpecNextChunk +const impl + TrustedLen, T, const N: usize> SpecNextChunk for I { fn spec_next_chunk(&mut self) -> Result<[T; N], IntoIter> { diff --git a/library/core/src/borrow.rs b/library/core/src/borrow.rs index eb4562bda4ce3..fe844e32c7e0f 100644 --- a/library/core/src/borrow.rs +++ b/library/core/src/borrow.rs @@ -209,7 +209,7 @@ pub const trait BorrowMut: [const] Borrow { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const Borrow for T { +const impl Borrow for T { #[rustc_diagnostic_item = "noop_method_borrow"] fn borrow(&self) -> &T { self @@ -218,7 +218,7 @@ impl const Borrow for T { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const BorrowMut for T { +const impl BorrowMut for T { fn borrow_mut(&mut self) -> &mut T { self } @@ -226,7 +226,7 @@ impl const BorrowMut for T { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const Borrow for &T { +const impl Borrow for &T { fn borrow(&self) -> &T { self } @@ -234,7 +234,7 @@ impl const Borrow for &T { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const Borrow for &mut T { +const impl Borrow for &mut T { fn borrow(&self) -> &T { self } @@ -242,7 +242,7 @@ impl const Borrow for &mut T { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const BorrowMut for &mut T { +const impl BorrowMut for &mut T { fn borrow_mut(&mut self) -> &mut T { self } diff --git a/library/core/src/bstr/mod.rs b/library/core/src/bstr/mod.rs index 9d623d3af8b5d..26a7f9c93b8c7 100644 --- a/library/core/src/bstr/mod.rs +++ b/library/core/src/bstr/mod.rs @@ -131,7 +131,7 @@ impl ByteStr { #[unstable(feature = "bstr", issue = "134915")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const Deref for ByteStr { +const impl Deref for ByteStr { type Target = [u8]; #[inline] @@ -142,7 +142,7 @@ impl const Deref for ByteStr { #[unstable(feature = "bstr", issue = "134915")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const DerefMut for ByteStr { +const impl DerefMut for ByteStr { #[inline] fn deref_mut(&mut self) -> &mut [u8] { &mut self.0 @@ -258,7 +258,7 @@ impl fmt::Display for ByteStr { #[unstable(feature = "bstr", issue = "134915")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsRef<[u8]> for ByteStr { +const impl AsRef<[u8]> for ByteStr { #[inline] fn as_ref(&self) -> &[u8] { &self.0 @@ -267,7 +267,7 @@ impl const AsRef<[u8]> for ByteStr { #[unstable(feature = "bstr", issue = "134915")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsRef for ByteStr { +const impl AsRef for ByteStr { #[inline] fn as_ref(&self) -> &ByteStr { self @@ -278,7 +278,7 @@ impl const AsRef for ByteStr { #[unstable(feature = "bstr", issue = "134915")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsRef for str { +const impl AsRef for str { #[inline] fn as_ref(&self) -> &ByteStr { ByteStr::new(self) @@ -287,7 +287,7 @@ impl const AsRef for str { #[unstable(feature = "bstr", issue = "134915")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsMut<[u8]> for ByteStr { +const impl AsMut<[u8]> for ByteStr { #[inline] fn as_mut(&mut self) -> &mut [u8] { &mut self.0 @@ -302,7 +302,7 @@ impl const AsMut<[u8]> for ByteStr { #[unstable(feature = "bstr", issue = "134915")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const Borrow<[u8]> for ByteStr { +const impl Borrow<[u8]> for ByteStr { #[inline] fn borrow(&self) -> &[u8] { &self.0 @@ -313,7 +313,7 @@ impl const Borrow<[u8]> for ByteStr { #[unstable(feature = "bstr", issue = "134915")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const BorrowMut<[u8]> for ByteStr { +const impl BorrowMut<[u8]> for ByteStr { #[inline] fn borrow_mut(&mut self) -> &mut [u8] { &mut self.0 @@ -382,7 +382,7 @@ impl<'a> Default for &'a mut ByteStr { #[unstable(feature = "bstr", issue = "134915")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl<'a> const TryFrom<&'a ByteStr> for &'a str { +const impl<'a> TryFrom<&'a ByteStr> for &'a str { type Error = crate::str::Utf8Error; #[inline] @@ -393,7 +393,7 @@ impl<'a> const TryFrom<&'a ByteStr> for &'a str { #[unstable(feature = "bstr", issue = "134915")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl<'a> const TryFrom<&'a mut ByteStr> for &'a mut str { +const impl<'a> TryFrom<&'a mut ByteStr> for &'a mut str { type Error = crate::str::Utf8Error; #[inline] diff --git a/library/core/src/cell.rs b/library/core/src/cell.rs index d67693f9d0fc3..1c79cf6bfcb36 100644 --- a/library/core/src/cell.rs +++ b/library/core/src/cell.rs @@ -334,7 +334,7 @@ impl Clone for Cell { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for Cell { +const impl Default for Cell { /// Creates a `Cell`, with the `Default` value for T. #[inline] fn default() -> Cell { @@ -391,7 +391,7 @@ impl Ord for Cell { #[stable(feature = "cell_from", since = "1.12.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for Cell { +const impl From for Cell { /// Creates a new `Cell` containing the given value. fn from(t: T) -> Cell { Cell::new(t) @@ -1461,7 +1461,7 @@ impl Clone for RefCell { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for RefCell { +const impl Default for RefCell { /// Creates a `RefCell`, with the `Default` value for T. #[inline] fn default() -> RefCell { @@ -1539,7 +1539,7 @@ impl Ord for RefCell { #[stable(feature = "cell_from", since = "1.12.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for RefCell { +const impl From for RefCell { /// Creates a new `RefCell` containing the given value. fn from(t: T) -> RefCell { RefCell::new(t) @@ -1579,7 +1579,7 @@ impl<'b> BorrowRef<'b> { } #[rustc_const_unstable(feature = "const_ref_cell", issue = "137844")] -impl const Drop for BorrowRef<'_> { +const impl Drop for BorrowRef<'_> { #[inline] fn drop(&mut self) { let borrow = self.borrow.get(); @@ -1589,7 +1589,7 @@ impl const Drop for BorrowRef<'_> { } #[rustc_const_unstable(feature = "const_ref_cell", issue = "137844")] -impl const Clone for BorrowRef<'_> { +const impl Clone for BorrowRef<'_> { #[inline] fn clone(&self) -> Self { // Since this Ref exists, we know the borrow flag @@ -1621,7 +1621,7 @@ pub struct Ref<'b, T: ?Sized + 'b> { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const Deref for Ref<'_, T> { +const impl Deref for Ref<'_, T> { type Target = T; #[inline] @@ -2047,7 +2047,7 @@ struct BorrowRefMut<'b> { } #[rustc_const_unstable(feature = "const_ref_cell", issue = "137844")] -impl const Drop for BorrowRefMut<'_> { +const impl Drop for BorrowRefMut<'_> { #[inline] fn drop(&mut self) { let borrow = self.borrow.get(); @@ -2105,7 +2105,7 @@ pub struct RefMut<'b, T: ?Sized + 'b> { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const Deref for RefMut<'_, T> { +const impl Deref for RefMut<'_, T> { type Target = T; #[inline] @@ -2117,7 +2117,7 @@ impl const Deref for RefMut<'_, T> { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const DerefMut for RefMut<'_, T> { +const impl DerefMut for RefMut<'_, T> { #[inline] fn deref_mut(&mut self) -> &mut T { // SAFETY: the value is accessible as long as we hold our borrow. @@ -2567,7 +2567,7 @@ impl UnsafeCell { #[stable(feature = "unsafe_cell_default", since = "1.10.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for UnsafeCell { +const impl Default for UnsafeCell { /// Creates an `UnsafeCell`, with the `Default` value for T. fn default() -> UnsafeCell { UnsafeCell::new(Default::default()) @@ -2576,7 +2576,7 @@ impl const Default for UnsafeCell { #[stable(feature = "cell_from", since = "1.12.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for UnsafeCell { +const impl From for UnsafeCell { /// Creates a new `UnsafeCell` containing the given value. fn from(t: T) -> UnsafeCell { UnsafeCell::new(t) @@ -2674,7 +2674,7 @@ impl SyncUnsafeCell { #[unstable(feature = "sync_unsafe_cell", issue = "95439")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for SyncUnsafeCell { +const impl Default for SyncUnsafeCell { /// Creates an `SyncUnsafeCell`, with the `Default` value for T. fn default() -> SyncUnsafeCell { SyncUnsafeCell::new(Default::default()) @@ -2683,7 +2683,7 @@ impl const Default for SyncUnsafeCell { #[unstable(feature = "sync_unsafe_cell", issue = "95439")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for SyncUnsafeCell { +const impl From for SyncUnsafeCell { /// Creates a new `SyncUnsafeCell` containing the given value. fn from(t: T) -> SyncUnsafeCell { SyncUnsafeCell::new(t) diff --git a/library/core/src/cell/lazy.rs b/library/core/src/cell/lazy.rs index 66436ed7d94fb..ba32fff2284fd 100644 --- a/library/core/src/cell/lazy.rs +++ b/library/core/src/cell/lazy.rs @@ -347,7 +347,7 @@ impl T> DerefMut for LazyCell { #[stable(feature = "lazy_cell", since = "1.80.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for LazyCell { +const impl Default for LazyCell { /// Creates a new lazy value using `Default` as the initializing function. #[inline] fn default() -> LazyCell { diff --git a/library/core/src/cell/once.rs b/library/core/src/cell/once.rs index af4469fad2cc6..799e19cce67e6 100644 --- a/library/core/src/cell/once.rs +++ b/library/core/src/cell/once.rs @@ -354,7 +354,7 @@ impl OnceCell { #[stable(feature = "once_cell", since = "1.70.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for OnceCell { +const impl Default for OnceCell { #[inline] fn default() -> Self { Self::new() @@ -397,7 +397,7 @@ impl Eq for OnceCell {} #[stable(feature = "once_cell", since = "1.70.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for OnceCell { +const impl From for OnceCell { /// Creates a new `OnceCell` which already contains the given `value`. #[inline] fn from(value: T) -> Self { diff --git a/library/core/src/char/convert.rs b/library/core/src/char/convert.rs index 90c09d43f14f5..a60fc68c22990 100644 --- a/library/core/src/char/convert.rs +++ b/library/core/src/char/convert.rs @@ -37,7 +37,7 @@ pub(super) const unsafe fn from_u32_unchecked(i: u32) -> char { #[stable(feature = "char_convert", since = "1.13.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for u32 { +const impl From for u32 { /// Converts a [`char`] into a [`u32`]. /// /// # Examples @@ -56,7 +56,7 @@ impl const From for u32 { #[stable(feature = "more_char_conversions", since = "1.51.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for u64 { +const impl From for u64 { /// Converts a [`char`] into a [`u64`]. /// /// # Examples @@ -77,7 +77,7 @@ impl const From for u64 { #[stable(feature = "more_char_conversions", since = "1.51.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for u128 { +const impl From for u128 { /// Converts a [`char`] into a [`u128`]. /// /// # Examples @@ -102,7 +102,7 @@ impl const From for u128 { /// See [`impl From for char`](char#impl-From-for-char) for details on the encoding. #[stable(feature = "u8_from_char", since = "1.59.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const TryFrom for u8 { +const impl TryFrom for u8 { type Error = TryFromCharError; /// Tries to convert a [`char`] into a [`u8`]. @@ -132,7 +132,7 @@ impl const TryFrom for u8 { /// This corresponds to the UCS-2 encoding, as specified in ISO/IEC 10646:2003. #[stable(feature = "u16_from_char", since = "1.74.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const TryFrom for u16 { +const impl TryFrom for u16 { type Error = TryFromCharError; /// Tries to convert a [`char`] into a [`u16`]. @@ -164,7 +164,7 @@ impl const TryFrom for u16 { /// UTF-32 code point to the extent representable by pointer addresses. #[stable(feature = "usize_try_from_char", since = "1.94.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const TryFrom for usize { +const impl TryFrom for usize { type Error = TryFromCharError; /// Tries to convert a [`char`] into a [`usize`]. @@ -214,7 +214,7 @@ impl const TryFrom for usize { /// C0 and C1 control codes. #[stable(feature = "char_convert", since = "1.13.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for char { +const impl From for char { /// Converts a [`u8`] into a [`char`]. /// /// # Examples @@ -300,7 +300,7 @@ const fn char_try_from_u32(i: u32) -> Result { #[stable(feature = "try_from", since = "1.34.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const TryFrom for char { +const impl TryFrom for char { type Error = CharTryFromError; #[inline] diff --git a/library/core/src/clone.rs b/library/core/src/clone.rs index 0c3e90b78103a..93e774226349c 100644 --- a/library/core/src/clone.rs +++ b/library/core/src/clone.rs @@ -717,7 +717,7 @@ mod impls { #[unstable(feature = "never_type", issue = "35121")] #[rustc_const_unstable(feature = "const_clone", issue = "142757")] - impl const Clone for ! { + const impl Clone for ! { #[inline] fn clone(&self) -> Self { *self @@ -727,11 +727,11 @@ mod impls { #[doc(hidden)] #[unstable(feature = "trivial_clone", issue = "none")] #[rustc_const_unstable(feature = "const_clone", issue = "142757")] - unsafe impl const TrivialClone for ! {} + const unsafe impl TrivialClone for ! {} #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_clone", issue = "142757")] - impl const Clone for *const T { + const impl Clone for *const T { #[inline(always)] fn clone(&self) -> Self { *self @@ -741,11 +741,11 @@ mod impls { #[doc(hidden)] #[unstable(feature = "trivial_clone", issue = "none")] #[rustc_const_unstable(feature = "const_clone", issue = "142757")] - unsafe impl const TrivialClone for *const T {} + const unsafe impl TrivialClone for *const T {} #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_clone", issue = "142757")] - impl const Clone for *mut T { + const impl Clone for *mut T { #[inline(always)] fn clone(&self) -> Self { *self @@ -755,12 +755,12 @@ mod impls { #[doc(hidden)] #[unstable(feature = "trivial_clone", issue = "none")] #[rustc_const_unstable(feature = "const_clone", issue = "142757")] - unsafe impl const TrivialClone for *mut T {} + const unsafe impl TrivialClone for *mut T {} /// Shared references can be cloned, but mutable references *cannot*! #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_clone", issue = "142757")] - impl const Clone for &T { + const impl Clone for &T { #[inline(always)] #[rustc_diagnostic_item = "noop_method_clone"] fn clone(&self) -> Self { @@ -771,7 +771,7 @@ mod impls { #[doc(hidden)] #[unstable(feature = "trivial_clone", issue = "none")] #[rustc_const_unstable(feature = "const_clone", issue = "142757")] - unsafe impl const TrivialClone for &T {} + const unsafe impl TrivialClone for &T {} #[unstable(feature = "share_trait", issue = "156756")] impl Share for &T {} diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs index 4e6cddc77e0e1..b699c7a02e477 100644 --- a/library/core/src/cmp.rs +++ b/library/core/src/cmp.rs @@ -685,7 +685,7 @@ pub struct Reverse(#[stable(feature = "reverse_cmp_key", since = "1.19.0")] p #[stable(feature = "reverse_cmp_key", since = "1.19.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialOrd for Reverse { +const impl PartialOrd for Reverse { #[inline] fn partial_cmp(&self, other: &Reverse) -> Option { other.0.partial_cmp(&self.0) @@ -711,7 +711,7 @@ impl const PartialOrd for Reverse { #[stable(feature = "reverse_cmp_key", since = "1.19.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const Ord for Reverse { +const impl Ord for Reverse { #[inline] fn cmp(&self, other: &Reverse) -> Ordering { other.0.cmp(&self.0) @@ -1884,7 +1884,7 @@ mod impls { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] - impl const PartialEq for () { + const impl PartialEq for () { #[inline] fn eq(&self, _other: &()) -> bool { true @@ -1970,7 +1970,7 @@ mod impls { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] - impl const PartialOrd for () { + const impl PartialOrd for () { #[inline] fn partial_cmp(&self, _: &()) -> Option { Some(Equal) @@ -1979,7 +1979,7 @@ mod impls { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] - impl const PartialOrd for bool { + const impl PartialOrd for bool { #[inline] fn partial_cmp(&self, other: &bool) -> Option { Some(self.cmp(other)) @@ -2036,7 +2036,7 @@ mod impls { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] - impl const Ord for () { + const impl Ord for () { #[inline] fn cmp(&self, _other: &()) -> Ordering { Equal @@ -2045,7 +2045,7 @@ mod impls { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] - impl const Ord for bool { + const impl Ord for bool { #[inline] fn cmp(&self, other: &bool) -> Ordering { // Casting to i8's and converting the difference to an Ordering generates @@ -2081,7 +2081,7 @@ mod impls { #[unstable(feature = "never_type", issue = "35121")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] - impl const PartialEq for ! { + const impl PartialEq for ! { #[inline] fn eq(&self, _: &!) -> bool { *self @@ -2090,11 +2090,11 @@ mod impls { #[unstable(feature = "never_type", issue = "35121")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] - impl const Eq for ! {} + const impl Eq for ! {} #[unstable(feature = "never_type", issue = "35121")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] - impl const PartialOrd for ! { + const impl PartialOrd for ! { #[inline] fn partial_cmp(&self, _: &!) -> Option { *self @@ -2103,7 +2103,7 @@ mod impls { #[unstable(feature = "never_type", issue = "35121")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] - impl const Ord for ! { + const impl Ord for ! { #[inline] fn cmp(&self, _: &!) -> Ordering { *self @@ -2114,7 +2114,7 @@ mod impls { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] - impl const PartialEq<&B> for &A + const impl PartialEq<&B> for &A where A: [const] PartialEq, { @@ -2129,7 +2129,7 @@ mod impls { } #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] - impl const PartialOrd<&B> for &A + const impl PartialOrd<&B> for &A where A: [const] PartialOrd, { @@ -2172,7 +2172,7 @@ mod impls { } #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] - impl const Ord for &A + const impl Ord for &A where A: [const] Ord, { @@ -2183,13 +2183,13 @@ mod impls { } #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] - impl const Eq for &A where A: [const] Eq {} + const impl Eq for &A where A: [const] Eq {} // &mut pointers #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] - impl const PartialEq<&mut B> for &mut A + const impl PartialEq<&mut B> for &mut A where A: [const] PartialEq, { @@ -2204,7 +2204,7 @@ mod impls { } #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] - impl const PartialOrd<&mut B> for &mut A + const impl PartialOrd<&mut B> for &mut A where A: [const] PartialOrd, { @@ -2247,7 +2247,7 @@ mod impls { } #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] - impl const Ord for &mut A + const impl Ord for &mut A where A: [const] Ord, { @@ -2258,11 +2258,11 @@ mod impls { } #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] - impl const Eq for &mut A where A: [const] Eq {} + const impl Eq for &mut A where A: [const] Eq {} #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] - impl const PartialEq<&mut B> for &A + const impl PartialEq<&mut B> for &A where A: [const] PartialEq, { @@ -2278,7 +2278,7 @@ mod impls { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] - impl const PartialEq<&B> for &mut A + const impl PartialEq<&B> for &mut A where A: [const] PartialEq, { diff --git a/library/core/src/convert/mod.rs b/library/core/src/convert/mod.rs index 46b0e8c6b67cd..34cf9c5d0a5b2 100644 --- a/library/core/src/convert/mod.rs +++ b/library/core/src/convert/mod.rs @@ -709,7 +709,7 @@ pub const trait TryFrom: Sized { // As lifts over & #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsRef for &T +const impl AsRef for &T where T: [const] AsRef, { @@ -722,7 +722,7 @@ where // As lifts over &mut #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsRef for &mut T +const impl AsRef for &mut T where T: [const] AsRef, { @@ -743,7 +743,7 @@ where // AsMut lifts over &mut #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsMut for &mut T +const impl AsMut for &mut T where T: [const] AsMut, { @@ -764,7 +764,7 @@ where // From implies Into #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const Into for T +const impl Into for T where U: [const] From, { @@ -782,7 +782,7 @@ where // From (and thus Into) is reflexive #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for T { +const impl From for T { /// Returns the argument unchanged. #[inline(always)] fn from(t: T) -> T { @@ -799,7 +799,7 @@ impl const From for T { #[rustc_reservation_impl = "permitting this impl would forbid us from adding \ `impl From for T` later; see rust-lang/rust#64715 for details"] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for T { +const impl From for T { fn from(t: !) -> T { t } @@ -808,7 +808,7 @@ impl const From for T { // TryFrom implies TryInto #[stable(feature = "try_from", since = "1.34.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const TryInto for T +const impl TryInto for T where U: [const] TryFrom, { @@ -824,7 +824,7 @@ where // with an uninhabited error type. #[stable(feature = "try_from", since = "1.34.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const TryFrom for T +const impl TryFrom for T where U: [const] Into, { @@ -842,7 +842,7 @@ where #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsRef<[T]> for [T] { +const impl AsRef<[T]> for [T] { #[inline(always)] fn as_ref(&self) -> &[T] { self @@ -851,7 +851,7 @@ impl const AsRef<[T]> for [T] { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsMut<[T]> for [T] { +const impl AsMut<[T]> for [T] { #[inline(always)] fn as_mut(&mut self) -> &mut [T] { self @@ -860,7 +860,7 @@ impl const AsMut<[T]> for [T] { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsRef for str { +const impl AsRef for str { #[inline(always)] fn as_ref(&self) -> &str { self @@ -869,7 +869,7 @@ impl const AsRef for str { #[stable(feature = "as_mut_str_for_str", since = "1.51.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsMut for str { +const impl AsMut for str { #[inline(always)] fn as_mut(&mut self) -> &mut str { self @@ -931,7 +931,7 @@ pub enum Infallible {} #[stable(feature = "convert_infallible", since = "1.34.0")] #[rustc_const_unstable(feature = "const_clone", issue = "142757")] -impl const Clone for Infallible { +const impl Clone for Infallible { fn clone(&self) -> Infallible { match *self {} } @@ -956,7 +956,7 @@ impl Error for Infallible {} #[stable(feature = "convert_infallible", since = "1.34.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialEq for Infallible { +const impl PartialEq for Infallible { fn eq(&self, _: &Infallible) -> bool { match *self {} } @@ -964,11 +964,11 @@ impl const PartialEq for Infallible { #[stable(feature = "convert_infallible", since = "1.34.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const Eq for Infallible {} +const impl Eq for Infallible {} #[stable(feature = "convert_infallible", since = "1.34.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialOrd for Infallible { +const impl PartialOrd for Infallible { fn partial_cmp(&self, _other: &Self) -> Option { match *self {} } @@ -976,7 +976,7 @@ impl const PartialOrd for Infallible { #[stable(feature = "convert_infallible", since = "1.34.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const Ord for Infallible { +const impl Ord for Infallible { fn cmp(&self, _other: &Self) -> crate::cmp::Ordering { match *self {} } @@ -984,7 +984,7 @@ impl const Ord for Infallible { #[stable(feature = "convert_infallible", since = "1.34.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for Infallible { +const impl From for Infallible { #[inline] fn from(x: !) -> Self { x diff --git a/library/core/src/convert/num.rs b/library/core/src/convert/num.rs index a56ce1806d528..2e968e8ccc324 100644 --- a/library/core/src/convert/num.rs +++ b/library/core/src/convert/num.rs @@ -503,7 +503,7 @@ macro_rules! impl_nonzero_int_from_nonzero_int { ($Small:ty => $Large:ty) => { #[stable(feature = "nz_int_conv", since = "1.41.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] - impl const From> for NonZero<$Large> { + const impl From> for NonZero<$Large> { // Rustdocs on the impl block show a "[+] show undocumented items" toggle. // Rustdocs on functions do not. #[doc = concat!("Converts [NonZero]\\<[", stringify!($Small), "]> ")] @@ -562,7 +562,7 @@ macro_rules! impl_nonzero_int_try_from_int { ($Int:ty) => { #[stable(feature = "nzint_try_from_int_conv", since = "1.46.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] - impl const TryFrom<$Int> for NonZero<$Int> { + const impl TryFrom<$Int> for NonZero<$Int> { type Error = TryFromIntError; // Rustdocs on the impl block show a "[+] show undocumented items" toggle. diff --git a/library/core/src/default.rs b/library/core/src/default.rs index 1cc4fb6e8fdd3..359ef29bb7331 100644 --- a/library/core/src/default.rs +++ b/library/core/src/default.rs @@ -151,7 +151,7 @@ macro_rules! default_impl { ($t:ty, $v:expr, $doc:tt) => { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] - impl const Default for $t { + const impl Default for $t { #[inline(always)] #[doc = $doc] fn default() -> $t { diff --git a/library/core/src/ffi/c_str.rs b/library/core/src/ffi/c_str.rs index c2d6f7b235a53..d3318b0863e6e 100644 --- a/library/core/src/ffi/c_str.rs +++ b/library/core/src/ffi/c_str.rs @@ -177,7 +177,7 @@ impl fmt::Debug for CStr { #[stable(feature = "cstr_default", since = "1.10.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for &CStr { +const impl Default for &CStr { #[inline] fn default() -> Self { c"" @@ -729,7 +729,7 @@ impl ops::Index> for CStr { #[stable(feature = "cstring_asref", since = "1.7.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsRef for CStr { +const impl AsRef for CStr { #[inline] fn as_ref(&self) -> &CStr { self diff --git a/library/core/src/ffi/va_list.rs b/library/core/src/ffi/va_list.rs index 871943a91e6cc..d5b83a23abe80 100644 --- a/library/core/src/ffi/va_list.rs +++ b/library/core/src/ffi/va_list.rs @@ -250,7 +250,7 @@ impl VaList<'_> { } #[rustc_const_unstable(feature = "const_c_variadic", issue = "151787")] -impl<'f> const Clone for VaList<'f> { +const impl<'f> Clone for VaList<'f> { /// Clone the [`VaList`], producing a second independent cursor into the variable argument list. /// /// Corresponds to `va_copy` in C. @@ -265,7 +265,7 @@ impl<'f> const Clone for VaList<'f> { } #[rustc_const_unstable(feature = "const_c_variadic", issue = "151787")] -impl<'f> const Drop for VaList<'f> { +const impl<'f> Drop for VaList<'f> { /// Drop the [`VaList`]. /// /// Corresponds to `va_end` in C. diff --git a/library/core/src/hash/mod.rs b/library/core/src/hash/mod.rs index eea6118571204..c7c8d57e1010d 100644 --- a/library/core/src/hash/mod.rs +++ b/library/core/src/hash/mod.rs @@ -784,7 +784,7 @@ impl Clone for BuildHasherDefault { #[stable(since = "1.7.0", feature = "build_hasher")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for BuildHasherDefault { +const impl Default for BuildHasherDefault { fn default() -> BuildHasherDefault { Self::new() } diff --git a/library/core/src/hash/sip.rs b/library/core/src/hash/sip.rs index eed1044bd2a92..bc74bd0e085ff 100644 --- a/library/core/src/hash/sip.rs +++ b/library/core/src/hash/sip.rs @@ -340,7 +340,7 @@ impl Clone for Hasher { } #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for Hasher { +const impl Default for Hasher { /// Creates a `Hasher` with the two initial keys set to 0. #[inline] fn default() -> Hasher { diff --git a/library/core/src/intrinsics/fallback.rs b/library/core/src/intrinsics/fallback.rs index aa9033ee3d260..bc415ec977684 100644 --- a/library/core/src/intrinsics/fallback.rs +++ b/library/core/src/intrinsics/fallback.rs @@ -80,7 +80,7 @@ const fn wide_mul_u128(a: u128, b: u128) -> (u128, u128) { } #[rustc_const_unstable(feature = "core_intrinsics_fallbacks", issue = "none")] -impl const CarryingMulAdd for u128 { +const impl CarryingMulAdd for u128 { type Unsigned = u128; #[inline] fn carrying_mul_add(self, b: u128, c: u128, d: u128) -> (u128, u128) { @@ -94,7 +94,7 @@ impl const CarryingMulAdd for u128 { } #[rustc_const_unstable(feature = "core_intrinsics_fallbacks", issue = "none")] -impl const CarryingMulAdd for i128 { +const impl CarryingMulAdd for i128 { type Unsigned = u128; #[inline] fn carrying_mul_add(self, b: i128, c: i128, d: i128) -> (u128, i128) { diff --git a/library/core/src/iter/range.rs b/library/core/src/iter/range.rs index 3b025fdcda904..949295a77bca6 100644 --- a/library/core/src/iter/range.rs +++ b/library/core/src/iter/range.rs @@ -574,7 +574,7 @@ step_nonzero_impls! { #[unstable(feature = "step_trait", issue = "42168")] #[rustc_const_unstable(feature = "step_trait", issue = "42168")] -impl const Step for char { +const impl Step for char { #[inline] fn steps_between(&start: &char, &end: &char) -> (usize, Option) { let start = start as u32; @@ -662,7 +662,7 @@ impl const Step for char { #[unstable(feature = "step_trait", issue = "42168")] #[rustc_const_unstable(feature = "step_trait", issue = "42168")] -impl const Step for AsciiChar { +const impl Step for AsciiChar { #[inline] fn steps_between(&start: &AsciiChar, &end: &AsciiChar) -> (usize, Option) { Step::steps_between(&start.to_u8(), &end.to_u8()) @@ -705,7 +705,7 @@ impl const Step for AsciiChar { #[unstable(feature = "step_trait", issue = "42168")] #[rustc_const_unstable(feature = "step_trait", issue = "42168")] -impl const Step for Ipv4Addr { +const impl Step for Ipv4Addr { #[inline] fn steps_between(&start: &Ipv4Addr, &end: &Ipv4Addr) -> (usize, Option) { u32::steps_between(&start.to_bits(), &end.to_bits()) @@ -738,7 +738,7 @@ impl const Step for Ipv4Addr { #[unstable(feature = "step_trait", issue = "42168")] #[rustc_const_unstable(feature = "step_trait", issue = "42168")] -impl const Step for Ipv6Addr { +const impl Step for Ipv6Addr { #[inline] fn steps_between(&start: &Ipv6Addr, &end: &Ipv6Addr) -> (usize, Option) { u128::steps_between(&start.to_bits(), &end.to_bits()) diff --git a/library/core/src/iter/sources/empty.rs b/library/core/src/iter/sources/empty.rs index 1844c76e5df7e..7733c2babc550 100644 --- a/library/core/src/iter/sources/empty.rs +++ b/library/core/src/iter/sources/empty.rs @@ -82,7 +82,7 @@ impl Clone for Empty { // which isn't necessary. #[stable(feature = "iter_empty", since = "1.2.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for Empty { +const impl Default for Empty { fn default() -> Empty { Empty(marker::PhantomData) } diff --git a/library/core/src/iter/traits/collect.rs b/library/core/src/iter/traits/collect.rs index 9c3edfd4192d5..e7e5e30b4eff5 100644 --- a/library/core/src/iter/traits/collect.rs +++ b/library/core/src/iter/traits/collect.rs @@ -314,7 +314,7 @@ pub const trait IntoIterator { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_iter", issue = "92476")] -impl const IntoIterator for I { +const impl IntoIterator for I { type Item = I::Item; type IntoIter = I; diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs index 9e6b02f009837..53141aabacc45 100644 --- a/library/core/src/marker.rs +++ b/library/core/src/marker.rs @@ -856,7 +856,7 @@ unsafe impl TrivialClone for PhantomData {} #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for PhantomData { +const impl Default for PhantomData { fn default() -> Self { Self } diff --git a/library/core/src/mem/alignment.rs b/library/core/src/mem/alignment.rs index a57d8e8535900..08ce7fcd55523 100644 --- a/library/core/src/mem/alignment.rs +++ b/library/core/src/mem/alignment.rs @@ -265,7 +265,7 @@ impl fmt::Debug for Alignment { #[unstable(feature = "ptr_alignment_type", issue = "102070")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const TryFrom> for Alignment { +const impl TryFrom> for Alignment { type Error = num::TryFromIntError; #[inline] @@ -276,7 +276,7 @@ impl const TryFrom> for Alignment { #[unstable(feature = "ptr_alignment_type", issue = "102070")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const TryFrom for Alignment { +const impl TryFrom for Alignment { type Error = num::TryFromIntError; #[inline] @@ -287,7 +287,7 @@ impl const TryFrom for Alignment { #[unstable(feature = "ptr_alignment_type", issue = "102070")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for NonZero { +const impl From for NonZero { #[inline] fn from(align: Alignment) -> NonZero { align.as_nonzero_usize() @@ -296,7 +296,7 @@ impl const From for NonZero { #[unstable(feature = "ptr_alignment_type", issue = "102070")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for usize { +const impl From for usize { #[inline] fn from(align: Alignment) -> usize { align.as_usize() @@ -305,7 +305,7 @@ impl const From for usize { #[unstable(feature = "ptr_alignment_type", issue = "102070")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const cmp::Ord for Alignment { +const impl cmp::Ord for Alignment { #[inline] fn cmp(&self, other: &Self) -> cmp::Ordering { self.as_nonzero_usize().cmp(&other.as_nonzero_usize()) @@ -314,7 +314,7 @@ impl const cmp::Ord for Alignment { #[unstable(feature = "ptr_alignment_type", issue = "102070")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const cmp::PartialOrd for Alignment { +const impl cmp::PartialOrd for Alignment { #[inline] fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) @@ -332,7 +332,7 @@ impl hash::Hash for Alignment { /// Returns [`Alignment::MIN`], which is valid for any type. #[unstable(feature = "ptr_alignment_type", issue = "102070")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for Alignment { +const impl Default for Alignment { fn default() -> Alignment { Alignment::MIN } diff --git a/library/core/src/mem/drop_guard.rs b/library/core/src/mem/drop_guard.rs index 74bf353907455..70658f0efb242 100644 --- a/library/core/src/mem/drop_guard.rs +++ b/library/core/src/mem/drop_guard.rs @@ -109,7 +109,7 @@ where #[unstable(feature = "drop_guard", issue = "144426")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const Deref for DropGuard +const impl Deref for DropGuard where F: FnOnce(T), { @@ -122,7 +122,7 @@ where #[unstable(feature = "drop_guard", issue = "144426")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const DerefMut for DropGuard +const impl DerefMut for DropGuard where F: FnOnce(T), { @@ -133,7 +133,7 @@ where #[unstable(feature = "drop_guard", issue = "144426")] #[rustc_const_unstable(feature = "const_drop_guard", issue = "none")] -impl const Drop for DropGuard +const impl Drop for DropGuard where F: [const] FnOnce(T), { diff --git a/library/core/src/mem/manually_drop.rs b/library/core/src/mem/manually_drop.rs index ca008a82ee6f0..4616c3dc4a373 100644 --- a/library/core/src/mem/manually_drop.rs +++ b/library/core/src/mem/manually_drop.rs @@ -270,7 +270,7 @@ impl ManuallyDrop { #[stable(feature = "manually_drop", since = "1.20.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const Deref for ManuallyDrop { +const impl Deref for ManuallyDrop { type Target = T; #[inline(always)] fn deref(&self) -> &T { @@ -280,7 +280,7 @@ impl const Deref for ManuallyDrop { #[stable(feature = "manually_drop", since = "1.20.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const DerefMut for ManuallyDrop { +const impl DerefMut for ManuallyDrop { #[inline(always)] fn deref_mut(&mut self) -> &mut T { self.value.as_mut() diff --git a/library/core/src/net/ip_addr.rs b/library/core/src/net/ip_addr.rs index db94f52c4e8d7..f2d91b9cec649 100644 --- a/library/core/src/net/ip_addr.rs +++ b/library/core/src/net/ip_addr.rs @@ -1136,7 +1136,7 @@ impl fmt::Debug for IpAddr { #[stable(feature = "ip_from_ip", since = "1.16.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for IpAddr { +const impl From for IpAddr { /// Copies this address to a new `IpAddr::V4`. /// /// # Examples @@ -1159,7 +1159,7 @@ impl const From for IpAddr { #[stable(feature = "ip_from_ip", since = "1.16.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for IpAddr { +const impl From for IpAddr { /// Copies this address to a new `IpAddr::V6`. /// /// # Examples @@ -1232,7 +1232,7 @@ impl PartialEq for Ipv4Addr { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialOrd for Ipv4Addr { +const impl PartialOrd for Ipv4Addr { #[inline] fn partial_cmp(&self, other: &Ipv4Addr) -> Option { Some(self.cmp(other)) @@ -1263,7 +1263,7 @@ impl PartialOrd for Ipv4Addr { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const Ord for Ipv4Addr { +const impl Ord for Ipv4Addr { #[inline] fn cmp(&self, other: &Ipv4Addr) -> Ordering { self.octets.cmp(&other.octets) @@ -1272,7 +1272,7 @@ impl const Ord for Ipv4Addr { #[stable(feature = "ip_u32", since = "1.1.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for u32 { +const impl From for u32 { /// Uses [`Ipv4Addr::to_bits`] to convert an IPv4 address to a host byte order `u32`. #[inline] fn from(ip: Ipv4Addr) -> u32 { @@ -1282,7 +1282,7 @@ impl const From for u32 { #[stable(feature = "ip_u32", since = "1.1.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for Ipv4Addr { +const impl From for Ipv4Addr { /// Uses [`Ipv4Addr::from_bits`] to convert a host byte order `u32` into an IPv4 address. #[inline] fn from(ip: u32) -> Ipv4Addr { @@ -1292,7 +1292,7 @@ impl const From for Ipv4Addr { #[stable(feature = "from_slice_v4", since = "1.9.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From<[u8; 4]> for Ipv4Addr { +const impl From<[u8; 4]> for Ipv4Addr { /// Creates an `Ipv4Addr` from a four element byte array. /// /// # Examples @@ -1311,7 +1311,7 @@ impl const From<[u8; 4]> for Ipv4Addr { #[stable(feature = "ip_from_slice", since = "1.17.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From<[u8; 4]> for IpAddr { +const impl From<[u8; 4]> for IpAddr { /// Creates an `IpAddr::V4` from a four element byte array. /// /// # Examples @@ -2237,7 +2237,7 @@ impl PartialEq for IpAddr { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialOrd for Ipv6Addr { +const impl PartialOrd for Ipv6Addr { #[inline] fn partial_cmp(&self, other: &Ipv6Addr) -> Option { Some(self.cmp(other)) @@ -2268,7 +2268,7 @@ impl PartialOrd for Ipv6Addr { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const Ord for Ipv6Addr { +const impl Ord for Ipv6Addr { #[inline] fn cmp(&self, other: &Ipv6Addr) -> Ordering { self.segments().cmp(&other.segments()) @@ -2277,7 +2277,7 @@ impl const Ord for Ipv6Addr { #[stable(feature = "i128", since = "1.26.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for u128 { +const impl From for u128 { /// Uses [`Ipv6Addr::to_bits`] to convert an IPv6 address to a host byte order `u128`. #[inline] fn from(ip: Ipv6Addr) -> u128 { @@ -2286,7 +2286,7 @@ impl const From for u128 { } #[stable(feature = "i128", since = "1.26.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for Ipv6Addr { +const impl From for Ipv6Addr { /// Uses [`Ipv6Addr::from_bits`] to convert a host byte order `u128` to an IPv6 address. #[inline] fn from(ip: u128) -> Ipv6Addr { @@ -2296,7 +2296,7 @@ impl const From for Ipv6Addr { #[stable(feature = "ipv6_from_octets", since = "1.9.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From<[u8; 16]> for Ipv6Addr { +const impl From<[u8; 16]> for Ipv6Addr { /// Creates an `Ipv6Addr` from a sixteen element byte array. /// /// # Examples @@ -2324,7 +2324,7 @@ impl const From<[u8; 16]> for Ipv6Addr { #[stable(feature = "ipv6_from_segments", since = "1.16.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From<[u16; 8]> for Ipv6Addr { +const impl From<[u16; 8]> for Ipv6Addr { /// Creates an `Ipv6Addr` from an eight element 16-bit array. /// /// # Examples @@ -2353,7 +2353,7 @@ impl const From<[u16; 8]> for Ipv6Addr { #[stable(feature = "ip_from_slice", since = "1.17.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From<[u8; 16]> for IpAddr { +const impl From<[u8; 16]> for IpAddr { /// Creates an `IpAddr::V6` from a sixteen element byte array. /// /// # Examples @@ -2381,7 +2381,7 @@ impl const From<[u8; 16]> for IpAddr { #[stable(feature = "ip_from_slice", since = "1.17.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From<[u16; 8]> for IpAddr { +const impl From<[u16; 8]> for IpAddr { /// Creates an `IpAddr::V6` from an eight element 16-bit array. /// /// # Examples @@ -2409,7 +2409,7 @@ impl const From<[u16; 8]> for IpAddr { #[stable(feature = "ip_bitops", since = "1.75.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] -impl const Not for Ipv4Addr { +const impl Not for Ipv4Addr { type Output = Ipv4Addr; #[inline] @@ -2425,7 +2425,7 @@ impl const Not for Ipv4Addr { #[stable(feature = "ip_bitops", since = "1.75.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] -impl const Not for &'_ Ipv4Addr { +const impl Not for &'_ Ipv4Addr { type Output = Ipv4Addr; #[inline] @@ -2436,7 +2436,7 @@ impl const Not for &'_ Ipv4Addr { #[stable(feature = "ip_bitops", since = "1.75.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] -impl const Not for Ipv6Addr { +const impl Not for Ipv6Addr { type Output = Ipv6Addr; #[inline] @@ -2452,7 +2452,7 @@ impl const Not for Ipv6Addr { #[stable(feature = "ip_bitops", since = "1.75.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] -impl const Not for &'_ Ipv6Addr { +const impl Not for &'_ Ipv6Addr { type Output = Ipv6Addr; #[inline] diff --git a/library/core/src/net/socket_addr.rs b/library/core/src/net/socket_addr.rs index ccc53c156d3a1..4f126b23f475a 100644 --- a/library/core/src/net/socket_addr.rs +++ b/library/core/src/net/socket_addr.rs @@ -593,7 +593,7 @@ impl SocketAddrV6 { #[stable(feature = "ip_from_ip", since = "1.16.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for SocketAddr { +const impl From for SocketAddr { /// Converts a [`SocketAddrV4`] into a [`SocketAddr::V4`]. #[inline] fn from(sock4: SocketAddrV4) -> SocketAddr { @@ -603,7 +603,7 @@ impl const From for SocketAddr { #[stable(feature = "ip_from_ip", since = "1.16.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for SocketAddr { +const impl From for SocketAddr { /// Converts a [`SocketAddrV6`] into a [`SocketAddr::V6`]. #[inline] fn from(sock6: SocketAddrV6) -> SocketAddr { @@ -613,7 +613,7 @@ impl const From for SocketAddr { #[stable(feature = "addr_from_into_ip", since = "1.17.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl> const From<(I, u16)> for SocketAddr { +const impl> From<(I, u16)> for SocketAddr { /// Converts a tuple struct (Into<[`IpAddr`]>, `u16`) into a [`SocketAddr`]. /// /// This conversion creates a [`SocketAddr::V4`] for an [`IpAddr::V4`] diff --git a/library/core/src/num/error.rs b/library/core/src/num/error.rs index 8cd065630cd88..d8d66cfc9b08c 100644 --- a/library/core/src/num/error.rs +++ b/library/core/src/num/error.rs @@ -30,7 +30,7 @@ impl Error for TryFromIntError {} #[stable(feature = "try_from", since = "1.34.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for TryFromIntError { +const impl From for TryFromIntError { fn from(x: Infallible) -> TryFromIntError { match x {} } @@ -38,7 +38,7 @@ impl const From for TryFromIntError { #[unstable(feature = "never_type", issue = "35121")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for TryFromIntError { +const impl From for TryFromIntError { #[inline] fn from(never: !) -> TryFromIntError { // Match rather than coerce to make sure that code like diff --git a/library/core/src/num/niche_types.rs b/library/core/src/num/niche_types.rs index 33b2a6741abdf..df1cdf0e65fa1 100644 --- a/library/core/src/num/niche_types.rs +++ b/library/core/src/num/niche_types.rs @@ -103,7 +103,7 @@ impl Nanoseconds { } #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for Nanoseconds { +const impl Default for Nanoseconds { #[inline] fn default() -> Self { Self::ZERO diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs index 063657503bb8a..de2d10aebdff9 100644 --- a/library/core/src/num/nonzero.rs +++ b/library/core/src/num/nonzero.rs @@ -185,7 +185,7 @@ impl_nonzero_auto_trait!(UnwindSafe); #[stable(feature = "nonzero", since = "1.28.0")] #[rustc_const_unstable(feature = "const_clone", issue = "142757")] -impl const Clone for NonZero +const impl Clone for NonZero where T: ZeroablePrimitive, { @@ -204,11 +204,11 @@ impl Copy for NonZero where T: ZeroablePrimitive {} #[doc(hidden)] #[unstable(feature = "trivial_clone", issue = "none")] #[rustc_const_unstable(feature = "const_clone", issue = "142757")] -unsafe impl const TrivialClone for NonZero where T: ZeroablePrimitive {} +const unsafe impl TrivialClone for NonZero where T: ZeroablePrimitive {} #[stable(feature = "nonzero", since = "1.28.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialEq for NonZero +const impl PartialEq for NonZero where T: ZeroablePrimitive + [const] PartialEq, { @@ -228,11 +228,11 @@ impl StructuralPartialEq for NonZero where T: ZeroablePrimitive + Structur #[stable(feature = "nonzero", since = "1.28.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const Eq for NonZero where T: ZeroablePrimitive + [const] Eq {} +const impl Eq for NonZero where T: ZeroablePrimitive + [const] Eq {} #[stable(feature = "nonzero", since = "1.28.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialOrd for NonZero +const impl PartialOrd for NonZero where T: ZeroablePrimitive + [const] PartialOrd, { @@ -264,7 +264,7 @@ where #[stable(feature = "nonzero", since = "1.28.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const Ord for NonZero +const impl Ord for NonZero where // FIXME(const_hack): the T: ~const Destruct should be inferred from the Self: ~const Destruct. // See https://github.com/rust-lang/rust/issues/144207 @@ -310,7 +310,7 @@ where #[stable(feature = "from_nonzero", since = "1.31.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From> for T +const impl From> for T where T: ZeroablePrimitive, { @@ -323,7 +323,7 @@ where #[stable(feature = "nonzero_bitor", since = "1.45.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] -impl const BitOr for NonZero +const impl BitOr for NonZero where T: ZeroablePrimitive + [const] BitOr, { @@ -338,7 +338,7 @@ where #[stable(feature = "nonzero_bitor", since = "1.45.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] -impl const BitOr for NonZero +const impl BitOr for NonZero where T: ZeroablePrimitive + [const] BitOr, { @@ -353,7 +353,7 @@ where #[stable(feature = "nonzero_bitor", since = "1.45.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] -impl const BitOr> for T +const impl BitOr> for T where T: ZeroablePrimitive + [const] BitOr, { @@ -368,7 +368,7 @@ where #[stable(feature = "nonzero_bitor", since = "1.45.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] -impl const BitOrAssign for NonZero +const impl BitOrAssign for NonZero where T: ZeroablePrimitive, Self: [const] BitOr, @@ -381,7 +381,7 @@ where #[stable(feature = "nonzero_bitor", since = "1.45.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] -impl const BitOrAssign for NonZero +const impl BitOrAssign for NonZero where T: ZeroablePrimitive, Self: [const] BitOr, @@ -1479,7 +1479,7 @@ macro_rules! nonzero_integer_signedness_dependent_impls { (unsigned $Int:ty) => { #[stable(feature = "nonzero_div", since = "1.51.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] - impl const Div> for $Int { + const impl Div> for $Int { type Output = $Int; /// Same as `self / other.get()`, but because `other` is a `NonZero<_>`, @@ -1498,7 +1498,7 @@ macro_rules! nonzero_integer_signedness_dependent_impls { #[stable(feature = "nonzero_div_assign", since = "1.79.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] - impl const DivAssign> for $Int { + const impl DivAssign> for $Int { /// Same as `self /= other.get()`, but because `other` is a `NonZero<_>`, /// there's never a runtime check for division-by-zero. /// @@ -1512,7 +1512,7 @@ macro_rules! nonzero_integer_signedness_dependent_impls { #[stable(feature = "nonzero_div", since = "1.51.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] - impl const Rem> for $Int { + const impl Rem> for $Int { type Output = $Int; /// This operation satisfies `n % d == n - (n / d) * d`, and cannot panic. @@ -1526,7 +1526,7 @@ macro_rules! nonzero_integer_signedness_dependent_impls { #[stable(feature = "nonzero_div_assign", since = "1.79.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] - impl const RemAssign> for $Int { + const impl RemAssign> for $Int { /// This operation satisfies `n % d == n - (n / d) * d`, and cannot panic. #[inline] fn rem_assign(&mut self, other: NonZero<$Int>) { @@ -1567,7 +1567,7 @@ macro_rules! nonzero_integer_signedness_dependent_impls { (signed $Int:ty) => { #[stable(feature = "signed_nonzero_neg", since = "1.71.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] - impl const Neg for NonZero<$Int> { + const impl Neg for NonZero<$Int> { type Output = Self; #[inline] diff --git a/library/core/src/num/wrapping.rs b/library/core/src/num/wrapping.rs index 881fe615f800f..68c5baf15fb9f 100644 --- a/library/core/src/num/wrapping.rs +++ b/library/core/src/num/wrapping.rs @@ -89,7 +89,7 @@ macro_rules! sh_impl_signed { ($t:ident, $f:ident) => { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] - impl const Shl<$f> for Wrapping<$t> { + const impl Shl<$f> for Wrapping<$t> { type Output = Wrapping<$t>; #[inline] @@ -107,7 +107,7 @@ macro_rules! sh_impl_signed { #[stable(feature = "op_assign_traits", since = "1.8.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] - impl const ShlAssign<$f> for Wrapping<$t> { + const impl ShlAssign<$f> for Wrapping<$t> { #[inline] fn shl_assign(&mut self, other: $f) { *self = *self << other; @@ -119,7 +119,7 @@ macro_rules! sh_impl_signed { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] - impl const Shr<$f> for Wrapping<$t> { + const impl Shr<$f> for Wrapping<$t> { type Output = Wrapping<$t>; #[inline] @@ -137,7 +137,7 @@ macro_rules! sh_impl_signed { #[stable(feature = "op_assign_traits", since = "1.8.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] - impl const ShrAssign<$f> for Wrapping<$t> { + const impl ShrAssign<$f> for Wrapping<$t> { #[inline] fn shr_assign(&mut self, other: $f) { *self = *self >> other; @@ -153,7 +153,7 @@ macro_rules! sh_impl_unsigned { ($t:ident, $f:ident) => { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] - impl const Shl<$f> for Wrapping<$t> { + const impl Shl<$f> for Wrapping<$t> { type Output = Wrapping<$t>; #[inline] @@ -167,7 +167,7 @@ macro_rules! sh_impl_unsigned { #[stable(feature = "op_assign_traits", since = "1.8.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] - impl const ShlAssign<$f> for Wrapping<$t> { + const impl ShlAssign<$f> for Wrapping<$t> { #[inline] fn shl_assign(&mut self, other: $f) { *self = *self << other; @@ -179,7 +179,7 @@ macro_rules! sh_impl_unsigned { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] - impl const Shr<$f> for Wrapping<$t> { + const impl Shr<$f> for Wrapping<$t> { type Output = Wrapping<$t>; #[inline] @@ -193,7 +193,7 @@ macro_rules! sh_impl_unsigned { #[stable(feature = "op_assign_traits", since = "1.8.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] - impl const ShrAssign<$f> for Wrapping<$t> { + const impl ShrAssign<$f> for Wrapping<$t> { #[inline] fn shr_assign(&mut self, other: $f) { *self = *self >> other; diff --git a/library/core/src/ops/bit.rs b/library/core/src/ops/bit.rs index e347a20d2d869..b6daa0f751a31 100644 --- a/library/core/src/ops/bit.rs +++ b/library/core/src/ops/bit.rs @@ -73,7 +73,7 @@ not_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 } #[stable(feature = "not_never", since = "1.60.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] -impl const Not for ! { +const impl Not for ! { type Output = !; #[inline] @@ -480,7 +480,7 @@ macro_rules! shl_impl { ($t:ty, $f:ty) => { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] - impl const Shl<$f> for $t { + const impl Shl<$f> for $t { type Output = $t; #[inline] @@ -603,7 +603,7 @@ macro_rules! shr_impl { ($t:ty, $f:ty) => { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] - impl const Shr<$f> for $t { + const impl Shr<$f> for $t { type Output = $t; #[inline] @@ -958,7 +958,7 @@ macro_rules! shl_assign_impl { ($t:ty, $f:ty) => { #[stable(feature = "op_assign_traits", since = "1.8.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] - impl const ShlAssign<$f> for $t { + const impl ShlAssign<$f> for $t { #[inline] #[track_caller] #[rustc_inherit_overflow_checks] @@ -1045,7 +1045,7 @@ macro_rules! shr_assign_impl { ($t:ty, $f:ty) => { #[stable(feature = "op_assign_traits", since = "1.8.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] - impl const ShrAssign<$f> for $t { + const impl ShrAssign<$f> for $t { #[inline] #[track_caller] #[rustc_inherit_overflow_checks] diff --git a/library/core/src/ops/control_flow.rs b/library/core/src/ops/control_flow.rs index 5f8974133a94e..6fa723ea84fd7 100644 --- a/library/core/src/ops/control_flow.rs +++ b/library/core/src/ops/control_flow.rs @@ -102,7 +102,7 @@ pub enum ControlFlow { #[unstable(feature = "try_trait_v2", issue = "84277", old_name = "try_trait")] #[rustc_const_unstable(feature = "const_try", issue = "74935")] -impl const ops::Try for ControlFlow { +const impl ops::Try for ControlFlow { type Output = C; type Residual = ControlFlow; @@ -124,7 +124,7 @@ impl const ops::Try for ControlFlow { #[rustc_const_unstable(feature = "const_try", issue = "74935")] // Note: manually specifying the residual type instead of using the default to work around // https://github.com/rust-lang/rust/issues/99940 -impl const ops::FromResidual> for ControlFlow { +const impl ops::FromResidual> for ControlFlow { #[inline] fn from_residual(residual: ControlFlow) -> Self { match residual { @@ -135,7 +135,7 @@ impl const ops::FromResidual> for Cont #[unstable(feature = "try_trait_v2_residual", issue = "91285")] #[rustc_const_unstable(feature = "const_try_residual", issue = "91285")] -impl const ops::Residual for ControlFlow { +const impl ops::Residual for ControlFlow { type TryType = ControlFlow; } diff --git a/library/core/src/ops/deref.rs b/library/core/src/ops/deref.rs index e46204c6246ab..58bf0e2d73b97 100644 --- a/library/core/src/ops/deref.rs +++ b/library/core/src/ops/deref.rs @@ -152,7 +152,7 @@ pub const trait Deref: PointeeSized { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const Deref for &T { +const impl Deref for &T { type Target = T; #[rustc_diagnostic_item = "noop_method_deref"] @@ -166,7 +166,7 @@ impl !DerefMut for &T {} #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const Deref for &mut T { +const impl Deref for &mut T { type Target = T; fn deref(&self) -> &T { @@ -276,7 +276,7 @@ pub const trait DerefMut: [const] Deref + PointeeSized { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const DerefMut for &mut T { +const impl DerefMut for &mut T { fn deref_mut(&mut self) -> &mut T { self } diff --git a/library/core/src/ops/function.rs b/library/core/src/ops/function.rs index 57b41e6ad6ccd..25664a51a1d7b 100644 --- a/library/core/src/ops/function.rs +++ b/library/core/src/ops/function.rs @@ -255,7 +255,7 @@ mod impls { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")] - impl const Fn for &F + const impl Fn for &F where F: [const] Fn, { @@ -266,7 +266,7 @@ mod impls { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")] - impl const FnMut for &F + const impl FnMut for &F where F: [const] Fn, { @@ -277,7 +277,7 @@ mod impls { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")] - impl const FnOnce for &F + const impl FnOnce for &F where F: [const] Fn, { @@ -290,7 +290,7 @@ mod impls { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")] - impl const FnMut for &mut F + const impl FnMut for &mut F where F: [const] FnMut, { @@ -301,7 +301,7 @@ mod impls { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")] - impl const FnOnce for &mut F + const impl FnOnce for &mut F where F: [const] FnMut, { diff --git a/library/core/src/ops/range.rs b/library/core/src/ops/range.rs index c15c8f20c16be..1875aca947098 100644 --- a/library/core/src/ops/range.rs +++ b/library/core/src/ops/range.rs @@ -1045,7 +1045,7 @@ use self::Bound::{Excluded, Included, Unbounded}; #[stable(feature = "collections_range", since = "1.28.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const RangeBounds for RangeFull { +const impl RangeBounds for RangeFull { fn start_bound(&self) -> Bound<&T> { Unbounded } @@ -1056,7 +1056,7 @@ impl const RangeBounds for RangeFull { #[unstable(feature = "range_into_bounds", issue = "136903")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const IntoBounds for RangeFull { +const impl IntoBounds for RangeFull { fn into_bounds(self) -> (Bound, Bound) { (Unbounded, Unbounded) } @@ -1064,7 +1064,7 @@ impl const IntoBounds for RangeFull { #[stable(feature = "collections_range", since = "1.28.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const RangeBounds for RangeFrom { +const impl RangeBounds for RangeFrom { fn start_bound(&self) -> Bound<&T> { Included(&self.start) } @@ -1075,7 +1075,7 @@ impl const RangeBounds for RangeFrom { #[unstable(feature = "range_into_bounds", issue = "136903")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const IntoBounds for RangeFrom { +const impl IntoBounds for RangeFrom { fn into_bounds(self) -> (Bound, Bound) { (Included(self.start), Unbounded) } @@ -1083,7 +1083,7 @@ impl const IntoBounds for RangeFrom { #[stable(feature = "collections_range", since = "1.28.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const RangeBounds for RangeTo { +const impl RangeBounds for RangeTo { fn start_bound(&self) -> Bound<&T> { Unbounded } @@ -1094,7 +1094,7 @@ impl const RangeBounds for RangeTo { #[unstable(feature = "range_into_bounds", issue = "136903")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const IntoBounds for RangeTo { +const impl IntoBounds for RangeTo { fn into_bounds(self) -> (Bound, Bound) { (Unbounded, Excluded(self.end)) } @@ -1102,7 +1102,7 @@ impl const IntoBounds for RangeTo { #[stable(feature = "collections_range", since = "1.28.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const RangeBounds for Range { +const impl RangeBounds for Range { fn start_bound(&self) -> Bound<&T> { Included(&self.start) } @@ -1113,7 +1113,7 @@ impl const RangeBounds for Range { #[unstable(feature = "range_into_bounds", issue = "136903")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const IntoBounds for Range { +const impl IntoBounds for Range { fn into_bounds(self) -> (Bound, Bound) { (Included(self.start), Excluded(self.end)) } @@ -1121,7 +1121,7 @@ impl const IntoBounds for Range { #[stable(feature = "collections_range", since = "1.28.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const RangeBounds for RangeInclusive { +const impl RangeBounds for RangeInclusive { fn start_bound(&self) -> Bound<&T> { Included(&self.start) } @@ -1138,7 +1138,7 @@ impl const RangeBounds for RangeInclusive { #[unstable(feature = "range_into_bounds", issue = "136903")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const IntoBounds for RangeInclusive { +const impl IntoBounds for RangeInclusive { fn into_bounds(self) -> (Bound, Bound) { ( Included(self.start), @@ -1155,7 +1155,7 @@ impl const IntoBounds for RangeInclusive { #[stable(feature = "collections_range", since = "1.28.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const RangeBounds for RangeToInclusive { +const impl RangeBounds for RangeToInclusive { fn start_bound(&self) -> Bound<&T> { Unbounded } @@ -1166,7 +1166,7 @@ impl const RangeBounds for RangeToInclusive { #[unstable(feature = "range_into_bounds", issue = "136903")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const IntoBounds for RangeToInclusive { +const impl IntoBounds for RangeToInclusive { fn into_bounds(self) -> (Bound, Bound) { (Unbounded, Included(self.end)) } @@ -1174,7 +1174,7 @@ impl const IntoBounds for RangeToInclusive { #[stable(feature = "collections_range", since = "1.28.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const RangeBounds for (Bound, Bound) { +const impl RangeBounds for (Bound, Bound) { fn start_bound(&self) -> Bound<&T> { match *self { (Included(ref start), _) => Included(start), @@ -1194,7 +1194,7 @@ impl const RangeBounds for (Bound, Bound) { #[unstable(feature = "range_into_bounds", issue = "136903")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const IntoBounds for (Bound, Bound) { +const impl IntoBounds for (Bound, Bound) { fn into_bounds(self) -> (Bound, Bound) { self } @@ -1202,7 +1202,7 @@ impl const IntoBounds for (Bound, Bound) { #[stable(feature = "collections_range", since = "1.28.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl<'a, T: ?Sized + 'a> const RangeBounds for (Bound<&'a T>, Bound<&'a T>) { +const impl<'a, T: ?Sized + 'a> RangeBounds for (Bound<&'a T>, Bound<&'a T>) { fn start_bound(&self) -> Bound<&T> { self.0 } @@ -1220,7 +1220,7 @@ impl<'a, T: ?Sized + 'a> const RangeBounds for (Bound<&'a T>, Bound<&'a T>) { /// i.e. replace `start..` with `(Bound::Included(start), Bound::Unbounded)`. #[stable(feature = "collections_range", since = "1.28.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const RangeBounds for RangeFrom<&T> { +const impl RangeBounds for RangeFrom<&T> { fn start_bound(&self) -> Bound<&T> { Included(self.start) } @@ -1237,7 +1237,7 @@ impl const RangeBounds for RangeFrom<&T> { /// i.e. replace `..end` with `(Bound::Unbounded, Bound::Excluded(end))`. #[stable(feature = "collections_range", since = "1.28.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const RangeBounds for RangeTo<&T> { +const impl RangeBounds for RangeTo<&T> { fn start_bound(&self) -> Bound<&T> { Unbounded } @@ -1254,7 +1254,7 @@ impl const RangeBounds for RangeTo<&T> { /// i.e. replace `start..end` with `(Bound::Included(start), Bound::Excluded(end))`. #[stable(feature = "collections_range", since = "1.28.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const RangeBounds for Range<&T> { +const impl RangeBounds for Range<&T> { fn start_bound(&self) -> Bound<&T> { Included(self.start) } @@ -1271,7 +1271,7 @@ impl const RangeBounds for Range<&T> { /// i.e. replace `start..=end` with `(Bound::Included(start), Bound::Included(end))`. #[stable(feature = "collections_range", since = "1.28.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const RangeBounds for RangeInclusive<&T> { +const impl RangeBounds for RangeInclusive<&T> { fn start_bound(&self) -> Bound<&T> { Included(self.start) } @@ -1288,7 +1288,7 @@ impl const RangeBounds for RangeInclusive<&T> { /// i.e. replace `..=end` with `(Bound::Unbounded, Bound::Included(end))`. #[stable(feature = "collections_range", since = "1.28.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const RangeBounds for RangeToInclusive<&T> { +const impl RangeBounds for RangeToInclusive<&T> { fn start_bound(&self) -> Bound<&T> { Unbounded } @@ -1326,7 +1326,7 @@ pub const trait OneSidedRange: RangeBounds { #[unstable(feature = "one_sided_range", issue = "69780")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const OneSidedRange for RangeTo +const impl OneSidedRange for RangeTo where Self: RangeBounds, { @@ -1337,7 +1337,7 @@ where #[unstable(feature = "one_sided_range", issue = "69780")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const OneSidedRange for RangeFrom +const impl OneSidedRange for RangeFrom where Self: RangeBounds, { @@ -1348,7 +1348,7 @@ where #[unstable(feature = "one_sided_range", issue = "69780")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const OneSidedRange for RangeToInclusive +const impl OneSidedRange for RangeToInclusive where Self: RangeBounds, { diff --git a/library/core/src/ops/try_trait.rs b/library/core/src/ops/try_trait.rs index aaa71786854da..a0f919a33e12d 100644 --- a/library/core/src/ops/try_trait.rs +++ b/library/core/src/ops/try_trait.rs @@ -424,7 +424,7 @@ impl NeverShortCircuit { pub(crate) enum NeverShortCircuitResidual {} #[rustc_const_unstable(feature = "const_never_short_circuit", issue = "none")] -impl const Try for NeverShortCircuit { +const impl Try for NeverShortCircuit { type Output = T; type Residual = NeverShortCircuitResidual; @@ -439,14 +439,14 @@ impl const Try for NeverShortCircuit { } } #[rustc_const_unstable(feature = "const_never_short_circuit", issue = "none")] -impl const FromResidual for NeverShortCircuit { +const impl FromResidual for NeverShortCircuit { #[inline] fn from_residual(never: NeverShortCircuitResidual) -> Self { match never {} } } #[rustc_const_unstable(feature = "const_never_short_circuit", issue = "none")] -impl const Residual for NeverShortCircuitResidual { +const impl Residual for NeverShortCircuitResidual { type TryType = NeverShortCircuit; } diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 02cd88a6a4340..8310ee29374f5 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -2263,7 +2263,7 @@ const fn expect_failed(msg: &str) -> ! { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_clone", issue = "142757")] -impl const Clone for Option +const impl Clone for Option where // FIXME(const_hack): the T: [const] Destruct should be inferred from the Self: [const] Destruct in clone_from. // See https://github.com/rust-lang/rust/issues/144207 @@ -2292,11 +2292,11 @@ impl crate::clone::UseCloned for Option where T: crate::clone::UseCloned { #[doc(hidden)] #[unstable(feature = "trivial_clone", issue = "none")] #[rustc_const_unstable(feature = "const_clone", issue = "142757")] -unsafe impl const TrivialClone for Option where T: [const] TrivialClone + [const] Destruct {} +const unsafe impl TrivialClone for Option where T: [const] TrivialClone + [const] Destruct {} #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for Option { +const impl Default for Option { /// Returns [`None`][Option::None]. /// /// # Examples @@ -2313,7 +2313,7 @@ impl const Default for Option { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_iter", issue = "92476")] -impl const IntoIterator for Option { +const impl IntoIterator for Option { type Item = T; type IntoIter = IntoIter; @@ -2358,7 +2358,7 @@ impl<'a, T> IntoIterator for &'a mut Option { #[stable(since = "1.12.0", feature = "option_from")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for Option { +const impl From for Option { /// Moves `val` into a new [`Some`]. /// /// # Examples @@ -2375,7 +2375,7 @@ impl const From for Option { #[stable(feature = "option_ref_from_ref_option", since = "1.30.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl<'a, T> const From<&'a Option> for Option<&'a T> { +const impl<'a, T> From<&'a Option> for Option<&'a T> { /// Converts from `&Option` to `Option<&T>`. /// /// # Examples @@ -2403,7 +2403,7 @@ impl<'a, T> const From<&'a Option> for Option<&'a T> { #[stable(feature = "option_ref_from_ref_option", since = "1.30.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl<'a, T> const From<&'a mut Option> for Option<&'a mut T> { +const impl<'a, T> From<&'a mut Option> for Option<&'a mut T> { /// Converts from `&mut Option` to `Option<&mut T>` /// /// # Examples @@ -2431,7 +2431,7 @@ impl<'a, T> const From<&'a mut Option> for Option<&'a mut T> { impl crate::marker::StructuralPartialEq for Option {} #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialEq for Option { +const impl PartialEq for Option { #[inline] fn eq(&self, other: &Self) -> bool { // Spelling out the cases explicitly optimizes better than @@ -2450,7 +2450,7 @@ impl const PartialEq for Option { // not optimal. #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialOrd for Option { +const impl PartialOrd for Option { #[inline] fn partial_cmp(&self, other: &Self) -> Option { match (self, other) { @@ -2464,7 +2464,7 @@ impl const PartialOrd for Option { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const Ord for Option { +const impl Ord for Option { #[inline] fn cmp(&self, other: &Self) -> cmp::Ordering { match (self, other) { @@ -2486,7 +2486,7 @@ struct Item { } #[rustc_const_unstable(feature = "const_iter", issue = "92476")] -impl const Iterator for Item { +const impl Iterator for Item { type Item = A; #[inline] @@ -2621,7 +2621,7 @@ pub struct IntoIter { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_iter", issue = "92476")] -impl const Iterator for IntoIter { +const impl Iterator for IntoIter { type Item = A; #[inline] @@ -2761,7 +2761,7 @@ impl> FromIterator> for Option { #[unstable(feature = "try_trait_v2", issue = "84277", old_name = "try_trait")] #[rustc_const_unstable(feature = "const_try", issue = "74935")] -impl const ops::Try for Option { +const impl ops::Try for Option { type Output = T; type Residual = Option; @@ -2783,7 +2783,7 @@ impl const ops::Try for Option { #[rustc_const_unstable(feature = "const_try", issue = "74935")] // Note: manually specifying the residual type instead of using the default to work around // https://github.com/rust-lang/rust/issues/99940 -impl const ops::FromResidual> for Option { +const impl ops::FromResidual> for Option { #[inline] fn from_residual(residual: Option) -> Self { match residual { @@ -2795,7 +2795,7 @@ impl const ops::FromResidual> for Option { #[diagnostic::do_not_recommend] #[unstable(feature = "try_trait_v2_yeet", issue = "96374")] #[rustc_const_unstable(feature = "const_try", issue = "74935")] -impl const ops::FromResidual> for Option { +const impl ops::FromResidual> for Option { #[inline] fn from_residual(ops::Yeet(()): ops::Yeet<()>) -> Self { None @@ -2804,7 +2804,7 @@ impl const ops::FromResidual> for Option { #[unstable(feature = "try_trait_v2_residual", issue = "91285")] #[rustc_const_unstable(feature = "const_try", issue = "74935")] -impl const ops::Residual for Option { +const impl ops::Residual for Option { type TryType = Option; } diff --git a/library/core/src/panic/unwind_safe.rs b/library/core/src/panic/unwind_safe.rs index f7f485488e0fe..bf2e61dc541c6 100644 --- a/library/core/src/panic/unwind_safe.rs +++ b/library/core/src/panic/unwind_safe.rs @@ -250,7 +250,7 @@ impl RefUnwindSafe for crate::sync::atomic::AtomicPtr {} #[stable(feature = "catch_unwind", since = "1.9.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const Deref for AssertUnwindSafe { +const impl Deref for AssertUnwindSafe { type Target = T; fn deref(&self) -> &T { @@ -260,7 +260,7 @@ impl const Deref for AssertUnwindSafe { #[stable(feature = "catch_unwind", since = "1.9.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const DerefMut for AssertUnwindSafe { +const impl DerefMut for AssertUnwindSafe { fn deref_mut(&mut self) -> &mut T { &mut self.0 } diff --git a/library/core/src/pat.rs b/library/core/src/pat.rs index 2670c2614198c..77fbea510e782 100644 --- a/library/core/src/pat.rs +++ b/library/core/src/pat.rs @@ -64,7 +64,7 @@ impl_range_pat! { } #[rustc_const_unstable(feature = "pattern_type_range_trait", issue = "123646")] -impl const RangePattern for char { +const impl RangePattern for char { const MIN: Self = char::MIN; const MAX: Self = char::MAX; diff --git a/library/core/src/pin.rs b/library/core/src/pin.rs index f7224df849c8f..40f774806046a 100644 --- a/library/core/src/pin.rs +++ b/library/core/src/pin.rs @@ -1680,7 +1680,7 @@ impl Pin<&'static mut T> { #[stable(feature = "pin", since = "1.33.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const Deref for Pin { +const impl Deref for Pin { type Target = Ptr::Target; fn deref(&self) -> &Ptr::Target { Pin::get_ref(Pin::as_ref(self)) @@ -1723,7 +1723,7 @@ mod helper { #[unstable(feature = "pin_derefmut_internals", issue = "none")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] - impl const PinDerefMutHelper for PinHelper + const impl PinDerefMutHelper for PinHelper where Ptr::Target: crate::marker::Unpin, { @@ -1739,7 +1739,7 @@ mod helper { #[stable(feature = "pin", since = "1.33.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] #[cfg(not(doc))] -impl const DerefMut for Pin +const impl DerefMut for Pin where Ptr: [const] Deref, helper::PinHelper: [const] helper::PinDerefMutHelper, @@ -1765,7 +1765,7 @@ where #[stable(feature = "pin", since = "1.33.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] #[cfg(doc)] -impl const DerefMut for Pin +const impl DerefMut for Pin where Ptr: [const] DerefMut, ::Target: Unpin, diff --git a/library/core/src/pin/unsafe_pinned.rs b/library/core/src/pin/unsafe_pinned.rs index ae03809b4581f..483cf529798b1 100644 --- a/library/core/src/pin/unsafe_pinned.rs +++ b/library/core/src/pin/unsafe_pinned.rs @@ -149,7 +149,7 @@ impl Default for UnsafePinned { #[unstable(feature = "unsafe_pinned", issue = "125735")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for UnsafePinned { +const impl From for UnsafePinned { /// Creates a new `UnsafePinned` containing the given value. fn from(value: T) -> Self { UnsafePinned::new(value) diff --git a/library/core/src/ptr/non_null.rs b/library/core/src/ptr/non_null.rs index b9b42c1efe05a..e2feded1502ac 100644 --- a/library/core/src/ptr/non_null.rs +++ b/library/core/src/ptr/non_null.rs @@ -1743,7 +1743,7 @@ impl hash::Hash for NonNull { #[unstable(feature = "ptr_internals", issue = "none")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From> for NonNull { +const impl From> for NonNull { #[inline] fn from(unique: Unique) -> Self { unique.as_non_null_ptr() @@ -1752,7 +1752,7 @@ impl const From> for NonNull { #[stable(feature = "nonnull", since = "1.25.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From<&mut T> for NonNull { +const impl From<&mut T> for NonNull { /// Converts a `&mut T` to a `NonNull`. /// /// This conversion is safe and infallible since references cannot be null. @@ -1764,7 +1764,7 @@ impl const From<&mut T> for NonNull { #[stable(feature = "nonnull", since = "1.25.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From<&T> for NonNull { +const impl From<&T> for NonNull { /// Converts a `&T` to a `NonNull`. /// /// This conversion is safe and infallible since references cannot be null. diff --git a/library/core/src/ptr/unique.rs b/library/core/src/ptr/unique.rs index 6e55f0e71bec7..dedabf7043cd6 100644 --- a/library/core/src/ptr/unique.rs +++ b/library/core/src/ptr/unique.rs @@ -191,7 +191,7 @@ impl fmt::Pointer for Unique { #[unstable(feature = "ptr_internals", issue = "none")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From<&mut T> for Unique { +const impl From<&mut T> for Unique { /// Converts a `&mut T` to a `Unique`. /// /// This conversion is infallible since references cannot be null. @@ -203,7 +203,7 @@ impl const From<&mut T> for Unique { #[unstable(feature = "ptr_internals", issue = "none")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From> for Unique { +const impl From> for Unique { /// Converts a `NonNull` to a `Unique`. /// /// This conversion is infallible since `NonNull` cannot be null. diff --git a/library/core/src/range.rs b/library/core/src/range.rs index ade9a35b0ab33..87e6ad6931249 100644 --- a/library/core/src/range.rs +++ b/library/core/src/range.rs @@ -176,7 +176,7 @@ impl> Range { #[stable(feature = "new_range_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const RangeBounds for Range { +const impl RangeBounds for Range { fn start_bound(&self) -> Bound<&T> { Included(&self.start) } @@ -193,7 +193,7 @@ impl const RangeBounds for Range { /// i.e. replace `start..end` with `(Bound::Included(start), Bound::Excluded(end))`. #[stable(feature = "new_range_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const RangeBounds for Range<&T> { +const impl RangeBounds for Range<&T> { fn start_bound(&self) -> Bound<&T> { Included(self.start) } @@ -204,7 +204,7 @@ impl const RangeBounds for Range<&T> { #[unstable(feature = "range_into_bounds", issue = "136903")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const IntoBounds for Range { +const impl IntoBounds for Range { fn into_bounds(self) -> (Bound, Bound) { (Included(self.start), Excluded(self.end)) } @@ -212,7 +212,7 @@ impl const IntoBounds for Range { #[stable(feature = "new_range_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From> for legacy::Range { +const impl From> for legacy::Range { #[inline] fn from(value: Range) -> Self { Self { start: value.start, end: value.end } @@ -220,7 +220,7 @@ impl const From> for legacy::Range { } #[stable(feature = "new_range_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From> for Range { +const impl From> for Range { #[inline] fn from(value: legacy::Range) -> Self { Self { start: value.start, end: value.end } @@ -356,7 +356,7 @@ impl RangeInclusive { #[stable(feature = "new_range_inclusive_api", since = "1.95.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const RangeBounds for RangeInclusive { +const impl RangeBounds for RangeInclusive { fn start_bound(&self) -> Bound<&T> { Included(&self.start) } @@ -373,7 +373,7 @@ impl const RangeBounds for RangeInclusive { /// i.e. replace `start..=end` with `(Bound::Included(start), Bound::Included(end))`. #[stable(feature = "new_range_inclusive_api", since = "1.95.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const RangeBounds for RangeInclusive<&T> { +const impl RangeBounds for RangeInclusive<&T> { fn start_bound(&self) -> Bound<&T> { Included(self.start) } @@ -385,7 +385,7 @@ impl const RangeBounds for RangeInclusive<&T> { // #[stable(feature = "new_range_inclusive_api", since = "1.95.0")] #[unstable(feature = "range_into_bounds", issue = "136903")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const IntoBounds for RangeInclusive { +const impl IntoBounds for RangeInclusive { fn into_bounds(self) -> (Bound, Bound) { (Included(self.start), Included(self.last)) } @@ -393,7 +393,7 @@ impl const IntoBounds for RangeInclusive { #[stable(feature = "new_range_inclusive_api", since = "1.95.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From> for legacy::RangeInclusive { +const impl From> for legacy::RangeInclusive { #[inline] fn from(value: RangeInclusive) -> Self { Self::new(value.start, value.last) @@ -401,7 +401,7 @@ impl const From> for legacy::RangeInclusive { } #[stable(feature = "new_range_inclusive_api", since = "1.95.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From> for RangeInclusive { +const impl From> for RangeInclusive { #[inline] fn from(value: legacy::RangeInclusive) -> Self { assert!( @@ -512,7 +512,7 @@ impl> RangeFrom { #[stable(feature = "new_range_from_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const RangeBounds for RangeFrom { +const impl RangeBounds for RangeFrom { fn start_bound(&self) -> Bound<&T> { Included(&self.start) } @@ -529,7 +529,7 @@ impl const RangeBounds for RangeFrom { /// i.e. replace `start..` with `(Bound::Included(start), Bound::Unbounded)`. #[stable(feature = "new_range_from_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const RangeBounds for RangeFrom<&T> { +const impl RangeBounds for RangeFrom<&T> { fn start_bound(&self) -> Bound<&T> { Included(self.start) } @@ -540,7 +540,7 @@ impl const RangeBounds for RangeFrom<&T> { #[unstable(feature = "range_into_bounds", issue = "136903")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const IntoBounds for RangeFrom { +const impl IntoBounds for RangeFrom { fn into_bounds(self) -> (Bound, Bound) { (Included(self.start), Unbounded) } @@ -548,7 +548,7 @@ impl const IntoBounds for RangeFrom { #[unstable(feature = "one_sided_range", issue = "69780")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const OneSidedRange for RangeFrom +const impl OneSidedRange for RangeFrom where Self: RangeBounds, { @@ -559,7 +559,7 @@ where #[stable(feature = "new_range_from_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -impl const From> for legacy::RangeFrom { +const impl From> for legacy::RangeFrom { #[inline] fn from(value: RangeFrom) -> Self { Self { start: value.start } @@ -567,7 +567,7 @@ impl const From> for legacy::RangeFrom { } #[stable(feature = "new_range_from_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -impl const From> for RangeFrom { +const impl From> for RangeFrom { #[inline] fn from(value: legacy::RangeFrom) -> Self { Self { start: value.start } @@ -679,7 +679,7 @@ impl From> for legacy::RangeToInclusive { #[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const RangeBounds for RangeToInclusive { +const impl RangeBounds for RangeToInclusive { fn start_bound(&self) -> Bound<&T> { Unbounded } @@ -690,7 +690,7 @@ impl const RangeBounds for RangeToInclusive { #[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const RangeBounds for RangeToInclusive<&T> { +const impl RangeBounds for RangeToInclusive<&T> { fn start_bound(&self) -> Bound<&T> { Unbounded } @@ -701,7 +701,7 @@ impl const RangeBounds for RangeToInclusive<&T> { #[unstable(feature = "range_into_bounds", issue = "136903")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const IntoBounds for RangeToInclusive { +const impl IntoBounds for RangeToInclusive { fn into_bounds(self) -> (Bound, Bound) { (Unbounded, Included(self.last)) } @@ -709,7 +709,7 @@ impl const IntoBounds for RangeToInclusive { #[unstable(feature = "one_sided_range", issue = "69780")] #[rustc_const_unstable(feature = "const_range", issue = "none")] -impl const OneSidedRange for RangeToInclusive +const impl OneSidedRange for RangeToInclusive where Self: RangeBounds, { diff --git a/library/core/src/result.rs b/library/core/src/result.rs index 5f438d72ac13c..20fbf6314d888 100644 --- a/library/core/src/result.rs +++ b/library/core/src/result.rs @@ -2159,7 +2159,7 @@ impl> FromIterator> for Result { #[unstable(feature = "try_trait_v2", issue = "84277", old_name = "try_trait")] #[rustc_const_unstable(feature = "const_try", issue = "74935")] -impl const ops::Try for Result { +const impl ops::Try for Result { type Output = T; type Residual = Result; @@ -2179,7 +2179,7 @@ impl const ops::Try for Result { #[unstable(feature = "try_trait_v2", issue = "84277", old_name = "try_trait")] #[rustc_const_unstable(feature = "const_try", issue = "74935")] -impl> const ops::FromResidual> +const impl> ops::FromResidual> for Result { #[inline] @@ -2193,7 +2193,7 @@ impl> const ops::FromResidual> const ops::FromResidual> for Result { +const impl> ops::FromResidual> for Result { #[inline] fn from_residual(ops::Yeet(e): ops::Yeet) -> Self { Err(From::from(e)) @@ -2202,6 +2202,6 @@ impl> const ops::FromResidual> for Result< #[unstable(feature = "try_trait_v2_residual", issue = "91285")] #[rustc_const_unstable(feature = "const_try", issue = "74935")] -impl const ops::Residual for Result { +const impl ops::Residual for Result { type TryType = Result; } diff --git a/library/core/src/slice/cmp.rs b/library/core/src/slice/cmp.rs index 6a10fc22c2e2c..10a0088477162 100644 --- a/library/core/src/slice/cmp.rs +++ b/library/core/src/slice/cmp.rs @@ -11,7 +11,7 @@ use crate::ops::ControlFlow; #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialEq<[U]> for [T] +const impl PartialEq<[U]> for [T] where T: [const] PartialEq, { @@ -30,12 +30,12 @@ where #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const Eq for [T] {} +const impl Eq for [T] {} /// Implements comparison of slices [lexicographically](Ord#lexicographical-comparison). #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const Ord for [T] { +const impl Ord for [T] { fn cmp(&self, other: &[T]) -> Ordering { SliceOrd::compare(self, other) } @@ -55,7 +55,7 @@ const fn as_underlying(x: ControlFlow) -> u8 { /// Implements comparison of slices [lexicographically](Ord#lexicographical-comparison). #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialOrd for [T] { +const impl PartialOrd for [T] { #[inline] fn partial_cmp(&self, other: &[T]) -> Option { SlicePartialOrd::partial_compare(self, other) @@ -113,7 +113,7 @@ const trait SlicePartialEq { // Generic slice equality #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const SlicePartialEq for A +const impl SlicePartialEq for A where A: [const] PartialEq, { @@ -143,7 +143,7 @@ where // When each element can be compared byte-wise, we can compare all the bytes // from the whole size in one call to the intrinsics. #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const SlicePartialEq for A +const impl SlicePartialEq for A where A: [const] BytewiseEq, { @@ -179,7 +179,7 @@ const trait SliceChain: Sized { type AlwaysBreak = ControlFlow; #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const SlicePartialOrd for A { +const impl SlicePartialOrd for A { default fn partial_compare(left: &[A], right: &[A]) -> Option { let elem_chain = const |a, b| match PartialOrd::partial_cmp(a, b) { Some(Ordering::Equal) => ControlFlow::Continue(()), @@ -194,7 +194,7 @@ impl const SlicePartialOrd for A { } #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const SliceChain for A { +const impl SliceChain for A { default fn chaining_lt(left: &[Self], right: &[Self]) -> ControlFlow { chaining_impl(left, right, PartialOrd::__chaining_lt, usize::__chaining_lt) } @@ -248,7 +248,7 @@ where */ #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const SlicePartialOrd for A { +const impl SlicePartialOrd for A { fn partial_compare(left: &[A], right: &[A]) -> Option { Some(SliceOrd::compare(left, right)) } @@ -282,7 +282,7 @@ const trait SliceOrd: Sized { } #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const SliceOrd for A { +const impl SliceOrd for A { default fn compare(left: &[Self], right: &[Self]) -> Ordering { let elem_chain = const |a, b| match Ord::cmp(a, b) { Ordering::Equal => ControlFlow::Continue(()), @@ -307,20 +307,20 @@ impl const SliceOrd for A { const unsafe trait UnsignedBytewiseOrd: [const] Ord {} #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -unsafe impl const UnsignedBytewiseOrd for bool {} +const unsafe impl UnsignedBytewiseOrd for bool {} #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -unsafe impl const UnsignedBytewiseOrd for u8 {} +const unsafe impl UnsignedBytewiseOrd for u8 {} #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -unsafe impl const UnsignedBytewiseOrd for NonZero {} +const unsafe impl UnsignedBytewiseOrd for NonZero {} #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -unsafe impl const UnsignedBytewiseOrd for Option> {} +const unsafe impl UnsignedBytewiseOrd for Option> {} #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -unsafe impl const UnsignedBytewiseOrd for ascii::Char {} +const unsafe impl UnsignedBytewiseOrd for ascii::Char {} // `compare_bytes` compares a sequence of unsigned bytes lexicographically, so // use it if the requirements for `UnsignedBytewiseOrd` are fulfilled. #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const SliceOrd for A { +const impl SliceOrd for A { #[inline] fn compare(left: &[Self], right: &[Self]) -> Ordering { // Since the length of a slice is always less than or equal to @@ -347,7 +347,7 @@ impl const SliceOrd for A { // Don't generate our own chaining loops for `memcmp`-able things either. #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const SliceChain for A { +const impl SliceChain for A { #[inline] fn chaining_lt(left: &[Self], right: &[Self]) -> ControlFlow { match SliceOrd::compare(left, right) { diff --git a/library/core/src/slice/index.rs b/library/core/src/slice/index.rs index 0efe87a2d5368..56eeb63bca45d 100644 --- a/library/core/src/slice/index.rs +++ b/library/core/src/slice/index.rs @@ -8,7 +8,7 @@ use crate::{ops, range}; #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -impl const ops::Index for [T] +const impl ops::Index for [T] where I: [const] SliceIndex<[T]>, { @@ -22,7 +22,7 @@ where #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -impl const ops::IndexMut for [T] +const impl ops::IndexMut for [T] where I: [const] SliceIndex<[T]>, { @@ -211,7 +211,7 @@ pub const unsafe trait SliceIndex: private_slice_index::Sealed { /// The methods `index` and `index_mut` panic if the index is out of bounds. #[stable(feature = "slice_get_slice_impls", since = "1.15.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex<[T]> for usize { +const unsafe impl SliceIndex<[T]> for usize { type Output = T; #[inline] @@ -282,7 +282,7 @@ unsafe impl const SliceIndex<[T]> for usize { /// Because `IndexRange` guarantees `start <= end`, fewer checks are needed here /// than there are for a general `Range` (which might be `100..3`). #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex<[T]> for ops::IndexRange { +const unsafe impl SliceIndex<[T]> for ops::IndexRange { type Output = [T]; #[inline] @@ -359,7 +359,7 @@ unsafe impl const SliceIndex<[T]> for ops::IndexRange { /// - the end of the range is out of bounds. #[stable(feature = "slice_get_slice_impls", since = "1.15.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex<[T]> for ops::Range { +const unsafe impl SliceIndex<[T]> for ops::Range { type Output = [T]; #[inline] @@ -460,7 +460,7 @@ unsafe impl const SliceIndex<[T]> for ops::Range { #[stable(feature = "new_range_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex<[T]> for range::Range { +const unsafe impl SliceIndex<[T]> for range::Range { type Output = [T]; #[inline] @@ -499,7 +499,7 @@ unsafe impl const SliceIndex<[T]> for range::Range { /// The methods `index` and `index_mut` panic if the end of the range is out of bounds. #[stable(feature = "slice_get_slice_impls", since = "1.15.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex<[T]> for ops::RangeTo { +const unsafe impl SliceIndex<[T]> for ops::RangeTo { type Output = [T]; #[inline] @@ -538,7 +538,7 @@ unsafe impl const SliceIndex<[T]> for ops::RangeTo { /// The methods `index` and `index_mut` panic if the start of the range is out of bounds. #[stable(feature = "slice_get_slice_impls", since = "1.15.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex<[T]> for ops::RangeFrom { +const unsafe impl SliceIndex<[T]> for ops::RangeFrom { type Output = [T]; #[inline] @@ -590,7 +590,7 @@ unsafe impl const SliceIndex<[T]> for ops::RangeFrom { #[stable(feature = "new_range_from_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex<[T]> for range::RangeFrom { +const unsafe impl SliceIndex<[T]> for range::RangeFrom { type Output = [T]; #[inline] @@ -628,7 +628,7 @@ unsafe impl const SliceIndex<[T]> for range::RangeFrom { #[stable(feature = "slice_get_slice_impls", since = "1.15.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex<[T]> for ops::RangeFull { +const unsafe impl SliceIndex<[T]> for ops::RangeFull { type Output = [T]; #[inline] @@ -667,7 +667,7 @@ unsafe impl const SliceIndex<[T]> for ops::RangeFull { /// - the end of the range is out of bounds. #[stable(feature = "inclusive_range", since = "1.26.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex<[T]> for ops::RangeInclusive { +const unsafe impl SliceIndex<[T]> for ops::RangeInclusive { type Output = [T]; #[inline] @@ -725,7 +725,7 @@ unsafe impl const SliceIndex<[T]> for ops::RangeInclusive { #[stable(feature = "new_range_inclusive_api", since = "1.95.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex<[T]> for range::RangeInclusive { +const unsafe impl SliceIndex<[T]> for range::RangeInclusive { type Output = [T]; #[inline] @@ -764,7 +764,7 @@ unsafe impl const SliceIndex<[T]> for range::RangeInclusive { /// The methods `index` and `index_mut` panic if the end of the range is out of bounds. #[stable(feature = "inclusive_range", since = "1.26.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex<[T]> for ops::RangeToInclusive { +const unsafe impl SliceIndex<[T]> for ops::RangeToInclusive { type Output = [T]; #[inline] @@ -803,7 +803,7 @@ unsafe impl const SliceIndex<[T]> for ops::RangeToInclusive { /// The methods `index` and `index_mut` panic if the end of the range is out of bounds. #[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex<[T]> for range::RangeToInclusive { +const unsafe impl SliceIndex<[T]> for range::RangeToInclusive { type Output = [T]; #[inline] diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index a838ba009b484..7ab9407273984 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -5594,7 +5594,7 @@ const trait CloneFromSpec { } #[rustc_const_unstable(feature = "const_clone", issue = "142757")] -impl const CloneFromSpec for [T] +const impl CloneFromSpec for [T] where T: [const] Clone + [const] Destruct, { @@ -5616,7 +5616,7 @@ where } #[rustc_const_unstable(feature = "const_clone", issue = "142757")] -impl const CloneFromSpec for [T] +const impl CloneFromSpec for [T] where T: [const] TrivialClone + [const] Destruct, { @@ -5631,7 +5631,7 @@ where #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for &[T] { +const impl Default for &[T] { /// Creates an empty slice. fn default() -> Self { &[] @@ -5640,7 +5640,7 @@ impl const Default for &[T] { #[stable(feature = "mut_slice_default", since = "1.5.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for &mut [T] { +const impl Default for &mut [T] { /// Creates a mutable empty slice. fn default() -> Self { &mut [] diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs index 5af399ab1b34c..fe8ed6c8e637e 100644 --- a/library/core/src/str/mod.rs +++ b/library/core/src/str/mod.rs @@ -3155,7 +3155,7 @@ impl str { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsRef<[u8]> for str { +const impl AsRef<[u8]> for str { #[inline] fn as_ref(&self) -> &[u8] { self.as_bytes() @@ -3164,7 +3164,7 @@ impl const AsRef<[u8]> for str { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for &str { +const impl Default for &str { /// Creates an empty str #[inline] fn default() -> Self { @@ -3174,7 +3174,7 @@ impl const Default for &str { #[stable(feature = "default_mut_str", since = "1.28.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for &mut str { +const impl Default for &mut str { /// Creates an empty mutable str #[inline] fn default() -> Self { diff --git a/library/core/src/str/traits.rs b/library/core/src/str/traits.rs index 3b5cec22b69ea..ad9a413e90bf9 100644 --- a/library/core/src/str/traits.rs +++ b/library/core/src/str/traits.rs @@ -24,7 +24,7 @@ impl Ord for str { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialEq for str { +const impl PartialEq for str { #[inline] fn eq(&self, other: &str) -> bool { self.as_bytes() == other.as_bytes() @@ -33,7 +33,7 @@ impl const PartialEq for str { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const Eq for str {} +const impl Eq for str {} /// Implements comparison operations on strings. /// @@ -52,7 +52,7 @@ impl PartialOrd for str { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -impl const ops::Index for str +const impl ops::Index for str where I: [const] SliceIndex, { @@ -66,7 +66,7 @@ where #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -impl const ops::IndexMut for str +const impl ops::IndexMut for str where I: [const] SliceIndex, { @@ -90,7 +90,7 @@ where /// Equivalent to `&self[0 .. len]` or `&mut self[0 .. len]`. #[stable(feature = "str_checked_slicing", since = "1.20.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex for ops::RangeFull { +const unsafe impl SliceIndex for ops::RangeFull { type Output = str; #[inline] fn get(self, slice: &str) -> Option<&Self::Output> { @@ -155,7 +155,7 @@ unsafe impl const SliceIndex for ops::RangeFull { /// ``` #[stable(feature = "str_checked_slicing", since = "1.20.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex for ops::Range { +const unsafe impl SliceIndex for ops::Range { type Output = str; #[inline] fn get(self, slice: &str) -> Option<&Self::Output> { @@ -260,7 +260,7 @@ unsafe impl const SliceIndex for ops::Range { #[stable(feature = "new_range_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex for range::Range { +const unsafe impl SliceIndex for range::Range { type Output = str; #[inline] fn get(self, slice: &str) -> Option<&Self::Output> { @@ -432,7 +432,7 @@ unsafe impl SliceIndex for (ops::Bound, ops::Bound) { /// character (as defined by `is_char_boundary`), or if `end > len`. #[stable(feature = "str_checked_slicing", since = "1.20.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex for ops::RangeTo { +const unsafe impl SliceIndex for ops::RangeTo { type Output = str; #[inline] fn get(self, slice: &str) -> Option<&Self::Output> { @@ -501,7 +501,7 @@ unsafe impl const SliceIndex for ops::RangeTo { /// a character (as defined by `is_char_boundary`), or if `begin > len`. #[stable(feature = "str_checked_slicing", since = "1.20.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex for ops::RangeFrom { +const unsafe impl SliceIndex for ops::RangeFrom { type Output = str; #[inline] fn get(self, slice: &str) -> Option<&Self::Output> { @@ -557,7 +557,7 @@ unsafe impl const SliceIndex for ops::RangeFrom { #[stable(feature = "new_range_from_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex for range::RangeFrom { +const unsafe impl SliceIndex for range::RangeFrom { type Output = str; #[inline] fn get(self, slice: &str) -> Option<&Self::Output> { @@ -629,7 +629,7 @@ unsafe impl const SliceIndex for range::RangeFrom { /// byte offset or equal to `len`), if `begin > end`, or if `end >= len`. #[stable(feature = "inclusive_range", since = "1.26.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex for ops::RangeInclusive { +const unsafe impl SliceIndex for ops::RangeInclusive { type Output = str; #[inline] fn get(self, slice: &str) -> Option<&Self::Output> { @@ -687,7 +687,7 @@ unsafe impl const SliceIndex for ops::RangeInclusive { #[stable(feature = "new_range_inclusive_api", since = "1.95.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex for range::RangeInclusive { +const unsafe impl SliceIndex for range::RangeInclusive { type Output = str; #[inline] fn get(self, slice: &str) -> Option<&Self::Output> { @@ -733,7 +733,7 @@ unsafe impl const SliceIndex for range::RangeInclusive { /// `is_char_boundary`, or equal to `len`), or if `end >= len`. #[stable(feature = "inclusive_range", since = "1.26.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex for ops::RangeToInclusive { +const unsafe impl SliceIndex for ops::RangeToInclusive { type Output = str; #[inline] fn get(self, slice: &str) -> Option<&Self::Output> { @@ -779,7 +779,7 @@ unsafe impl const SliceIndex for ops::RangeToInclusive { /// `is_char_boundary`, or equal to `len`), or if `last >= len`. #[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] -unsafe impl const SliceIndex for range::RangeToInclusive { +const unsafe impl SliceIndex for range::RangeToInclusive { type Output = str; #[inline] fn get(self, slice: &str) -> Option<&Self::Output> { diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs index 8a9a0b52ffec3..4f2faa7e5fbd6 100644 --- a/library/core/src/sync/atomic.rs +++ b/library/core/src/sync/atomic.rs @@ -2504,7 +2504,7 @@ impl AtomicPtr { #[cfg(target_has_atomic_load_store = "8")] #[stable(feature = "atomic_bool_from", since = "1.24.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for AtomicBool { +const impl From for AtomicBool { /// Converts a `bool` into an `AtomicBool`. /// /// # Examples @@ -2523,7 +2523,7 @@ impl const From for AtomicBool { #[cfg(target_has_atomic_load_store = "ptr")] #[stable(feature = "atomic_from", since = "1.23.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From<*mut T> for AtomicPtr { +const impl From<*mut T> for AtomicPtr { /// Converts a `*mut T` into an `AtomicPtr`. #[inline] fn from(p: *mut T) -> Self { diff --git a/library/core/src/sync/sync_view.rs b/library/core/src/sync/sync_view.rs index 46ad41135bfff..3b02c4c727ca8 100644 --- a/library/core/src/sync/sync_view.rs +++ b/library/core/src/sync/sync_view.rs @@ -97,7 +97,7 @@ unsafe impl Sync for SyncView {} #[unstable(feature = "exclusive_wrapper", issue = "98407")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for SyncView +const impl Default for SyncView where T: [const] Default, { @@ -197,7 +197,7 @@ impl SyncView { #[unstable(feature = "exclusive_wrapper", issue = "98407")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for SyncView { +const impl From for SyncView { #[inline] fn from(t: T) -> Self { Self::new(t) @@ -206,7 +206,7 @@ impl const From for SyncView { #[unstable(feature = "exclusive_wrapper", issue = "98407")] #[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")] -impl const FnOnce for SyncView +const impl FnOnce for SyncView where F: [const] FnOnce, Args: Tuple, @@ -220,7 +220,7 @@ where #[unstable(feature = "exclusive_wrapper", issue = "98407")] #[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")] -impl const FnMut for SyncView +const impl FnMut for SyncView where F: [const] FnMut, Args: Tuple, @@ -232,7 +232,7 @@ where #[unstable(feature = "exclusive_wrapper", issue = "98407")] #[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")] -impl const Fn for SyncView +const impl Fn for SyncView where F: Sync + [const] Fn, Args: Tuple, @@ -313,7 +313,7 @@ where #[unstable(feature = "exclusive_wrapper", issue = "98407")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsRef for SyncView +const impl AsRef for SyncView where T: Sync + ?Sized, { @@ -326,7 +326,7 @@ where #[unstable(feature = "exclusive_wrapper", issue = "98407")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsMut for SyncView +const impl AsMut for SyncView where T: ?Sized, { @@ -339,7 +339,7 @@ where #[unstable(feature = "exclusive_wrapper", issue = "98407")] #[rustc_const_unstable(feature = "const_clone", issue = "142757")] -impl const Clone for SyncView +const impl Clone for SyncView where T: Sync + [const] Clone, { @@ -352,14 +352,14 @@ where #[doc(hidden)] #[unstable(feature = "trivial_clone", issue = "none")] #[rustc_const_unstable(feature = "const_clone", issue = "142757")] -unsafe impl const TrivialClone for SyncView where T: Sync + [const] TrivialClone {} +const unsafe impl TrivialClone for SyncView where T: Sync + [const] TrivialClone {} #[unstable(feature = "exclusive_wrapper", issue = "98407")] impl Copy for SyncView where T: Sync + Copy {} #[unstable(feature = "exclusive_wrapper", issue = "98407")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialEq> for SyncView +const impl PartialEq> for SyncView where T: Sync + [const] PartialEq + ?Sized, U: Sync + ?Sized, @@ -375,7 +375,7 @@ impl StructuralPartialEq for SyncView where T: Sync + StructuralPartialEq #[unstable(feature = "exclusive_wrapper", issue = "98407")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const Eq for SyncView where T: Sync + [const] Eq + ?Sized {} +const impl Eq for SyncView where T: Sync + [const] Eq + ?Sized {} #[unstable(feature = "exclusive_wrapper", issue = "98407")] impl Hash for SyncView @@ -390,7 +390,7 @@ where #[unstable(feature = "exclusive_wrapper", issue = "98407")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const PartialOrd> for SyncView +const impl PartialOrd> for SyncView where T: Sync + [const] PartialOrd + ?Sized, U: Sync + ?Sized, @@ -403,7 +403,7 @@ where #[unstable(feature = "exclusive_wrapper", issue = "98407")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -impl const Ord for SyncView +const impl Ord for SyncView where T: Sync + [const] Ord + ?Sized, { diff --git a/library/core/src/task/poll.rs b/library/core/src/task/poll.rs index 380abac0ae95f..87f8830a6b176 100644 --- a/library/core/src/task/poll.rs +++ b/library/core/src/task/poll.rs @@ -216,7 +216,7 @@ impl Poll>> { #[stable(feature = "futures_api", since = "1.36.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const From for Poll { +const impl From for Poll { /// Moves the value into a [`Poll::Ready`] to make a `Poll`. /// /// # Example diff --git a/library/core/src/task/wake.rs b/library/core/src/task/wake.rs index c22a9da0385b5..14f0980ff6045 100644 --- a/library/core/src/task/wake.rs +++ b/library/core/src/task/wake.rs @@ -946,7 +946,7 @@ impl Clone for LocalWaker { #[unstable(feature = "local_waker", issue = "118959")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsRef for Waker { +const impl AsRef for Waker { fn as_ref(&self) -> &LocalWaker { // SAFETY: LocalWaker is just Waker without thread safety unsafe { transmute(self) } diff --git a/library/core/src/time.rs b/library/core/src/time.rs index 9073131b35b61..682a61a07d10f 100644 --- a/library/core/src/time.rs +++ b/library/core/src/time.rs @@ -1249,7 +1249,7 @@ impl Duration { #[stable(feature = "duration", since = "1.3.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] -impl const Add for Duration { +const impl Add for Duration { type Output = Duration; #[inline] @@ -1260,7 +1260,7 @@ impl const Add for Duration { #[stable(feature = "time_augmented_assignment", since = "1.9.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] -impl const AddAssign for Duration { +const impl AddAssign for Duration { #[inline] fn add_assign(&mut self, rhs: Duration) { *self = *self + rhs; @@ -1269,7 +1269,7 @@ impl const AddAssign for Duration { #[stable(feature = "duration", since = "1.3.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] -impl const Sub for Duration { +const impl Sub for Duration { type Output = Duration; #[inline] @@ -1280,7 +1280,7 @@ impl const Sub for Duration { #[stable(feature = "time_augmented_assignment", since = "1.9.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] -impl const SubAssign for Duration { +const impl SubAssign for Duration { #[inline] fn sub_assign(&mut self, rhs: Duration) { *self = *self - rhs; @@ -1289,7 +1289,7 @@ impl const SubAssign for Duration { #[stable(feature = "duration", since = "1.3.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] -impl const Mul for Duration { +const impl Mul for Duration { type Output = Duration; #[inline] @@ -1300,7 +1300,7 @@ impl const Mul for Duration { #[stable(feature = "symmetric_u32_duration_mul", since = "1.31.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] -impl const Mul for u32 { +const impl Mul for u32 { type Output = Duration; #[inline] @@ -1311,7 +1311,7 @@ impl const Mul for u32 { #[stable(feature = "time_augmented_assignment", since = "1.9.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] -impl const MulAssign for Duration { +const impl MulAssign for Duration { #[inline] fn mul_assign(&mut self, rhs: u32) { *self = *self * rhs; @@ -1320,7 +1320,7 @@ impl const MulAssign for Duration { #[stable(feature = "duration", since = "1.3.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] -impl const Div for Duration { +const impl Div for Duration { type Output = Duration; #[inline] @@ -1332,7 +1332,7 @@ impl const Div for Duration { #[stable(feature = "time_augmented_assignment", since = "1.9.0")] #[rustc_const_unstable(feature = "const_ops", issue = "143802")] -impl const DivAssign for Duration { +const impl DivAssign for Duration { #[inline] #[track_caller] fn div_assign(&mut self, rhs: u32) { diff --git a/library/coretests/tests/array.rs b/library/coretests/tests/array.rs index a3b0e59278f79..c92c78be98ae3 100644 --- a/library/coretests/tests/array.rs +++ b/library/coretests/tests/array.rs @@ -770,7 +770,7 @@ const fn extra_const_array_ops() { { std::array::from_fn(const |i| i + 4).map(const |x| x * 2).map(const |x| x as _) }; let y = 4; struct Z(u16); - impl const Drop for Z { + const impl Drop for Z { fn drop(&mut self) {} } let w = Z(2); diff --git a/library/coretests/tests/cmp.rs b/library/coretests/tests/cmp.rs index bb350b1d59fef..e6af3575293d6 100644 --- a/library/coretests/tests/cmp.rs +++ b/library/coretests/tests/cmp.rs @@ -254,13 +254,13 @@ mod const_cmp { struct S(i32); - impl const PartialEq for S { + const impl PartialEq for S { fn eq(&self, other: &Self) -> bool { self.0 == other.0 } } - impl const PartialOrd for S { + const impl PartialOrd for S { fn partial_cmp(&self, other: &Self) -> Option { let ret = match (self.0, other.0) { (a, b) if a > b => Ordering::Greater, diff --git a/library/coretests/tests/hint.rs b/library/coretests/tests/hint.rs index d15730823eb5b..8eeb86b29a65f 100644 --- a/library/coretests/tests/hint.rs +++ b/library/coretests/tests/hint.rs @@ -3,7 +3,7 @@ fn select_unpredictable_drop() { use core::cell::Cell; struct X<'a>(&'a Cell); - impl const Drop for X<'_> { + const impl Drop for X<'_> { fn drop(&mut self) { self.0.set(true); } diff --git a/library/coretests/tests/manually_drop.rs b/library/coretests/tests/manually_drop.rs index 1638c82b161b4..db0cb9c31e174 100644 --- a/library/coretests/tests/manually_drop.rs +++ b/library/coretests/tests/manually_drop.rs @@ -40,7 +40,7 @@ fn const_drop_in_place() { struct Test<'a>(Dropped<'a>); struct Dropped<'a>(&'a Cell); - impl const Drop for Dropped<'_> { + const impl Drop for Dropped<'_> { fn drop(&mut self) { self.0.set(self.0.get() + 1); } diff --git a/library/std/src/collections/hash/map.rs b/library/std/src/collections/hash/map.rs index a7a9b7901d7f4..887efd12f550f 100644 --- a/library/std/src/collections/hash/map.rs +++ b/library/std/src/collections/hash/map.rs @@ -1486,7 +1486,7 @@ where #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for HashMap +const impl Default for HashMap where S: [const] Default, { diff --git a/library/std/src/collections/hash/set.rs b/library/std/src/collections/hash/set.rs index fadd62652c62d..b0a8e8ff42149 100644 --- a/library/std/src/collections/hash/set.rs +++ b/library/std/src/collections/hash/set.rs @@ -1276,7 +1276,7 @@ where #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for HashSet +const impl Default for HashSet where S: [const] Default, { diff --git a/library/std/src/ffi/os_str.rs b/library/std/src/ffi/os_str.rs index be606ae69d6d9..4e74479faa2cc 100644 --- a/library/std/src/ffi/os_str.rs +++ b/library/std/src/ffi/os_str.rs @@ -1758,7 +1758,7 @@ impl ToOwned for OsStr { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsRef for OsStr { +const impl AsRef for OsStr { #[inline] fn as_ref(&self) -> &OsStr { self diff --git a/library/std/src/hash/random.rs b/library/std/src/hash/random.rs index 3c1b21eec9759..b9c21ab2d6a65 100644 --- a/library/std/src/hash/random.rs +++ b/library/std/src/hash/random.rs @@ -110,7 +110,7 @@ impl DefaultHasher { #[stable(feature = "hashmap_default_hasher", since = "1.13.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for DefaultHasher { +const impl Default for DefaultHasher { /// Creates a new `DefaultHasher` using [`new`]. /// See its documentation for more. /// diff --git a/library/std/src/path.rs b/library/std/src/path.rs index 222bf77996c7f..fbe827ff665ca 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -3690,7 +3690,7 @@ unsafe impl CloneToUninit for Path { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsRef for Path { +const impl AsRef for Path { #[inline] fn as_ref(&self) -> &OsStr { &self.inner @@ -3861,7 +3861,7 @@ impl Ord for Path { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsRef for Path { +const impl AsRef for Path { #[inline] fn as_ref(&self) -> &Path { self @@ -3870,7 +3870,7 @@ impl const AsRef for Path { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] -impl const AsRef for OsStr { +const impl AsRef for OsStr { #[inline] fn as_ref(&self) -> &Path { Path::new(self) diff --git a/library/std/src/sync/lazy_lock.rs b/library/std/src/sync/lazy_lock.rs index 2f2579e37aaf8..9bb25287275b2 100644 --- a/library/std/src/sync/lazy_lock.rs +++ b/library/std/src/sync/lazy_lock.rs @@ -376,7 +376,7 @@ impl T> DerefMut for LazyLock { #[stable(feature = "lazy_cell", since = "1.80.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for LazyLock { +const impl Default for LazyLock { /// Creates a new lazy value using `Default` as the initializing function. #[inline] fn default() -> LazyLock { diff --git a/library/std/src/sync/once_lock.rs b/library/std/src/sync/once_lock.rs index f6ea3c1a039b2..8e69e7a22ad8e 100644 --- a/library/std/src/sync/once_lock.rs +++ b/library/std/src/sync/once_lock.rs @@ -592,7 +592,7 @@ impl UnwindSafe for OnceLock {} #[stable(feature = "once_cell", since = "1.70.0")] #[rustc_const_unstable(feature = "const_default", issue = "143894")] -impl const Default for OnceLock { +const impl Default for OnceLock { /// Creates a new uninitialized cell. /// /// # Example From 5d3fc4f39a9a9f64f7273a44da5d8160824b05e2 Mon Sep 17 00:00:00 2001 From: WhySoBad <49595640+WhySoBad@users.noreply.github.com> Date: Thu, 21 May 2026 01:06:34 +0200 Subject: [PATCH 20/22] Process host I/O events before any foreign function invocation This ensures that the readiness of host-backed file descriptions are up-to-date before executing a foreign function on it. --- src/tools/miri/src/concurrency/blocking_io.rs | 36 ++++++++++++++----- src/tools/miri/src/concurrency/thread.rs | 27 ++++---------- .../miri/src/shims/unix/foreign_items.rs | 11 ++++++ .../libc/libc-socket-no-blocking-epoll.rs | 8 ----- 4 files changed, 45 insertions(+), 37 deletions(-) diff --git a/src/tools/miri/src/concurrency/blocking_io.rs b/src/tools/miri/src/concurrency/blocking_io.rs index c16aecedb3340..6508a7fe2f4f2 100644 --- a/src/tools/miri/src/concurrency/blocking_io.rs +++ b/src/tools/miri/src/concurrency/blocking_io.rs @@ -154,15 +154,9 @@ impl BlockingIoManager { } /// Poll for new I/O events from the OS or wait until the timeout expired. - /// - /// - If the timeout is [`Some`] and contains [`Duration::ZERO`], the poll doesn't block and just - /// reads all events since the last poll. - /// - If the timeout is [`Some`] and contains a non-zero duration, it blocks at most for the - /// specified duration. - /// - If the timeout is [`None`] the poll blocks indefinitely until an event occurs. - /// + /// The timeout semantics are the same as described in [`Poll::poll`]. /// The events also immediately get processed: threads get unblocked, and epoll readiness gets updated. - pub fn poll<'tcx>( + fn poll<'tcx>( ecx: &mut MiriInterpCx<'tcx>, timeout: Option, ) -> InterpResult<'tcx, Result<(), io::Error>> { @@ -344,6 +338,9 @@ pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> { /// readiness gets set for the source even when the requested interest /// might not be fulfilled. /// + /// The callback function will immediately be executed with [`UnblockKind::Ready`] + /// when `interest` is already fulfilled for `source_fd`. + /// /// There can also be spurious wake-ups by the OS and thus it's the callers /// responsibility to verify that the requested I/O interests are /// really ready and to block again if they're not. @@ -374,4 +371,27 @@ pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> { interp_ok(()) } } + + /// Poll for I/O events until either an I/O event happened or the timeout expired. + /// + /// - If the timeout is [`Some`] and contains [`Duration::ZERO`], the poll doesn't block and just + /// reads all events since the last poll. + /// - If the timeout is [`Some`] and contains a non-zero duration, it blocks at most for the + /// specified duration. + /// - If the timeout is [`None`] the poll blocks indefinitely until an event occurs. + /// + /// Unblocks all threads which are blocked on I/O and whose I/O interests + /// are currently fulfilled. + fn poll_and_unblock(&mut self, timeout: Option) -> InterpResult<'tcx> { + let this = self.eval_context_mut(); + + match BlockingIoManager::poll(this, timeout)? { + Ok(_) => interp_ok(()), + // We can ignore errors originating from interrupts; that's just a spurious wakeup. + Err(e) if e.kind() == io::ErrorKind::Interrupted => interp_ok(()), + // For other errors we panic. On Linux and BSD hosts this should only be + // reachable when a system resource error (e.g. ENOMEM or ENOSPC) occurred. + Err(e) => panic!("unexpected error while polling: {e}"), + } + } } diff --git a/src/tools/miri/src/concurrency/thread.rs b/src/tools/miri/src/concurrency/thread.rs index 4dabdb48c4f6e..b730b9daa99a9 100644 --- a/src/tools/miri/src/concurrency/thread.rs +++ b/src/tools/miri/src/concurrency/thread.rs @@ -1,9 +1,9 @@ //! Implements threads. +use std::mem; use std::sync::atomic::Ordering::Relaxed; use std::task::Poll; use std::time::{Duration, SystemTime}; -use std::{io, mem}; use rand::RngExt; use rand::seq::IteratorRandom; @@ -698,8 +698,11 @@ trait EvalContextPrivExt<'tcx>: MiriInterpCxExt<'tcx> { // or timeouts to take care of. if this.machine.communicate() { - // When isolation is disabled we need to check for events for - // threads which are blocked on host I/O. + // When isolation is disabled we need to check for events for threads + // which are blocked on host I/O. Unlike the `poll_and_unblock` before + // any foreign item, the call here is needed to ensure that threads which + // are blocked on host I/O are woken up even if no shimmed functions are + // executed afterwards. // We do this before running any other threads such that the threads // which received events are available for scheduling afterwards. @@ -793,24 +796,6 @@ trait EvalContextPrivExt<'tcx>: MiriInterpCxExt<'tcx> { } } - /// Poll for I/O events until either an I/O event happened or the timeout expired. - /// The different timeout values are described in [`BlockingIoManager::poll`]. - /// - /// Unblocks all threads which are blocked on I/O and whose I/O interests - /// are currently fulfilled. - fn poll_and_unblock(&mut self, timeout: Option) -> InterpResult<'tcx> { - let this = self.eval_context_mut(); - - match BlockingIoManager::poll(this, timeout)? { - Ok(_) => interp_ok(()), - // We can ignore errors originating from interrupts; that's just a spurious wakeup. - Err(e) if e.kind() == io::ErrorKind::Interrupted => interp_ok(()), - // For other errors we panic. On Linux and BSD hosts this should only be - // reachable when a system resource error (e.g. ENOMEM or ENOSPC) occurred. - Err(e) => panic!("unexpected error while polling: {e}"), - } - } - /// Find all threads with expired timeouts, unblock them and execute their timeout callbacks. /// /// This method returns the minimum duration until the next thread deadline. diff --git a/src/tools/miri/src/shims/unix/foreign_items.rs b/src/tools/miri/src/shims/unix/foreign_items.rs index fa2af98b9fc8d..58f05b644f58d 100644 --- a/src/tools/miri/src/shims/unix/foreign_items.rs +++ b/src/tools/miri/src/shims/unix/foreign_items.rs @@ -1,5 +1,6 @@ use std::ffi::OsStr; use std::str; +use std::time::Duration; use rustc_abi::{CanonAbi, Size}; use rustc_middle::ty::Ty; @@ -108,6 +109,16 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { ) -> InterpResult<'tcx, EmulateItemResult> { let this = self.eval_context_mut(); + if this.machine.communicate() { + // When isolation is disabled we need to check for new host I/O events before + // running any shimmed function. This is needed to ensure that the shim we + // execute has up-to-date information about host readiness (as reflected + // e.g. by epoll) even if the current thread never yields. + + // Perform a non-blocking poll for newly available I/O events from the OS. + this.poll_and_unblock(Some(Duration::ZERO))?; + } + // See `fn emulate_foreign_item_inner` in `shims/foreign_items.rs` for the general pattern. match link_name.as_str() { // Environment related shims diff --git a/src/tools/miri/tests/pass-dep/libc/libc-socket-no-blocking-epoll.rs b/src/tools/miri/tests/pass-dep/libc/libc-socket-no-blocking-epoll.rs index 9c8c5be647d4c..7202384a8cf63 100644 --- a/src/tools/miri/tests/pass-dep/libc/libc-socket-no-blocking-epoll.rs +++ b/src/tools/miri/tests/pass-dep/libc/libc-socket-no-blocking-epoll.rs @@ -523,11 +523,6 @@ fn test_readiness_after_short_peek() { // Write some bytes into the peer socket. libc_utils::write_all(peerfd, TEST_BYTES).unwrap(); - // FIXME: Changes in host I/O readiness are only processed when entering the scheduler. - // Ensure that we process the effects if the `write_all` by yielding the current (only) thread. - // - thread::yield_now(); - // `buffer` is intentionally bigger than `TEST_BYTES.len()` to trigger a short peek. let mut buffer = [0; 128]; let bytes_read = unsafe { @@ -541,9 +536,6 @@ fn test_readiness_after_short_peek() { } as usize; assert_eq!(bytes_read, TEST_BYTES.len()); - // FIXME(#5047): same as above. - thread::yield_now(); - // Ensure that the readable readiness is still set. assert_eq!(current_epoll_readiness::<8>(client_sockfd, EPOLLIN | EPOLLET), EPOLLIN); From a0a7e1602b5a76d7f62fafa33f9f37d639791673 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Fri, 21 Nov 2025 21:58:09 +0300 Subject: [PATCH 21/22] resolve: Partially convert `ambiguous_glob_imports` lint into a hard error --- .../build_system/src/test.rs | 2 - compiler/rustc_lint_defs/src/builtin.rs | 27 ++- .../rustc_resolve/src/build_reduced_graph.rs | 9 +- compiler/rustc_resolve/src/diagnostics.rs | 2 +- compiler/rustc_resolve/src/imports.rs | 166 +++++++++--------- compiler/rustc_resolve/src/lib.rs | 37 +--- tests/ui/imports/ambiguous-1.rs | 6 +- tests/ui/imports/ambiguous-1.stderr | 60 ++----- tests/ui/imports/ambiguous-10.rs | 1 - tests/ui/imports/ambiguous-10.stderr | 30 +--- tests/ui/imports/ambiguous-12.rs | 1 - tests/ui/imports/ambiguous-12.stderr | 30 +--- tests/ui/imports/ambiguous-13.rs | 1 - tests/ui/imports/ambiguous-13.stderr | 30 +--- tests/ui/imports/ambiguous-15.rs | 1 - tests/ui/imports/ambiguous-15.stderr | 30 +--- tests/ui/imports/ambiguous-16.rs | 1 - tests/ui/imports/ambiguous-16.stderr | 30 +--- tests/ui/imports/ambiguous-17.rs | 1 - tests/ui/imports/ambiguous-17.stderr | 44 +---- tests/ui/imports/ambiguous-2.rs | 9 - tests/ui/imports/ambiguous-2.stderr | 49 ------ tests/ui/imports/ambiguous-3.rs | 1 - tests/ui/imports/ambiguous-3.stderr | 34 +--- tests/ui/imports/ambiguous-4-extern.rs | 6 +- tests/ui/imports/ambiguous-4-extern.stderr | 58 ++---- tests/ui/imports/ambiguous-4.rs | 9 - tests/ui/imports/ambiguous-4.stderr | 49 ------ tests/ui/imports/ambiguous-5.rs | 1 - tests/ui/imports/ambiguous-5.stderr | 30 +--- tests/ui/imports/ambiguous-6.rs | 1 - tests/ui/imports/ambiguous-6.stderr | 34 +--- tests/ui/imports/ambiguous-9.rs | 2 - tests/ui/imports/ambiguous-9.stderr | 90 ++-------- .../ui/imports/ambiguous-panic-globvsglob.rs | 3 +- .../imports/ambiguous-panic-globvsglob.stderr | 30 +--- .../ui/imports/glob-conflict-cross-crate-3.rs | 1 - .../glob-conflict-cross-crate-3.stderr | 55 ++---- .../imports/unresolved-seg-after-ambiguous.rs | 4 +- .../unresolved-seg-after-ambiguous.stderr | 39 +--- 40 files changed, 199 insertions(+), 815 deletions(-) delete mode 100644 tests/ui/imports/ambiguous-2.rs delete mode 100644 tests/ui/imports/ambiguous-2.stderr delete mode 100644 tests/ui/imports/ambiguous-4.rs delete mode 100644 tests/ui/imports/ambiguous-4.stderr diff --git a/compiler/rustc_codegen_gcc/build_system/src/test.rs b/compiler/rustc_codegen_gcc/build_system/src/test.rs index 3f02df8399554..2475a3a6a7155 100644 --- a/compiler/rustc_codegen_gcc/build_system/src/test.rs +++ b/compiler/rustc_codegen_gcc/build_system/src/test.rs @@ -886,8 +886,6 @@ fn valid_ui_error_pattern_test(file: &str) -> bool { "type-alias-impl-trait/auxiliary/cross_crate_ice.rs", "type-alias-impl-trait/auxiliary/cross_crate_ice2.rs", "macros/rfc-2011-nicer-assert-messages/auxiliary/common.rs", - "imports/ambiguous-1.rs", - "imports/ambiguous-4-extern.rs", "entry-point/auxiliary/bad_main_functions.rs", ] .iter() diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs index caa41fd0f6ab3..8ddaf7a630d31 100644 --- a/compiler/rustc_lint_defs/src/builtin.rs +++ b/compiler/rustc_lint_defs/src/builtin.rs @@ -4529,28 +4529,21 @@ declare_lint! { /// /// ### Example /// - /// ```rust,compile_fail - /// #![deny(ambiguous_glob_imports)] - /// pub fn foo() -> u32 { - /// use sub::*; - /// C - /// } - /// - /// mod sub { - /// mod mod1 { pub const C: u32 = 1; } - /// mod mod2 { pub const C: u32 = 2; } + /// ```rust,ignore (needs extern crate) + /// // library crate `my_library` + /// mod mod1 { pub const C: u32 = 1; } + /// mod mod2 { pub const C: u32 = 2; } + /// pub use mod1::*; + /// pub use mod2::*; /// - /// pub use mod1::*; - /// pub use mod2::*; - /// } + /// // another crate using `my_library` + /// let c = my_library::C; // `C` is ambiguous /// ``` /// - /// {{produces}} - /// /// ### Explanation /// - /// Previous versions of Rust compile it successfully because it - /// had lost the ambiguity error when resolve `use sub::mod2::*`. + /// Previous versions of Rust compile it successfully because + /// ambiguous glob imports weren't preserved correctly over crate boundaries. /// /// This is a [future-incompatible] lint to transition this to a /// hard error in the future. diff --git a/compiler/rustc_resolve/src/build_reduced_graph.rs b/compiler/rustc_resolve/src/build_reduced_graph.rs index 43443e0ac3052..4fd98944909dc 100644 --- a/compiler/rustc_resolve/src/build_reduced_graph.rs +++ b/compiler/rustc_resolve/src/build_reduced_graph.rs @@ -52,7 +52,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { decl: Decl<'ra>, ) { if let Err(old_decl) = - self.try_plant_decl_into_local_module(ident, orig_ident_span, ns, decl, false) + self.try_plant_decl_into_local_module(ident, orig_ident_span, ns, decl) { self.report_conflict(ident, ns, old_decl, decl); } @@ -87,13 +87,11 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { vis: Visibility, span: Span, expansion: LocalExpnId, - ambiguity: Option>, + ambiguity: Option<(Decl<'ra>, bool)>, ) { let decl = self.arenas.alloc_decl(DeclData { kind: DeclKind::Def(res), ambiguity: CmCell::new(ambiguity), - // External ambiguities always report the `AMBIGUOUS_GLOB_IMPORTS` lint at the moment. - warn_ambiguity: CmCell::new(true), initial_vis: vis, ambiguity_vis_max: CmCell::new(None), ambiguity_vis_min: CmCell::new(None), @@ -392,7 +390,8 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { let ModChild { ident: _, res, vis, ref reexport_chain } = *ambig_child; let span = child_span(self, reexport_chain, res); let res = res.expect_non_local(); - self.arenas.new_def_decl(res, vis, span, expansion, Some(parent.to_module())) + // External ambiguities always report the `AMBIGUOUS_GLOB_IMPORTS` lint at the moment. + (self.arenas.new_def_decl(res, vis, span, expansion, Some(parent.to_module())), true) }); // Record primary definitions. diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index 85e8d6711e075..d75ae850ca33b 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -1188,7 +1188,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { .emit() } - fn def_path_str(&self, mut def_id: DefId) -> String { + pub(crate) fn def_path_str(&self, mut def_id: DefId) -> String { // We can't use `def_path_str` in resolve. let mut path = vec![def_id]; while let Some(parent) = self.tcx.opt_parent(def_id) { diff --git a/compiler/rustc_resolve/src/imports.rs b/compiler/rustc_resolve/src/imports.rs index c49e0fce630d4..89562fbd4cc3b 100644 --- a/compiler/rustc_resolve/src/imports.rs +++ b/compiler/rustc_resolve/src/imports.rs @@ -382,11 +382,9 @@ fn remove_same_import<'ra>(d1: Decl<'ra>, d2: Decl<'ra>) -> (Decl<'ra>, Decl<'ra assert_eq!(d1.span, d2.span); if d1.ambiguity.get() != d2.ambiguity.get() { assert!(d1.ambiguity.get().is_some()); - assert!(d2.ambiguity.get().is_none()); } // Visibility of the new import declaration may be different, // because it already incorporates the visibility of the source binding. - // `warn_ambiguity` of a re-fetched glob can also change in both directions. remove_same_import(d1_next, d2_next) } else { (d1, d2) @@ -450,7 +448,6 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { self.arenas.alloc_decl(DeclData { kind: DeclKind::Import { source_decl: decl, import }, ambiguity: CmCell::new(None), - warn_ambiguity: CmCell::new(false), span: import.span, initial_vis: vis.to_def_id(), ambiguity_vis_max: CmCell::new(None), @@ -460,14 +457,60 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { }) } + fn is_noise_0_7_0(&self, old_glob_decl: Decl<'ra>, glob_decl: Decl<'ra>) -> bool { + let DeclKind::Import { import: i1, .. } = glob_decl.kind else { unreachable!() }; + let DeclKind::Import { import: i2, .. } = old_glob_decl.kind else { unreachable!() }; + let [seg1, seg2] = &i1.module_path[..] else { return false }; + if seg1.ident.name != kw::SelfLower || seg2.ident.name.as_str() != "perlin_surflet" { + return false; + } + let [seg1, seg2] = &i2.module_path[..] else { return false }; + if seg1.ident.name != kw::SelfLower || seg2.ident.name.as_str() != "perlin" { + return false; + } + let Some(def_id1) = glob_decl.res().opt_def_id() else { return false }; + let Some(def_id2) = old_glob_decl.res().opt_def_id() else { return false }; + self.def_path_str(def_id1).ends_with("noise_fns::generators::perlin_surflet::Perlin") + && self.def_path_str(def_id2).ends_with("noise_fns::generators::perlin::Perlin") + } + + fn is_rustybuzz_0_4_0(&self, old_glob_decl: Decl<'ra>, glob_decl: Decl<'ra>) -> bool { + let DeclKind::Import { import: i1, .. } = glob_decl.kind else { unreachable!() }; + let DeclKind::Import { import: i2, .. } = old_glob_decl.kind else { unreachable!() }; + let [seg1, seg2] = &i1.module_path[..] else { return false }; + if seg1.ident.name != kw::Super || seg2.ident.name.as_str() != "gsubgpos" { + return false; + } + let [seg1] = &i2.module_path[..] else { return false }; + if seg1.ident.name != kw::Super { + return false; + } + let Some(def_id1) = glob_decl.res().opt_def_id() else { return false }; + let Some(def_id2) = old_glob_decl.res().opt_def_id() else { return false }; + self.def_path_str(def_id1).ends_with("tables::gsubgpos::Class") + && self.def_path_str(def_id2).ends_with("ggg::Class") + } + + fn is_pdf_0_9_0(&self, old_glob_decl: Decl<'ra>, glob_decl: Decl<'ra>) -> bool { + let DeclKind::Import { import: i1, .. } = glob_decl.kind else { unreachable!() }; + let DeclKind::Import { import: i2, .. } = old_glob_decl.kind else { unreachable!() }; + let [seg1, seg2] = &i1.module_path[..] else { return false }; + if seg1.ident.name != kw::Crate || seg2.ident.name.as_str() != "content" { + return false; + } + let [seg1, seg2] = &i2.module_path[..] else { return false }; + if seg1.ident.name != kw::Crate || seg2.ident.name.as_str() != "object" { + return false; + } + let Some(def_id1) = glob_decl.res().opt_def_id() else { return false }; + let Some(def_id2) = old_glob_decl.res().opt_def_id() else { return false }; + self.def_path_str(def_id1).ends_with("crate::content::Rect") + && self.def_path_str(def_id2).ends_with("crate::object::types::Rect") + } + /// If `glob_decl` attempts to overwrite `old_glob_decl` in a module, /// decide which one to keep. - fn select_glob_decl( - &self, - old_glob_decl: Decl<'ra>, - glob_decl: Decl<'ra>, - warn_ambiguity: bool, - ) -> Decl<'ra> { + fn select_glob_decl(&self, old_glob_decl: Decl<'ra>, glob_decl: Decl<'ra>) -> Decl<'ra> { assert!(glob_decl.is_glob_import()); assert!(old_glob_decl.is_glob_import()); assert_ne!(glob_decl, old_glob_decl); @@ -476,9 +519,6 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { // all these overwrites will be re-fetched by glob imports importing // from that module without generating new ambiguities. // - A glob decl is overwritten by a non-glob decl arriving later. - // - A glob decl is overwritten by its clone after setting ambiguity in it. - // FIXME: avoid this by removing `warn_ambiguity`, or by triggering glob re-fetch - // with the same decl in some way. // - A glob decl is overwritten by a glob decl re-fetching an // overwritten decl from other module (the recursive case). // Here we are detecting all such re-fetches and overwrite old decls @@ -489,29 +529,20 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { if deep_decl != glob_decl { // Some import layers have been removed, need to overwrite. assert_ne!(old_deep_decl, old_glob_decl); - // FIXME: reenable the asserts when `warn_ambiguity` is removed (#149195). - // assert_ne!(old_deep_decl, deep_decl); - // assert!(old_deep_decl.is_glob_import()); assert!(!deep_decl.is_glob_import()); - if old_glob_decl.ambiguity.get().is_some() && glob_decl.ambiguity.get().is_none() { + if let Some((old_ambig, _)) = old_glob_decl.ambiguity.get() + && glob_decl.ambiguity.get().is_none() + { // Do not lose glob ambiguities when re-fetching the glob. - glob_decl.ambiguity.set_unchecked(old_glob_decl.ambiguity.get()); - } - if glob_decl.is_ambiguity_recursive() { - glob_decl.warn_ambiguity.set_unchecked(true); + glob_decl.ambiguity.set_unchecked(Some((old_ambig, true))); } glob_decl } else if glob_decl.res() != old_glob_decl.res() { - old_glob_decl.ambiguity.set_unchecked(Some(glob_decl)); - old_glob_decl.warn_ambiguity.set_unchecked(warn_ambiguity); - if warn_ambiguity { - old_glob_decl - } else { - // Need a fresh decl so other glob imports importing it could re-fetch it - // and set their own `warn_ambiguity` to true. - // FIXME: remove this when `warn_ambiguity` is removed (#149195). - self.arenas.alloc_decl((*old_glob_decl).clone()) - } + let warning = self.is_noise_0_7_0(old_glob_decl, glob_decl) + || self.is_rustybuzz_0_4_0(old_glob_decl, glob_decl) + || self.is_pdf_0_9_0(old_glob_decl, glob_decl); + old_glob_decl.ambiguity.set_unchecked(Some((glob_decl, warning))); + old_glob_decl } else if let old_vis = old_glob_decl.vis() && let vis = glob_decl.vis() && old_vis != vis @@ -529,8 +560,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { old_glob_decl } else if glob_decl.is_ambiguity_recursive() && !old_glob_decl.is_ambiguity_recursive() { // Overwriting a non-ambiguous glob import with an ambiguous glob import. - old_glob_decl.ambiguity.set_unchecked(Some(glob_decl)); - old_glob_decl.warn_ambiguity.set_unchecked(true); + old_glob_decl.ambiguity.set_unchecked(Some((glob_decl, true))); old_glob_decl } else { old_glob_decl @@ -545,9 +575,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { orig_ident_span: Span, ns: Namespace, decl: Decl<'ra>, - warn_ambiguity: bool, ) -> Result<(), Decl<'ra>> { - assert!(!decl.warn_ambiguity.get()); assert!(decl.ambiguity.get().is_none()); assert!(decl.ambiguity_vis_max.get().is_none()); assert!(decl.ambiguity_vis_min.get().is_none()); @@ -562,31 +590,21 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { module.underscore_disambiguator.update_unchecked(|d| d + 1); module.underscore_disambiguator.get() }); - self.update_local_resolution( - module, - key, - orig_ident_span, - warn_ambiguity, - |this, resolution| { - if decl.is_glob_import() { - resolution.glob_decl = Some(match resolution.glob_decl { - Some(old_decl) => this.select_glob_decl( - old_decl, - decl, - warn_ambiguity && resolution.non_glob_decl.is_none(), - ), - None => decl, - }) - } else { - resolution.non_glob_decl = Some(match resolution.non_glob_decl { - Some(old_decl) => return Err(old_decl), - None => decl, - }) - } + self.update_local_resolution(module, key, orig_ident_span, |this, resolution| { + if decl.is_glob_import() { + resolution.glob_decl = Some(match resolution.glob_decl { + Some(old_decl) => this.select_glob_decl(old_decl, decl), + None => decl, + }); + } else { + resolution.non_glob_decl = Some(match resolution.non_glob_decl { + Some(old_decl) => return Err(old_decl), + None => decl, + }) + } - Ok(()) - }, - ) + Ok(()) + }) } // Use `f` to mutate the resolution of the name in the module. @@ -596,7 +614,6 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { module: LocalModule<'ra>, key: BindingKey, orig_ident_span: Span, - warn_ambiguity: bool, f: F, ) -> T where @@ -604,7 +621,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { { // Ensure that `resolution` isn't borrowed when defining in the module's glob importers, // during which the resolution might end up getting re-defined via a glob cycle. - let (binding, t, warn_ambiguity) = { + let (binding, t) = { let resolution = &mut *self .resolution_or_default(module.to_module(), key, orig_ident_span) .borrow_mut_unchecked(); @@ -616,7 +633,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { if let Some(binding) = resolution.determined_decl() && (old_decl != Some(binding) || old_vis != Some(binding.vis())) { - (binding, t, warn_ambiguity || old_decl.is_some()) + (binding, t) } else { return t; } @@ -639,14 +656,8 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { }; if self.is_accessible_from(binding.vis(), scope) { let import_decl = self.new_import_decl(binding, *import); - self.try_plant_decl_into_local_module( - ident, - orig_ident_span, - key.ns, - import_decl, - warn_ambiguity, - ) - .expect("planting a glob cannot fail"); + self.try_plant_decl_into_local_module(ident, orig_ident_span, key.ns, import_decl) + .expect("planting a glob cannot fail"); } } @@ -665,13 +676,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { self.per_ns(|this, ns| { let ident = IdentKey::new(target); // This can fail, dummies are inserted only in non-occupied slots. - let _ = this.try_plant_decl_into_local_module( - ident, - target.span, - ns, - dummy_decl, - false, - ); + let _ = this.try_plant_decl_into_local_module(ident, target.span, ns, dummy_decl); // Don't remove underscores from `single_imports`, they were never added. if target.name != kw::Underscore { let key = BindingKey::new(ident, ns); @@ -679,7 +684,6 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { import.parent_scope.module.expect_local(), key, target.span, - false, |_, resolution| { resolution.single_imports.swap_remove(&import); }, @@ -846,7 +850,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { } if let DeclKind::Import { import, .. } = binding.kind - && let Some(amb_binding) = binding.ambiguity.get() + && let Some((amb_binding, _)) = binding.ambiguity.get() && binding.res() != Res::Err && exported_ambiguities.contains(&binding) { @@ -1134,7 +1138,6 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { parent.expect_local(), key, target.span, - false, |_, resolution| { resolution.single_imports.swap_remove(&import); }, @@ -1820,16 +1823,11 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { }; if self.is_accessible_from(binding.vis(), scope) { let import_decl = self.new_import_decl(binding, import); - let warn_ambiguity = self - .resolution(import.parent_scope.module, key) - .and_then(|r| r.determined_decl()) - .is_some_and(|binding| binding.warn_ambiguity_recursive()); self.try_plant_decl_into_local_module( key.ident, orig_ident_span, key.ns, import_decl, - warn_ambiguity, ) .expect("planting a glob cannot fail"); } diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index f5f4c9e6e2580..e23e2c1499c94 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -996,10 +996,7 @@ impl<'ra> fmt::Debug for LocalModule<'ra> { #[derive(Clone, Debug)] struct DeclData<'ra> { kind: DeclKind<'ra>, - ambiguity: CmCell>>, - /// Produce a warning instead of an error when reporting ambiguities inside this binding. - /// May apply to indirect ambiguities under imports, so `ambiguity.is_some()` is not required. - warn_ambiguity: CmCell, + ambiguity: CmCell, bool /*warning*/)>>, expansion: LocalExpnId, span: Span, initial_vis: Visibility, @@ -1160,7 +1157,7 @@ impl<'ra> DeclData<'ra> { fn descent_to_ambiguity(self: Decl<'ra>) -> Option<(Decl<'ra>, Decl<'ra>)> { match self.ambiguity.get() { - Some(ambig_binding) => Some((self, ambig_binding)), + Some((ambig_binding, _)) => Some((self, ambig_binding)), None => match self.kind { DeclKind::Import { source_decl, .. } => source_decl.descent_to_ambiguity(), _ => None, @@ -1176,14 +1173,6 @@ impl<'ra> DeclData<'ra> { } } - fn warn_ambiguity_recursive(&self) -> bool { - self.warn_ambiguity.get() - || match self.kind { - DeclKind::Import { source_decl, .. } => source_decl.warn_ambiguity_recursive(), - _ => false, - } - } - fn is_possibly_imported_variant(&self) -> bool { match self.kind { DeclKind::Import { source_decl, .. } => source_decl.is_possibly_imported_variant(), @@ -1595,7 +1584,6 @@ impl<'ra> ResolverArenas<'ra> { self.alloc_decl(DeclData { kind: DeclKind::Def(res), ambiguity: CmCell::new(None), - warn_ambiguity: CmCell::new(false), initial_vis: vis, ambiguity_vis_max: CmCell::new(None), ambiguity_vis_min: CmCell::new(None), @@ -2261,17 +2249,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { } fn record_use(&mut self, ident: Ident, used_decl: Decl<'ra>, used: Used) { - self.record_use_inner(ident, used_decl, used, used_decl.warn_ambiguity.get()); - } - - fn record_use_inner( - &mut self, - ident: Ident, - used_decl: Decl<'ra>, - used: Used, - warn_ambiguity: bool, - ) { - if let Some(b2) = used_decl.ambiguity.get() { + if let Some((b2, warning)) = used_decl.ambiguity.get() { let ambiguity_error = AmbiguityError { kind: AmbiguityKind::GlobVsGlob, ambig_vis: None, @@ -2280,7 +2258,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { b2, scope1: Scope::ModuleGlobs(used_decl.parent_module.unwrap(), None), scope2: Scope::ModuleGlobs(b2.parent_module.unwrap(), None), - warning: if warn_ambiguity { Some(AmbiguityWarning::GlobImport) } else { None }, + warning: if warning { Some(AmbiguityWarning::GlobImport) } else { None }, }; if !self.matches_previous_ambiguity_error(&ambiguity_error) { // avoid duplicated span information to be emit out @@ -2330,12 +2308,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { self.used_imports.insert(id); } self.add_to_glob_map(import, ident.name); - self.record_use_inner( - ident, - source_decl, - Used::Other, - warn_ambiguity || source_decl.warn_ambiguity.get(), - ); + self.record_use(ident, source_decl, Used::Other); } } diff --git a/tests/ui/imports/ambiguous-1.rs b/tests/ui/imports/ambiguous-1.rs index 31f39eee62b9a..6c8e7da74f967 100644 --- a/tests/ui/imports/ambiguous-1.rs +++ b/tests/ui/imports/ambiguous-1.rs @@ -1,8 +1,5 @@ -//@ check-pass // https://github.com/rust-lang/rust/pull/112743#issuecomment-1601986883 -#![warn(ambiguous_glob_imports)] - macro_rules! m { () => { pub fn id() {} @@ -27,6 +24,5 @@ pub use openssl::*; fn main() { id(); - //~^ WARNING `id` is ambiguous - //~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + //~^ ERROR `id` is ambiguous } diff --git a/tests/ui/imports/ambiguous-1.stderr b/tests/ui/imports/ambiguous-1.stderr index 603a8938194b1..b891baafe5710 100644 --- a/tests/ui/imports/ambiguous-1.stderr +++ b/tests/ui/imports/ambiguous-1.stderr @@ -1,68 +1,34 @@ -warning: ambiguous glob re-exports - --> $DIR/ambiguous-1.rs:13:13 - | -LL | pub use self::evp::*; - | ^^^^^^^^^^^^ the name `id` in the value namespace is first re-exported here -LL | -LL | pub use self::handwritten::*; - | -------------------- but the name `id` in the value namespace is also re-exported here - | - = note: `#[warn(ambiguous_glob_reexports)]` on by default - -warning: `id` is ambiguous - --> $DIR/ambiguous-1.rs:29:5 +error[E0659]: `id` is ambiguous + --> $DIR/ambiguous-1.rs:26:5 | LL | id(); | ^^ ambiguous name | = note: ambiguous because of multiple glob imports of a name in the same module note: `id` could refer to the function imported here - --> $DIR/ambiguous-1.rs:13:13 + --> $DIR/ambiguous-1.rs:10:13 | LL | pub use self::evp::*; | ^^^^^^^^^^^^ = help: consider adding an explicit import of `id` to disambiguate note: `id` could also refer to the function imported here - --> $DIR/ambiguous-1.rs:15:13 + --> $DIR/ambiguous-1.rs:12:13 | LL | pub use self::handwritten::*; | ^^^^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `id` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 -note: the lint level is defined here - --> $DIR/ambiguous-1.rs:4:9 - | -LL | #![warn(ambiguous_glob_imports)] - | ^^^^^^^^^^^^^^^^^^^^^^ - -warning: 2 warnings emitted -Future incompatibility report: Future breakage diagnostic: -warning: `id` is ambiguous - --> $DIR/ambiguous-1.rs:29:5 - | -LL | id(); - | ^^ ambiguous name - | - = note: ambiguous because of multiple glob imports of a name in the same module -note: `id` could refer to the function imported here - --> $DIR/ambiguous-1.rs:13:13 +warning: ambiguous glob re-exports + --> $DIR/ambiguous-1.rs:10:13 | LL | pub use self::evp::*; - | ^^^^^^^^^^^^ - = help: consider adding an explicit import of `id` to disambiguate -note: `id` could also refer to the function imported here - --> $DIR/ambiguous-1.rs:15:13 - | + | ^^^^^^^^^^^^ the name `id` in the value namespace is first re-exported here +LL | LL | pub use self::handwritten::*; - | ^^^^^^^^^^^^^^^^^^^^ - = help: consider adding an explicit import of `id` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 -note: the lint level is defined here - --> $DIR/ambiguous-1.rs:4:9 + | -------------------- but the name `id` in the value namespace is also re-exported here | -LL | #![warn(ambiguous_glob_imports)] - | ^^^^^^^^^^^^^^^^^^^^^^ + = note: `#[warn(ambiguous_glob_reexports)]` on by default + +error: aborting due to 1 previous error; 1 warning emitted +For more information about this error, try `rustc --explain E0659`. diff --git a/tests/ui/imports/ambiguous-10.rs b/tests/ui/imports/ambiguous-10.rs index 166b01ede12d3..362633b2cb29c 100644 --- a/tests/ui/imports/ambiguous-10.rs +++ b/tests/ui/imports/ambiguous-10.rs @@ -14,5 +14,4 @@ use crate::a::*; use crate::b::*; fn c(_: Token) {} //~^ ERROR `Token` is ambiguous -//~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! fn main() { } diff --git a/tests/ui/imports/ambiguous-10.stderr b/tests/ui/imports/ambiguous-10.stderr index edd787785d9d8..e3f126d338c49 100644 --- a/tests/ui/imports/ambiguous-10.stderr +++ b/tests/ui/imports/ambiguous-10.stderr @@ -1,4 +1,4 @@ -error: `Token` is ambiguous +error[E0659]: `Token` is ambiguous --> $DIR/ambiguous-10.rs:15:9 | LL | fn c(_: Token) {} @@ -17,33 +17,7 @@ note: `Token` could also refer to the enum imported here LL | use crate::b::*; | ^^^^^^^^^^^ = help: consider adding an explicit import of `Token` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error -Future incompatibility report: Future breakage diagnostic: -error: `Token` is ambiguous - --> $DIR/ambiguous-10.rs:15:9 - | -LL | fn c(_: Token) {} - | ^^^^^ ambiguous name - | - = note: ambiguous because of multiple glob imports of a name in the same module -note: `Token` could refer to the enum imported here - --> $DIR/ambiguous-10.rs:13:5 - | -LL | use crate::a::*; - | ^^^^^^^^^^^ - = help: consider adding an explicit import of `Token` to disambiguate -note: `Token` could also refer to the enum imported here - --> $DIR/ambiguous-10.rs:14:5 - | -LL | use crate::b::*; - | ^^^^^^^^^^^ - = help: consider adding an explicit import of `Token` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default - +For more information about this error, try `rustc --explain E0659`. diff --git a/tests/ui/imports/ambiguous-12.rs b/tests/ui/imports/ambiguous-12.rs index 543396b8dfe5c..54bdf26e88cce 100644 --- a/tests/ui/imports/ambiguous-12.rs +++ b/tests/ui/imports/ambiguous-12.rs @@ -20,5 +20,4 @@ use crate::public::*; fn main() { b(); //~^ ERROR `b` is ambiguous - //~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! } diff --git a/tests/ui/imports/ambiguous-12.stderr b/tests/ui/imports/ambiguous-12.stderr index e20eec249965a..099abd66e8a3c 100644 --- a/tests/ui/imports/ambiguous-12.stderr +++ b/tests/ui/imports/ambiguous-12.stderr @@ -1,4 +1,4 @@ -error: `b` is ambiguous +error[E0659]: `b` is ambiguous --> $DIR/ambiguous-12.rs:21:5 | LL | b(); @@ -17,33 +17,7 @@ note: `b` could also refer to the function imported here LL | use crate::public::*; | ^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `b` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error -Future incompatibility report: Future breakage diagnostic: -error: `b` is ambiguous - --> $DIR/ambiguous-12.rs:21:5 - | -LL | b(); - | ^ ambiguous name - | - = note: ambiguous because of multiple glob imports of a name in the same module -note: `b` could refer to the function imported here - --> $DIR/ambiguous-12.rs:17:5 - | -LL | use crate::ciphertext::*; - | ^^^^^^^^^^^^^^^^^^^^ - = help: consider adding an explicit import of `b` to disambiguate -note: `b` could also refer to the function imported here - --> $DIR/ambiguous-12.rs:18:5 - | -LL | use crate::public::*; - | ^^^^^^^^^^^^^^^^ - = help: consider adding an explicit import of `b` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default - +For more information about this error, try `rustc --explain E0659`. diff --git a/tests/ui/imports/ambiguous-13.rs b/tests/ui/imports/ambiguous-13.rs index 3569dd5d9adc2..7dc617ce48768 100644 --- a/tests/ui/imports/ambiguous-13.rs +++ b/tests/ui/imports/ambiguous-13.rs @@ -17,5 +17,4 @@ use crate::content::*; fn a(_: Rect) {} //~^ ERROR `Rect` is ambiguous -//~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! fn main() { } diff --git a/tests/ui/imports/ambiguous-13.stderr b/tests/ui/imports/ambiguous-13.stderr index c1dfac5eb4332..1d105eec0e36f 100644 --- a/tests/ui/imports/ambiguous-13.stderr +++ b/tests/ui/imports/ambiguous-13.stderr @@ -1,4 +1,4 @@ -error: `Rect` is ambiguous +error[E0659]: `Rect` is ambiguous --> $DIR/ambiguous-13.rs:18:9 | LL | fn a(_: Rect) {} @@ -17,33 +17,7 @@ note: `Rect` could also refer to the struct imported here LL | use crate::content::*; | ^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `Rect` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error -Future incompatibility report: Future breakage diagnostic: -error: `Rect` is ambiguous - --> $DIR/ambiguous-13.rs:18:9 - | -LL | fn a(_: Rect) {} - | ^^^^ ambiguous name - | - = note: ambiguous because of multiple glob imports of a name in the same module -note: `Rect` could refer to the struct imported here - --> $DIR/ambiguous-13.rs:15:5 - | -LL | use crate::object::*; - | ^^^^^^^^^^^^^^^^ - = help: consider adding an explicit import of `Rect` to disambiguate -note: `Rect` could also refer to the struct imported here - --> $DIR/ambiguous-13.rs:16:5 - | -LL | use crate::content::*; - | ^^^^^^^^^^^^^^^^^ - = help: consider adding an explicit import of `Rect` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default - +For more information about this error, try `rustc --explain E0659`. diff --git a/tests/ui/imports/ambiguous-15.rs b/tests/ui/imports/ambiguous-15.rs index 07d8893b2dead..72c2940573c6b 100644 --- a/tests/ui/imports/ambiguous-15.rs +++ b/tests/ui/imports/ambiguous-15.rs @@ -21,6 +21,5 @@ mod t3 { use self::t3::*; fn a(_: E) {} //~^ ERROR `Error` is ambiguous -//~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! fn main() {} diff --git a/tests/ui/imports/ambiguous-15.stderr b/tests/ui/imports/ambiguous-15.stderr index cb9f6ebde1fb1..fb3551d76274c 100644 --- a/tests/ui/imports/ambiguous-15.stderr +++ b/tests/ui/imports/ambiguous-15.stderr @@ -1,4 +1,4 @@ -error: `Error` is ambiguous +error[E0659]: `Error` is ambiguous --> $DIR/ambiguous-15.rs:22:9 | LL | fn a(_: E) {} @@ -17,33 +17,7 @@ note: `Error` could also refer to the enum imported here LL | pub use t2::*; | ^^^^^ = help: consider adding an explicit import of `Error` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error -Future incompatibility report: Future breakage diagnostic: -error: `Error` is ambiguous - --> $DIR/ambiguous-15.rs:22:9 - | -LL | fn a(_: E) {} - | ^^^^^ ambiguous name - | - = note: ambiguous because of multiple glob imports of a name in the same module -note: `Error` could refer to the trait imported here - --> $DIR/ambiguous-15.rs:21:5 - | -LL | use self::t3::*; - | ^^^^^^^^^^^ - = help: consider adding an explicit import of `Error` to disambiguate -note: `Error` could also refer to the enum imported here - --> $DIR/ambiguous-15.rs:15:9 - | -LL | pub use t2::*; - | ^^^^^ - = help: consider adding an explicit import of `Error` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default - +For more information about this error, try `rustc --explain E0659`. diff --git a/tests/ui/imports/ambiguous-16.rs b/tests/ui/imports/ambiguous-16.rs index f31c78d18a380..a20c0e340d601 100644 --- a/tests/ui/imports/ambiguous-16.rs +++ b/tests/ui/imports/ambiguous-16.rs @@ -21,6 +21,5 @@ mod framing { use crate::framing::ConfirmedTranscriptHashInput; //~^ ERROR `ConfirmedTranscriptHashInput` is ambiguous -//~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! fn main() { } diff --git a/tests/ui/imports/ambiguous-16.stderr b/tests/ui/imports/ambiguous-16.stderr index cad19b8f7a16b..c18242d4a3cfc 100644 --- a/tests/ui/imports/ambiguous-16.stderr +++ b/tests/ui/imports/ambiguous-16.stderr @@ -1,4 +1,4 @@ -error: `ConfirmedTranscriptHashInput` is ambiguous +error[E0659]: `ConfirmedTranscriptHashInput` is ambiguous --> $DIR/ambiguous-16.rs:22:21 | LL | use crate::framing::ConfirmedTranscriptHashInput; @@ -17,33 +17,7 @@ note: `ConfirmedTranscriptHashInput` could also refer to the struct imported her LL | pub use self::public_message_in::*; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `ConfirmedTranscriptHashInput` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error -Future incompatibility report: Future breakage diagnostic: -error: `ConfirmedTranscriptHashInput` is ambiguous - --> $DIR/ambiguous-16.rs:22:21 - | -LL | use crate::framing::ConfirmedTranscriptHashInput; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ambiguous name - | - = note: ambiguous because of multiple glob imports of a name in the same module -note: `ConfirmedTranscriptHashInput` could refer to the struct imported here - --> $DIR/ambiguous-16.rs:18:13 - | -LL | pub use self::public_message::*; - | ^^^^^^^^^^^^^^^^^^^^^^^ - = help: consider adding an explicit import of `ConfirmedTranscriptHashInput` to disambiguate -note: `ConfirmedTranscriptHashInput` could also refer to the struct imported here - --> $DIR/ambiguous-16.rs:19:13 - | -LL | pub use self::public_message_in::*; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - = help: consider adding an explicit import of `ConfirmedTranscriptHashInput` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default - +For more information about this error, try `rustc --explain E0659`. diff --git a/tests/ui/imports/ambiguous-17.rs b/tests/ui/imports/ambiguous-17.rs index 3a51c156d34ca..5ba51ce714b75 100644 --- a/tests/ui/imports/ambiguous-17.rs +++ b/tests/ui/imports/ambiguous-17.rs @@ -25,5 +25,4 @@ mod handwritten { fn main() { id(); //~^ ERROR `id` is ambiguous - //~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! } diff --git a/tests/ui/imports/ambiguous-17.stderr b/tests/ui/imports/ambiguous-17.stderr index 80d152fe53440..b46a9430d2a7c 100644 --- a/tests/ui/imports/ambiguous-17.stderr +++ b/tests/ui/imports/ambiguous-17.stderr @@ -1,14 +1,4 @@ -warning: ambiguous glob re-exports - --> $DIR/ambiguous-17.rs:4:9 - | -LL | pub use evp::*; - | ^^^^^^ the name `id` in the value namespace is first re-exported here -LL | pub use handwritten::*; - | -------------- but the name `id` in the value namespace is also re-exported here - | - = note: `#[warn(ambiguous_glob_reexports)]` on by default - -error: `id` is ambiguous +error[E0659]: `id` is ambiguous --> $DIR/ambiguous-17.rs:26:5 | LL | id(); @@ -27,33 +17,17 @@ note: `id` could also refer to the function imported here LL | pub use handwritten::*; | ^^^^^^^^^^^^^^ = help: consider adding an explicit import of `id` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default - -error: aborting due to 1 previous error; 1 warning emitted -Future incompatibility report: Future breakage diagnostic: -error: `id` is ambiguous - --> $DIR/ambiguous-17.rs:26:5 - | -LL | id(); - | ^^ ambiguous name - | - = note: ambiguous because of multiple glob imports of a name in the same module -note: `id` could refer to the function imported here +warning: ambiguous glob re-exports --> $DIR/ambiguous-17.rs:4:9 | LL | pub use evp::*; - | ^^^^^^ - = help: consider adding an explicit import of `id` to disambiguate -note: `id` could also refer to the function imported here - --> $DIR/ambiguous-17.rs:5:9 - | + | ^^^^^^ the name `id` in the value namespace is first re-exported here LL | pub use handwritten::*; - | ^^^^^^^^^^^^^^ - = help: consider adding an explicit import of `id` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default + | -------------- but the name `id` in the value namespace is also re-exported here + | + = note: `#[warn(ambiguous_glob_reexports)]` on by default + +error: aborting due to 1 previous error; 1 warning emitted +For more information about this error, try `rustc --explain E0659`. diff --git a/tests/ui/imports/ambiguous-2.rs b/tests/ui/imports/ambiguous-2.rs deleted file mode 100644 index 65c971c00b9ac..0000000000000 --- a/tests/ui/imports/ambiguous-2.rs +++ /dev/null @@ -1,9 +0,0 @@ -//@ aux-build: ../ambiguous-1.rs -// https://github.com/rust-lang/rust/pull/113099#issuecomment-1633574396 - -extern crate ambiguous_1; - -fn main() { - ambiguous_1::id(); //~ ERROR `id` is ambiguous - //~| WARN this was previously accepted -} diff --git a/tests/ui/imports/ambiguous-2.stderr b/tests/ui/imports/ambiguous-2.stderr deleted file mode 100644 index a07f09c41475b..0000000000000 --- a/tests/ui/imports/ambiguous-2.stderr +++ /dev/null @@ -1,49 +0,0 @@ -error: `id` is ambiguous - --> $DIR/ambiguous-2.rs:7:18 - | -LL | ambiguous_1::id(); - | ^^ ambiguous name - | - = note: ambiguous because of multiple glob imports of a name in the same module -note: `id` could refer to the function defined here - --> $DIR/auxiliary/../ambiguous-1.rs:13:13 - | -LL | pub use self::evp::*; - | ^^^^^^^^^ - = help: consider updating this dependency to resolve this error - = help: if updating the dependency does not resolve the problem report the problem to the author of the relevant crate -note: `id` could also refer to the function defined here - --> $DIR/auxiliary/../ambiguous-1.rs:15:13 - | -LL | pub use self::handwritten::*; - | ^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default - -error: aborting due to 1 previous error - -Future incompatibility report: Future breakage diagnostic: -error: `id` is ambiguous - --> $DIR/ambiguous-2.rs:7:18 - | -LL | ambiguous_1::id(); - | ^^ ambiguous name - | - = note: ambiguous because of multiple glob imports of a name in the same module -note: `id` could refer to the function defined here - --> $DIR/auxiliary/../ambiguous-1.rs:13:13 - | -LL | pub use self::evp::*; - | ^^^^^^^^^ - = help: consider updating this dependency to resolve this error - = help: if updating the dependency does not resolve the problem report the problem to the author of the relevant crate -note: `id` could also refer to the function defined here - --> $DIR/auxiliary/../ambiguous-1.rs:15:13 - | -LL | pub use self::handwritten::*; - | ^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default - diff --git a/tests/ui/imports/ambiguous-3.rs b/tests/ui/imports/ambiguous-3.rs index ff0dcc221ec05..4919d9fbac63d 100644 --- a/tests/ui/imports/ambiguous-3.rs +++ b/tests/ui/imports/ambiguous-3.rs @@ -4,7 +4,6 @@ fn main() { use a::*; x(); //~^ ERROR `x` is ambiguous - //~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! } mod a { diff --git a/tests/ui/imports/ambiguous-3.stderr b/tests/ui/imports/ambiguous-3.stderr index 1e4aad83d985b..6c3031a9807aa 100644 --- a/tests/ui/imports/ambiguous-3.stderr +++ b/tests/ui/imports/ambiguous-3.stderr @@ -1,4 +1,4 @@ -error: `x` is ambiguous +error[E0659]: `x` is ambiguous --> $DIR/ambiguous-3.rs:5:5 | LL | x(); @@ -6,44 +6,18 @@ LL | x(); | = note: ambiguous because of multiple glob imports of a name in the same module note: `x` could refer to the function imported here - --> $DIR/ambiguous-3.rs:18:13 + --> $DIR/ambiguous-3.rs:17:13 | LL | pub use self::b::*; | ^^^^^^^^^^ = help: consider adding an explicit import of `x` to disambiguate note: `x` could also refer to the function imported here - --> $DIR/ambiguous-3.rs:19:13 + --> $DIR/ambiguous-3.rs:18:13 | LL | pub use self::c::*; | ^^^^^^^^^^ = help: consider adding an explicit import of `x` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error -Future incompatibility report: Future breakage diagnostic: -error: `x` is ambiguous - --> $DIR/ambiguous-3.rs:5:5 - | -LL | x(); - | ^ ambiguous name - | - = note: ambiguous because of multiple glob imports of a name in the same module -note: `x` could refer to the function imported here - --> $DIR/ambiguous-3.rs:18:13 - | -LL | pub use self::b::*; - | ^^^^^^^^^^ - = help: consider adding an explicit import of `x` to disambiguate -note: `x` could also refer to the function imported here - --> $DIR/ambiguous-3.rs:19:13 - | -LL | pub use self::c::*; - | ^^^^^^^^^^ - = help: consider adding an explicit import of `x` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default - +For more information about this error, try `rustc --explain E0659`. diff --git a/tests/ui/imports/ambiguous-4-extern.rs b/tests/ui/imports/ambiguous-4-extern.rs index 125612dea03e5..a062b38df617e 100644 --- a/tests/ui/imports/ambiguous-4-extern.rs +++ b/tests/ui/imports/ambiguous-4-extern.rs @@ -1,9 +1,6 @@ //@ edition:2015 -//@ check-pass // https://github.com/rust-lang/rust/pull/112743#issuecomment-1601986883 -#![warn(ambiguous_glob_imports)] - macro_rules! m { () => { pub fn id() {} @@ -24,6 +21,5 @@ mod handwritten { fn main() { id(); - //~^ WARNING `id` is ambiguous - //~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + //~^ ERROR `id` is ambiguous } diff --git a/tests/ui/imports/ambiguous-4-extern.stderr b/tests/ui/imports/ambiguous-4-extern.stderr index 4658071363e91..dae8432118f45 100644 --- a/tests/ui/imports/ambiguous-4-extern.stderr +++ b/tests/ui/imports/ambiguous-4-extern.stderr @@ -1,67 +1,33 @@ -warning: ambiguous glob re-exports - --> $DIR/ambiguous-4-extern.rs:13:9 - | -LL | pub use evp::*; - | ^^^^^^ the name `id` in the value namespace is first re-exported here -LL | pub use handwritten::*; - | -------------- but the name `id` in the value namespace is also re-exported here - | - = note: `#[warn(ambiguous_glob_reexports)]` on by default - -warning: `id` is ambiguous - --> $DIR/ambiguous-4-extern.rs:26:5 +error[E0659]: `id` is ambiguous + --> $DIR/ambiguous-4-extern.rs:23:5 | LL | id(); | ^^ ambiguous name | = note: ambiguous because of multiple glob imports of a name in the same module note: `id` could refer to the function imported here - --> $DIR/ambiguous-4-extern.rs:13:9 + --> $DIR/ambiguous-4-extern.rs:10:9 | LL | pub use evp::*; | ^^^^^^ = help: consider adding an explicit import of `id` to disambiguate note: `id` could also refer to the function imported here - --> $DIR/ambiguous-4-extern.rs:14:9 + --> $DIR/ambiguous-4-extern.rs:11:9 | LL | pub use handwritten::*; | ^^^^^^^^^^^^^^ = help: consider adding an explicit import of `id` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 -note: the lint level is defined here - --> $DIR/ambiguous-4-extern.rs:5:9 - | -LL | #![warn(ambiguous_glob_imports)] - | ^^^^^^^^^^^^^^^^^^^^^^ - -warning: 2 warnings emitted -Future incompatibility report: Future breakage diagnostic: -warning: `id` is ambiguous - --> $DIR/ambiguous-4-extern.rs:26:5 - | -LL | id(); - | ^^ ambiguous name - | - = note: ambiguous because of multiple glob imports of a name in the same module -note: `id` could refer to the function imported here - --> $DIR/ambiguous-4-extern.rs:13:9 +warning: ambiguous glob re-exports + --> $DIR/ambiguous-4-extern.rs:10:9 | LL | pub use evp::*; - | ^^^^^^ - = help: consider adding an explicit import of `id` to disambiguate -note: `id` could also refer to the function imported here - --> $DIR/ambiguous-4-extern.rs:14:9 - | + | ^^^^^^ the name `id` in the value namespace is first re-exported here LL | pub use handwritten::*; - | ^^^^^^^^^^^^^^ - = help: consider adding an explicit import of `id` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 -note: the lint level is defined here - --> $DIR/ambiguous-4-extern.rs:5:9 + | -------------- but the name `id` in the value namespace is also re-exported here | -LL | #![warn(ambiguous_glob_imports)] - | ^^^^^^^^^^^^^^^^^^^^^^ + = note: `#[warn(ambiguous_glob_reexports)]` on by default + +error: aborting due to 1 previous error; 1 warning emitted +For more information about this error, try `rustc --explain E0659`. diff --git a/tests/ui/imports/ambiguous-4.rs b/tests/ui/imports/ambiguous-4.rs deleted file mode 100644 index e66d231f93cc3..0000000000000 --- a/tests/ui/imports/ambiguous-4.rs +++ /dev/null @@ -1,9 +0,0 @@ -//@ edition:2015 -//@ aux-build: ../ambiguous-4-extern.rs - -extern crate ambiguous_4_extern; - -fn main() { - ambiguous_4_extern::id(); //~ ERROR `id` is ambiguous - //~| WARN this was previously accepted -} diff --git a/tests/ui/imports/ambiguous-4.stderr b/tests/ui/imports/ambiguous-4.stderr deleted file mode 100644 index 0d207665ca776..0000000000000 --- a/tests/ui/imports/ambiguous-4.stderr +++ /dev/null @@ -1,49 +0,0 @@ -error: `id` is ambiguous - --> $DIR/ambiguous-4.rs:7:25 - | -LL | ambiguous_4_extern::id(); - | ^^ ambiguous name - | - = note: ambiguous because of multiple glob imports of a name in the same module -note: `id` could refer to the function defined here - --> $DIR/auxiliary/../ambiguous-4-extern.rs:13:9 - | -LL | pub use evp::*; - | ^^^ - = help: consider updating this dependency to resolve this error - = help: if updating the dependency does not resolve the problem report the problem to the author of the relevant crate -note: `id` could also refer to the function defined here - --> $DIR/auxiliary/../ambiguous-4-extern.rs:14:9 - | -LL | pub use handwritten::*; - | ^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default - -error: aborting due to 1 previous error - -Future incompatibility report: Future breakage diagnostic: -error: `id` is ambiguous - --> $DIR/ambiguous-4.rs:7:25 - | -LL | ambiguous_4_extern::id(); - | ^^ ambiguous name - | - = note: ambiguous because of multiple glob imports of a name in the same module -note: `id` could refer to the function defined here - --> $DIR/auxiliary/../ambiguous-4-extern.rs:13:9 - | -LL | pub use evp::*; - | ^^^ - = help: consider updating this dependency to resolve this error - = help: if updating the dependency does not resolve the problem report the problem to the author of the relevant crate -note: `id` could also refer to the function defined here - --> $DIR/auxiliary/../ambiguous-4-extern.rs:14:9 - | -LL | pub use handwritten::*; - | ^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default - diff --git a/tests/ui/imports/ambiguous-5.rs b/tests/ui/imports/ambiguous-5.rs index 8f89c966d4a5d..a88dbf46ddab9 100644 --- a/tests/ui/imports/ambiguous-5.rs +++ b/tests/ui/imports/ambiguous-5.rs @@ -11,7 +11,6 @@ mod gpos { use super::*; struct MarkRecord(Class); //~^ ERROR`Class` is ambiguous - //~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! } mod gsubgpos { diff --git a/tests/ui/imports/ambiguous-5.stderr b/tests/ui/imports/ambiguous-5.stderr index 8cc37c65c4c4d..e2dfe4d2dea85 100644 --- a/tests/ui/imports/ambiguous-5.stderr +++ b/tests/ui/imports/ambiguous-5.stderr @@ -1,4 +1,4 @@ -error: `Class` is ambiguous +error[E0659]: `Class` is ambiguous --> $DIR/ambiguous-5.rs:12:23 | LL | struct MarkRecord(Class); @@ -17,33 +17,7 @@ note: `Class` could also refer to the struct imported here LL | use super::gsubgpos::*; | ^^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `Class` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error -Future incompatibility report: Future breakage diagnostic: -error: `Class` is ambiguous - --> $DIR/ambiguous-5.rs:12:23 - | -LL | struct MarkRecord(Class); - | ^^^^^ ambiguous name - | - = note: ambiguous because of multiple glob imports of a name in the same module -note: `Class` could refer to the struct imported here - --> $DIR/ambiguous-5.rs:11:9 - | -LL | use super::*; - | ^^^^^^^^ - = help: consider adding an explicit import of `Class` to disambiguate -note: `Class` could also refer to the struct imported here - --> $DIR/ambiguous-5.rs:10:9 - | -LL | use super::gsubgpos::*; - | ^^^^^^^^^^^^^^^^^^ - = help: consider adding an explicit import of `Class` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default - +For more information about this error, try `rustc --explain E0659`. diff --git a/tests/ui/imports/ambiguous-6.rs b/tests/ui/imports/ambiguous-6.rs index 1c6e34377165a..71667a8f3bb80 100644 --- a/tests/ui/imports/ambiguous-6.rs +++ b/tests/ui/imports/ambiguous-6.rs @@ -5,7 +5,6 @@ pub fn foo() -> u32 { use sub::*; C //~^ ERROR `C` is ambiguous - //~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! } mod sub { diff --git a/tests/ui/imports/ambiguous-6.stderr b/tests/ui/imports/ambiguous-6.stderr index ea5b2d2f19b80..f1a4fb694c9a0 100644 --- a/tests/ui/imports/ambiguous-6.stderr +++ b/tests/ui/imports/ambiguous-6.stderr @@ -1,4 +1,4 @@ -error: `C` is ambiguous +error[E0659]: `C` is ambiguous --> $DIR/ambiguous-6.rs:6:5 | LL | C @@ -6,44 +6,18 @@ LL | C | = note: ambiguous because of multiple glob imports of a name in the same module note: `C` could refer to the constant imported here - --> $DIR/ambiguous-6.rs:15:13 + --> $DIR/ambiguous-6.rs:14:13 | LL | pub use mod1::*; | ^^^^^^^ = help: consider adding an explicit import of `C` to disambiguate note: `C` could also refer to the constant imported here - --> $DIR/ambiguous-6.rs:16:13 + --> $DIR/ambiguous-6.rs:15:13 | LL | pub use mod2::*; | ^^^^^^^ = help: consider adding an explicit import of `C` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error -Future incompatibility report: Future breakage diagnostic: -error: `C` is ambiguous - --> $DIR/ambiguous-6.rs:6:5 - | -LL | C - | ^ ambiguous name - | - = note: ambiguous because of multiple glob imports of a name in the same module -note: `C` could refer to the constant imported here - --> $DIR/ambiguous-6.rs:15:13 - | -LL | pub use mod1::*; - | ^^^^^^^ - = help: consider adding an explicit import of `C` to disambiguate -note: `C` could also refer to the constant imported here - --> $DIR/ambiguous-6.rs:16:13 - | -LL | pub use mod2::*; - | ^^^^^^^ - = help: consider adding an explicit import of `C` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default - +For more information about this error, try `rustc --explain E0659`. diff --git a/tests/ui/imports/ambiguous-9.rs b/tests/ui/imports/ambiguous-9.rs index c10b1268060ce..58796031bf18f 100644 --- a/tests/ui/imports/ambiguous-9.rs +++ b/tests/ui/imports/ambiguous-9.rs @@ -22,7 +22,5 @@ use prelude::*; fn main() { date_range(); //~^ ERROR `date_range` is ambiguous - //~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! //~| ERROR `date_range` is ambiguous - //~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! } diff --git a/tests/ui/imports/ambiguous-9.stderr b/tests/ui/imports/ambiguous-9.stderr index bbbce638a44dc..b6e4c30a8d410 100644 --- a/tests/ui/imports/ambiguous-9.stderr +++ b/tests/ui/imports/ambiguous-9.stderr @@ -1,45 +1,4 @@ -warning: ambiguous glob re-exports - --> $DIR/ambiguous-9.rs:7:13 - | -LL | pub use self::range::*; - | ^^^^^^^^^^^^^^ the name `date_range` in the value namespace is first re-exported here -LL | use super::prelude::*; - | ----------------- but the name `date_range` in the value namespace is also re-exported here - | - = note: `#[warn(ambiguous_glob_reexports)]` on by default - -error: `date_range` is ambiguous - --> $DIR/ambiguous-9.rs:23:5 - | -LL | date_range(); - | ^^^^^^^^^^ ambiguous name - | - = note: ambiguous because of multiple glob imports of a name in the same module -note: `date_range` could refer to the function imported here - --> $DIR/ambiguous-9.rs:7:13 - | -LL | pub use self::range::*; - | ^^^^^^^^^^^^^^ - = help: consider adding an explicit import of `date_range` to disambiguate -note: `date_range` could also refer to the function imported here - --> $DIR/ambiguous-9.rs:8:9 - | -LL | use super::prelude::*; - | ^^^^^^^^^^^^^^^^^ - = help: consider adding an explicit import of `date_range` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default - -warning: ambiguous glob re-exports - --> $DIR/ambiguous-9.rs:15:13 - | -LL | pub use self::t::*; - | ^^^^^^^^^^ the name `date_range` in the value namespace is first re-exported here -LL | pub use super::dsl::*; - | ------------- but the name `date_range` in the value namespace is also re-exported here - -error: `date_range` is ambiguous +error[E0659]: `date_range` is ambiguous --> $DIR/ambiguous-9.rs:23:5 | LL | date_range(); @@ -58,13 +17,8 @@ note: `date_range` could also refer to the function imported here LL | use prelude::*; | ^^^^^^^^^^ = help: consider adding an explicit import of `date_range` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 -error: aborting due to 2 previous errors; 2 warnings emitted - -Future incompatibility report: Future breakage diagnostic: -error: `date_range` is ambiguous +error[E0659]: `date_range` is ambiguous --> $DIR/ambiguous-9.rs:23:5 | LL | date_range(); @@ -83,31 +37,25 @@ note: `date_range` could also refer to the function imported here LL | use super::prelude::*; | ^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `date_range` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default -Future breakage diagnostic: -error: `date_range` is ambiguous - --> $DIR/ambiguous-9.rs:23:5 - | -LL | date_range(); - | ^^^^^^^^^^ ambiguous name +warning: ambiguous glob re-exports + --> $DIR/ambiguous-9.rs:7:13 | - = note: ambiguous because of multiple glob imports of a name in the same module -note: `date_range` could refer to the function imported here - --> $DIR/ambiguous-9.rs:19:5 +LL | pub use self::range::*; + | ^^^^^^^^^^^^^^ the name `date_range` in the value namespace is first re-exported here +LL | use super::prelude::*; + | ----------------- but the name `date_range` in the value namespace is also re-exported here | -LL | use dsl::*; - | ^^^^^^ - = help: consider adding an explicit import of `date_range` to disambiguate -note: `date_range` could also refer to the function imported here - --> $DIR/ambiguous-9.rs:20:5 + = note: `#[warn(ambiguous_glob_reexports)]` on by default + +warning: ambiguous glob re-exports + --> $DIR/ambiguous-9.rs:15:13 | -LL | use prelude::*; - | ^^^^^^^^^^ - = help: consider adding an explicit import of `date_range` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default +LL | pub use self::t::*; + | ^^^^^^^^^^ the name `date_range` in the value namespace is first re-exported here +LL | pub use super::dsl::*; + | ------------- but the name `date_range` in the value namespace is also re-exported here + +error: aborting due to 2 previous errors; 2 warnings emitted +For more information about this error, try `rustc --explain E0659`. diff --git a/tests/ui/imports/ambiguous-panic-globvsglob.rs b/tests/ui/imports/ambiguous-panic-globvsglob.rs index 4ff3cc8225355..4b35d6014b06b 100644 --- a/tests/ui/imports/ambiguous-panic-globvsglob.rs +++ b/tests/ui/imports/ambiguous-panic-globvsglob.rs @@ -18,6 +18,5 @@ fn foo() { panic!(); //~^ WARN: `panic` is ambiguous [ambiguous_panic_imports] //~| WARN: this was previously accepted by the compiler - //~| ERROR: `panic` is ambiguous [ambiguous_glob_imports] - //~| WARN: this was previously accepted by the compiler + //~| ERROR: `panic` is ambiguous } diff --git a/tests/ui/imports/ambiguous-panic-globvsglob.stderr b/tests/ui/imports/ambiguous-panic-globvsglob.stderr index 981c9b05b9eb4..8fd785277533c 100644 --- a/tests/ui/imports/ambiguous-panic-globvsglob.stderr +++ b/tests/ui/imports/ambiguous-panic-globvsglob.stderr @@ -1,4 +1,4 @@ -error: `panic` is ambiguous +error[E0659]: `panic` is ambiguous --> $DIR/ambiguous-panic-globvsglob.rs:18:5 | LL | panic!(); @@ -17,9 +17,6 @@ note: `panic` could also refer to the macro imported here LL | use m2::*; | ^^^^^ = help: consider adding an explicit import of `panic` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default warning: `panic` is ambiguous --> $DIR/ambiguous-panic-globvsglob.rs:18:5 @@ -42,27 +39,4 @@ note: `panic` could also refer to a macro from prelude error: aborting due to 1 previous error; 1 warning emitted -Future incompatibility report: Future breakage diagnostic: -error: `panic` is ambiguous - --> $DIR/ambiguous-panic-globvsglob.rs:18:5 - | -LL | panic!(); - | ^^^^^ ambiguous name - | - = note: ambiguous because of multiple glob imports of a name in the same module -note: `panic` could refer to the macro imported here - --> $DIR/ambiguous-panic-globvsglob.rs:12:9 - | -LL | use m1::*; - | ^^^^^ - = help: consider adding an explicit import of `panic` to disambiguate -note: `panic` could also refer to the macro imported here - --> $DIR/ambiguous-panic-globvsglob.rs:13:9 - | -LL | use m2::*; - | ^^^^^ - = help: consider adding an explicit import of `panic` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default - +For more information about this error, try `rustc --explain E0659`. diff --git a/tests/ui/imports/glob-conflict-cross-crate-3.rs b/tests/ui/imports/glob-conflict-cross-crate-3.rs index 31c234b9250fc..74415cfd9bb36 100644 --- a/tests/ui/imports/glob-conflict-cross-crate-3.rs +++ b/tests/ui/imports/glob-conflict-cross-crate-3.rs @@ -14,5 +14,4 @@ fn main() { //~^ ERROR `C` is ambiguous //~| ERROR `C` is ambiguous //~| WARN this was previously accepted - //~| WARN this was previously accepted } diff --git a/tests/ui/imports/glob-conflict-cross-crate-3.stderr b/tests/ui/imports/glob-conflict-cross-crate-3.stderr index 8a9ece94deeb1..50a9adc097e47 100644 --- a/tests/ui/imports/glob-conflict-cross-crate-3.stderr +++ b/tests/ui/imports/glob-conflict-cross-crate-3.stderr @@ -1,27 +1,4 @@ -error: `C` is ambiguous - --> $DIR/glob-conflict-cross-crate-3.rs:13:13 - | -LL | let _a: C = 1; - | ^ ambiguous name - | - = note: ambiguous because of multiple glob imports of a name in the same module -note: `C` could refer to the type alias defined here - --> $DIR/auxiliary/glob-conflict-cross-crate-2-extern.rs:9:9 - | -LL | pub use a::*; - | ^ - = help: consider updating this dependency to resolve this error - = help: if updating the dependency does not resolve the problem report the problem to the author of the relevant crate -note: `C` could also refer to the type alias defined here - --> $DIR/auxiliary/glob-conflict-cross-crate-2-extern.rs:10:9 - | -LL | pub use b::*; - | ^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default - -error: `C` is ambiguous +error[E0659]: `C` is ambiguous --> $DIR/glob-conflict-cross-crate-3.rs:13:13 | LL | let _a: C = 1; @@ -40,12 +17,7 @@ note: `C` could also refer to the type alias imported here LL | use a::*; | ^^^^ = help: consider adding an explicit import of `C` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 -error: aborting due to 2 previous errors - -Future incompatibility report: Future breakage diagnostic: error: `C` is ambiguous --> $DIR/glob-conflict-cross-crate-3.rs:13:13 | @@ -69,7 +41,10 @@ LL | pub use b::*; = note: for more information, see issue #114095 = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default -Future breakage diagnostic: +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0659`. +Future incompatibility report: Future breakage diagnostic: error: `C` is ambiguous --> $DIR/glob-conflict-cross-crate-3.rs:13:13 | @@ -77,18 +52,18 @@ LL | let _a: C = 1; | ^ ambiguous name | = note: ambiguous because of multiple glob imports of a name in the same module -note: `C` could refer to the type alias imported here - --> $DIR/glob-conflict-cross-crate-3.rs:9:5 +note: `C` could refer to the type alias defined here + --> $DIR/auxiliary/glob-conflict-cross-crate-2-extern.rs:9:9 | -LL | use glob_conflict_cross_crate_2_extern::*; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = help: consider adding an explicit import of `C` to disambiguate -note: `C` could also refer to the type alias imported here - --> $DIR/glob-conflict-cross-crate-3.rs:10:5 +LL | pub use a::*; + | ^ + = help: consider updating this dependency to resolve this error + = help: if updating the dependency does not resolve the problem report the problem to the author of the relevant crate +note: `C` could also refer to the type alias defined here + --> $DIR/auxiliary/glob-conflict-cross-crate-2-extern.rs:10:9 | -LL | use a::*; - | ^^^^ - = help: consider adding an explicit import of `C` to disambiguate +LL | pub use b::*; + | ^ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #114095 = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/imports/unresolved-seg-after-ambiguous.rs b/tests/ui/imports/unresolved-seg-after-ambiguous.rs index 67366deabaafb..00a3c5b0145c2 100644 --- a/tests/ui/imports/unresolved-seg-after-ambiguous.rs +++ b/tests/ui/imports/unresolved-seg-after-ambiguous.rs @@ -17,8 +17,6 @@ mod a { } use self::a::E::in_exist; -//~^ ERROR: unresolved import `self::a::E` -//~| ERROR: `E` is ambiguous -//~| WARNING: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! +//~^ ERROR: `E` is ambiguous fn main() {} diff --git a/tests/ui/imports/unresolved-seg-after-ambiguous.stderr b/tests/ui/imports/unresolved-seg-after-ambiguous.stderr index c21faffadfc31..e712d80f69460 100644 --- a/tests/ui/imports/unresolved-seg-after-ambiguous.stderr +++ b/tests/ui/imports/unresolved-seg-after-ambiguous.stderr @@ -1,10 +1,4 @@ -error[E0432]: unresolved import `self::a::E` - --> $DIR/unresolved-seg-after-ambiguous.rs:19:14 - | -LL | use self::a::E::in_exist; - | ^ `E` is a struct, not a module - -error: `E` is ambiguous +error[E0659]: `E` is ambiguous --> $DIR/unresolved-seg-after-ambiguous.rs:19:14 | LL | use self::a::E::in_exist; @@ -23,34 +17,7 @@ note: `E` could also refer to the struct imported here LL | pub use self::d::*; | ^^^^^^^^^^ = help: consider adding an explicit import of `E` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default - -error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0432`. -Future incompatibility report: Future breakage diagnostic: -error: `E` is ambiguous - --> $DIR/unresolved-seg-after-ambiguous.rs:19:14 - | -LL | use self::a::E::in_exist; - | ^ ambiguous name - | - = note: ambiguous because of multiple glob imports of a name in the same module -note: `E` could refer to the struct imported here - --> $DIR/unresolved-seg-after-ambiguous.rs:13:17 - | -LL | pub use self::c::*; - | ^^^^^^^^^^ - = help: consider adding an explicit import of `E` to disambiguate -note: `E` could also refer to the struct imported here - --> $DIR/unresolved-seg-after-ambiguous.rs:12:17 - | -LL | pub use self::d::*; - | ^^^^^^^^^^ - = help: consider adding an explicit import of `E` to disambiguate - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #114095 - = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default +error: aborting due to 1 previous error +For more information about this error, try `rustc --explain E0659`. From 56f5c388406c51ae1681323b1cc00b0291f90b15 Mon Sep 17 00:00:00 2001 From: Pieter-Louis Schoeman Date: Mon, 25 May 2026 19:08:39 +0200 Subject: [PATCH 22/22] Fix const-eval of shared generic reborrows --- .../rustc_const_eval/src/interpret/step.rs | 12 +++-- .../rustc_mir_transform/src/promote_consts.rs | 6 +-- .../miri/tests/pass/reborrow-coerce-shared.rs | 48 +++++++++++++++++++ tests/ui/reborrow/coerce_shared_consteval.rs | 28 +++++++++++ .../reborrow/reborrow-promotion-rejected.rs | 21 ++++++++ .../reborrow-promotion-rejected.stderr | 13 +++++ 6 files changed, 120 insertions(+), 8 deletions(-) create mode 100644 src/tools/miri/tests/pass/reborrow-coerce-shared.rs create mode 100644 tests/ui/reborrow/coerce_shared_consteval.rs create mode 100644 tests/ui/reborrow/reborrow-promotion-rejected.rs create mode 100644 tests/ui/reborrow/reborrow-promotion-rejected.stderr diff --git a/compiler/rustc_const_eval/src/interpret/step.rs b/compiler/rustc_const_eval/src/interpret/step.rs index c60fb92a7a200..0718638c1d219 100644 --- a/compiler/rustc_const_eval/src/interpret/step.rs +++ b/compiler/rustc_const_eval/src/interpret/step.rs @@ -230,9 +230,15 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { })?; } - Reborrow(_, _, place) => { - let op = self.eval_place_to_op(place, Some(dest.layout))?; - self.copy_op(&op, &dest)?; + Reborrow(_, mutability, place) => { + let op = self.eval_place_to_op(place, None)?; + if mutability.is_not() { + // Shared generic reborrows use `CoerceShared`: a bitwise copy into a + // distinct same-layout target ADT. + self.copy_op_allow_transmute(&op, &dest)?; + } else { + self.copy_op(&op, &dest)?; + } } RawPtr(kind, place) => { diff --git a/compiler/rustc_mir_transform/src/promote_consts.rs b/compiler/rustc_mir_transform/src/promote_consts.rs index f3e86c4eef75d..3694a0614a7b7 100644 --- a/compiler/rustc_mir_transform/src/promote_consts.rs +++ b/compiler/rustc_mir_transform/src/promote_consts.rs @@ -580,11 +580,7 @@ impl<'tcx> Validator<'_, 'tcx> { self.validate_ref(*kind, place)?; } - Rvalue::Reborrow(_, _, place) => { - // FIXME(reborrow): should probably have a place_simplified like above. - let op = &Operand::Copy(*place); - self.validate_operand(op)? - } + Rvalue::Reborrow(..) => return Err(Unpromotable), Rvalue::Aggregate(_, operands) => { for o in operands { diff --git a/src/tools/miri/tests/pass/reborrow-coerce-shared.rs b/src/tools/miri/tests/pass/reborrow-coerce-shared.rs new file mode 100644 index 0000000000000..bb9918055bfc1 --- /dev/null +++ b/src/tools/miri/tests/pass/reborrow-coerce-shared.rs @@ -0,0 +1,48 @@ +// Regression test for the Miri reproducer in rust-lang/rust#156313. +// +// The issue's exact recursive example ICEd while evaluating the argument +// conversion before the recursion mattered. This keeps that same +// `CustomMut`-to-`CustomRef` call path, but terminates after one recursive +// call so it can be a pass test once the ICE is fixed. + +#![feature(reborrow)] + +use std::marker::{CoerceShared, Reborrow}; + +#[allow(unused)] +struct CustomMut<'a, T>(&'a mut T); +impl<'a, T> Reborrow for CustomMut<'a, T> {} +impl<'a, T> CoerceShared> for CustomMut<'a, T> {} + +struct CustomRef<'a, T>(&'a T); + +impl<'a, T> Clone for CustomRef<'a, T> { + fn clone(&self) -> Self { + Self(self.0) + } +} +impl<'a, T> Copy for CustomRef<'a, T> {} + +fn method(_a: CustomRef<'_, ()>) {} + +fn recursive_method(_a: CustomRef<'_, ()>, recurse: bool) { + if recurse { + let a = CustomMut(&mut ()); + recursive_method(a, false); + } +} + +fn issue_156313_runtime_reproducer() { + let a = CustomMut(&mut ()); + method(a); +} + +fn issue_156313_recursive_call_reproducer() { + let a = CustomMut(&mut ()); + recursive_method(a, true); +} + +fn main() { + issue_156313_runtime_reproducer(); + issue_156313_recursive_call_reproducer(); +} diff --git a/tests/ui/reborrow/coerce_shared_consteval.rs b/tests/ui/reborrow/coerce_shared_consteval.rs new file mode 100644 index 0000000000000..29b44b6438631 --- /dev/null +++ b/tests/ui/reborrow/coerce_shared_consteval.rs @@ -0,0 +1,28 @@ +//@ run-pass +// Regression test for the const-eval reproducer in rust-lang/rust#156313. + +#![feature(reborrow)] +#![allow(dead_code)] +#![allow(unused_variables)] + +use std::marker::{CoerceShared, Reborrow}; + +pub struct MyMut<'a>(&'a u8); + +impl Reborrow for MyMut<'_> {} + +#[derive(Clone, Copy)] +pub struct MyRef<'a>(&'a u8); + +impl<'a> CoerceShared> for MyMut<'a> {} + +const fn consteval_reproducer() { + let value = 1; + foo(MyMut(&value)); +} + +const fn foo(x: MyRef<'_>) {} + +fn main() { + const { consteval_reproducer(); } +} diff --git a/tests/ui/reborrow/reborrow-promotion-rejected.rs b/tests/ui/reborrow/reborrow-promotion-rejected.rs new file mode 100644 index 0000000000000..38366cd9ac2a7 --- /dev/null +++ b/tests/ui/reborrow/reborrow-promotion-rejected.rs @@ -0,0 +1,21 @@ +//@ check-fail + +#![feature(reborrow)] + +use std::marker::{CoerceShared, Reborrow}; + +struct MyMut<'a>(&'a u8); +impl Reborrow for MyMut<'_> {} + +#[derive(Clone, Copy)] +struct MyRef<'a>(&'a u8); +impl<'a> CoerceShared> for MyMut<'a> {} + +const fn coerce(x: MyRef<'_>) -> MyRef<'_> { + x +} + +static BAD: &'static MyRef<'static> = &coerce(MyMut(&1)); +//~^ ERROR temporary value dropped while borrowed + +fn main() {} diff --git a/tests/ui/reborrow/reborrow-promotion-rejected.stderr b/tests/ui/reborrow/reborrow-promotion-rejected.stderr new file mode 100644 index 0000000000000..f7e1560f02089 --- /dev/null +++ b/tests/ui/reborrow/reborrow-promotion-rejected.stderr @@ -0,0 +1,13 @@ +error[E0716]: temporary value dropped while borrowed + --> $DIR/reborrow-promotion-rejected.rs:18:47 + | +LL | static BAD: &'static MyRef<'static> = &coerce(MyMut(&1)); + | --------^^^^^^^^^- + | | | | + | | | temporary value is freed at the end of this statement + | | creates a temporary value which is freed while still in use + | using this value as a static requires that borrow lasts for `'static` + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0716`.