diff --git a/RELEASES.md b/RELEASES.md index 81310c20c5ef9..940fa7c6072a9 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,100 @@ +Version 1.98.0 (2026-08-20) +========================== + + + +Language +-------- +- [Allow shortening lifetime of `&mut` when unsize-coercing, even in an invariant position.](https://github.com/rust-lang/rust/pull/149219) For example, you can now coerce a `Cell<&'long mut i32>` to a `Cell<&'short mut dyn Send>`. Such shortenings were already previously allowed when coercing a `&mut` to a `&`, or coercing a `&` to a `&`. +- [Add deny-by-default `invalid_runtime_symbol_definitions` lint and warn-by-default `suspicious_runtime_symbol_definitions` lint](https://github.com/rust-lang/rust/pull/155521) + - The lints currently specifically targets `core` runtime symbols like `memcmp`, `memset`, `strlen`, ... and is planned to be expanded in the next few releases. +- [Add warn-by-default `c_void_returns` lint to check `core::ffi::c_void` as a return type](https://github.com/rust-lang/rust/pull/156379) + + + + +Platform Support +---------------- +- [Add `powerpc64-unknown-linux-gnuelfv2` as Tier 3](https://github.com/rust-lang/rust/pull/144220) +- [Add `aarch64-unknown-linux-pauthtest` as Tier 3 target](https://github.com/rust-lang/rust/pull/155722) +- [Promote `thumbv7a-none-eabi` to Tier 2](https://github.com/rust-lang/rust/pull/155763) +- [Promote `thumbv7a-none-eabihf` to Tier 2](https://github.com/rust-lang/rust/pull/155763) +- [Promote `thumbv7r-none-eabi` to Tier 2](https://github.com/rust-lang/rust/pull/155763) +- [Promote `thumbv7r-none-eabihf` to Tier 2](https://github.com/rust-lang/rust/pull/155763) +- [Promote `thumbv8r-none-eabihf` to Tier 2](https://github.com/rust-lang/rust/pull/155763) + + +Refer to Rust's [platform support page][platform-support-doc] +for more information on Rust's tiered platform support. + +[platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html + + + +Libraries +--------- +- [Change `Location<'_>` lifetime to `'static` in `Panic[Hook]Info`](https://github.com/rust-lang/rust/pull/146561) +- [Document panic in `RangeInclusive::from(legacy::RangeInclusive)`](https://github.com/rust-lang/rust/pull/155421) +- [Document that `ManuallyDrop`'s `Box` interaction has been fixed](https://github.com/rust-lang/rust/pull/155750) +- [Stabilize LoongArch CRC Intrinsics](https://github.com/rust-lang/rust/issues/156908) +- [The `derive` macro is available at `{core,std}::derive`.](https://github.com/rust-lang/rust/issues/154645) This was previously [unintentionally stabilized in 1.96](https://github.com/rust-lang/rust/issues/159856), but is now [explicitly accepted](https://github.com/rust-lang/rust/issues/154645) as a stabilized API. + - Please note that the MSRV for `{core,std}::derive` will be 1.96, and not 1.98. + + + + +Stabilized APIs +--------------- + +- [`str::substr_range`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.substr_range) +- [`[T]::subslice_range`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.subslice_range) +- [`core::fmt::NumBuffer`](https://doc.rust-lang.org/stable/core/fmt/struct.NumBuffer.html) +- [`<{integer}>::format_into`](https://doc.rust-lang.org/stable/core/primitive.usize.html#method.format_into) +- [`Send/Sync for std::process::CommandArgs`](https://doc.rust-lang.org/stable/std/process/struct.CommandArgs.html#impl-Send-for-CommandArgs%3C'a%3E) +- [`{fN}::algebraic_add`](https://doc.rust-lang.org/stable/core/primitive.f32.html#method.algebraic_add) +- [`{fN}::algebraic_sub`](https://doc.rust-lang.org/stable/core/primitive.f32.html#method.algebraic_sub) +- [`{fN}::algebraic_mul`](https://doc.rust-lang.org/stable/core/primitive.f32.html#method.algebraic_mul) +- [`{fN}::algebraic_div`](https://doc.rust-lang.org/stable/core/primitive.f32.html#method.algebraic_div) +- [`{fN}::algebraic_rem`](https://doc.rust-lang.org/stable/core/primitive.f32.html#method.algebraic_rem) +- [`NonZero<{integer}>::from_str_radix`](https://doc.rust-lang.org/stable/core/num/struct.NonZero.html#method.from_str_radix-4) +- [`String::from_utf16le`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.from_utf16le) +- [`String::from_utf16le_lossy`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.from_utf16le_lossy) +- [`String::from_utf16be`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.from_utf16be) +- [`String::from_utf16be_lossy`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.from_utf16be_lossy) +- [`[T]::strip_circumfix`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.strip_circumfix) +- [`str::strip_circumfix`](https://doc.rust-lang.org/stable/core/primitive.str.html#method.strip_circumfix) +- [`Atomic::from_mut`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.Atomic.html#method.from_mut) +- [`Atomic::get_mut_slice`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.Atomic.html#method.get_mut_slice) +- [`Atomic::from_mut_slice`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.Atomic.html#method.from_mut_slice) +- [`std::range::legacy`](https://doc.rust-lang.org/stable/std/range/legacy/index.html) + + + + +Compatibility Notes +------------------- +- [If fully elided, lifetime bounds of trait object types may now resolve differently or even get rejected in very specific niche scenarios](https://github.com/rust-lang/rust/pull/129543) +- [Error in more cases of ambiguous imports](https://github.com/rust-lang/rust/pull/145108) +- [Switch the destructors implementation for thread locals on Windows to use Fiber Local Storage (FLS)](https://github.com/rust-lang/rust/pull/148799) +- [Convert some cases of the `ambiguous_glob_imports` lint into a hard error](https://github.com/rust-lang/rust/pull/149195) +- [Where-bounds of the form `Type = Type` and `Type == Type` are no longer syntactically allowed](https://github.com/rust-lang/rust/pull/153513) +- [Ensure Send/Sync is not implemented for std::env::Vars{,Os}](https://github.com/rust-lang/rust/pull/155153) +- [Fix that in some attributes, arguments were not properly rejected](https://github.com/rust-lang/rust/pull/155193) +- [`repr(transparent)` is now more strict about which fields have "trivial" layout and hence can be ignored: `repr(C)` types, types with private fields, and `#[non_exhaustive]` types are no longer considered "trivial"](https://github.com/rust-lang/rust/pull/155299) +- [Correctly check whether types have equal size in `transmute()` when some `repr` attributes are involved.](https://github.com/rust-lang/rust/pull/155418) +- [More characters are escaped when printing strings and chars](https://github.com/rust-lang/rust/pull/155527) +- [Implement fast path for `derive(PartialOrd)` when deriving `Ord`](https://github.com/rust-lang/rust/pull/155598) + This can break crates in practice where a type's PartialOrd and Ord impls were inconsistent with each other. +- [Add temporary scope to `assert_eq` and `assert_ne`](https://github.com/rust-lang/rust/pull/155739) +- Closed a hole in the pattern matching [structural equality](https://doc.rust-lang.org/reference/patterns.html#constant-patterns) check, preventing cases where a match of a constant would be allowed, despite disagreeing with a manually written `PartialEq` implementation, when a `derive(PartialEq)` implementation for that type also exists. +- [On Emscripten the WASM exception handling ABI is now unconditionally used](https://github.com/rust-lang/rust/pull/156928) The `-Zemscripten-wasm-eh=false` flag to switch back to JS exceptions has been removed. +- [The UNSAFE_CODE lint is now consistently emitted for all unsafe attributes](https://github.com/rust-lang/rust/pull/157201) +- [Solaris: remove `File::lock` implementation, it has the wrong semantics (return "unsupported" instead)](https://github.com/rust-lang/rust/pull/157509) +- [Windows-gnu targets now specify baseline tools versions](https://github.com/rust-lang/rust/pull/158020) +- [rustfmt now discovers module files that are defined in `cfg_select!`](https://github.com/rust-lang/rust/pull/158372) + This may cause more code to be formatted which was previously ignored. + + Version 1.97.1 (2026-07-16) ========================== diff --git a/REUSE.toml b/REUSE.toml index 7d72caa6d5c45..30b6ce6bee232 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -208,3 +208,12 @@ SPDX-FileCopyrightText = [ "Copyright (C) 2000-2024 Free Software Foundation, Inc.", ] SPDX-License-Identifier = "GCC-exception-3.1" + + [[annotations]] + path = "compiler/rustc_middle/src/ptrauth/llvm_siphash/tests.rs" + precedence = "override" + SPDX-FileCopyrightText = [ + "2003-2019 University of Illinois at Urbana-Champaign.", + "The Rust Project Developers (see https://thanks.rust-lang.org)", + ] + SPDX-License-Identifier = "Apache-2.0 WITH LLVM-exception AND (Apache-2.0 OR MIT)" diff --git a/compiler/rustc_abi/src/lib.rs b/compiler/rustc_abi/src/lib.rs index 589c5a5cb1229..ba5119ee228ad 100644 --- a/compiler/rustc_abi/src/lib.rs +++ b/compiler/rustc_abi/src/lib.rs @@ -1041,7 +1041,6 @@ impl Step for Size { } #[inline] - #[cfg(not(bootstrap))] fn forward_overflowing(start: Self, count: usize) -> (Self, bool) { let (s, o) = u64::forward_overflowing(start.bytes(), count); (Self::from_bytes(s), o) @@ -1063,7 +1062,6 @@ impl Step for Size { } #[inline] - #[cfg(not(bootstrap))] fn backward_overflowing(start: Self, count: usize) -> (Self, bool) { let (s, o) = u64::backward_overflowing(start.bytes(), count); (Self::from_bytes(s), o) @@ -2171,8 +2169,8 @@ pub struct LayoutData { pub max_repr_align: Option, /// The alignment the type would have, ignoring any `repr(align)` but including `repr(packed)`. - /// Only used on aarch64-linux, where the argument passing ABI ignores the requested alignment - /// in some cases. + /// Only used on aarch64-linux and arm, where the argument passing ABI ignores the requested + /// alignment in some cases. pub unadjusted_abi_align: Align, /// The randomization seed based on this type's own repr and its fields. diff --git a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs index 7267ae113de3e..0e2024f822b96 100644 --- a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs @@ -691,7 +691,7 @@ impl<'diag, 'tcx> MirBorrowckCtxt<'_, 'diag, 'tcx> { if !clauses.instantiate_identity(tcx).clauses.iter().any(|clause| { clause.as_trait_clause().is_some_and(|tc| { tc.self_ty().skip_binder().is_param(param.index) - && tc.polarity() == ty::PredicatePolarity::Positive + && tc.polarity() == ty::ClausePolarity::Positive && supertrait_def_ids(tcx, tc.def_id()) .flat_map(|trait_did| tcx.associated_items(trait_did).in_definition_order()) .any(|item| item.is_method()) diff --git a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs index 49e6dc334ff80..62cad6a874866 100644 --- a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs @@ -1228,7 +1228,7 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> { tcx.clauses_of(callee_def_id).instantiate(tcx, generic_args).clauses.iter().any( |clause| { clause.as_trait_clause().is_some_and(|trait_pred| { - trait_pred.polarity() == ty::PredicatePolarity::Positive + trait_pred.polarity() == ty::ClausePolarity::Positive && tcx.fn_trait_kind_from_def_id(trait_pred.def_id()) == Some(ty::ClosureKind::Fn) && trait_pred.self_ty().skip_binder().peel_refs() diff --git a/compiler/rustc_borrowck/src/type_check/canonical.rs b/compiler/rustc_borrowck/src/type_check/canonical.rs index bc2c75f0c01a4..e4307e0481e5c 100644 --- a/compiler/rustc_borrowck/src/type_check/canonical.rs +++ b/compiler/rustc_borrowck/src/type_check/canonical.rs @@ -131,9 +131,9 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { category: ConstraintCategory<'tcx>, ) { self.prove_clause( - ty::ClauseKind::Trait(ty::TraitPredicate { + ty::ClauseKind::Trait(ty::TraitClause { trait_ref, - polarity: ty::PredicatePolarity::Positive, + polarity: ty::ClausePolarity::Positive, }), locations, category, diff --git a/compiler/rustc_codegen_cranelift/rust-toolchain.toml b/compiler/rustc_codegen_cranelift/rust-toolchain.toml index ff51f49edc4ca..ea4ff67c93c89 100644 --- a/compiler/rustc_codegen_cranelift/rust-toolchain.toml +++ b/compiler/rustc_codegen_cranelift/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2026-08-17" +channel = "nightly-2026-08-19" components = ["rust-src", "rustc-dev", "llvm-tools", "rustfmt"] profile = "minimal" diff --git a/compiler/rustc_codegen_gcc/src/context.rs b/compiler/rustc_codegen_gcc/src/context.rs index 8045e8ae9d28f..19fbe37c27b9e 100644 --- a/compiler/rustc_codegen_gcc/src/context.rs +++ b/compiler/rustc_codegen_gcc/src/context.rs @@ -495,7 +495,9 @@ impl<'gcc, 'tcx> MiscCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> { let entry_name = self.sess().target.entry_name.as_ref(); if !self.functions.borrow().contains_key(entry_name) { let conv = cfg_select! { - feature = "master" => conv_to_fn_attribute(self.sess(), self.sess().target.entry_abi), + feature = "master" => { + conv_to_fn_attribute(self.sess(), self.sess().target.entry_abi) + } _ => None, }; Some(self.declare_entry_fn(entry_name, fn_type, conv)) diff --git a/compiler/rustc_codegen_ssa/src/lib.rs b/compiler/rustc_codegen_ssa/src/lib.rs index d62c5c713f9ea..db7708c781ad4 100644 --- a/compiler/rustc_codegen_ssa/src/lib.rs +++ b/compiler/rustc_codegen_ssa/src/lib.rs @@ -7,7 +7,6 @@ #![feature(try_blocks)] #![recursion_limit = "256"] // tidy-alphabetical-end -#![cfg_attr(bootstrap, feature(string_from_utf8_lossy_owned))] //! This crate contains codegen code that is used by all codegen backends (LLVM and others). //! The backend-agnostic functions of this crate use functions defined in various traits that diff --git a/compiler/rustc_data_structures/src/obligation_forest/graphviz.rs b/compiler/rustc_data_structures/src/obligation_forest/graphviz.rs index 65a24366db837..9def3d98fe09d 100644 --- a/compiler/rustc_data_structures/src/obligation_forest/graphviz.rs +++ b/compiler/rustc_data_structures/src/obligation_forest/graphviz.rs @@ -18,8 +18,8 @@ impl ObligationForest { /// A few post-processing that you might want to do make the forest easier to visualize: /// /// * `sed 's,std::[a-z]*::,,g'` — Deletes the `std::::` prefix of paths. - /// * `sed 's,"Binder(TraitPredicate(<\(.*\)>)) (\([^)]*\))","\1 (\2)",'` — Transforms - /// `Binder(TraitPredicate())` into just ``. + /// * `sed 's,"Binder(TraitClause(<\(.*\)>)) (\([^)]*\))","\1 (\2)",'` — Transforms + /// `Binder(TraitClause())` into just ``. #[allow(dead_code)] pub fn dump_graphviz>(&self, dir: P, description: &str) { static COUNTER: AtomicUsize = AtomicUsize::new(0); diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs index 30ae99a56f6ad..f57a280968322 100644 --- a/compiler/rustc_feature/src/accepted.rs +++ b/compiler/rustc_feature/src/accepted.rs @@ -97,10 +97,10 @@ declare_features! ( /// Allows `extern "C-unwind" fn` to enable unwinding across ABI boundaries and treat `extern "C" fn` as nounwind. (accepted, c_unwind, "1.81.0", Some(74990)), /// Allows using C-variadics. - (accepted, c_variadic, "CURRENT_RUSTC_VERSION", Some(44930)), + (accepted, c_variadic, "1.99.0", Some(44930)), /// Allows defining c-variadic naked functions with any extern ABI that is allowed /// on c-variadic foreign functions. - (accepted, c_variadic_naked_functions, "CURRENT_RUSTC_VERSION", Some(148767)), + (accepted, c_variadic_naked_functions, "1.99.0", Some(148767)), /// Allows `#[cfg_attr(predicate, multiple, attributes, here)]`. (accepted, cfg_attr_multi, "1.33.0", Some(54881)), /// Allows the use of `#[cfg()]`. diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index 8ba571df5d5a5..00ca1e07c93fd 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -255,7 +255,7 @@ declare_features! ( /// Allows checking whether or not the backend correctly supports unstable float types. (internal, cfg_target_has_reliable_f16_f128, "1.88.0", None), /// Allows checking whether or not the target might have thread support. - (internal, cfg_target_has_threads, "CURRENT_RUSTC_VERSION", None), + (internal, cfg_target_has_threads, "1.99.0", None), /// Allows identifying the `compiler_builtins` crate. (internal, compiler_builtins, "1.13.0", None), /// Allows skipping `ConstParamTy_` trait implementation checks @@ -397,7 +397,7 @@ declare_features! ( /// Target features on arm. (unstable, arm_target_feature, "1.27.0", Some(150246)), /// Allows using `const` operands with pointer in inline assembly. - (unstable, asm_const_ptr, "CURRENT_RUSTC_VERSION", Some(128464)), + (unstable, asm_const_ptr, "1.99.0", Some(128464)), /// Enables experimental inline assembly support for additional architectures. (unstable, asm_experimental_arch, "1.58.0", Some(93335)), /// Enables experimental register support in inline assembly. @@ -452,7 +452,7 @@ declare_features! ( /// Allows to use the `#[cfi_encoding = ""]` attribute. (unstable, cfi_encoding, "1.71.0", Some(89653)), /// Allow to have type alias types for inter-crate use. - (incomplete, checked_type_aliases, "CURRENT_RUSTC_VERSION", Some(112792)), + (incomplete, checked_type_aliases, "1.99.0", Some(112792)), /// The `clflushopt` target feature on x86. (unstable, clflushopt_target_feature, "1.98.0", Some(157096)), /// Allows `for<...>` on closures and coroutines. @@ -518,7 +518,7 @@ declare_features! ( /// Allows macros to customize macro argument matcher diagnostics. (unstable, diagnostic_on_unmatched_args, "1.97.0", Some(155642)), // Used by macros to not show their bodies in error messages. No-op with `-Z macro-backtrace`. - (unstable, diagnostic_opaque, "CURRENT_RUSTC_VERSION", Some(158813)), + (unstable, diagnostic_opaque, "1.99.0", Some(158813)), /// Allows `#[doc(cfg(...))]`. (unstable, doc_cfg, "1.21.0", Some(43781)), /// Allows `#[doc(masked)]`. @@ -630,7 +630,7 @@ declare_features! ( /// Provides a way to concatenate identifiers using metavariable expressions. (unstable, macro_metavar_expr_concat, "1.81.0", Some(124225)), /// Allows directly represented generic_const_args without the `direct_const_arg!` macro. - (incomplete, macroless_generic_const_args, "CURRENT_RUSTC_VERSION", Some(159006)), + (incomplete, macroless_generic_const_args, "1.99.0", Some(159006)), /// Allows `#[marker]` on certain traits allowing overlapping implementations. (unstable, marker_trait_attr, "1.30.0", Some(29864)), /// Enable mgca `type const` syntax before expansion. @@ -660,13 +660,13 @@ declare_features! ( /// Allows `mut ref` and `mut ref mut` identifier patterns. (incomplete, mut_ref, "1.79.0", Some(123076)), /// Allows `mut(crate) field: Type` restrictions. - (unstable, mut_restriction, "CURRENT_RUSTC_VERSION", Some(105077)), + (unstable, mut_restriction, "1.99.0", Some(105077)), /// Allows using `#[naked]` on `extern "Rust"` functions. (unstable, naked_functions_rustic_abi, "1.88.0", Some(138997)), /// Allows using `#[target_feature(enable = "...")]` on `#[naked]` on functions. (unstable, naked_functions_target_feature, "1.86.0", Some(138568)), /// Allows providing names to parameters of `impl Fn` etc - (incomplete, named_fn_trait_parameters, "CURRENT_RUSTC_VERSION", Some(158499)), + (incomplete, named_fn_trait_parameters, "1.99.0", Some(158499)), /// Allows specifying the as-needed link modifier (unstable, native_link_modifiers_as_needed, "1.53.0", Some(81490)), /// Allow negative trait implementations. diff --git a/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs b/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs index 2f65b443dd5ec..8c2896e78289a 100644 --- a/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs +++ b/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs @@ -2726,7 +2726,7 @@ fn param_env_with_gat_bounds<'tcx>( } _ => clauses.push( ty::Binder::bind_with_vars( - ty::ProjectionPredicate { + ty::ProjectionClause { projection_term: ty::AliasTerm::new_from_def_id( tcx, trait_ty.def_id, diff --git a/compiler/rustc_hir_analysis/src/check/wfcheck.rs b/compiler/rustc_hir_analysis/src/check/wfcheck.rs index d1c011d22a6b1..f2f3fc5fe0527 100644 --- a/compiler/rustc_hir_analysis/src/check/wfcheck.rs +++ b/compiler/rustc_hir_analysis/src/check/wfcheck.rs @@ -1323,7 +1323,7 @@ fn check_impl<'tcx>( trait_ref, ); let trait_pred = - ty::TraitPredicate { trait_ref, polarity: ty::PredicatePolarity::Positive }; + ty::TraitClause { trait_ref, polarity: ty::ClausePolarity::Positive }; let mut obligations = traits::wf::trait_obligations( wfcx.infcx, wfcx.param_env, diff --git a/compiler/rustc_hir_analysis/src/coherence/builtin.rs b/compiler/rustc_hir_analysis/src/coherence/builtin.rs index 3b57f45e684f7..06d336298a42c 100644 --- a/compiler/rustc_hir_analysis/src/coherence/builtin.rs +++ b/compiler/rustc_hir_analysis/src/coherence/builtin.rs @@ -924,9 +924,9 @@ fn infringing_fields_error<'tcx>( .or_default() .push(error.obligation.cause.span); } - if let ty::PredicateKind::Clause(ty::ClauseKind::Trait(ty::TraitPredicate { + if let ty::PredicateKind::Clause(ty::ClauseKind::Trait(ty::TraitClause { trait_ref, - polarity: ty::PredicatePolarity::Positive, + polarity: ty::ClausePolarity::Positive, .. })) = error_predicate.kind().skip_binder() { diff --git a/compiler/rustc_hir_analysis/src/collect.rs b/compiler/rustc_hir_analysis/src/collect.rs index 25ba0c810489e..c955d131fa09a 100644 --- a/compiler/rustc_hir_analysis/src/collect.rs +++ b/compiler/rustc_hir_analysis/src/collect.rs @@ -262,7 +262,7 @@ impl<'tcx> ItemCtxt<'tcx> { ItemCtxt::new_internal(tcx, item_def_id, true) } - pub(crate) fn lower_ty(&self, hir_ty: &hir::Ty<'tcx>) -> Ty<'tcx> { + pub(crate) fn lower_ty(&self, hir_ty: &hir::Ty<'_>) -> Ty<'tcx> { self.lowerer().lower_ty(hir_ty) } @@ -451,7 +451,7 @@ impl<'tcx> HirTyLowerer<'tcx> for ItemCtxt<'tcx> { &self, span: Span, item_def_id: DefId, - item_segment: &rustc_hir::PathSegment<'tcx>, + item_segment: &rustc_hir::PathSegment<'_>, poly_trait_ref: ty::PolyTraitRef<'tcx>, ) -> Result<(DefId, ty::GenericArgsRef<'tcx>), ErrorGuaranteed> { if let Some(trait_ref) = poly_trait_ref.no_bound_vars() { @@ -549,7 +549,7 @@ impl<'tcx> HirTyLowerer<'tcx> for ItemCtxt<'tcx> { fn lower_fn_sig( &self, - decl: &hir::FnDecl<'tcx>, + decl: &hir::FnDecl<'_>, _generics: Option<&hir::Generics<'_>>, hir_id: rustc_hir::HirId, _hir_ty: Option<&hir::Ty<'_>>, diff --git a/compiler/rustc_hir_analysis/src/collect/clauses_of.rs b/compiler/rustc_hir_analysis/src/collect/clauses_of.rs index 1ee647fd61a33..488b9a09e6106 100644 --- a/compiler/rustc_hir_analysis/src/collect/clauses_of.rs +++ b/compiler/rustc_hir_analysis/src/collect/clauses_of.rs @@ -720,7 +720,7 @@ pub(super) fn implied_clauses_with_filter<'tcx>( for &(clause, span) in implied_bounds { debug!("superbound: {:?}", clause); if let ty::ClauseKind::Trait(bound) = clause.kind().skip_binder() - && bound.polarity == ty::PredicatePolarity::Positive + && bound.polarity == ty::ClausePolarity::Positive { tcx.at(span).explicit_super_clauses_of(bound.def_id()); } @@ -730,7 +730,7 @@ pub(super) fn implied_clauses_with_filter<'tcx>( for &(clause, span) in implied_bounds { debug!("superbound: {:?}", clause); if let ty::ClauseKind::Trait(bound) = clause.kind().skip_binder() - && bound.polarity == ty::PredicatePolarity::Positive + && bound.polarity == ty::ClausePolarity::Positive { tcx.at(span).explicit_implied_clauses_of(bound.def_id()); } diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs index 613202ef35345..c12bafd9d5d57 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs @@ -107,7 +107,7 @@ fn collect_bounds<'a, 'tcx>( fn collect_sizedness_bounds<'tcx>( tcx: TyCtxt<'tcx>, - hir_bounds: &'tcx [hir::GenericBound<'tcx>], + hir_bounds: &[hir::GenericBound<'_>], context: ImpliedBoundsContext<'tcx>, span: Span, ) -> CollectedSizednessBounds { @@ -150,7 +150,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { &self, bounds: &mut Vec<(ty::Clause<'tcx>, Span)>, self_ty: Ty<'tcx>, - hir_bounds: &'tcx [hir::GenericBound<'tcx>], + hir_bounds: &[hir::GenericBound<'_>], context: ImpliedBoundsContext<'tcx>, span: Span, ) { @@ -212,7 +212,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { &self, bounds: &mut Vec<(ty::Clause<'tcx>, Span)>, self_ty: Ty<'tcx>, - hir_bounds: &[hir::GenericBound<'tcx>], + hir_bounds: &[hir::GenericBound<'_>], context: ImpliedBoundsContext<'tcx>, span: Span, ) { @@ -229,7 +229,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { trait_: LangItem, bounds: &mut Vec<(ty::Clause<'tcx>, Span)>, self_ty: Ty<'tcx>, - hir_bounds: &[hir::GenericBound<'tcx>], + hir_bounds: &[hir::GenericBound<'_>], context: ImpliedBoundsContext<'tcx>, span: Span, ) { @@ -251,10 +251,10 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { } /// Returns `true` if default trait bound should be added. - fn should_add_default_traits<'a>( + fn should_add_default_traits( &self, trait_def_id: DefId, - hir_bounds: &'a [hir::GenericBound<'tcx>], + hir_bounds: &[hir::GenericBound<'_>], context: ImpliedBoundsContext<'tcx>, ) -> bool { let collected = collect_bounds(hir_bounds, context, trait_def_id); @@ -308,7 +308,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { /// There is an implied binder around `param_ty` and `hir_bounds`. /// See `lower_poly_trait_ref` for more details. #[instrument(level = "debug", skip(self, hir_bounds, bounds))] - pub(crate) fn lower_bounds<'hir, I: IntoIterator>>( + pub(crate) fn lower_bounds<'a, I: IntoIterator>>( &self, param_ty: Ty<'tcx>, hir_bounds: I, @@ -316,9 +316,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { bound_vars: &'tcx ty::List>, predicate_filter: PredicateFilter, overlapping_assoc_constraints: OverlappingAsssocItemConstraints, - ) where - 'tcx: 'hir, - { + ) { for hir_bound in hir_bounds { // In order to avoid cycles, when we're lowering `SelfTraitThatDefines`, // we skip over any traits that don't define the given associated type. @@ -379,7 +377,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { &self, hir_ref_id: hir::HirId, trait_ref: ty::PolyTraitRef<'tcx>, - constraint: &hir::AssocItemConstraint<'tcx>, + constraint: &hir::AssocItemConstraint<'_>, bounds: &mut Vec<(ty::Clause<'tcx>, Span)>, duplicates: Option<&mut FxIndexMap>, path_span: Span, @@ -547,7 +545,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { | PredicateFilter::SelfOnly | PredicateFilter::SelfAndAssociatedTypeBounds => { let bound = projection_term.map_bound(|projection_term| { - ty::ClauseKind::Projection(ty::ProjectionPredicate { + ty::ClauseKind::Projection(ty::ProjectionClause { projection_term, term, }) @@ -616,7 +614,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { /// Lower a type, possibly specially handling the type if it's a return type notation /// which we otherwise deny in other positions. - pub fn lower_ty_maybe_return_type_notation(&self, hir_ty: &hir::Ty<'tcx>) -> Ty<'tcx> { + pub fn lower_ty_maybe_return_type_notation(&self, hir_ty: &hir::Ty<'_>) -> Ty<'tcx> { let hir::TyKind::Path(qpath) = hir_ty.kind else { return self.lower_ty(hir_ty); }; diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/dyn_trait.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/dyn_trait.rs index 3d8c23ebdf8d3..de36ddbe1d10f 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/dyn_trait.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/dyn_trait.rs @@ -37,7 +37,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { &self, span: Span, hir_id: hir::HirId, - hir_bounds: &[hir::PolyTraitRef<'tcx>], + hir_bounds: &[hir::PolyTraitRef<'_>], lifetime: &hir::Lifetime, syntax: TraitObjectSyntax, ) -> Ty<'tcx> { @@ -207,7 +207,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { if let Some((principal_trait, ref spans)) = principal_trait { let principal_trait = principal_trait.map_bound(|trait_pred| { - assert_eq!(trait_pred.polarity, ty::PredicatePolarity::Positive); + assert_eq!(trait_pred.polarity, ty::ClausePolarity::Positive); trait_pred.trait_ref }); @@ -350,7 +350,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { let principal_trait_ref = principal_trait.map(|(trait_pred, spans)| { trait_pred.map_bound(|trait_pred| { let trait_ref = trait_pred.trait_ref; - assert_eq!(trait_pred.polarity, ty::PredicatePolarity::Positive); + assert_eq!(trait_pred.polarity, ty::ClausePolarity::Positive); assert_eq!(trait_ref.self_ty(), dummy_self); let span = *spans.first().unwrap(); @@ -423,7 +423,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { let mut auto_trait_predicates: Vec<_> = auto_traits .into_iter() .map(|(trait_pred, _)| { - assert_eq!(trait_pred.polarity(), ty::PredicatePolarity::Positive); + assert_eq!(trait_pred.polarity(), ty::ClausePolarity::Positive); assert_eq!(trait_pred.self_ty().skip_binder(), dummy_self); ty::Binder::dummy(ty::ExistentialPredicate::AutoTrait(trait_pred.def_id())) @@ -476,7 +476,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { /// `elaborated-predicates-unconstrained-late-bound.rs` for a test. fn check_elaborated_projection_mentions_input_lifetimes( &self, - pred: ty::PolyProjectionPredicate<'tcx>, + pred: ty::PolyProjectionClause<'tcx>, span: Span, supertrait_span: Span, ) { @@ -569,7 +569,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { &self, span: Span, hir_id: hir::HirId, - hir_bounds: &[hir::PolyTraitRef<'tcx>], + hir_bounds: &[hir::PolyTraitRef<'_>], ) -> Option { struct TraitObjectWithoutDyn<'a, 'tcx> { span: Span, @@ -871,7 +871,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { &self, span: Span, hir_id: hir::HirId, - hir_bounds: &[hir::PolyTraitRef<'tcx>], + hir_bounds: &[hir::PolyTraitRef<'_>], diag: &mut Diag<'_>, ) -> bool { let tcx = self.tcx(); diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs index e5dbae16d07d4..0bedff530212e 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs @@ -120,7 +120,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { assoc_tag: ty::AssocTag, assoc_ident: Ident, span: Span, - constraint: Option<&hir::AssocItemConstraint<'tcx>>, + constraint: Option<&hir::AssocItemConstraint<'_>>, ) -> ErrorGuaranteed where I: Iterator>, @@ -349,7 +349,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { assoc_tag: ty::AssocTag, ident: Ident, span: Span, - constraint: Option<&hir::AssocItemConstraint<'tcx>>, + constraint: Option<&hir::AssocItemConstraint<'_>>, ) -> ErrorGuaranteed { let tcx = self.tcx(); @@ -415,7 +415,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { assoc_tag: ty::AssocTag, assoc_ident: Ident, span: Span, - constraint: Option<&hir::AssocItemConstraint<'tcx>>, + constraint: Option<&hir::AssocItemConstraint<'_>>, ) -> ErrorGuaranteed { let tcx = self.tcx(); @@ -544,7 +544,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { &self, trait_def_id: DefId, span: Span, - item_segment: &hir::PathSegment<'tcx>, + item_segment: &hir::PathSegment<'_>, assoc_tag: ty::AssocTag, ) -> ErrorGuaranteed { let tcx = self.tcx(); @@ -1485,7 +1485,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { pub fn report_trait_object_addition_traits( &self, - regular_traits: &Vec<(ty::PolyTraitPredicate<'tcx>, SmallVec<[Span; 1]>)>, + regular_traits: &Vec<(ty::PolyTraitClause<'tcx>, SmallVec<[Span; 1]>)>, ) -> ErrorGuaranteed { // we use the last span to point at the traits themselves, // and all other preceding spans are trait alias expansions. diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs index c65e9bdbd211e..c2cf7136bd4a0 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs @@ -199,13 +199,13 @@ pub trait HirTyLowerer<'tcx> { &self, span: Span, item_def_id: DefId, - item_segment: &hir::PathSegment<'tcx>, + item_segment: &hir::PathSegment<'_>, poly_trait_ref: ty::PolyTraitRef<'tcx>, ) -> Result<(DefId, GenericArgsRef<'tcx>), ErrorGuaranteed>; fn lower_fn_sig( &self, - decl: &hir::FnDecl<'tcx>, + decl: &hir::FnDecl<'_>, generics: Option<&hir::Generics<'_>>, hir_id: HirId, hir_ty: Option<&hir::Ty<'_>>, @@ -366,13 +366,13 @@ pub struct GenericArgCountResult { /// Its only consumer is [`generics::lower_generic_args`]. /// Read its documentation to learn more. pub trait GenericArgsLowerer<'a, 'tcx> { - fn args_for_def_id(&mut self, def_id: DefId) -> (Option<&'a GenericArgs<'tcx>>, bool); + fn args_for_def_id(&mut self, def_id: DefId) -> (Option<&'a GenericArgs<'a>>, bool); fn provided_kind( &mut self, preceding_args: &[ty::GenericArg<'tcx>], param: &ty::GenericParamDef, - arg: &GenericArg<'tcx>, + arg: &GenericArg<'_>, ) -> ty::GenericArg<'tcx>; fn inferred_kind( @@ -625,7 +625,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { &self, span: Span, def_id: DefId, - item_segment: &hir::PathSegment<'tcx>, + item_segment: &hir::PathSegment<'_>, ) -> GenericArgsRef<'tcx> { let (args, _) = self.lower_generic_args_of_path(span, def_id, &[], item_segment, None); if let Some(c) = item_segment.args().constraints.first() { @@ -674,7 +674,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { span: Span, def_id: DefId, parent_args: &[ty::GenericArg<'tcx>], - segment: &hir::PathSegment<'tcx>, + segment: &hir::PathSegment<'_>, self_ty: Option>, ) -> (GenericArgsRef<'tcx>, GenericArgCountResult) { // If the type is parameterized by this region, then replace this @@ -718,7 +718,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { struct GenericArgsCtxt<'a, 'tcx> { lowerer: &'a dyn HirTyLowerer<'tcx>, def_id: DefId, - generic_args: &'a GenericArgs<'tcx>, + generic_args: &'a GenericArgs<'a>, span: Span, infer_args: bool, create_synth_args: bool, @@ -726,7 +726,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { } impl<'a, 'tcx> GenericArgsLowerer<'a, 'tcx> for GenericArgsCtxt<'a, 'tcx> { - fn args_for_def_id(&mut self, did: DefId) -> (Option<&'a GenericArgs<'tcx>>, bool) { + fn args_for_def_id(&mut self, did: DefId) -> (Option<&'a GenericArgs<'a>>, bool) { if did == self.def_id { (Some(self.generic_args), self.infer_args) } else { @@ -739,7 +739,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { &mut self, preceding_args: &[ty::GenericArg<'tcx>], param: &ty::GenericParamDef, - arg: &GenericArg<'tcx>, + arg: &GenericArg<'_>, ) -> ty::GenericArg<'tcx> { let tcx = self.lowerer.tcx(); @@ -749,7 +749,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { } } - let handle_ty_args = |has_default, ty: &hir::Ty<'tcx>| { + let handle_ty_args = |has_default, ty: &hir::Ty<'_>| { if has_default { tcx.check_optional_stability( param.def_id, @@ -896,7 +896,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { &self, span: Span, item_def_id: DefId, - item_segment: &hir::PathSegment<'tcx>, + item_segment: &hir::PathSegment<'_>, parent_args: GenericArgsRef<'tcx>, ) -> GenericArgsRef<'tcx> { let (args, _) = @@ -959,7 +959,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { modifiers: hir::TraitBoundModifiers { constness, polarity }, trait_ref, span, - }: &hir::PolyTraitRef<'tcx>, + }: &hir::PolyTraitRef<'_>, self_ty: Ty<'tcx>, bounds: &mut Vec<(ty::Clause<'tcx>, Span)>, predicate_filter: PredicateFilter, @@ -996,9 +996,9 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { let polarity = match polarity { hir::BoundPolarity::Positive | hir::BoundPolarity::Maybe(_) => { - ty::PredicatePolarity::Positive + ty::ClausePolarity::Positive } - hir::BoundPolarity::Negative(_) => ty::PredicatePolarity::Negative, + hir::BoundPolarity::Negative(_) => ty::ClausePolarity::Negative, }; let [leading_segments @ .., segment] = trait_ref.path.segments else { bug!() }; @@ -1047,7 +1047,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { | PredicateFilter::SelfTraitThatDefines(..) | PredicateFilter::SelfAndAssociatedTypeBounds => { let bound = poly_trait_ref.map_bound(|trait_ref| { - ty::ClauseKind::Trait(ty::TraitPredicate { trait_ref, polarity }) + ty::ClauseKind::Trait(ty::TraitClause { trait_ref, polarity }) }); let bound = (bound.upcast(tcx), span); // FIXME(-Znext-solver): We can likely remove this hack once the @@ -1102,7 +1102,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { | PredicateFilter::SelfAndAssociatedTypeBounds => { match constness { hir::BoundConstness::Always(_) => { - if polarity == ty::PredicatePolarity::Positive { + if polarity == ty::ClausePolarity::Positive { bounds.push(( poly_trait_ref .to_host_effect_clause(tcx, ty::BoundConstness::Const), @@ -1128,7 +1128,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { PredicateFilter::ConstIfConst | PredicateFilter::SelfConstIfConst => { match constness { hir::BoundConstness::Maybe(_) => { - if polarity == ty::PredicatePolarity::Positive { + if polarity == ty::ClausePolarity::Positive { bounds.push(( poly_trait_ref .to_host_effect_clause(tcx, ty::BoundConstness::Maybe), @@ -1150,7 +1150,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { // Don't register any associated item constraints for negative bounds, // since we should have emitted an error for them earlier, and they // would not be well-formed! - if polarity == ty::PredicatePolarity::Negative { + if polarity == ty::ClausePolarity::Negative { self.dcx().span_delayed_bug( constraint.span, "negative trait bounds should not have assoc item constraints", @@ -1182,7 +1182,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { span: Span, trait_def_id: DefId, self_ty: Ty<'tcx>, - trait_segment: &hir::PathSegment<'tcx>, + trait_segment: &hir::PathSegment<'_>, is_impl: bool, ) -> ty::TraitRef<'tcx> { self.report_internal_fn_trait(span, trait_def_id, trait_segment, is_impl); @@ -1211,7 +1211,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { &self, span: Span, def_id: DefId, - item_segment: &hir::PathSegment<'tcx>, + item_segment: &hir::PathSegment<'_>, ) -> Ty<'tcx> { let tcx = self.tcx(); let args = self.lower_generic_args_of_path_segment(span, def_id, item_segment); @@ -1348,7 +1348,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { assoc_tag: ty::AssocTag, assoc_ident: Ident, span: Span, - constraint: Option<&hir::AssocItemConstraint<'tcx>>, + constraint: Option<&hir::AssocItemConstraint<'_>>, ) -> Result, ErrorGuaranteed> where I: Iterator>, @@ -1419,8 +1419,8 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { pub fn lower_type_relative_ty_path( &self, self_ty: Ty<'tcx>, - hir_self_ty: &'tcx hir::Ty<'tcx>, - segment: &'tcx hir::PathSegment<'tcx>, + hir_self_ty: &hir::Ty<'_>, + segment: &hir::PathSegment<'_>, qpath_hir_id: HirId, span: Span, permit_variants: PermitVariants, @@ -1461,8 +1461,8 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { fn lower_type_relative_const_path( &self, self_ty: Ty<'tcx>, - hir_self_ty: &'tcx hir::Ty<'tcx>, - segment: &'tcx hir::PathSegment<'tcx>, + hir_self_ty: &hir::Ty<'_>, + segment: &hir::PathSegment<'_>, qpath_hir_id: HirId, span: Span, ) -> Result, ErrorGuaranteed> { @@ -1507,8 +1507,8 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { fn lower_type_relative_path( &self, self_ty: Ty<'tcx>, - hir_self_ty: &'tcx hir::Ty<'tcx>, - segment: &'tcx hir::PathSegment<'tcx>, + hir_self_ty: &hir::Ty<'_>, + segment: &hir::PathSegment<'_>, qpath_hir_id: HirId, span: Span, mode: LowerTypeRelativePathMode, @@ -1612,9 +1612,9 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { fn resolve_type_relative_path( &self, self_ty: Ty<'tcx>, - hir_self_ty: &'tcx hir::Ty<'tcx>, + hir_self_ty: &hir::Ty<'_>, assoc_tag: ty::AssocTag, - segment: &'tcx hir::PathSegment<'tcx>, + segment: &hir::PathSegment<'_>, qpath_hir_id: HirId, span: Span, variant_def_id: Option, @@ -1679,7 +1679,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { /// Search for inherent associated items for use at the type level. fn probe_inherent_assoc_item( &self, - segment: &hir::PathSegment<'tcx>, + segment: &hir::PathSegment<'_>, adt_did: DefId, self_ty: Ty<'tcx>, block: HirId, @@ -1904,8 +1904,8 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { span: Span, opt_self_ty: Option>, item_def_id: DefId, - trait_segment: Option<&hir::PathSegment<'tcx>>, - item_segment: &hir::PathSegment<'tcx>, + trait_segment: Option<&hir::PathSegment<'_>>, + item_segment: &hir::PathSegment<'_>, ) -> Ty<'tcx> { match self.lower_resolved_assoc_item_path( span, @@ -1929,8 +1929,8 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { span: Span, opt_self_ty: Option>, item_def_id: DefId, - trait_segment: Option<&hir::PathSegment<'tcx>>, - item_segment: &hir::PathSegment<'tcx>, + trait_segment: Option<&hir::PathSegment<'_>>, + item_segment: &hir::PathSegment<'_>, ) -> Result, ErrorGuaranteed> { let tcx = self.tcx(); let (item_def_id, item_args) = self.lower_resolved_assoc_item_path( @@ -1957,8 +1957,8 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { span: Span, opt_self_ty: Option>, item_def_id: DefId, - trait_segment: Option<&hir::PathSegment<'tcx>>, - item_segment: &hir::PathSegment<'tcx>, + trait_segment: Option<&hir::PathSegment<'_>>, + item_segment: &hir::PathSegment<'_>, assoc_tag: ty::AssocTag, ) -> Result<(DefId, GenericArgsRef<'tcx>), ErrorGuaranteed> { let tcx = self.tcx(); @@ -2183,7 +2183,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { pub fn lower_resolved_ty_path( &self, opt_self_ty: Option>, - path: &hir::Path<'tcx>, + path: &hir::Path<'_>, hir_id: HirId, permit_variants: PermitVariants, ) -> Ty<'tcx> { @@ -2381,7 +2381,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { /// Lower a [`hir::ConstArg`] to a (type-level) [`ty::Const`]. #[instrument(skip(self), level = "debug")] - pub fn lower_const_arg(&self, const_arg: &hir::ConstArg<'tcx>, ty: Ty<'tcx>) -> Const<'tcx> { + pub fn lower_const_arg(&self, const_arg: &hir::ConstArg<'_>, ty: Ty<'tcx>) -> Const<'tcx> { let tcx = self.tcx(); if let hir::ConstArgKind::Anon(anon) = &const_arg.kind { @@ -2475,7 +2475,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { fn lower_const_arg_array( &self, - array_expr: &'tcx hir::ConstArgArrayExpr<'tcx>, + array_expr: &hir::ConstArgArrayExpr<'_>, ty: Ty<'tcx>, ) -> Const<'tcx> { let tcx = self.tcx(); @@ -2524,8 +2524,8 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { fn lower_const_arg_tuple_call( &self, hir_id: HirId, - qpath: hir::QPath<'tcx>, - args: &'tcx [&'tcx hir::ConstArg<'tcx>], + qpath: hir::QPath<'_>, + args: &[&hir::ConstArg<'_>], span: Span, ) -> Const<'tcx> { let tcx = self.tcx(); @@ -2625,7 +2625,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { fn lower_const_arg_tup( &self, - exprs: &'tcx [&'tcx hir::ConstArg<'tcx>], + exprs: &[&hir::ConstArg<'_>], ty: Ty<'tcx>, span: Span, ) -> Const<'tcx> { @@ -2667,8 +2667,8 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { fn lower_const_arg_struct( &self, hir_id: HirId, - qpath: hir::QPath<'tcx>, - inits: &'tcx [&'tcx hir::ConstArgExprField<'tcx>], + qpath: hir::QPath<'_>, + inits: &[&hir::ConstArgExprField<'_>], span: Span, ) -> Const<'tcx> { // FIXME(mgca): try to deduplicate this function with @@ -2809,7 +2809,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { pub fn lower_path_for_struct_expr( &self, - qpath: hir::QPath<'tcx>, + qpath: hir::QPath<'_>, path_span: Span, hir_id: HirId, ) -> ResolvedStructPath<'tcx> { @@ -2846,7 +2846,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { fn lower_resolved_const_path( &self, opt_self_ty: Option>, - path: &hir::Path<'tcx>, + path: &hir::Path<'_>, hir_id: HirId, ) -> Const<'tcx> { let tcx = self.tcx(); @@ -3152,7 +3152,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { } } - fn lower_delegation_ty(&self, infer: hir::InferDelegation<'tcx>) -> Ty<'tcx> { + fn lower_delegation_ty(&self, infer: hir::InferDelegation<'_>) -> Ty<'tcx> { match infer { hir::InferDelegation::DefId(def_id) => { self.tcx().type_of(def_id).instantiate_identity().skip_norm_wip() @@ -3170,7 +3170,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { /// Lower a type from the HIR to our internal notion of a type. #[instrument(level = "debug", skip(self), ret)] - pub fn lower_ty(&self, hir_ty: &hir::Ty<'tcx>) -> Ty<'tcx> { + pub fn lower_ty(&self, hir_ty: &hir::Ty<'_>) -> Ty<'tcx> { let tcx = self.tcx(); let result_ty = match &hir_ty.kind { @@ -3428,7 +3428,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { &self, ty: Ty<'tcx>, ty_span: Span, - pat: &hir::TyPat<'tcx>, + pat: &hir::TyPat<'_>, ) -> Result, ErrorGuaranteed> { let tcx = self.tcx(); match pat.kind { @@ -3669,7 +3669,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { hir_id: HirId, safety: hir::Safety, abi: rustc_abi::ExternAbi, - decl: &hir::FnDecl<'tcx>, + decl: &hir::FnDecl<'_>, generics: Option<&hir::Generics<'_>>, hir_ty: Option<&hir::Ty<'_>>, ) -> ty::PolyFnSig<'tcx> { diff --git a/compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs b/compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs index 5788983811f03..cec65615111a7 100644 --- a/compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs +++ b/compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs @@ -414,7 +414,7 @@ fn check_specialization_on<'tcx>( _ if clause.is_global() => Ok(()), // We allow specializing on explicitly marked traits with no associated // items. - ty::ClauseKind::Trait(ty::TraitPredicate { trait_ref, polarity: _ }) => { + ty::ClauseKind::Trait(ty::TraitClause { trait_ref, polarity: _ }) => { if matches!( trait_specialization_kind(tcx, clause), Some(TraitSpecializationKind::Marker) @@ -433,7 +433,7 @@ fn check_specialization_on<'tcx>( .emit()) } } - ty::ClauseKind::Projection(ty::ProjectionPredicate { projection_term, term }) => Err(tcx + ty::ClauseKind::Projection(ty::ProjectionClause { projection_term, term }) => Err(tcx .dcx() .struct_span_err( span, @@ -463,7 +463,7 @@ fn trait_specialization_kind<'tcx>( clause: ty::Clause<'tcx>, ) -> Option { match clause.kind().skip_binder() { - ty::ClauseKind::Trait(ty::TraitPredicate { trait_ref, polarity: _ }) => { + ty::ClauseKind::Trait(ty::TraitClause { trait_ref, polarity: _ }) => { Some(tcx.trait_def(trait_ref.def_id).specialization_kind) } ty::ClauseKind::RegionOutlives(_) diff --git a/compiler/rustc_hir_analysis/src/lib.rs b/compiler/rustc_hir_analysis/src/lib.rs index 572200dbd7634..dc0b895ea1aa9 100644 --- a/compiler/rustc_hir_analysis/src/lib.rs +++ b/compiler/rustc_hir_analysis/src/lib.rs @@ -226,7 +226,7 @@ pub fn check_crate(tcx: TyCtxt<'_>) { /// It's used in rustdoc and Clippy. /// /// -pub fn lower_ty<'tcx>(tcx: TyCtxt<'tcx>, hir_ty: &hir::Ty<'tcx>) -> Ty<'tcx> { +pub fn lower_ty<'tcx>(tcx: TyCtxt<'tcx>, hir_ty: &hir::Ty<'_>) -> Ty<'tcx> { // In case there are any projections, etc., find the "environment" // def-ID that will be used to determine the traits/predicates in // scope. This is derived from the enclosing item-like thing. @@ -240,7 +240,7 @@ pub fn lower_ty<'tcx>(tcx: TyCtxt<'tcx>, hir_ty: &hir::Ty<'tcx>) -> Ty<'tcx> { // FIXME(const_generics): having special methods for rustdoc in `rustc_hir_analysis` is cursed pub fn lower_const_arg_for_rustdoc<'tcx>( tcx: TyCtxt<'tcx>, - hir_ct: &hir::ConstArg<'tcx>, + hir_ct: &hir::ConstArg<'_>, ty: Ty<'tcx>, ) -> Const<'tcx> { let env_def_id = tcx.hir_get_parent_item(hir_ct.hir_id); diff --git a/compiler/rustc_hir_analysis/src/variance/mod.rs b/compiler/rustc_hir_analysis/src/variance/mod.rs index c733292df7d98..163cd5ab5bfbc 100644 --- a/compiler/rustc_hir_analysis/src/variance/mod.rs +++ b/compiler/rustc_hir_analysis/src/variance/mod.rs @@ -194,7 +194,7 @@ fn variance_of_opaque( // which thus mentions `'a` and should thus accept hidden types that borrow 'a // instead of requiring an additional `+ 'a`. match clause.kind().skip_binder() { - ty::ClauseKind::Trait(ty::TraitPredicate { + ty::ClauseKind::Trait(ty::TraitClause { trait_ref: ty::TraitRef { def_id: _, args, .. }, polarity: _, }) @@ -206,7 +206,7 @@ fn variance_of_opaque( arg.visit_with(&mut collector); } } - ty::ClauseKind::Projection(ty::ProjectionPredicate { + ty::ClauseKind::Projection(ty::ProjectionClause { projection_term: ty::AliasTerm { args, .. }, term, }) => { diff --git a/compiler/rustc_hir_typeck/src/closure.rs b/compiler/rustc_hir_typeck/src/closure.rs index a9ce46b68527f..de2f152011dbe 100644 --- a/compiler/rustc_hir_typeck/src/closure.rs +++ b/compiler/rustc_hir_typeck/src/closure.rs @@ -483,7 +483,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { &self, cause_span: Option, closure_kind: hir::ClosureKind, - projection: ty::PolyProjectionPredicate<'tcx>, + projection: ty::PolyProjectionClause<'tcx>, ) -> Option> { let def_id = projection.item_def_id(); @@ -515,7 +515,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { fn extract_sig_from_projection( &self, cause_span: Option, - projection: ty::PolyProjectionPredicate<'tcx>, + projection: ty::PolyProjectionClause<'tcx>, ) -> Option> { let projection = self.resolve_vars_if_possible(projection); @@ -560,7 +560,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { fn extract_sig_from_projection_and_future_bound( &self, cause_span: Option, - projection: ty::PolyProjectionPredicate<'tcx>, + projection: ty::PolyProjectionClause<'tcx>, ) -> Option> { let projection = self.resolve_vars_if_possible(projection); @@ -1031,7 +1031,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { fn deduce_future_output_from_projection( &self, cause_span: Span, - predicate: ty::PolyProjectionPredicate<'tcx>, + predicate: ty::PolyProjectionClause<'tcx>, ) -> Option> { debug!("deduce_future_output_from_projection(predicate={:?})", predicate); diff --git a/compiler/rustc_hir_typeck/src/expr.rs b/compiler/rustc_hir_typeck/src/expr.rs index cbbd66f648eb8..6ebf382083f25 100644 --- a/compiler/rustc_hir_typeck/src/expr.rs +++ b/compiler/rustc_hir_typeck/src/expr.rs @@ -3575,9 +3575,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { ocx.register_obligations(traits::predicates_for_generics( |idx, span| { cause.clone().derived_cause( - ty::Binder::dummy(ty::TraitPredicate { + ty::Binder::dummy(ty::TraitClause { trait_ref: impl_trait_ref, - polarity: ty::PredicatePolarity::Positive, + polarity: ty::ClausePolarity::Positive, }), |derived| { ObligationCauseCode::ImplDerived(Box::new(traits::ImplDerivedCause { diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs index 8ff4c3bf28c34..49559304d6ba3 100644 --- a/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs +++ b/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs @@ -569,7 +569,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { } } - pub(crate) fn lower_ty(&self, hir_ty: &hir::Ty<'tcx>) -> LoweredTy<'tcx> { + pub(crate) fn lower_ty(&self, hir_ty: &hir::Ty<'_>) -> LoweredTy<'tcx> { let ty = self.lowerer().lower_ty(hir_ty); self.register_wf_obligation(ty.into(), hir_ty.span, ObligationCauseCode::WellFormed(None)); LoweredTy::from_raw(self, hir_ty.span, ty) @@ -629,7 +629,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { pub(crate) fn lower_const_arg( &self, - const_arg: &'tcx hir::ConstArg<'tcx>, + const_arg: &hir::ConstArg<'_>, ty: Ty<'tcx>, ) -> ty::Const<'tcx> { let ct = self.lowerer().lower_const_arg(const_arg, ty); @@ -1346,7 +1346,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { &mut self, preceding_args: &[ty::GenericArg<'tcx>], param: &ty::GenericParamDef, - arg: &GenericArg<'tcx>, + arg: &GenericArg<'_>, ) -> ty::GenericArg<'tcx> { match (¶m.kind, arg) { (GenericParamDefKind::Lifetime, GenericArg::Lifetime(lt)) => self diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/inspect_obligations.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/inspect_obligations.rs index e6de8b55ef2f9..8b76a5eb44db7 100644 --- a/compiler/rustc_hir_typeck/src/fn_ctxt/inspect_obligations.rs +++ b/compiler/rustc_hir_typeck/src/fn_ctxt/inspect_obligations.rs @@ -171,11 +171,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { predicate: ty::Predicate<'tcx>, ) -> Option { // The predicates we are looking for look like - // `TraitPredicate(>, polarity:Positive)`. + // `TraitClause(>, polarity:Positive)`. // They will have no bound variables. match predicate.kind().no_bound_vars() { - Some(ty::PredicateKind::Clause(ty::ClauseKind::Trait(ty::TraitPredicate { - polarity: ty::PredicatePolarity::Positive, + Some(ty::PredicateKind::Clause(ty::ClauseKind::Trait(ty::TraitClause { + polarity: ty::ClausePolarity::Positive, trait_ref, }))) if trait_ref.def_id == from_trait && self.shallow_resolve(trait_ref.self_ty()).kind() diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs index 20fa6d5f7a344..e488f8c9a7887 100644 --- a/compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs +++ b/compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs @@ -387,7 +387,7 @@ impl<'tcx> HirTyLowerer<'tcx> for FnCtxt<'_, 'tcx> { &self, span: Span, item_def_id: DefId, - item_segment: &rustc_hir::PathSegment<'tcx>, + item_segment: &rustc_hir::PathSegment<'_>, poly_trait_ref: ty::PolyTraitRef<'tcx>, ) -> Result<(DefId, ty::GenericArgsRef<'tcx>), ErrorGuaranteed> { let trait_ref = self.instantiate_binder_with_fresh_vars( @@ -452,7 +452,7 @@ impl<'tcx> HirTyLowerer<'tcx> for FnCtxt<'_, 'tcx> { fn lower_fn_sig( &self, - decl: &rustc_hir::FnDecl<'tcx>, + decl: &rustc_hir::FnDecl<'_>, _generics: Option<&rustc_hir::Generics<'_>>, _hir_id: rustc_hir::HirId, _hir_ty: Option<&hir::Ty<'_>>, diff --git a/compiler/rustc_hir_typeck/src/method/confirm.rs b/compiler/rustc_hir_typeck/src/method/confirm.rs index e31692492c263..fd1e37b842893 100644 --- a/compiler/rustc_hir_typeck/src/method/confirm.rs +++ b/compiler/rustc_hir_typeck/src/method/confirm.rs @@ -451,7 +451,7 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> { &mut self, preceding_args: &[ty::GenericArg<'tcx>], param: &ty::GenericParamDef, - arg: &GenericArg<'tcx>, + arg: &GenericArg<'_>, ) -> ty::GenericArg<'tcx> { match (¶m.kind, arg) { (GenericParamDefKind::Lifetime, GenericArg::Lifetime(lt)) => self diff --git a/compiler/rustc_hir_typeck/src/method/probe.rs b/compiler/rustc_hir_typeck/src/method/probe.rs index b2e0a3bd7a195..8cf6cfbc8fffa 100644 --- a/compiler/rustc_hir_typeck/src/method/probe.rs +++ b/compiler/rustc_hir_typeck/src/method/probe.rs @@ -1139,7 +1139,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> { for (bound_trait_pred, _) in traits::expand_trait_aliases(self.tcx, [(trait_ref.upcast(self.tcx), self.span)]).0 { - assert_eq!(bound_trait_pred.polarity(), ty::PredicatePolarity::Positive); + assert_eq!(bound_trait_pred.polarity(), ty::ClausePolarity::Positive); let bound_trait_ref = bound_trait_pred.map_bound(|pred| pred.trait_ref); for item in self.impl_or_trait_item(bound_trait_ref.def_id()) { if !self.has_applicable_self(&item) { diff --git a/compiler/rustc_hir_typeck/src/method/suggest.rs b/compiler/rustc_hir_typeck/src/method/suggest.rs index a22b6f746a952..05062155915d6 100644 --- a/compiler/rustc_hir_typeck/src/method/suggest.rs +++ b/compiler/rustc_hir_typeck/src/method/suggest.rs @@ -121,7 +121,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { if let ty::PredicateKind::Clause(ty::ClauseKind::Trait(trait_pred)) = predicate.kind().as_ref().skip_binder() { - let ty::TraitPredicate { trait_ref: ty::TraitRef { args, .. }, .. } = trait_pred; + let ty::TraitClause { trait_ref: ty::TraitRef { args, .. }, .. } = trait_pred; if args.is_empty() { return false; } @@ -1949,7 +1949,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { match pred.kind().skip_binder() { ty::PredicateKind::Clause(ty::ClauseKind::Trait(pred)) => { self.tcx.is_lang_item(pred.def_id(), LangItem::Sized) - && pred.polarity == ty::PredicatePolarity::Positive + && pred.polarity == ty::ClausePolarity::Positive } _ => false, } @@ -3543,7 +3543,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { } foreign_preds - .sort_by_key(|(_, pred): &(_, ty::TraitPredicate<'_>)| pred.trait_ref.to_string()); + .sort_by_key(|(_, pred): &(_, ty::TraitClause<'_>)| pred.trait_ref.to_string()); for (_, pred) in &foreign_preds { let ty = pred.self_ty(); @@ -3587,7 +3587,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { /// Returns Some(list_of_derives) if possible, or None if not. fn consider_suggesting_derives_for_ty( &self, - trait_pred: ty::TraitPredicate<'tcx>, + trait_pred: ty::TraitClause<'tcx>, adt: ty::AdtDef<'tcx>, ) -> Option> { let diagnostic_name = self.tcx.get_diagnostic_name(trait_pred.def_id())?; @@ -4848,9 +4848,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { } }), ); - let trait_pred = ty::Binder::dummy(ty::TraitPredicate { + let trait_pred = ty::Binder::dummy(ty::TraitClause { trait_ref, - polarity: ty::PredicatePolarity::Positive, + polarity: ty::ClausePolarity::Positive, }); let obligation = Obligation::new(self.tcx, self.misc(rcvr.span), self.param_env, trait_ref); self.err_ctxt().note_different_trait_with_same_name(err, &obligation, trait_pred) @@ -4947,7 +4947,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { fn suggest_hashmap_on_unsatisfied_hashset_buildhasher( &self, err: &mut Diag<'_>, - pred: &ty::TraitPredicate<'_>, + pred: &ty::TraitClause<'_>, adt: ty::AdtDef<'_>, ) -> bool { if self.tcx.is_diagnostic_item(sym::HashSet, adt.did()) diff --git a/compiler/rustc_index_macros/src/newtype.rs b/compiler/rustc_index_macros/src/newtype.rs index 076dc4c6f81e5..aaa025bd7cbdb 100644 --- a/compiler/rustc_index_macros/src/newtype.rs +++ b/compiler/rustc_index_macros/src/newtype.rs @@ -138,14 +138,12 @@ impl Parse for Newtype { } #[inline] - #[cfg(not(bootstrap))] fn forward_overflowing(start: Self, u: usize) -> (Self, bool) { let (s, o) = Self::index(start).overflowing_add(u); (Self::from_usize(s), o) } #[inline] - #[cfg(not(bootstrap))] fn backward_overflowing(start: Self, u: usize) -> (Self, bool) { let (s, o) = Self::index(start).overflowing_sub(u); (Self::from_usize(s), o) diff --git a/compiler/rustc_infer/src/infer/canonical/canonicalizer.rs b/compiler/rustc_infer/src/infer/canonical/canonicalizer.rs index e0adcfc06a0ed..770520413c666 100644 --- a/compiler/rustc_infer/src/infer/canonical/canonicalizer.rs +++ b/compiler/rustc_infer/src/infer/canonical/canonicalizer.rs @@ -46,7 +46,7 @@ impl<'tcx> InferCtxt<'tcx> { V: TypeFoldable>, { let ty::ParamEnvAnd { param_env, value } = value; - let canonical_param_env = self.tcx.canonical_param_env_cache.get_or_insert( + let canonical_param_env = self.tcx.caches.canonical_param_env_cache.get_or_insert( self.tcx, param_env, query_state, diff --git a/compiler/rustc_infer/src/infer/canonical/instantiate.rs b/compiler/rustc_infer/src/infer/canonical/instantiate.rs index 9df7b35211df0..7e670cc233752 100644 --- a/compiler/rustc_infer/src/infer/canonical/instantiate.rs +++ b/compiler/rustc_infer/src/infer/canonical/instantiate.rs @@ -143,17 +143,18 @@ impl<'tcx> TypeFolder> for CanonicalInstantiator<'tcx> { // is both expensive (depending on the size of the clauses) and a pure function. let index = *self .tcx + .caches .highest_var_in_clauses_cache .lock() .entry(c) .or_insert_with(|| highest_var_in_clauses(c)); let c_args = &self.var_values[..=index]; - if let Some(c) = self.tcx.clauses_cache.lock().get(&(c, c_args)) { + if let Some(c) = self.tcx.caches.clauses_cache.lock().get(&(c, c_args)) { c } else { let folded = c.super_fold_with(self); - self.tcx.clauses_cache.lock().insert((c, c_args), folded); + self.tcx.caches.clauses_cache.lock().insert((c, c_args), folded); folded } } diff --git a/compiler/rustc_infer/src/infer/opaque_types/mod.rs b/compiler/rustc_infer/src/infer/opaque_types/mod.rs index 08c7c49417124..70423ca7da1be 100644 --- a/compiler/rustc_infer/src/infer/opaque_types/mod.rs +++ b/compiler/rustc_infer/src/infer/opaque_types/mod.rs @@ -335,7 +335,7 @@ impl<'tcx> InferCtxt<'tcx> { goals.push(Goal::new( self.tcx, param_env, - ty::ProjectionPredicate { + ty::ProjectionClause { projection_term: projection_ty.into(), term: ty_var.into(), }, diff --git a/compiler/rustc_infer/src/infer/projection.rs b/compiler/rustc_infer/src/infer/projection.rs index 43870ccbdd39b..5736b0a24eff3 100644 --- a/compiler/rustc_infer/src/infer/projection.rs +++ b/compiler/rustc_infer/src/infer/projection.rs @@ -29,7 +29,7 @@ impl<'tcx> InferCtxt<'tcx> { self.next_const_var(span).into() }; - let projection = ty::ProjectionPredicate { projection_term: alias_term, term: infer_var }; + let projection = ty::ProjectionClause { projection_term: alias_term, term: infer_var }; let obligation = Obligation::with_depth(self.tcx, cause, recursion_depth, param_env, projection); obligations.push(obligation); diff --git a/compiler/rustc_infer/src/infer/relate/generalize.rs b/compiler/rustc_infer/src/infer/relate/generalize.rs index 0e4ebdfb90085..afdabb38c3b20 100644 --- a/compiler/rustc_infer/src/infer/relate/generalize.rs +++ b/compiler/rustc_infer/src/infer/relate/generalize.rs @@ -171,7 +171,7 @@ impl<'tcx> InferCtxt<'tcx> { // instead create a new inference variable `?normalized_source`, emitting // `Projection(normalized_source, ?ty_normalized)` and // `?normalized_source <: generalized_term`. - relation.register_predicates([ty::ProjectionPredicate { + relation.register_predicates([ty::ProjectionClause { projection_term: source_alias, term: generalized_term, }]); diff --git a/compiler/rustc_infer/src/traits/mod.rs b/compiler/rustc_infer/src/traits/mod.rs index 86aae77adcf8e..b3552bc68d517 100644 --- a/compiler/rustc_infer/src/traits/mod.rs +++ b/compiler/rustc_infer/src/traits/mod.rs @@ -87,8 +87,8 @@ impl Hash for Obligation<'_, T> { } pub type PredicateObligation<'tcx> = Obligation<'tcx, ty::Predicate<'tcx>>; -pub type TraitObligation<'tcx> = Obligation<'tcx, ty::TraitPredicate<'tcx>>; -pub type PolyTraitObligation<'tcx> = Obligation<'tcx, ty::PolyTraitPredicate<'tcx>>; +pub type TraitObligation<'tcx> = Obligation<'tcx, ty::TraitClause<'tcx>>; +pub type PolyTraitObligation<'tcx> = Obligation<'tcx, ty::PolyTraitClause<'tcx>>; pub type PredicateObligations<'tcx> = ThinVec>; @@ -175,7 +175,7 @@ impl<'tcx, O> Obligation<'tcx, O> { } impl<'tcx> PolyTraitObligation<'tcx> { - pub fn polarity(&self) -> ty::PredicatePolarity { + pub fn polarity(&self) -> ty::ClausePolarity { self.predicate.skip_binder().polarity } diff --git a/compiler/rustc_infer/src/traits/util.rs b/compiler/rustc_infer/src/traits/util.rs index 2630c8b125418..cc29546adb880 100644 --- a/compiler/rustc_infer/src/traits/util.rs +++ b/compiler/rustc_infer/src/traits/util.rs @@ -81,7 +81,7 @@ impl<'tcx> Elaboratable> for PredicateObligation<'tcx> { &self, clause: ty::Clause<'tcx>, span: Span, - parent_trait_pred: ty::PolyTraitPredicate<'tcx>, + parent_trait_pred: ty::PolyTraitClause<'tcx>, index: usize, ) -> Self { let cause = self.cause.clone().derived_cause(parent_trait_pred, |derived| { @@ -126,7 +126,7 @@ pub fn transitive_bounds_that_define_assoc_item<'tcx>( .map(Unnormalized::skip_norm_wip) .map(|(clause, _)| clause.instantiate_supertrait(tcx, trait_ref)) .filter_map(|clause| clause.as_trait_clause()) - .filter(|clause| clause.polarity() == ty::PredicatePolarity::Positive) + .filter(|clause| clause.polarity() == ty::ClausePolarity::Positive) .map(|clause| clause.map_bound(|clause| clause.trait_ref)), ); diff --git a/compiler/rustc_interface/src/callbacks.rs b/compiler/rustc_interface/src/callbacks.rs index b2ad70bc4811b..2fad0297e31e0 100644 --- a/compiler/rustc_interface/src/callbacks.rs +++ b/compiler/rustc_interface/src/callbacks.rs @@ -12,7 +12,7 @@ use std::fmt; use rustc_errors::DiagInner; -use rustc_middle::dep_graph::{DepNodeIndex, QuerySideEffect, TaskDepsRef}; +use rustc_middle::dep_graph::{QuerySideEffect, TaskDepsRef}; use rustc_middle::ty::tls; use rustc_span::Symbol; @@ -59,13 +59,13 @@ fn track_feature(feature: Symbol) { }; let tcx = icx.tcx; - if let Some(dep_node_index) = tcx.sess.used_features.lock().get(&feature).copied() { - tcx.dep_graph.read_index(DepNodeIndex::from_u32(dep_node_index)); + if let Some(dep_node_index) = tcx.query_system.used_features.lock().get(&feature).copied() { + tcx.dep_graph.read_index(dep_node_index); } else { let dep_node_index = tcx .dep_graph .encode_side_effect(tcx, QuerySideEffect::CheckFeature { symbol: feature }); - tcx.sess.used_features.lock().insert(feature, dep_node_index.as_u32()); + tcx.query_system.used_features.lock().insert(feature, dep_node_index); tcx.dep_graph.read_index(dep_node_index); } }) diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index b059cae647341..fa9d2f8e852b5 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -1011,8 +1011,8 @@ pub fn create_and_enter_global_ctxt FnOnce(TyCtxt<'tcx>) -> T>( untracked, incr_comp_session.as_ref(), dep_graph, - rustc_query_impl::make_dep_kind_vtables(&arena), rustc_query_impl::query_system( + &arena, providers.queries, providers.extern_queries, query_result_on_disk_cache, diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 627fb962d5dbf..370614d5d8ebc 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -557,7 +557,7 @@ fn type_implements_negative_copy_modulo_regions<'tcx>( ) -> bool { let (infcx, param_env) = tcx.infer_ctxt().build_with_typing_env(typing_env); let trait_ref = ty::TraitRef::new(tcx, tcx.require_lang_item(LangItem::Copy, DUMMY_SP), [ty]); - let pred = ty::TraitPredicate { trait_ref, polarity: ty::PredicatePolarity::Negative }; + let pred = ty::TraitClause { trait_ref, polarity: ty::ClausePolarity::Negative }; let obligation = traits::Obligation { cause: traits::ObligationCause::dummy(), param_env, diff --git a/compiler/rustc_lint/src/internal.rs b/compiler/rustc_lint/src/internal.rs index 454e99f2d29e0..2cac8551f1bfb 100644 --- a/compiler/rustc_lint/src/internal.rs +++ b/compiler/rustc_lint/src/internal.rs @@ -7,7 +7,7 @@ use rustc_hir as hir; use rustc_hir::def::Res; use rustc_hir::def_id::DefId; use rustc_hir::{Expr, ExprKind, HirId, find_attr}; -use rustc_middle::ty::{self, GenericArgsRef, PredicatePolarity}; +use rustc_middle::ty::{self, ClausePolarity, GenericArgsRef}; use rustc_session::{declare_lint_pass, declare_tool_lint}; use rustc_span::hygiene::{ExpnKind, MacroKind}; use rustc_span::{Span, sym}; @@ -135,7 +135,7 @@ fn has_unstable_into_iter_predicate<'tcx>( continue; }; if trait_clause.def_id() != into_iterator_def_id - || trait_clause.polarity() != PredicatePolarity::Positive + || trait_clause.polarity() != ClausePolarity::Positive { continue; } diff --git a/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs b/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs index d9dfe5fa7de0c..78030e9b17b1b 100644 --- a/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs +++ b/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs @@ -1,7 +1,7 @@ use rustc_hir::{self as hir, AmbigArg}; use rustc_infer::infer::TyCtxtInferExt; use rustc_macros::{Diagnostic, Subdiagnostic}; -use rustc_middle::ty::print::{PrintTraitPredicateExt as _, TraitPredPrintModifiersAndPath}; +use rustc_middle::ty::print::{PrintTraitClauseExt as _, TraitClausePrintModifiersAndPath}; use rustc_middle::ty::{self, BottomUpFolder, Ty, TypeFoldable, Unnormalized}; use rustc_session::{declare_lint, declare_lint_pass}; use rustc_span::{Span, kw}; @@ -229,5 +229,5 @@ struct OpaqueHiddenInferredBoundLint<'tcx> { struct AddBound<'tcx> { #[primary_span] suggest_span: Span, - trait_ref: TraitPredPrintModifiersAndPath<'tcx>, + trait_ref: TraitClausePrintModifiersAndPath<'tcx>, } diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs index da2220cf7a5fd..5ee3c5a741bdc 100644 --- a/compiler/rustc_lint_defs/src/builtin.rs +++ b/compiler/rustc_lint_defs/src/builtin.rs @@ -4560,16 +4560,13 @@ declare_lint! { /// /// ### Example /// - // FIXME(bootstrap): Use a regular Rust doc code block after stage 0 emits - // `malformed_diagnostic_filters` instead of E0232 for this example. - #[cfg_attr(bootstrap, doc = "```rust,ignore (stage 0 emits E0232)")] - #[cfg_attr(not(bootstrap), doc = "```rust")] + /// ```rust /// #![feature(rustc_attrs)] /// #![allow(internal_features)] /// /// #[rustc_on_unimplemented(on(invalid, message = "unused"))] /// trait Trait {} - #[doc = "```"] + /// ``` /// /// {{produces}} /// @@ -5650,13 +5647,12 @@ declare_lint! { /// /// ### Example /// - #[cfg_attr(bootstrap, doc = "```rust,compile_fail")] - #[cfg_attr(not(bootstrap), doc = "```rust,no_run")] + /// ```rust,no_run /// fn main() { /// let x = panic!(); /// x.clone(); /// } - #[doc = "```"] + /// ``` /// /// {{produces}} /// diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index f4d3380594c9f..8a565369d7610 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder.rs @@ -411,12 +411,12 @@ impl<'a, 'tcx> TyDecoder<'tcx> for MetadataDecodeContext<'a, 'tcx> { let key = ty::CReaderCacheKey { cnum: Some(self.cdata.cnum), pos: shorthand }; - if let Some(&ty) = tcx.ty_rcache.borrow().get(&key) { + if let Some(&ty) = tcx.caches.ty_rcache.borrow().get(&key) { return ty; } let ty = or_insert_with(self); - tcx.ty_rcache.borrow_mut().insert(key, ty); + tcx.caches.ty_rcache.borrow_mut().insert(key, ty); ty } diff --git a/compiler/rustc_middle/src/dep_graph/graph.rs b/compiler/rustc_middle/src/dep_graph/graph.rs index 08bb5efc685ee..a4165d793069d 100644 --- a/compiler/rustc_middle/src/dep_graph/graph.rs +++ b/compiler/rustc_middle/src/dep_graph/graph.rs @@ -48,7 +48,7 @@ pub enum QuerySideEffect { /// effect dep node as a dependency. Diagnostic(DiagInner), /// Records the feature used during query execution. - /// This feature will be inserted into `sess.used_features` + /// This feature will be inserted into `query_system.used_features` /// if we mark the query as green, as that query will have /// the side effect dep node as a dependency. CheckFeature { symbol: Symbol }, @@ -779,7 +779,7 @@ impl DepGraphData { tcx.dcx().emit_diagnostic(diagnostic.clone()); } QuerySideEffect::CheckFeature { symbol } => { - tcx.sess.used_features.lock().insert(*symbol, dep_node_index.as_u32()); + tcx.query_system.used_features.lock().insert(*symbol, dep_node_index); } } @@ -1230,8 +1230,7 @@ impl CurrentDepGraph { CurrentDepGraph { encoder: GraphEncoder::new(session, encoder, prev_index_space_len, previous), anon_node_to_index: ShardedHashMap::with_capacity( - // FIXME: The count estimate is off as anon nodes are only a portion of the nodes. - new_node_count_estimate, + 3 * new_node_count_estimate / 100, // Reserve capacity for 3% anon nodes ), anon_id_seed, #[cfg(debug_assertions)] diff --git a/compiler/rustc_middle/src/dep_graph/mod.rs b/compiler/rustc_middle/src/dep_graph/mod.rs index 3389c3ec91a5a..e63a281002f0d 100644 --- a/compiler/rustc_middle/src/dep_graph/mod.rs +++ b/compiler/rustc_middle/src/dep_graph/mod.rs @@ -80,7 +80,7 @@ where impl<'tcx> TyCtxt<'tcx> { #[inline] pub fn dep_kind_vtable(self, dk: DepKind) -> &'tcx DepKindVTable<'tcx> { - &self.dep_kind_vtables[dk.as_usize()] + &self.query_system.dep_kind_vtables[dk.as_usize()] } #[inline(always)] diff --git a/compiler/rustc_middle/src/lib.rs b/compiler/rustc_middle/src/lib.rs index 0f30498ee09cb..60fb7fb53a533 100644 --- a/compiler/rustc_middle/src/lib.rs +++ b/compiler/rustc_middle/src/lib.rs @@ -81,6 +81,7 @@ pub mod metadata; pub mod middle; pub mod mir; pub mod mono; +pub mod ptrauth; pub mod queries; pub mod query; pub mod thir; diff --git a/compiler/rustc_middle/src/mir/graphviz.rs b/compiler/rustc_middle/src/mir/graphviz.rs index 4002d0ebd392d..1cd34c35bb313 100644 --- a/compiler/rustc_middle/src/mir/graphviz.rs +++ b/compiler/rustc_middle/src/mir/graphviz.rs @@ -65,8 +65,8 @@ where // Graph label let mut label = String::from(""); - // FIXME: remove this unwrap - write_graph_label(tcx, body, &mut label).unwrap(); + write_graph_label(tcx, body, &mut label) + .map_err(|_| io::Error::other("failed to write graph label"))?; let g = mir_fn_to_generic_graph(tcx, body); let settings = GraphvizSettings { graph_attrs: Some(graph_attrs.join(" ")), diff --git a/compiler/rustc_middle/src/ptrauth/discriminator.rs b/compiler/rustc_middle/src/ptrauth/discriminator.rs new file mode 100644 index 0000000000000..7501f1b072188 --- /dev/null +++ b/compiler/rustc_middle/src/ptrauth/discriminator.rs @@ -0,0 +1,491 @@ +//! Function pointer type discrimination for pointer authentication. + +//! This module implements Rust's equivalent of Clang's function pointer type +//! discriminator computation used in pointer authentication. +//! +//! Compatibility with Clang is a primary goal. The discriminator produced for a +//! given external "C" function type must match the value computed by Clang so that +//! function pointers can be exchanged safely between Rust and C code while +//! preserving pointer authentication semantics. +//! +//! The implementation mirrors Clang's behavior in +//! `ASTContext::encodeTypeForFunctionPointerAuth`, ensuring that identical +//! C-compatible function types produce identical discriminators. See: +//! . +//! +//! ## Overview +//! +//! The computation is structured into three conceptual stages: +//! +//! ### 1. Type normalization and lowering +//! Rust types are converted into a language-independent representation +//! (`ClangDiscTy`) that mirrors the type categories used by Clang when computing +//! function pointer discriminators. This includes canonicalization such as +//! treating all pointer-like types uniformly and mapping Rust constructs onto +//! their closest C equivalents. +//! One notable exception is C `_Complex`. Rust has no corresponding native type, +//! so there is no canonical Rust representation to map onto Clang's `_Complex` +//! type category. Rather than infer one (for example, by treating `(f32, f32)` +//! or `(f64, f64)` as complex numbers), this implementation leaves such +//! representation choices to users and does not provide dedicated `_Complex` +//! encoding. +//! +//! ### 2. Type encoding +//! The lowered representation is serialized into a byte stream using rules +//! intended to match Clang's implementation in: +//! `encodeTypeForFunctionPointerAuth`. The resulting encoding describes the +//! function signature in a target-independent form suitable for hashing. +//! +//! ### 3. Discriminator hashing +//! The encoded byte stream is hashed using LLVM's stable SipHash-2-4 based +//! discriminator algorithm. The implementation here is a direct translation +//! of LLVM/Clang's logic and must remain bit-for-bit compatible. See: +//! . +//! Defined in `llvm_siphash.rs`. +//! +//! ## Module structure +//! +//! - High-level API +//! - `FnPtrDiscriminatorSource` +//! - `ptrauth_compute_fn_ptr_type_discriminator_for` +//! - `ptrauth_clone_discriminated_schema_for` +//! +//! - Low-level API +//! - `FnPtrTypeDiscriminatorInput` +//! - `compute_fn_ptr_type_discriminator` +//! +//! - Signature extraction +//! - `extract_fn_ptr_type` +//! +//! - Clang-compatible type model +//! - `ClangDiscTy` +//! - `canonicalize_c_type` +//! - `to_clang_disc_ty` +//! +//! - Encoding +//! - `PtrauthEncoder` +//! - `encode_ty` +//! +//! ## Compatibility requirements +//! +//! Any changes to the encoding or hashing logic should be validated against Clang's +//! discriminator computation. Divergence from Clang will result in incompatible +//! pointer authentication values across language boundaries. +//! +//! This implementation intentionally approximates Clang's behavior for extern "C" +//! function types only. It does NOT attempt to model full type system rules. + +use rustc_abi::ExternAbi; +use rustc_middle::ty::{self, Instance, Ty, TyCtxt, Unnormalized}; +use rustc_session::PointerAuthSchema; +use rustc_span::sym; + +use crate::ptrauth::llvm_siphash::llvm_pointer_auth_stable_siphash; + +/// Types that can serve as a source for function pointer type discrimination. +/// +/// This trait abstracts over the different compiler representations from which +/// a function signature can be obtained. Implementations construct the +/// canonical `FnPtrTypeDiscriminatorInput` consumed by the discriminator +/// computation. +/// +/// This is intended primarily for ergonomic use at call sites, allowing code +/// to compute discriminators directly from an `Instance`, `Ty`, or `FnSig` +/// without manually constructing the intermediate representation. +pub trait FnPtrDiscriminatorSource<'tcx>: Sized { + fn discriminator_input(self, tcx: TyCtxt<'tcx>) -> Option>; +} + +/// Enables discriminator computation directly from Rust function types. +/// +/// Accepts both: +/// - `FnPtr`: actual function pointer types +/// - `FnDef`: function items +/// +/// FnDef is only accepted for convenience; the discriminator is still computed +/// from the instantiated function signature. +impl<'tcx> FnPtrDiscriminatorSource<'tcx> for Ty<'tcx> { + fn discriminator_input(self, tcx: TyCtxt<'tcx>) -> Option> { + let ty = extract_fn_ptr_type(tcx, self)?; + + match ty.kind() { + ty::FnPtr(sig, header) => { + let sig = sig.skip_binder(); + Some(FnPtrTypeDiscriminatorInput::from_sig_tys(sig, header)) + } + + ty::FnDef(def_id, args) => { + let sig = tcx.fn_sig(*def_id).instantiate(tcx, args.skip_binder()).skip_binder(); + + Some(FnPtrTypeDiscriminatorInput::from_sig(sig)) + } + + _ => None, + } + } +} +/// Enables discriminator computation directly from monomorphized function +/// instances. +/// +/// The instance's signature is instantiated using its generic arguments and +/// normalized before constructing the canonical discriminator input. +impl<'tcx> FnPtrDiscriminatorSource<'tcx> for Instance<'tcx> { + fn discriminator_input(self, tcx: TyCtxt<'tcx>) -> Option> { + let sig = tcx + .instantiate_and_normalize_erasing_regions( + self.args, + ty::TypingEnv::fully_monomorphized(), + tcx.fn_sig(self.def_id()), + ) + .skip_binder(); + + Some(FnPtrTypeDiscriminatorInput::from_sig(sig)) + } +} +/// Enables discriminator computation directly from instantiated function +/// signatures. +/// +/// The signature is assumed to already be instantiated and normalized. +impl<'tcx> FnPtrDiscriminatorSource<'tcx> for ty::FnSig<'tcx> { + fn discriminator_input(self, _: TyCtxt<'tcx>) -> Option> { + Some(FnPtrTypeDiscriminatorInput::from_sig(self)) + } +} + +/// Computes the function pointer type discriminator directly from a supported +/// source. +/// +/// This is a convenience wrapper around +/// `FnPtrDiscriminatorSource::discriminator_input` and +/// `compute_fn_ptr_type_discriminator`. +/// +/// Returns `None` if the supplied source does not represent a function pointer +/// type (for example, a non-function `Ty`). +pub fn ptrauth_compute_fn_ptr_type_discriminator_for<'tcx, S>( + tcx: TyCtxt<'tcx>, + source: S, +) -> Option +where + S: FnPtrDiscriminatorSource<'tcx>, +{ + let input = source.discriminator_input(tcx)?; + Some(compute_fn_ptr_type_discriminator(tcx, &input)) +} + +/// Clones a pointer authentication schema and updates its constant +/// discriminator. +/// +/// If `schema` is `Some`, the function computes a function pointer type +/// discriminator from `source` and stores it in the cloned schema's +/// `constant_discriminator` field. +/// +/// If no discriminator can be computed (for example, because `source` does not +/// represent a function pointer type), the schema is returned unchanged. +/// +/// This is intended as a convenience helper for code generation sites that need +/// to attach function pointer type discrimination to a generic schema before +/// calling `get_fn_addr`. +pub fn ptrauth_clone_discriminated_schema_for<'tcx, S>( + tcx: TyCtxt<'tcx>, + mut schema: Option, + source: S, +) -> Option +where + S: FnPtrDiscriminatorSource<'tcx>, +{ + if let Some(ref mut s) = schema { + if let Some(disc) = ptrauth_compute_fn_ptr_type_discriminator_for(tcx, source) { + s.constant_discriminator = disc; + } + } + + schema +} + +/// Canonical representation of a function signature used for pointer +/// authentication discriminator generation. +#[derive(Debug)] +pub struct FnPtrTypeDiscriminatorInput<'tcx> { + inputs: &'tcx [Ty<'tcx>], + output: Ty<'tcx>, + abi: ExternAbi, + c_variadic: bool, +} + +impl<'tcx> FnPtrTypeDiscriminatorInput<'tcx> { + fn from_sig(sig: ty::FnSig<'tcx>) -> Self { + FnPtrTypeDiscriminatorInput { + inputs: sig.inputs(), + output: sig.output(), + abi: sig.abi(), + c_variadic: sig.c_variadic(), + } + } + + fn from_sig_tys(sig: ty::FnSigTys>, header: &ty::FnHeader>) -> Self { + FnPtrTypeDiscriminatorInput { + inputs: sig.inputs(), + output: sig.output(), + abi: header.abi(), + c_variadic: header.c_variadic(), + } + } +} + +/// Unwraps optional function pointers and normalizes the type. +/// +/// Only `Option` is supported for nullability modeling, matching C ABI +/// null pointer conventions. +fn extract_fn_ptr_type<'tcx>(tcx: TyCtxt<'tcx>, mut ty: Ty<'tcx>) -> Option> { + ty = tcx.normalize_erasing_regions(ty::TypingEnv::fully_monomorphized(), Unnormalized::new(ty)); + + loop { + match ty.kind() { + ty::Adt(def, args) if tcx.lang_items().option_type() == Some(def.did()) => { + ty = args.type_at(0); + continue; + } + + ty::FnPtr(..) | ty::FnDef(..) => { + return Some(ty); + } + + _ => return None, + } + } +} + +/// Computes the Clang-compatible function pointer type discriminator. +/// +/// This is the low-level discriminator computation routine operating on an +/// already constructed `FnPtrTypeDiscriminatorInput`. +fn compute_fn_ptr_type_discriminator<'tcx>( + tcx: TyCtxt<'tcx>, + input: &FnPtrTypeDiscriminatorInput<'tcx>, +) -> u16 { + if !matches!(input.abi, ExternAbi::C { .. } | ExternAbi::System { .. }) { + return 0; + } + + let mut enc = PtrauthEncoder::new(); + enc.push(b'F'); + + encode_ty(&mut enc, tcx, input.output); + + for &arg in input.inputs { + encode_ty(&mut enc, tcx, arg); + } + + if input.c_variadic { + enc.push(b'z'); + } + + enc.push(b'E'); + + let hash = enc.finish(); + + hash.into() +} + +// Clang disc type. +#[derive(Debug)] +enum ClangDiscTy<'tcx> { + Int, + Float(&'tcx ty::FloatTy), + Bool, + Char, + + // Pointer-like types in the C ABI sense. + // This includes: + // - raw pointers (`*const T`, `*mut T`) + // - Rust references (`&T`, `&mut T`) + // - function pointers + // All collapse to a single Clang-compatible 'P' node. + Pointer, + + Array { elem: Ty<'tcx> }, + + // FIXME(jchlands) Decide if to support Complex types in future. Clang has + // dedicated node for this `Type::Complex`, Rust does not. So we could match + // against a Tuple(FP_TYPE, FP_TYPE). + // Complex(Ty<'tcx>), + Vector { bytes: u64 }, + + EnumLikeInt, + AdtName(String), + Opaque, + Void, +} + +// Canonicalize Option-wrapped pointer types used to model C nullable pointers. +// +// Rust and Clang should compute identical discriminators for equivalent C APIs. +// Clang does not distinguish nullable from non-nullable pointer types when +// computing function pointer authentication discriminators, so +// `Option` and `Option<*mut T>` are encoded identically to their +// underlying pointer types. +// +// Although `Option<*mut T>` is not considered FFI-safe by Rust and triggers the +// `improper_ctypes`/`improper_ctypes_definitions` lints, this is a warning +// rather than a hard error. Canonicalizing it here preserves Clang-compatible +// discriminator computation. +// +// Please see the following tests for sample use cases: +// pauth-fn-ptr-type-discrimination-option-callback.rs, +// pauth-fn-ptr-type-discrimination-option-return.rs and pauth-fn-ptr-type-discrimination-option.rs +fn canonicalize_c_type<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Ty<'tcx> { + if let ty::Adt(def, args) = ty.kind() + && tcx.is_diagnostic_item(sym::Option, def.did()) + { + let inner = args.type_at(0); + + match inner.kind() { + ty::FnPtr(..) | ty::RawPtr(..) => return inner, + _ => {} + } + } + + ty +} + +/// Lowers a Rust type into a Clang-compatible discriminator type. +/// +/// This is not a full semantic translation of Rust types. It is a lossy mapping +/// that intentionally matches Clang's function pointer authentication encoding +/// rules where Rust has a direct language-level equivalent. +/// +/// In particular C `_Complex`, without a canonical Rust equivalent, is not +/// recognized. This avoids introducing heuristics for user-defined +/// representations that may vary across codebases. +/// +/// Important invariants: +/// - All pointer-like types (Rust refs, raw pointers, fn pointers) collapse to +/// `Pointer`. +/// - Struct/union types are encoded using name only, not layout. +/// - Enums are treated as integers. +/// - SIMD types are encoded only by total byte size (no lane semantics). +/// - No attempt is made to recognize user-defined representations of C +/// `_Complex` types. +/// This must remain in sync with Clang's `encodeTypeForFunctionPointerAuth`. +fn to_clang_disc_ty<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> ClangDiscTy<'tcx> { + let ty = canonicalize_c_type(tcx, ty); + match ty.kind() { + // C void / Rust () + _ if ty.is_unit() => ClangDiscTy::Void, + + // scalars + ty::Bool => ClangDiscTy::Bool, + ty::Char => ClangDiscTy::Char, + + ty::Int(_) | ty::Uint(_) => ClangDiscTy::Int, + ty::Float(f) => ClangDiscTy::Float(f), + + // everything pointer-like collapses + ty::RawPtr(..) | ty::Ref(..) | ty::FnPtr(..) | ty::Dynamic(..) | ty::Slice(_) | ty::Str => { + ClangDiscTy::Pointer + } + + // arrays ignore size + ty::Array(elem, _) => ClangDiscTy::Array { elem: *elem }, + + // enums to integer collapse + ty::Adt(def, _) if def.is_enum() => ClangDiscTy::EnumLikeInt, + // simd vectors + ty::Adt(def, args) if def.repr().simd() => { + // Clang encodes SIMD vectors by their total size + let input = ty::PseudoCanonicalInput { + typing_env: ty::TypingEnv::fully_monomorphized(), + value: ty, + }; + + let Ok(layout) = tcx.layout_of(input) else { + tcx.dcx().delayed_bug("could not compute SIMD layout"); + return ClangDiscTy::Opaque; + }; + + let bytes = layout.size.bytes(); + + ClangDiscTy::Vector { bytes } + } + // structs/unions to name-based identity + ty::Adt(def, _) => { + let name = tcx.item_name(def.did()).to_string(); + ClangDiscTy::AdtName(name) + } + + ty::Foreign(_) => ClangDiscTy::Opaque, + + _ => ClangDiscTy::Opaque, + } +} + +// Encoder +struct PtrauthEncoder { + buf: Vec, +} + +impl PtrauthEncoder { + fn new() -> Self { + Self { buf: Vec::new() } + } + + fn push(&mut self, b: u8) { + self.buf.push(b); + } + + fn push_str(&mut self, s: &str) { + self.buf.extend_from_slice(s.as_bytes()); + } + + fn finish(&self) -> u16 { + llvm_pointer_auth_stable_siphash(&self.buf) + } +} + +/// Encodes a ClangDiscTy into the discriminator byte stream. +/// +/// This format is intended to be bit-for-bit compatible with Clang's +/// `encodeTypeForFunctionPointerAuth`. +fn encode_ty<'tcx>(enc: &mut PtrauthEncoder, tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) { + let cty = to_clang_disc_ty(tcx, ty); + + match cty { + // scalars + ClangDiscTy::Bool | ClangDiscTy::Char | ClangDiscTy::Int => enc.push(b'i'), + + ClangDiscTy::Float(f) => match f.bit_width() { + 16 => enc.push_str("Dh"), + 32 => enc.push(b'f'), + 64 => enc.push(b'd'), + 128 => enc.push(b'g'), + _ => enc.push(b'?'), + }, + + ClangDiscTy::Void => enc.push(b'v'), + + // pointer boundary (NO RECURSION) + ClangDiscTy::Pointer => enc.push(b'P'), + + // arrays ignore size + ClangDiscTy::Array { elem } => { + enc.push(b'A'); + encode_ty(enc, tcx, elem); + } + + // enums collapse + ClangDiscTy::EnumLikeInt => enc.push(b'i'), + + // ADT identity + ClangDiscTy::AdtName(name) => { + enc.push_str(&name.len().to_string()); + enc.push_str(&name); + } + + ClangDiscTy::Opaque => enc.push(b'?'), + + ClangDiscTy::Vector { bytes } => { + enc.push_str("Dv"); + enc.push_str(&bytes.to_string()); + } + } +} diff --git a/compiler/rustc_middle/src/ptrauth/llvm_siphash/llvm_siphash_vectors.rs b/compiler/rustc_middle/src/ptrauth/llvm_siphash/llvm_siphash_vectors.rs new file mode 100644 index 0000000000000..3dc799f07b27d --- /dev/null +++ b/compiler/rustc_middle/src/ptrauth/llvm_siphash/llvm_siphash_vectors.rs @@ -0,0 +1,68 @@ +pub(super) const TEST_KEY: [u8; 16] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; + +pub(super) const EXPECTED64: [[u8; 8]; 64] = [ + [0x31, 0x0e, 0x0e, 0xdd, 0x47, 0xdb, 0x6f, 0x72], + [0xfd, 0x67, 0xdc, 0x93, 0xc5, 0x39, 0xf8, 0x74], + [0x5a, 0x4f, 0xa9, 0xd9, 0x09, 0x80, 0x6c, 0x0d], + [0x2d, 0x7e, 0xfb, 0xd7, 0x96, 0x66, 0x67, 0x85], + [0xb7, 0x87, 0x71, 0x27, 0xe0, 0x94, 0x27, 0xcf], + [0x8d, 0xa6, 0x99, 0xcd, 0x64, 0x55, 0x76, 0x18], + [0xce, 0xe3, 0xfe, 0x58, 0x6e, 0x46, 0xc9, 0xcb], + [0x37, 0xd1, 0x01, 0x8b, 0xf5, 0x00, 0x02, 0xab], + [0x62, 0x24, 0x93, 0x9a, 0x79, 0xf5, 0xf5, 0x93], + [0xb0, 0xe4, 0xa9, 0x0b, 0xdf, 0x82, 0x00, 0x9e], + [0xf3, 0xb9, 0xdd, 0x94, 0xc5, 0xbb, 0x5d, 0x7a], + [0xa7, 0xad, 0x6b, 0x22, 0x46, 0x2f, 0xb3, 0xf4], + [0xfb, 0xe5, 0x0e, 0x86, 0xbc, 0x8f, 0x1e, 0x75], + [0x90, 0x3d, 0x84, 0xc0, 0x27, 0x56, 0xea, 0x14], + [0xee, 0xf2, 0x7a, 0x8e, 0x90, 0xca, 0x23, 0xf7], + [0xe5, 0x45, 0xbe, 0x49, 0x61, 0xca, 0x29, 0xa1], + [0xdb, 0x9b, 0xc2, 0x57, 0x7f, 0xcc, 0x2a, 0x3f], + [0x94, 0x47, 0xbe, 0x2c, 0xf5, 0xe9, 0x9a, 0x69], + [0x9c, 0xd3, 0x8d, 0x96, 0xf0, 0xb3, 0xc1, 0x4b], + [0xbd, 0x61, 0x79, 0xa7, 0x1d, 0xc9, 0x6d, 0xbb], + [0x98, 0xee, 0xa2, 0x1a, 0xf2, 0x5c, 0xd6, 0xbe], + [0xc7, 0x67, 0x3b, 0x2e, 0xb0, 0xcb, 0xf2, 0xd0], + [0x88, 0x3e, 0xa3, 0xe3, 0x95, 0x67, 0x53, 0x93], + [0xc8, 0xce, 0x5c, 0xcd, 0x8c, 0x03, 0x0c, 0xa8], + [0x94, 0xaf, 0x49, 0xf6, 0xc6, 0x50, 0xad, 0xb8], + [0xea, 0xb8, 0x85, 0x8a, 0xde, 0x92, 0xe1, 0xbc], + [0xf3, 0x15, 0xbb, 0x5b, 0xb8, 0x35, 0xd8, 0x17], + [0xad, 0xcf, 0x6b, 0x07, 0x63, 0x61, 0x2e, 0x2f], + [0xa5, 0xc9, 0x1d, 0xa7, 0xac, 0xaa, 0x4d, 0xde], + [0x71, 0x65, 0x95, 0x87, 0x66, 0x50, 0xa2, 0xa6], + [0x28, 0xef, 0x49, 0x5c, 0x53, 0xa3, 0x87, 0xad], + [0x42, 0xc3, 0x41, 0xd8, 0xfa, 0x92, 0xd8, 0x32], + [0xce, 0x7c, 0xf2, 0x72, 0x2f, 0x51, 0x27, 0x71], + [0xe3, 0x78, 0x59, 0xf9, 0x46, 0x23, 0xf3, 0xa7], + [0x38, 0x12, 0x05, 0xbb, 0x1a, 0xb0, 0xe0, 0x12], + [0xae, 0x97, 0xa1, 0x0f, 0xd4, 0x34, 0xe0, 0x15], + [0xb4, 0xa3, 0x15, 0x08, 0xbe, 0xff, 0x4d, 0x31], + [0x81, 0x39, 0x62, 0x29, 0xf0, 0x90, 0x79, 0x02], + [0x4d, 0x0c, 0xf4, 0x9e, 0xe5, 0xd4, 0xdc, 0xca], + [0x5c, 0x73, 0x33, 0x6a, 0x76, 0xd8, 0xbf, 0x9a], + [0xd0, 0xa7, 0x04, 0x53, 0x6b, 0xa9, 0x3e, 0x0e], + [0x92, 0x59, 0x58, 0xfc, 0xd6, 0x42, 0x0c, 0xad], + [0xa9, 0x15, 0xc2, 0x9b, 0xc8, 0x06, 0x73, 0x18], + [0x95, 0x2b, 0x79, 0xf3, 0xbc, 0x0a, 0xa6, 0xd4], + [0xf2, 0x1d, 0xf2, 0xe4, 0x1d, 0x45, 0x35, 0xf9], + [0x87, 0x57, 0x75, 0x19, 0x04, 0x8f, 0x53, 0xa9], + [0x10, 0xa5, 0x6c, 0xf5, 0xdf, 0xcd, 0x9a, 0xdb], + [0xeb, 0x75, 0x09, 0x5c, 0xcd, 0x98, 0x6c, 0xd0], + [0x51, 0xa9, 0xcb, 0x9e, 0xcb, 0xa3, 0x12, 0xe6], + [0x96, 0xaf, 0xad, 0xfc, 0x2c, 0xe6, 0x66, 0xc7], + [0x72, 0xfe, 0x52, 0x97, 0x5a, 0x43, 0x64, 0xee], + [0x5a, 0x16, 0x45, 0xb2, 0x76, 0xd5, 0x92, 0xa1], + [0xb2, 0x74, 0xcb, 0x8e, 0xbf, 0x87, 0x87, 0x0a], + [0x6f, 0x9b, 0xb4, 0x20, 0x3d, 0xe7, 0xb3, 0x81], + [0xea, 0xec, 0xb2, 0xa3, 0x0b, 0x22, 0xa8, 0x7f], + [0x99, 0x24, 0xa4, 0x3c, 0xc1, 0x31, 0x57, 0x24], + [0xbd, 0x83, 0x8d, 0x3a, 0xaf, 0xbf, 0x8d, 0xb7], + [0x0b, 0x1a, 0x2a, 0x32, 0x65, 0xd5, 0x1a, 0xea], + [0x13, 0x50, 0x79, 0xa3, 0x23, 0x1c, 0xe6, 0x60], + [0x93, 0x2b, 0x28, 0x46, 0xe4, 0xd7, 0x06, 0x66], + [0xe1, 0x91, 0x5f, 0x5c, 0xb1, 0xec, 0xa4, 0x6c], + [0xf3, 0x25, 0x96, 0x5c, 0xa1, 0x6d, 0x62, 0x9f], + [0x57, 0x5f, 0xf2, 0x8e, 0x60, 0x38, 0x1b, 0xe5], + [0x72, 0x45, 0x06, 0xeb, 0x4c, 0x32, 0x8a, 0x95], +]; diff --git a/compiler/rustc_middle/src/ptrauth/llvm_siphash/mod.rs b/compiler/rustc_middle/src/ptrauth/llvm_siphash/mod.rs new file mode 100644 index 0000000000000..a835325e3c82c --- /dev/null +++ b/compiler/rustc_middle/src/ptrauth/llvm_siphash/mod.rs @@ -0,0 +1,151 @@ +// LLVM SipHash-2-4 (64 bit version) +pub fn llvm_pointer_auth_stable_siphash(data: &[u8]) -> u16 { + let raw = llvm_siphash_2_4_64(data); + + ((raw % 0xFFFF) + 1) as u16 +} + +const SIPHASH_KEY: [u8; 16] = [ + 0xb5, 0xd4, 0xc9, 0xeb, 0x79, 0x10, 0x4a, 0x79, 0x6f, 0xec, 0x8b, 0x1b, 0x42, 0x87, 0x81, 0xd4, +]; + +#[inline(always)] +fn rotl(x: u64, b: u32) -> u64 { + (x << b) | (x >> (64 - b)) +} + +#[inline(always)] +fn sipround(v0: &mut u64, v1: &mut u64, v2: &mut u64, v3: &mut u64) { + *v0 = v0.wrapping_add(*v1); + *v1 = rotl(*v1, 13); + *v1 ^= *v0; + *v0 = rotl(*v0, 32); + + *v2 = v2.wrapping_add(*v3); + *v3 = rotl(*v3, 16); + *v3 ^= *v2; + + *v0 = v0.wrapping_add(*v3); + *v3 = rotl(*v3, 21); + *v3 ^= *v0; + + *v2 = v2.wrapping_add(*v1); + *v1 = rotl(*v1, 17); + *v1 ^= *v2; + *v2 = rotl(*v2, 32); +} + +fn u64_from_le(bytes: &[u8]) -> u64 { + u64::from_le_bytes(bytes.try_into().unwrap()) +} + +fn load_u64_partial(bytes: &[u8]) -> u64 { + let mut b = 0u64; + + match bytes.len() { + 7 => { + b |= (bytes[6] as u64) << 48; + b |= (bytes[5] as u64) << 40; + b |= (bytes[4] as u64) << 32; + b |= (bytes[3] as u64) << 24; + b |= (bytes[2] as u64) << 16; + b |= (bytes[1] as u64) << 8; + b |= bytes[0] as u64; + } + 6 => { + b |= (bytes[5] as u64) << 40; + b |= (bytes[4] as u64) << 32; + b |= (bytes[3] as u64) << 24; + b |= (bytes[2] as u64) << 16; + b |= (bytes[1] as u64) << 8; + b |= bytes[0] as u64; + } + 5 => { + b |= (bytes[4] as u64) << 32; + b |= (bytes[3] as u64) << 24; + b |= (bytes[2] as u64) << 16; + b |= (bytes[1] as u64) << 8; + b |= bytes[0] as u64; + } + 4 => { + b |= (bytes[3] as u64) << 24; + b |= (bytes[2] as u64) << 16; + b |= (bytes[1] as u64) << 8; + b |= bytes[0] as u64; + } + 3 => { + b |= (bytes[2] as u64) << 16; + b |= (bytes[1] as u64) << 8; + b |= bytes[0] as u64; + } + 2 => { + b |= (bytes[1] as u64) << 8; + b |= bytes[0] as u64; + } + 1 => { + b |= bytes[0] as u64; + } + _ => {} + } + + b +} + +fn siphash_2_4_64_with_key(data: &[u8], key: &[u8; 16]) -> u64 { + let k0 = u64_from_le(&key[0..8]); + let k1 = u64_from_le(&key[8..16]); + + let mut v0: u64 = 0x736f6d6570736575 ^ k0; + let mut v1: u64 = 0x646f72616e646f6d ^ k1; + let mut v2: u64 = 0x6c7967656e657261 ^ k0; + let mut v3: u64 = 0x7465646279746573 ^ k1; + + let mut b: u64 = (data.len() as u64) << 56; + let mut i = 0; + + // compression + while i + 8 <= data.len() { + let m = u64_from_le(&data[i..i + 8]); + i += 8; + + v3 ^= m; + + for _ in 0..2 { + sipround(&mut v0, &mut v1, &mut v2, &mut v3); + } + + v0 ^= m; + } + + // tail + let tail = &data[i..]; + + b |= load_u64_partial(tail); + + v3 ^= b; + + for _ in 0..2 { + sipround(&mut v0, &mut v1, &mut v2, &mut v3); + } + + v0 ^= b; + + // finalization + v2 ^= 0xff; + + for _ in 0..4 { + sipround(&mut v0, &mut v1, &mut v2, &mut v3); + } + + v0 ^ v1 ^ v2 ^ v3 +} +// LLVM siphash<2,4> 64-bit output +fn llvm_siphash_2_4_64(data: &[u8]) -> u64 { + siphash_2_4_64_with_key(data, &SIPHASH_KEY) +} + +#[cfg(test)] +mod llvm_siphash_vectors; + +#[cfg(test)] +mod tests; diff --git a/compiler/rustc_middle/src/ptrauth/llvm_siphash/tests.rs b/compiler/rustc_middle/src/ptrauth/llvm_siphash/tests.rs new file mode 100644 index 0000000000000..d26b0850798bb --- /dev/null +++ b/compiler/rustc_middle/src/ptrauth/llvm_siphash/tests.rs @@ -0,0 +1,63 @@ +// Derived from code in LLVM, which is: +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +// Derived from: +// * https://github.com/llvm/llvm-project/blob/f2453af624353273325fe888d794a925ea9fe852/llvm/unittests/Support/SipHashTest.cpp + +use llvm_siphash_vectors::{EXPECTED64, TEST_KEY}; + +use super::*; + +// These tests mirror the SipHash tests from LLVM's Support/SipHashTest.cpp. +// The implementation here is a faithful Rust translation of the LLVM 64-bit +// SipHash-2-4 implementation used for pointer authentication discriminators. +// +// TEST_KEY and EXPECTED64 are copied from the upstream SipHash reference +// vectors. Keeping these values identical ensures that the Rust implementation +// produces the same SipHash output as LLVM. +// +// Run with: +// x.py test compiler/rustc_middle --test-args siphash + +#[test] +fn siphash24_reference_vectors_64() { + // Validate the SipHash-2-4 implementation against the upstream SipHash + // reference vectors. + // + // Each input is the byte sequence [0, 1, ..., len-1] and is hashed using + // the reference key TEST_KEY ([0, 1, ..., 15]). The expected values are + // compared byte-for-byte with the LLVM reference implementation output + // (EXPECTED64). + // + // This test verifies the correctness of the SipHash primitive itself, + // independently of the pointer authentication discriminator logic. + let mut input = [0u8; 64]; + + for len in 0..EXPECTED64.len() { + input[len] = len as u8; + + let hash = siphash_2_4_64_with_key(&input[..len], &TEST_KEY); + + assert_eq!(hash.to_le_bytes(), EXPECTED64[len]); + } +} + +#[test] +fn pointer_auth_stable_siphash() { + // Validate the rustc pointer-authentication SipHash wrapper against the + // values used by the LLVM implementation. + // + // The returned value is a 16-bit discriminator derived from the stable + // SipHash-2-4 output. + assert_eq!(llvm_pointer_auth_stable_siphash(b""), 0xE793); + assert_eq!(llvm_pointer_auth_stable_siphash(b"strlen"), 0xF468); + assert_eq!(llvm_pointer_auth_stable_siphash(b"_ZN1 ind; f"), 0x2D15); + assert_eq!(llvm_pointer_auth_stable_siphash(b"isa"), 0x6AE1); + assert_eq!(llvm_pointer_auth_stable_siphash(b"objc_class:superclass"), 0xB5AB,); + assert_eq!(llvm_pointer_auth_stable_siphash(b"block_descriptor"), 0xC0BB,); + assert_eq!(llvm_pointer_auth_stable_siphash(b"method_list_t"), 0xC310,); + assert_eq!(llvm_pointer_auth_stable_siphash(b"_Zptrkvttf"), 1); + assert_eq!(llvm_pointer_auth_stable_siphash(b"_Zaflhllod"), 0xFFFF); +} diff --git a/compiler/rustc_middle/src/ptrauth/mod.rs b/compiler/rustc_middle/src/ptrauth/mod.rs new file mode 100644 index 0000000000000..0eeef5e07f61c --- /dev/null +++ b/compiler/rustc_middle/src/ptrauth/mod.rs @@ -0,0 +1,7 @@ +pub mod discriminator; +pub mod llvm_siphash; + +pub use discriminator::{ + FnPtrDiscriminatorSource, FnPtrTypeDiscriminatorInput, ptrauth_clone_discriminated_schema_for, + ptrauth_compute_fn_ptr_type_discriminator_for, +}; diff --git a/compiler/rustc_middle/src/query/on_disk_cache.rs b/compiler/rustc_middle/src/query/on_disk_cache.rs index 1dd510da06886..4f89ce529a586 100644 --- a/compiler/rustc_middle/src/query/on_disk_cache.rs +++ b/compiler/rustc_middle/src/query/on_disk_cache.rs @@ -497,13 +497,13 @@ impl<'a, 'tcx> TyDecoder<'tcx> for CacheDecoder<'a, 'tcx> { let cache_key = ty::CReaderCacheKey { cnum: None, pos: shorthand }; - if let Some(&ty) = tcx.ty_rcache.borrow().get(&cache_key) { + if let Some(&ty) = tcx.caches.ty_rcache.borrow().get(&cache_key) { return ty; } let ty = or_insert_with(self); // This may overwrite the entry, but it should overwrite with the same value. - tcx.ty_rcache.borrow_mut().insert_same(cache_key, ty); + tcx.caches.ty_rcache.borrow_mut().insert_same(cache_key, ty); ty } diff --git a/compiler/rustc_middle/src/query/plumbing.rs b/compiler/rustc_middle/src/query/plumbing.rs index 2e121f0246b29..e72770ad1d217 100644 --- a/compiler/rustc_middle/src/query/plumbing.rs +++ b/compiler/rustc_middle/src/query/plumbing.rs @@ -2,15 +2,17 @@ use std::fmt; use std::ops::Deref; use rustc_data_structures::fingerprint::Fingerprint; -use rustc_data_structures::fx::FxIndexMap; +use rustc_data_structures::fx::{FxHashMap, FxIndexMap}; use rustc_data_structures::hash_table::HashTable; use rustc_data_structures::sharded::Sharded; use rustc_data_structures::sync::{AtomicU64, Lock, WorkerLocal}; use rustc_errors::Diag; use rustc_hir::def_id::LocalDefId; -use rustc_span::Span; +use rustc_span::{Span, Symbol}; -use crate::dep_graph::{DepKind, DepNodeIndex, QuerySideEffect, SerializedDepNodeIndex}; +use crate::dep_graph::{ + DepKind, DepKindVTable, DepNodeIndex, QuerySideEffect, SerializedDepNodeIndex, +}; use crate::ich::StableHashState; use crate::queries::{ExternProviders, Providers, QueryArenas, QueryVTables, TaggedQueryKey}; use crate::query::on_disk_cache::OnDiskCache; @@ -144,6 +146,7 @@ impl<'tcx, C: QueryCache> fmt::Debug for QueryVTable<'tcx, C> { pub struct QuerySystem<'tcx> { pub arenas: WorkerLocal>, + pub dep_kind_vtables: &'tcx [DepKindVTable<'tcx>], pub query_vtables: QueryVTables<'tcx>, /// Side-effect associated with each [`DepKind::SideEffect`] node in the @@ -153,6 +156,11 @@ pub struct QuerySystem<'tcx> { /// Always empty if incremental compilation is off. pub side_effects: Lock>, + /// Enabled features that are used in the current compilation. + /// + /// The value is the `DepNodeIndex` of the node that encodes the used feature. + pub used_features: Lock>, + /// This provides access to the incremental compilation on-disk cache for query results. /// Do not access this directly. It is only meant to be used by /// `DepGraph::try_mark_green()` and the query infrastructure. diff --git a/compiler/rustc_middle/src/traits/mod.rs b/compiler/rustc_middle/src/traits/mod.rs index b8cd0791a783e..47b248f26c300 100644 --- a/compiler/rustc_middle/src/traits/mod.rs +++ b/compiler/rustc_middle/src/traits/mod.rs @@ -105,7 +105,7 @@ impl<'tcx> ObligationCause<'tcx> { pub fn derived_cause( mut self, - parent_trait_pred: ty::PolyTraitPredicate<'tcx>, + parent_trait_pred: ty::PolyTraitClause<'tcx>, variant: impl FnOnce(DerivedCause<'tcx>) -> ObligationCauseCode<'tcx>, ) -> ObligationCause<'tcx> { /*! @@ -491,7 +491,7 @@ impl<'tcx> ObligationCauseCode<'tcx> { /// Returns the base obligation and the base trait predicate, if any, ignoring /// derived obligations. - pub fn peel_derives_with_predicate(&self) -> (&Self, Option>) { + pub fn peel_derives_with_predicate(&self) -> (&Self, Option>) { let mut base_cause = self; let mut base_trait_pred = None; while let Some((parent_code, parent_pred)) = base_cause.parent_with_predicate() { @@ -504,7 +504,7 @@ impl<'tcx> ObligationCauseCode<'tcx> { (base_cause, base_trait_pred) } - pub fn parent_with_predicate(&self) -> Option<(&Self, Option>)> { + pub fn parent_with_predicate(&self) -> Option<(&Self, Option>)> { match self { ObligationCauseCode::FunctionArg { parent_code, .. } => Some((parent_code, None)), ObligationCauseCode::BuiltinDerived(derived) @@ -577,7 +577,7 @@ pub struct DerivedCause<'tcx> { /// current obligation. Note that only trait obligations lead to /// derived obligations, so we just store the trait predicate here /// directly. - pub parent_trait_pred: ty::PolyTraitPredicate<'tcx>, + pub parent_trait_pred: ty::PolyTraitClause<'tcx>, /// The parent trait had this cause. pub parent_code: ObligationCauseCodeHandle<'tcx>, diff --git a/compiler/rustc_middle/src/traits/select.rs b/compiler/rustc_middle/src/traits/select.rs index a2eecebcc3501..e56dbb4ec3020 100644 --- a/compiler/rustc_middle/src/traits/select.rs +++ b/compiler/rustc_middle/src/traits/select.rs @@ -12,13 +12,11 @@ use super::{SelectionError, SelectionResult}; use crate::traits::cache::WithDepNodeCache; use crate::ty; -pub type SelectionCache<'tcx, ENV> = WithDepNodeCache< - (ENV, ty::TraitPredicate<'tcx>), - SelectionResult<'tcx, SelectionCandidate<'tcx>>, ->; +pub type SelectionCache<'tcx, ENV> = + WithDepNodeCache<(ENV, ty::TraitClause<'tcx>), SelectionResult<'tcx, SelectionCandidate<'tcx>>>; pub type EvaluationCache<'tcx, ENV> = - WithDepNodeCache<(ENV, ty::PolyTraitPredicate<'tcx>), EvaluationResult>; + WithDepNodeCache<(ENV, ty::PolyTraitClause<'tcx>), EvaluationResult>; /// The selection process begins by considering all impls, where /// clauses, and so forth that might resolve an obligation. Sometimes @@ -114,7 +112,7 @@ pub enum SelectionCandidate<'tcx> { /// Implementation of transmutability trait. TransmutabilityCandidate, - ParamCandidate(ty::PolyTraitPredicate<'tcx>), + ParamCandidate(ty::PolyTraitClause<'tcx>), ImplCandidate(DefId), AutoImplCandidate, diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index 75aa5aaaa4352..2c1d6cc1ff4dc 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -49,7 +49,7 @@ use tracing::{debug, instrument}; use crate::arena::Arena; use crate::dep_graph::dep_node::make_metadata; -use crate::dep_graph::{DepGraph, DepKindVTable, DepNodeIndex}; +use crate::dep_graph::{DepGraph, DepNodeIndex}; use crate::hir::{ProjectedMaybeOwner, ProjectedOwnerInfo}; use crate::ich::StableHashState; use crate::infer::canonical::{CanonicalParamEnvCache, CanonicalVarKind}; @@ -66,11 +66,11 @@ use crate::traits::solve::{ExternalConstraints, ExternalConstraintsData, Predefi use crate::ty::predicate::ExistentialPredicateStableCmpExt as _; use crate::ty::region::RegionExt; use crate::ty::{ - self, AdtDef, AdtDefData, AdtKind, Binder, Clause, Clauses, Const, FnSigKind, GenericArg, - GenericArgs, GenericArgsRef, GenericParamDefKind, List, ListWithCachedTypeInfo, ParamConst, - Pattern, PatternKind, PolyExistentialPredicate, PolyFnSig, Predicate, PredicateKind, - PredicatePolarity, Region, RegionKind, ReprOptions, TraitObjectVisitor, Ty, TyKind, TyVid, - ValTree, ValTreeKind, Visibility, + self, AdtDef, AdtDefData, AdtKind, Binder, Clause, ClausePolarity, Clauses, Const, FnSigKind, + GenericArg, GenericArgs, GenericArgsRef, GenericParamDefKind, List, ListWithCachedTypeInfo, + ParamConst, Pattern, PatternKind, PolyExistentialPredicate, PolyFnSig, Predicate, + PredicateKind, Region, RegionKind, ReprOptions, TraitObjectVisitor, Ty, TyKind, TyVid, ValTree, + ValTreeKind, Visibility, }; impl<'tcx> rustc_type_ir::inherent::DefId> for DefId { @@ -654,6 +654,38 @@ impl<'tcx> TyCtxtFeed<'tcx, LocalDefId> { } } +/// An assortment of global caches used by various parts of the compiler. +/// +/// The individual fields are mostly unrelated to each other, but have been grouped together to +/// reduce the number of top-level fields in [`GlobalCtxt`]. +#[derive(Default)] +pub struct GlobalCaches<'tcx> { + // Internal caches for metadata decoding. No need to track deps on this. + pub ty_rcache: Lock>>, + + /// Caches the results of trait selection. This cache is used + /// for things that do not have to do with the parameters in scope. + pub selection_cache: traits::SelectionCache<'tcx, ty::TypingEnv<'tcx>>, + + /// Caches the results of trait evaluation. This cache is used + /// for things that do not have to do with the parameters in scope. + /// Merge this with `selection_cache`? + pub evaluation_cache: traits::EvaluationCache<'tcx, ty::TypingEnv<'tcx>>, + + /// Caches the results of goal evaluation in the new solver. + new_solver_evaluation_cache: Lock>>, + new_solver_canonical_param_env_cache: Lock>>, + + pub canonical_param_env_cache: CanonicalParamEnvCache<'tcx>, + + /// Caches the index of the highest bound var in clauses in a canonical binder. + pub highest_var_in_clauses_cache: Lock, usize>>, + + /// Caches the instantiation of a canonical binder given a set of args. + pub clauses_cache: + Lock, &'tcx [ty::GenericArg<'tcx>]), ty::Clauses<'tcx>>>, +} + /// The central data structure of the compiler. It stores references /// to the various **arenas** and also houses the results of the /// various **compiler queries** that have been performed. See the @@ -715,6 +747,8 @@ pub struct GlobalCtxt<'tcx> { pub incr_comp_session: Option<&'tcx IncrCompSession>, pub dep_graph: DepGraph, + /// This duplicates `Session::prof` because this field is hot enough that accessing it via + /// `self.sess.prof` is a measurable slowdown (see #161332). pub prof: SelfProfilerRef, /// Common types, pre-interned for your convenience. @@ -733,31 +767,8 @@ pub struct GlobalCtxt<'tcx> { untracked: Untracked, pub query_system: QuerySystem<'tcx>, - pub(crate) dep_kind_vtables: &'tcx [DepKindVTable<'tcx>], - - // Internal caches for metadata decoding. No need to track deps on this. - pub ty_rcache: Lock>>, - - /// Caches the results of trait selection. This cache is used - /// for things that do not have to do with the parameters in scope. - pub selection_cache: traits::SelectionCache<'tcx, ty::TypingEnv<'tcx>>, - /// Caches the results of trait evaluation. This cache is used - /// for things that do not have to do with the parameters in scope. - /// Merge this with `selection_cache`? - pub evaluation_cache: traits::EvaluationCache<'tcx, ty::TypingEnv<'tcx>>, - - /// Caches the results of goal evaluation in the new solver. - pub new_solver_evaluation_cache: Lock>>, - pub new_solver_canonical_param_env_cache: Lock>>, - - pub canonical_param_env_cache: CanonicalParamEnvCache<'tcx>, - - /// Caches the index of the highest bound var in clauses in a canonical binder. - pub highest_var_in_clauses_cache: Lock, usize>>, - /// Caches the instantiation of a canonical binder given a set of args. - pub clauses_cache: - Lock, &'tcx [ty::GenericArg<'tcx>]), ty::Clauses<'tcx>>>, + pub caches: GlobalCaches<'tcx>, /// Data layout specification for the current target. pub data_layout: TargetDataLayout, @@ -937,7 +948,6 @@ impl<'tcx> TyCtxt<'tcx> { untracked: Untracked, incr_comp_session: Option<&'tcx IncrCompSession>, dep_graph: DepGraph, - dep_kind_vtables: &'tcx [DepKindVTable<'tcx>], query_system: QuerySystem<'tcx>, hooks: crate::hooks::Providers, current_gcx: CurrentGcx, @@ -967,15 +977,7 @@ impl<'tcx> TyCtxt<'tcx> { consts: common_consts, untracked, query_system, - dep_kind_vtables, - ty_rcache: Default::default(), - selection_cache: Default::default(), - evaluation_cache: Default::default(), - new_solver_evaluation_cache: Default::default(), - new_solver_canonical_param_env_cache: Default::default(), - canonical_param_env_cache: Default::default(), - highest_var_in_clauses_cache: Default::default(), - clauses_cache: Default::default(), + caches: Default::default(), data_layout, alloc_map: interpret::AllocMap::new(), current_gcx, @@ -1612,7 +1614,7 @@ impl<'tcx> TyCtxt<'tcx> { } // Collect first to avoid holding the lock while linting. - let used_features = self.sess.used_features.lock(); + let used_features = self.query_system.used_features.lock(); let unused_features = self .features() .enabled_features_iter_stable_order() @@ -2073,7 +2075,7 @@ impl<'tcx> TyCtxt<'tcx> { return false; }; trait_predicate.trait_ref.def_id == future_trait - && trait_predicate.polarity == PredicatePolarity::Positive + && trait_predicate.polarity == ClausePolarity::Positive }) } diff --git a/compiler/rustc_middle/src/ty/context/impl_interner.rs b/compiler/rustc_middle/src/ty/context/impl_interner.rs index a47d39dba5531..c32aee98e7169 100644 --- a/compiler/rustc_middle/src/ty/context/impl_interner.rs +++ b/compiler/rustc_middle/src/ty/context/impl_interner.rs @@ -144,14 +144,14 @@ impl<'tcx> Interner for TyCtxt<'tcx> { } fn with_global_cache(self, f: impl FnOnce(&mut search_graph::GlobalCache) -> R) -> R { - f(&mut *self.new_solver_evaluation_cache.lock()) + f(&mut *self.caches.new_solver_evaluation_cache.lock()) } fn with_canonical_param_env_cache( self, f: impl FnOnce(&mut ty::CanonicalParamEnvCache) -> R, ) -> R { - f(&mut *self.new_solver_canonical_param_env_cache.lock()) + f(&mut *self.caches.new_solver_canonical_param_env_cache.lock()) } fn assert_evaluation_is_concurrent(&self) { diff --git a/compiler/rustc_middle/src/ty/diagnostics.rs b/compiler/rustc_middle/src/ty/diagnostics.rs index 94a6ae918a703..1f2a9aca60142 100644 --- a/compiler/rustc_middle/src/ty/diagnostics.rs +++ b/compiler/rustc_middle/src/ty/diagnostics.rs @@ -14,8 +14,8 @@ use rustc_type_ir::TyKind::*; use crate::ty::{ self, AliasTy, Const, ConstKind, FallibleTypeFolder, InferConst, InferTy, Instance, Opaque, - PolyTraitPredicate, Projection, Ty, TyCtxt, TypeFoldable, TypeSuperFoldable, - TypeSuperVisitable, TypeVisitable, TypeVisitor, + PolyTraitClause, Projection, Ty, TyCtxt, TypeFoldable, TypeSuperFoldable, TypeSuperVisitable, + TypeVisitable, TypeVisitor, }; impl IntoDiagArg for Ty<'_> { @@ -133,7 +133,7 @@ pub fn suggest_arbitrary_trait_bound<'tcx>( tcx: TyCtxt<'tcx>, generics: &hir::Generics<'_>, err: &mut Diag<'_>, - trait_pred: PolyTraitPredicate<'tcx>, + trait_pred: PolyTraitClause<'tcx>, associated_ty: Option<(&'static str, Ty<'tcx>)>, ) -> bool { if !trait_pred.is_suggestable(tcx, false) { diff --git a/compiler/rustc_middle/src/ty/elaborate_impl.rs b/compiler/rustc_middle/src/ty/elaborate_impl.rs index 8c89a2d884b30..cd76d49cefecb 100644 --- a/compiler/rustc_middle/src/ty/elaborate_impl.rs +++ b/compiler/rustc_middle/src/ty/elaborate_impl.rs @@ -16,7 +16,7 @@ impl<'tcx> Elaboratable> for ty::Clause<'tcx> { &self, clause: ty::Clause<'tcx>, _span: Span, - _parent_trait_pred: ty::PolyTraitPredicate<'tcx>, + _parent_trait_pred: ty::PolyTraitClause<'tcx>, _index: usize, ) -> Self { clause @@ -36,7 +36,7 @@ impl<'tcx> Elaboratable> for ty::Predicate<'tcx> { &self, clause: ty::Clause<'tcx>, _span: Span, - _parent_trait_pred: ty::PolyTraitPredicate<'tcx>, + _parent_trait_pred: ty::PolyTraitClause<'tcx>, _index: usize, ) -> Self { clause.as_predicate() @@ -56,7 +56,7 @@ impl<'tcx> Elaboratable> for (ty::Predicate<'tcx>, Span) { &self, clause: ty::Clause<'tcx>, _span: Span, - _parent_trait_pred: ty::PolyTraitPredicate<'tcx>, + _parent_trait_pred: ty::PolyTraitClause<'tcx>, _index: usize, ) -> Self { (clause.as_predicate(), self.1) @@ -76,7 +76,7 @@ impl<'tcx> Elaboratable> for (ty::Clause<'tcx>, Span) { &self, clause: ty::Clause<'tcx>, _span: Span, - _parent_trait_pred: ty::PolyTraitPredicate<'tcx>, + _parent_trait_pred: ty::PolyTraitClause<'tcx>, _index: usize, ) -> Self { (clause, self.1) diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index cd9e5f6903478..36631861e8108 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -89,9 +89,9 @@ pub use self::predicate::{ ExistentialPredicate, ExistentialPredicateStableCmpExt, ExistentialProjection, ExistentialTraitRef, HostEffectClause, NormalizesTo, OutlivesClause, PolyCoercePredicate, PolyExistentialPredicate, PolyExistentialProjection, PolyExistentialTraitRef, - PolyProjectionPredicate, PolyRegionOutlivesClause, PolySubtypePredicate, PolyTraitPredicate, - PolyTraitRef, PolyTypeOutlivesClause, Predicate, PredicateKind, ProjectionPredicate, - RegionConstraint, RegionEqPredicate, RegionOutlivesClause, SubtypePredicate, TraitPredicate, + PolyProjectionClause, PolyRegionOutlivesClause, PolySubtypePredicate, PolyTraitClause, + PolyTraitRef, PolyTypeOutlivesClause, Predicate, PredicateKind, ProjectionClause, + RegionConstraint, RegionEqPredicate, RegionOutlivesClause, SubtypePredicate, TraitClause, TraitRef, TypeOutlivesClause, }; pub use self::region::{ diff --git a/compiler/rustc_middle/src/ty/predicate.rs b/compiler/rustc_middle/src/ty/predicate.rs index 990a424289e9b..3ccf185405209 100644 --- a/compiler/rustc_middle/src/ty/predicate.rs +++ b/compiler/rustc_middle/src/ty/predicate.rs @@ -10,11 +10,11 @@ use crate::ty::{self, EarlyBinder, Ty, TyCtxt, TypeFlags, Upcast, UpcastFrom, Wi pub type TraitRef<'tcx> = ir::TraitRef>; pub type AliasTerm<'tcx> = ir::AliasTerm>; pub type AliasTermKind<'tcx> = ir::AliasTermKind>; -pub type ProjectionPredicate<'tcx> = ir::ProjectionPredicate>; +pub type ProjectionClause<'tcx> = ir::ProjectionClause>; pub type ExistentialPredicate<'tcx> = ir::ExistentialPredicate>; pub type ExistentialTraitRef<'tcx> = ir::ExistentialTraitRef>; pub type ExistentialProjection<'tcx> = ir::ExistentialProjection>; -pub type TraitPredicate<'tcx> = ir::TraitPredicate>; +pub type TraitClause<'tcx> = ir::TraitClause>; pub type HostEffectClause<'tcx> = ir::HostEffectClause>; pub type ClauseKind<'tcx> = ir::ClauseKind>; pub type PredicateKind<'tcx> = ir::PredicateKind>; @@ -27,12 +27,12 @@ pub type TypeOutlivesClause<'tcx> = OutlivesClause<'tcx, Ty<'tcx>>; pub type ArgOutlivesClause<'tcx> = OutlivesClause<'tcx, ty::GenericArg<'tcx>>; pub type RegionEqPredicate<'tcx> = ir::RegionEqPredicate>; pub type RegionConstraint<'tcx> = ir::RegionConstraint>; -pub type PolyTraitPredicate<'tcx> = ty::Binder<'tcx, TraitPredicate<'tcx>>; +pub type PolyTraitClause<'tcx> = ty::Binder<'tcx, TraitClause<'tcx>>; pub type PolyRegionOutlivesClause<'tcx> = ty::Binder<'tcx, RegionOutlivesClause<'tcx>>; pub type PolyTypeOutlivesClause<'tcx> = ty::Binder<'tcx, TypeOutlivesClause<'tcx>>; pub type PolySubtypePredicate<'tcx> = ty::Binder<'tcx, SubtypePredicate<'tcx>>; pub type PolyCoercePredicate<'tcx> = ty::Binder<'tcx, CoercePredicate<'tcx>>; -pub type PolyProjectionPredicate<'tcx> = ty::Binder<'tcx, ProjectionPredicate<'tcx>>; +pub type PolyProjectionClause<'tcx> = ty::Binder<'tcx, ProjectionClause<'tcx>>; /// A statement that can be proven by a trait solver. This includes things that may /// show up in where clauses, such as trait predicates and projection predicates, @@ -84,13 +84,12 @@ impl<'tcx> Predicate<'tcx> { let kind = self .kind() .map_bound(|kind| match kind { - PredicateKind::Clause(ClauseKind::Trait(TraitPredicate { - trait_ref, - polarity, - })) => Some(PredicateKind::Clause(ClauseKind::Trait(TraitPredicate { - trait_ref, - polarity: polarity.flip(), - }))), + PredicateKind::Clause(ClauseKind::Trait(TraitClause { trait_ref, polarity })) => { + Some(PredicateKind::Clause(ClauseKind::Trait(TraitClause { + trait_ref, + polarity: polarity.flip(), + }))) + } _ => None, }) @@ -177,7 +176,7 @@ impl<'tcx> Clause<'tcx> { }) } - pub fn as_trait_clause(self) -> Option>> { + pub fn as_trait_clause(self) -> Option>> { let clause = self.kind(); if let ty::ClauseKind::Trait(trait_clause) = clause.skip_binder() { Some(clause.rebind(trait_clause)) @@ -186,7 +185,7 @@ impl<'tcx> Clause<'tcx> { } } - pub fn as_projection_clause(self) -> Option>> { + pub fn as_projection_clause(self) -> Option>> { let clause = self.kind(); if let ty::ClauseKind::Projection(projection_clause) = clause.skip_binder() { Some(clause.rebind(projection_clause)) @@ -500,39 +499,39 @@ impl<'tcx> UpcastFrom, TraitRef<'tcx>> for Clause<'tcx> { impl<'tcx> UpcastFrom, ty::Binder<'tcx, TraitRef<'tcx>>> for Predicate<'tcx> { fn upcast_from(from: ty::Binder<'tcx, TraitRef<'tcx>>, tcx: TyCtxt<'tcx>) -> Self { - let pred: PolyTraitPredicate<'tcx> = from.upcast(tcx); + let pred: PolyTraitClause<'tcx> = from.upcast(tcx); pred.upcast(tcx) } } impl<'tcx> UpcastFrom, ty::Binder<'tcx, TraitRef<'tcx>>> for Clause<'tcx> { fn upcast_from(from: ty::Binder<'tcx, TraitRef<'tcx>>, tcx: TyCtxt<'tcx>) -> Self { - let pred: PolyTraitPredicate<'tcx> = from.upcast(tcx); + let pred: PolyTraitClause<'tcx> = from.upcast(tcx); pred.upcast(tcx) } } -impl<'tcx> UpcastFrom, TraitPredicate<'tcx>> for Predicate<'tcx> { - fn upcast_from(from: TraitPredicate<'tcx>, tcx: TyCtxt<'tcx>) -> Self { +impl<'tcx> UpcastFrom, TraitClause<'tcx>> for Predicate<'tcx> { + fn upcast_from(from: TraitClause<'tcx>, tcx: TyCtxt<'tcx>) -> Self { PredicateKind::Clause(ClauseKind::Trait(from)).upcast(tcx) } } -impl<'tcx> UpcastFrom, PolyTraitPredicate<'tcx>> for Predicate<'tcx> { - fn upcast_from(from: PolyTraitPredicate<'tcx>, tcx: TyCtxt<'tcx>) -> Self { +impl<'tcx> UpcastFrom, PolyTraitClause<'tcx>> for Predicate<'tcx> { + fn upcast_from(from: PolyTraitClause<'tcx>, tcx: TyCtxt<'tcx>) -> Self { from.map_bound(|p| PredicateKind::Clause(ClauseKind::Trait(p))).upcast(tcx) } } -impl<'tcx> UpcastFrom, TraitPredicate<'tcx>> for Clause<'tcx> { - fn upcast_from(from: TraitPredicate<'tcx>, tcx: TyCtxt<'tcx>) -> Self { +impl<'tcx> UpcastFrom, TraitClause<'tcx>> for Clause<'tcx> { + fn upcast_from(from: TraitClause<'tcx>, tcx: TyCtxt<'tcx>) -> Self { let p: Predicate<'tcx> = from.upcast(tcx); p.expect_clause() } } -impl<'tcx> UpcastFrom, PolyTraitPredicate<'tcx>> for Clause<'tcx> { - fn upcast_from(from: PolyTraitPredicate<'tcx>, tcx: TyCtxt<'tcx>) -> Self { +impl<'tcx> UpcastFrom, PolyTraitClause<'tcx>> for Clause<'tcx> { + fn upcast_from(from: PolyTraitClause<'tcx>, tcx: TyCtxt<'tcx>) -> Self { let p: Predicate<'tcx> = from.upcast(tcx); p.expect_clause() } @@ -556,27 +555,27 @@ impl<'tcx> UpcastFrom, TypeOutlivesClause<'tcx>> for Predicate<'tcx } } -impl<'tcx> UpcastFrom, ProjectionPredicate<'tcx>> for Predicate<'tcx> { - fn upcast_from(from: ProjectionPredicate<'tcx>, tcx: TyCtxt<'tcx>) -> Self { +impl<'tcx> UpcastFrom, ProjectionClause<'tcx>> for Predicate<'tcx> { + fn upcast_from(from: ProjectionClause<'tcx>, tcx: TyCtxt<'tcx>) -> Self { ty::Binder::dummy(PredicateKind::Clause(ClauseKind::Projection(from))).upcast(tcx) } } -impl<'tcx> UpcastFrom, PolyProjectionPredicate<'tcx>> for Predicate<'tcx> { - fn upcast_from(from: PolyProjectionPredicate<'tcx>, tcx: TyCtxt<'tcx>) -> Self { +impl<'tcx> UpcastFrom, PolyProjectionClause<'tcx>> for Predicate<'tcx> { + fn upcast_from(from: PolyProjectionClause<'tcx>, tcx: TyCtxt<'tcx>) -> Self { from.map_bound(|p| PredicateKind::Clause(ClauseKind::Projection(p))).upcast(tcx) } } -impl<'tcx> UpcastFrom, ProjectionPredicate<'tcx>> for Clause<'tcx> { - fn upcast_from(from: ProjectionPredicate<'tcx>, tcx: TyCtxt<'tcx>) -> Self { +impl<'tcx> UpcastFrom, ProjectionClause<'tcx>> for Clause<'tcx> { + fn upcast_from(from: ProjectionClause<'tcx>, tcx: TyCtxt<'tcx>) -> Self { let p: Predicate<'tcx> = from.upcast(tcx); p.expect_clause() } } -impl<'tcx> UpcastFrom, PolyProjectionPredicate<'tcx>> for Clause<'tcx> { - fn upcast_from(from: PolyProjectionPredicate<'tcx>, tcx: TyCtxt<'tcx>) -> Self { +impl<'tcx> UpcastFrom, PolyProjectionClause<'tcx>> for Clause<'tcx> { + fn upcast_from(from: PolyProjectionClause<'tcx>, tcx: TyCtxt<'tcx>) -> Self { let p: Predicate<'tcx> = from.upcast(tcx); p.expect_clause() } @@ -603,7 +602,7 @@ impl<'tcx> UpcastFrom, NormalizesTo<'tcx>> for Predicate<'tcx> { } impl<'tcx> Predicate<'tcx> { - pub fn as_trait_clause(self) -> Option> { + pub fn as_trait_clause(self) -> Option> { let predicate = self.kind(); match predicate.skip_binder() { PredicateKind::Clause(ClauseKind::Trait(t)) => Some(predicate.rebind(t)), @@ -611,7 +610,7 @@ impl<'tcx> Predicate<'tcx> { } } - pub fn as_projection_clause(self) -> Option> { + pub fn as_projection_clause(self) -> Option> { let predicate = self.kind(); match predicate.skip_binder() { PredicateKind::Clause(ClauseKind::Projection(t)) => Some(predicate.rebind(t)), diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index 4ab474fd89fe6..84437a237c28a 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -26,7 +26,7 @@ use crate::mir::interpret::{AllocRange, GlobalAlloc, Pointer, Provenance, Scalar use crate::query::{IntoQueryKey, Providers}; use crate::ty::region::RegionExt; use crate::ty::{ - ConstInt, Expr, GenericArgKind, ParamConst, ScalarInt, Term, TermKind, TraitPredicate, + ConstInt, Expr, GenericArgKind, ParamConst, ScalarInt, Term, TermKind, TraitClause, TypeFoldable, TypeSuperFoldable, TypeSuperVisitable, TypeVisitable, TypeVisitableExt, }; @@ -1060,11 +1060,11 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write { // `MetaSized`, and skip sizedness bounds to be added at the end. match tcx.as_lang_item(pred.def_id()) { Some(LangItem::Sized) => match pred.polarity { - ty::PredicatePolarity::Positive => { + ty::ClausePolarity::Positive => { has_sized_bound = true; continue; } - ty::PredicatePolarity::Negative => has_negative_sized_bound = true, + ty::ClausePolarity::Negative => has_negative_sized_bound = true, }, Some(LangItem::MetaSized) => { has_meta_sized_bound = true; @@ -1085,9 +1085,9 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write { } ty::ClauseKind::Projection(pred) => { let proj = bound_predicate.rebind(pred); - let trait_ref = proj.map_bound(|proj| TraitPredicate { + let trait_ref = proj.map_bound(|proj| TraitClause { trait_ref: proj.projection_term.trait_ref(tcx), - polarity: ty::PredicatePolarity::Positive, + polarity: ty::ClausePolarity::Positive, }); self.insert_trait_and_projection( @@ -1151,8 +1151,8 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write { } else { // Otherwise, render this like a regular trait. traits.insert( - bound_args_and_self_ty.map_bound(|(args, self_ty)| ty::TraitPredicate { - polarity: ty::PredicatePolarity::Positive, + bound_args_and_self_ty.map_bound(|(args, self_ty)| ty::TraitClause { + polarity: ty::ClausePolarity::Positive, trait_ref: ty::TraitRef::new( tcx, trait_def_id, @@ -1169,7 +1169,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write { write!(self, "{}", if first { "" } else { " + " })?; self.wrap_binder(&trait_pred, WrapBinderMode::ForAll, |trait_pred, p| { - if trait_pred.polarity == ty::PredicatePolarity::Negative { + if trait_pred.polarity == ty::ClausePolarity::Negative { write!(p, "!")?; } trait_pred.trait_ref.print_only_trait_name().print(p)?; @@ -1257,10 +1257,10 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write { /// traits map or fn_traits map, depending on if the trait is in the Fn* family of traits. fn insert_trait_and_projection( &mut self, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, proj_ty: Option<(DefId, ty::Binder<'tcx, Term<'tcx>>)>, traits: &mut FxIndexMap< - ty::PolyTraitPredicate<'tcx>, + ty::PolyTraitClause<'tcx>, FxIndexMap>>, >, fn_traits: &mut FxIndexMap< @@ -1279,7 +1279,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write { None }; - if trait_pred.polarity() == ty::PredicatePolarity::Positive + if trait_pred.polarity() == ty::ClausePolarity::Positive && let Some((kind, is_async)) = fn_trait_and_async && let ty::Tuple(types) = *trait_pred.skip_binder().trait_ref.args.type_at(1).kind() { @@ -3076,46 +3076,46 @@ impl<'tcx> ty::Binder<'tcx, ty::TraitRef<'tcx>> { } #[derive(Copy, Clone, TypeFoldable, TypeVisitable, Lift, Hash)] -pub struct TraitPredPrintModifiersAndPath<'tcx>(ty::TraitPredicate<'tcx>); +pub struct TraitClausePrintModifiersAndPath<'tcx>(ty::TraitClause<'tcx>); -impl<'tcx> fmt::Debug for TraitPredPrintModifiersAndPath<'tcx> { +impl<'tcx> fmt::Debug for TraitClausePrintModifiersAndPath<'tcx> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fmt::Display::fmt(self, f) } } -#[extension(pub trait PrintTraitPredicateExt<'tcx>)] -impl<'tcx> ty::TraitPredicate<'tcx> { - fn print_modifiers_and_trait_path(self) -> TraitPredPrintModifiersAndPath<'tcx> { - TraitPredPrintModifiersAndPath(self) +#[extension(pub trait PrintTraitClauseExt<'tcx>)] +impl<'tcx> ty::TraitClause<'tcx> { + fn print_modifiers_and_trait_path(self) -> TraitClausePrintModifiersAndPath<'tcx> { + TraitClausePrintModifiersAndPath(self) } } #[derive(Copy, Clone, TypeFoldable, TypeVisitable, Lift, Hash)] -pub struct TraitPredPrintWithBoundConstness<'tcx>( - ty::TraitPredicate<'tcx>, +pub struct TraitClausePrintWithBoundConstness<'tcx>( + ty::TraitClause<'tcx>, Option, ); -impl<'tcx> fmt::Debug for TraitPredPrintWithBoundConstness<'tcx> { +impl<'tcx> fmt::Debug for TraitClausePrintWithBoundConstness<'tcx> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fmt::Display::fmt(self, f) } } -#[extension(pub trait PrintPolyTraitPredicateExt<'tcx>)] -impl<'tcx> ty::PolyTraitPredicate<'tcx> { +#[extension(pub trait PrintPolyTraitClauseExt<'tcx>)] +impl<'tcx> ty::PolyTraitClause<'tcx> { fn print_modifiers_and_trait_path( self, - ) -> ty::Binder<'tcx, TraitPredPrintModifiersAndPath<'tcx>> { - self.map_bound(TraitPredPrintModifiersAndPath) + ) -> ty::Binder<'tcx, TraitClausePrintModifiersAndPath<'tcx>> { + self.map_bound(TraitClausePrintModifiersAndPath) } fn print_with_bound_constness( self, constness: Option, - ) -> ty::Binder<'tcx, TraitPredPrintWithBoundConstness<'tcx>> { - self.map_bound(|trait_pred| TraitPredPrintWithBoundConstness(trait_pred, constness)) + ) -> ty::Binder<'tcx, TraitClausePrintWithBoundConstness<'tcx>> { + self.map_bound(|trait_pred| TraitClausePrintWithBoundConstness(trait_pred, constness)) } } @@ -3214,10 +3214,10 @@ define_print! { } } - ty::TraitPredicate<'tcx> { + ty::TraitClause<'tcx> { self.trait_ref.self_ty().print(p)?; write!(p, ": ")?; - if let ty::PredicatePolarity::Negative = self.polarity { + if let ty::ClausePolarity::Negative = self.polarity { write!(p, "!")?; } self.trait_ref.print_trait_sugared().print(p)?; @@ -3314,7 +3314,7 @@ define_print! { self.term.print(p)?; } - ty::ProjectionPredicate<'tcx> { + ty::ProjectionClause<'tcx> { self.projection_term.print(p)?; write!(p, " == ")?; p.reset_type_limit(); @@ -3389,20 +3389,20 @@ define_print_and_forward_display! { p.print_def_path(self.0.def_id, &[])?; } - TraitPredPrintModifiersAndPath<'tcx> { - if let ty::PredicatePolarity::Negative = self.0.polarity { + TraitClausePrintModifiersAndPath<'tcx> { + if let ty::ClausePolarity::Negative = self.0.polarity { write!(p, "!")?; } self.0.trait_ref.print_trait_sugared().print(p)?; } - TraitPredPrintWithBoundConstness<'tcx> { + TraitClausePrintWithBoundConstness<'tcx> { self.0.trait_ref.self_ty().print(p)?; write!(p, ": ")?; if let Some(constness) = self.1 { p.pretty_print_bound_constness(constness)?; } - if let ty::PredicatePolarity::Negative = self.0.polarity { + if let ty::ClausePolarity::Negative = self.0.polarity { write!(p, "!")?; } self.0.trait_ref.print_trait_sugared().print(p)?; diff --git a/compiler/rustc_middle/src/ty/structural_impls.rs b/compiler/rustc_middle/src/ty/structural_impls.rs index 7dc717649dc1c..d40c5dfab7c14 100644 --- a/compiler/rustc_middle/src/ty/structural_impls.rs +++ b/compiler/rustc_middle/src/ty/structural_impls.rs @@ -186,7 +186,7 @@ TrivialLiftImpls! { rustc_middle::mir::ConstValue, rustc_span::Symbol, rustc_type_ir::BoundConstness, - rustc_type_ir::PredicatePolarity, + rustc_type_ir::ClausePolarity, // tidy-alphabetical-end } diff --git a/compiler/rustc_middle/src/ty/util.rs b/compiler/rustc_middle/src/ty/util.rs index adf153b68dae6..2e31e666f8f48 100644 --- a/compiler/rustc_middle/src/ty/util.rs +++ b/compiler/rustc_middle/src/ty/util.rs @@ -1040,7 +1040,7 @@ impl<'tcx> TypeFolder> for OpaqueTypeExpander<'tcx> { && let ty::ClauseKind::Projection(projection_pred) = clause { p.kind() - .rebind(ty::ProjectionPredicate { + .rebind(ty::ProjectionClause { projection_term: projection_pred.projection_term.fold_with(self), // Don't fold the term on the RHS of the projection predicate. // This is because for default trait methods with RPITITs, we diff --git a/compiler/rustc_mir_transform/src/coroutine/drop.rs b/compiler/rustc_mir_transform/src/coroutine/drop.rs index 41b973476af94..6b26a1f242cf0 100644 --- a/compiler/rustc_mir_transform/src/coroutine/drop.rs +++ b/compiler/rustc_mir_transform/src/coroutine/drop.rs @@ -27,6 +27,23 @@ impl<'tcx> MutVisitor<'tcx> for FixReturnPendingVisitor<'tcx> { && let AggregateKind::Adt(_, _, ref mut args, _, _) = **kind { *args = self.tcx.mk_args(&[self.tcx.types.unit.into()]); + } else if let Rvalue::Use(Operand::Constant(constant), _) = rvalue { + if let Some(async_gen_pending_def_id) = self.tcx.lang_items().async_gen_pending() + && let Const::Unevaluated(unevaluated, _) = constant.const_ + && unevaluated.def == async_gen_pending_def_id + { + let poll_def_id = self.tcx.lang_items().poll().unwrap(); + *rvalue = Rvalue::Aggregate( + Box::new(AggregateKind::Adt( + poll_def_id, + VariantIdx::from_u32(1), + self.tcx.mk_args(&[self.tcx.types.unit.into()]), + None, + None, + )), + IndexVec::new(), + ); + } } } } diff --git a/compiler/rustc_mir_transform/src/impossible_clauses.rs b/compiler/rustc_mir_transform/src/impossible_clauses.rs index 39f864d8a8219..bb6644716bf05 100644 --- a/compiler/rustc_mir_transform/src/impossible_clauses.rs +++ b/compiler/rustc_mir_transform/src/impossible_clauses.rs @@ -58,7 +58,7 @@ fn has_structurally_impossible_sized_clause<'tcx>( }; let trait_predicate = trait_predicate.skip_binder(); - trait_predicate.polarity == ty::PredicatePolarity::Positive + trait_predicate.polarity == ty::ClausePolarity::Positive && trait_predicate.def_id() == sized_trait && is_structurally_unsized(tcx, trait_predicate.self_ty()) } diff --git a/compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs b/compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs index aa26a122817bb..17172c5333502 100644 --- a/compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs +++ b/compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs @@ -964,7 +964,7 @@ struct ReplaceProjectionWith<'a, 'b, I: Interner, D: SolverDelegate, param_env: I::ParamEnv, self_ty: I::Ty, - mapping: &'a HashMap>>>, + mapping: &'a HashMap>>>, nested: Vec>, } @@ -975,7 +975,7 @@ where { fn projection_may_match( &mut self, - source_projection: ty::Binder>, + source_projection: ty::Binder>, target_projection: ty::AliasTerm, ) -> Result { if source_projection.item_def_id() != target_projection.expect_projection_def_id() { diff --git a/compiler/rustc_next_trait_solver/src/solve/effect_goals.rs b/compiler/rustc_next_trait_solver/src/solve/effect_goals.rs index 488d1b9215016..2fe983afc25ef 100644 --- a/compiler/rustc_next_trait_solver/src/solve/effect_goals.rs +++ b/compiler/rustc_next_trait_solver/src/solve/effect_goals.rs @@ -485,7 +485,7 @@ where goal: Goal>, ) -> QueryResultOrRerunNonErased { let (_, proven_via) = self.probe(|_| ProbeKind::ShadowedEnvProbing).enter(|ecx| { - let trait_goal: Goal> = + let trait_goal: Goal> = goal.with(ecx.cx(), goal.predicate.trait_ref); ecx.compute_trait_goal(trait_goal).map_err(Into::into) })?; diff --git a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs index 78d3ab86cc250..be90d21e715ae 100644 --- a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs +++ b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs @@ -1711,7 +1711,7 @@ where let infcx = self.delegate.deref(); let mut folder = NormalizationFolder::new(infcx, vec![], |alias_term| { let infer_term = self.next_term_infer_of_alias_kind(alias_term); - let pred = ty::ProjectionPredicate { projection_term: alias_term, term: infer_term }; + let pred = ty::ProjectionClause { projection_term: alias_term, term: infer_term }; let goal = Goal::new(self.cx(), param_env, pred); self.inspect.add_goal(self.delegate, self.max_input_universe, source, goal); let GoalEvaluation { goal, certainty, has_changed: _, stalled_on } = diff --git a/compiler/rustc_next_trait_solver/src/solve/mod.rs b/compiler/rustc_next_trait_solver/src/solve/mod.rs index 3504882834268..84c128ad0f45f 100644 --- a/compiler/rustc_next_trait_solver/src/solve/mod.rs +++ b/compiler/rustc_next_trait_solver/src/solve/mod.rs @@ -394,7 +394,7 @@ where let projection_goal = Goal::new( self.cx(), param_env, - ty::ProjectionPredicate { projection_term: alias, term: normalized_term }, + ty::ProjectionClause { projection_term: alias, term: normalized_term }, ); // We normalize the self type to be able to relate it with // types from candidates. diff --git a/compiler/rustc_next_trait_solver/src/solve/normalizes_to.rs b/compiler/rustc_next_trait_solver/src/solve/normalizes_to.rs index 08c634620300a..20986813668d3 100644 --- a/compiler/rustc_next_trait_solver/src/solve/normalizes_to.rs +++ b/compiler/rustc_next_trait_solver/src/solve/normalizes_to.rs @@ -41,7 +41,7 @@ where let trait_ref = goal.predicate.alias.trait_ref(cx); let (_, proven_via) = self.probe(|_| ProbeKind::ShadowedEnvProbing).enter(|ecx| { - let trait_goal: Goal> = goal.with(cx, trait_ref); + let trait_goal: Goal> = goal.with(cx, trait_ref); ecx.compute_trait_goal(trait_goal) })?; self.assemble_and_merge_candidates( @@ -536,7 +536,7 @@ where let output_is_sized_pred = ty::TraitRef::new(cx, cx.require_trait_lang_item(SolverTraitLangItem::Sized), [output]); - let pred = ty::ProjectionPredicate { + let pred = ty::ProjectionClause { projection_term: ty::AliasTerm::new( cx, goal.predicate.alias.kind, @@ -625,7 +625,7 @@ where } else { panic!("no such associated type in `AsyncFn*`: {:?}", def_id) }; - let pred = ty::ProjectionPredicate { projection_term, term }.upcast(cx); + let pred = ty::ProjectionClause { projection_term, term }.upcast(cx); Self::probe_and_consider_implied_clause( ecx, @@ -821,7 +821,7 @@ where ecx, CandidateSource::BuiltinImpl(BuiltinImplSource::Misc), goal, - ty::ProjectionPredicate { + ty::ProjectionClause { projection_term: ty::AliasTerm::new( ecx.cx(), cx.alias_term_kind_from_def_id( @@ -859,7 +859,7 @@ where ecx, CandidateSource::BuiltinImpl(BuiltinImplSource::Misc), goal, - ty::ProjectionPredicate { + ty::ProjectionClause { projection_term: ty::AliasTerm::new( ecx.cx(), cx.alias_term_kind_from_def_id( @@ -950,7 +950,7 @@ where ecx, CandidateSource::BuiltinImpl(BuiltinImplSource::Misc), goal, - ty::ProjectionPredicate { + ty::ProjectionClause { projection_term: ty::AliasTerm::new( ecx.cx(), goal.predicate.alias.kind, diff --git a/compiler/rustc_next_trait_solver/src/solve/project_goals/anon_const.rs b/compiler/rustc_next_trait_solver/src/solve/project_goals/anon_const.rs index fc0c34e63e187..5c6e9cc2045c2 100644 --- a/compiler/rustc_next_trait_solver/src/solve/project_goals/anon_const.rs +++ b/compiler/rustc_next_trait_solver/src/solve/project_goals/anon_const.rs @@ -13,7 +13,7 @@ where #[instrument(level = "trace", skip(self), ret)] pub(super) fn normalize_anon_const( &mut self, - goal: Goal>, + goal: Goal>, ) -> QueryResultOrRerunNonErased { let alias_const = goal.predicate.projection_term.expect_ct(); self.evaluate_const_and_instantiate_projection_term( diff --git a/compiler/rustc_next_trait_solver/src/solve/project_goals/free_alias.rs b/compiler/rustc_next_trait_solver/src/solve/project_goals/free_alias.rs index 7f5d258ccc706..efc630a106ee3 100644 --- a/compiler/rustc_next_trait_solver/src/solve/project_goals/free_alias.rs +++ b/compiler/rustc_next_trait_solver/src/solve/project_goals/free_alias.rs @@ -17,7 +17,7 @@ where { pub(super) fn normalize_free_alias( &mut self, - goal: Goal>, + goal: Goal>, ) -> QueryResultOrRerunNonErased { let cx = self.cx(); let free_alias = goal.predicate.projection_term; diff --git a/compiler/rustc_next_trait_solver/src/solve/project_goals/inherent.rs b/compiler/rustc_next_trait_solver/src/solve/project_goals/inherent.rs index afdc0c20a7132..a7480cded0514 100644 --- a/compiler/rustc_next_trait_solver/src/solve/project_goals/inherent.rs +++ b/compiler/rustc_next_trait_solver/src/solve/project_goals/inherent.rs @@ -18,7 +18,7 @@ where { pub(super) fn normalize_inherent_associated_term( &mut self, - goal: Goal>, + goal: Goal>, ) -> QueryResultOrRerunNonErased { let cx = self.cx(); let inherent = goal.predicate.projection_term; diff --git a/compiler/rustc_next_trait_solver/src/solve/project_goals/mod.rs b/compiler/rustc_next_trait_solver/src/solve/project_goals/mod.rs index 41fe4105cb745..6ec82aefb523f 100644 --- a/compiler/rustc_next_trait_solver/src/solve/project_goals/mod.rs +++ b/compiler/rustc_next_trait_solver/src/solve/project_goals/mod.rs @@ -5,7 +5,7 @@ mod opaque_types; use rustc_type_ir::search_graph::LowerAvailableDepth; use rustc_type_ir::solve::QueryResultOrRerunNonErased; -use rustc_type_ir::{self as ty, Interner, ProjectionPredicate}; +use rustc_type_ir::{self as ty, Interner, ProjectionClause}; use tracing::{instrument, trace}; use crate::delegate::SolverDelegate; @@ -21,7 +21,7 @@ where #[instrument(level = "trace", skip(self), ret)] pub(super) fn compute_projection_goal( &mut self, - goal: Goal>, + goal: Goal>, ) -> QueryResultOrRerunNonErased { match goal.predicate.projection_term.kind { ty::AliasTermKind::ProjectionTy { .. } | ty::AliasTermKind::ProjectionConst { .. } => { @@ -42,9 +42,9 @@ where fn normalize_associated_term( &mut self, - goal: Goal>, + goal: Goal>, ) -> QueryResultOrRerunNonErased { - let ty::ProjectionPredicate { projection_term: alias, term } = goal.predicate; + let ty::ProjectionClause { projection_term: alias, term } = goal.predicate; let unconstrained_term = self.next_term_infer_of_alias_kind(alias); let normalizes_to = goal.with(self.cx(), ty::NormalizesTo { alias, term: unconstrained_term }); diff --git a/compiler/rustc_next_trait_solver/src/solve/project_goals/opaque_types.rs b/compiler/rustc_next_trait_solver/src/solve/project_goals/opaque_types.rs index 3387c8599b911..126bffb720dbc 100644 --- a/compiler/rustc_next_trait_solver/src/solve/project_goals/opaque_types.rs +++ b/compiler/rustc_next_trait_solver/src/solve/project_goals/opaque_types.rs @@ -16,7 +16,7 @@ where #[tracing::instrument(skip(self))] pub(super) fn normalize_opaque_type( &mut self, - goal: Goal>, + goal: Goal>, ) -> QueryResultOrRerunNonErased { let cx = self.cx(); let opaque_ty = goal.predicate.projection_term; diff --git a/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs b/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs index 07a87d1194d13..335263b1d169d 100644 --- a/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs +++ b/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs @@ -10,9 +10,9 @@ use rustc_type_ir::solve::{ RerunReason, RerunResultExt, SizedTraitKind, }; use rustc_type_ir::{ - self as ty, ExistentialPredicate, FieldInfo, Interner, MayBeErased, Movability, - PredicatePolarity, Region, TraitPredicate, TraitRef, TypeVisitableExt as _, TypingMode, - Unnormalized, Upcast as _, elaborate, + self as ty, ClausePolarity, ExistentialPredicate, FieldInfo, Interner, MayBeErased, Movability, + Region, TraitClause, TraitRef, TypeVisitableExt as _, TypingMode, Unnormalized, Upcast as _, + elaborate, }; use tracing::{debug, instrument, trace, warn}; @@ -28,7 +28,7 @@ use crate::solve::{ has_only_region_constraints, }; -impl assembly::GoalKind for TraitPredicate +impl assembly::GoalKind for TraitClause where D: SolverDelegate, I: Interner, @@ -59,7 +59,7 @@ where fn consider_impl_candidate( ecx: &mut EvalCtxt<'_, D>, - goal: Goal>, + goal: Goal>, goal_trait_ref: TraitRef, impl_def_id: I::ImplId, then: impl FnOnce(&mut EvalCtxt<'_, D>, Certainty) -> QueryResultOrRerunNonErased, @@ -87,8 +87,8 @@ where } // Impl matches polarity - (ty::ImplPolarity::Positive, ty::PredicatePolarity::Positive) - | (ty::ImplPolarity::Negative, ty::PredicatePolarity::Negative) => { + (ty::ImplPolarity::Positive, ty::ClausePolarity::Positive) + | (ty::ImplPolarity::Negative, ty::ClausePolarity::Negative) => { if ecx.typing_mode().is_reflection() && !cx.is_fully_generic_for_reflection(impl_def_id) { @@ -99,8 +99,8 @@ where } // Impl doesn't match polarity - (ty::ImplPolarity::Positive, ty::PredicatePolarity::Negative) - | (ty::ImplPolarity::Negative, ty::PredicatePolarity::Positive) => { + (ty::ImplPolarity::Positive, ty::ClausePolarity::Negative) + | (ty::ImplPolarity::Negative, ty::ClausePolarity::Positive) => { return Err(NoSolution.into()); } }; @@ -151,14 +151,14 @@ where cx: I, clause_def_id: I::TraitId, goal_def_id: I::TraitId, - polarity: PredicatePolarity, + polarity: ClausePolarity, ) -> bool { clause_def_id == goal_def_id // PERF(sized-hierarchy): Sizedness supertraits aren't elaborated to improve perf, so // check for a `MetaSized` supertrait being matched against a `Sized` assumption. // // `PointeeSized` bounds are syntactic sugar for a lack of bounds so don't need this. - || (polarity == PredicatePolarity::Positive + || (polarity == ClausePolarity::Positive && cx.is_trait_lang_item(clause_def_id, SolverTraitLangItem::Sized) && cx.is_trait_lang_item(goal_def_id, SolverTraitLangItem::MetaSized)) } @@ -214,7 +214,7 @@ where goal: Goal, ) -> Result, NoSolutionOrRerunNonErased> { let cx = ecx.cx(); - if goal.predicate.polarity != ty::PredicatePolarity::Positive { + if goal.predicate.polarity != ty::ClausePolarity::Positive { return Err(NoSolution.into()); } @@ -280,7 +280,7 @@ where ecx: &mut EvalCtxt<'_, D>, goal: Goal, ) -> Result, NoSolutionOrRerunNonErased> { - if goal.predicate.polarity != ty::PredicatePolarity::Positive { + if goal.predicate.polarity != ty::ClausePolarity::Positive { return Err(NoSolution.into()); } @@ -307,7 +307,7 @@ where goal: Goal, sizedness: SizedTraitKind, ) -> Result, NoSolutionOrRerunNonErased> { - if goal.predicate.polarity != ty::PredicatePolarity::Positive { + if goal.predicate.polarity != ty::ClausePolarity::Positive { return Err(NoSolution.into()); } @@ -326,7 +326,7 @@ where ecx: &mut EvalCtxt<'_, D>, goal: Goal, ) -> Result, NoSolutionOrRerunNonErased> { - if goal.predicate.polarity != ty::PredicatePolarity::Positive { + if goal.predicate.polarity != ty::ClausePolarity::Positive { return Err(NoSolution.into()); } @@ -349,7 +349,7 @@ where let self_ty = goal.predicate.self_ty(); match goal.predicate.polarity { // impl FnPtr for FnPtr {} - ty::PredicatePolarity::Positive => { + ty::ClausePolarity::Positive => { if self_ty.is_fn_ptr() { ecx.probe_builtin_trait_candidate(BuiltinImplSource::Misc).enter(|ecx| { ecx.evaluate_added_goals_and_make_canonical_response(Certainty::Yes) @@ -359,7 +359,7 @@ where } } // impl !FnPtr for T where T != FnPtr && T is rigid {} - ty::PredicatePolarity::Negative => { + ty::ClausePolarity::Negative => { // If a type is rigid and not a fn ptr, then we know for certain // that it does *not* implement `FnPtr`. if !self_ty.is_fn_ptr() && self_ty.is_known_rigid() { @@ -378,7 +378,7 @@ where goal: Goal, goal_kind: ty::ClosureKind, ) -> Result, NoSolutionOrRerunNonErased> { - if goal.predicate.polarity != ty::PredicatePolarity::Positive { + if goal.predicate.polarity != ty::ClausePolarity::Positive { return Err(NoSolution.into()); } @@ -416,7 +416,7 @@ where goal: Goal, goal_kind: ty::ClosureKind, ) -> Result, NoSolutionOrRerunNonErased> { - if goal.predicate.polarity != ty::PredicatePolarity::Positive { + if goal.predicate.polarity != ty::ClausePolarity::Positive { return Err(NoSolution.into()); } @@ -492,7 +492,7 @@ where ecx: &mut EvalCtxt<'_, D>, goal: Goal, ) -> Result, NoSolutionOrRerunNonErased> { - if goal.predicate.polarity != ty::PredicatePolarity::Positive { + if goal.predicate.polarity != ty::ClausePolarity::Positive { return Err(NoSolution.into()); } @@ -508,7 +508,7 @@ where ecx: &mut EvalCtxt<'_, D>, goal: Goal, ) -> Result, NoSolutionOrRerunNonErased> { - if goal.predicate.polarity != ty::PredicatePolarity::Positive { + if goal.predicate.polarity != ty::ClausePolarity::Positive { return Err(NoSolution.into()); } @@ -520,7 +520,7 @@ where ecx: &mut EvalCtxt<'_, D>, goal: Goal, ) -> Result, NoSolutionOrRerunNonErased> { - if goal.predicate.polarity != ty::PredicatePolarity::Positive { + if goal.predicate.polarity != ty::ClausePolarity::Positive { return Err(NoSolution.into()); } @@ -545,7 +545,7 @@ where ecx: &mut EvalCtxt<'_, D>, goal: Goal, ) -> Result, NoSolutionOrRerunNonErased> { - if goal.predicate.polarity != ty::PredicatePolarity::Positive { + if goal.predicate.polarity != ty::ClausePolarity::Positive { return Err(NoSolution.into()); } @@ -570,7 +570,7 @@ where ecx: &mut EvalCtxt<'_, D>, goal: Goal, ) -> Result, NoSolutionOrRerunNonErased> { - if goal.predicate.polarity != ty::PredicatePolarity::Positive { + if goal.predicate.polarity != ty::ClausePolarity::Positive { return Err(NoSolution.into()); } @@ -593,7 +593,7 @@ where ecx: &mut EvalCtxt<'_, D>, goal: Goal, ) -> Result, NoSolutionOrRerunNonErased> { - if goal.predicate.polarity != ty::PredicatePolarity::Positive { + if goal.predicate.polarity != ty::ClausePolarity::Positive { return Err(NoSolution.into()); } @@ -618,7 +618,7 @@ where ecx: &mut EvalCtxt<'_, D>, goal: Goal, ) -> Result, NoSolutionOrRerunNonErased> { - if goal.predicate.polarity != ty::PredicatePolarity::Positive { + if goal.predicate.polarity != ty::ClausePolarity::Positive { return Err(NoSolution.into()); } @@ -650,7 +650,7 @@ where ecx: &mut EvalCtxt<'_, D>, goal: Goal, ) -> Result, NoSolutionOrRerunNonErased> { - if goal.predicate.polarity != ty::PredicatePolarity::Positive { + if goal.predicate.polarity != ty::ClausePolarity::Positive { return Err(NoSolution.into()); } @@ -663,7 +663,7 @@ where ecx: &mut EvalCtxt<'_, D>, goal: Goal, ) -> Result, NoSolutionOrRerunNonErased> { - if goal.predicate.polarity != ty::PredicatePolarity::Positive { + if goal.predicate.polarity != ty::ClausePolarity::Positive { return Err(NoSolution.into()); } @@ -677,7 +677,7 @@ where ecx: &mut EvalCtxt<'_, D>, goal: Goal, ) -> Result, NoSolutionOrRerunNonErased> { - if goal.predicate.polarity != ty::PredicatePolarity::Positive { + if goal.predicate.polarity != ty::ClausePolarity::Positive { return Err(NoSolution.into()); } @@ -725,7 +725,7 @@ where ecx: &mut EvalCtxt<'_, D>, goal: Goal, ) -> Result, NoSolutionOrRerunNonErased> { - if goal.predicate.polarity != ty::PredicatePolarity::Positive { + if goal.predicate.polarity != ty::ClausePolarity::Positive { return Err(NoSolution.into()); } @@ -818,7 +818,7 @@ where ecx: &mut EvalCtxt<'_, D>, goal: Goal, ) -> Result>, RerunNonErased> { - if goal.predicate.polarity != ty::PredicatePolarity::Positive { + if goal.predicate.polarity != ty::ClausePolarity::Positive { return Ok(vec![]); } @@ -878,7 +878,7 @@ where ecx: &mut EvalCtxt<'_, D>, goal: Goal, ) -> Result, NoSolutionOrRerunNonErased> { - if goal.predicate.polarity != ty::PredicatePolarity::Positive { + if goal.predicate.polarity != ty::ClausePolarity::Positive { return Err(NoSolution.into()); } let cx = ecx.cx(); @@ -921,7 +921,7 @@ where ecx: &mut EvalCtxt<'_, D>, goal: Goal, ) -> Result, NoSolutionOrRerunNonErased> { - if goal.predicate.polarity != ty::PredicatePolarity::Positive { + if goal.predicate.polarity != ty::ClausePolarity::Positive { return Err(NoSolution.into()); } if let ty::Adt(def, args) = goal.predicate.self_ty().kind() @@ -976,11 +976,11 @@ where #[inline(always)] fn trait_predicate_with_def_id( cx: I, - clause: ty::Binder>, + clause: ty::Binder>, did: I::TraitId, ) -> I::Clause { clause - .map_bound(|c| TraitPredicate { + .map_bound(|c| TraitClause { trait_ref: TraitRef::new_from_args(cx, did, c.trait_ref.args), polarity: c.polarity, }) @@ -1305,7 +1305,7 @@ where // the type's constituent types. fn disqualify_auto_trait_candidate_due_to_possible_impl( &mut self, - goal: Goal>, + goal: Goal>, ) -> Option, NoSolutionOrRerunNonErased>> { let self_ty = goal.predicate.self_ty(); let check_impls = || { @@ -1417,7 +1417,7 @@ where fn probe_and_evaluate_goal_for_constituent_tys( &mut self, source: CandidateSource, - goal: Goal>, + goal: Goal>, constituent_tys: impl Fn( &EvalCtxt<'_, D>, I::Ty, @@ -1633,7 +1633,7 @@ where #[instrument(level = "trace", skip(self))] pub(super) fn compute_trait_goal( &mut self, - goal: Goal>, + goal: Goal>, ) -> Result<(CanonicalResponse, Option), NoSolutionOrRerunNonErased> { let (candidates, failed_candidate_info) = diff --git a/compiler/rustc_privacy/src/lib.rs b/compiler/rustc_privacy/src/lib.rs index 879b239047fdc..c11a4b162971f 100644 --- a/compiler/rustc_privacy/src/lib.rs +++ b/compiler/rustc_privacy/src/lib.rs @@ -130,14 +130,14 @@ where fn visit_clause(&mut self, clause: ty::Clause<'tcx>) -> V::Result { match clause.kind().skip_binder() { - ty::ClauseKind::Trait(ty::TraitPredicate { trait_ref, polarity: _ }) => { + ty::ClauseKind::Trait(ty::TraitClause { trait_ref, polarity: _ }) => { self.visit_trait(trait_ref) } ty::ClauseKind::HostEffect(clause) => { try_visit!(self.visit_trait(clause.trait_ref)); clause.constness.visit_with(self) } - ty::ClauseKind::Projection(ty::ProjectionPredicate { + ty::ClauseKind::Projection(ty::ProjectionClause { projection_term: projection_ty, term, }) => { diff --git a/compiler/rustc_public/src/ty/tys.rs b/compiler/rustc_public/src/ty/tys.rs index 35792ce2fcc23..75e4272ead57a 100644 --- a/compiler/rustc_public/src/ty/tys.rs +++ b/compiler/rustc_public/src/ty/tys.rs @@ -1231,10 +1231,10 @@ pub enum PredicateKind { #[derive(Clone, Debug, Eq, PartialEq, Serialize)] pub enum ClauseKind { - Trait(TraitPredicate), + Trait(TraitClause), RegionOutlives(RegionOutlivesClause), TypeOutlives(TypeOutlivesClause), - Projection(ProjectionPredicate), + Projection(ProjectionClause), ConstArgHasType(TyConst, Ty), WellFormed(TermKind), ConstEvaluatable(TyConst), @@ -1260,11 +1260,14 @@ pub struct CoercePredicate { } #[derive(Clone, Debug, Eq, PartialEq, Serialize)] -pub struct TraitPredicate { +pub struct TraitClause { pub trait_ref: TraitRef, - pub polarity: PredicatePolarity, + pub polarity: ClausePolarity, } +#[deprecated = "renamed to [`TraitClause`]"] +pub type TraitPredicate = TraitClause; + #[derive(Clone, Debug, Eq, PartialEq, Serialize)] pub struct OutlivesClause(pub A, pub B); @@ -1279,11 +1282,14 @@ pub type RegionOutlivesPredicate = RegionOutlivesClause; pub type TypeOutlivesPredicate = TypeOutlivesClause; #[derive(Clone, Debug, Eq, PartialEq, Serialize)] -pub struct ProjectionPredicate { +pub struct ProjectionClause { pub projection_term: AliasTerm, pub term: TermKind, } +#[deprecated = "renamed to [`ProjectionClause`]"] +pub type ProjectionPredicate = ProjectionClause; + #[derive(Clone, Debug, Eq, PartialEq, Serialize)] pub enum ImplPolarity { Positive, @@ -1292,11 +1298,14 @@ pub enum ImplPolarity { } #[derive(Clone, Debug, Eq, PartialEq, Serialize)] -pub enum PredicatePolarity { +pub enum ClausePolarity { Positive, Negative, } +#[deprecated = "renamed to [`ClausePolarity`]"] +pub type PredicatePolarity = ClausePolarity; + macro_rules! index_impl { ($name:ident) => { impl crate::IndexedVal for $name { diff --git a/compiler/rustc_public/src/unstable/convert/stable/ty.rs b/compiler/rustc_public/src/unstable/convert/stable/ty.rs index 160487400c38c..9eed22dc15d05 100644 --- a/compiler/rustc_public/src/unstable/convert/stable/ty.rs +++ b/compiler/rustc_public/src/unstable/convert/stable/ty.rs @@ -840,16 +840,16 @@ impl<'tcx> Stable<'tcx> for ty::CoercePredicate<'tcx> { } } -impl<'tcx> Stable<'tcx> for ty::TraitPredicate<'tcx> { - type T = crate::ty::TraitPredicate; +impl<'tcx> Stable<'tcx> for ty::TraitClause<'tcx> { + type T = crate::ty::TraitClause; fn stable<'cx>( &self, tables: &mut Tables<'cx, BridgeTys>, cx: &CompilerCtxt<'cx, BridgeTys>, ) -> Self::T { - let ty::TraitPredicate { trait_ref, polarity } = self; - crate::ty::TraitPredicate { + let ty::TraitClause { trait_ref, polarity } = self; + crate::ty::TraitClause { trait_ref: trait_ref.stable(tables, cx), polarity: polarity.stable(tables, cx), } @@ -872,16 +872,16 @@ where } } -impl<'tcx> Stable<'tcx> for ty::ProjectionPredicate<'tcx> { - type T = crate::ty::ProjectionPredicate; +impl<'tcx> Stable<'tcx> for ty::ProjectionClause<'tcx> { + type T = crate::ty::ProjectionClause; fn stable<'cx>( &self, tables: &mut Tables<'cx, BridgeTys>, cx: &CompilerCtxt<'cx, BridgeTys>, ) -> Self::T { - let ty::ProjectionPredicate { projection_term, term } = self; - crate::ty::ProjectionPredicate { + let ty::ProjectionClause { projection_term, term } = self; + crate::ty::ProjectionClause { projection_term: projection_term.stable(tables, cx), term: term.kind().stable(tables, cx), } @@ -901,14 +901,14 @@ impl<'tcx> Stable<'tcx> for ty::ImplPolarity { } } -impl<'tcx> Stable<'tcx> for ty::PredicatePolarity { - type T = crate::ty::PredicatePolarity; +impl<'tcx> Stable<'tcx> for ty::ClausePolarity { + type T = crate::ty::ClausePolarity; fn stable(&self, _: &mut Tables<'_, BridgeTys>, _: &CompilerCtxt<'_, BridgeTys>) -> Self::T { - use rustc_middle::ty::PredicatePolarity::*; + use rustc_middle::ty::ClausePolarity::*; match self { - Positive => crate::ty::PredicatePolarity::Positive, - Negative => crate::ty::PredicatePolarity::Negative, + Positive => crate::ty::ClausePolarity::Positive, + Negative => crate::ty::ClausePolarity::Negative, } } } diff --git a/compiler/rustc_query_impl/src/dep_kind_vtables.rs b/compiler/rustc_query_impl/src/dep_kind_vtables.rs index 495524c3f142a..e44f16441634b 100644 --- a/compiler/rustc_query_impl/src/dep_kind_vtables.rs +++ b/compiler/rustc_query_impl/src/dep_kind_vtables.rs @@ -180,7 +180,7 @@ macro_rules! define_dep_kind_vtables { } // Create an array of vtables, one for each dep kind (non-query and query). -pub fn make_dep_kind_vtables<'tcx>(arena: &'tcx Arena<'tcx>) -> &'tcx [DepKindVTable<'tcx>] { +pub(crate) fn make_dep_kind_vtables<'tcx>(arena: &'tcx Arena<'tcx>) -> &'tcx [DepKindVTable<'tcx>] { let (nq_vtables, q_vtables) = rustc_middle::queries::rustc_with_all_queries! { define_dep_kind_vtables! }; diff --git a/compiler/rustc_query_impl/src/lib.rs b/compiler/rustc_query_impl/src/lib.rs index 259810b59c435..eed772cae580d 100644 --- a/compiler/rustc_query_impl/src/lib.rs +++ b/compiler/rustc_query_impl/src/lib.rs @@ -7,11 +7,11 @@ // tidy-alphabetical-end use rustc_data_structures::sync::{AtomicU64, Lock}; +use rustc_middle::arena::Arena; use rustc_middle::queries::{ExternProviders, Providers}; use rustc_middle::query::QuerySystem; use rustc_middle::query::on_disk_cache::OnDiskCache; -pub use crate::dep_kind_vtables::make_dep_kind_vtables; pub use crate::job::{ CollectActiveJobsKind, QueryJobMap, break_query_cycle, collect_active_query_jobs, print_query_stack, @@ -27,6 +27,7 @@ mod query_vtables; mod self_profile; pub fn query_system<'tcx>( + arena: &'tcx Arena<'tcx>, local_providers: Providers, extern_providers: ExternProviders, on_disk_cache: Option, @@ -34,8 +35,10 @@ pub fn query_system<'tcx>( ) -> QuerySystem<'tcx> { QuerySystem { arenas: Default::default(), + dep_kind_vtables: dep_kind_vtables::make_dep_kind_vtables(arena), query_vtables: query_vtables::make_query_vtables(incremental), side_effects: Default::default(), + used_features: Default::default(), on_disk_cache, local_providers, extern_providers, diff --git a/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/transform.rs b/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/transform.rs index 1d4accd8ad3b6..8a44589f5052c 100644 --- a/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/transform.rs +++ b/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/transform.rs @@ -262,7 +262,7 @@ fn trait_object_ty<'tcx>(tcx: TyCtxt<'tcx>, poly_trait_ref: ty::PolyTraitRef<'tc ty::ExistentialPredicate::Projection( ty::ExistentialProjection::erase_self_ty( tcx, - ty::ProjectionPredicate { projection_term, term }, + ty::ProjectionClause { projection_term, term }, ), ) }) diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index 40679f12e5ef8..99ff5d4b691ae 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -412,11 +412,6 @@ pub struct Session { /// optimization-pass execution candidate during this compilation. pub mir_opt_bisect_eval_count: AtomicUsize, - /// Enabled features that are used in the current compilation. - /// - /// The value is the `DepNodeIndex` of the node encodes the used feature. - pub used_features: Lock>, - /// Whether the test harness removed a user-written `#[rustc_main]` attribute /// while generating the synthetic test entry point. pub removed_rustc_main_attr: AtomicBool, @@ -1388,7 +1383,6 @@ pub fn build_session( 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(), removed_rustc_main_attr: AtomicBool::new(false), pointer_auth_config, }; diff --git a/compiler/rustc_target/src/callconv/arm.rs b/compiler/rustc_target/src/callconv/arm.rs index 41c3a0a0210fb..66f0ded3874f9 100644 --- a/compiler/rustc_target/src/callconv/arm.rs +++ b/compiler/rustc_target/src/callconv/arm.rs @@ -1,7 +1,14 @@ use rustc_abi::{ArmCall, CanonAbi, HasDataLayout, TyAbiInterface}; use crate::callconv::{ArgAbi, FnAbi, Reg, RegKind, Uniform}; -use crate::spec::HasTargetSpec; +use crate::spec::{CfgAbi, HasTargetSpec, Os}; + +#[derive(Clone, Copy)] +enum ArmAbiKind { + Aapcs, + AapcsVfp, + Aapcs16Vfp, +} fn is_homogeneous_aggregate<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>) -> Option where @@ -26,7 +33,7 @@ where }) } -fn classify_ret<'a, Ty, C>(cx: &C, ret: &mut ArgAbi<'a, Ty>, vfp: bool) +fn classify_ret<'a, Ty, C>(cx: &C, ret: &mut ArgAbi<'a, Ty>, abi_kind: ArmAbiKind, vfp: bool) where Ty: TyAbiInterface<'a, C> + Copy, C: HasDataLayout, @@ -49,14 +56,21 @@ where let size = ret.layout.size; let bits = size.bits(); + if bits <= 32 { + // Aggregates <= 4 bytes are returned in r0; other aggregates are returned indirectly. ret.cast_to(Uniform::new(Reg::i32(), size)); return; + } else if matches!(abi_kind, ArmAbiKind::Aapcs16Vfp) && bits <= 128 { + // watchOS returns the remaining aggregates of up to 128 bits in GPRs. + ret.cast_to(Uniform::consecutive(Reg::i32(), size)); + return; } + ret.make_indirect(); } -fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>, vfp: bool) +fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>, abi_kind: ArmAbiKind, vfp: bool) where Ty: TyAbiInterface<'a, C> + Copy, C: HasDataLayout, @@ -74,14 +88,27 @@ where return; } - if vfp { + // watchOS also passes homogeneous aggregates in VFP registers, and unlike `AapcsVfp` it does + // so even for variadics and for `extern "aapcs"`: the backend will use GPRs if needed. + if vfp || matches!(abi_kind, ArmAbiKind::Aapcs16Vfp) { if let Some(uniform) = is_homogeneous_aggregate(cx, arg) { arg.cast_to(uniform); return; } } - let align = arg.layout.align.bytes(); + // For the composites that are left, watchOS adopts the 64-bit AAPCS rule: those larger than + // 128 bits are placed in space allocated by the caller, and a pointer is passed. + if matches!(abi_kind, ArmAbiKind::Aapcs16Vfp) && arg.layout.size.bits() > 128 { + arg.make_indirect(); + return; + } + + let align = match abi_kind { + ArmAbiKind::Aapcs | ArmAbiKind::AapcsVfp => arg.layout.unadjusted_abi_align.bytes(), + ArmAbiKind::Aapcs16Vfp => arg.layout.align.bytes(), + }; + let total = arg.layout.size; arg.cast_to(Uniform::consecutive(if align <= 4 { Reg::i32() } else { Reg::i64() }, total)); } @@ -91,20 +118,37 @@ where Ty: TyAbiInterface<'a, C> + Copy, C: HasDataLayout + HasTargetSpec, { - // If this is a target with a hard-float ABI, and the function is not explicitly - // `extern "aapcs"`, then we must use the VFP registers for homogeneous aggregates. - let vfp = cx.target_spec().llvm_target.ends_with("hf") - && fn_abi.conv != CanonAbi::Arm(ArmCall::Aapcs) - && !fn_abi.c_variadic; + let abi_kind = if cx.target_spec().os == Os::WatchOs { + ArmAbiKind::Aapcs16Vfp + } else if cx.target_spec().cfg_abi == CfgAbi::EabiHf { + ArmAbiKind::AapcsVfp + } else { + ArmAbiKind::Aapcs + }; + + // Whether we must use the VFP registers for homogeneous aggregates. + let is_effectively_vfp = |accept_aapcs16| { + // When the user requested aapcs explicitly, honor that. + if matches!(fn_abi.conv, CanonAbi::Arm(ArmCall::Aapcs)) { + return false; + } + + match abi_kind { + ArmAbiKind::AapcsVfp => true, + ArmAbiKind::Aapcs16Vfp => accept_aapcs16, + ArmAbiKind::Aapcs => false, + } + }; if !fn_abi.ret.is_ignore() { - classify_ret(cx, &mut fn_abi.ret, vfp); + classify_ret(cx, &mut fn_abi.ret, abi_kind, !fn_abi.c_variadic && is_effectively_vfp(true)); } + let is_arg_vfp = !fn_abi.c_variadic && is_effectively_vfp(false); for arg in fn_abi.args.iter_mut() { if arg.is_ignore() { continue; } - classify_arg(cx, arg, vfp); + classify_arg(cx, arg, abi_kind, is_arg_vfp); } } diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index b3865eeaf6bf8..ff6cade232523 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -2651,8 +2651,8 @@ pub struct TargetOptions { /// Use LLVM intrinsic for mcount function name pub llvm_mcount_intrinsic: Option>, - /// LLVM ABI name, corresponds to the '-mabi' parameter available in multilib C compilers - /// and the `-target-abi` flag in llc. In the LLVM API this is `MCOptions.ABIName`. + /// LLVM ABI name, corresponds to the '-mabi' parameter available in multilib C compilers and + /// the `-target-abi` flag in llc. In the LLVM API this is `MCTargetOptions::ABIName`. pub llvm_abiname: LlvmAbi, /// Control the float ABI to use, for architectures that support it. The only architecture we diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/note_and_explain.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/note_and_explain.rs index c28970829f0a4..45ae86b39f35e 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/infer/note_and_explain.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/infer/note_and_explain.rs @@ -386,8 +386,7 @@ impl Trait for X { .iter() .any(|(pred, _span)| match pred.kind().skip_binder() { ty::ClauseKind::Trait(trait_predicate) - if trait_predicate.polarity - == ty::PredicatePolarity::Positive => + if trait_predicate.polarity == ty::ClausePolarity::Positive => { trait_predicate.def_id() == def_id } @@ -524,7 +523,7 @@ impl Trait for X { else { continue; }; - if trait_predicate.polarity != ty::PredicatePolarity::Positive { + if trait_predicate.polarity != ty::ClausePolarity::Positive { continue; } let def_id = trait_predicate.def_id(); diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/ambiguity.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/ambiguity.rs index 06d882a309489..2e0fc64c5445f 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/ambiguity.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/ambiguity.rs @@ -11,7 +11,7 @@ use rustc_infer::traits::util::elaborate; use rustc_infer::traits::{ Obligation, ObligationCause, ObligationCauseCode, PolyTraitObligation, PredicateObligation, }; -use rustc_middle::ty::print::PrintPolyTraitPredicateExt; +use rustc_middle::ty::print::PrintPolyTraitClauseExt; use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitable as _, TypeVisitableExt as _, Unnormalized}; use rustc_session::diagnostics::feature_err_unstable_feature_bound; use rustc_span::{DUMMY_SP, ErrorGuaranteed, Span}; @@ -67,8 +67,8 @@ pub fn compute_applicable_impls_for_diagnostics<'tcx>( let impl_polarity = impl_trait_header.polarity; match (impl_polarity, predicate_polarity) { - (ty::ImplPolarity::Positive, ty::PredicatePolarity::Positive) - | (ty::ImplPolarity::Negative, ty::PredicatePolarity::Negative) => {} + (ty::ImplPolarity::Positive, ty::ClausePolarity::Positive) + | (ty::ImplPolarity::Negative, ty::ClausePolarity::Negative) => {} _ => return false, } @@ -99,7 +99,7 @@ pub fn compute_applicable_impls_for_diagnostics<'tcx>( }) }; - let param_env_candidate_may_apply = |poly_trait_predicate: ty::PolyTraitPredicate<'tcx>| { + let param_env_candidate_may_apply = |poly_trait_predicate: ty::PolyTraitClause<'tcx>| { let ocx = ObligationCtxt::new(infcx); infcx.enter_forall(obligation.predicate, |placeholder_obligation| { let obligation_trait_ref = ocx.normalize( @@ -791,7 +791,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { fn applicable_impls_to_mention( &self, obligation: &PredicateObligation<'tcx>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) -> Option> { let mut ambiguities = compute_applicable_impls_for_diagnostics( self.infcx, diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs index 6293c85f595d8..082c312c7c75e 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs @@ -26,7 +26,7 @@ use rustc_middle::traits::select::OverflowError; use rustc_middle::ty::abstract_const::NotConstEvaluatable; use rustc_middle::ty::error::{ExpectedFound, TypeError}; use rustc_middle::ty::print::{ - PrintPolyTraitPredicateExt, PrintPolyTraitRefExt as _, PrintTraitPredicateExt as _, + PrintPolyTraitClauseExt, PrintPolyTraitRefExt as _, PrintTraitClauseExt as _, PrintTraitRefExt as _, with_forced_trimmed_paths, }; use rustc_middle::ty::{ @@ -865,9 +865,9 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { // FIXME(const_trait_impl): We should recompute the clause with `[const]` // if it's `const`, and if it holds, explain that this bound only // *conditionally* holds. - let trait_ref = clause.map_bound(|clause| ty::TraitPredicate { + let trait_ref = clause.map_bound(|clause| ty::TraitClause { trait_ref: clause.trait_ref, - polarity: ty::PredicatePolarity::Positive, + polarity: ty::ClausePolarity::Positive, }); let mut file = None; @@ -980,7 +980,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { fn emit_specialized_closure_kind_error( &self, obligation: &PredicateObligation<'tcx>, - mut trait_pred: ty::PolyTraitPredicate<'tcx>, + mut trait_pred: ty::PolyTraitClause<'tcx>, ) -> Option { // If we end up on an `AsyncFnKindHelper` goal, try to unwrap the parent // `AsyncFn*` goal. @@ -1097,7 +1097,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { fn detect_negative_literal( &self, obligation: &PredicateObligation<'tcx>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, err: &mut Diag<'_>, ) -> bool { if let ObligationCauseCode::UnOp { hir_id, .. } = obligation.cause.code() @@ -1132,7 +1132,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { fn try_conversion_context( &self, obligation: &PredicateObligation<'tcx>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, err: &mut Diag<'_>, ) -> (bool, bool) { let span = obligation.cause.span; @@ -1343,7 +1343,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { err: &mut Diag<'_>, self_ty: Ty<'_>, found_ty: Option>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) -> bool { match (self_ty.kind(), found_ty) { (ty::Adt(def, _), Some(ty)) @@ -1492,8 +1492,8 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { fn can_match_trait( &self, param_env: ty::ParamEnv<'tcx>, - goal: ty::TraitPredicate<'tcx>, - assumption: ty::PolyTraitPredicate<'tcx>, + goal: ty::TraitClause<'tcx>, + assumption: ty::PolyTraitClause<'tcx>, ) -> bool { // Fast path if goal.polarity != assumption.polarity() { @@ -1537,8 +1537,8 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { fn can_match_projection( &self, param_env: ty::ParamEnv<'tcx>, - goal: ty::ProjectionPredicate<'tcx>, - assumption: ty::PolyProjectionPredicate<'tcx>, + goal: ty::ProjectionClause<'tcx>, + assumption: ty::PolyProjectionClause<'tcx>, ) -> bool { let assumption = self.instantiate_binder_with_fresh_vars( DUMMY_SP, @@ -1612,9 +1612,9 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { if !error.projection_term.kind.is_trait_projection() { return false; } - let trait_pred = ty::TraitPredicate { + let trait_pred = ty::TraitClause { trait_ref: error.projection_term.trait_ref(self.tcx), - polarity: ty::PredicatePolarity::Positive, + polarity: ty::ClausePolarity::Positive, }; // Elaborating is what pairs a failing `C: FnMut(..)` with the // `>::Output` projection resting on it. A supertrait can hold @@ -2087,7 +2087,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { pub(super) fn find_similar_impl_candidates( &self, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) -> Vec> { let mut candidates: Vec<_> = self .tcx @@ -2119,7 +2119,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, impl_candidates: &[ImplCandidate<'tcx>], obligation: &PredicateObligation<'tcx>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, body_def_id: LocalDefId, err: &mut Diag<'_>, other: bool, @@ -2704,7 +2704,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { fn report_similar_impl_candidates_for_root_obligation( &self, obligation: &PredicateObligation<'tcx>, - trait_predicate: ty::Binder<'tcx, ty::TraitPredicate<'tcx>>, + trait_predicate: ty::Binder<'tcx, ty::TraitClause<'tcx>>, body_def_id: LocalDefId, err: &mut Diag<'_>, ) { @@ -2772,7 +2772,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { fn check_same_trait_different_version( &self, err: &mut Diag<'_>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) -> bool { let get_trait_impls = |trait_def_id| { let mut trait_impls = vec![]; @@ -2809,11 +2809,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { err.span_note(sp, crate_msg); } - fn note_adt_version_mismatch( - &self, - err: &mut Diag<'_>, - trait_pred: ty::PolyTraitPredicate<'tcx>, - ) { + fn note_adt_version_mismatch(&self, err: &mut Diag<'_>, trait_pred: ty::PolyTraitClause<'tcx>) { let ty::Adt(impl_self_def, _) = trait_pred.self_ty().skip_binder().peel_refs().kind() else { return; @@ -2875,7 +2871,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, err: &mut Diag<'_>, obligation: &PredicateObligation<'tcx>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) -> bool { let mut suggested = false; let trait_def_id = trait_pred.def_id(); @@ -2912,7 +2908,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { self.tcx, obligation.cause.clone(), obligation.param_env, - trait_pred.map_bound(|tr| ty::TraitPredicate { + trait_pred.map_bound(|tr| ty::TraitClause { trait_ref: ty::TraitRef::new(self.tcx, def_id, tr.trait_ref.args), ..tr }), @@ -2937,7 +2933,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, err: &mut Diag<'_>, obligation: &PredicateObligation<'tcx>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) -> bool { if self.check_same_trait_different_version(err, trait_pred) { return true; @@ -2958,7 +2954,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { pub(super) fn mk_trait_obligation_with_new_self_ty( &self, param_env: ty::ParamEnv<'tcx>, - trait_ref_and_ty: ty::Binder<'tcx, (ty::TraitPredicate<'tcx>, Ty<'tcx>)>, + trait_ref_and_ty: ty::Binder<'tcx, (ty::TraitClause<'tcx>, Ty<'tcx>)>, ) -> PredicateObligation<'tcx> { let trait_pred = trait_ref_and_ty .map_bound(|(tr, new_self_ty)| tr.with_replaced_self_ty(self.tcx, new_self_ty)); @@ -3089,7 +3085,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { fn get_standard_error_message( &self, - trait_predicate: ty::PolyTraitPredicate<'tcx>, + trait_predicate: ty::PolyTraitClause<'tcx>, predicate_constness: Option, post_message: String, long_ty_path: &mut Option, @@ -3106,9 +3102,9 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { fn select_transmute_obligation_for_reporting( &self, obligation: &PredicateObligation<'tcx>, - trait_predicate: ty::PolyTraitPredicate<'tcx>, + trait_predicate: ty::PolyTraitClause<'tcx>, root_obligation: &PredicateObligation<'tcx>, - ) -> (PredicateObligation<'tcx>, ty::PolyTraitPredicate<'tcx>) { + ) -> (PredicateObligation<'tcx>, ty::PolyTraitClause<'tcx>) { if obligation.predicate.has_non_region_param() || obligation.has_non_region_infer() { return (obligation.clone(), trait_predicate); } @@ -3153,7 +3149,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { fn get_safe_transmute_error_and_reason( &self, obligation: PredicateObligation<'tcx>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, span: Span, ) -> GetSafeTransmuteErrorAndReason { use rustc_transmute::Answer; @@ -3338,7 +3334,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { self.tcx, ObligationCause::dummy(), param_env, - ty::TraitPredicate { trait_ref, polarity: ty::PredicatePolarity::Positive }, + ty::TraitClause { trait_ref, polarity: ty::ClausePolarity::Positive }, ); self.predicate_must_hold_modulo_regions(&obligation) @@ -3368,7 +3364,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, root_obligation: &PredicateObligation<'tcx>, obligation: &PredicateObligation<'tcx>, - trait_predicate: ty::PolyTraitPredicate<'tcx>, + trait_predicate: ty::PolyTraitClause<'tcx>, err: &mut Diag<'_>, span: Span, is_fn_trait: bool, @@ -3411,13 +3407,13 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { && self.tcx.trait_impls_of(trait_def_id).is_empty() && !self.tcx.trait_is_auto(trait_def_id) && !self.tcx.trait_is_alias(trait_def_id) - && trait_predicate.polarity() == ty::PredicatePolarity::Positive + && trait_predicate.polarity() == ty::ClausePolarity::Positive { err.span_help( self.tcx.def_span(trait_def_id), msg!("this trait has no implementations, consider adding one"), ); - } else if !suggested && trait_predicate.polarity() == ty::PredicatePolarity::Positive { + } else if !suggested && trait_predicate.polarity() == ty::ClausePolarity::Positive { // Can't show anything else useful, try to find similar impls. let impl_candidates = self.find_similar_impl_candidates(trait_predicate); if !self.report_similar_impl_candidates( @@ -3452,7 +3448,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { fn add_help_message_for_fn_trait( &self, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, err: &mut Diag<'_>, implemented_kind: ty::ClosureKind, params: ty::Binder<'tcx, Ty<'tcx>>, @@ -3884,7 +3880,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, param_env: ty::ParamEnv<'tcx>, ty: ty::Binder<'tcx, Ty<'tcx>>, - polarity: ty::PredicatePolarity, + polarity: ty::ClausePolarity, ) -> Result<(ty::ClosureKind, ty::Binder<'tcx, Ty<'tcx>>), ()> { self.commit_if_ok(|_| { for trait_def_id in [ @@ -3902,7 +3898,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { self.tcx, ObligationCause::dummy(), param_env, - ty.rebind(ty::TraitPredicate { trait_ref, polarity }), + ty.rebind(ty::TraitClause { trait_ref, polarity }), ); let ocx = ObligationCtxt::new(self); ocx.register_obligation(obligation); diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/on_unimplemented.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/on_unimplemented.rs index f7e4ec6164c99..ed22d4f4ef246 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/on_unimplemented.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/on_unimplemented.rs @@ -33,11 +33,11 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> { pub fn on_unimplemented_note( &self, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, obligation: &PredicateObligation<'tcx>, long_ty_path: &mut Option, ) -> CustomDiagnostic { - if trait_pred.polarity() != ty::PredicatePolarity::Positive { + if trait_pred.polarity() != ty::ClausePolarity::Positive { return CustomDiagnostic::default(); } // This is needed as `on_unimplemented` is currently not allowed on trait aliases, @@ -59,7 +59,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> { pub(crate) fn on_unimplemented_components( &self, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, obligation: &PredicateObligation<'tcx>, long_ty_path: &mut Option, print_infer_ty_var: bool, diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs index 35bedea6c565e..01b3026ff4e5b 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs @@ -27,7 +27,7 @@ use rustc_middle::traits::IsConstable; use rustc_middle::ty::adjustment::{Adjust, DerefAdjustKind}; use rustc_middle::ty::error::TypeError; use rustc_middle::ty::print::{ - PrintPolyTraitPredicateExt as _, PrintPolyTraitRefExt, PrintTraitPredicateExt as _, + PrintPolyTraitClauseExt as _, PrintPolyTraitRefExt, PrintTraitClauseExt as _, PrintTraitRefExt as _, with_forced_trimmed_paths, with_no_trimmed_paths, with_types_for_suggestion, }; @@ -128,7 +128,7 @@ pub fn suggest_restriction<'tcx, G: EmissionGuarantee>( err: &mut Diag<'_, G>, fn_sig: Option<&hir::FnSig<'_>>, projection: Option>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, // When we are dealing with a trait, `super_traits` will be `Some`: // Given `trait T: A + B + C {}` // - ^^^^^^^^^ GenericBounds @@ -464,11 +464,11 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { pub fn suggest_restricting_param_bound( &self, err: &mut Diag<'_>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, associated_ty: Option<(&'static str, Ty<'tcx>)>, mut body_def_id: LocalDefId, ) { - if trait_pred.skip_binder().polarity != ty::PredicatePolarity::Positive { + if trait_pred.skip_binder().polarity != ty::ClausePolarity::Positive { return; } @@ -703,7 +703,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, obligation: &PredicateObligation<'tcx>, err: &mut Diag<'_>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) -> bool { let mut code = obligation.cause.code(); if let ObligationCauseCode::FunctionArg { arg_hir_id, call_hir_id, .. } = code @@ -853,7 +853,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { // one at a time to account for cases such as &Box == &&T let trait_pred_and_ty = trait_pred.map_bound(|inner| { ( - ty::TraitPredicate { + ty::TraitClause { trait_ref: ty::TraitRef::new_from_args( self.tcx, inner.trait_ref.def_id, @@ -1007,7 +1007,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, obligation: &PredicateObligation<'tcx>, err: &mut Diag<'_>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) -> bool { // It doesn't make sense to make this suggestion outside of typeck... // (also autoderef will ICE...) @@ -1213,8 +1213,8 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, obligation: &PredicateObligation<'tcx>, err: &mut Diag<'_>, - leaf_trait_predicate: ty::PolyTraitPredicate<'tcx>, - main_trait_predicate: ty::PolyTraitPredicate<'tcx>, + leaf_trait_predicate: ty::PolyTraitClause<'tcx>, + main_trait_predicate: ty::PolyTraitClause<'tcx>, span: Span, ) -> bool { let &[candidate] = &self.find_similar_impl_candidates(leaf_trait_predicate)[..] else { @@ -1269,7 +1269,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, obligation: &PredicateObligation<'tcx>, err: &mut Diag<'_>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) { let mut span = obligation.cause.span; while span.from_expansion() { @@ -1352,7 +1352,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, obligation: &PredicateObligation<'tcx>, err: &mut Diag<'_>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) -> bool { let self_ty = self.resolve_vars_if_possible(trait_pred.self_ty()); self.enter_forall(self_ty, |ty: Ty<'_>| { @@ -1630,7 +1630,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, obligation: &PredicateObligation<'tcx>, err: &mut Diag<'_>, - poly_trait_pred: ty::PolyTraitPredicate<'tcx>, + poly_trait_pred: ty::PolyTraitClause<'tcx>, has_custom_message: bool, ) -> bool { let span = obligation.cause.span; @@ -1862,7 +1862,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { } // Try to apply the original trait bound by borrowing. - let mut try_borrowing = |old_pred: ty::PolyTraitPredicate<'tcx>, + let mut try_borrowing = |old_pred: ty::PolyTraitClause<'tcx>, blacklist: &[DefId]| -> bool { if blacklist.contains(&old_pred.def_id()) { @@ -2192,7 +2192,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, obligation: &PredicateObligation<'tcx>, err: &mut Diag<'_>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) -> bool { let mut span = obligation.cause.span; let mut trait_pred = trait_pred; @@ -2457,7 +2457,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, obligation: &PredicateObligation<'tcx>, err: &mut Diag<'_>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) { let points_at_arg = matches!(obligation.cause.code(), ObligationCauseCode::FunctionArg { .. },); @@ -2534,7 +2534,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { obligation: &PredicateObligation<'tcx>, err: &mut Diag<'_>, span: Span, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) -> bool { let node = self.tcx.hir_node_by_def_id(obligation.cause.body_def_id); if let hir::Node::Item(hir::Item { kind: hir::ItemKind::Fn {sig, body: body_id, .. }, .. }) = node @@ -2641,7 +2641,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, err: &mut Diag<'_>, obligation: &PredicateObligation<'tcx>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) -> bool { let ObligationCauseCode::SizedReturnType = obligation.cause.code() else { return false; @@ -3353,7 +3353,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { interior_or_upvar_span: CoroutineInteriorOrUpvar, is_async: bool, outer_coroutine: Option, - trait_pred: ty::TraitPredicate<'tcx>, + trait_pred: ty::TraitClause<'tcx>, target_ty: Ty<'tcx>, obligation: &PredicateObligation<'tcx>, next_code: Option<&ObligationCauseCode<'tcx>>, @@ -4668,7 +4668,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, err: &mut Diag<'_>, obligation: &PredicateObligation<'tcx>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, span: Span, ) { let future_trait = self.tcx.require_lang_item(LangItem::Future, span); @@ -4739,7 +4739,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, obligation: &PredicateObligation<'tcx>, err: &mut Diag<'_>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) { let rhs_span = match obligation.cause.code() { ObligationCauseCode::BinOp { rhs_span, rhs_is_lit, .. } if *rhs_is_lit => rhs_span, @@ -4761,9 +4761,9 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { pub fn can_suggest_derive( &self, obligation: &PredicateObligation<'tcx>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) -> bool { - if trait_pred.polarity() == ty::PredicatePolarity::Negative { + if trait_pred.polarity() == ty::ClausePolarity::Negative { return false; } let Some(diagnostic_name) = self.tcx.get_diagnostic_name(trait_pred.def_id()) else { @@ -4793,7 +4793,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { } _ => None, }; - let trait_pred = trait_pred.map_bound_ref(|tr| ty::TraitPredicate { + let trait_pred = trait_pred.map_bound_ref(|tr| ty::TraitClause { trait_ref: ty::TraitRef::new(self.tcx, trait_pred.def_id(), [field_ty].into_iter().chain(trait_args), @@ -4814,7 +4814,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, obligation: &PredicateObligation<'tcx>, err: &mut Diag<'_>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) { let Some(diagnostic_name) = self.tcx.get_diagnostic_name(trait_pred.def_id()) else { return; @@ -4842,7 +4842,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, obligation: &PredicateObligation<'tcx>, err: &mut Diag<'_>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) { if let ObligationCauseCode::ImplDerived(_) = obligation.cause.code() && self @@ -5121,7 +5121,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { // Given the predicate `fn(&T): FnOnce<(U,)>`, extract `fn(&T)` and `(U,)`, // then suggest `Option::as_deref(_mut)` if `U` can deref to `T` - if let ty::PredicateKind::Clause(ty::ClauseKind::Trait(ty::TraitPredicate { trait_ref, .. })) + if let ty::PredicateKind::Clause(ty::ClauseKind::Trait(ty::TraitClause { trait_ref, .. })) = failed_pred.kind().skip_binder() && tcx.is_fn_trait(trait_ref.def_id) && let [self_ty, found_ty] = trait_ref.args.as_slice() @@ -5293,13 +5293,13 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { let node = tcx.hir_node_by_def_id(tcx.hir_get_parent_item(expr.hir_id).def_id); - let pred = ty::Binder::dummy(ty::TraitPredicate { + let pred = ty::Binder::dummy(ty::TraitClause { trait_ref: ty::TraitRef::new( tcx, tcx.require_lang_item(LangItem::Clone, span), [*ty], ), - polarity: ty::PredicatePolarity::Positive, + polarity: ty::ClausePolarity::Positive, }); let Some(generics) = node.generics() else { continue; @@ -5529,7 +5529,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { let ty = self.infcx.next_ty_var(span); // This corresponds to `::Item = _`. let projection = ty::Binder::dummy(ty::PredicateKind::Clause( - ty::ClauseKind::Projection(ty::ProjectionPredicate { + ty::ClauseKind::Projection(ty::ProjectionClause { projection_term: ty::AliasTerm::new_from_args(self.tcx, kind.into(), args), term: ty.into(), }), @@ -5671,7 +5671,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, err: &mut Diag<'_>, obligation: &PredicateObligation<'tcx>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, candidate_impls: &[ImplCandidate<'tcx>], span: Span, ) { @@ -5783,7 +5783,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, err: &mut Diag<'_>, obligation: &PredicateObligation<'tcx>, - trait_predicate: ty::PolyTraitPredicate<'tcx>, + trait_predicate: ty::PolyTraitClause<'tcx>, ) { let ObligationCauseCode::FunctionArg { call_hir_id, .. } = obligation.cause.code() else { return; @@ -5855,7 +5855,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { pub(super) fn explain_hrtb_projection( &self, diag: &mut Diag<'_>, - pred: ty::PolyTraitPredicate<'tcx>, + pred: ty::PolyTraitClause<'tcx>, param_env: ty::ParamEnv<'tcx>, cause: &ObligationCause<'tcx>, ) { @@ -5925,7 +5925,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { pub(super) fn suggest_desugaring_async_fn_in_trait( &self, err: &mut Diag<'_>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) { // Don't suggest if RTN is active -- we should prefer a where-clause bound instead. if self.tcx.features().return_type_notation() { @@ -6081,7 +6081,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { &self, obligation: &PredicateObligation<'tcx>, err: &mut Diag<'_>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) { if ObligationCauseCode::QuestionMark != *obligation.cause.code().peel_derives() { return; @@ -6556,7 +6556,7 @@ impl<'a, 'hir> hir::intravisit::Visitor<'hir> for ReplaceImplTraitVisitor<'a> { pub(super) fn get_explanation_based_on_obligation<'tcx>( tcx: TyCtxt<'tcx>, obligation: &PredicateObligation<'tcx>, - trait_predicate: ty::PolyTraitPredicate<'tcx>, + trait_predicate: ty::PolyTraitClause<'tcx>, pre_message: String, long_ty_path: &mut Option, ) -> String { @@ -6573,7 +6573,7 @@ pub(super) fn get_explanation_based_on_obligation<'tcx>( Some(desc) => format!(" {desc}"), None => String::new(), }; - if let ty::PredicatePolarity::Positive = trait_predicate.polarity() { + if let ty::ClausePolarity::Positive = trait_predicate.polarity() { // If the trait in question is unstable, mention that fact in the diagnostic. // But if we're building with `-Zforce-unstable-if-unmarked` then _any_ trait // not explicitly marked stable is considered unstable, so the extra text is diff --git a/compiler/rustc_trait_selection/src/solve/delegate.rs b/compiler/rustc_trait_selection/src/solve/delegate.rs index d93e3fdf853fc..5e3c03ba7e7ba 100644 --- a/compiler/rustc_trait_selection/src/solve/delegate.rs +++ b/compiler/rustc_trait_selection/src/solve/delegate.rs @@ -166,7 +166,7 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate< && self.known_no_opaque_types_in_storage() { goal_stalled_on_args_or_nonempty_opaques(thin_vec![TyOrConstInferVar::Ty(vid)]) - } else if trait_pred.polarity() == ty::PredicatePolarity::Positive { + } else if trait_pred.polarity() == ty::ClausePolarity::Positive { match self.0.tcx.as_lang_item(trait_pred.def_id()) { Some(LangItem::Sized) | Some(LangItem::MetaSized) => { let predicate = self.resolve_vars_if_possible(goal.predicate); diff --git a/compiler/rustc_trait_selection/src/solve/fulfill/derive_errors.rs b/compiler/rustc_trait_selection/src/solve/fulfill/derive_errors.rs index bb75ae6247e38..27be427d28102 100644 --- a/compiler/rustc_trait_selection/src/solve/fulfill/derive_errors.rs +++ b/compiler/rustc_trait_selection/src/solve/fulfill/derive_errors.rs @@ -302,7 +302,7 @@ impl<'tcx> BestObligation<'tcx> { if let ty::Alias(_, alias) = *self_ty.kind() { let infer_term = goal.infcx().next_ty_var(self.obligation.cause.span); let pred = - ty::ProjectionPredicate { projection_term: alias.into(), term: infer_term.into() }; + ty::ProjectionClause { projection_term: alias.into(), term: infer_term.into() }; let obligation = Obligation::new(tcx, self.obligation.cause.clone(), goal.goal().param_env, pred); self.with_derived_obligation(obligation, |this| { @@ -459,9 +459,9 @@ impl<'tcx> ProofTreeVisitor<'tcx> for BestObligation<'tcx> { ty::PredicateKind::Clause(ty::ClauseKind::Projection(projection)) if projection.projection_term.kind.is_trait_projection() => { - ChildMode::Trait(pred.kind().rebind(ty::TraitPredicate { + ChildMode::Trait(pred.kind().rebind(ty::TraitClause { trait_ref: projection.projection_term.trait_ref(tcx), - polarity: ty::PredicatePolarity::Positive, + polarity: ty::ClausePolarity::Positive, })) } ty::PredicateKind::Clause(ty::ClauseKind::WellFormed(term)) => { @@ -552,7 +552,7 @@ enum ChildMode<'tcx> { // Try to derive an `ObligationCause::{ImplDerived,BuiltinDerived}`, // and skip all `GoalSource::Misc`, which represent useless obligations // such as alias-eq which may not hold. - Trait(ty::PolyTraitPredicate<'tcx>), + Trait(ty::PolyTraitClause<'tcx>), // Try to derive an `ObligationCause::{ImplDerived,BuiltinDerived}`, // and skip all `GoalSource::Misc`, which represent useless obligations // such as alias-eq which may not hold. @@ -568,7 +568,7 @@ fn derive_cause<'tcx>( candidate_kind: inspect::ProbeKind>, mut cause: ObligationCause<'tcx>, idx: usize, - parent_trait_pred: ty::PolyTraitPredicate<'tcx>, + parent_trait_pred: ty::PolyTraitClause<'tcx>, ) -> ObligationCause<'tcx> { match candidate_kind { inspect::ProbeKind::TraitCandidate { diff --git a/compiler/rustc_trait_selection/src/solve/normalize.rs b/compiler/rustc_trait_selection/src/solve/normalize.rs index 4e718ed896add..bff35154ed10d 100644 --- a/compiler/rustc_trait_selection/src/solve/normalize.rs +++ b/compiler/rustc_trait_selection/src/solve/normalize.rs @@ -53,7 +53,7 @@ where let mut folder = NormalizationFolder::new(infcx, universes.clone(), |alias_term| { let delegate = <&SolverDelegate<'tcx>>::from(infcx); let infer_term = delegate.next_term_var_of_alias_kind(alias_term, at.cause.span); - let predicate = ty::ProjectionPredicate { projection_term: alias_term, term: infer_term }; + let predicate = ty::ProjectionClause { projection_term: alias_term, term: infer_term }; let goal = Goal::new(infcx.tcx, at.param_env, predicate); let result = match delegate.evaluate_root_goal(goal, at.cause.span, None) { Ok(result) => result, @@ -98,7 +98,7 @@ impl<'me, 'tcx> ReplaceAliasWithInfer<'me, 'tcx> { infcx.tcx, self.at.cause.clone(), self.at.param_env, - ty::ProjectionPredicate { projection_term: alias_term, term: infer_term }, + ty::ProjectionClause { projection_term: alias_term, term: infer_term }, ); self.obligations.push(obligation); infer_term diff --git a/compiler/rustc_trait_selection/src/traits/auto_trait.rs b/compiler/rustc_trait_selection/src/traits/auto_trait.rs index 798bca8483b0a..240ad22c841ba 100644 --- a/compiler/rustc_trait_selection/src/traits/auto_trait.rs +++ b/compiler/rustc_trait_selection/src/traits/auto_trait.rs @@ -94,12 +94,12 @@ impl<'tcx> AutoTraitFinder<'tcx> { let (infcx, orig_env) = tcx.infer_ctxt().build_with_typing_env(typing_env); let mut selcx = SelectionContext::new(&infcx); - for polarity in [ty::PredicatePolarity::Positive, ty::PredicatePolarity::Negative] { + for polarity in [ty::ClausePolarity::Positive, ty::ClausePolarity::Negative] { let result = selcx.select(&Obligation::new( tcx, ObligationCause::dummy(), orig_env, - ty::TraitPredicate { trait_ref, polarity }, + ty::TraitClause { trait_ref, polarity }, )); if let Ok(Some(ImplSource::UserDefined(_))) = result { debug!("find_auto_trait_generics({trait_ref:?}): manual impl found, bailing out"); @@ -229,9 +229,9 @@ impl<'tcx> AutoTraitFinder<'tcx> { .map(|field| field.ty(tcx, args).skip_norm_wip()) .filter(|field_ty| field_ty.has_non_region_param()) .map(|field_ty| { - ty::TraitPredicate { + ty::TraitClause { trait_ref: ty::TraitRef::new(tcx, trait_did, [field_ty]), - polarity: ty::PredicatePolarity::Positive, + polarity: ty::ClausePolarity::Positive, } .upcast(tcx) }) @@ -318,11 +318,11 @@ impl<'tcx> AutoTraitFinder<'tcx> { let mut already_visited = UnordSet::new(); let mut predicates = VecDeque::new(); - predicates.push_back(ty::Binder::dummy(ty::TraitPredicate { + predicates.push_back(ty::Binder::dummy(ty::TraitClause { trait_ref: ty::TraitRef::new(infcx.tcx, trait_did, [ty]), // Auto traits are positive - polarity: ty::PredicatePolarity::Positive, + polarity: ty::ClausePolarity::Positive, })); let computed_clauses = param_env.caller_bounds().iter(); @@ -637,7 +637,7 @@ impl<'tcx> AutoTraitFinder<'tcx> { } } - fn is_self_referential_projection(&self, p: ty::PolyProjectionPredicate<'tcx>) -> bool { + fn is_self_referential_projection(&self, p: ty::PolyProjectionClause<'tcx>) -> bool { if let Some(ty) = p.term().skip_binder().as_type() { matches!(ty.kind(), ty::Alias(_, proj @ ty::AliasTy { kind: ty::Projection { .. }, .. }) if proj == &p.skip_binder().projection_term.expect_ty()) } else { @@ -651,7 +651,7 @@ impl<'tcx> AutoTraitFinder<'tcx> { nested: impl Iterator>, computed_clauses: &mut FxIndexSet>, fresh_preds: &mut FxIndexSet>, - predicates: &mut VecDeque>, + predicates: &mut VecDeque>, selcx: &mut SelectionContext<'_, 'tcx>, ) -> bool { let dummy_cause = ObligationCause::dummy(); diff --git a/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs b/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs index 6d86a2cce6400..dfed9b5309ae2 100644 --- a/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs +++ b/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs @@ -564,9 +564,9 @@ fn virtual_call_violations_for_method<'tcx>( // only if the autotrait is one of the trait object's trait bounds, like // in `dyn Trait + AutoTrait`. This guarantees that trait objects only // implement auto traits if the underlying type does as well. - if let ty::ClauseKind::Trait(ty::TraitPredicate { + if let ty::ClauseKind::Trait(ty::TraitClause { trait_ref: pred_trait_ref, - polarity: ty::PredicatePolarity::Positive, + polarity: ty::ClausePolarity::Positive, }) = clause.kind().skip_binder() && pred_trait_ref.self_ty() == tcx.types.self_param && tcx.trait_is_auto(pred_trait_ref.def_id) diff --git a/compiler/rustc_trait_selection/src/traits/mod.rs b/compiler/rustc_trait_selection/src/traits/mod.rs index e0c93a7d3af63..8b4d02725bb0a 100644 --- a/compiler/rustc_trait_selection/src/traits/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/mod.rs @@ -257,7 +257,7 @@ fn set_projection_term_to_non_rigid<'tcx>( if let ty::ClauseKind::Projection(projection_pred) = clause.kind().skip_binder() { clause .kind() - .rebind(ty::ProjectionPredicate { + .rebind(ty::ProjectionClause { projection_term: projection_pred.projection_term, term: ty::set_aliases_to_non_rigid(tcx, projection_pred.term).skip_norm_wip(), }) diff --git a/compiler/rustc_trait_selection/src/traits/project.rs b/compiler/rustc_trait_selection/src/traits/project.rs index 7da8c68ff894a..3a870efd2e274 100644 --- a/compiler/rustc_trait_selection/src/traits/project.rs +++ b/compiler/rustc_trait_selection/src/traits/project.rs @@ -31,9 +31,9 @@ use crate::traits::normalize::{normalize_with_depth, normalize_with_depth_to}; use crate::traits::query::evaluate_obligation::InferCtxtExt as _; use crate::traits::select::ProjectionMatchesProjection; -pub type PolyProjectionObligation<'tcx> = Obligation<'tcx, ty::PolyProjectionPredicate<'tcx>>; +pub type PolyProjectionObligation<'tcx> = Obligation<'tcx, ty::PolyProjectionClause<'tcx>>; -pub type ProjectionObligation<'tcx> = Obligation<'tcx, ty::ProjectionPredicate<'tcx>>; +pub type ProjectionObligation<'tcx> = Obligation<'tcx, ty::ProjectionClause<'tcx>>; pub type ProjectionTermObligation<'tcx> = Obligation<'tcx, ty::AliasTerm<'tcx>>; @@ -52,14 +52,14 @@ pub enum ProjectionError<'tcx> { #[derive(PartialEq, Eq, Debug)] enum ProjectionCandidate<'tcx> { /// From a where-clause in the env or object type - ParamEnv(ty::PolyProjectionPredicate<'tcx>), + ParamEnv(ty::PolyProjectionClause<'tcx>), /// From the definition of `Trait` when you have something like /// `<::B as Trait2>::C`. - TraitDef(ty::PolyProjectionPredicate<'tcx>), + TraitDef(ty::PolyProjectionClause<'tcx>), /// Bounds specified on an object type - Object(ty::PolyProjectionPredicate<'tcx>), + Object(ty::PolyProjectionClause<'tcx>), /// From an "impl" (or a "pseudo-impl" returned by select) Select(Selection<'tcx>), @@ -868,7 +868,7 @@ fn assemble_candidates_from_clauses<'cx, 'tcx>( selcx: &mut SelectionContext<'cx, 'tcx>, obligation: &ProjectionTermObligation<'tcx>, candidate_set: &mut ProjectionCandidateSet<'tcx>, - ctor: fn(ty::PolyProjectionPredicate<'tcx>) -> ProjectionCandidate<'tcx>, + ctor: fn(ty::PolyProjectionClause<'tcx>) -> ProjectionCandidate<'tcx>, env_clauses: impl Iterator>, potentially_unnormalized_candidates: bool, ) { @@ -1371,7 +1371,7 @@ fn confirm_coroutine_candidate<'cx, 'tcx>( ); }; - let predicate = ty::ProjectionPredicate { + let predicate = ty::ProjectionClause { projection_term: obligation.predicate.with_args(tcx, trait_ref.args), term: ty.into(), }; @@ -1418,7 +1418,7 @@ fn confirm_future_candidate<'cx, 'tcx>( sym::Output ); - let predicate = ty::ProjectionPredicate { + let predicate = ty::ProjectionClause { projection_term: obligation.predicate.with_args(tcx, trait_ref.args), term: return_ty.into(), }; @@ -1463,7 +1463,7 @@ fn confirm_iterator_candidate<'cx, 'tcx>( sym::Item ); - let predicate = ty::ProjectionPredicate { + let predicate = ty::ProjectionClause { projection_term: obligation.predicate.with_args(tcx, trait_ref.args), term: yield_ty.into(), }; @@ -1516,7 +1516,7 @@ fn confirm_async_iterator_candidate<'cx, 'tcx>( }; let item_ty = args.type_at(0); - let predicate = ty::ProjectionPredicate { + let predicate = ty::ProjectionClause { projection_term: obligation.predicate.with_args(tcx, trait_ref.args), term: item_ty.into(), }; @@ -1595,7 +1595,7 @@ fn confirm_builtin_candidate<'cx, 'tcx>( bug!("unexpected builtin trait with associated type: {:?}", obligation.predicate); }; - let predicate = ty::ProjectionPredicate { + let predicate = ty::ProjectionClause { projection_term: ty::AliasTerm::new_from_args( tcx, ty::AliasTermKind::ProjectionTy { def_id: item_def_id }, @@ -1699,7 +1699,7 @@ fn confirm_callable_candidate<'cx, 'tcx>( fn_sig, flag, ) - .map_bound(|(trait_ref, ret_type)| ty::ProjectionPredicate { + .map_bound(|(trait_ref, ret_type)| ty::ProjectionClause { projection_term: ty::AliasTerm::new_from_args( tcx, ty::AliasTermKind::ProjectionTy { def_id: fn_once_output_def_id }, @@ -1754,7 +1754,7 @@ fn confirm_async_closure_candidate<'cx, 'tcx>( }; args.coroutine_closure_sig() - .rebind(ty::ProjectionPredicate { projection_term, term: term.into() }) + .rebind(ty::ProjectionClause { projection_term, term: term.into() }) } ty::FnDef(..) | ty::FnPtr(..) => { let bound_sig = self_ty.fn_sig(tcx); @@ -1787,7 +1787,7 @@ fn confirm_async_closure_candidate<'cx, 'tcx>( name => bug!("no such associated type: {name}"), }; - bound_sig.rebind(ty::ProjectionPredicate { projection_term, term: term.into() }) + bound_sig.rebind(ty::ProjectionClause { projection_term, term: term.into() }) } ty::Closure(_, args) => { let args = args.as_closure(); @@ -1815,7 +1815,7 @@ fn confirm_async_closure_candidate<'cx, 'tcx>( name => bug!("no such associated type: {name}"), }; - bound_sig.rebind(ty::ProjectionPredicate { projection_term, term: term.into() }) + bound_sig.rebind(ty::ProjectionClause { projection_term, term: term.into() }) } _ => bug!("expected callable type for AsyncFn candidate"), }; @@ -1908,7 +1908,7 @@ fn confirm_async_fn_kind_helper_candidate<'cx, 'tcx>( bug!(); }; - let predicate = ty::ProjectionPredicate { + let predicate = ty::ProjectionClause { projection_term: obligation.predicate.with_args(selcx.tcx(), obligation.predicate.args), term: ty::CoroutineClosureSignature::tupled_upvars_by_closure_kind( selcx.tcx(), @@ -1929,7 +1929,7 @@ fn confirm_async_fn_kind_helper_candidate<'cx, 'tcx>( fn confirm_param_env_candidate<'cx, 'tcx>( selcx: &mut SelectionContext<'cx, 'tcx>, obligation: &ProjectionTermObligation<'tcx>, - poly_cache_entry: ty::PolyProjectionPredicate<'tcx>, + poly_cache_entry: ty::PolyProjectionClause<'tcx>, potentially_unnormalized_candidate: bool, ) -> Progress<'tcx> { let infcx = selcx.infcx; diff --git a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs index db863cb42f63e..63aabaec1c883 100644 --- a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs +++ b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs @@ -58,7 +58,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { let mut candidates = SelectionCandidateSet { vec: Vec::new(), ambiguous: false }; // Negative trait predicates have different rules than positive trait predicates. - if obligation.polarity() == ty::PredicatePolarity::Negative { + if obligation.polarity() == ty::ClausePolarity::Negative { self.assemble_candidates_for_trait_alias(obligation, &mut candidates); self.assemble_candidates_from_impls(obligation, &mut candidates); self.assemble_candidates_from_caller_bounds(stack, &mut candidates)?; diff --git a/compiler/rustc_trait_selection/src/traits/select/confirmation.rs b/compiler/rustc_trait_selection/src/traits/select/confirmation.rs index 203ed5a62a8b9..3e84404e0dab9 100644 --- a/compiler/rustc_trait_selection/src/traits/select/confirmation.rs +++ b/compiler/rustc_trait_selection/src/traits/select/confirmation.rs @@ -385,7 +385,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { &mut self, obligation: &PolyTraitObligation<'tcx>, ) -> Result, SelectionError<'tcx>> { - assert_eq!(obligation.predicate.polarity(), ty::PredicatePolarity::Positive); + assert_eq!(obligation.predicate.polarity(), ty::ClausePolarity::Positive); let self_ty = obligation.predicate.self_ty().map_bound(|ty| self.infcx.shallow_resolve(ty)); let self_ty = self.infcx.enter_forall_and_leak_universe(self_ty); @@ -454,7 +454,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { cause: &ObligationCause<'tcx>, recursion_depth: usize, param_env: ty::ParamEnv<'tcx>, - parent_trait_pred: ty::Binder<'tcx, ty::TraitPredicate<'tcx>>, + parent_trait_pred: ty::Binder<'tcx, ty::TraitClause<'tcx>>, ) -> ImplSourceUserDefinedData<'tcx, PredicateObligation<'tcx>> { debug!(?impl_def_id, ?args, ?recursion_depth, "vtable_impl"); diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index d1c579d922287..3af1d3d51499e 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -27,8 +27,8 @@ use rustc_middle::ty::error::TypeErrorToStringExt; use rustc_middle::ty::print::{PrintTraitRefExt as _, with_no_trimmed_paths}; use rustc_middle::ty::{ self, CandidatePreferenceMode, CantBeErased, DeepRejectCtxt, GenericArgsRef, - PolyProjectionPredicate, SizedTraitKind, Ty, TyCtxt, TypeFoldable, TypeVisitableExt, - TypingMode, Unnormalized, Upcast, elaborate, may_use_unstable_feature, + PolyProjectionClause, SizedTraitKind, Ty, TyCtxt, TypeFoldable, TypeVisitableExt, TypingMode, + Unnormalized, Upcast, elaborate, may_use_unstable_feature, }; use rustc_next_trait_solver::solve::AliasBoundKind; use rustc_span::Symbol; @@ -129,7 +129,7 @@ struct TraitObligationStack<'prev, 'tcx> { /// The trait predicate from `obligation` but "freshened" with the /// selection-context's freshener. Used to check for recursion. - fresh_trait_pred: ty::PolyTraitPredicate<'tcx>, + fresh_trait_pred: ty::PolyTraitClause<'tcx>, /// Starts out equal to `depth` -- if, during evaluation, we /// encounter a cycle, then we will set this flag to the minimum @@ -1316,13 +1316,13 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { fn check_evaluation_cache( &self, param_env: ty::ParamEnv<'tcx>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, ) -> Option { let infcx = self.infcx; let tcx = infcx.tcx; if self.can_use_global_caches(param_env, trait_pred) { let key = (infcx.typing_env(param_env), trait_pred); - if let Some(res) = tcx.evaluation_cache.get(&key, tcx) { + if let Some(res) = tcx.caches.evaluation_cache.get(&key, tcx) { Some(res) } else { debug_assert_eq!(infcx.evaluation_cache.get(&(param_env, trait_pred), tcx), None); @@ -1336,7 +1336,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { fn insert_evaluation_cache( &mut self, param_env: ty::ParamEnv<'tcx>, - trait_pred: ty::PolyTraitPredicate<'tcx>, + trait_pred: ty::PolyTraitClause<'tcx>, dep_node: DepNodeIndex, result: EvaluationResult, ) { @@ -1351,7 +1351,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { if self.can_use_global_caches(param_env, trait_pred) { debug!(?trait_pred, ?result, "insert_evaluation_cache global"); // This may overwrite the cache with the same value - tcx.evaluation_cache.insert( + tcx.caches.evaluation_cache.insert( (infcx.typing_env(param_env), trait_pred), dep_node, result, @@ -1426,8 +1426,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { if let ImplCandidate(def_id) = candidate { match (tcx.impl_polarity(def_id), obligation.polarity()) { (ty::ImplPolarity::Reservation, _) - | (ty::ImplPolarity::Positive, ty::PredicatePolarity::Positive) - | (ty::ImplPolarity::Negative, ty::PredicatePolarity::Negative) => { + | (ty::ImplPolarity::Positive, ty::ClausePolarity::Positive) + | (ty::ImplPolarity::Negative, ty::ClausePolarity::Negative) => { result.push(candidate); } _ => {} @@ -1497,7 +1497,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { fn can_use_global_caches( &self, param_env: ty::ParamEnv<'tcx>, - pred: ty::PolyTraitPredicate<'tcx>, + pred: ty::PolyTraitClause<'tcx>, ) -> bool { // If there are any inference variables in the `ParamEnv`, then we // always use a cache local to this particular scope. Otherwise, we @@ -1545,14 +1545,16 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { fn check_candidate_cache( &mut self, param_env: ty::ParamEnv<'tcx>, - cache_fresh_trait_pred: ty::PolyTraitPredicate<'tcx>, + cache_fresh_trait_pred: ty::PolyTraitClause<'tcx>, ) -> Option>> { let infcx = self.infcx; let tcx = infcx.tcx; let pred = cache_fresh_trait_pred.skip_binder(); if self.can_use_global_caches(param_env, cache_fresh_trait_pred) { - if let Some(res) = tcx.selection_cache.get(&(infcx.typing_env(param_env), pred), tcx) { + if let Some(res) = + tcx.caches.selection_cache.get(&(infcx.typing_env(param_env), pred), tcx) + { return Some(res); } else if cfg!(debug_assertions) { match infcx.selection_cache.get(&(param_env, pred), tcx) { @@ -1598,7 +1600,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { fn insert_candidate_cache( &mut self, param_env: ty::ParamEnv<'tcx>, - cache_fresh_trait_pred: ty::PolyTraitPredicate<'tcx>, + cache_fresh_trait_pred: ty::PolyTraitClause<'tcx>, dep_node: DepNodeIndex, candidate: SelectionResult<'tcx, SelectionCandidate<'tcx>>, ) { @@ -1619,7 +1621,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { debug_assert!(!candidate.has_infer()); // This may overwrite the cache with the same value. - tcx.selection_cache.insert( + tcx.caches.selection_cache.insert( (infcx.typing_env(param_env), pred), dep_node, candidate, @@ -1762,7 +1764,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { pub(super) fn match_projection_projections( &mut self, obligation: &ProjectionTermObligation<'tcx>, - env_predicate: PolyProjectionPredicate<'tcx>, + env_predicate: PolyProjectionClause<'tcx>, potentially_unnormalized_candidates: bool, ) -> ProjectionMatchesProjection { let def_id = obligation.predicate.expect_projection_def_id(); @@ -1928,7 +1930,7 @@ impl<'tcx> SelectionContext<'_, 'tcx> { // // Our handling of where-bounds is generally fairly messy but necessary for backwards // compatibility, see #50825 for why we need to handle global where-bounds like this. - let is_global = |c: ty::PolyTraitPredicate<'tcx>| c.is_global() && !c.has_bound_vars(); + let is_global = |c: ty::PolyTraitClause<'tcx>| c.is_global() && !c.has_bound_vars(); let param_candidates = candidates .iter() .filter_map(|c| if let ParamCandidate(p) = c.candidate { Some(p) } else { None }); @@ -2778,8 +2780,8 @@ impl<'tcx> SelectionContext<'_, 'tcx> { fn match_fresh_trait_preds( &self, - previous: ty::PolyTraitPredicate<'tcx>, - current: ty::PolyTraitPredicate<'tcx>, + previous: ty::PolyTraitClause<'tcx>, + current: ty::PolyTraitClause<'tcx>, ) -> bool { let mut matcher = _match::MatchAgainstFreshVars::new(self.tcx()); matcher.relate(previous, current).is_ok() @@ -2837,7 +2839,7 @@ impl<'tcx> SelectionContext<'_, 'tcx> { param_env: ty::ParamEnv<'tcx>, def_id: DefId, // of impl or trait args: GenericArgsRef<'tcx>, // for impl or trait - parent_trait_pred: ty::Binder<'tcx, ty::TraitPredicate<'tcx>>, + parent_trait_pred: ty::Binder<'tcx, ty::TraitClause<'tcx>>, ) -> PredicateObligations<'tcx> { let tcx = self.tcx(); @@ -3031,7 +3033,7 @@ struct ProvisionalEvaluationCache<'tcx> { /// - then we determine that `E` is in error -- we will then clear /// all cache values whose DFN is >= 4 -- in this case, that /// means the cached value for `F`. - map: RefCell, ProvisionalEvaluation>>, + map: RefCell, ProvisionalEvaluation>>, /// The stack of terms that we assume to be well-formed because a `WF(term)` predicate /// is on the stack above (and because of wellformedness is coinductive). @@ -3072,7 +3074,7 @@ impl<'tcx> ProvisionalEvaluationCache<'tcx> { /// `reached_depth` (from the returned value). fn get_provisional( &self, - fresh_trait_pred: ty::PolyTraitPredicate<'tcx>, + fresh_trait_pred: ty::PolyTraitClause<'tcx>, ) -> Option { debug!( ?fresh_trait_pred, @@ -3090,7 +3092,7 @@ impl<'tcx> ProvisionalEvaluationCache<'tcx> { &self, from_dfn: usize, reached_depth: usize, - fresh_trait_pred: ty::PolyTraitPredicate<'tcx>, + fresh_trait_pred: ty::PolyTraitClause<'tcx>, result: EvaluationResult, ) { debug!(?from_dfn, ?fresh_trait_pred, ?result, "insert_provisional"); diff --git a/compiler/rustc_trait_selection/src/traits/structural_normalize.rs b/compiler/rustc_trait_selection/src/traits/structural_normalize.rs index 2556c2baffada..e5fff1eb0fd04 100644 --- a/compiler/rustc_trait_selection/src/traits/structural_normalize.rs +++ b/compiler/rustc_trait_selection/src/traits/structural_normalize.rs @@ -60,7 +60,7 @@ impl<'tcx> At<'_, 'tcx> { self.infcx.tcx, self.cause.clone(), self.param_env, - ty::ProjectionPredicate { projection_term: alias, term: new_infer }, + ty::ProjectionClause { projection_term: alias, term: new_infer }, ); fulfill_cx.register_predicate_obligation(self.infcx, obligation); diff --git a/compiler/rustc_trait_selection/src/traits/util.rs b/compiler/rustc_trait_selection/src/traits/util.rs index e611b4fc6b6ac..5685bd8ef55f8 100644 --- a/compiler/rustc_trait_selection/src/traits/util.rs +++ b/compiler/rustc_trait_selection/src/traits/util.rs @@ -8,8 +8,8 @@ use rustc_infer::traits::PolyTraitObligation; pub use rustc_infer::traits::util::*; use rustc_middle::ty::fast_reject::DeepRejectCtxt; use rustc_middle::ty::{ - self, PolyTraitPredicate, PredicatePolarity, SizedTraitKind, TraitPredicate, TraitRef, Ty, - TyCtxt, TypeFoldable, TypeVisitableExt, Unnormalized, + self, ClausePolarity, PolyTraitClause, SizedTraitKind, TraitClause, TraitRef, Ty, TyCtxt, + TypeFoldable, TypeVisitableExt, Unnormalized, }; pub use rustc_next_trait_solver::placeholder::{BoundVarReplacer, PlaceholderReplacer}; use rustc_span::Span; @@ -35,8 +35,8 @@ pub fn expand_trait_aliases<'tcx>( tcx: TyCtxt<'tcx>, clauses: impl IntoIterator, Span)>, ) -> ( - Vec<(ty::PolyTraitPredicate<'tcx>, SmallVec<[Span; 1]>)>, - Vec<(ty::PolyProjectionPredicate<'tcx>, Span)>, + Vec<(ty::PolyTraitClause<'tcx>, SmallVec<[Span; 1]>)>, + Vec<(ty::PolyProjectionClause<'tcx>, Span)>, ) { let mut trait_preds = vec![]; let mut projection_preds = vec![]; @@ -227,7 +227,7 @@ pub fn sizedness_fast_path<'tcx>( // canonicalize and all that for such cases. if let ty::PredicateKind::Clause(ty::ClauseKind::Trait(trait_pred)) = predicate.kind().skip_binder() - && trait_pred.polarity == ty::PredicatePolarity::Positive + && trait_pred.polarity == ty::ClausePolarity::Positive { let sizedness = match tcx.as_lang_item(trait_pred.def_id()) { Some(LangItem::Sized) => SizedTraitKind::Sized, @@ -243,7 +243,7 @@ pub fn sizedness_fast_path<'tcx>( if matches!(trait_pred.self_ty().kind(), ty::Param(_) | ty::Placeholder(_)) { for clause in param_env.caller_bounds() { if let ty::ClauseKind::Trait(clause_pred) = clause.kind().skip_binder() - && clause_pred.polarity == ty::PredicatePolarity::Positive + && clause_pred.polarity == ty::ClausePolarity::Positive && clause_pred.self_ty() == trait_pred.self_ty() && (clause_pred.def_id() == trait_pred.def_id() || (sizedness == SizedTraitKind::MetaSized @@ -264,16 +264,16 @@ pub fn sizedness_fast_path<'tcx>( pub(crate) fn lazily_elaborate_sizedness_candidate<'tcx>( infcx: &InferCtxt<'tcx>, obligation: &PolyTraitObligation<'tcx>, - candidate: PolyTraitPredicate<'tcx>, -) -> PolyTraitPredicate<'tcx> { + candidate: PolyTraitClause<'tcx>, +) -> PolyTraitClause<'tcx> { if !infcx.tcx.is_lang_item(obligation.predicate.def_id(), LangItem::MetaSized) || !infcx.tcx.is_lang_item(candidate.def_id(), LangItem::Sized) { return candidate; } - if obligation.predicate.polarity() != PredicatePolarity::Positive - || candidate.polarity() != PredicatePolarity::Positive + if obligation.predicate.polarity() != ClausePolarity::Positive + || candidate.polarity() != ClausePolarity::Positive { return candidate; } @@ -286,7 +286,7 @@ pub(crate) fn lazily_elaborate_sizedness_candidate<'tcx>( return candidate; } - candidate.map_bound(|c| TraitPredicate { + candidate.map_bound(|c| TraitClause { trait_ref: TraitRef::new_from_args( infcx.tcx, obligation.predicate.def_id(), diff --git a/compiler/rustc_trait_selection/src/traits/wf.rs b/compiler/rustc_trait_selection/src/traits/wf.rs index 41d2d9adfea74..7bb93d342b639 100644 --- a/compiler/rustc_trait_selection/src/traits/wf.rs +++ b/compiler/rustc_trait_selection/src/traits/wf.rs @@ -127,7 +127,7 @@ pub fn trait_obligations<'tcx>( infcx: &InferCtxt<'tcx>, param_env: ty::ParamEnv<'tcx>, body_def_id: LocalDefId, - trait_pred: ty::TraitPredicate<'tcx>, + trait_pred: ty::TraitClause<'tcx>, span: Span, item: &'tcx hir::Item<'tcx>, ) -> PredicateObligations<'tcx> { @@ -374,7 +374,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> { /// Pushes the obligations required for `trait_ref` to be WF into `self.out`. fn add_wf_preds_for_trait_pred( &mut self, - trait_pred: ty::TraitPredicate<'tcx>, + trait_pred: ty::TraitClause<'tcx>, elaborate: Elaborate, ) { let tcx = self.tcx(); @@ -382,7 +382,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> { // Negative trait predicates don't require supertraits to hold, just // that their args are WF. - if trait_pred.polarity == ty::PredicatePolarity::Negative { + if trait_pred.polarity == ty::ClausePolarity::Negative { self.add_wf_preds_for_negative_trait_pred(trait_ref); return; } diff --git a/compiler/rustc_ty_utils/src/ty.rs b/compiler/rustc_ty_utils/src/ty.rs index 39f0da47942e4..898197438f12b 100644 --- a/compiler/rustc_ty_utils/src/ty.rs +++ b/compiler/rustc_ty_utils/src/ty.rs @@ -262,7 +262,7 @@ impl<'tcx> TypeVisitor> for ImplTraitInTraitFinder<'_, 'tcx> { self.clauses.push( ty::Binder::bind_with_vars( - ty::ProjectionPredicate { + ty::ProjectionClause { projection_term: shifted_alias_ty.projection_to_alias_ty().into(), term: default_ty.into(), }, diff --git a/compiler/rustc_type_ir/src/elaborate.rs b/compiler/rustc_type_ir/src/elaborate.rs index 828bd107f5b34..912a5ac90f632 100644 --- a/compiler/rustc_type_ir/src/elaborate.rs +++ b/compiler/rustc_type_ir/src/elaborate.rs @@ -46,7 +46,7 @@ pub trait Elaboratable { &self, clause: I::Clause, span: I::Span, - parent_trait_pred: ty::Binder>, + parent_trait_pred: ty::Binder>, index: usize, ) -> Self; } @@ -76,7 +76,7 @@ impl Elaboratable for ClauseWithSupertraitSpan { &self, clause: ::Clause, supertrait_span: ::Span, - _parent_trait_pred: crate::Binder>, + _parent_trait_pred: crate::Binder>, _index: usize, ) -> Self { ClauseWithSupertraitSpan { clause, supertrait_span } @@ -151,7 +151,7 @@ impl> Elaborator { match bound_clause.skip_binder() { ty::ClauseKind::Trait(data) => { // Negative trait bounds do not imply any supertrait bounds - if data.polarity != ty::PredicatePolarity::Positive { + if data.polarity != ty::ClausePolarity::Positive { return; } diff --git a/compiler/rustc_type_ir/src/error.rs b/compiler/rustc_type_ir/src/error.rs index 4d16fb365e10d..59ceb4bd1e327 100644 --- a/compiler/rustc_type_ir/src/error.rs +++ b/compiler/rustc_type_ir/src/error.rs @@ -24,7 +24,7 @@ impl ExpectedFound { #[cfg_attr(feature = "nightly", rustc_pass_by_value)] pub enum TypeError { Mismatch, - PolarityMismatch(#[type_visitable(ignore)] ExpectedFound), + PolarityMismatch(#[type_visitable(ignore)] ExpectedFound), SafetyMismatch(#[type_visitable(ignore)] ExpectedFound), AbiMismatch(#[type_visitable(ignore)] ExpectedFound), Mutability, diff --git a/compiler/rustc_type_ir/src/flags.rs b/compiler/rustc_type_ir/src/flags.rs index 2db0c83098b54..7b0a098ad1948 100644 --- a/compiler/rustc_type_ir/src/flags.rs +++ b/compiler/rustc_type_ir/src/flags.rs @@ -418,7 +418,7 @@ impl FlagComputation { self.add_ty(a); self.add_ty(b); } - ty::PredicateKind::Clause(ty::ClauseKind::Projection(ty::ProjectionPredicate { + ty::PredicateKind::Clause(ty::ClauseKind::Projection(ty::ProjectionClause { projection_term, term, })) => { diff --git a/compiler/rustc_type_ir/src/generic_visit.rs b/compiler/rustc_type_ir/src/generic_visit.rs index 4010ac3da5ece..6f4b461575075 100644 --- a/compiler/rustc_type_ir/src/generic_visit.rs +++ b/compiler/rustc_type_ir/src/generic_visit.rs @@ -196,7 +196,7 @@ trivial_impls!( u64, u128, usize, - crate::PredicatePolarity, + crate::ClausePolarity, crate::BoundConstness, crate::DebruijnIndex, crate::solve::Certainty, diff --git a/compiler/rustc_type_ir/src/inherent.rs b/compiler/rustc_type_ir/src/inherent.rs index 859996d67eb64..333f01bca968d 100644 --- a/compiler/rustc_type_ir/src/inherent.rs +++ b/compiler/rustc_type_ir/src/inherent.rs @@ -461,8 +461,8 @@ pub trait Predicate>: + UpcastFrom> + UpcastFrom> + UpcastFrom>> - + UpcastFrom> - + UpcastFrom> + + UpcastFrom> + + UpcastFrom> + UpcastFrom> + UpcastFrom>> + IntoKind>> @@ -502,10 +502,10 @@ pub trait Clause>: + UpcastFrom>> + UpcastFrom> + UpcastFrom>> - + UpcastFrom> - + UpcastFrom>> - + UpcastFrom> - + UpcastFrom>> + + UpcastFrom> + + UpcastFrom>> + + UpcastFrom> + + UpcastFrom>> + IntoKind>> + Elaboratable { @@ -523,7 +523,7 @@ pub trait Clause>: .transpose() } - fn as_trait_clause(self) -> Option>> { + fn as_trait_clause(self) -> Option>> { self.kind() .map_bound(|clause| if let ty::ClauseKind::Trait(t) = clause { Some(t) } else { None }) .transpose() @@ -537,7 +537,7 @@ pub trait Clause>: .transpose() } - fn as_projection_clause(self) -> Option>> { + fn as_projection_clause(self) -> Option>> { self.kind() .map_bound( |clause| { diff --git a/compiler/rustc_type_ir/src/interner.rs b/compiler/rustc_type_ir/src/interner.rs index 037e02d345fa8..49899147d5747 100644 --- a/compiler/rustc_type_ir/src/interner.rs +++ b/compiler/rustc_type_ir/src/interner.rs @@ -31,11 +31,11 @@ pub trait Interner: + IrPrint> + IrPrint> + IrPrint> - + IrPrint> + + IrPrint> + IrPrint> + IrPrint> + IrPrint> - + IrPrint> + + IrPrint> + IrPrint> + IrPrint> + IrPrint> diff --git a/compiler/rustc_type_ir/src/ir_print.rs b/compiler/rustc_type_ir/src/ir_print.rs index 1b11665e1f574..8133862e1bf1a 100644 --- a/compiler/rustc_type_ir/src/ir_print.rs +++ b/compiler/rustc_type_ir/src/ir_print.rs @@ -5,7 +5,7 @@ use crate::{AliasConst, ClosureKind}; use crate::{ AliasTerm, AliasTy, Binder, CoercePredicate, ExistentialProjection, ExistentialTraitRef, FnSig, HostEffectClause, Interner, NormalizesTo, OutlivesClause, PatternKind, Placeholder, - ProjectionPredicate, Region, SubtypePredicate, TraitPredicate, TraitRef, + ProjectionClause, Region, SubtypePredicate, TraitClause, TraitRef, }; pub trait IrPrint { @@ -39,10 +39,10 @@ macro_rules! define_debug_via_print { define_display_via_print!( TraitRef, - TraitPredicate, + TraitClause, ExistentialTraitRef, ExistentialProjection, - ProjectionPredicate, + ProjectionClause, NormalizesTo, SubtypePredicate, CoercePredicate, diff --git a/compiler/rustc_type_ir/src/macros.rs b/compiler/rustc_type_ir/src/macros.rs index 3c07b14df06f5..3741c80d0eb14 100644 --- a/compiler/rustc_type_ir/src/macros.rs +++ b/compiler/rustc_type_ir/src/macros.rs @@ -51,8 +51,8 @@ TrivialTypeTraversalImpls! { u64, // tidy-alphabetical-start crate::BoundConstness, + crate::ClausePolarity, crate::DebruijnIndex, - crate::PredicatePolarity, crate::UniverseIndex, crate::Variance, crate::solve::BuiltinImplSource, diff --git a/compiler/rustc_type_ir/src/predicate.rs b/compiler/rustc_type_ir/src/predicate.rs index 7907149e25fef..a819530485ccd 100644 --- a/compiler/rustc_type_ir/src/predicate.rs +++ b/compiler/rustc_type_ir/src/predicate.rs @@ -193,21 +193,21 @@ impl ty::Binder> { feature = "nightly", derive(Decodable_NoContext, Encodable_NoContext, StableHash_NoContext) )] -pub struct TraitPredicate { +pub struct TraitClause { pub trait_ref: TraitRef, /// If polarity is Positive: we are proving that the trait is implemented. /// /// If polarity is Negative: we are proving that a negative impl of this trait /// exists. (Note that coherence also checks whether negative impls of supertraits - /// exist via a series of predicates.) + /// exist via a series of clauses.) #[lift(identity)] - pub polarity: PredicatePolarity, + pub polarity: ClausePolarity, } -impl Eq for TraitPredicate {} +impl Eq for TraitClause {} -impl TraitPredicate { +impl TraitClause { pub fn with_replaced_self_ty(self, interner: I, self_ty: I::Ty) -> Self { Self { trait_ref: self.trait_ref.with_replaced_self_ty(interner, self_ty), @@ -224,7 +224,7 @@ impl TraitPredicate { } } -impl ty::Binder> { +impl ty::Binder> { pub fn def_id(self) -> I::TraitId { // Ok to skip binder since trait `DefId` does not care about regions. self.skip_binder().def_id() @@ -235,29 +235,26 @@ impl ty::Binder> { } #[inline] - pub fn polarity(self) -> PredicatePolarity { + pub fn polarity(self) -> ClausePolarity { self.skip_binder().polarity } } -impl UpcastFrom> for TraitPredicate { +impl UpcastFrom> for TraitClause { fn upcast_from(from: TraitRef, _tcx: I) -> Self { - TraitPredicate { trait_ref: from, polarity: PredicatePolarity::Positive } + TraitClause { trait_ref: from, polarity: ClausePolarity::Positive } } } -impl UpcastFrom>> for ty::Binder> { +impl UpcastFrom>> for ty::Binder> { fn upcast_from(from: ty::Binder>, _tcx: I) -> Self { - from.map_bound(|trait_ref| TraitPredicate { - trait_ref, - polarity: PredicatePolarity::Positive, - }) + from.map_bound(|trait_ref| TraitClause { trait_ref, polarity: ClausePolarity::Positive }) } } -impl fmt::Debug for TraitPredicate { +impl fmt::Debug for TraitClause { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "TraitPredicate({:?}, polarity:{:?})", self.trait_ref, self.polarity) + write!(f, "TraitClause({:?}, polarity:{:?})", self.trait_ref, self.polarity) } } @@ -296,31 +293,31 @@ impl ImplPolarity { } } -/// Polarity for a trait predicate. +/// Polarity for a trait clause. /// /// May either be negative or positive. /// Distinguished from [`ImplPolarity`] since we never compute goals with /// "reservation" level. #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] #[cfg_attr(feature = "nightly", derive(Decodable_NoContext, Encodable_NoContext, StableHash))] -pub enum PredicatePolarity { +pub enum ClausePolarity { /// `Type: Trait` Positive, /// `Type: !Trait` Negative, } -impl PredicatePolarity { +impl ClausePolarity { /// Flips polarity by turning `Positive` into `Negative` and `Negative` into `Positive`. - pub fn flip(&self) -> PredicatePolarity { + pub fn flip(&self) -> ClausePolarity { match self { - PredicatePolarity::Positive => PredicatePolarity::Negative, - PredicatePolarity::Negative => PredicatePolarity::Positive, + ClausePolarity::Positive => ClausePolarity::Negative, + ClausePolarity::Negative => ClausePolarity::Positive, } } } -impl fmt::Display for PredicatePolarity { +impl fmt::Display for ClausePolarity { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { Self::Positive => f.write_str("positive"), @@ -452,7 +449,7 @@ impl ty::Binder> { } } -/// A `ProjectionPredicate` for an `ExistentialTraitRef`. +/// A `ProjectionClause` for an `ExistentialTraitRef`. #[derive_where(Clone, Copy, Hash, PartialEq, Debug; I: Interner)] #[derive(TypeVisitable_Generic, GenericTypeVisitable, TypeFoldable_Generic, Lift_Generic)] #[cfg_attr( @@ -505,11 +502,11 @@ impl ExistentialProjection { ExistentialTraitRef::new_from_args(interner, def_id, args) } - pub fn with_self_ty(&self, interner: I, self_ty: I::Ty) -> ProjectionPredicate { + pub fn with_self_ty(&self, interner: I, self_ty: I::Ty) -> ProjectionClause { // otherwise the escaping regions would be captured by the binders debug_assert!(!self_ty.has_escaping_bound_vars()); - ProjectionPredicate { + ProjectionClause { projection_term: ty::AliasTerm::new( interner, interner.alias_term_kind_from_def_id(self.def_id.into()), @@ -519,7 +516,7 @@ impl ExistentialProjection { } } - pub fn erase_self_ty(interner: I, projection_predicate: ProjectionPredicate) -> Self { + pub fn erase_self_ty(interner: I, projection_predicate: ProjectionClause) -> Self { // Assert there is a Self. projection_predicate.projection_term.args.type_at(0); @@ -533,7 +530,7 @@ impl ExistentialProjection { } impl ty::Binder> { - pub fn with_self_ty(&self, cx: I, self_ty: I::Ty) -> ty::Binder> { + pub fn with_self_ty(&self, cx: I, self_ty: I::Ty) -> ty::Binder> { self.map_bound(|p| p.with_self_ty(cx, self_ty)) } @@ -552,7 +549,7 @@ impl ty::Binder> { /// normal trait predicate (`T: TraitRef<...>`) and one of these /// predicates. Form #2 is a broader form in that it also permits /// equality between arbitrary types. Processing an instance of -/// Form #2 eventually yields one of these `ProjectionPredicate` +/// Form #2 eventually yields one of these `ProjectionClause` /// instances to normalize the LHS. #[derive_where(Clone, Copy, Hash, PartialEq; I: Interner)] #[derive(TypeVisitable_Generic, GenericTypeVisitable, TypeFoldable_Generic, Lift_Generic)] @@ -560,19 +557,19 @@ impl ty::Binder> { feature = "nightly", derive(Decodable_NoContext, Encodable_NoContext, StableHash_NoContext) )] -pub struct ProjectionPredicate { +pub struct ProjectionClause { pub projection_term: ty::AliasTerm, pub term: I::Term, } -impl Eq for ProjectionPredicate {} +impl Eq for ProjectionClause {} -impl ProjectionPredicate { +impl ProjectionClause { pub fn self_ty(self) -> I::Ty { self.projection_term.self_ty() } - pub fn with_replaced_self_ty(self, interner: I, self_ty: I::Ty) -> ProjectionPredicate { + pub fn with_replaced_self_ty(self, interner: I, self_ty: I::Ty) -> ProjectionClause { Self { projection_term: self.projection_term.with_replaced_self_ty(interner, self_ty), ..self @@ -588,7 +585,7 @@ impl ProjectionPredicate { } } -impl ty::Binder> { +impl ty::Binder> { /// Returns the `DefId` of the trait of the associated item being projected. #[inline] pub fn trait_def_id(&self, cx: I) -> I::TraitId { @@ -609,9 +606,9 @@ impl ty::Binder> { } } -impl fmt::Debug for ProjectionPredicate { +impl fmt::Debug for ProjectionClause { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "ProjectionPredicate({:?}, {:?})", self.projection_term, self.term) + write!(f, "ProjectionClause({:?}, {:?})", self.projection_term, self.term) } } diff --git a/compiler/rustc_type_ir/src/predicate_kind.rs b/compiler/rustc_type_ir/src/predicate_kind.rs index e57f0f1e0cd8d..d6276ea0062bd 100644 --- a/compiler/rustc_type_ir/src/predicate_kind.rs +++ b/compiler/rustc_type_ir/src/predicate_kind.rs @@ -19,7 +19,7 @@ pub enum ClauseKind { /// Corresponds to `where Foo: Bar`. `Foo` here would be /// the `Self` type of the trait reference and `A`, `B`, and `C` /// would be the type parameters. - Trait(ty::TraitPredicate), + Trait(ty::TraitClause), /// `where 'a: 'r` RegionOutlives(ty::OutlivesClause>), @@ -28,8 +28,8 @@ pub enum ClauseKind { TypeOutlives(ty::OutlivesClause), /// `where ::Name == X`, approximately. - /// See the `ProjectionPredicate` struct for details. - Projection(ty::ProjectionPredicate), + /// See the `ProjectionClause` struct for details. + Projection(ty::ProjectionClause), /// Ensures that a const generic argument to a parameter `const N: u8` /// is of type `u8`. diff --git a/compiler/rustc_type_ir/src/relate.rs b/compiler/rustc_type_ir/src/relate.rs index ccaf1550a6d31..98d251c6f1d64 100644 --- a/compiler/rustc_type_ir/src/relate.rs +++ b/compiler/rustc_type_ir/src/relate.rs @@ -639,16 +639,16 @@ impl> Relate for ty::Binder { } } -impl Relate for ty::TraitPredicate { +impl Relate for ty::TraitClause { fn relate>( relation: &mut R, - a: ty::TraitPredicate, - b: ty::TraitPredicate, - ) -> RelateResult> { + a: ty::TraitClause, + b: ty::TraitClause, + ) -> RelateResult> { let trait_ref = relation.relate(a.trait_ref, b.trait_ref)?; if a.polarity != b.polarity { return Err(TypeError::PolarityMismatch(ExpectedFound::new(a.polarity, b.polarity))); } - Ok(ty::TraitPredicate { trait_ref, polarity: a.polarity }) + Ok(ty::TraitClause { trait_ref, polarity: a.polarity }) } } diff --git a/compiler/rustc_type_ir/src/relate/combine.rs b/compiler/rustc_type_ir/src/relate/combine.rs index 4c0fe9cd25724..29193f40959d3 100644 --- a/compiler/rustc_type_ir/src/relate/combine.rs +++ b/compiler/rustc_type_ir/src/relate/combine.rs @@ -180,14 +180,14 @@ where } (ty::ConstKind::Alias(ty::IsRigid::No, alias), _) if infcx.next_trait_solver() => { - relation.register_predicates([ty::ProjectionPredicate { + relation.register_predicates([ty::ProjectionClause { projection_term: alias.into(), term: b.into(), }]); Ok(b) } (_, ty::ConstKind::Alias(ty::IsRigid::No, alias)) if infcx.next_trait_solver() => { - relation.register_predicates([ty::ProjectionPredicate { + relation.register_predicates([ty::ProjectionClause { projection_term: alias.into(), term: a.into(), }]); diff --git a/compiler/rustc_type_ir/src/relate/solver_relating.rs b/compiler/rustc_type_ir/src/relate/solver_relating.rs index 849dcf4c5732b..1e8ff77e4d395 100644 --- a/compiler/rustc_type_ir/src/relate/solver_relating.rs +++ b/compiler/rustc_type_ir/src/relate/solver_relating.rs @@ -199,7 +199,7 @@ where self.goals.push(Goal::new( self.cx(), self.param_env, - ty::ProjectionPredicate { projection_term: alias.into(), term: new_var.into() }, + ty::ProjectionClause { projection_term: alias.into(), term: new_var.into() }, )); self.tys(new_var, b)?; } @@ -208,7 +208,7 @@ where self.goals.push(Goal::new( self.cx(), self.param_env, - ty::ProjectionPredicate { projection_term: alias.into(), term: new_var.into() }, + ty::ProjectionClause { projection_term: alias.into(), term: new_var.into() }, )); self.tys(a, new_var)?; } diff --git a/compiler/rustc_type_ir/src/serialize.rs b/compiler/rustc_type_ir/src/serialize.rs index 7996fd9d32aae..835383b101136 100644 --- a/compiler/rustc_type_ir/src/serialize.rs +++ b/compiler/rustc_type_ir/src/serialize.rs @@ -47,7 +47,7 @@ macro_rules! impl_binder_encode_decode { impl_binder_encode_decode! { ty::FnSig, ty::FnSigTys, - ty::TraitPredicate, + ty::TraitClause, ty::ExistentialPredicate, ty::TraitRef, ty::ExistentialTraitRef, diff --git a/compiler/rustc_type_ir/src/unnormalized.rs b/compiler/rustc_type_ir/src/unnormalized.rs index e62f2763069ce..17a8e0e75fa78 100644 --- a/compiler/rustc_type_ir/src/unnormalized.rs +++ b/compiler/rustc_type_ir/src/unnormalized.rs @@ -9,8 +9,8 @@ use crate::fold::{FallibleTypeFolder, TypeFoldable, TypeFolder}; use crate::inherent::*; use crate::upcast::Upcast; use crate::{ - Binder, BoundConstness, ClauseKind, HostEffectClause, Interner, PredicatePolarity, - TraitPredicate, TraitRef, + Binder, BoundConstness, ClauseKind, ClausePolarity, HostEffectClause, Interner, TraitClause, + TraitRef, }; /// A wrapper for values that need normalization. @@ -114,7 +114,7 @@ impl Unnormalized> { } impl Unnormalized { - pub fn as_trait_clause(self) -> Option>>> { + pub fn as_trait_clause(self) -> Option>>> { self.value.as_trait_clause().map(|v| Unnormalized::new(v)) } @@ -123,7 +123,7 @@ impl Unnormalized { } } -impl Unnormalized>> { +impl Unnormalized>> { pub fn self_ty(self) -> Unnormalized> { self.map(|pred| pred.self_ty()) } @@ -133,7 +133,7 @@ impl Unnormalized>> { } #[inline] - pub fn polarity(self) -> PredicatePolarity { + pub fn polarity(self) -> ClausePolarity { self.value.skip_binder().polarity } } diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs index ea19769e17682..019749c77ae66 100644 --- a/library/alloc/src/boxed.rs +++ b/library/alloc/src/boxed.rs @@ -218,7 +218,7 @@ mod iter; /// [`ThinBox`] implementation. mod thin; -#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "boxed_array_value_iter", since = "1.99.0")] pub use iter::BoxedArrayIntoIter; #[unstable(feature = "thin_box", issue = "92791")] pub use thin::ThinBox; @@ -1374,7 +1374,7 @@ impl Box { /// /// [memory layout]: self#memory-layout /// [considerations for unsafe code]: self#considerations-for-unsafe-code - #[stable(feature = "box_vec_non_null", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "box_vec_non_null", since = "1.99.0")] #[inline] #[must_use = "call `drop(Box::from_non_null(ptr))` if you intend to drop the `Box`"] pub unsafe fn from_non_null(ptr: NonNull) -> Self { @@ -1490,7 +1490,7 @@ impl Box { /// /// [memory layout]: self#memory-layout #[must_use = "losing the pointer will leak memory"] - #[stable(feature = "box_vec_non_null", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "box_vec_non_null", since = "1.99.0")] #[inline] pub fn into_non_null(b: Self) -> NonNull { // As of August 2026, we cannot utilize `Box::leak` diff --git a/library/alloc/src/boxed/iter.rs b/library/alloc/src/boxed/iter.rs index 0e6afcf062354..904e7e3c356a7 100644 --- a/library/alloc/src/boxed/iter.rs +++ b/library/alloc/src/boxed/iter.rs @@ -196,20 +196,20 @@ impl<'a> FromIterator> for Box { /// This implementation is required to make sure that the `Box<[I; N]>: IntoIterator` /// implementation doesn't overlap with `IntoIterator for T where T: Iterator` blanket. -#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "boxed_array_value_iter", since = "1.99.0")] impl !Iterator for Box<[I; N], A> {} /// This implementation is required to make sure that the `&Box<[I; N]>: IntoIterator` /// implementation doesn't overlap with `IntoIterator for T where T: Iterator` blanket. -#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "boxed_array_value_iter", since = "1.99.0")] impl<'a, const N: usize, I, A: Allocator> !Iterator for &'a Box<[I; N], A> {} /// This implementation is required to make sure that the `&mut Box<[I; N]>: IntoIterator` /// implementation doesn't overlap with `IntoIterator for T where T: Iterator` blanket. -#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "boxed_array_value_iter", since = "1.99.0")] impl<'a, const N: usize, I, A: Allocator> !Iterator for &'a mut Box<[I; N], A> {} -#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "boxed_array_value_iter", since = "1.99.0")] impl<'a, T, const N: usize, A: Allocator> IntoIterator for &'a Box<[T; N], A> { type IntoIter = slice::Iter<'a, T>; type Item = &'a T; @@ -218,7 +218,7 @@ impl<'a, T, const N: usize, A: Allocator> IntoIterator for &'a Box<[T; N], A> { } } -#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "boxed_array_value_iter", since = "1.99.0")] impl<'a, T, const N: usize, A: Allocator> IntoIterator for &'a mut Box<[T; N], A> { type IntoIter = slice::IterMut<'a, T>; type Item = &'a mut T; @@ -228,7 +228,7 @@ impl<'a, T, const N: usize, A: Allocator> IntoIterator for &'a mut Box<[T; N], A } /// A by-value `Box<[T; N]>` iterator. -#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "boxed_array_value_iter", since = "1.99.0")] #[rustc_insignificant_dtor] pub struct BoxedArrayIntoIter { // FIXME: make a more efficient implementation (without the need to store capacity) @@ -238,19 +238,19 @@ pub struct BoxedArrayIntoIter { impl BoxedArrayIntoIter { /// Returns an immutable slice of all elements that have not been yielded /// yet. - #[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "boxed_array_value_iter", since = "1.99.0")] pub fn as_slice(&self) -> &[T] { self.inner.as_slice() } /// Returns a mutable slice of all elements that have not been yielded yet. - #[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "boxed_array_value_iter", since = "1.99.0")] pub fn as_mut_slice(&mut self) -> &mut [T] { self.inner.as_mut_slice() } } -#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "boxed_array_value_iter", since = "1.99.0")] impl Iterator for BoxedArrayIntoIter { type Item = T; fn next(&mut self) -> Option { @@ -283,7 +283,7 @@ impl Iterator for BoxedArrayIntoIter { } } -#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "boxed_array_value_iter", since = "1.99.0")] impl DoubleEndedIterator for BoxedArrayIntoIter { fn next_back(&mut self) -> Option { self.inner.next_back() @@ -302,7 +302,7 @@ impl DoubleEndedIterator for BoxedArrayIntoIter } } -#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "boxed_array_value_iter", since = "1.99.0")] impl ExactSizeIterator for BoxedArrayIntoIter { fn len(&self) -> usize { self.inner.len() @@ -313,21 +313,21 @@ impl ExactSizeIterator for BoxedArrayIntoIter FusedIterator for BoxedArrayIntoIter {} -#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "boxed_array_value_iter", since = "1.99.0")] unsafe impl TrustedLen for BoxedArrayIntoIter {} #[cfg(not(no_global_oom_handling))] -#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "boxed_array_value_iter", since = "1.99.0")] impl Clone for BoxedArrayIntoIter { fn clone(&self) -> Self { Self { inner: self.inner.clone() } } } -#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "boxed_array_value_iter", since = "1.99.0")] impl fmt::Debug for BoxedArrayIntoIter { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { // Only print the elements that were not yielded yet: we cannot @@ -336,7 +336,7 @@ impl fmt::Debug for BoxedArrayIntoI } } -#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "boxed_array_value_iter", since = "1.99.0")] impl IntoIterator for Box<[T; N], A> { type IntoIter = BoxedArrayIntoIter; type Item = T; diff --git a/library/alloc/src/collections/vec_deque/mod.rs b/library/alloc/src/collections/vec_deque/mod.rs index 5f1fd39bbbc3b..9095fc0d4abf4 100644 --- a/library/alloc/src/collections/vec_deque/mod.rs +++ b/library/alloc/src/collections/vec_deque/mod.rs @@ -1485,7 +1485,7 @@ impl VecDeque { /// assert_eq!(buf.as_slices(), (&[5][..], &[][..])); /// ``` #[doc(alias = "truncate_front")] - #[stable(feature = "vec_deque_truncate_front", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "vec_deque_truncate_front", since = "1.99.0")] pub fn retain_back(&mut self, len: usize) { unsafe { if len >= self.len { diff --git a/library/alloc/src/io/read.rs b/library/alloc/src/io/read.rs index 2f4e891aa4429..502eddc827bfc 100644 --- a/library/alloc/src/io/read.rs +++ b/library/alloc/src/io/read.rs @@ -784,8 +784,8 @@ pub fn read_to_string(mut reader: R) -> Result { #[doc(hidden)] #[unstable(feature = "core_io_internals", reason = "exposed only for libstd", issue = "none")] pub const DEFAULT_BUF_SIZE: usize = cfg_select! { - target_os = "espidf" => { 512 }, - _ => { 8 * 1024 } + target_os = "espidf" => 512, + _ => 8 * 1024, }; /// Several `read_to_string` and `read_line` methods in the standard library will diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index cc321660e6ea4..256efc6c44f7d 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -687,7 +687,7 @@ impl String { /// ``` #[must_use] #[cfg(not(no_global_oom_handling))] - #[stable(feature = "string_from_utf8_lossy_owned", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "string_from_utf8_lossy_owned", since = "1.99.0")] pub fn from_utf8_lossy_owned(v: Vec) -> String { if let Cow::Owned(string) = String::from_utf8_lossy(&v) { string @@ -2279,7 +2279,7 @@ impl FromUtf8Error { /// ``` #[must_use] #[cfg(not(no_global_oom_handling))] - #[stable(feature = "string_from_utf8_lossy_owned", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "string_from_utf8_lossy_owned", since = "1.99.0")] pub fn into_utf8_lossy(self) -> String { const REPLACEMENT: &str = "\u{FFFD}"; diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index 3c5db6723e960..94b21334c120c 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -736,7 +736,7 @@ impl Vec { /// } /// ``` #[inline] - #[stable(feature = "box_vec_non_null", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "box_vec_non_null", since = "1.99.0")] #[rustc_const_unstable(feature = "const_heap", issue = "79597")] pub const unsafe fn from_parts(ptr: NonNull, length: usize, capacity: usize) -> Self { unsafe { Self::from_parts_in(ptr, length, capacity, Global) } @@ -871,7 +871,7 @@ impl Vec { /// assert_eq!(rebuilt, [4294967295, 0, 1]); /// ``` #[must_use = "losing the pointer will leak memory"] - #[stable(feature = "box_vec_non_null", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "box_vec_non_null", since = "1.99.0")] #[rustc_const_unstable(feature = "const_heap", issue = "79597")] pub const fn into_parts(self) -> (NonNull, usize, usize) { let (ptr, len, capacity) = self.into_raw_parts(); @@ -1255,7 +1255,7 @@ impl Vec { /// v.push(3); /// /// // Deconstruct the vector into parts. - /// let (p, len, cap, alloc) = v.into_parts_with_alloc(); + /// let (p, len, cap, alloc) = v.into_parts_with_allocator(); /// /// unsafe { /// // Overwrite memory with 4, 5, 6 @@ -1387,7 +1387,7 @@ impl Vec { /// v.push(0); /// v.push(1); /// - /// let (ptr, len, cap, alloc) = v.into_parts_with_alloc(); + /// let (ptr, len, cap, alloc) = v.into_parts_with_allocator(); /// /// let rebuilt = unsafe { /// // We can now make changes to the components, such as @@ -1401,7 +1401,7 @@ impl Vec { #[must_use = "losing the pointer will leak memory"] #[unstable(feature = "allocator_api", issue = "32838")] #[rustc_const_unstable(feature = "allocator_api", issue = "32838")] - pub const fn into_parts_with_alloc(self) -> (NonNull, usize, usize, A) { + pub const fn into_parts_with_allocator(self) -> (NonNull, usize, usize, A) { let (ptr, len, capacity, alloc) = self.into_raw_parts_with_allocator(); // SAFETY: A `Vec` always has a non-null pointer. (unsafe { NonNull::new_unchecked(ptr) }, len, capacity, alloc) @@ -3512,7 +3512,7 @@ impl Vec { assert!(size_of::() == size_of::()); assert!(align_of::() == align_of::()); }; - let (ptr, length, capacity, alloc) = self.into_parts_with_alloc(); + let (ptr, length, capacity, alloc) = self.into_parts_with_allocator(); debug_assert_eq!(length, 0); // SAFETY: // - `ptr` and `alloc` were just returned from `self.into_raw_parts_with_allocator()` diff --git a/library/core/src/alloc/layout.rs b/library/core/src/alloc/layout.rs index da77bbad6ce7f..edf266174bd4e 100644 --- a/library/core/src/alloc/layout.rs +++ b/library/core/src/alloc/layout.rs @@ -252,8 +252,8 @@ impl Layout { /// /// [trait object]: ../../book/ch17-02-trait-objects.html /// [extern type]: ../../unstable-book/language-features/extern-types.html - #[stable(feature = "layout_for_ptr", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "layout_for_ptr", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "layout_for_ptr", since = "1.99.0")] + #[rustc_const_stable(feature = "layout_for_ptr", since = "1.99.0")] #[must_use] #[inline] pub const unsafe fn for_value_raw(val: *const T) -> Self { diff --git a/library/core/src/array/iter.rs b/library/core/src/array/iter.rs index f10ed3edc0e6b..d42e174283a7b 100644 --- a/library/core/src/array/iter.rs +++ b/library/core/src/array/iter.rs @@ -34,7 +34,7 @@ impl IntoIter { } } -#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "boxed_array_value_iter", since = "1.99.0")] impl !Iterator for [T; N] {} // Note: the `#[rustc_skip_during_method_dispatch(array)]` on `trait IntoIterator` diff --git a/library/core/src/ffi/mod.rs b/library/core/src/ffi/mod.rs index 5a36ad121cb6a..4e82203930d3c 100644 --- a/library/core/src/ffi/mod.rs +++ b/library/core/src/ffi/mod.rs @@ -24,7 +24,7 @@ use crate::fmt; pub mod c_str; mod va_list; -#[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "c_variadic", since = "1.99.0")] pub use self::va_list::{VaArgSafe, VaList}; mod primitives; diff --git a/library/core/src/ffi/va_list.rs b/library/core/src/ffi/va_list.rs index 6e1ee0035c55d..63942003c568b 100644 --- a/library/core/src/ffi/va_list.rs +++ b/library/core/src/ffi/va_list.rs @@ -39,12 +39,8 @@ use crate::marker::PhantomCovariantLifetime; // derive `Copy`. However, in the future we might want to support a target where `va_copy` // allocates, or otherwise violates the requirements of `Copy`. Therefore `VaList` is only `Clone`. crate::cfg_select! { - all( - target_arch = "aarch64", - not(target_vendor = "apple"), - not(target_os = "uefi"), - not(windows), - ) => { + all(target_arch = "aarch64", not(target_vendor = "apple"), not(target_os = "uefi"), not(windows)) => + { /// AArch64 ABI implementation of a `va_list`. /// /// See the [AArch64 Procedure Call Standard] for more details. @@ -222,13 +218,13 @@ crate::cfg_select! { /// terms of layout and ABI. #[repr(transparent)] #[lang = "va_list"] -#[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "c_variadic", since = "1.99.0")] pub struct VaList<'a> { inner: VaListInner, _marker: PhantomCovariantLifetime<'a>, } -#[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "c_variadic", since = "1.99.0")] impl fmt::Debug for VaList<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { // No need to include `_marker` in debug output. @@ -243,7 +239,7 @@ impl VaList<'_> { } } -#[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "c_variadic", since = "1.99.0")] #[rustc_const_unstable(feature = "const_c_variadic", issue = "151787")] const impl<'f> Clone for VaList<'f> { /// Clone the [`VaList`], producing a second independent cursor into the variable argument list. @@ -259,7 +255,7 @@ const impl<'f> Clone for VaList<'f> { } } -#[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "c_variadic", since = "1.99.0")] #[rustc_const_unstable(feature = "const_c_variadic", issue = "151787")] const impl<'f> Drop for VaList<'f> { /// Drop the [`VaList`]. @@ -312,7 +308,7 @@ const impl<'f> Drop for VaList<'f> { // types with a non-scalar layout. Inline assembly can be used to accept unsupported types in the // meantime. #[lang = "va_arg_safe"] -#[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "c_variadic", since = "1.99.0")] pub impl(self) unsafe trait VaArgSafe {} crate::cfg_select! { @@ -321,9 +317,9 @@ crate::cfg_select! { // // - i8 is implicitly promoted to c_int in C, and cannot implement `VaArgSafe`. // - u8 is implicitly promoted to c_uint in C, and cannot implement `VaArgSafe`. - #[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "c_variadic", since = "1.99.0")] unsafe impl VaArgSafe for i16 {} - #[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "c_variadic", since = "1.99.0")] unsafe impl VaArgSafe for u16 {} } _ => { @@ -337,7 +333,7 @@ crate::cfg_select! { crate::cfg_select! { target_arch = "avr" => { // c_double is f32 on this target. - #[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "c_variadic", since = "1.99.0")] unsafe impl VaArgSafe for f32 {} } _ => { @@ -347,18 +343,18 @@ crate::cfg_select! { } } -#[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "c_variadic", since = "1.99.0")] unsafe impl VaArgSafe for i32 {} -#[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "c_variadic", since = "1.99.0")] unsafe impl VaArgSafe for i64 {} -#[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "c_variadic", since = "1.99.0")] unsafe impl VaArgSafe for isize {} -#[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "c_variadic", since = "1.99.0")] unsafe impl VaArgSafe for u32 {} -#[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "c_variadic", since = "1.99.0")] unsafe impl VaArgSafe for u64 {} -#[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "c_variadic", since = "1.99.0")] unsafe impl VaArgSafe for usize {} // Implement `VaArgSafe` for 128-bit integers on targets where clang provides `__int128`. @@ -416,12 +412,12 @@ cfg_select! { } } -#[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "c_variadic", since = "1.99.0")] unsafe impl VaArgSafe for f64 {} -#[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "c_variadic", since = "1.99.0")] unsafe impl VaArgSafe for *mut T {} -#[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "c_variadic", since = "1.99.0")] unsafe impl VaArgSafe for *const T {} // Check that relevant `core::ffi` types implement `VaArgSafe`. @@ -472,7 +468,7 @@ impl<'f> VaList<'f> { /// /// [`c_void`]: core::ffi::c_void #[inline] // Avoid codegen when not used to help backends that don't support VaList. - #[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "c_variadic", since = "1.99.0")] #[rustc_const_unstable(feature = "const_c_variadic", issue = "151787")] #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces pub const unsafe fn next_arg(&mut self) -> T { diff --git a/library/core/src/io/io_slice.rs b/library/core/src/io/io_slice.rs index 0bdd410d3e964..17f4fc4da940a 100644 --- a/library/core/src/io/io_slice.rs +++ b/library/core/src/io/io_slice.rs @@ -3,7 +3,13 @@ use crate::mem::take; use crate::ops::{Deref, DerefMut}; cfg_select! { - any(target_family = "unix", target_os = "hermit", target_os = "solid_asp3", target_os = "trusty", target_os = "wasi") => { + any( + target_family = "unix", + target_os = "hermit", + target_os = "solid_asp3", + target_os = "trusty", + target_os = "wasi" + ) => { #[path = "io_slice/repr_iovec.rs"] mod repr; } diff --git a/library/core/src/iter/adapters/step_by.rs b/library/core/src/iter/adapters/step_by.rs index aa4e46743a316..c73dfa784b8d9 100644 --- a/library/core/src/iter/adapters/step_by.rs +++ b/library/core/src/iter/adapters/step_by.rs @@ -138,7 +138,7 @@ impl ExactSizeIterator for StepBy where I: ExactSizeIterator {} // StepBy stops yielding items once the underlying iterator does, so it is fused // whenever the underlying iterator is fused. -#[stable(feature = "step_by_fused", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "step_by_fused", since = "1.99.0")] impl FusedIterator for StepBy where I: FusedIterator {} // SAFETY: This adapter is shortening. TrustedLen requires the upper bound to be calculated correctly. diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index 8c85e6d1c0c5e..f026434acbbc1 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -339,7 +339,6 @@ mod bool; mod escape; mod tuple; mod unit; -#[cfg_attr(feature = "nightly", not(bootstrap))] #[unstable(feature = "view_type_macro", issue = "155938")] pub mod view; diff --git a/library/core/src/mem/mod.rs b/library/core/src/mem/mod.rs index 9a2ad0004ae4c..63d17f2832493 100644 --- a/library/core/src/mem/mod.rs +++ b/library/core/src/mem/mod.rs @@ -461,8 +461,8 @@ pub const fn size_of_val(val: &T) -> usize { /// ``` #[inline] #[must_use] -#[stable(feature = "layout_for_ptr", since = "CURRENT_RUSTC_VERSION")] -#[rustc_const_stable(feature = "layout_for_ptr", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "layout_for_ptr", since = "1.99.0")] +#[rustc_const_stable(feature = "layout_for_ptr", since = "1.99.0")] pub const unsafe fn size_of_val_raw(val: *const T) -> usize { // SAFETY: the caller must provide a valid raw pointer unsafe { intrinsics::size_of_val(val) } @@ -635,8 +635,8 @@ pub const fn align_of_val(val: &T) -> usize { /// [type-layout]: ../../reference/type-layout.html#r-layout.primitive #[inline] #[must_use] -#[stable(feature = "layout_for_ptr", since = "CURRENT_RUSTC_VERSION")] -#[rustc_const_stable(feature = "layout_for_ptr", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "layout_for_ptr", since = "1.99.0")] +#[rustc_const_stable(feature = "layout_for_ptr", since = "1.99.0")] pub const unsafe fn align_of_val_raw(val: *const T) -> usize { // SAFETY: the caller must provide a valid raw pointer unsafe { intrinsics::align_of_val(val) } diff --git a/library/core/src/num/f32.rs b/library/core/src/num/f32.rs index 971ecac73d6a6..66d89b2ae7c1d 100644 --- a/library/core/src/num/f32.rs +++ b/library/core/src/num/f32.rs @@ -30,10 +30,7 @@ use crate::{cfg_select, intrinsics, mem}; /// let r = f32::RADIX; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `RADIX` associated constant on `f32`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `RADIX` associated constant on `f32`")] #[rustc_diagnostic_item = "f32_legacy_const_radix"] pub const RADIX: u32 = f32::RADIX; @@ -52,7 +49,7 @@ pub const RADIX: u32 = f32::RADIX; /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[deprecated( - since = "CURRENT_RUSTC_VERSION", + since = "1.99.0", note = "replaced by the `MANTISSA_DIGITS` associated constant on `f32`" )] #[rustc_diagnostic_item = "f32_legacy_const_mantissa_dig"] @@ -72,10 +69,7 @@ pub const MANTISSA_DIGITS: u32 = f32::MANTISSA_DIGITS; /// let d = f32::DIGITS; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `DIGITS` associated constant on `f32`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `DIGITS` associated constant on `f32`")] #[rustc_diagnostic_item = "f32_legacy_const_digits"] pub const DIGITS: u32 = f32::DIGITS; @@ -97,10 +91,7 @@ pub const DIGITS: u32 = f32::DIGITS; /// let e = f32::EPSILON; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `EPSILON` associated constant on `f32`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `EPSILON` associated constant on `f32`")] #[rustc_diagnostic_item = "f32_legacy_const_epsilon"] pub const EPSILON: f32 = f32::EPSILON; @@ -118,10 +109,7 @@ pub const EPSILON: f32 = f32::EPSILON; /// let min = f32::MIN; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `MIN` associated constant on `f32`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `MIN` associated constant on `f32`")] #[rustc_diagnostic_item = "f32_legacy_const_min"] pub const MIN: f32 = f32::MIN; @@ -140,7 +128,7 @@ pub const MIN: f32 = f32::MIN; /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[deprecated( - since = "CURRENT_RUSTC_VERSION", + since = "1.99.0", note = "replaced by the `MIN_POSITIVE` associated constant on `f32`" )] #[rustc_diagnostic_item = "f32_legacy_const_min_positive"] @@ -160,10 +148,7 @@ pub const MIN_POSITIVE: f32 = f32::MIN_POSITIVE; /// let max = f32::MAX; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `MAX` associated constant on `f32`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `MAX` associated constant on `f32`")] #[rustc_diagnostic_item = "f32_legacy_const_max"] pub const MAX: f32 = f32::MAX; @@ -181,10 +166,7 @@ pub const MAX: f32 = f32::MAX; /// let min = f32::MIN_EXP; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `MIN_EXP` associated constant on `f32`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `MIN_EXP` associated constant on `f32`")] #[rustc_diagnostic_item = "f32_legacy_const_min_exp"] pub const MIN_EXP: i32 = f32::MIN_EXP; @@ -202,10 +184,7 @@ pub const MIN_EXP: i32 = f32::MIN_EXP; /// let max = f32::MAX_EXP; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `MAX_EXP` associated constant on `f32`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `MAX_EXP` associated constant on `f32`")] #[rustc_diagnostic_item = "f32_legacy_const_max_exp"] pub const MAX_EXP: i32 = f32::MAX_EXP; @@ -223,10 +202,7 @@ pub const MAX_EXP: i32 = f32::MAX_EXP; /// let min = f32::MIN_10_EXP; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `MIN_10_EXP` associated constant on `f32`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `MIN_10_EXP` associated constant on `f32`")] #[rustc_diagnostic_item = "f32_legacy_const_min_10_exp"] pub const MIN_10_EXP: i32 = f32::MIN_10_EXP; @@ -244,10 +220,7 @@ pub const MIN_10_EXP: i32 = f32::MIN_10_EXP; /// let max = f32::MAX_10_EXP; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `MAX_10_EXP` associated constant on `f32`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `MAX_10_EXP` associated constant on `f32`")] #[rustc_diagnostic_item = "f32_legacy_const_max_10_exp"] pub const MAX_10_EXP: i32 = f32::MAX_10_EXP; @@ -265,10 +238,7 @@ pub const MAX_10_EXP: i32 = f32::MAX_10_EXP; /// let nan = f32::NAN; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `NAN` associated constant on `f32`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `NAN` associated constant on `f32`")] #[rustc_diagnostic_item = "f32_legacy_const_nan"] pub const NAN: f32 = f32::NAN; @@ -286,10 +256,7 @@ pub const NAN: f32 = f32::NAN; /// let inf = f32::INFINITY; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `INFINITY` associated constant on `f32`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `INFINITY` associated constant on `f32`")] #[rustc_diagnostic_item = "f32_legacy_const_infinity"] pub const INFINITY: f32 = f32::INFINITY; @@ -308,7 +275,7 @@ pub const INFINITY: f32 = f32::INFINITY; /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[deprecated( - since = "CURRENT_RUSTC_VERSION", + since = "1.99.0", note = "replaced by the `NEG_INFINITY` associated constant on `f32`" )] #[rustc_diagnostic_item = "f32_legacy_const_neg_infinity"] @@ -1203,9 +1170,7 @@ impl f32 { all(target_arch = "arm", target_feature = "vfp2"), target_arch = "wasm32", target_arch = "wasm64", - ) => { - ((self as f64 + other as f64) * 0.5) as f32 - } + ) => ((self as f64 + other as f64) * 0.5) as f32, _ => { const HI: f32 = f32::MAX * 0.5; diff --git a/library/core/src/num/f64.rs b/library/core/src/num/f64.rs index 724bfd2a08f6e..0a45d6f333ef8 100644 --- a/library/core/src/num/f64.rs +++ b/library/core/src/num/f64.rs @@ -30,10 +30,7 @@ use crate::{intrinsics, mem}; /// let r = f64::RADIX; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `RADIX` associated constant on `f64`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `RADIX` associated constant on `f64`")] #[rustc_diagnostic_item = "f64_legacy_const_radix"] pub const RADIX: u32 = f64::RADIX; @@ -52,7 +49,7 @@ pub const RADIX: u32 = f64::RADIX; /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[deprecated( - since = "CURRENT_RUSTC_VERSION", + since = "1.99.0", note = "replaced by the `MANTISSA_DIGITS` associated constant on `f64`" )] #[rustc_diagnostic_item = "f64_legacy_const_mantissa_dig"] @@ -72,10 +69,7 @@ pub const MANTISSA_DIGITS: u32 = f64::MANTISSA_DIGITS; /// let d = f64::DIGITS; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `DIGITS` associated constant on `f64`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `DIGITS` associated constant on `f64`")] #[rustc_diagnostic_item = "f64_legacy_const_digits"] pub const DIGITS: u32 = f64::DIGITS; @@ -97,10 +91,7 @@ pub const DIGITS: u32 = f64::DIGITS; /// let e = f64::EPSILON; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `EPSILON` associated constant on `f64`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `EPSILON` associated constant on `f64`")] #[rustc_diagnostic_item = "f64_legacy_const_epsilon"] pub const EPSILON: f64 = f64::EPSILON; @@ -118,10 +109,7 @@ pub const EPSILON: f64 = f64::EPSILON; /// let min = f64::MIN; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `MIN` associated constant on `f64`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `MIN` associated constant on `f64`")] #[rustc_diagnostic_item = "f64_legacy_const_min"] pub const MIN: f64 = f64::MIN; @@ -140,7 +128,7 @@ pub const MIN: f64 = f64::MIN; /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[deprecated( - since = "CURRENT_RUSTC_VERSION", + since = "1.99.0", note = "replaced by the `MIN_POSITIVE` associated constant on `f64`" )] #[rustc_diagnostic_item = "f64_legacy_const_min_positive"] @@ -160,10 +148,7 @@ pub const MIN_POSITIVE: f64 = f64::MIN_POSITIVE; /// let max = f64::MAX; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `MAX` associated constant on `f64`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `MAX` associated constant on `f64`")] #[rustc_diagnostic_item = "f64_legacy_const_max"] pub const MAX: f64 = f64::MAX; @@ -181,10 +166,7 @@ pub const MAX: f64 = f64::MAX; /// let min = f64::MIN_EXP; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `MIN_EXP` associated constant on `f64`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `MIN_EXP` associated constant on `f64`")] #[rustc_diagnostic_item = "f64_legacy_const_min_exp"] pub const MIN_EXP: i32 = f64::MIN_EXP; @@ -202,10 +184,7 @@ pub const MIN_EXP: i32 = f64::MIN_EXP; /// let max = f64::MAX_EXP; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `MAX_EXP` associated constant on `f64`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `MAX_EXP` associated constant on `f64`")] #[rustc_diagnostic_item = "f64_legacy_const_max_exp"] pub const MAX_EXP: i32 = f64::MAX_EXP; @@ -223,10 +202,7 @@ pub const MAX_EXP: i32 = f64::MAX_EXP; /// let min = f64::MIN_10_EXP; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `MIN_10_EXP` associated constant on `f64`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `MIN_10_EXP` associated constant on `f64`")] #[rustc_diagnostic_item = "f64_legacy_const_min_10_exp"] pub const MIN_10_EXP: i32 = f64::MIN_10_EXP; @@ -244,10 +220,7 @@ pub const MIN_10_EXP: i32 = f64::MIN_10_EXP; /// let max = f64::MAX_10_EXP; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `MAX_10_EXP` associated constant on `f64`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `MAX_10_EXP` associated constant on `f64`")] #[rustc_diagnostic_item = "f64_legacy_const_max_10_exp"] pub const MAX_10_EXP: i32 = f64::MAX_10_EXP; @@ -265,10 +238,7 @@ pub const MAX_10_EXP: i32 = f64::MAX_10_EXP; /// let nan = f64::NAN; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `NAN` associated constant on `f64`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `NAN` associated constant on `f64`")] #[rustc_diagnostic_item = "f64_legacy_const_nan"] pub const NAN: f64 = f64::NAN; @@ -286,10 +256,7 @@ pub const NAN: f64 = f64::NAN; /// let inf = f64::INFINITY; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[deprecated( - since = "CURRENT_RUSTC_VERSION", - note = "replaced by the `INFINITY` associated constant on `f64`" -)] +#[deprecated(since = "1.99.0", note = "replaced by the `INFINITY` associated constant on `f64`")] #[rustc_diagnostic_item = "f64_legacy_const_infinity"] pub const INFINITY: f64 = f64::INFINITY; @@ -308,7 +275,7 @@ pub const INFINITY: f64 = f64::INFINITY; /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[deprecated( - since = "CURRENT_RUSTC_VERSION", + since = "1.99.0", note = "replaced by the `NEG_INFINITY` associated constant on `f64`" )] #[rustc_diagnostic_item = "f64_legacy_const_neg_infinity"] diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs index 1f87f126f9278..ef6cb0aba1bea 100644 --- a/library/core/src/num/int_macros.rs +++ b/library/core/src/num/int_macros.rs @@ -3924,7 +3924,7 @@ macro_rules! int_impl { #[inline(always)] #[rustc_promotable] #[rustc_const_stable(feature = "const_min_value", since = "1.32.0")] - #[deprecated(since = "CURRENT_RUSTC_VERSION", note = "replaced by the `MIN` associated constant on this type")] + #[deprecated(since = "1.99.0", note = "replaced by the `MIN` associated constant on this type")] #[rustc_diagnostic_item = concat!(stringify!($SelfT), "_legacy_fn_min_value")] pub const fn min_value() -> Self { Self::MIN @@ -3938,7 +3938,7 @@ macro_rules! int_impl { #[inline(always)] #[rustc_promotable] #[rustc_const_stable(feature = "const_max_value", since = "1.32.0")] - #[deprecated(since = "CURRENT_RUSTC_VERSION", note = "replaced by the `MAX` associated constant on this type")] + #[deprecated(since = "1.99.0", note = "replaced by the `MAX` associated constant on this type")] #[rustc_diagnostic_item = concat!(stringify!($SelfT), "_legacy_fn_max_value")] pub const fn max_value() -> Self { Self::MAX diff --git a/library/core/src/num/shells/legacy_int_modules.rs b/library/core/src/num/shells/legacy_int_modules.rs index 2b578c9ac6ef4..cf624ab50afe5 100644 --- a/library/core/src/num/shells/legacy_int_modules.rs +++ b/library/core/src/num/shells/legacy_int_modules.rs @@ -5,7 +5,7 @@ macro_rules! legacy_int_module { ($T:ident, #[$attr:meta]) => ( #[$attr] #[deprecated( - since = "CURRENT_RUSTC_VERSION", + since = "1.99.0", note = "all constants in this module replaced by associated constants on the type", )] #[rustc_diagnostic_item = concat!(stringify!($T), "_legacy_mod")] @@ -30,7 +30,7 @@ macro_rules! legacy_int_module { /// ``` /// #[$attr] - #[deprecated(since = "CURRENT_RUSTC_VERSION", note = "replaced by the `MIN` associated constant on this type")] + #[deprecated(since = "1.99.0", note = "replaced by the `MIN` associated constant on this type")] #[rustc_diagnostic_item = concat!(stringify!($T), "_legacy_const_min")] pub const MIN: $T = $T::MIN; @@ -50,7 +50,7 @@ macro_rules! legacy_int_module { /// ``` /// #[$attr] - #[deprecated(since = "CURRENT_RUSTC_VERSION", note = "replaced by the `MAX` associated constant on this type")] + #[deprecated(since = "1.99.0", note = "replaced by the `MAX` associated constant on this type")] #[rustc_diagnostic_item = concat!(stringify!($T), "_legacy_const_max")] pub const MAX: $T = $T::MAX; } diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs index 1664ce83aef72..51f307e2e279e 100644 --- a/library/core/src/num/uint_macros.rs +++ b/library/core/src/num/uint_macros.rs @@ -4168,7 +4168,7 @@ macro_rules! uint_impl { #[rustc_promotable] #[inline(always)] #[rustc_const_stable(feature = "const_max_value", since = "1.32.0")] - #[deprecated(since = "CURRENT_RUSTC_VERSION", note = "replaced by the `MIN` associated constant on this type")] + #[deprecated(since = "1.99.0", note = "replaced by the `MIN` associated constant on this type")] #[rustc_diagnostic_item = concat!(stringify!($SelfT), "_legacy_fn_min_value")] pub const fn min_value() -> Self { Self::MIN } @@ -4180,7 +4180,7 @@ macro_rules! uint_impl { #[rustc_promotable] #[inline(always)] #[rustc_const_stable(feature = "const_max_value", since = "1.32.0")] - #[deprecated(since = "CURRENT_RUSTC_VERSION", note = "replaced by the `MAX` associated constant on this type")] + #[deprecated(since = "1.99.0", note = "replaced by the `MAX` associated constant on this type")] #[rustc_diagnostic_item = concat!(stringify!($SelfT), "_legacy_fn_max_value")] pub const fn max_value() -> Self { Self::MAX } diff --git a/library/core/src/slice/sort/unstable/quicksort.rs b/library/core/src/slice/sort/unstable/quicksort.rs index bdf56a8080305..5f2991ee722d2 100644 --- a/library/core/src/slice/sort/unstable/quicksort.rs +++ b/library/core/src/slice/sort/unstable/quicksort.rs @@ -142,12 +142,8 @@ const fn inst_partition bool>() -> fn(&mut [T], &T, &mut // Specialize for types that are relatively cheap to copy, where branchless optimizations // have large leverage e.g. `u64` and `String`. cfg_select! { - feature = "optimize_for_size" => { - partition_lomuto_branchless_simple:: - } - _ => { - partition_lomuto_branchless_cyclic:: - } + feature = "optimize_for_size" => partition_lomuto_branchless_simple::, + _ => partition_lomuto_branchless_cyclic::, } } else { partition_hoare_branchy_cyclic:: diff --git a/library/coretests/tests/macros.rs b/library/coretests/tests/macros.rs index 86419bb41e527..a868cfcef4ce1 100644 --- a/library/coretests/tests/macros.rs +++ b/library/coretests/tests/macros.rs @@ -49,23 +49,51 @@ fn matches_leading_pipe() { #[test] fn cfg_select_basic() { cfg_select! { - target_pointer_width = "64" => { fn f0_() -> bool { true }} + target_pointer_width = "64" => { + fn f0_() -> bool { + true + } + } _ => {} } cfg_select! { - unix => { fn f1_() -> bool { true } } - _ => { fn f1_() -> bool { false }} + unix => { + fn f1_() -> bool { + true + } + } + _ => { + fn f1_() -> bool { + false + } + } } cfg_select! { - target_pointer_width = "32" => { fn f2_() -> bool { false } } - target_pointer_width = "64" => { fn f2_() -> bool { true } } + target_pointer_width = "32" => { + fn f2_() -> bool { + false + } + } + target_pointer_width = "64" => { + fn f2_() -> bool { + true + } + } } cfg_select! { - target_pointer_width = "16" => { fn f3_() -> i32 { 1 } } - _ => { fn f3_() -> i32 { 2 }} + target_pointer_width = "16" => { + fn f3_() -> i32 { + 1 + } + } + _ => { + fn f3_() -> i32 { + 2 + } + } } #[cfg(target_pointer_width = "64")] @@ -90,11 +118,11 @@ fn cfg_select_debug_assertions() { cfg_select! { debug_assertions => { assert!(cfg!(debug_assertions)); - assert_eq!(4, 2+2); + assert_eq!(4, 2 + 2); } _ => { assert!(cfg!(not(debug_assertions))); - assert_eq!(10, 5+5); + assert_eq!(10, 5 + 5); } } } @@ -121,32 +149,68 @@ fn cfg_select_options() { cfg_select! { test => { use core::option::Option as Option2; - fn works1() -> Option2 { Some(1) } + fn works1() -> Option2 { + Some(1) + } + } + _ => { + fn works1() -> Option { + None + } } - _ => { fn works1() -> Option { None } } } cfg_select! { - feature = "foo" => { fn works2() -> bool { false } } - test => { fn works2() -> bool { true } } - _ => { fn works2() -> bool { false } } + feature = "foo" => { + fn works2() -> bool { + false + } + } + test => { + fn works2() -> bool { + true + } + } + _ => { + fn works2() -> bool { + false + } + } } cfg_select! { - feature = "foo" => { fn works3() -> bool { false } } - _ => { fn works3() -> bool { true } } + feature = "foo" => { + fn works3() -> bool { + false + } + } + _ => { + fn works3() -> bool { + true + } + } } cfg_select! { test => { use core::option::Option as Option3; - fn works4() -> Option3 { Some(1) } + fn works4() -> Option3 { + Some(1) + } } } cfg_select! { - feature = "foo" => { fn works5() -> bool { false } } - test => { fn works5() -> bool { true } } + feature = "foo" => { + fn works5() -> bool { + false + } + } + test => { + fn works5() -> bool { + true + } + } } assert!(works1().is_some()); @@ -183,14 +247,14 @@ fn cfg_select_two_functions() { fn _accepts_expressions() -> i32 { cfg_select! { - unix => { 1 } - _ => { 2 } + unix => 1, + _ => 2, } } fn _accepts_only_wildcard() -> i32 { cfg_select! { - _ => { 1 } + _ => 1, } } @@ -200,19 +264,19 @@ fn _allows_stmt_expr_attributes() { let one = 1; let two = 2; cfg_select! { - unix => { one * two; } - _ => { one + two; } + unix => { + one * two; + } + _ => { + one + two; + } } } fn _expression() { let _ = cfg_select!( - windows => { - " XP" - } - _ => { - "" - } + windows => " XP", + _ => "", ); } diff --git a/library/panic_unwind/src/seh.rs b/library/panic_unwind/src/seh.rs index ab58f307c17c7..ad99fb8c5b5f5 100644 --- a/library/panic_unwind/src/seh.rs +++ b/library/panic_unwind/src/seh.rs @@ -290,12 +290,12 @@ macro_rules! define_cleanup { } } cfg_select! { - target_arch = "x86" => { - define_cleanup!("thiscall" "thiscall-unwind"); - } - _ => { - define_cleanup!("C" "C-unwind"); - } + target_arch = "x86" => { + define_cleanup!("thiscall" "thiscall-unwind"); + } + _ => { + define_cleanup!("C" "C-unwind"); + } } pub(crate) unsafe fn panic(data: Box) -> u32 { diff --git a/library/std/src/ffi/mod.rs b/library/std/src/ffi/mod.rs index 74d190b8c5eb6..b339a80f45397 100644 --- a/library/std/src/ffi/mod.rs +++ b/library/std/src/ffi/mod.rs @@ -166,7 +166,7 @@ pub mod c_str; #[stable(feature = "core_c_void", since = "1.30.0")] pub use core::ffi::c_void; -#[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "c_variadic", since = "1.99.0")] pub use core::ffi::{VaArgSafe, VaList}; #[stable(feature = "core_ffi_c", since = "1.64.0")] pub use core::ffi::{ diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index 432c24b3a22e9..0702148957695 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -462,7 +462,7 @@ pub fn write, C: AsRef<[u8]>>(path: P, contents: C) -> io::Result /// Ok(()) /// } /// ``` -#[stable(feature = "fs_set_times", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "fs_set_times", since = "1.99.0")] #[doc(alias = "utimens")] #[doc(alias = "utimes")] #[doc(alias = "utime")] @@ -503,7 +503,7 @@ pub fn set_times>(path: P, times: FileTimes) -> io::Result<()> { /// Ok(()) /// } /// ``` -#[stable(feature = "fs_set_times", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "fs_set_times", since = "1.99.0")] #[doc(alias = "utimensat")] #[doc(alias = "lutimens")] #[doc(alias = "lutimes")] @@ -3287,8 +3287,9 @@ pub fn remove_dir>(path: P) -> io::Result<()> { /// not be used in security-sensitive contexts: /// - **Miri**: Even when emulating targets where the underlying implementation will protect against /// TOCTOU races, Miri will not do so. -/// - **QNX**, **Redox OS**, **VxWorks**: This function does not protect against TOCTOU races, as -/// the underlying platform does not implement the required platform support to do so. +/// - **ESP-IDF**, **Horizon**, **PS Vita**, **QNX**, **Redox OS**, **VxWorks**: This function does +/// not protect against TOCTOU races, as the underlying platform does not implement the required +/// platform support to do so. /// /// [TOCTOU]: self#time-of-check-to-time-of-use-toctou /// [changes]: io#platform-specific-behavior diff --git a/library/std/src/fs/tests.rs b/library/std/src/fs/tests.rs index 0cc53b5ab546f..3a6c04146922a 100644 --- a/library/std/src/fs/tests.rs +++ b/library/std/src/fs/tests.rs @@ -639,7 +639,7 @@ fn set_get_permissions_nofollows() { permission_bits.set_readonly(false); check!(fs::set_permissions_nofollow(&filename, permission_bits)); } - }, + } _ => { let error_kind = result.unwrap_err().kind(); assert_eq!(error_kind, crate::io::ErrorKind::Unsupported); @@ -668,7 +668,15 @@ fn set_get_permissions_nofollows_symlink() { let result = fs::set_permissions_nofollow(&symlink_name, permission_bits); cfg_select! { - any(windows, target_os = "android", target_os = "macos", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd", target_os = "dragonfly") => { + any( + windows, + target_os = "android", + target_os = "macos", + target_os = "freebsd", + target_os = "openbsd", + target_os = "netbsd", + target_os = "dragonfly" + ) => { assert_eq!(result.unwrap(), ()); let metadata0 = check!(fs::symlink_metadata(&symlink_name)); // So seems like BSD-based systems trying to set permissions @@ -689,7 +697,7 @@ fn set_get_permissions_nofollows_symlink() { permission_bits.set_readonly(false); check!(fs::set_permissions_nofollow(&symlink_name, permission_bits)); } - }, + } _ => { let error_kind = result.unwrap_err().kind(); assert_eq!(error_kind, crate::io::ErrorKind::Unsupported); diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index 1b63d94b65bef..980ec4416f04a 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -650,7 +650,6 @@ pub mod process; pub mod random; pub mod sync; pub mod time; -#[cfg_attr(feature = "nightly", not(bootstrap))] #[unstable(feature = "view_type_macro", issue = "155938")] pub mod view; diff --git a/library/std/src/os/unix/io/mod.rs b/library/std/src/os/unix/io/mod.rs index 618e0dca7659b..4afb8ffa71017 100644 --- a/library/std/src/os/unix/io/mod.rs +++ b/library/std/src/os/unix/io/mod.rs @@ -212,16 +212,15 @@ fn null_fd() -> io::Result { fn replace_stdio_fd(this: BorrowedFd<'_>, other: OwnedFd) -> io::Result<()> { cfg_select! { all(target_os = "wasi", target_env = "p1") => { - cvt(unsafe { libc::__wasilibc_fd_renumber(other.as_raw_fd(), this.as_raw_fd()) }).map(|_| ()) + cvt(unsafe { libc::__wasilibc_fd_renumber(other.as_raw_fd(), this.as_raw_fd()) }) + .map(|_| ()) } not(any( all(target_arch = "wasm32", not(target_os = "emscripten")), target_os = "hermit", target_os = "trusty", target_os = "motor" - )) => { - cvt(unsafe {libc::dup2(other.as_raw_fd(), this.as_raw_fd())}).map(|_| ()) - } + )) => cvt(unsafe { libc::dup2(other.as_raw_fd(), this.as_raw_fd()) }).map(|_| ()), _ => { let _ = (this, other); Err(io::Error::UNSUPPORTED_PLATFORM) diff --git a/library/std/src/os/unix/net/stream.rs b/library/std/src/os/unix/net/stream.rs index 9a17f9e0b8b9b..31a908dfe187e 100644 --- a/library/std/src/os/unix/net/stream.rs +++ b/library/std/src/os/unix/net/stream.rs @@ -1,12 +1,18 @@ cfg_select! { any( - target_os = "linux", target_os = "android", + target_os = "linux", + target_os = "android", target_os = "hurd", - target_os = "dragonfly", target_os = "freebsd", - target_os = "openbsd", target_os = "netbsd", - target_os = "solaris", target_os = "illumos", - target_os = "haiku", target_os = "nto", - target_os = "qnx", target_os = "cygwin", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "openbsd", + target_os = "netbsd", + target_os = "solaris", + target_os = "illumos", + target_os = "haiku", + target_os = "nto", + target_os = "qnx", + target_os = "cygwin", ) => { use libc::MSG_NOSIGNAL; } diff --git a/library/std/src/sync/reentrant_lock.rs b/library/std/src/sync/reentrant_lock.rs index f560b616dd922..fd8a2507f68fd 100644 --- a/library/std/src/sync/reentrant_lock.rs +++ b/library/std/src/sync/reentrant_lock.rs @@ -87,7 +87,8 @@ pub struct ReentrantLock { cfg_select!( target_has_atomic = "64" => { - use crate::sync::atomic::{Atomic, AtomicU64, Ordering::Relaxed}; + use crate::sync::atomic::Ordering::Relaxed; + use crate::sync::atomic::{Atomic, AtomicU64}; struct Tid(Atomic); @@ -118,11 +119,7 @@ cfg_select!( X.with(|p| <*const u8>::addr(p)) } - use crate::sync::atomic::{ - Atomic, - AtomicUsize, - Ordering, - }; + use crate::sync::atomic::{Atomic, AtomicUsize, Ordering}; struct Tid { // When a thread calls `set()`, this value gets updated to diff --git a/library/std/src/sys/alloc/mod.rs b/library/std/src/sys/alloc/mod.rs index 73d35781f09bf..66a2c3be33cba 100644 --- a/library/std/src/sys/alloc/mod.rs +++ b/library/std/src/sys/alloc/mod.rs @@ -64,12 +64,7 @@ unsafe fn realloc_fallback(ptr: *mut u8, old_layout: Layout, new_size: usize) -> } cfg_select! { - any( - target_family = "unix", - target_os = "wasi", - target_os = "teeos", - target_os = "trusty", - ) => { + any(target_family = "unix", target_os = "wasi", target_os = "teeos", target_os = "trusty") => { mod unix; use unix as imp; } @@ -118,12 +113,7 @@ cfg_select! { pub use imp::{alloc, dealloc, realloc}; cfg_select! { - any( - target_os = "hermit", - target_os = "solid_asp3", - target_os = "uefi", - target_os = "zkvm", - ) => { + any(target_os = "hermit", target_os = "solid_asp3", target_os = "uefi", target_os = "zkvm") => { #[inline] pub unsafe fn alloc_zeroed(layout: Layout) -> *mut u8 { let ptr = unsafe { alloc(layout) }; diff --git a/library/std/src/sys/args/mod.rs b/library/std/src/sys/args/mod.rs index 2659750f49eff..c8011a6fed374 100644 --- a/library/std/src/sys/args/mod.rs +++ b/library/std/src/sys/args/mod.rs @@ -15,7 +15,14 @@ mod common; cfg_select! { any( - all(target_family = "unix", not(any(all(target_family = "wasm", target_os = "linux"), target_os = "espidf", target_os = "vita"))), + all( + target_family = "unix", + not(any( + all(target_family = "wasm", target_os = "linux"), + target_os = "espidf", + target_os = "vita" + )) + ), target_os = "hermit", ) => { mod unix; diff --git a/library/std/src/sys/exit.rs b/library/std/src/sys/exit.rs index d0c67fbf6cbd7..b9ebe2d974fec 100644 --- a/library/std/src/sys/exit.rs +++ b/library/std/src/sys/exit.rs @@ -34,7 +34,12 @@ cfg_select! { // async-signal-safe, so this function is available in all imaginable // circumstances. let this_thread_id = crate::sys::io::errno_location(); - match EXITING_THREAD_ID.compare_exchange(ptr::null_mut(), this_thread_id, Acquire, Relaxed) { + match EXITING_THREAD_ID.compare_exchange( + ptr::null_mut(), + this_thread_id, + Acquire, + Relaxed, + ) { Ok(_) => { // This is the first thread to call `unique_thread_exit`, // and this is the first time it is called. Continue exiting. @@ -50,7 +55,9 @@ cfg_select! { // Pause until the process exits. loop { // Safety: libc::pause is safe to call. - unsafe { libc::pause(); } + unsafe { + libc::pause(); + } } } } @@ -70,10 +77,7 @@ cfg_select! { #[cfg(not(test))] cfg_select! { - any( - target_family = "unix", - target_os = "wasi", - ) => { + any(target_family = "unix", target_os = "wasi") => { // Used by rustc for checking the definitions of other function with the same symbol names // // See the `invalid_runtime_symbols_definitions` lint. @@ -89,18 +93,12 @@ cfg_select! { pub fn exit(code: i32) -> ! { cfg_select! { - target_os = "hermit" => { - unsafe { hermit_abi::exit(code) } - } - target_os = "linux" => { - unsafe { - unique_thread_exit(); - libc::exit(code) - } - } - target_os = "motor" => { - moto_rt::process::exit(code) - } + target_os = "hermit" => unsafe { hermit_abi::exit(code) }, + target_os = "linux" => unsafe { + unique_thread_exit(); + libc::exit(code) + }, + target_os = "motor" => moto_rt::process::exit(code), all(target_vendor = "fortanix", target_env = "sgx") => { crate::sys::pal::abi::exit_with_code(code as _) } @@ -131,12 +129,9 @@ pub fn exit(code: i32) -> ! { } crate::intrinsics::abort() } - any( - target_family = "unix", - target_os = "wasi", - ) => { - unsafe { libc::exit(code as crate::ffi::c_int) } - } + any(target_family = "unix", target_os = "wasi") => unsafe { + libc::exit(code as crate::ffi::c_int) + }, target_os = "vexos" => { let _ = code; @@ -148,12 +143,8 @@ pub fn exit(code: i32) -> ! { } } } - target_os = "windows" => { - unsafe { crate::sys::pal::c::ExitProcess(code as u32) } - } - target_os = "xous" => { - crate::os::xous::ffi::exit(code as u32) - } + target_os = "windows" => unsafe { crate::sys::pal::c::ExitProcess(code as u32) }, + target_os = "xous" => crate::os::xous::ffi::exit(code as u32), _ => { let _ = code; crate::intrinsics::abort() diff --git a/library/std/src/sys/fd/unix.rs b/library/std/src/sys/fd/unix.rs index d35a001bb6bab..aa84f6bc28023 100644 --- a/library/std/src/sys/fd/unix.rs +++ b/library/std/src/sys/fd/unix.rs @@ -40,19 +40,14 @@ cfg_select! { -1 } } - any( - all(target_os = "linux", not(target_env = "musl")), - target_os = "android", - target_os = "hurd", - ) => { + any(all(target_os = "linux", not(target_env = "musl")), target_os = "android", target_os = "hurd") => + { // Prefer explicit pread64 for 64-bit offset independently of libc // #[cfg(gnu_file_offset_bits64)]. - use libc::pread64; - use libc::pwrite64; + use libc::{pread64, pwrite64}; } _ => { - use libc::pread as pread64; - use libc::pwrite as pwrite64; + use libc::{pread as pread64, pwrite as pwrite64}; } } diff --git a/library/std/src/sys/fs/mod.rs b/library/std/src/sys/fs/mod.rs index b5a5fa93fd491..b2666eb2a3da9 100644 --- a/library/std/src/sys/fs/mod.rs +++ b/library/std/src/sys/fs/mod.rs @@ -9,20 +9,22 @@ cfg_select! { any(target_family = "unix", target_os = "wasi") => { mod unix; use unix as imp; - #[cfg(not(target_os = "wasi"))] - pub use unix::{chown, fchown, lchown, mkfifo}; + #[cfg(any(target_os = "linux", target_os = "android"))] + pub(super) use unix::CachedFileMetadata; #[cfg(not(any(target_os = "fuchsia", target_os = "wasi")))] pub use unix::chroot; #[cfg(not(target_os = "wasi"))] pub(crate) use unix::debug_assert_fd_is_open; - #[cfg(any(target_os = "linux", target_os = "android"))] - pub(super) use unix::CachedFileMetadata; + #[cfg(not(target_os = "wasi"))] + pub use unix::{chown, fchown, lchown, mkfifo}; + use crate::sys::helpers::run_path_with_cstr as with_native_path; } target_os = "windows" => { mod windows; use windows as imp; - pub use windows::{symlink_inner, junction_point}; + pub use windows::{junction_point, symlink_inner}; + use crate::sys::path::with_native_path; } target_os = "hermit" => { diff --git a/library/std/src/sys/fs/unix.rs b/library/std/src/sys/fs/unix.rs index 2b7e4b9ba6860..b33ebadebe4ad 100644 --- a/library/std/src/sys/fs/unix.rs +++ b/library/std/src/sys/fs/unix.rs @@ -337,7 +337,7 @@ fn get_path_from_fd(fd: c_int) -> Option { // fallback to procfs as last resort let mut p = PathBuf::from("/proc/self/fd"); p.push(&fd.to_string()); - return run_path_with_cstr(&p, &readlink).ok() + return run_path_with_cstr(&p, &readlink).ok(); } _ => { return None; @@ -832,7 +832,8 @@ impl Iterator for ReadDir { let mut entry = MaybeUninit::uninit(); let mut entry_ptr: *mut dirent64 = ptr::null_mut(); - let err = libc::readdir_r(self.inner.dirp.0, entry.as_mut_ptr(), &mut entry_ptr); + let err = + libc::readdir_r(self.inner.dirp.0, entry.as_mut_ptr(), &mut entry_ptr); if err != 0 { if entry_ptr.is_null() { // We encountered an error (which will be returned in this iteration), but @@ -862,6 +863,7 @@ impl Iterator for ReadDir { target_os = "l4re" ))] use libc::readdir64; + use crate::sys::io::{errno, set_errno}; set_errno(0); @@ -1336,9 +1338,7 @@ impl File { cvt(unsafe { libc::flock(self.as_raw_fd(), libc::LOCK_EX) })?; Ok(()) } - _ => { - Err(io::const_error!(io::ErrorKind::Unsupported, "lock() not supported")) - } + _ => Err(io::const_error!(io::ErrorKind::Unsupported, "lock() not supported")), } } @@ -1360,9 +1360,7 @@ impl File { cvt(unsafe { libc::flock(self.as_raw_fd(), libc::LOCK_SH) })?; Ok(()) } - _ => { - Err(io::const_error!(io::ErrorKind::Unsupported, "lock_shared() not supported")) - } + _ => Err(io::const_error!(io::ErrorKind::Unsupported, "lock_shared() not supported")), } } @@ -1381,7 +1379,8 @@ impl File { target_os = "android", target_vendor = "apple", ) => { - let result = cvt(unsafe { libc::flock(self.as_raw_fd(), libc::LOCK_EX | libc::LOCK_NB) }); + let result = + cvt(unsafe { libc::flock(self.as_raw_fd(), libc::LOCK_EX | libc::LOCK_NB) }); if let Err(err) = result { if err.kind() == io::ErrorKind::WouldBlock { Err(TryLockError::WouldBlock) @@ -1392,18 +1391,16 @@ impl File { Ok(()) } } - _ => { - Err(TryLockError::Error(io::const_error!( - io::ErrorKind::Unsupported, - "try_lock() not supported" - ))) - } + _ => Err(TryLockError::Error(io::const_error!( + io::ErrorKind::Unsupported, + "try_lock() not supported" + ))), } } pub fn try_lock_shared(&self) -> Result<(), TryLockError> { cfg_select! { - any( + any( target_os = "freebsd", target_os = "fuchsia", target_os = "hurd", @@ -1416,7 +1413,8 @@ impl File { target_os = "android", target_vendor = "apple", ) => { - let result = cvt(unsafe { libc::flock(self.as_raw_fd(), libc::LOCK_SH | libc::LOCK_NB) }); + let result = + cvt(unsafe { libc::flock(self.as_raw_fd(), libc::LOCK_SH | libc::LOCK_NB) }); if let Err(err) = result { if err.kind() == io::ErrorKind::WouldBlock { Err(TryLockError::WouldBlock) @@ -1427,12 +1425,10 @@ impl File { Ok(()) } } - _ => { - Err(TryLockError::Error(io::const_error!( - io::ErrorKind::Unsupported, - "try_lock_shared() not supported" - ))) - } + _ => Err(TryLockError::Error(io::const_error!( + io::ErrorKind::Unsupported, + "try_lock_shared() not supported" + ))), } } @@ -1454,9 +1450,7 @@ impl File { cvt(unsafe { libc::flock(self.as_raw_fd(), libc::LOCK_UN) })?; Ok(()) } - _ => { - Err(io::const_error!(io::ErrorKind::Unsupported, "unlock() not supported")) - } + _ => Err(io::const_error!(io::ErrorKind::Unsupported, "unlock() not supported")), } } @@ -1557,7 +1551,13 @@ impl File { pub fn set_times(&self, times: FileTimes) -> io::Result<()> { cfg_select! { - any(target_os = "redox", target_os = "espidf", target_os = "horizon", target_os = "nuttx", target_os = "l4re") => { + any( + target_os = "redox", + target_os = "espidf", + target_os = "horizon", + target_os = "nuttx", + target_os = "l4re" + ) => { // Redox doesn't appear to support `UTIME_OMIT`. // ESP-IDF and HorizonOS do not support `futimens` at all and the behavior for those OS is therefore // the same as for Redox. @@ -1569,17 +1569,22 @@ impl File { } target_vendor = "apple" => { let ta = TimesAttrlist::from_times(×)?; - cvt(unsafe { libc::fsetattrlist( - self.as_raw_fd(), - ta.attrlist(), - ta.times_buf(), - ta.times_buf_size(), - 0 - ) })?; + cvt(unsafe { + libc::fsetattrlist( + self.as_raw_fd(), + ta.attrlist(), + ta.times_buf(), + ta.times_buf_size(), + 0, + ) + })?; Ok(()) } target_os = "android" => { - let times = [file_time_to_timespec(times.accessed)?, file_time_to_timespec(times.modified)?]; + let times = [ + file_time_to_timespec(times.accessed)?, + file_time_to_timespec(times.modified)?, + ]; // futimens requires Android API level 19 cvt(unsafe { weak!( @@ -1587,18 +1592,26 @@ impl File { ); match futimens.get() { Some(futimens) => futimens(self.as_raw_fd(), times.as_ptr()), - None => return Err(io::const_error!( - io::ErrorKind::Unsupported, - "setting file times requires Android API level >= 19", - )), + None => { + return Err(io::const_error!( + io::ErrorKind::Unsupported, + "setting file times requires Android API level >= 19", + )); + } } })?; Ok(()) } _ => { - #[cfg(all(target_os = "linux", target_env = "gnu", target_pointer_width = "32", not(target_arch = "riscv32")))] + #[cfg(all( + target_os = "linux", + target_env = "gnu", + target_pointer_width = "32", + not(target_arch = "riscv32") + ))] { - use crate::sys::pal::{time::__timespec64, weak::weak}; + use crate::sys::pal::time::__timespec64; + use crate::sys::pal::weak::weak; // Added in glibc 2.34 weak!( @@ -1606,14 +1619,19 @@ impl File { ); if let Some(futimens64) = __futimens64.get() { - let to_timespec = |time: Option| time.map(|time| time.t.to_timespec64()) - .unwrap_or(__timespec64::new(0, libc::UTIME_OMIT as _)); + let to_timespec = |time: Option| { + time.map(|time| time.t.to_timespec64()) + .unwrap_or(__timespec64::new(0, libc::UTIME_OMIT as _)) + }; let times = [to_timespec(times.accessed), to_timespec(times.modified)]; cvt(unsafe { futimens64(self.as_raw_fd(), times.as_ptr()) })?; return Ok(()); } } - let times = [file_time_to_timespec(times.accessed)?, file_time_to_timespec(times.modified)?]; + let times = [ + file_time_to_timespec(times.accessed)?, + file_time_to_timespec(times.modified)?, + ]; cvt(unsafe { libc::futimens(self.as_raw_fd(), times.as_ptr()) })?; Ok(()) } @@ -1873,8 +1891,7 @@ pub fn set_perm_nofollow(p: &CStr, perm: FilePermissions) -> io::Result<()> { // wasm32-wasip1 targets do not support fchmodat, so we fall down to // open + fchmod target_os = "wasi" => { - use crate::fs::OpenOptions; - use crate::fs::Permissions; + use crate::fs::{OpenOptions, Permissions}; use crate::os::wasi::ffi::OsStrExt; use crate::os::wasi::fs::OpenOptionsExt; @@ -1890,13 +1907,8 @@ pub fn set_perm_nofollow(p: &CStr, perm: FilePermissions) -> io::Result<()> { libc::fchmodat(libc::AT_FDCWD, p.as_ptr(), perm.mode, libc::AT_SYMLINK_NOFOLLOW) }) .map(|_| ()) - }, - _ => { - cvt_r(|| unsafe { - libc::fchmodat(libc::AT_FDCWD, p.as_ptr(), perm.mode, 0) - }) - .map(|_| ()) } + _ => cvt_r(|| unsafe { libc::fchmodat(libc::AT_FDCWD, p.as_ptr(), perm.mode, 0) }).map(|_| ()), } } @@ -1955,7 +1967,9 @@ pub fn link(original: &CStr, link: &CStr) -> io::Result<()> { _ => { // Where we can, use `linkat` instead of `link`; see the comment above // this one for details on why. - cvt(unsafe { libc::linkat(libc::AT_FDCWD, original.as_ptr(), libc::AT_FDCWD, link.as_ptr(), 0) })?; + cvt(unsafe { + libc::linkat(libc::AT_FDCWD, original.as_ptr(), libc::AT_FDCWD, link.as_ptr(), 0) + })?; } } Ok(()) @@ -2021,72 +2035,96 @@ fn open_from(from: &Path) -> io::Result<(crate::fs::File, crate::fs::Metadata)> fn set_times_impl(p: &CStr, times: FileTimes, follow_symlinks: bool) -> io::Result<()> { cfg_select! { - any(target_os = "redox", target_os = "espidf", target_os = "horizon", target_os = "nuttx", target_os = "vita", target_os = "rtems") => { + any( + target_os = "redox", + target_os = "espidf", + target_os = "horizon", + target_os = "nuttx", + target_os = "vita", + target_os = "rtems" + ) => { let _ = (p, times, follow_symlinks); - Err(io::const_error!( - io::ErrorKind::Unsupported, - "setting file times not supported", - )) - } - target_vendor = "apple" => { + Err(io::const_error!(io::ErrorKind::Unsupported, "setting file times not supported")) + } + target_vendor = "apple" => { // Apple platforms use setattrlist which supports setting times on symlinks let ta = TimesAttrlist::from_times(×)?; - let options = if follow_symlinks { - 0 - } else { - libc::FSOPT_NOFOLLOW - }; + let options = if follow_symlinks { 0 } else { libc::FSOPT_NOFOLLOW }; - cvt(unsafe { libc::setattrlist( - p.as_ptr(), - ta.attrlist(), - ta.times_buf(), - ta.times_buf_size(), - options as u32 - ) })?; + cvt(unsafe { + libc::setattrlist( + p.as_ptr(), + ta.attrlist(), + ta.times_buf(), + ta.times_buf_size(), + options as u32, + ) + })?; Ok(()) - } - target_os = "android" => { - let times = [file_time_to_timespec(times.accessed)?, file_time_to_timespec(times.modified)?]; + } + target_os = "android" => { + let times = + [file_time_to_timespec(times.accessed)?, file_time_to_timespec(times.modified)?]; let flags = if follow_symlinks { 0 } else { libc::AT_SYMLINK_NOFOLLOW }; // utimensat requires Android API level 19 cvt(unsafe { weak!( - fn utimensat(dirfd: c_int, path: *const libc::c_char, times: *const libc::timespec, flags: c_int) -> c_int; + fn utimensat( + dirfd: c_int, + path: *const libc::c_char, + times: *const libc::timespec, + flags: c_int, + ) -> c_int; ); match utimensat.get() { Some(utimensat) => utimensat(libc::AT_FDCWD, p.as_ptr(), times.as_ptr(), flags), - None => return Err(io::const_error!( - io::ErrorKind::Unsupported, - "setting file times requires Android API level >= 19", - )), + None => { + return Err(io::const_error!( + io::ErrorKind::Unsupported, + "setting file times requires Android API level >= 19", + )); + } } })?; Ok(()) - } - _ => { + } + _ => { let flags = if follow_symlinks { 0 } else { libc::AT_SYMLINK_NOFOLLOW }; - #[cfg(all(target_os = "linux", target_env = "gnu", target_pointer_width = "32", not(target_arch = "riscv32")))] + #[cfg(all( + target_os = "linux", + target_env = "gnu", + target_pointer_width = "32", + not(target_arch = "riscv32") + ))] { - use crate::sys::pal::{time::__timespec64, weak::weak}; + use crate::sys::pal::time::__timespec64; + use crate::sys::pal::weak::weak; // Added in glibc 2.34 weak!( - fn __utimensat64(dirfd: c_int, path: *const c_char, times: *const __timespec64, flags: c_int) -> c_int; + fn __utimensat64( + dirfd: c_int, + path: *const c_char, + times: *const __timespec64, + flags: c_int, + ) -> c_int; ); if let Some(utimensat64) = __utimensat64.get() { - let to_timespec = |time: Option| time.map(|time| time.t.to_timespec64()) - .unwrap_or(__timespec64::new(0, libc::UTIME_OMIT as _)); + let to_timespec = |time: Option| { + time.map(|time| time.t.to_timespec64()) + .unwrap_or(__timespec64::new(0, libc::UTIME_OMIT as _)) + }; let times = [to_timespec(times.accessed), to_timespec(times.modified)]; cvt(unsafe { utimensat64(libc::AT_FDCWD, p.as_ptr(), times.as_ptr(), flags) })?; return Ok(()); } } - let times = [file_time_to_timespec(times.accessed)?, file_time_to_timespec(times.modified)?]; + let times = + [file_time_to_timespec(times.accessed)?, file_time_to_timespec(times.modified)?]; cvt(unsafe { libc::utimensat(libc::AT_FDCWD, p.as_ptr(), times.as_ptr(), flags) })?; Ok(()) - } + } } } diff --git a/library/std/src/sys/fs/unix/dir.rs b/library/std/src/sys/fs/unix/dir.rs index 13a17350ff7b9..84c5c24668bff 100644 --- a/library/std/src/sys/fs/unix/dir.rs +++ b/library/std/src/sys/fs/unix/dir.rs @@ -1,14 +1,12 @@ use libc::{c_int, renameat, unlinkat}; cfg_select! { - not( - any( - all(target_os = "linux", not(target_env = "musl")), - target_os = "l4re", - target_os = "android", - target_os = "hurd", - ) - ) => { + not(any( + all(target_os = "linux", not(target_env = "musl")), + target_os = "l4re", + target_os = "android", + target_os = "hurd", + )) => { use libc::{open as open64, openat as openat64}; } _ => { diff --git a/library/std/src/sys/io/error/mod.rs b/library/std/src/sys/io/error/mod.rs index 1b6bfea27d3b0..a56030f17709f 100644 --- a/library/std/src/sys/io/error/mod.rs +++ b/library/std/src/sys/io/error/mod.rs @@ -31,12 +31,7 @@ cfg_select! { mod xous; pub use xous::*; } - any( - target_os = "vexos", - target_family = "wasm", - target_os = "zkvm", - target_os = "trusty", - ) => { + any(target_os = "vexos", target_family = "wasm", target_os = "zkvm", target_os = "trusty") => { mod generic; pub use generic::*; } diff --git a/library/std/src/sys/io/kernel_copy/mod.rs b/library/std/src/sys/io/kernel_copy/mod.rs index bb71fde631cce..6f4b13042cd7f 100644 --- a/library/std/src/sys/io/kernel_copy/mod.rs +++ b/library/std/src/sys/io/kernel_copy/mod.rs @@ -2,5 +2,5 @@ cfg_select! { any(target_os = "linux", target_os = "android") => { mod linux; } - _ => { } + _ => {} } diff --git a/library/std/src/sys/net/connection/socket/mod.rs b/library/std/src/sys/net/connection/socket/mod.rs index b7840d2c054c3..9defc24ee2e10 100644 --- a/library/std/src/sys/net/connection/socket/mod.rs +++ b/library/std/src/sys/net/connection/socket/mod.rs @@ -54,24 +54,27 @@ cfg_select! { target_os = "nuttx", target_vendor = "apple", ) => { - use c::IPV6_JOIN_GROUP as IPV6_ADD_MEMBERSHIP; - use c::IPV6_LEAVE_GROUP as IPV6_DROP_MEMBERSHIP; + use c::{IPV6_JOIN_GROUP as IPV6_ADD_MEMBERSHIP, IPV6_LEAVE_GROUP as IPV6_DROP_MEMBERSHIP}; } _ => { - use c::IPV6_ADD_MEMBERSHIP; - use c::IPV6_DROP_MEMBERSHIP; + use c::{IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP}; } } cfg_select! { any( - target_os = "linux", target_os = "android", + target_os = "linux", + target_os = "android", target_os = "hurd", - target_os = "dragonfly", target_os = "freebsd", - target_os = "openbsd", target_os = "netbsd", - target_os = "solaris", target_os = "illumos", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "openbsd", + target_os = "netbsd", + target_os = "solaris", + target_os = "illumos", target_os = "haiku", - target_os = "nto", target_os = "qnx", + target_os = "nto", + target_os = "qnx", target_os = "cygwin", ) => { use libc::MSG_NOSIGNAL; @@ -83,10 +86,14 @@ cfg_select! { cfg_select! { any( - target_os = "dragonfly", target_os = "freebsd", - target_os = "openbsd", target_os = "netbsd", - target_os = "solaris", target_os = "illumos", - target_os = "nto", target_os = "qnx", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "openbsd", + target_os = "netbsd", + target_os = "solaris", + target_os = "illumos", + target_os = "nto", + target_os = "qnx", ) => { use crate::ffi::c_uchar; type IpV4MultiCastType = c_uchar; diff --git a/library/std/src/sys/net/connection/socket/unix.rs b/library/std/src/sys/net/connection/socket/unix.rs index 3062d53d879a8..15e9dc2c7cc9d 100644 --- a/library/std/src/sys/net/connection/socket/unix.rs +++ b/library/std/src/sys/net/connection/socket/unix.rs @@ -88,7 +88,9 @@ impl Socket { // DragonFlyBSD, FreeBSD and NetBSD use `SO_NOSIGPIPE` as a `setsockopt` // flag to disable `SIGPIPE` emission on socket. #[cfg(any(target_os = "freebsd", target_os = "netbsd", target_os = "dragonfly"))] - unsafe { setsockopt(&socket, libc::SOL_SOCKET, libc::SO_NOSIGPIPE, 1)? }; + unsafe { + setsockopt(&socket, libc::SOL_SOCKET, libc::SO_NOSIGPIPE, 1)? + }; Ok(socket) } @@ -101,7 +103,9 @@ impl Socket { // macOS and iOS use `SO_NOSIGPIPE` as a `setsockopt` // flag to disable `SIGPIPE` emission on socket. #[cfg(target_vendor = "apple")] - unsafe { setsockopt(&socket, libc::SOL_SOCKET, libc::SO_NOSIGPIPE, 1)? }; + unsafe { + setsockopt(&socket, libc::SOL_SOCKET, libc::SO_NOSIGPIPE, 1)? + }; Ok(socket) } @@ -129,7 +133,10 @@ impl Socket { ) => { // Like above, set cloexec atomically cvt(libc::socketpair(fam, ty | libc::SOCK_CLOEXEC, 0, fds.as_mut_ptr()))?; - Ok((Socket(FileDesc::from_raw_fd(fds[0])), Socket(FileDesc::from_raw_fd(fds[1])))) + Ok(( + Socket(FileDesc::from_raw_fd(fds[0])), + Socket(FileDesc::from_raw_fd(fds[1])), + )) } _ => { cvt(libc::socketpair(fam, ty, 0, fds.as_mut_ptr()))?; @@ -256,20 +263,17 @@ impl Socket { target_os = "netbsd", target_os = "openbsd", target_os = "cygwin", - ) => { - unsafe { - let fd = cvt_r(|| libc::accept4(self.as_raw_fd(), storage, len, libc::SOCK_CLOEXEC))?; - Ok(Socket(FileDesc::from_raw_fd(fd))) - } - } - _ => { - unsafe { - let fd = cvt_r(|| libc::accept(self.as_raw_fd(), storage, len))?; - let fd = FileDesc::from_raw_fd(fd); - fd.set_cloexec()?; - Ok(Socket(fd)) - } - } + ) => unsafe { + let fd = + cvt_r(|| libc::accept4(self.as_raw_fd(), storage, len, libc::SOCK_CLOEXEC))?; + Ok(Socket(FileDesc::from_raw_fd(fd))) + }, + _ => unsafe { + let fd = cvt_r(|| libc::accept(self.as_raw_fd(), storage, len))?; + let fd = FileDesc::from_raw_fd(fd); + fd.set_cloexec()?; + Ok(Socket(fd)) + }, } } diff --git a/library/std/src/sys/pal/sgx/abi/tls/mod.rs b/library/std/src/sys/pal/sgx/abi/tls/mod.rs index 553814dcb5fda..537b506d94506 100644 --- a/library/std/src/sys/pal/sgx/abi/tls/mod.rs +++ b/library/std/src/sys/pal/sgx/abi/tls/mod.rs @@ -1,3 +1,14 @@ +#![deny( + clippy::arithmetic_side_effects, + clippy::expect_used, + clippy::unwrap_used, + clippy::indexing_slicing, + clippy::panic, + clippy::unreachable, + clippy::unimplemented, + reason = "TLS accesses must not call the global allocator, including via panic (#160930)" +)] + mod sync_bitset; use self::sync_bitset::*; @@ -31,11 +42,11 @@ pub struct Key(NonZero); impl Key { fn to_index(self) -> usize { - self.0.get() - 1 + self.0.get().wrapping_sub(1) } fn from_index(index: usize) -> Self { - Key(NonZero::new(index + 1).unwrap()) + Key(rtunwrap!(Some, NonZero::new(index.wrapping_add(1)))) } pub fn as_usize(self) -> usize { @@ -43,7 +54,7 @@ impl Key { } pub fn from_usize(index: usize) -> Self { - Key(NonZero::new(index).unwrap()) + Key(rtunwrap!(Some, NonZero::new(index))) } } @@ -61,7 +72,7 @@ impl<'a> Drop for ActiveTls<'a> { let value_with_destructor = |key: usize| { let ptr = TLS_DESTRUCTOR[key].load(Ordering::Relaxed); unsafe { mem::transmute::<_, Option>(ptr) } - .map(|dtor| (&self.tls.data[key], dtor)) + .map(|dtor| (self.tls.data_index(key), dtor)) }; let mut any_non_null_dtor = true; @@ -94,27 +105,32 @@ impl Tls { unsafe { &*(get_tls_ptr() as *const Tls) } } + fn data_index(&self, idx: usize) -> &Cell<*mut u8> { + rtunwrap!(Some, self.data.get(idx)) + } + pub fn create(dtor: Option) -> Key { let index = if let Some(index) = TLS_KEY_IN_USE.set() { index } else { rtabort!("TLS limit exceeded") }; - TLS_DESTRUCTOR[index].store(dtor.map_or(0, |f| f as usize), Ordering::Relaxed); - unsafe { Self::current() }.data[index].set(ptr::null_mut()); + rtunwrap!(Some, TLS_DESTRUCTOR.get(index)) + .store(dtor.map_or(0, |f| f as usize), Ordering::Relaxed); + unsafe { Self::current() }.data_index(index).set(ptr::null_mut()); Key::from_index(index) } pub fn set(key: Key, value: *mut u8) { let index = key.to_index(); rtassert!(TLS_KEY_IN_USE.get(index)); - unsafe { Self::current() }.data[index].set(value); + unsafe { Self::current() }.data_index(index).set(value); } pub fn get(key: Key) -> *mut u8 { let index = key.to_index(); rtassert!(TLS_KEY_IN_USE.get(index)); - unsafe { Self::current() }.data[index].get() + unsafe { Self::current() }.data_index(index).get() } pub fn destroy(key: Key) { diff --git a/library/std/src/sys/pal/sgx/abi/tls/sync_bitset.rs b/library/std/src/sys/pal/sgx/abi/tls/sync_bitset.rs index 9087168589aa5..173d88b97cc9d 100644 --- a/library/std/src/sys/pal/sgx/abi/tls/sync_bitset.rs +++ b/library/std/src/sys/pal/sgx/abi/tls/sync_bitset.rs @@ -13,9 +13,13 @@ pub(super) const SYNC_BITSET_INIT: SyncBitset = SyncBitset([AtomicUsize::new(0), AtomicUsize::new(0)]); impl SyncBitset { + fn inner_get(&self, idx: usize) -> &Atomic { + rtunwrap!(Some, self.0.get(idx)) + } + pub fn get(&self, index: usize) -> bool { let (hi, lo) = Self::split(index); - (self.0[hi].load(Ordering::Relaxed) & lo) != 0 + (self.inner_get(hi).load(Ordering::Relaxed) & lo) != 0 } /// Not atomic. @@ -25,7 +29,7 @@ impl SyncBitset { pub fn clear(&self, index: usize) { let (hi, lo) = Self::split(index); - self.0[hi].fetch_and(!lo, Ordering::Relaxed); + self.inner_get(hi).fetch_and(!lo, Ordering::Relaxed); } /// Sets any unset bit. Not atomic. Returns `None` if all bits were @@ -44,7 +48,7 @@ impl SyncBitset { Ordering::AcqRel, Ordering::Relaxed, ) { - Ok(_) => return Some(idx * USIZE_BITS + trailing_ones), + Ok(_) => return Some(idx.wrapping_mul(USIZE_BITS).wrapping_add(trailing_ones)), Err(previous) => current = previous, } } @@ -68,17 +72,17 @@ impl<'a> Iterator for SyncBitsetIter<'a> { fn next(&mut self) -> Option { self.iter.peek().cloned().and_then(|(idx, elem)| { let elem = elem.load(Ordering::Relaxed); - let low_mask = (1 << self.elem_idx) - 1; + let low_mask = usize::wrapping_sub(1 << self.elem_idx, 1); let next = elem & !low_mask; let next_idx = next.trailing_zeros() as usize; - self.elem_idx = next_idx + 1; + self.elem_idx = next_idx.wrapping_add(1); if self.elem_idx >= 64 { self.elem_idx = 0; self.iter.next(); } match next_idx { 64 => self.next(), - _ => Some(idx * USIZE_BITS + next_idx), + _ => Some(idx.wrapping_mul(USIZE_BITS).wrapping_add(next_idx)), } }) } diff --git a/library/std/src/sys/pal/unix/mod.rs b/library/std/src/sys/pal/unix/mod.rs index 2d6242028e0be..e4a18794f7823 100644 --- a/library/std/src/sys/pal/unix/mod.rs +++ b/library/std/src/sys/pal/unix/mod.rs @@ -302,8 +302,12 @@ pub fn abort_internal() -> ! { cfg_select! { target_os = "android" => { - #[link(name = "dl", kind = "static", modifiers = "-bundle", - cfg(target_feature = "crt-static"))] + #[link( + name = "dl", + kind = "static", + modifiers = "-bundle", + cfg(target_feature = "crt-static") + )] #[link(name = "dl", cfg(not(target_feature = "crt-static")))] #[link(name = "log", cfg(not(target_feature = "crt-static")))] unsafe extern "C" {} diff --git a/library/std/src/sys/paths/mod.rs b/library/std/src/sys/paths/mod.rs index 8880a837af7f9..57f894249ae74 100644 --- a/library/std/src/sys/paths/mod.rs +++ b/library/std/src/sys/paths/mod.rs @@ -5,7 +5,9 @@ cfg_select! { mod unsupported; mod imp { pub use super::hermit::{getcwd, temp_dir}; - pub use super::unsupported::{chdir, SplitPaths, split_paths, JoinPathsError, join_paths, current_exe, home_dir}; + pub use super::unsupported::{ + JoinPathsError, SplitPaths, chdir, current_exe, home_dir, join_paths, split_paths, + }; } } target_os = "motor" => { @@ -13,8 +15,10 @@ cfg_select! { #[expect(dead_code)] mod unsupported; mod imp { - pub use super::motor::{getcwd, chdir, current_exe, temp_dir}; - pub use super::unsupported::{SplitPaths, split_paths, JoinPathsError, join_paths, home_dir}; + pub use super::motor::{chdir, current_exe, getcwd, temp_dir}; + pub use super::unsupported::{ + JoinPathsError, SplitPaths, home_dir, join_paths, split_paths, + }; } } all(target_vendor = "fortanix", target_env = "sgx") => { @@ -23,7 +27,10 @@ cfg_select! { mod unsupported; mod imp { pub use super::sgx::chdir; - pub use super::unsupported::{getcwd, SplitPaths, split_paths, JoinPathsError, join_paths, current_exe, temp_dir, home_dir}; + pub use super::unsupported::{ + JoinPathsError, SplitPaths, current_exe, getcwd, home_dir, join_paths, split_paths, + temp_dir, + }; } } target_os = "uefi" => { @@ -39,8 +46,10 @@ cfg_select! { #[expect(dead_code)] mod unsupported; mod imp { - pub use super::wasi::{getcwd, chdir, temp_dir}; - pub use super::unsupported::{current_exe, SplitPaths, split_paths, JoinPathsError, join_paths, home_dir}; + pub use super::unsupported::{ + JoinPathsError, SplitPaths, current_exe, home_dir, join_paths, split_paths, + }; + pub use super::wasi::{chdir, getcwd, temp_dir}; } } target_os = "windows" => { diff --git a/library/std/src/sys/personality/gcc.rs b/library/std/src/sys/personality/gcc.rs index 0e20a4192b1b9..b2fa38293f4e5 100644 --- a/library/std/src/sys/personality/gcc.rs +++ b/library/std/src/sys/personality/gcc.rs @@ -94,11 +94,7 @@ const UNWIND_DATA_REG: (i32, i32) = (4, 5); // a0, a1 // https://github.com/gcc-mirror/gcc/blob/trunk/libgcc/unwind-c.c cfg_select! { - all( - target_arch = "arm", - not(target_vendor = "apple"), - not(target_os = "netbsd"), - ) => { + all(target_arch = "arm", not(target_vendor = "apple"), not(target_os = "netbsd")) => { /// personality fn called by [ARM EHABI][armeabi-eh] /// /// 32-bit ARM on iOS/tvOS/watchOS does not use ARM EHABI, it uses @@ -138,7 +134,11 @@ cfg_select! { // take only the context pointer, GCC personality routines stash a pointer to // exception_object in the context, using location reserved for ARM's // "scratch register" (r12). - uw::_Unwind_SetGR(context, uw::UNWIND_POINTER_REG, exception_object as uw::_Unwind_Ptr); + uw::_Unwind_SetGR( + context, + uw::UNWIND_POINTER_REG, + exception_object as uw::_Unwind_Ptr, + ); // ...A more principled approach would be to provide the full definition of ARM's // _Unwind_Context in our libunwind bindings and fetch the required data from there // directly, bypassing DWARF compatibility functions. @@ -164,8 +164,12 @@ cfg_select! { } else { match eh_action { EHAction::None => return continue_unwind(exception_object, context), - EHAction::Filter(_) if state & uw::_US_FORCE_UNWIND as c_int != 0 => return continue_unwind(exception_object, context), - EHAction::Cleanup(lpad) | EHAction::Catch(lpad) | EHAction::Filter(lpad) => { + EHAction::Filter(_) if state & uw::_US_FORCE_UNWIND as c_int != 0 => { + return continue_unwind(exception_object, context); + } + EHAction::Cleanup(lpad) + | EHAction::Catch(lpad) + | EHAction::Filter(lpad) => { uw::_Unwind_SetGR( context, UNWIND_DATA_REG.0, @@ -260,13 +264,13 @@ cfg_select! { match eh_action { EHAction::None => uw::_URC_CONTINUE_UNWIND, // Forced unwinding hits a terminate action. - EHAction::Filter(_) if actions & uw::_UA_FORCE_UNWIND != 0 => uw::_URC_CONTINUE_UNWIND, - EHAction::Cleanup(lpad) | EHAction::Catch(lpad) | EHAction::Filter(lpad) => { - uw::_Unwind_SetGR( - context, - UNWIND_DATA_REG.0, - exception_object.cast(), - ); + EHAction::Filter(_) if actions & uw::_UA_FORCE_UNWIND != 0 => { + uw::_URC_CONTINUE_UNWIND + } + EHAction::Cleanup(lpad) + | EHAction::Catch(lpad) + | EHAction::Filter(lpad) => { + uw::_Unwind_SetGR(context, UNWIND_DATA_REG.0, exception_object.cast()); uw::_Unwind_SetGR(context, UNWIND_DATA_REG.1, core::ptr::null()); let maybe_signed_lpad = sign_lpad(context, lpad); uw::_Unwind_SetIP(context, maybe_signed_lpad); @@ -280,7 +284,11 @@ cfg_select! { cfg_select! { any( - all(windows, any(target_arch = "aarch64", target_arch = "x86_64"), target_env = "gnu"), + all( + windows, + any(target_arch = "aarch64", target_arch = "x86_64"), + target_env = "gnu" + ), target_os = "cygwin", ) => { /// personality fn called by [Windows Structured Exception Handling][windows-eh] diff --git a/library/std/src/sys/pipe/unix.rs b/library/std/src/sys/pipe/unix.rs index bb97e806a0400..86397ecd0badf 100644 --- a/library/std/src/sys/pipe/unix.rs +++ b/library/std/src/sys/pipe/unix.rs @@ -23,22 +23,18 @@ pub fn pipe() -> io::Result<(Pipe, Pipe)> { target_os = "openbsd", target_os = "cygwin", target_os = "redox" - ) => { - unsafe { - cvt(libc::pipe2(fds.as_mut_ptr(), libc::O_CLOEXEC))?; - Ok((Pipe::from_raw_fd(fds[0]), Pipe::from_raw_fd(fds[1]))) - } - } - _ => { - unsafe { - cvt(libc::pipe(fds.as_mut_ptr()))?; + ) => unsafe { + cvt(libc::pipe2(fds.as_mut_ptr(), libc::O_CLOEXEC))?; + Ok((Pipe::from_raw_fd(fds[0]), Pipe::from_raw_fd(fds[1]))) + }, + _ => unsafe { + cvt(libc::pipe(fds.as_mut_ptr()))?; - let fd0 = Pipe::from_raw_fd(fds[0]); - let fd1 = Pipe::from_raw_fd(fds[1]); - fd0.set_cloexec()?; - fd1.set_cloexec()?; - Ok((fd0, fd1)) - } - } + let fd0 = Pipe::from_raw_fd(fds[0]); + let fd1 = Pipe::from_raw_fd(fds[1]); + fd0.set_cloexec()?; + fd1.set_cloexec()?; + Ok((fd0, fd1)) + }, } } diff --git a/library/std/src/sys/process/unix/common.rs b/library/std/src/sys/process/unix/common.rs index a67c14b58faf1..4f281a4d62751 100644 --- a/library/std/src/sys/process/unix/common.rs +++ b/library/std/src/sys/process/unix/common.rs @@ -24,7 +24,7 @@ mod cstring_array; cfg_select! { target_os = "fuchsia" => { // fuchsia doesn't have /dev/null - }, + } target_os = "l4re" => { // l4re doesn't have /dev/null } @@ -51,9 +51,10 @@ cfg_select! { #[allow(dead_code)] pub unsafe fn sigaddset(set: *mut libc::sigset_t, signum: libc::c_int) -> libc::c_int { - use crate::slice; use libc::{c_ulong, sigset_t}; + use crate::slice; + // The implementations from bionic (android libc) type pun `sigset_t` as an // array of `c_ulong`. This works, but lets add a smoke check to make sure // that doesn't change. @@ -78,7 +79,7 @@ cfg_select! { } _ => { #[allow(unused_imports)] - pub use libc::{sigemptyset, sigaddset}; + pub use libc::{sigaddset, sigemptyset}; } } diff --git a/library/std/src/sys/process/unix/mod.rs b/library/std/src/sys/process/unix/mod.rs index 47baf5a1e92ed..f56163757c0ef 100644 --- a/library/std/src/sys/process/unix/mod.rs +++ b/library/std/src/sys/process/unix/mod.rs @@ -13,7 +13,13 @@ cfg_select! { mod vxworks; use vxworks as imp; } - any(target_os = "espidf", target_os = "horizon", target_os = "vita", target_os = "nuttx", target_os = "l4re") => { + any( + target_os = "espidf", + target_os = "horizon", + target_os = "vita", + target_os = "nuttx", + target_os = "l4re" + ) => { mod unsupported; use unsupported as imp; pub use unsupported::output; diff --git a/library/std/src/sys/process/unix/unix.rs b/library/std/src/sys/process/unix/unix.rs index 34bf78e8bb325..6103fa3576f37 100644 --- a/library/std/src/sys/process/unix/unix.rs +++ b/library/std/src/sys/process/unix/unix.rs @@ -21,17 +21,17 @@ use crate::{fmt, mem, sys}; cfg_select! { any(target_os = "nto", target_os = "qnx") => { - use crate::thread; use libc::{c_char, posix_spawn_file_actions_t, posix_spawnattr_t}; - use crate::time::Duration; + use crate::sync::LazyLock; + use crate::thread; + use crate::time::Duration; // Get smallest amount of time we can sleep. // Return a common value if it cannot be determined. fn get_clock_resolution() -> Duration { static MIN_DELAY: LazyLock Duration> = LazyLock::new(|| { let mut mindelay = libc::timespec { tv_sec: 0, tv_nsec: 0 }; - if unsafe { libc::clock_getres(libc::CLOCK_MONOTONIC, &mut mindelay) } == 0 - { + if unsafe { libc::clock_getres(libc::CLOCK_MONOTONIC, &mut mindelay) } == 0 { Duration::from_nanos(mindelay.tv_nsec as u64) } else { Duration::from_millis(1) @@ -512,15 +512,22 @@ impl Command { support = FORK_EXEC; // but for the fast path we need both spawnp and the // pidfd -> pid conversion to work. - if pidfd_spawnp.get().is_some() && let Ok(pid) = pidfd.pid() { + if pidfd_spawnp.get().is_some() + && let Ok(pid) = pidfd.pid() + { assert_eq!(pid, crate::process::id(), "sanity check"); support = SPAWN; } } - Err(e) if matches!(e.raw_os_error(), Some(libc::EMFILE | libc::ENFILE | libc::ENOMEM)) => { + Err(e) + if matches!( + e.raw_os_error(), + Some(libc::EMFILE | libc::ENFILE | libc::ENOMEM) + ) => + { // We're temporarily(?) out of file descriptors or memory. In this case pidfd_spawnp would also fail // Don't update the support flag so we can probe again later. - return Err(e) + return Err(e); } _ => { // pidfd_open not available? likely an old kernel without pidfd support. diff --git a/library/std/src/sys/random/mod.rs b/library/std/src/sys/random/mod.rs index 5b0d19cc63eca..bc3dd501730b7 100644 --- a/library/std/src/sys/random/mod.rs +++ b/library/std/src/sys/random/mod.rs @@ -11,7 +11,7 @@ cfg_select! { target_vendor = "apple" => { mod apple; pub use apple::fill_bytes; - // Others, in alphabetical ordering. + // Others, in alphabetical ordering. } any( target_os = "dragonfly", @@ -49,12 +49,7 @@ cfg_select! { mod getrandom; pub use getrandom::fill_bytes; } - any( - target_os = "aix", - target_os = "hurd", - target_os = "nto", - target_os = "qnx", - ) => { + any(target_os = "aix", target_os = "hurd", target_os = "nto", target_os = "qnx") => { mod unix_legacy; pub use unix_legacy::fill_bytes; } diff --git a/library/std/src/sys/random/uefi.rs b/library/std/src/sys/random/uefi.rs index f7a7600835195..e6fbb5379c964 100644 --- a/library/std/src/sys/random/uefi.rs +++ b/library/std/src/sys/random/uefi.rs @@ -57,13 +57,15 @@ mod rng_protocol { mod rdrand { cfg_select! { target_arch = "x86_64" => { - use crate::arch::x86_64 as arch; use arch::_rdrand64_step as rdrand_step; + + use crate::arch::x86_64 as arch; type Word = u64; } target_arch = "x86" => { - use crate::arch::x86 as arch; use arch::_rdrand32_step as rdrand_step; + + use crate::arch::x86 as arch; type Word = u32; } } diff --git a/library/std/src/sys/sync/condvar/mod.rs b/library/std/src/sys/sync/condvar/mod.rs index 0e8a4ed9ece86..615781ea9b7dc 100644 --- a/library/std/src/sys/sync/condvar/mod.rs +++ b/library/std/src/sys/sync/condvar/mod.rs @@ -1,6 +1,6 @@ cfg_select! { any( - all(target_os = "windows", not(target_vendor="win7")), + all(target_os = "windows", not(target_vendor = "win7")), target_os = "linux", target_os = "android", target_os = "freebsd", @@ -15,10 +15,7 @@ cfg_select! { mod futex; pub use futex::Condvar; } - any( - target_family = "unix", - target_os = "teeos", - ) => { + any(target_family = "unix", target_os = "teeos") => { mod pthread; pub use pthread::Condvar; } diff --git a/library/std/src/sys/sync/futex/unix.rs b/library/std/src/sys/sync/futex/unix.rs index 16fda3ecbc7c3..9291860d4934c 100644 --- a/library/std/src/sys/sync/futex/unix.rs +++ b/library/std/src/sys/sync/futex/unix.rs @@ -67,7 +67,7 @@ pub fn futex_wait(futex: &Atomic, expected: u32, timeout: Option) expected, timespec.as_ref().map_or(null(), |t| t as *const libc::timespec), null::(), // This argument is unused for FUTEX_WAIT_BITSET. - !0u32, // A full bitmask, to make it behave like a regular FUTEX_WAIT. + !0u32, // A full bitmask, to make it behave like a regular FUTEX_WAIT. ) } _ => { diff --git a/library/std/src/sys/sync/mutex/mod.rs b/library/std/src/sys/sync/mutex/mod.rs index 9ec251b7e4049..895ab9c895697 100644 --- a/library/std/src/sys/sync/mutex/mod.rs +++ b/library/std/src/sys/sync/mutex/mod.rs @@ -18,10 +18,7 @@ cfg_select! { mod fuchsia; pub use fuchsia::Mutex; } - any( - target_family = "unix", - target_os = "teeos", - ) => { + any(target_family = "unix", target_os = "teeos") => { mod pthread; pub use pthread::Mutex; } diff --git a/library/std/src/sys/sync/once/mod.rs b/library/std/src/sys/sync/once/mod.rs index 3bdb6c9f85ebb..eee7edf8575fc 100644 --- a/library/std/src/sys/sync/once/mod.rs +++ b/library/std/src/sys/sync/once/mod.rs @@ -9,7 +9,7 @@ cfg_select! { any( - all(target_os = "windows", not(target_vendor="win7")), + all(target_os = "windows", not(target_vendor = "win7")), target_os = "linux", target_os = "android", all(target_family = "wasm", target_feature = "atomics"), diff --git a/library/std/src/sys/sync/thread_parking/mod.rs b/library/std/src/sys/sync/thread_parking/mod.rs index fe4c830ce38bb..f1385ef7bdde6 100644 --- a/library/std/src/sys/sync/thread_parking/mod.rs +++ b/library/std/src/sys/sync/thread_parking/mod.rs @@ -36,10 +36,7 @@ cfg_select! { mod xous; pub use xous::Parker; } - any( - target_family = "unix", - target_os = "teeos", - ) => { + any(target_family = "unix", target_os = "teeos") => { mod pthread; pub use pthread::Parker; } diff --git a/library/std/src/sys/thread/mod.rs b/library/std/src/sys/thread/mod.rs index 9816981c7fc88..fb5d65150395d 100644 --- a/library/std/src/sys/thread/mod.rs +++ b/library/std/src/sys/thread/mod.rs @@ -1,7 +1,7 @@ cfg_select! { target_os = "hermit" => { mod hermit; - pub use hermit::{Thread, available_parallelism, sleep, yield_now, DEFAULT_MIN_STACK_SIZE}; + pub use hermit::{DEFAULT_MIN_STACK_SIZE, Thread, available_parallelism, sleep, yield_now}; #[expect(dead_code)] mod unsupported; pub use unsupported::{current_os_id, set_name}; @@ -12,7 +12,7 @@ cfg_select! { } all(target_vendor = "fortanix", target_env = "sgx") => { mod sgx; - pub use sgx::{Thread, current_os_id, sleep, yield_now, DEFAULT_MIN_STACK_SIZE}; + pub use sgx::{DEFAULT_MIN_STACK_SIZE, Thread, current_os_id, sleep, yield_now}; // SGX should protect in-enclave data from outside attackers, so there // must not be any data leakage to the OS, particularly no 1-1 mapping @@ -29,14 +29,14 @@ cfg_select! { } target_os = "solid_asp3" => { mod solid; - pub use solid::{Thread, sleep, yield_now, DEFAULT_MIN_STACK_SIZE}; + pub use solid::{DEFAULT_MIN_STACK_SIZE, Thread, sleep, yield_now}; #[expect(dead_code)] mod unsupported; pub use unsupported::{available_parallelism, current_os_id, set_name}; } target_os = "teeos" => { mod teeos; - pub use teeos::{Thread, sleep, yield_now, DEFAULT_MIN_STACK_SIZE}; + pub use teeos::{DEFAULT_MIN_STACK_SIZE, Thread, sleep, yield_now}; #[expect(dead_code)] mod unsupported; pub use unsupported::{available_parallelism, current_os_id, set_name}; @@ -46,11 +46,10 @@ cfg_select! { pub use uefi::{available_parallelism, sleep}; #[expect(dead_code)] mod unsupported; - pub use unsupported::{Thread, current_os_id, set_name, yield_now, DEFAULT_MIN_STACK_SIZE}; + pub use unsupported::{DEFAULT_MIN_STACK_SIZE, Thread, current_os_id, set_name, yield_now}; } any(target_family = "unix", target_os = "wasi") => { mod unix; - pub use unix::{Thread, available_parallelism, current_os_id, sleep, yield_now, DEFAULT_MIN_STACK_SIZE}; #[cfg(not(any( target_env = "newlib", target_os = "l4re", @@ -75,6 +74,9 @@ cfg_select! { target_vendor = "apple", ))] pub use unix::sleep_until; + pub use unix::{ + DEFAULT_MIN_STACK_SIZE, Thread, available_parallelism, current_os_id, sleep, yield_now, + }; #[expect(dead_code)] mod unsupported; #[cfg(any( @@ -93,7 +95,9 @@ cfg_select! { pub use vexos::{sleep, sleep_until, yield_now}; #[expect(dead_code)] mod unsupported; - pub use unsupported::{Thread, available_parallelism, current_os_id, set_name, DEFAULT_MIN_STACK_SIZE}; + pub use unsupported::{ + DEFAULT_MIN_STACK_SIZE, Thread, available_parallelism, current_os_id, set_name, + }; } all(target_family = "wasm", target_feature = "atomics") => { mod wasm; @@ -101,15 +105,21 @@ cfg_select! { #[expect(dead_code)] mod unsupported; - pub use unsupported::{Thread, available_parallelism, current_os_id, set_name, yield_now, DEFAULT_MIN_STACK_SIZE}; + pub use unsupported::{ + DEFAULT_MIN_STACK_SIZE, Thread, available_parallelism, current_os_id, set_name, + yield_now, + }; } target_os = "windows" => { mod windows; - pub use windows::{Thread, available_parallelism, current_os_id, set_name, set_name_wide, sleep, yield_now, DEFAULT_MIN_STACK_SIZE}; + pub use windows::{ + DEFAULT_MIN_STACK_SIZE, Thread, available_parallelism, current_os_id, set_name, + set_name_wide, sleep, yield_now, + }; } target_os = "xous" => { mod xous; - pub use xous::{Thread, available_parallelism, sleep, yield_now, DEFAULT_MIN_STACK_SIZE}; + pub use xous::{DEFAULT_MIN_STACK_SIZE, Thread, available_parallelism, sleep, yield_now}; #[expect(dead_code)] mod unsupported; @@ -117,7 +127,10 @@ cfg_select! { } _ => { mod unsupported; - pub use unsupported::{Thread, available_parallelism, current_os_id, set_name, sleep, yield_now, DEFAULT_MIN_STACK_SIZE}; + pub use unsupported::{ + DEFAULT_MIN_STACK_SIZE, Thread, available_parallelism, current_os_id, set_name, sleep, + yield_now, + }; } } diff --git a/library/std/src/sys/thread/unix.rs b/library/std/src/sys/thread/unix.rs index 2dbb0314cb271..abcdfe89476e1 100644 --- a/library/std/src/sys/thread/unix.rs +++ b/library/std/src/sys/thread/unix.rs @@ -181,7 +181,7 @@ pub fn available_parallelism() -> io::Result> { // none was explicitly set. // In that case we use the sysconf fallback. if let Some(count) = NonZero::new(count) { - return Ok(count) + return Ok(count); } } } @@ -198,10 +198,10 @@ pub fn available_parallelism() -> io::Result> { } } any( - target_os = "freebsd", - target_os = "dragonfly", - target_os = "openbsd", - target_os = "netbsd", + target_os = "freebsd", + target_os = "dragonfly", + target_os = "openbsd", + target_os = "netbsd", ) => { use crate::ptr; @@ -215,7 +215,8 @@ pub fn available_parallelism() -> io::Result> { -1, size_of::(), &mut set, - ) == 0 { + ) == 0 + { let count = libc::CPU_COUNT(&set) as usize; if count > 0 { return Ok(NonZero::new_unchecked(count)); @@ -230,7 +231,12 @@ pub fn available_parallelism() -> io::Result> { let set = libc::_cpuset_create(); if !set.is_null() { let mut count: usize = 0; - if libc::pthread_getaffinity_np(libc::pthread_self(), libc::_cpuset_size(set), set) == 0 { + if libc::pthread_getaffinity_np( + libc::pthread_self(), + libc::_cpuset_size(set), + set, + ) == 0 + { for i in 0..libc::cpuid_t::MAX { match libc::_cpuset_isset(i, set) { -1 => break, @@ -278,21 +284,26 @@ pub fn available_parallelism() -> io::Result> { Ok(unsafe { NonZero::new_unchecked(cpus as usize) }) } - any(target_os = "nto", target_os = "qnx") => { - unsafe { - use libc::_syspage_ptr; - if _syspage_ptr.is_null() { - Err(io::const_error!(io::ErrorKind::NotFound, "no syspage available")) - } else { - let cpus = (*_syspage_ptr).num_cpu; - NonZero::new(cpus as usize) - .ok_or(io::Error::UNKNOWN_THREAD_COUNT) - } + any(target_os = "nto", target_os = "qnx") => unsafe { + use libc::_syspage_ptr; + if _syspage_ptr.is_null() { + Err(io::const_error!(io::ErrorKind::NotFound, "no syspage available")) + } else { + let cpus = (*_syspage_ptr).num_cpu; + NonZero::new(cpus as usize).ok_or(io::Error::UNKNOWN_THREAD_COUNT) } - } + }, any(target_os = "solaris", target_os = "illumos") => { let mut cpus = 0u32; - if unsafe { libc::pset_info(libc::PS_MYID, core::ptr::null_mut(), &mut cpus, core::ptr::null_mut()) } != 0 { + if unsafe { + libc::pset_info( + libc::PS_MYID, + core::ptr::null_mut(), + &mut cpus, + core::ptr::null_mut(), + ) + } != 0 + { return Err(io::Error::UNKNOWN_THREAD_COUNT); } Ok(unsafe { NonZero::new_unchecked(cpus as usize) }) @@ -316,14 +327,17 @@ pub fn available_parallelism() -> io::Result> { // expectations than the actual cores availability. // SAFETY: `vxCpuEnabledGet` always fetches a mask with at least one bit set - unsafe{ + unsafe { let set = libc::vxCpuEnabledGet(); Ok(NonZero::new_unchecked(set.count_ones() as usize)) } } _ => { // FIXME: implement on l4re - Err(io::const_error!(io::ErrorKind::Unsupported, "getting the number of hardware threads is not supported on the target platform")) + Err(io::const_error!( + io::ErrorKind::Unsupported, + "getting the number of hardware threads is not supported on the target platform" + )) } } } @@ -341,7 +355,9 @@ pub fn current_os_id() -> Option { // `libc::gettid` is only available on glibc 2.30+, but the syscall is available // since Linux 2.4.11. - syscall!(fn gettid() -> libc::pid_t;); + syscall!( + fn gettid() -> libc::pid_t; + ); // SAFETY: FFI call with no preconditions. let id: libc::pid_t = unsafe { gettid() }; @@ -378,11 +394,7 @@ pub fn current_os_id() -> Option { let mut id = 0u64; // SAFETY: `thread_id` is a valid pointer, no other preconditions. let status: libc::c_int = unsafe { libc::pthread_threadid_np(0, &mut id) }; - if status == 0 { - Some(id) - } else { - None - } + if status == 0 { Some(id) } else { None } } // Other platforms don't have an OS thread ID or don't have a way to access it. _ => None, @@ -563,12 +575,18 @@ pub fn sleep(dur: Duration) { // wasi-libc prior to WebAssembly/wasi-libc#696 has a broken implementation // of `nanosleep` which used `CLOCK_REALTIME` even though it is unsupported // on WASIp2. Using `clock_nanosleep` directly bypasses the issue. - unsafe fn nanosleep(rqtp: *const libc::timespec, rmtp: *mut libc::timespec) -> libc::c_int { + unsafe fn nanosleep( + rqtp: *const libc::timespec, + rmtp: *mut libc::timespec, + ) -> libc::c_int { unsafe { libc::clock_nanosleep(crate::sys::time::Instant::CLOCK_ID, 0, rqtp, rmtp) } } } _ => { - unsafe fn nanosleep(rqtp: *const libc::timespec, rmtp: *mut libc::timespec) -> libc::c_int { + unsafe fn nanosleep( + rqtp: *const libc::timespec, + rmtp: *mut libc::timespec, + ) -> libc::c_int { let r = unsafe { libc::nanosleep(rqtp, rmtp) }; // `clock_nanosleep` returns the error number directly, so mimic // that behaviour to make the shared code below simpler. diff --git a/library/std/src/sys/thread_local/mod.rs b/library/std/src/sys/thread_local/mod.rs index 2158bb3e275f9..809ef5cfe9c60 100644 --- a/library/std/src/sys/thread_local/mod.rs +++ b/library/std/src/sys/thread_local/mod.rs @@ -52,8 +52,8 @@ cfg_select! { } _ => { mod os; - pub use os::{Storage, thread_local_inner, value_align}; pub(crate) use os::{LocalPointer, local_pointer}; + pub use os::{Storage, thread_local_inner, value_align}; } } @@ -126,10 +126,7 @@ pub(crate) mod guard { use crate::rt::thread_cleanup; } } - any( - target_os = "hermit", - target_os = "xous", - ) => { + any(target_os = "hermit", target_os = "xous") => { // `std` is the only runtime, so it just calls the destructor functions // itself when the time comes. pub(crate) fn enable() {} @@ -154,11 +151,7 @@ pub(crate) mod guard { pub(crate) mod key { cfg_select! { any( - all( - not(target_vendor = "apple"), - not(target_family = "wasm"), - target_family = "unix", - ), + all(not(target_vendor = "apple"), not(target_family = "wasm"), target_family = "unix"), all(not(target_thread_local), target_vendor = "apple"), target_os = "teeos", all(target_os = "wasi", target_env = "p3"), @@ -168,9 +161,9 @@ pub(crate) mod key { #[cfg(test)] mod tests; pub(super) use racy::LazyKey; - pub(super) use unix::{Key, set}; #[cfg(any(not(target_thread_local), test))] pub(super) use unix::get; + pub(super) use unix::{Key, set}; use unix::{create, destroy}; } all(not(target_thread_local), target_os = "windows") => { @@ -202,9 +195,9 @@ pub(crate) mod key { mod racy; #[cfg(test)] mod tests; - pub(super) use racy::LazyKey; pub(super) use moto_rt::tls::{Key, get, set}; use moto_rt::tls::{create, destroy}; + pub(super) use racy::LazyKey; } _ => {} } diff --git a/library/std/src/sys/time/mod.rs b/library/std/src/sys/time/mod.rs index cf29a5a5ab700..179c968ee2681 100644 --- a/library/std/src/sys/time/mod.rs +++ b/library/std/src/sys/time/mod.rs @@ -14,12 +14,7 @@ cfg_select! { mod uefi; use uefi as imp; } - any( - target_os = "hermit", - target_os = "teeos", - target_family = "unix", - target_os = "wasi", - ) => { + any(target_os = "hermit", target_os = "teeos", target_family = "unix", target_os = "wasi") => { mod unix; use unix as imp; } @@ -29,8 +24,8 @@ cfg_select! { mod unsupported; mod imp { - pub use super::vexos::Instant; pub use super::unsupported::{SystemTime, UNIX_EPOCH}; + pub use super::vexos::Instant; } } target_os = "windows" => { diff --git a/library/std/src/thread/id.rs b/library/std/src/thread/id.rs index 3da0825db604d..33b1c453614ff 100644 --- a/library/std/src/thread/id.rs +++ b/library/std/src/thread/id.rs @@ -50,7 +50,12 @@ impl ThreadId { exhausted(); }; - match COUNTER.compare_exchange_weak(last, id, Ordering::Relaxed, Ordering::Relaxed) { + match COUNTER.compare_exchange_weak( + last, + id, + Ordering::Relaxed, + Ordering::Relaxed, + ) { Ok(_) => return ThreadId(NonZero::new(id).unwrap()), Err(id) => last = id, } diff --git a/library/std/src/thread/local.rs b/library/std/src/thread/local.rs index 118d9e07cd4eb..7a05a962e2ac0 100644 --- a/library/std/src/thread/local.rs +++ b/library/std/src/thread/local.rs @@ -641,7 +641,7 @@ impl LocalKey> { /// X.update(|x| x + 1); /// assert_eq!(X.get(), 6); /// ``` - #[stable(feature = "local_key_cell_update", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "local_key_cell_update", since = "1.99.0")] pub fn update(&'static self, f: impl FnOnce(T) -> T) where T: Copy, diff --git a/library/std/src/thread/main_thread.rs b/library/std/src/thread/main_thread.rs index 394074a593674..2e1d23ebdb369 100644 --- a/library/std/src/thread/main_thread.rs +++ b/library/std/src/thread/main_thread.rs @@ -14,8 +14,8 @@ cfg_select! { target_has_atomic = "64" => { use super::id::ThreadId; - use crate::sync::atomic::{Atomic, AtomicU64}; use crate::sync::atomic::Ordering::Relaxed; + use crate::sync::atomic::{Atomic, AtomicU64}; static MAIN: Atomic = AtomicU64::new(0); @@ -32,18 +32,14 @@ cfg_select! { _ => { use super::id::ThreadId; use crate::mem::MaybeUninit; - use crate::sync::atomic::{Atomic, AtomicBool}; use crate::sync::atomic::Ordering::{Acquire, Release}; + use crate::sync::atomic::{Atomic, AtomicBool}; static INIT: Atomic = AtomicBool::new(false); static mut MAIN: MaybeUninit = MaybeUninit::uninit(); pub(super) fn get() -> Option { - if INIT.load(Acquire) { - Some(unsafe { MAIN.assume_init() }) - } else { - None - } + if INIT.load(Acquire) { Some(unsafe { MAIN.assume_init() }) } else { None } } /// # Safety diff --git a/library/std/tests/env_modify.rs b/library/std/tests/env_modify.rs index 3404ca537acca..71d15bc1c47c0 100644 --- a/library/std/tests/env_modify.rs +++ b/library/std/tests/env_modify.rs @@ -128,7 +128,11 @@ fn env_home_dir() { assert_ne!(home_dir(), Some(PathBuf::from("/home/MountainView"))); } - if let Some(oldhome) = oldhome { unsafe { set_var("HOME", oldhome); } } + if let Some(oldhome) = oldhome { + unsafe { + set_var("HOME", oldhome); + } + } } windows => { let oldhome = var_to_os_string(var("HOME")); @@ -141,7 +145,11 @@ fn env_home_dir() { assert!(home_dir().is_some()); set_var("HOME", "/home/PaloAlto"); - assert_ne!(home_dir(), Some(PathBuf::from("/home/PaloAlto")), "HOME must not be used"); + assert_ne!( + home_dir(), + Some(PathBuf::from("/home/PaloAlto")), + "HOME must not be used" + ); set_var("USERPROFILE", "/home/MountainView"); assert_eq!(home_dir(), Some(PathBuf::from("/home/MountainView"))); @@ -151,12 +159,20 @@ fn env_home_dir() { assert_eq!(home_dir(), Some(PathBuf::from("/home/MountainView"))); set_var("USERPROFILE", ""); - assert_ne!(home_dir(), Some(PathBuf::from("")), "Empty USERPROFILE must be ignored"); + assert_ne!( + home_dir(), + Some(PathBuf::from("")), + "Empty USERPROFILE must be ignored" + ); remove_var("USERPROFILE"); - if let Some(oldhome) = oldhome { set_var("HOME", oldhome); } - if let Some(olduserprofile) = olduserprofile { set_var("USERPROFILE", olduserprofile); } + if let Some(oldhome) = oldhome { + set_var("HOME", oldhome); + } + if let Some(olduserprofile) = olduserprofile { + set_var("USERPROFILE", olduserprofile); + } } } _ => {} diff --git a/library/std/tests/sync/rwlock.rs b/library/std/tests/sync/rwlock.rs index 4a7572bf50350..311866dab4733 100644 --- a/library/std/tests/sync/rwlock.rs +++ b/library/std/tests/sync/rwlock.rs @@ -905,42 +905,35 @@ fn test_rwlock_max_readers() { let mut read_lock_ctr: u32 = 0; let rwlock: RwLock = RwLock::new(0); - const MAX_READERS: u32 = cfg_select! { - miri => 100, - any( - all(target_os = "windows", not(target_vendor = "win7")), - target_os = "linux", - target_os = "android", - target_os = "freebsd", - target_os = "openbsd", - target_os = "dragonfly", - target_os = "fuchsia", - all(target_family = "wasm", target_feature = "atomics"), - target_os = "hermit", - target_os = "motor", - ) => { - (1 << 30) - 2 - }, - any( - target_family = "unix", - all(target_os = "windows", target_vendor = "win7", target_pointer_width = "64"), - all(target_vendor = "fortanix", target_env = "sgx"), - target_os = "xous", - target_os = "teeos", - ) => { - u32::MAX - }, - // Otherwise a form of deadlock is observed. - all(target_os = "windows", target_vendor = "win7", target_pointer_width = "32") => { - (1 << 28) - 1 - }, - target_os = "solid_asp3" => { - (1 << 30) - }, - _ => { - u32::MAX - } - }; + const MAX_READERS: u32 = + cfg_select! { + miri => 100, + any( + all(target_os = "windows", not(target_vendor = "win7")), + target_os = "linux", + target_os = "android", + target_os = "freebsd", + target_os = "openbsd", + target_os = "dragonfly", + target_os = "fuchsia", + all(target_family = "wasm", target_feature = "atomics"), + target_os = "hermit", + target_os = "motor", + ) => (1 << 30) - 2, + any( + target_family = "unix", + all(target_os = "windows", target_vendor = "win7", target_pointer_width = "64"), + all(target_vendor = "fortanix", target_env = "sgx"), + target_os = "xous", + target_os = "teeos", + ) => u32::MAX, + // Otherwise a form of deadlock is observed. + all(target_os = "windows", target_vendor = "win7", target_pointer_width = "32") => { + (1 << 28) - 1 + } + target_os = "solid_asp3" => (1 << 30), + _ => u32::MAX, + }; while read_lock_ctr < MAX_READERS { let lock = rwlock.read(); diff --git a/library/std_detect/src/detect/arch/mod.rs b/library/std_detect/src/detect/arch/mod.rs index 2be7f091c285e..2ca4cbd1e3fa0 100644 --- a/library/std_detect/src/detect/arch/mod.rs +++ b/library/std_detect/src/detect/arch/mod.rs @@ -67,7 +67,7 @@ cfg_select! { // Unimplemented architecture: #[doc(hidden)] pub(crate) enum Feature { - Null + Null, } #[doc(hidden)] #[unstable(feature = "stdarch_internal", issue = "none")] @@ -75,9 +75,13 @@ cfg_select! { impl Feature { #[doc(hidden)] - pub(crate) fn from_str(_s: &str) -> Result { Err(()) } + pub(crate) fn from_str(_s: &str) -> Result { + Err(()) + } #[doc(hidden)] - pub(crate) fn to_str(self) -> &'static str { "" } + pub(crate) fn to_str(self) -> &'static str { + "" + } } } } diff --git a/library/std_detect/src/detect/cache.rs b/library/std_detect/src/detect/cache.rs index c0c0b7b7f8635..4f1907b060572 100644 --- a/library/std_detect/src/detect/cache.rs +++ b/library/std_detect/src/detect/cache.rs @@ -121,22 +121,36 @@ cfg_select! { use alloc::vec; #[link(name = "kernel32")] unsafe extern "system" { - fn GetEnvironmentVariableA(name: *const u8, buffer: *mut u8, size: u32) -> u32; + fn GetEnvironmentVariableA( + name: *const u8, + buffer: *mut u8, + size: u32, + ) -> u32; } - let len = unsafe { GetEnvironmentVariableA(RUST_STD_DETECT_UNSTABLE.as_ptr().cast::(), core::ptr::null_mut(), 0) }; + let len = unsafe { + GetEnvironmentVariableA( + RUST_STD_DETECT_UNSTABLE.as_ptr().cast::(), + core::ptr::null_mut(), + 0, + ) + }; if len > 0 { // +1 to include the null terminator. let mut env = vec![0; len as usize + 1]; - let len = unsafe { GetEnvironmentVariableA(RUST_STD_DETECT_UNSTABLE.as_ptr().cast::(), env.as_mut_ptr(), len + 1) }; + let len = unsafe { + GetEnvironmentVariableA( + RUST_STD_DETECT_UNSTABLE.as_ptr().cast::(), + env.as_mut_ptr(), + len + 1, + ) + }; if len > 0 { disable_features(&env[..len as usize], &mut value); } } } _ => { - let env = unsafe { - libc::getenv(RUST_STD_DETECT_UNSTABLE.as_ptr()) - }; + let env = unsafe { libc::getenv(RUST_STD_DETECT_UNSTABLE.as_ptr()) }; if !env.is_null() { let len = unsafe { libc::strlen(env) }; let env = unsafe { core::slice::from_raw_parts(env as *const u8, len) }; diff --git a/library/std_detect/src/detect/os/linux/auxvec/tests.rs b/library/std_detect/src/detect/os/linux/auxvec/tests.rs index 88f0d6d493376..8028106cc8b1c 100644 --- a/library/std_detect/src/detect/os/linux/auxvec/tests.rs +++ b/library/std_detect/src/detect/os/linux/auxvec/tests.rs @@ -47,7 +47,10 @@ cfg_select! { // files on disk, so we need to embed them with `include_bytes!`. #[test] fn linux_rpi3() { - let auxv = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/detect/test_data/linux-rpi3.auxv")); + let auxv = include_bytes!(concat!( + env!("CARGO_MANIFEST_DIR"), + "/src/detect/test_data/linux-rpi3.auxv" + )); let v = auxv_from_file_bytes(auxv).unwrap(); assert_eq!(v.hwcap, 4174038); assert_eq!(v.hwcap2, 16); @@ -55,7 +58,10 @@ cfg_select! { #[test] fn linux_macos_vb() { - let auxv = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/detect/test_data/macos-virtualbox-linux-x86-4850HQ.auxv")); + let auxv = include_bytes!(concat!( + env!("CARGO_MANIFEST_DIR"), + "/src/detect/test_data/macos-virtualbox-linux-x86-4850HQ.auxv" + )); // The file contains HWCAP but not HWCAP2. In that case, we treat HWCAP2 as zero. let v = auxv_from_file_bytes(auxv).unwrap(); assert_eq!(v.hwcap, 126614527); @@ -66,7 +72,10 @@ cfg_select! { #[cfg(target_endian = "little")] #[test] fn linux_artificial_aarch64() { - let auxv = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/detect/test_data/linux-artificial-aarch64.auxv")); + let auxv = include_bytes!(concat!( + env!("CARGO_MANIFEST_DIR"), + "/src/detect/test_data/linux-artificial-aarch64.auxv" + )); let v = auxv_from_file_bytes(auxv).unwrap(); assert_eq!(v.hwcap, 0x0123456789abcdef); assert_eq!(v.hwcap2, 0x02468ace13579bdf); @@ -74,7 +83,10 @@ cfg_select! { #[cfg(target_endian = "little")] #[test] fn linux_no_hwcap2_aarch64() { - let auxv = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/detect/test_data/linux-no-hwcap2-aarch64.auxv")); + let auxv = include_bytes!(concat!( + env!("CARGO_MANIFEST_DIR"), + "/src/detect/test_data/linux-no-hwcap2-aarch64.auxv" + )); let v = auxv_from_file_bytes(auxv).unwrap(); // An absent HWCAP2 is treated as zero, and does not prevent acceptance of HWCAP. assert_ne!(v.hwcap, 0); diff --git a/library/unwind/src/lib.rs b/library/unwind/src/lib.rs index 69b5e81a39215..a64049a440d58 100644 --- a/library/unwind/src/lib.rs +++ b/library/unwind/src/lib.rs @@ -18,11 +18,7 @@ cfg_select! { target_env = "msvc" => { // Windows MSVC no extra unwinder support needed } - any( - target_os = "none", - target_os = "espidf", - target_os = "nuttx", - ) => { + any(target_os = "none", target_os = "espidf", target_os = "nuttx") => { // These "unix" family members do not have unwinder. } any( @@ -66,20 +62,35 @@ unsafe extern "C" {} #[cfg(all(target_env = "musl", not(target_abi = "pauthtest")))] cfg_select! { all(feature = "llvm-libunwind", feature = "system-llvm-libunwind") => { - compile_error!("`llvm-libunwind` and `system-llvm-libunwind` cannot be enabled at the same time"); + compile_error!( + "`llvm-libunwind` and `system-llvm-libunwind` cannot be enabled at the same time" + ); } feature = "llvm-libunwind" => { #[link(name = "unwind", kind = "static", modifiers = "-bundle")] unsafe extern "C" {} } feature = "system-llvm-libunwind" => { - #[link(name = "unwind", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))] + #[link( + name = "unwind", + kind = "static", + modifiers = "-bundle", + cfg(target_feature = "crt-static") + )] #[link(name = "unwind", cfg(not(target_feature = "crt-static")))] unsafe extern "C" {} } _ => { - #[link(name = "unwind", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))] - #[link(name = "gcc_s", cfg(all(not(target_feature = "crt-static"), not(target_arch = "hexagon"))))] + #[link( + name = "unwind", + kind = "static", + modifiers = "-bundle", + cfg(target_feature = "crt-static") + )] + #[link( + name = "gcc_s", + cfg(all(not(target_feature = "crt-static"), not(target_arch = "hexagon"))) + )] unsafe extern "C" {} } } @@ -92,7 +103,12 @@ cfg_select! { unsafe extern "C" {} } feature = "system-llvm-libunwind" => { - #[link(name = "unwind", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))] + #[link( + name = "unwind", + kind = "static", + modifiers = "-bundle", + cfg(target_feature = "crt-static") + )] #[link(name = "unwind", cfg(not(target_feature = "crt-static")))] unsafe extern "C" {} } @@ -106,14 +122,21 @@ cfg_select! { #[cfg(target_env = "ohos")] cfg_select! { all(feature = "llvm-libunwind", feature = "system-llvm-libunwind") => { - compile_error!("`llvm-libunwind` and `system-llvm-libunwind` cannot be enabled at the same time"); + compile_error!( + "`llvm-libunwind` and `system-llvm-libunwind` cannot be enabled at the same time" + ); } feature = "llvm-libunwind" => { #[link(name = "unwind", kind = "static", modifiers = "-bundle")] unsafe extern "C" {} } _ => { - #[link(name = "unwind", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))] + #[link( + name = "unwind", + kind = "static", + modifiers = "-bundle", + cfg(target_feature = "crt-static") + )] #[link(name = "unwind", cfg(not(target_feature = "crt-static")))] unsafe extern "C" {} } @@ -125,7 +148,12 @@ cfg_select! { compile_error!("`llvm-libunwind` is not supported for Android targets"); } _ => { - #[link(name = "unwind", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))] + #[link( + name = "unwind", + kind = "static", + modifiers = "-bundle", + cfg(target_feature = "crt-static") + )] #[link(name = "unwind", cfg(not(target_feature = "crt-static")))] unsafe extern "C" {} } diff --git a/library/unwind/src/libunwind.rs b/library/unwind/src/libunwind.rs index faf091e505e0b..4dc3cb393181c 100644 --- a/library/unwind/src/libunwind.rs +++ b/library/unwind/src/libunwind.rs @@ -59,10 +59,11 @@ cfg_select! { pub fn _Unwind_GetGR(ctx: *mut _Unwind_Context, reg_index: c_int) -> _Unwind_Word; pub fn _Unwind_SetGR(ctx: *mut _Unwind_Context, reg_index: c_int, value: _Unwind_Word); pub fn _Unwind_SetIP(ctx: *mut _Unwind_Context, value: _Unwind_Word); - pub fn _Unwind_GetIPInfo(ctx: *mut _Unwind_Context, ip_before_insn: *mut c_int) - -> _Unwind_Word; + pub fn _Unwind_GetIPInfo( + ctx: *mut _Unwind_Context, + ip_before_insn: *mut c_int, + ) -> _Unwind_Word; } - } _ => { // ARM EHABI @@ -113,51 +114,69 @@ cfg_select! { link(name = "unwind", kind = "static", modifiers = "-bundle") )] unsafe extern "C" { - fn _Unwind_VRS_Get(ctx: *mut _Unwind_Context, - regclass: _Unwind_VRS_RegClass, - regno: _Unwind_Word, - repr: _Unwind_VRS_DataRepresentation, - data: *mut c_void) - -> _Unwind_VRS_Result; - - fn _Unwind_VRS_Set(ctx: *mut _Unwind_Context, - regclass: _Unwind_VRS_RegClass, - regno: _Unwind_Word, - repr: _Unwind_VRS_DataRepresentation, - data: *mut c_void) - -> _Unwind_VRS_Result; + fn _Unwind_VRS_Get( + ctx: *mut _Unwind_Context, + regclass: _Unwind_VRS_RegClass, + regno: _Unwind_Word, + repr: _Unwind_VRS_DataRepresentation, + data: *mut c_void, + ) -> _Unwind_VRS_Result; + + fn _Unwind_VRS_Set( + ctx: *mut _Unwind_Context, + regclass: _Unwind_VRS_RegClass, + regno: _Unwind_Word, + repr: _Unwind_VRS_DataRepresentation, + data: *mut c_void, + ) -> _Unwind_VRS_Result; } // On Android or ARM/Linux, these are implemented as macros: pub unsafe fn _Unwind_GetGR(ctx: *mut _Unwind_Context, reg_index: c_int) -> _Unwind_Word { let mut val: _Unwind_Word = core::ptr::null(); - unsafe { _Unwind_VRS_Get(ctx, _UVRSC_CORE, reg_index as _Unwind_Word, _UVRSD_UINT32, - (&raw mut val) as *mut c_void); } + unsafe { + _Unwind_VRS_Get( + ctx, + _UVRSC_CORE, + reg_index as _Unwind_Word, + _UVRSD_UINT32, + (&raw mut val) as *mut c_void, + ); + } val } pub unsafe fn _Unwind_SetGR( ctx: *mut _Unwind_Context, reg_index: c_int, - value: _Unwind_Word + value: _Unwind_Word, ) { let mut value = value; - unsafe { _Unwind_VRS_Set(ctx, _UVRSC_CORE, reg_index as _Unwind_Word, _UVRSD_UINT32, - (&raw mut value) as *mut c_void); } + unsafe { + _Unwind_VRS_Set( + ctx, + _UVRSC_CORE, + reg_index as _Unwind_Word, + _UVRSD_UINT32, + (&raw mut value) as *mut c_void, + ); + } } - pub unsafe fn _Unwind_SetIP(ctx: *mut _Unwind_Context, - value: _Unwind_Word) { + pub unsafe fn _Unwind_SetIP(ctx: *mut _Unwind_Context, value: _Unwind_Word) { // Propagate thumb bit to instruction pointer let thumb_state = unsafe { _Unwind_GetGR(ctx, UNWIND_IP_REG).addr() & 1 }; let value = value.map_addr(|v| v | thumb_state); - unsafe { _Unwind_SetGR(ctx, UNWIND_IP_REG, value); } + unsafe { + _Unwind_SetGR(ctx, UNWIND_IP_REG, value); + } } - pub unsafe fn _Unwind_GetIPInfo(ctx: *mut _Unwind_Context, - ip_before_insn: *mut c_int) - -> _Unwind_Word { + pub unsafe fn _Unwind_GetIPInfo( + ctx: *mut _Unwind_Context, + ip_before_insn: *mut c_int, + ) -> _Unwind_Word { unsafe { *ip_before_insn = 0 }; let val = unsafe { _Unwind_GetGR(ctx, UNWIND_IP_REG) }; val.map_addr(|v| v & !1) @@ -190,20 +209,22 @@ cfg_select! { pub enum CONTEXT {} pub enum DISPATCHER_CONTEXT {} pub type EXCEPTION_DISPOSITION = c_int; - type PersonalityFn = unsafe extern "C" fn(version: c_int, - actions: _Unwind_Action, - exception_class: _Unwind_Exception_Class, - exception_object: *mut _Unwind_Exception, - context: *mut _Unwind_Context) - -> _Unwind_Reason_Code; + type PersonalityFn = unsafe extern "C" fn( + version: c_int, + actions: _Unwind_Action, + exception_class: _Unwind_Exception_Class, + exception_object: *mut _Unwind_Exception, + context: *mut _Unwind_Context, + ) -> _Unwind_Reason_Code; unsafe extern "C" { - pub fn _GCC_specific_handler(exceptionRecord: *mut EXCEPTION_RECORD, - establisherFrame: LPVOID, - contextRecord: *mut CONTEXT, - dispatcherContext: *mut DISPATCHER_CONTEXT, - personality: PersonalityFn) - -> EXCEPTION_DISPOSITION; + pub fn _GCC_specific_handler( + exceptionRecord: *mut EXCEPTION_RECORD, + establisherFrame: LPVOID, + contextRecord: *mut CONTEXT, + dispatcherContext: *mut DISPATCHER_CONTEXT, + personality: PersonalityFn, + ) -> EXCEPTION_DISPOSITION; } } _ => {} diff --git a/library/unwind/src/types.rs b/library/unwind/src/types.rs index 7634052c93f33..f7aa2554f6ee8 100644 --- a/library/unwind/src/types.rs +++ b/library/unwind/src/types.rs @@ -19,27 +19,28 @@ pub use _Unwind_Reason_Code::*; pub type _Unwind_Exception_Class = u64; pub type _Unwind_Word = *const u8; -pub const unwinder_private_data_size: usize = cfg_select! { - target_arch = "x86" => 5, - all(target_arch = "x86_64", not(any(target_os = "windows", target_os = "cygwin"))) => 2, - all(target_arch = "x86_64", any(target_os = "windows", target_os = "cygwin")) => 6, - all(target_arch = "arm", not(target_vendor = "apple")) => 20, - all(target_arch = "arm", target_vendor = "apple") => 5, - all(target_arch = "aarch64", target_pointer_width = "64", not(target_os = "windows")) => 2, - all(target_arch = "aarch64", target_pointer_width = "64", target_os = "windows") => 6, - all(target_arch = "aarch64", target_pointer_width = "32") => 5, - target_arch = "m68k" => 2, - any(target_arch = "mips", target_arch = "mips32r6") => 2, - target_arch = "csky" => 2, - any(target_arch = "mips64", target_arch = "mips64r6") => 2, - any(target_arch = "powerpc", target_arch = "powerpc64") => 2, - target_arch = "s390x" => 2, - any(target_arch = "sparc", target_arch = "sparc64") => 2, - any(target_arch = "riscv64", target_arch = "riscv32") => 2, - target_family = "wasm" => 2, - target_arch = "hexagon" => 5, - any(target_arch = "loongarch32", target_arch = "loongarch64") => 2, -}; +pub const unwinder_private_data_size: usize = + cfg_select! { + target_arch = "x86" => 5, + all(target_arch = "x86_64", not(any(target_os = "windows", target_os = "cygwin"))) => 2, + all(target_arch = "x86_64", any(target_os = "windows", target_os = "cygwin")) => 6, + all(target_arch = "arm", not(target_vendor = "apple")) => 20, + all(target_arch = "arm", target_vendor = "apple") => 5, + all(target_arch = "aarch64", target_pointer_width = "64", not(target_os = "windows")) => 2, + all(target_arch = "aarch64", target_pointer_width = "64", target_os = "windows") => 6, + all(target_arch = "aarch64", target_pointer_width = "32") => 5, + target_arch = "m68k" => 2, + any(target_arch = "mips", target_arch = "mips32r6") => 2, + target_arch = "csky" => 2, + any(target_arch = "mips64", target_arch = "mips64r6") => 2, + any(target_arch = "powerpc", target_arch = "powerpc64") => 2, + target_arch = "s390x" => 2, + any(target_arch = "sparc", target_arch = "sparc64") => 2, + any(target_arch = "riscv64", target_arch = "riscv32") => 2, + target_family = "wasm" => 2, + target_arch = "hexagon" => 5, + any(target_arch = "loongarch32", target_arch = "loongarch64") => 2, + }; #[repr(C)] pub struct _Unwind_Exception { diff --git a/license-metadata.json b/license-metadata.json index b58329b2ccc19..5656bf8acba4b 100644 --- a/license-metadata.json +++ b/license-metadata.json @@ -178,6 +178,11 @@ "type": "directory" }, { + "directories": [], + "files": [ + "compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp", + "compiler/rustc_middle/src/ptrauth/llvm_siphash/tests.rs" + ], "license": { "copyright": [ "2003-2019 University of Illinois at Urbana-Champaign", @@ -185,8 +190,7 @@ ], "spdx": "Apache-2.0 WITH LLVM-exception AND (Apache-2.0 OR MIT)" }, - "name": "compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp", - "type": "file" + "type": "group" }, { "children": [], diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs index c008ff5090a9c..ddb1fde9f9ee2 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs @@ -299,7 +299,7 @@ impl CommandLineStep for Std { if self.is_for_mir_opt_tests { ArtifactKeepMode::OnlyRmeta } else { - // We use -Zno-embed-metadata for the standard library + // We use -Zembed-metadata=no for the standard library ArtifactKeepMode::BothRlibAndRmeta }, ); @@ -2620,7 +2620,7 @@ pub enum ArtifactKeepMode { /// Only keep .rmeta files, ignore .rlib files OnlyRmeta, /// Keep both .rlib and .rmeta files. - /// This is essentially only useful when using `-Zno-embed-metadata`, in which case both the + /// This is essentially only useful when using `-Zembed-metadata=no`, in which case both the /// .rlib and .rmeta files are needed for compilation/linking. BothRlibAndRmeta, /// Custom logic for keeping an artifact diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs index f5c28c8e0445e..67abbe4faf2a1 100644 --- a/src/bootstrap/src/core/builder/cargo.rs +++ b/src/bootstrap/src/core/builder/cargo.rs @@ -1220,12 +1220,7 @@ impl Builder<'_> { cargo.env("RUSTC_BOOTSTRAP", "1"); if matches!(mode, Mode::Std) { - // The `-Zembed-metadata` flag was renamed from `-Zno-embed-metadata`. - if self.local_rebuild { - cargo.arg("-Zembed-metadata=no"); - } else { - cargo.arg("-Zno-embed-metadata"); - } + cargo.arg("-Zembed-metadata=no"); } if self.config.dump_bootstrap_shims { diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs index a8359ad34fa50..234e2c13de59e 100644 --- a/src/bootstrap/src/core/sanity.rs +++ b/src/bootstrap/src/core/sanity.rs @@ -36,7 +36,6 @@ pub struct Finder { /// when the newly-bumped stage 0 compiler now knows about the formerly-missing targets. const STAGE0_MISSING_TARGETS: &[&str] = &[ // just a dummy comment so the list doesn't get onelined - "aarch64-unknown-l4re-uclibc", ]; /// Minimum version threshold for libstdc++ required when using prebuilt LLVM diff --git a/src/ci/citool/src/metrics.rs b/src/ci/citool/src/metrics.rs index 3d8b1ad84cf72..cbbcc27eab03f 100644 --- a/src/ci/citool/src/metrics.rs +++ b/src/ci/citool/src/metrics.rs @@ -1,5 +1,7 @@ use std::collections::HashMap; use std::path::{Path, PathBuf}; +use std::sync::{Arc, Mutex}; +use std::time::Instant; use anyhow::Context; use build_helper::metrics::{JsonNode, JsonRoot, TestSuite}; @@ -51,26 +53,92 @@ pub fn download_auto_job_metrics( ) -> anyhow::Result> { let mut jobs = HashMap::default(); - for job in &job_db.auto_jobs { - eprintln!("Downloading metrics of job {}", job.name); - let metrics_parent = - parent.and_then(|parent| match download_job_metrics(&job.name, parent) { - Ok(metrics) => Some(metrics), - Err(error) => { + struct WorkItem { + job: String, + } + + struct WorkResult { + job: String, + data: anyhow::Result, + parent_data: Option>, + } + + // Avoid overloading the GitHub API + let thread_count = std::thread::available_parallelism().map(|v| v.into()).unwrap_or(4).min(4); + + // Ensure that we have enough capacity to submit all job download requests, to avoid having to + // interleave submission of work and reading of results. + let (submit_tx, submit_rx) = std::sync::mpsc::sync_channel::(job_db.auto_jobs.len()); + let submit_rx = Arc::new(Mutex::new(submit_rx)); + + let (result_tx, result_rx) = std::sync::mpsc::sync_channel::(thread_count); + + let start = Instant::now(); + // There are many jobs to download, so we do it in parallel + // To avoid adding more dependencies, we create our own little thread pool. + std::thread::scope(|s| { + for _ in 0..thread_count { + let submit_rx = submit_rx.clone(); + let result_tx = result_tx.clone(); + s.spawn(move || { + loop { + let item = { + let Ok(item) = submit_rx.lock().unwrap().recv() else { + break; + }; + item + }; + eprintln!("Downloading metrics of job {}", item.job); + let data = download_job_metrics(&item.job, current); + let parent_data = parent.map(|sha| download_job_metrics(&item.job, &sha)); + let result = WorkResult { job: item.job, data, parent_data }; + + // If the receiver was dropped, end processing downloads + if result_tx.send(result).is_err() { + break; + } + } + }); + } + + // Submit all jobs + for job in &job_db.auto_jobs { + let item = WorkItem { job: job.name.to_string() }; + submit_tx.send(item).unwrap(); + } + drop(result_tx); + drop(submit_tx); + + // Wait for results + for result in result_rx { + let parent = match result.parent_data { + Some(Ok(data)) => Some(data), + Some(Err(error)) => { eprintln!( - r#"Did not find metrics for job `{}` at `{parent}`: {error:?}. + r#"Did not find parent metrics for job `{}`: {error:?}. Maybe it was newly added?"#, - job.name + result.job ); None } - }); - let metrics_current = download_job_metrics(&job.name, current)?; - jobs.insert( - job.name.clone(), - JobMetrics { parent: metrics_parent, current: metrics_current }, - ); - } + None => None, + }; + + jobs.insert( + result.job.clone(), + JobMetrics { + parent, + current: result.data.with_context(|| { + anyhow::anyhow!("Could not download metrics for job `{}`", result.job) + })?, + }, + ); + } + + anyhow::Ok(()) + })?; + eprintln!("Download finished in {:.2}", start.elapsed().as_secs_f64()); + Ok(jobs) } diff --git a/src/doc/rustc/src/platform-support/aarch64-unknown-linux-gnu.md b/src/doc/rustc/src/platform-support/aarch64-unknown-linux-gnu.md index 36609d5742ccb..df00391ba566f 100644 --- a/src/doc/rustc/src/platform-support/aarch64-unknown-linux-gnu.md +++ b/src/doc/rustc/src/platform-support/aarch64-unknown-linux-gnu.md @@ -6,7 +6,7 @@ Target for 64-bit little endian ARMv8-A Linux 4.1+ programs using glibc 2.17+. ## Target maintainers -- [@rust-lang/arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) +- [arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) - Use `@rustbot ping arm-maintainers` to ping us [arm_maintainers]: https://github.com/rust-lang/team/blob/master/teams/arm-maintainers.toml diff --git a/src/doc/rustc/src/platform-support/aarch64-unknown-linux-pauthtest.md b/src/doc/rustc/src/platform-support/aarch64-unknown-linux-pauthtest.md index e0f11c7800dcd..1118145a2097c 100644 --- a/src/doc/rustc/src/platform-support/aarch64-unknown-linux-pauthtest.md +++ b/src/doc/rustc/src/platform-support/aarch64-unknown-linux-pauthtest.md @@ -474,10 +474,12 @@ The following categories are supported (all present in tree): * invalid_target_pointer_authentication.rs * type_discrimination_not_supported_pointer_authentication.rs * incompatible_pauth.rs +* Unit tests for siphash function: + * compiler/rustc_middle/src/ptrauth/llvm_siphash/tests.rs All tests from `assembly-llvm`, `codegen-llvm`, `codegen-units`, `coverage`, -`crashes`, `incremental`, `library`, `mir-opt`, `run-make`, `ui` and -`ui-fulldeps` subsets are expected to pass. +`crashes`, `incremental`, `library`, `mir-opt`, `run-make`, `rust_middle`, `ui` +and `ui-fulldeps` subsets are expected to pass. Command to run all passing tests (with tests added by this target explicitly named for convenience): @@ -485,7 +487,7 @@ named for convenience): ```sh x.py test --target aarch64-unknown-linux-pauthtest --force-rerun assembly-llvm \ codegen-llvm codegen-units coverage crashes incremental library mir-opt \ - run-make ui ui-fulldeps \ + run-make rust_middle ui ui-fulldeps \ tests/assembly-llvm/pauth-basic.rs \ tests/codegen-llvm/pauth/pauth-attr-cli-flags.rs \ tests/codegen-llvm/pauth/pauth-attr-special-funcs.rs \ diff --git a/src/doc/rustc/src/platform-support/aarch64-unknown-none.md b/src/doc/rustc/src/platform-support/aarch64-unknown-none.md index b9386f07fe2df..22a36657e9f66 100644 --- a/src/doc/rustc/src/platform-support/aarch64-unknown-none.md +++ b/src/doc/rustc/src/platform-support/aarch64-unknown-none.md @@ -15,7 +15,7 @@ Processors in this family include the [Arm Cortex-A35, 53, 76, etc][aarch64-cpus ## Target maintainers - [Rust Embedded Devices Working Group Arm Team] -- [@rust-lang/arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) +- [arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) - Use `@rustbot ping arm-maintainers` to ping us [Rust Embedded Devices Working Group Arm Team]: https://github.com/rust-embedded/wg?tab=readme-ov-file#the-arm-team diff --git a/src/doc/rustc/src/platform-support/aarch64v8r-unknown-none.md b/src/doc/rustc/src/platform-support/aarch64v8r-unknown-none.md index bbe9d8b3ba875..6b75ba772c2f3 100644 --- a/src/doc/rustc/src/platform-support/aarch64v8r-unknown-none.md +++ b/src/doc/rustc/src/platform-support/aarch64v8r-unknown-none.md @@ -15,7 +15,7 @@ For Armv8-R CPUs running in AArch32 mode (such as the Arm Cortex-R52), see ## Target maintainers - [Rust Embedded Devices Working Group Arm Team] -- [@rust-lang/arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) +- [arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) - Use `@rustbot ping arm-maintainers` to ping us [Rust Embedded Devices Working Group Arm Team]: https://github.com/rust-embedded/wg?tab=readme-ov-file#the-arm-team diff --git a/src/doc/rustc/src/platform-support/armv7-unknown-linux-gnueabi.md b/src/doc/rustc/src/platform-support/armv7-unknown-linux-gnueabi.md index c7888571df3d0..175d3a492acb4 100644 --- a/src/doc/rustc/src/platform-support/armv7-unknown-linux-gnueabi.md +++ b/src/doc/rustc/src/platform-support/armv7-unknown-linux-gnueabi.md @@ -7,7 +7,7 @@ Target for 32-bit little endian ARMv7-A Linux 3.2+ programs using glibc 2.17+. ## Target maintainers -- [@rust-lang/arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) +- [arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) - Use `@rustbot ping arm-maintainers` to ping us [arm_maintainers]: https://github.com/rust-lang/team/blob/master/teams/arm-maintainers.toml diff --git a/src/doc/rustc/src/platform-support/armv7a-none-eabi.md b/src/doc/rustc/src/platform-support/armv7a-none-eabi.md index 73f2e303579a0..1ad81f264cbf4 100644 --- a/src/doc/rustc/src/platform-support/armv7a-none-eabi.md +++ b/src/doc/rustc/src/platform-support/armv7a-none-eabi.md @@ -22,7 +22,7 @@ See [`arm-none-eabi`](arm-none-eabi.md) for information applicable to all ## Target maintainers - [Rust Embedded Devices Working Group Arm Team] -- [@rust-lang/arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) +- [arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) - Use `@rustbot ping arm-maintainers` to ping us [Rust Embedded Devices Working Group Arm Team]: https://github.com/rust-embedded/wg?tab=readme-ov-file#the-arm-team diff --git a/src/doc/rustc/src/platform-support/armv7r-none-eabi.md b/src/doc/rustc/src/platform-support/armv7r-none-eabi.md index d4937052a95ce..c40ceda7bfca0 100644 --- a/src/doc/rustc/src/platform-support/armv7r-none-eabi.md +++ b/src/doc/rustc/src/platform-support/armv7r-none-eabi.md @@ -20,7 +20,7 @@ See [`arm-none-eabi`](arm-none-eabi.md) for information applicable to all - [@chrisnc](https://github.com/chrisnc) - [Rust Embedded Devices Working Group Arm Team] -- [@rust-lang/arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) +- [arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) - Use `@rustbot ping arm-maintainers` to ping us [Rust Embedded Devices Working Group Arm Team]: https://github.com/rust-embedded/wg?tab=readme-ov-file#the-arm-team diff --git a/src/doc/rustc/src/platform-support/armv8r-none-eabihf.md b/src/doc/rustc/src/platform-support/armv8r-none-eabihf.md index 2f6d83e01b27d..c7b6ac1009769 100644 --- a/src/doc/rustc/src/platform-support/armv8r-none-eabihf.md +++ b/src/doc/rustc/src/platform-support/armv8r-none-eabihf.md @@ -24,7 +24,7 @@ For Armv8-R CPUs running in AArch64 mode (such as the Arm Cortex-R82), see - [@chrisnc](https://github.com/chrisnc) - [Rust Embedded Devices Working Group Arm Team] -- [@rust-lang/arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) +- [arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) - Use `@rustbot ping arm-maintainers` to ping us [Rust Embedded Devices Working Group Arm Team]: https://github.com/rust-embedded/wg?tab=readme-ov-file#the-arm-team diff --git a/src/doc/rustc/src/platform-support/thumbv7em-none-eabi.md b/src/doc/rustc/src/platform-support/thumbv7em-none-eabi.md index 1f91e2f18631b..e70d0a64d0ce0 100644 --- a/src/doc/rustc/src/platform-support/thumbv7em-none-eabi.md +++ b/src/doc/rustc/src/platform-support/thumbv7em-none-eabi.md @@ -23,7 +23,7 @@ See [`arm-none-eabi`](arm-none-eabi.md) for information applicable to all ## Target maintainers - [Rust Embedded Devices Working Group Arm Team](https://github.com/rust-embedded/wg?tab=readme-ov-file#the-arm-team) -- [@rust-lang/arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) +- [arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) - Use `@rustbot ping arm-maintainers` to ping us [arm_maintainers]: https://github.com/rust-lang/team/blob/master/teams/arm-maintainers.toml diff --git a/src/doc/rustc/src/platform-support/thumbv7m-none-eabi.md b/src/doc/rustc/src/platform-support/thumbv7m-none-eabi.md index 90f641d6e4f8e..99431eff31087 100644 --- a/src/doc/rustc/src/platform-support/thumbv7m-none-eabi.md +++ b/src/doc/rustc/src/platform-support/thumbv7m-none-eabi.md @@ -24,7 +24,7 @@ only option because there is no FPU support in [Armv7-M]. ## Target maintainers - [Rust Embedded Devices Working Group Arm Team](https://github.com/rust-embedded/wg?tab=readme-ov-file#the-arm-team) -- [@rust-lang/arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) +- [arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) - Use `@rustbot ping arm-maintainers` to ping us [arm_maintainers]: https://github.com/rust-lang/team/blob/master/teams/arm-maintainers.toml diff --git a/src/doc/rustc/src/platform-support/thumbv8m.base-none-eabi.md b/src/doc/rustc/src/platform-support/thumbv8m.base-none-eabi.md index 20fdb18eafa53..0bd78ac0881ec 100644 --- a/src/doc/rustc/src/platform-support/thumbv8m.base-none-eabi.md +++ b/src/doc/rustc/src/platform-support/thumbv8m.base-none-eabi.md @@ -24,7 +24,7 @@ only option because there is no FPU support in [Armv8-M] Baseline. ## Target maintainers - [Rust Embedded Devices Working Group Arm Team](https://github.com/rust-embedded/wg?tab=readme-ov-file#the-arm-team) -- [@rust-lang/arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) +- [arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) - Use `@rustbot ping arm-maintainers` to ping us [arm_maintainers]: https://github.com/rust-lang/team/blob/master/teams/arm-maintainers.toml diff --git a/src/doc/rustc/src/platform-support/thumbv8m.main-none-eabi.md b/src/doc/rustc/src/platform-support/thumbv8m.main-none-eabi.md index ab77153be92b7..29233fb92b799 100644 --- a/src/doc/rustc/src/platform-support/thumbv8m.main-none-eabi.md +++ b/src/doc/rustc/src/platform-support/thumbv8m.main-none-eabi.md @@ -27,7 +27,7 @@ See [`arm-none-eabi`](arm-none-eabi.md) for information applicable to all ## Target maintainers - [Rust Embedded Devices Working Group Arm Team](https://github.com/rust-embedded/wg?tab=readme-ov-file#the-arm-team) -- [@rust-lang/arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) +- [arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) - Use `@rustbot ping arm-maintainers` to ping us [arm_maintainers]: https://github.com/rust-lang/team/blob/master/teams/arm-maintainers.toml diff --git a/src/doc/rustc/src/platform-support/unknown-uefi.md b/src/doc/rustc/src/platform-support/unknown-uefi.md index d286ab4fb35a5..ddc3499ffd170 100644 --- a/src/doc/rustc/src/platform-support/unknown-uefi.md +++ b/src/doc/rustc/src/platform-support/unknown-uefi.md @@ -15,7 +15,7 @@ Available targets: - [@dvdhrm](https://github.com/dvdhrm) - [@nicholasbishop](https://github.com/nicholasbishop) -- (for `aarch64-unknown-uefi` only) [@rust-lang/arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) +- (for `aarch64-unknown-uefi` only) [arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) - Use `@rustbot ping arm-maintainers` to ping us [arm_maintainers]: https://github.com/rust-lang/team/blob/master/teams/arm-maintainers.toml diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 9f972376c11ac..784a80ef02cd2 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -265,7 +265,7 @@ fn generate_item_with_correct_attrs( } fn clean_generic_bound<'tcx>( - bound: &hir::GenericBound<'tcx>, + bound: &hir::GenericBound<'_>, cx: &mut DocContext<'tcx>, ) -> Option { Some(match bound { @@ -451,7 +451,7 @@ pub(crate) fn clean_clause<'tcx>( } fn clean_poly_trait_predicate<'tcx>( - pred: ty::PolyTraitPredicate<'tcx>, + pred: ty::PolyTraitClause<'tcx>, cx: &mut DocContext<'tcx>, ) -> Option { // `T: [const] Destruct` is hidden because `T: Destruct` is a no-op. @@ -509,7 +509,7 @@ fn clean_middle_term<'tcx>( fn clean_hir_term<'tcx>( assoc_item: Option, - term: &hir::Term<'tcx>, + term: &hir::Term<'_>, cx: &mut DocContext<'tcx>, ) -> Term { match term { @@ -524,7 +524,7 @@ fn clean_hir_term<'tcx>( } fn clean_projection_predicate<'tcx>( - pred: ty::Binder<'tcx, ty::ProjectionPredicate<'tcx>>, + pred: ty::Binder<'tcx, ty::ProjectionClause<'tcx>>, cx: &mut DocContext<'tcx>, ) -> WherePredicate { WherePredicate::ProjectionPredicate { @@ -657,8 +657,8 @@ enum ParamDefaults { fn clean_generic_param<'tcx>( cx: &mut DocContext<'tcx>, - generics: Option<&hir::Generics<'tcx>>, - param: &hir::GenericParam<'tcx>, + generics: Option<&hir::Generics<'_>>, + param: &hir::GenericParam<'_>, ) -> GenericParamDef { let (name, kind) = match param.kind { hir::GenericParamKind::Lifetime { .. } => { @@ -1161,7 +1161,7 @@ fn clean_function<'tcx>( fn clean_params<'tcx>( cx: &mut DocContext<'tcx>, - decl: &hir::FnDecl<'tcx>, + decl: &hir::FnDecl<'_>, idents: &[Option], postprocess: impl Fn(Option) -> Option, ) -> Vec { @@ -1197,7 +1197,7 @@ fn clean_params_via_body<'tcx>( fn clean_fn_decl_with_params<'tcx>( cx: &mut DocContext<'tcx>, - decl: &hir::FnDecl<'tcx>, + decl: &hir::FnDecl<'_>, header: Option<&hir::FnHeader>, params: Vec, ) -> FnDecl { @@ -1253,14 +1253,14 @@ fn clean_poly_fn_sig<'tcx>( FnDecl { inputs: params, output, c_variadic: sig.skip_binder().c_variadic() } } -fn clean_trait_ref<'tcx>(trait_ref: &hir::TraitRef<'tcx>, cx: &mut DocContext<'tcx>) -> Path { +fn clean_trait_ref<'tcx>(trait_ref: &hir::TraitRef<'_>, cx: &mut DocContext<'tcx>) -> Path { let path = clean_path(trait_ref.path, cx); register_res(cx, path.res); path } fn clean_poly_trait_ref<'tcx>( - poly_trait_ref: &hir::PolyTraitRef<'tcx>, + poly_trait_ref: &hir::PolyTraitRef<'_>, cx: &mut DocContext<'tcx>, ) -> PolyTrait { PolyTrait { @@ -1610,8 +1610,8 @@ pub(crate) fn clean_middle_assoc_item(assoc_item: &ty::AssocItem, cx: &mut DocCo fn first_non_private_clean_path<'tcx>( cx: &mut DocContext<'tcx>, - path: &hir::Path<'tcx>, - new_path_segments: &'tcx [hir::PathSegment<'tcx>], + path: &hir::Path<'_>, + new_path_segments: &[hir::PathSegment<'_>], new_path_span: rustc_span::Span, ) -> Path { let new_hir_path = @@ -1639,7 +1639,7 @@ fn first_non_private_clean_path<'tcx>( fn first_non_private<'tcx>( cx: &mut DocContext<'tcx>, hir_id: hir::HirId, - path: &hir::Path<'tcx>, + path: &hir::Path<'_>, ) -> Option { let target_def_id = path.res.opt_def_id()?; let (parent_def_id, ident) = match &path.segments { @@ -1727,7 +1727,7 @@ fn first_non_private<'tcx>( None } -fn clean_qpath<'tcx>(hir_ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> Type { +fn clean_qpath<'tcx>(hir_ty: &hir::Ty<'_>, cx: &mut DocContext<'tcx>) -> Type { let hir::Ty { hir_id, span, ref kind } = *hir_ty; let hir::TyKind::Path(qpath) = kind else { unreachable!() }; @@ -1815,7 +1815,7 @@ fn clean_qpath<'tcx>(hir_ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> Type fn maybe_expand_private_type_alias<'tcx>( cx: &mut DocContext<'tcx>, - path: &hir::Path<'tcx>, + path: &hir::Path<'_>, ) -> Option { let Res::Def(DefKind::TyAlias, def_id) = path.res else { return None }; // Substitute private type aliases @@ -1885,7 +1885,7 @@ fn maybe_expand_private_type_alias<'tcx>( })) } -pub(crate) fn clean_ty<'tcx>(ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> Type { +pub(crate) fn clean_ty<'tcx>(ty: &hir::Ty<'_>, cx: &mut DocContext<'tcx>) -> Type { use rustc_hir::*; match ty.kind { @@ -2637,7 +2637,7 @@ fn clean_variant_data<'tcx>( Variant { discriminant, kind } } -fn clean_path<'tcx>(path: &hir::Path<'tcx>, cx: &mut DocContext<'tcx>) -> Path { +fn clean_path<'tcx>(path: &hir::Path<'_>, cx: &mut DocContext<'tcx>) -> Path { Path { res: path.res, segments: path.segments.iter().map(|x| clean_path_segment(x, cx)).collect(), @@ -2646,7 +2646,7 @@ fn clean_path<'tcx>(path: &hir::Path<'tcx>, cx: &mut DocContext<'tcx>) -> Path { fn clean_generic_args<'tcx>( trait_did: Option, - generic_args: &hir::GenericArgs<'tcx>, + generic_args: &hir::GenericArgs<'_>, cx: &mut DocContext<'tcx>, ) -> GenericArgs { match generic_args.parenthesized { @@ -2694,10 +2694,7 @@ fn clean_generic_args<'tcx>( } } -fn clean_path_segment<'tcx>( - path: &hir::PathSegment<'tcx>, - cx: &mut DocContext<'tcx>, -) -> PathSegment { +fn clean_path_segment<'tcx>(path: &hir::PathSegment<'_>, cx: &mut DocContext<'tcx>) -> PathSegment { let trait_did = match path.res { hir::def::Res::Def(DefKind::Trait | DefKind::TraitAlias, did) => Some(did), _ => None, @@ -2706,7 +2703,7 @@ fn clean_path_segment<'tcx>( } fn clean_bare_fn_ty<'tcx>( - bare_fn: &hir::FnPtrTy<'tcx>, + bare_fn: &hir::FnPtrTy<'_>, cx: &mut DocContext<'tcx>, ) -> BareFunctionDecl { let (generic_params, decl) = enter_impl_trait(cx, |cx| { @@ -2735,7 +2732,7 @@ fn clean_bare_fn_ty<'tcx>( } fn clean_unsafe_binder_ty<'tcx>( - unsafe_binder_ty: &hir::UnsafeBinderTy<'tcx>, + unsafe_binder_ty: &hir::UnsafeBinderTy<'_>, cx: &mut DocContext<'tcx>, ) -> UnsafeBinderTy { let generic_params = unsafe_binder_ty @@ -3166,7 +3163,7 @@ fn clean_use_statement<'tcx>( fn clean_use_statement_inner<'tcx>( import: &hir::Item<'tcx>, name: Option, - path: &hir::Path<'tcx>, + path: &hir::Path<'_>, kind: hir::UseKind, cx: &mut DocContext<'tcx>, inlined_names: &mut FxHashSet<(ItemType, Symbol)>, @@ -3322,7 +3319,7 @@ fn clean_maybe_renamed_foreign_item<'tcx>( fn clean_assoc_item_constraint<'tcx>( trait_did: DefId, - constraint: &hir::AssocItemConstraint<'tcx>, + constraint: &hir::AssocItemConstraint<'_>, cx: &mut DocContext<'tcx>, ) -> AssocItemConstraint { AssocItemConstraint { diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 152a61beef405..eddf3e4873039 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -3083,10 +3083,16 @@ fn repr_attribute<'tcx>( (cache.document_private || field.vis.is_public()) && is_visible(field.did) }; + // The transparent repr is public if + // - the non-1-ZST field is public and visible or + // - at least one field is public and visible if *all* fields are 1-ZSTs or + // - the item is annotated with internal attribute `#[rustc_pub_transparent]` if repr.transparent() { - // The transparent repr is public iff the non-1-ZST field is public and visible or - // – in case all fields are 1-ZST fields — at least one field is public and visible. let is_public = 'is_public: { + if hir::find_attr!(tcx, def_id, AttributeKind::RustcPubTransparent(_)) { + break 'is_public true; + } + // `#[repr(transparent)]` can only be applied to structs and single-variant enums. let var = adt.variant(rustc_abi::FIRST_VARIANT); // the first and only variant diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js index 47b3fd7a542bc..e957a13a2b038 100644 --- a/src/librustdoc/html/static/js/main.js +++ b/src/librustdoc/html/static/js/main.js @@ -245,6 +245,32 @@ function preLoadCss(cssUrl) { window.searchState = { rustdocToolbar: document.querySelector("rustdoc-toolbar"), loadingText: "Loading search results...", + searchLoaded: false, + loadSearch() { + // If you're browsing the nightly docs, the page might need to be refreshed for + // the search to work because the hash of the JS scripts might have changed. + function sendSearchForm() { + // @ts-expect-error + document.getElementsByClassName("search-form")[0].submit(); + } + if (!window.searchState.searchLoaded) { + window.searchState.searchLoaded = true; + window.rr_ = data => { + window.searchIndex = data; + }; + if (!window.StringdexOnload) { + window.StringdexOnload = []; + } + window.StringdexOnload.push(() => { + loadScript( + getVar("static-root-path") + getVar("search-js"), + sendSearchForm, + ); + }); + loadScript(getVar("static-root-path") + getVar("stringdex-js"), sendSearchForm); + loadScript(resourcePath("search.index/root", ".js"), sendSearchForm); + } + }, inputElement: () => { let el = document.getElementsByClassName("search-input")[0]; if (!el) { @@ -269,6 +295,10 @@ function preLoadCss(cssUrl) {
`; out.insertBefore(hdr, window.searchState.outputElement()); el = document.getElementsByClassName("search-input")[0]; + + el.addEventListener("focus", () => { + window.searchState.loadSearch(); + }); } if (el instanceof HTMLInputElement) { return el; @@ -391,41 +421,6 @@ function preLoadCss(cssUrl) { return params; }, setup: () => { - let searchLoaded = false; - const search_input = window.searchState.inputElement(); - if (!search_input) { - return; - } - // If you're browsing the nightly docs, the page might need to be refreshed for the - // search to work because the hash of the JS scripts might have changed. - function sendSearchForm() { - // @ts-expect-error - document.getElementsByClassName("search-form")[0].submit(); - } - function loadSearch() { - if (!searchLoaded) { - searchLoaded = true; - window.rr_ = data => { - window.searchIndex = data; - }; - if (!window.StringdexOnload) { - window.StringdexOnload = []; - } - window.StringdexOnload.push(() => { - loadScript( - getVar("static-root-path") + getVar("search-js"), - sendSearchForm, - ); - }); - loadScript(getVar("static-root-path") + getVar("stringdex-js"), sendSearchForm); - loadScript(resourcePath("search.index/root", ".js"), sendSearchForm); - } - } - - search_input.addEventListener("focus", () => { - loadSearch(); - }); - const btn = document.getElementById("search-button"); if (btn) { btn.onclick = event => { @@ -434,7 +429,7 @@ function preLoadCss(cssUrl) { } event.preventDefault(); window.searchState.toggle(); - loadSearch(); + window.searchState.loadSearch(); }; } @@ -455,7 +450,7 @@ function preLoadCss(cssUrl) { // previous state with nothing in the bar. const inputElement = window.searchState.inputElement(); if (params.search !== undefined && inputElement !== null) { - loadSearch(); + window.searchState.loadSearch(); inputElement.value = params.search; // Some browsers fire "onpopstate" for every page load // (Chrome), while others fire the event only when actually @@ -482,29 +477,32 @@ function preLoadCss(cssUrl) { // that try to sync state between the URL and the search input. To work around it, // do a small amount of re-init on page show. window.onpageshow = () => { - const inputElement = window.searchState.inputElement(); const qSearch = window.searchState.getQueryStringParams().search; - if (qSearch !== undefined && inputElement !== null) { - if (inputElement.value === "") { - inputElement.value = qSearch; - } - window.searchState.showResults(); - if (qSearch === "") { - loadSearch(); - window.searchState.focus(); + if (qSearch !== undefined) { + const inputElement = window.searchState.inputElement(); + if (inputElement !== null) { + if (inputElement.value === "") { + inputElement.value = qSearch; + } + window.searchState.showResults(); + if (qSearch === "") { + window.searchState.loadSearch(); + window.searchState.focus(); + } } - } else { - window.searchState.hideResults(); } }; const params = window.searchState.getQueryStringParams(); if (params.search !== undefined) { window.searchState.setLoadingSearch(); - loadSearch(); + window.searchState.loadSearch(); } }, setLoadingSearch: () => { + // We set up the search input before adding the other search elements (like + // "search loading") in case it's not already there yet. + window.searchState.inputElement(); const search = window.searchState.outputElement(); nonnull(search).innerHTML = "

" + window.searchState.loadingText + "

"; diff --git a/src/librustdoc/html/static/js/rustdoc.d.ts b/src/librustdoc/html/static/js/rustdoc.d.ts index 230ae4f70e912..9bd6a1a587e5d 100644 --- a/src/librustdoc/html/static/js/rustdoc.d.ts +++ b/src/librustdoc/html/static/js/rustdoc.d.ts @@ -137,6 +137,8 @@ declare namespace rustdoc { loadDesc: function({descShard: SearchDescShard, descIndex: number}): Promise; loadedDescShard: function(string, number, string); isDisplayed: function(): boolean; + searchLoaded: boolean; + loadSearch: function(); } interface SearchDescShard { diff --git a/src/stage0 b/src/stage0 index 95c0c9471ec69..247feb05642ae 100644 --- a/src/stage0 +++ b/src/stage0 @@ -13,596 +13,610 @@ nightly_branch=main # All changes below this comment will be overridden the next time the # tool is executed. -compiler_channel_manifest_hash=4b4bed5d2b8347cfa723d740a6c6a6be2b5523c01a298c0de1e4663e1157c53b -compiler_git_commit_hash=08d5b675a9b2abdca5e2fe4eabe0e07bbda15d49 -compiler_date=2026-07-13 +compiler_channel_manifest_hash=7c8035eccd259661acc845afb33fb40892f4722327f7d8d8c49feda172d1a159 +compiler_git_commit_hash=f47d5bb13648d5c859f5b438eb7dc834b9729961 +compiler_date=2026-08-18 compiler_version=beta -rustfmt_channel_manifest_hash=8b7574714157d78c0fe01fb1cf0f8d7b71eea07760d723389478e7a798f0c59e -rustfmt_git_commit_hash=77cf889bc178ddb44d6a1c78e5a820b5abb31d8d -rustfmt_date=2026-07-13 +rustfmt_channel_manifest_hash=bcbc0888e7f826a04d404f32618e159234d3c866929403b9a23843011aa74bf9 +rustfmt_git_commit_hash=8fa1c96cfd489e4c27654c144ae871ce2c4db6c6 +rustfmt_date=2026-08-18 rustfmt_version=nightly -dist/2026-07-13/rustc-beta-aarch64-apple-darwin.tar.gz=1a7f7bf4a260f09aacc1d843742368d8caf7198238707b1c2357e3b7f2c39733 -dist/2026-07-13/rustc-beta-aarch64-apple-darwin.tar.xz=d4c0550256aa885f695450969a4dbbccf9a3422657f0a0225f48f9fb895c777c -dist/2026-07-13/rustc-beta-aarch64-pc-windows-gnullvm.tar.gz=eb5b94e0c14219fa535d38f82fcbf81759fc43f79e6a6879003fa874ebfec111 -dist/2026-07-13/rustc-beta-aarch64-pc-windows-gnullvm.tar.xz=0ebb8c29f02a1b8bf4d340c2b4e4776f63d33ef826ec02a9a68bed44e9900232 -dist/2026-07-13/rustc-beta-aarch64-pc-windows-msvc.tar.gz=42732890154cb1ef5a120976ebcd2fd05b55bf597192be6fc9cda22177731940 -dist/2026-07-13/rustc-beta-aarch64-pc-windows-msvc.tar.xz=70a4d0e365c094adb8f6b2afa32622598ea3ffcc415168d46242a8bd62e83282 -dist/2026-07-13/rustc-beta-aarch64-unknown-freebsd.tar.gz=b654f09e1db3baf4b72681a9085ab3ff34f959fa4487956512ce6bbeda156b66 -dist/2026-07-13/rustc-beta-aarch64-unknown-freebsd.tar.xz=fe359080e9af4df162f0614b37fc6376ef3ac3f81dc59f332bd7cd33b9a5b5d2 -dist/2026-07-13/rustc-beta-aarch64-unknown-linux-gnu.tar.gz=c36002e72ac884faea95f087c9c1c7fd9e2b2d454383f8ebe36644a28933e804 -dist/2026-07-13/rustc-beta-aarch64-unknown-linux-gnu.tar.xz=d7c42e11b17fac1cfee82b1fa3ca6c3b4b52895ca13ee6369928b7aabf83f4b8 -dist/2026-07-13/rustc-beta-aarch64-unknown-linux-musl.tar.gz=31d0c5a14c36ed1685f2a41e6f723b80735b40f48a7be59dfac05a99257c553e -dist/2026-07-13/rustc-beta-aarch64-unknown-linux-musl.tar.xz=2d9bbdb2c84ca580fb3990239a833e57957cc7246f252d6a411481f11a6f00c1 -dist/2026-07-13/rustc-beta-aarch64-unknown-linux-ohos.tar.gz=14181370e11732d64c61f09df44b34b77b7c33cb2b44c4f02f07acf0fa272b3b -dist/2026-07-13/rustc-beta-aarch64-unknown-linux-ohos.tar.xz=a6d6e2fab120dd97736c7d7e52c86d6f55183d8063359d5d2154e7df135d26c8 -dist/2026-07-13/rustc-beta-arm-unknown-linux-gnueabi.tar.gz=c6d89d6b8dd6fd6653ec6e5907037fc36cdb919d4882f4d45b89c7ae8ac271f6 -dist/2026-07-13/rustc-beta-arm-unknown-linux-gnueabi.tar.xz=fb5f429d4cd26b312ed6c3b12ea45c9a1b7ba3ef0e3966adca344e1e57a6c19d -dist/2026-07-13/rustc-beta-arm-unknown-linux-gnueabihf.tar.gz=a5827c857a3b24cf0b820502f1b836de586839fe2a8a48a33300819a600b0941 -dist/2026-07-13/rustc-beta-arm-unknown-linux-gnueabihf.tar.xz=6bb6f6830750c4f489dc416c985c29a2a43da4e04dc7eda174fa2eae472dd982 -dist/2026-07-13/rustc-beta-armv7-unknown-linux-gnueabihf.tar.gz=7c1dd08847b0e4dae81416d4d8b5dff9d97c372f19b62ac7e71d6f1cae264bcd -dist/2026-07-13/rustc-beta-armv7-unknown-linux-gnueabihf.tar.xz=9d329401cfc387e6fdeff26f21b458a5d83c94cde91c942aefdf44bd032eff6e -dist/2026-07-13/rustc-beta-i686-pc-windows-gnu.tar.gz=ede62af063a7c9a3025c85a8580c46b698027de1197075ccc54d1b847938fb47 -dist/2026-07-13/rustc-beta-i686-pc-windows-gnu.tar.xz=48dc447ecd9d3f1bc764f4c91554da5317099d4379171cb8f97401f2784efd6a -dist/2026-07-13/rustc-beta-i686-pc-windows-msvc.tar.gz=08c758fa5a0d0f43fb7512d9d9d2aec348b9bce878df85a86120efeb0ef54146 -dist/2026-07-13/rustc-beta-i686-pc-windows-msvc.tar.xz=c6941650363dac0778079d9dfd1a4721fa3efe0d6858f8c833f7ca974a78ae29 -dist/2026-07-13/rustc-beta-i686-unknown-linux-gnu.tar.gz=81398737e7ef89769e21cb809407fe584db43867d430c73c9654c37a030f055e -dist/2026-07-13/rustc-beta-i686-unknown-linux-gnu.tar.xz=f95c39f0cc39038586164c8fcd18de5de8fdbe884cd9aa7b722145539a030a28 -dist/2026-07-13/rustc-beta-loongarch64-unknown-linux-gnu.tar.gz=29123fa5a26c34a84d91b21cc7986e6abed87bc20537ebddb48131787406837e -dist/2026-07-13/rustc-beta-loongarch64-unknown-linux-gnu.tar.xz=2d619a2d26ecd9ecd7496b2f576425f352f46bd280876de3e7d4047a28cf4509 -dist/2026-07-13/rustc-beta-loongarch64-unknown-linux-musl.tar.gz=39f1610d1adb4875107adc5cb4c3a4c9950f6d0c1ef579d2a2b5e9d55cb40766 -dist/2026-07-13/rustc-beta-loongarch64-unknown-linux-musl.tar.xz=7c6671bd9c8d9dae7fedccde1421cb8b8f74c176f63fcbb54992d5f94b016c88 -dist/2026-07-13/rustc-beta-powerpc-unknown-linux-gnu.tar.gz=dcdaffbb06823f70fcae1f6ee48b58327e8157a23f0d2f8f20059dfa0c4b8524 -dist/2026-07-13/rustc-beta-powerpc-unknown-linux-gnu.tar.xz=8727fc2ec44adc44d33769bbe1244833f3be713270545bf87ed78df7eedafa2f -dist/2026-07-13/rustc-beta-powerpc64-unknown-linux-gnu.tar.gz=10469fa3a912a1c541a85e02b4e0d1fc71874b34bc0049873b6306b8f6a4303b -dist/2026-07-13/rustc-beta-powerpc64-unknown-linux-gnu.tar.xz=7f95666b00c734e55ed00f4c53c09231c69179878db5279002c0fd64cf6f0a10 -dist/2026-07-13/rustc-beta-powerpc64-unknown-linux-musl.tar.gz=e328b30581989efd5a381dde0d5c92c67fe14efa81cccd009e2be15f9a6803a7 -dist/2026-07-13/rustc-beta-powerpc64-unknown-linux-musl.tar.xz=22db6bddefb90a2ccf4d938f5f7eeb985e63889e007ac04ceae751bc8cbf7b3a -dist/2026-07-13/rustc-beta-powerpc64le-unknown-linux-gnu.tar.gz=4c8f30f9a81c0bf6585cf58f3a75e156464710a0bd8322e6316cbc8ee002f83f -dist/2026-07-13/rustc-beta-powerpc64le-unknown-linux-gnu.tar.xz=182b1c54442fc35b3a67f688cf9ddb621343f8b87ac1c4dde57d17afa3978fde -dist/2026-07-13/rustc-beta-powerpc64le-unknown-linux-musl.tar.gz=9e6f987a983f6042923dd850b8f3582bc90b71a8318268a233fe02e1ce365064 -dist/2026-07-13/rustc-beta-powerpc64le-unknown-linux-musl.tar.xz=4671118daacc47f9274646bc3509e88c617439dd002e490bedc5516a53157ffb -dist/2026-07-13/rustc-beta-riscv64gc-unknown-linux-gnu.tar.gz=b51800b75ef049bd57fc62bf140b1391ea44c9c0e0d229fb44bbf387f22c202b -dist/2026-07-13/rustc-beta-riscv64gc-unknown-linux-gnu.tar.xz=8999ab7878b2c6acc4d8097a3ce699b5b12bc12853d55d1052e16767097e13f2 -dist/2026-07-13/rustc-beta-s390x-unknown-linux-gnu.tar.gz=7170f93733a79578fbbd30513ab1a3e1f62cd265a854a84da3b7e1fd2c94ce56 -dist/2026-07-13/rustc-beta-s390x-unknown-linux-gnu.tar.xz=cc432f2c717ced14fae2793fee0b2c60635e0975aa35494b83a3083802c1a470 -dist/2026-07-13/rustc-beta-sparcv9-sun-solaris.tar.gz=d8628d738dd18740ce00f08a4e6d800291a3fc1bea44b75d50d2ae7cab426115 -dist/2026-07-13/rustc-beta-sparcv9-sun-solaris.tar.xz=18458f9753dce6192c08ae6611f85c2cd8ad43370311d76df41c037570951cb9 -dist/2026-07-13/rustc-beta-x86_64-apple-darwin.tar.gz=c9599df1ab45eb22e69dd0e4964e0d176599fa9c1966b6751a6bd12e6da34d79 -dist/2026-07-13/rustc-beta-x86_64-apple-darwin.tar.xz=a1b1d0c714d398c0ae4c3fde9ec9a3a5bc71a7f9cea8ccecee54f098cbb2d775 -dist/2026-07-13/rustc-beta-x86_64-pc-solaris.tar.gz=d3dc1f3ed4cc64f121126a394b175b66a056a7ea5f4f388dfa43caf224890bfd -dist/2026-07-13/rustc-beta-x86_64-pc-solaris.tar.xz=f1898f710f37884eb32814a0be3c396ac737bf6c2f52194c1721b97423189922 -dist/2026-07-13/rustc-beta-x86_64-pc-windows-gnu.tar.gz=e0fca5aa2d6b74ed39dd320a58d249610bd0604472d214383323ed0c71834f70 -dist/2026-07-13/rustc-beta-x86_64-pc-windows-gnu.tar.xz=203291fbc8da7d89a17a7b584fb38403dff14c7562a1e7c1d0e000d258f83d71 -dist/2026-07-13/rustc-beta-x86_64-pc-windows-gnullvm.tar.gz=ea3a916f24ed08cbd843552475af9e2d299e55aa85e3adf3d96a816e2c925c7c -dist/2026-07-13/rustc-beta-x86_64-pc-windows-gnullvm.tar.xz=ad641d2461ed777914f1dc8b22862a693add627d3c034b7acab71e3e93c0e59c -dist/2026-07-13/rustc-beta-x86_64-pc-windows-msvc.tar.gz=066da5c23451479b88f2114aa15b0000cd0b719006207b384fd137878868d259 -dist/2026-07-13/rustc-beta-x86_64-pc-windows-msvc.tar.xz=aa086edd7e9c99daba837b103c0bdb8dee99a649390e3c46df8233ebb701daf4 -dist/2026-07-13/rustc-beta-x86_64-unknown-freebsd.tar.gz=20278cafd13bba24c428bd549d8d79572adba05da0195498572d63ac726ff415 -dist/2026-07-13/rustc-beta-x86_64-unknown-freebsd.tar.xz=39401f34485bb59935950d76020212d2d62f18242b87b78faf1af970e1979a2f -dist/2026-07-13/rustc-beta-x86_64-unknown-illumos.tar.gz=2676a44831fc6731d3a5dcab925be518dcfaf8e5656554d9e51b2effec6a2547 -dist/2026-07-13/rustc-beta-x86_64-unknown-illumos.tar.xz=3d83a397d3acb3491d42fda23685078414a2eeab822290a63db92159d2ebab1b -dist/2026-07-13/rustc-beta-x86_64-unknown-linux-gnu.tar.gz=d66474a4dbc9452eb1bd980a0de4444c4f3215884dea0c16083ad8d09ee05bcb -dist/2026-07-13/rustc-beta-x86_64-unknown-linux-gnu.tar.xz=81f4b3fdf3a22773b06f09338883d24195b28d046d081b0f0e6d23a35899fc61 -dist/2026-07-13/rustc-beta-x86_64-unknown-linux-musl.tar.gz=d42164bfd04edf92544326426ce3d056edc030e512e35271375557175419976a -dist/2026-07-13/rustc-beta-x86_64-unknown-linux-musl.tar.xz=b43ec307fa87960b55c696621eb4cc3f0c8f1e7e40ead95b8edd2373388ed5e6 -dist/2026-07-13/rustc-beta-x86_64-unknown-netbsd.tar.gz=71be19c47421a2ae52cc9a4d0717c11d71d34f81634e9e5a11c31ea044cd5a71 -dist/2026-07-13/rustc-beta-x86_64-unknown-netbsd.tar.xz=07088e7e1b79aa3c729bda05d56737381dcbc2287089a2fdc59aa28609475be9 -dist/2026-07-13/rust-std-beta-aarch64-apple-darwin.tar.gz=5afbbf351bf674bfb72ed5b32f7a6db36243fc62dce4e0339cc636ad34985767 -dist/2026-07-13/rust-std-beta-aarch64-apple-darwin.tar.xz=146a88f8d5f6c55356267dff8414e5bde38724729aa9b33741529a4fe15822f5 -dist/2026-07-13/rust-std-beta-aarch64-apple-ios.tar.gz=03de600c0d4183e9eb30e9e4ad66f2523be9eea5420ef8e8ab31db69b6e60163 -dist/2026-07-13/rust-std-beta-aarch64-apple-ios.tar.xz=6b77e282de130e8b171d816377afd1dd39c7ce96567716785544f445cebd941b -dist/2026-07-13/rust-std-beta-aarch64-apple-ios-macabi.tar.gz=ba6bab2f3974a45b19db3aac16311b232825721be207a9cb5b75573bc1604dd2 -dist/2026-07-13/rust-std-beta-aarch64-apple-ios-macabi.tar.xz=08112288ac8267991b02701386cfbcc7dab7a621ca4e0ca585b360a3b49aab71 -dist/2026-07-13/rust-std-beta-aarch64-apple-ios-sim.tar.gz=7649a6324a02255d9f0cd11f5da9d4fd6297dfb17fd59466df51f0196536aa8d -dist/2026-07-13/rust-std-beta-aarch64-apple-ios-sim.tar.xz=337f1392273da6895aafbe48b85d1ac690b7ba7635254e2c30d04eefdd396282 -dist/2026-07-13/rust-std-beta-aarch64-apple-tvos.tar.gz=a3cb52213cb07f38563bc75d896caec20e7b29a5fbbc8abbaeeb3d6d6e039852 -dist/2026-07-13/rust-std-beta-aarch64-apple-tvos.tar.xz=4201cd7b05c824501df45d3c823198e29cf9fd94b8cc22aa25a868d628f805d1 -dist/2026-07-13/rust-std-beta-aarch64-apple-tvos-sim.tar.gz=7b0601bf1eec44ed54a05d05ced886f8c6289a0180e337edc8d052b8cbf41018 -dist/2026-07-13/rust-std-beta-aarch64-apple-tvos-sim.tar.xz=8f54e00932dacce813de949fe53a070158b951913eaea9c9c28597c58e0d072b -dist/2026-07-13/rust-std-beta-aarch64-apple-visionos.tar.gz=d5910ffc2ec490f7370edf82137ce920bc72d126f7253d6947d45f5adeba3928 -dist/2026-07-13/rust-std-beta-aarch64-apple-visionos.tar.xz=1bf17808c29183d057aa45845105f994ff1964763477fe12b153c278465fe112 -dist/2026-07-13/rust-std-beta-aarch64-apple-visionos-sim.tar.gz=ca79b46e4627ce22e084e0d78f0f5703038ac6c54da0bbc25845b7fe0029d611 -dist/2026-07-13/rust-std-beta-aarch64-apple-visionos-sim.tar.xz=c093ac6825b6364cc7f5a843c5c36e5e269395c98e7627473a5d58f010c23058 -dist/2026-07-13/rust-std-beta-aarch64-apple-watchos.tar.gz=22227c8db1b4684072a3774022cf6a0f1151042d5227e3b79efa63f731ddd2c3 -dist/2026-07-13/rust-std-beta-aarch64-apple-watchos.tar.xz=6b539414caa95865125c0142d28830d4938e14428199833b451e7513130d7e0d -dist/2026-07-13/rust-std-beta-aarch64-apple-watchos-sim.tar.gz=4279b90caeb8f123633be3385aea9ceaf075d40aedea154cdb05f7b59a42089e -dist/2026-07-13/rust-std-beta-aarch64-apple-watchos-sim.tar.xz=9f16104e0094ce79939a6b2473e580e600948bea1bef884a10815d7b1fd0be2c -dist/2026-07-13/rust-std-beta-aarch64-linux-android.tar.gz=8dfbb2f02b6758bf39d378ad1c986f3dc892ded110f3a472422f35744c57e387 -dist/2026-07-13/rust-std-beta-aarch64-linux-android.tar.xz=69292e1c9c20979219c6e068e4324354baf63008c67c787b397ba1c3c610603d -dist/2026-07-13/rust-std-beta-aarch64-pc-windows-gnullvm.tar.gz=fb344f5104506cda727d4e0c78321c8992eb8f777d5dd78e362cbb67d26312bc -dist/2026-07-13/rust-std-beta-aarch64-pc-windows-gnullvm.tar.xz=20d9fe0d7379f791fa9ea2af619a4d9b77b55723f66b994462334e785738e0a2 -dist/2026-07-13/rust-std-beta-aarch64-pc-windows-msvc.tar.gz=7dc64ba4d0eb7b5c9545955bacba33067b53cbb47a1ba2a5fdced451439b8999 -dist/2026-07-13/rust-std-beta-aarch64-pc-windows-msvc.tar.xz=7f66db2c65e97abc25da4457f931082444a3f8d8f05f6a4e9efdb96af64f33f7 -dist/2026-07-13/rust-std-beta-aarch64-unknown-freebsd.tar.gz=fea82039b722cb83df1e05427e481c352c8c976a666659d792f280b39956e896 -dist/2026-07-13/rust-std-beta-aarch64-unknown-freebsd.tar.xz=dea857d4c2cd7b63d5ab36c36ca10a4c302c6d22800e68b813189e8946d0ce80 -dist/2026-07-13/rust-std-beta-aarch64-unknown-fuchsia.tar.gz=2b289d20c51a73712201df1c902d1b22476061b34b091b3d1977accf85a2fdee -dist/2026-07-13/rust-std-beta-aarch64-unknown-fuchsia.tar.xz=270aba6d1b2c15a49de59b3f99a8abfa4079a51f2811bee18e7844421271a303 -dist/2026-07-13/rust-std-beta-aarch64-unknown-linux-gnu.tar.gz=895cc885da43853b4e78958e1bd7f9d2cc8a3e9ac5da3c58e14f9cb0c9d90376 -dist/2026-07-13/rust-std-beta-aarch64-unknown-linux-gnu.tar.xz=14c860e71580aceec17f919a47d29163b43a446b0a66b86d268a9de85c7e8935 -dist/2026-07-13/rust-std-beta-aarch64-unknown-linux-musl.tar.gz=d81a02b36d77741ae9d94db5ae8d8103987c19ddacd8240aef2c76558c5aed87 -dist/2026-07-13/rust-std-beta-aarch64-unknown-linux-musl.tar.xz=56a5e60b071f47bccca8d31125992b04c0a576a57b9aea5b1ee81af97a6fe981 -dist/2026-07-13/rust-std-beta-aarch64-unknown-linux-ohos.tar.gz=9774b613d1f75c7fc976875e193c785140a66853f2b6315a03edf6ede07a77e1 -dist/2026-07-13/rust-std-beta-aarch64-unknown-linux-ohos.tar.xz=646c3b75d7edfd2cd19ba3c8b40b8e47f37e8142c2507ac425698b008a543c06 -dist/2026-07-13/rust-std-beta-aarch64-unknown-none.tar.gz=763fb5e5a6736d28a8c53fa6e9150b12ec6f524d04fd96c92f66d3e6016e59cb -dist/2026-07-13/rust-std-beta-aarch64-unknown-none.tar.xz=cf84bf88e9b72786e9ac54be73af9db77005af2df0e58f4bb6c939026b1d17d2 -dist/2026-07-13/rust-std-beta-aarch64-unknown-none-softfloat.tar.gz=676709585b04ecd22ff454481fea114026b5ccface046e93f097d74a70b5499c -dist/2026-07-13/rust-std-beta-aarch64-unknown-none-softfloat.tar.xz=7760726158d4f31445276f39e463ee2e224a6bcbdc9908303789fec05ceb85ae -dist/2026-07-13/rust-std-beta-aarch64-unknown-uefi.tar.gz=9918725c1c3cc64f5f0791b17114c04a1080b79881fbcc5d2fe03fadba0eefbe -dist/2026-07-13/rust-std-beta-aarch64-unknown-uefi.tar.xz=8925877e648abfb21325bd6d18cbb7ab03c0739e970b717d4dfcbbdb3fc0bfd9 -dist/2026-07-13/rust-std-beta-arm-linux-androideabi.tar.gz=b7c85909fc724a868de3a0df4892dc97006ce80e4313ae510747b42e626f07ac -dist/2026-07-13/rust-std-beta-arm-linux-androideabi.tar.xz=10dd4fbd051d189629f9632a7b4d8142cb9092e94262d69ce6da1f7e470a39d5 -dist/2026-07-13/rust-std-beta-arm-unknown-linux-gnueabi.tar.gz=dcafc4d50b9bff16d2a41036a1213ee88796e6c847cda9392e70611a04ae1c65 -dist/2026-07-13/rust-std-beta-arm-unknown-linux-gnueabi.tar.xz=8806ce5452758a40fb9309ffd2d7b20ce6daf8003dec09a97c4693c69b1a0285 -dist/2026-07-13/rust-std-beta-arm-unknown-linux-gnueabihf.tar.gz=e7d2121f040c2d72860baa189b4650d6996ba5da273196d123da2ac6b3688366 -dist/2026-07-13/rust-std-beta-arm-unknown-linux-gnueabihf.tar.xz=3566b1d322a7bc93260221823337ff1dff08d2b9465c84c51dc5f6d382ea9d5e -dist/2026-07-13/rust-std-beta-arm-unknown-linux-musleabi.tar.gz=1332ce2aec2c5f10705128e35f65f11b23c018f4f2cf6d8f332a68f2e4736d9a -dist/2026-07-13/rust-std-beta-arm-unknown-linux-musleabi.tar.xz=0631acc7f9daf9320a643f38a1d054a401ae8fbd3cd268e4b927e547dc6357da -dist/2026-07-13/rust-std-beta-arm-unknown-linux-musleabihf.tar.gz=f69dd86cb8d096776c81706beaed41c407b9ba9d3adcd4f9b4d8c6bf7a16a3ae -dist/2026-07-13/rust-std-beta-arm-unknown-linux-musleabihf.tar.xz=a5d206c93e7b130dd40426a206eca63e33437eb183730dae68da8a31d5f4b3c8 -dist/2026-07-13/rust-std-beta-arm64ec-pc-windows-msvc.tar.gz=a2bd809a46b05d0a1e55fb2f5f605ec7c8171348b6093459d3317ea0dd06ee29 -dist/2026-07-13/rust-std-beta-arm64ec-pc-windows-msvc.tar.xz=4f85f686ab64e0e4c890356541ba99f5e58d5223c7ebac750f38312c6ea5eb71 -dist/2026-07-13/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.gz=69a32229b5d11689f3115397bbdb2c38efcf846d92188955fdb3bcbad7094024 -dist/2026-07-13/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.xz=be6f603c6aab1973296997cda5923ca494e44bab719f397df4914b5938309087 -dist/2026-07-13/rust-std-beta-armv5te-unknown-linux-musleabi.tar.gz=c44cd99ac7d880e73744729daf9313e50167aa193d8d0b38ac991205baf5a3a0 -dist/2026-07-13/rust-std-beta-armv5te-unknown-linux-musleabi.tar.xz=06f185d19bdfedae0e7fb6808c48f0d009124fbe3fba759cf9a2de52567baefd -dist/2026-07-13/rust-std-beta-armv7-linux-androideabi.tar.gz=b81e9b6b7c5c65dc51ef2a60458bc1b32c7853166ed87702c381d4ed37f2dd0e -dist/2026-07-13/rust-std-beta-armv7-linux-androideabi.tar.xz=865c32216a85c888a73dd4dc92e0c47dd36740e1ea0eed89f74b0e26f0a18ba6 -dist/2026-07-13/rust-std-beta-armv7-unknown-linux-gnueabi.tar.gz=e6651c64c8a6918199a6eec3951791a27c0399abdfa452fa89e3cdeb885e0efa -dist/2026-07-13/rust-std-beta-armv7-unknown-linux-gnueabi.tar.xz=3858763e44c08fb64925bb23e593e87afa63aeb010e11dd60fdfb3e5d2e385f7 -dist/2026-07-13/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.gz=c66c930f9a11dd99f5dcc7e38f74c58004c6884e115b37565c4fbe549d00989a -dist/2026-07-13/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.xz=d22a65bb4d92acdc86468a029fa585adc0bfa0d607ac4539f9a5beafb1c7e284 -dist/2026-07-13/rust-std-beta-armv7-unknown-linux-musleabi.tar.gz=cbf7a31fd6edea1ff0ea20ffdcd69083b704d411237cb938e205d7e48c9c255b -dist/2026-07-13/rust-std-beta-armv7-unknown-linux-musleabi.tar.xz=163393cd23ebe19994f3e62c0c8a1b8a5cbe487a5a1c7e9d0dc43595f94a3485 -dist/2026-07-13/rust-std-beta-armv7-unknown-linux-musleabihf.tar.gz=5aed8a434244461cdea637e42f06aed976b76e2d376a2f69631e421b02023abd -dist/2026-07-13/rust-std-beta-armv7-unknown-linux-musleabihf.tar.xz=1bb7198c1859b694389e467ea697a4aa29d04db744c9997dc37cb9c6a9988bf7 -dist/2026-07-13/rust-std-beta-armv7-unknown-linux-ohos.tar.gz=7da66bb3366d269da240cc70d55a91762cde0a34f1bf6571827386532548593c -dist/2026-07-13/rust-std-beta-armv7-unknown-linux-ohos.tar.xz=807d180b1e99c8ca7efafdb29a5871e0ed003fc0ba9c83476094b994dd015add -dist/2026-07-13/rust-std-beta-armv7a-none-eabi.tar.gz=4db0f288fabddc574d65dd37024813f74cd97d414b176c18531caa33987fa6eb -dist/2026-07-13/rust-std-beta-armv7a-none-eabi.tar.xz=cdf373dd0b0d39b3275fb3f084c63fbe827f6dc808f38ba8d740f90b82b945a4 -dist/2026-07-13/rust-std-beta-armv7a-none-eabihf.tar.gz=82871473da82596fc9b61af51cbc7ad0cf70a4f20dfbc5c88df2cb108e47810b -dist/2026-07-13/rust-std-beta-armv7a-none-eabihf.tar.xz=5f01361ab15fc0d0f3d7b6fbf03f6a36c5af86defd3053f3f459c5e31d17e3a9 -dist/2026-07-13/rust-std-beta-armv7r-none-eabi.tar.gz=3278f58a515ea6674a511bd63553e34b508acd82234a7e7cd10497c8ee28cd94 -dist/2026-07-13/rust-std-beta-armv7r-none-eabi.tar.xz=aa70742d17ca3dba88373fe8edfacef1281bdcc0dfa00bbf5684d132c816c39b -dist/2026-07-13/rust-std-beta-armv7r-none-eabihf.tar.gz=82c853bd1b211b77bd33a2ecc53434fd8e5c7cf4732b34a4714dcf0d0515eb76 -dist/2026-07-13/rust-std-beta-armv7r-none-eabihf.tar.xz=f8a97dda7bf0fcbd44671e0e3988ab11c4df97e65ab500d0657d7e3032cc37d9 -dist/2026-07-13/rust-std-beta-armv8r-none-eabihf.tar.gz=4d07b0bc58ec1f37502577f03813b30b525a664f83c2256e1000e08d0a5809ef -dist/2026-07-13/rust-std-beta-armv8r-none-eabihf.tar.xz=ea46bc54109114d56d71c6a9d7bd028e42ef5ac1361a52b142224673466e39d8 -dist/2026-07-13/rust-std-beta-i586-unknown-linux-gnu.tar.gz=3f3164ae2cb73aee0f7e209dc3eab84b0846d8eba8842c0a514a4cb36aa4f68a -dist/2026-07-13/rust-std-beta-i586-unknown-linux-gnu.tar.xz=7670605bc70e7f17521eb20b95e96e739d9de6ab8ba8985470f64ba5bdc777c6 -dist/2026-07-13/rust-std-beta-i586-unknown-linux-musl.tar.gz=9c7f846df44f99c1b11272a2e52f91a6da56f9d84f23b3cbf8142ee5a3c425a8 -dist/2026-07-13/rust-std-beta-i586-unknown-linux-musl.tar.xz=aece8c73e9e5b343284ed5923bbcfacb61a458d2deaa0233176e86f44dd5ab8f -dist/2026-07-13/rust-std-beta-i686-linux-android.tar.gz=07cb456ba4f14088f1e42a79e45abee74ff3ab87bce574602226395a22bcd7c3 -dist/2026-07-13/rust-std-beta-i686-linux-android.tar.xz=549903a5d092b0473b3048fbf185e9b1226308a4c69501018381d5586a086c5e -dist/2026-07-13/rust-std-beta-i686-pc-windows-gnu.tar.gz=917d0b041701d7b52c0efce17a811b64d88efb61b1fb94af220c2035bed70ee4 -dist/2026-07-13/rust-std-beta-i686-pc-windows-gnu.tar.xz=8a5f84ee70cf9d15306334c2845e5ce5fbbd73d670e6b8f17d2cd62ecfa23d7c -dist/2026-07-13/rust-std-beta-i686-pc-windows-gnullvm.tar.gz=d30389e62c4a2fc38edee2af07ccf1d1413ec0baec5fd3aa35033f96e02584d7 -dist/2026-07-13/rust-std-beta-i686-pc-windows-gnullvm.tar.xz=a92342601105fc651e90e5278b3ae92caa28a47d70dd4c1b41a0e33e085bef1e -dist/2026-07-13/rust-std-beta-i686-pc-windows-msvc.tar.gz=bee78fd27fd71dcef078f852b37473c63d6f5ae15422f7e11ef3abf9d1e7b810 -dist/2026-07-13/rust-std-beta-i686-pc-windows-msvc.tar.xz=fe1475133136170035b4457b50f8947eab8de4044a64b71a4ff6304a8125b1fc -dist/2026-07-13/rust-std-beta-i686-unknown-freebsd.tar.gz=9528fc4ac6e9eccdf9d61f10386d5b577accac4d85540b71fd071e8aae7f7395 -dist/2026-07-13/rust-std-beta-i686-unknown-freebsd.tar.xz=81204a670402ecc07a18536b0a3378774fefaf253afb493fce798add7324e4c3 -dist/2026-07-13/rust-std-beta-i686-unknown-linux-gnu.tar.gz=9904e3db3879bc836ab56788107ffb03ffa1e12a5c743650deb8944d160eeeb7 -dist/2026-07-13/rust-std-beta-i686-unknown-linux-gnu.tar.xz=1a36502cfff2055c56b69f2ee2e224bac4e396f103b8e8f753a14ae2df30a756 -dist/2026-07-13/rust-std-beta-i686-unknown-linux-musl.tar.gz=5cee0b8ca8d852be03b79508a26f3ba2fcc711c852d4f25c4b8ce3b47c39ed8e -dist/2026-07-13/rust-std-beta-i686-unknown-linux-musl.tar.xz=a23487b64a8b64f1ef9deb23eff8012449996d49d871a4a221a1e5e2b8f3bf90 -dist/2026-07-13/rust-std-beta-i686-unknown-uefi.tar.gz=5d27e7fb3dcbc7a51b215580806d8166890456e8bf455e3a116b0986a9a71962 -dist/2026-07-13/rust-std-beta-i686-unknown-uefi.tar.xz=7eb13cd2a042548405c1cd3069895970f3d474931c11b5d2e6d99dd50a330d76 -dist/2026-07-13/rust-std-beta-loongarch64-unknown-linux-gnu.tar.gz=c4460df974160dfbff3920f12811a13a07bb1d278afc1e90babab115b8e7cfe9 -dist/2026-07-13/rust-std-beta-loongarch64-unknown-linux-gnu.tar.xz=4390cd13c78b5b071706397e508fb5f3a6bcb4dc927598264156febe123d5774 -dist/2026-07-13/rust-std-beta-loongarch64-unknown-linux-musl.tar.gz=8fccced3fab36d310733605b03ce1f100f82649f8465751dbd8b4ecdd1cc9565 -dist/2026-07-13/rust-std-beta-loongarch64-unknown-linux-musl.tar.xz=999be8f2064eb400ceb3f928a1d9f71d9aa40394b07c5971350595b9f80c1d19 -dist/2026-07-13/rust-std-beta-loongarch64-unknown-none.tar.gz=c1f6133894b11bf91ea9aba9e340805dcf466085a1365ff18064f9c99ecc98e1 -dist/2026-07-13/rust-std-beta-loongarch64-unknown-none.tar.xz=6cc51ce98f16cc228a8cac2929d9a428139299f6b761098a26a163498d22a1aa -dist/2026-07-13/rust-std-beta-loongarch64-unknown-none-softfloat.tar.gz=b54d10e361625b9ff6af8e65ccdaadb845964dd9ad5ce15fbf02cf94260a6c77 -dist/2026-07-13/rust-std-beta-loongarch64-unknown-none-softfloat.tar.xz=dd284fabddc45c3523b5c9a6f20dd3928417c805a00f1b6b7ca9eb2bfa81573b -dist/2026-07-13/rust-std-beta-nvptx64-nvidia-cuda.tar.gz=e20b8f4f558dcdc6e85bc0c61516251fc3aa08586f82f9636b09ee76551f4ab3 -dist/2026-07-13/rust-std-beta-nvptx64-nvidia-cuda.tar.xz=28e01931403c08fb852ec7f40ef20cfe163ee7e6d5e629e927070bfecf06832d -dist/2026-07-13/rust-std-beta-powerpc-unknown-linux-gnu.tar.gz=4ad0bf9133059690eb6f96ac42300baa325c2b7b56d7fe0c609b765776b1be02 -dist/2026-07-13/rust-std-beta-powerpc-unknown-linux-gnu.tar.xz=8e6957e86bb86a088ffdc16e649c4df960f7fe49fdf4b9b526c992e0670cde1c -dist/2026-07-13/rust-std-beta-powerpc64-unknown-linux-gnu.tar.gz=f2bbd7bbcc3242d47f30d93b0af2a22e87ae6479dde7fa9d467958932b9c993f -dist/2026-07-13/rust-std-beta-powerpc64-unknown-linux-gnu.tar.xz=b71940934b98aec82c796918f5313e39bce088fd642407835d23ceab3d5d64d1 -dist/2026-07-13/rust-std-beta-powerpc64-unknown-linux-musl.tar.gz=ded34eaf7c7500daf273040bb43d6b8decadbc588d0b96a6db5f57daa0372351 -dist/2026-07-13/rust-std-beta-powerpc64-unknown-linux-musl.tar.xz=d7222a356536466d8e20e236b5ec9a0376c7208695114c92586e1886e38d839d -dist/2026-07-13/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.gz=5bef73082613bfe3282158ff55930cc55f20a6a608914ce2f6bd2a1226d5aea0 -dist/2026-07-13/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.xz=b4e3098d4b97441134f371d79a9c80791e8197c2aeb06ed39ae5479b0034d3bf -dist/2026-07-13/rust-std-beta-powerpc64le-unknown-linux-musl.tar.gz=c19aa26262d739d539ec3d2ace85cedaed463cb23453eccfb6b6393e1e18b880 -dist/2026-07-13/rust-std-beta-powerpc64le-unknown-linux-musl.tar.xz=57ac4f17a4de05c05cd9a7250a729150617f9b95bc87066e1b36788f7a5c5cc1 -dist/2026-07-13/rust-std-beta-riscv32i-unknown-none-elf.tar.gz=012dd92ccf9c69a90d89b6cc0ce35924e33cec80b67a7c928ec16bb7458c9f08 -dist/2026-07-13/rust-std-beta-riscv32i-unknown-none-elf.tar.xz=70b197a73375d8c1a12c0a2bce17d8a8d8704bb866adc02164a8bb01f175ae0b -dist/2026-07-13/rust-std-beta-riscv32im-unknown-none-elf.tar.gz=9fea77cd3fcc4b1f57d7bcb45ae98ef006d00dd7c1a7e22f027859f8ddd28ce9 -dist/2026-07-13/rust-std-beta-riscv32im-unknown-none-elf.tar.xz=1771b5cbb0ec396dbea642abf1c3c9a54c203c0a1fec44deffd1cec16fc4e4b7 -dist/2026-07-13/rust-std-beta-riscv32imac-unknown-none-elf.tar.gz=ffe6fb3d5642ceb4a47d7ef39c6c3ad15d449b51d2212c52f28d614e76a52ee4 -dist/2026-07-13/rust-std-beta-riscv32imac-unknown-none-elf.tar.xz=f6462fbbd1065695f5a6390e2a5484b8bdfcde7019919335ecc5b8ea08ab600a -dist/2026-07-13/rust-std-beta-riscv32imafc-unknown-none-elf.tar.gz=5d78c5893c977fa09e4a6f26e4f77388c69cf5ad87d586ff849247502881aaae -dist/2026-07-13/rust-std-beta-riscv32imafc-unknown-none-elf.tar.xz=676558c6afcd95258adb6459942f480aa9dfb772dc9c958ca7b904dd9360a333 -dist/2026-07-13/rust-std-beta-riscv32imc-unknown-none-elf.tar.gz=027a5916984ddf8a73401f35bd32227e3d092f024bd62b0fab5de75ed588ee72 -dist/2026-07-13/rust-std-beta-riscv32imc-unknown-none-elf.tar.xz=2d2dd9547ac62fa610e3d58ce5b7ad83556ff1c20a41faeb2ed3be3863c84143 -dist/2026-07-13/rust-std-beta-riscv64a23-unknown-linux-gnu.tar.gz=2525dfb3faa8395163e3f978896dc8c1fbca3b86377e57f5212a8926339cce09 -dist/2026-07-13/rust-std-beta-riscv64a23-unknown-linux-gnu.tar.xz=66f06dd2ad224b7037db70762fa9e635075dd63b4f886b562f0085a5f010a797 -dist/2026-07-13/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.gz=79aee4f4845190a2489ffaed59cc92e58903ad96475b0863f84e27ad59de545a -dist/2026-07-13/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.xz=c757ccf1a4238487d231304c951ebff9c6c9a9a941701403312c94872fb84e5c -dist/2026-07-13/rust-std-beta-riscv64gc-unknown-linux-musl.tar.gz=b07397a4ae8b640a3ec13c04889b684467a5cf76bfcb66c71c956eff7acaf3fb -dist/2026-07-13/rust-std-beta-riscv64gc-unknown-linux-musl.tar.xz=44d2e2dbc032dbe1ff86b7e2d0fb305e06028b865d3bf77a196dd042aea4cea8 -dist/2026-07-13/rust-std-beta-riscv64gc-unknown-none-elf.tar.gz=4d79e0a52e89f1a1888c2baa3caed64c2afa02ac69ec5e67b0ffe511b4cf49e8 -dist/2026-07-13/rust-std-beta-riscv64gc-unknown-none-elf.tar.xz=62955c0847500af7694180933e9b7e753d3d2a99bf990de2f2bcc19c464628d6 -dist/2026-07-13/rust-std-beta-riscv64imac-unknown-none-elf.tar.gz=cf8ec47c88e21e62d3b2db81be5331b55f132978b2835eba53bbd88fc1236778 -dist/2026-07-13/rust-std-beta-riscv64imac-unknown-none-elf.tar.xz=8304f8703ce6bdb5ee2e7c531f79dd6145396ab6b89832bc397d0f4f6b3c3e6c -dist/2026-07-13/rust-std-beta-s390x-unknown-linux-gnu.tar.gz=de723fd1fe604499e11452820a8f5053f588e49a64fd7bcb0fb54daf629aa21b -dist/2026-07-13/rust-std-beta-s390x-unknown-linux-gnu.tar.xz=c1bd584c4f24e09c043f021ed5766e187ebe640ddda6ef1e150d9cff4aff8429 -dist/2026-07-13/rust-std-beta-sparc64-unknown-linux-gnu.tar.gz=7966e8279ea2a921cc213ed3fb25e5c490c57f9980dd7ea7d9cc8e59c15cc757 -dist/2026-07-13/rust-std-beta-sparc64-unknown-linux-gnu.tar.xz=9940408f11c3f30b902f053dcfb3a55e16535e1d9ad4d6110034723ec0b9009b -dist/2026-07-13/rust-std-beta-sparcv9-sun-solaris.tar.gz=8ecd80a04930ecc16ab24581ccd1144f54233a29dfa652215d8372d64dbbdec6 -dist/2026-07-13/rust-std-beta-sparcv9-sun-solaris.tar.xz=69730a4aa5762b347c1d9463539eb456c92221150b6b50c368eb98d391f81823 -dist/2026-07-13/rust-std-beta-thumbv6m-none-eabi.tar.gz=5a8c1bd71b7d243f99fe0615815c905de66a40b5f19672866aefde5612bc655a -dist/2026-07-13/rust-std-beta-thumbv6m-none-eabi.tar.xz=c7ca0df14b5641a9e5e10670d4f260b9e6323cbd9685cc47ba897734d89b0278 -dist/2026-07-13/rust-std-beta-thumbv7a-none-eabi.tar.gz=e24011adc4248cbf000529dfb124c40cb205c3f53953a60770c172984f056597 -dist/2026-07-13/rust-std-beta-thumbv7a-none-eabi.tar.xz=fbc07c88c5f2efed58301d5c438aa81293c2755fd41af69ef635d2959dfb46b4 -dist/2026-07-13/rust-std-beta-thumbv7a-none-eabihf.tar.gz=11bf46aa82c3c47fff9101f7675f2da20d1dcd89a2cb04664e7e7c3b6846aae2 -dist/2026-07-13/rust-std-beta-thumbv7a-none-eabihf.tar.xz=f35fa081e20302988dcddb4c73bf28c011d3a6309f99f0bc8d879b5c5b80d7c4 -dist/2026-07-13/rust-std-beta-thumbv7em-none-eabi.tar.gz=9a40c394f25cd1c03a6ee45294476314444206ff19aed8f470101862799948a4 -dist/2026-07-13/rust-std-beta-thumbv7em-none-eabi.tar.xz=7ec07202467033f9714c731d199fff843680dd3bcd31e2f991260a4e5ea0704e -dist/2026-07-13/rust-std-beta-thumbv7em-none-eabihf.tar.gz=4476d9628d31ef3ea63f93957ec58feea39422122b9504794ff315657d9a8ea5 -dist/2026-07-13/rust-std-beta-thumbv7em-none-eabihf.tar.xz=94b2f8dbdfcd08cb9cf3fad82dd3dc436c2c7e2416d5a753d9f1154737332108 -dist/2026-07-13/rust-std-beta-thumbv7m-none-eabi.tar.gz=28a8bd3aaf3ad6bffa76f7eae1d62e6e60c9a32ac158fd71eb36832f02987d91 -dist/2026-07-13/rust-std-beta-thumbv7m-none-eabi.tar.xz=05e23b0dc88a8f2b4a2eed3d5370da1d07f4c9eb7c15e0877446075767ddf698 -dist/2026-07-13/rust-std-beta-thumbv7neon-linux-androideabi.tar.gz=22f5fdf2a28ba83ef351c483000a1e8cc6d8701e2fdb6d5dbf04940bdc87355a -dist/2026-07-13/rust-std-beta-thumbv7neon-linux-androideabi.tar.xz=4131dd7a25c4577d3a57c639781ff26c3af67425548edd40eb3c51fdc87367ad -dist/2026-07-13/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.gz=65b9f63cd2d62ba7bd103e88215f1dd0f5b6068bae68a2513d27533ed957e78c -dist/2026-07-13/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.xz=a051412f5224dbf85524e24cbd0db89c0e0261227e833d2452132b0e1c53456b -dist/2026-07-13/rust-std-beta-thumbv7r-none-eabi.tar.gz=378ab2792d49f26810ae4f73af542b5e7522328ac9fd9eee53983dd5292e01fe -dist/2026-07-13/rust-std-beta-thumbv7r-none-eabi.tar.xz=1bbc0ed4a4d1894f1fcd7c308ce2de14614609fbd86f25d99df55b9459613db1 -dist/2026-07-13/rust-std-beta-thumbv7r-none-eabihf.tar.gz=2a32064e39e44060849257e1830b3afda936e7c1369171e8335a4915a315e7ea -dist/2026-07-13/rust-std-beta-thumbv7r-none-eabihf.tar.xz=462142bd45cd0850379b74a3aa25f9d28a63f69b1ebc29f1b3b151325ce49f61 -dist/2026-07-13/rust-std-beta-thumbv8m.base-none-eabi.tar.gz=9d96af6781904c994350f16a174ecef2cb50101c072a8d8e4eb56b471abab966 -dist/2026-07-13/rust-std-beta-thumbv8m.base-none-eabi.tar.xz=19afd5da3c0911798fea12d5f2b10c33c15b172bda31d6590a2c1f9548bae042 -dist/2026-07-13/rust-std-beta-thumbv8m.main-none-eabi.tar.gz=ef1872300466ed3dfbc6e188e80e80a85009bda2ae82e45044c582e884ca710e -dist/2026-07-13/rust-std-beta-thumbv8m.main-none-eabi.tar.xz=61acd9b2ec190f88370e03a221ecd47fe0ce1a740e83311524a4bfa2e881f0bd -dist/2026-07-13/rust-std-beta-thumbv8m.main-none-eabihf.tar.gz=0c364b8bdb1e3f4c453e7a42ffdf54001c7d4b68e8ac7fdda237c0361a078416 -dist/2026-07-13/rust-std-beta-thumbv8m.main-none-eabihf.tar.xz=5e81e29dc18f684eb41425c69d7c09a37ee83b8f32701a36fe2b0d5509aa2936 -dist/2026-07-13/rust-std-beta-thumbv8r-none-eabihf.tar.gz=fe4c19619b189f752fb8b2c07c42abed631531cf1a708dccf4d96f457b20aa38 -dist/2026-07-13/rust-std-beta-thumbv8r-none-eabihf.tar.xz=267878c05cc0de2c52bd68bae27ccbd4b10391625a61e0e9ef8a841e6d1d0117 -dist/2026-07-13/rust-std-beta-wasm32-unknown-emscripten.tar.gz=18059a2ec3ed2c32e4bfebbd02101ed1140d6fd0a1433e078baae08fb3b0705b -dist/2026-07-13/rust-std-beta-wasm32-unknown-emscripten.tar.xz=a2f9def43b831fe3c80fa7f13e1f5d10b76623eda77c18f8ff5dc4f1360e01e2 -dist/2026-07-13/rust-std-beta-wasm32-unknown-unknown.tar.gz=e784ce736966290d2473284f87820d8971c74bb67fdc4f4c59be619db992a579 -dist/2026-07-13/rust-std-beta-wasm32-unknown-unknown.tar.xz=753cce43f266ec371025acc521146e93bf8e27841b15f589bd66b429ab94ca0b -dist/2026-07-13/rust-std-beta-wasm32-wasip1.tar.gz=585a11e0936c4eed989a1f4d3ab6d85174b56d2aaeeb6ee11c5ff50564262340 -dist/2026-07-13/rust-std-beta-wasm32-wasip1.tar.xz=236cf1a340bcf81f56039a6e7fe27af26ff64b34fa7c1245a6cab3b180af7170 -dist/2026-07-13/rust-std-beta-wasm32-wasip1-threads.tar.gz=6d346a81a06268f31b029e30881485941713c00908af65ab6aad8c4cf7ca6bce -dist/2026-07-13/rust-std-beta-wasm32-wasip1-threads.tar.xz=16070c51ebd29a44e960f14800013839e632c963c8e5ac0cd66ce08681a96f16 -dist/2026-07-13/rust-std-beta-wasm32-wasip2.tar.gz=86637040c4232787216f8af090c66124b9953414f6d456432cd8f2f8437a8730 -dist/2026-07-13/rust-std-beta-wasm32-wasip2.tar.xz=1c4bfde5f56e38900b11d56128cbcbe16610d890dbeddb0b7aa958f5b34ec529 -dist/2026-07-13/rust-std-beta-wasm32v1-none.tar.gz=b34c2a67247bd61f8d6810f9221f0f7811fc8e87a79b4f837b881c3c202ebdfc -dist/2026-07-13/rust-std-beta-wasm32v1-none.tar.xz=658f7e67d015d1883e33efa0fa893ef7f548bd7cc038e2843f7f0851a45727cb -dist/2026-07-13/rust-std-beta-x86_64-apple-darwin.tar.gz=3c21f6761766e4e3a055634e49563075ff75fd866a4c372e991b6dacbd41fda8 -dist/2026-07-13/rust-std-beta-x86_64-apple-darwin.tar.xz=47caa37d6655c4632bef4b0bc6dd2db10a6ae564ca7776c6a2012096a601da0f -dist/2026-07-13/rust-std-beta-x86_64-apple-ios.tar.gz=a90b87cf8c5a1008d8b7fb186c8455105612b4a8b63dd7ac23a00efa073f58a4 -dist/2026-07-13/rust-std-beta-x86_64-apple-ios.tar.xz=bebe5b71f518920c9ce137c86a0b73f0fb2f42f80aad072f8886168abcd6f932 -dist/2026-07-13/rust-std-beta-x86_64-apple-ios-macabi.tar.gz=333639064cd3fa09a0dddf087f9760c7d6c674c39848217d498f0be62ae18869 -dist/2026-07-13/rust-std-beta-x86_64-apple-ios-macabi.tar.xz=277c8bdd2e9f155b7033b2be4194a17c19686e4778443d999ac3a9ffdaa75e12 -dist/2026-07-13/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.gz=19f3a8ecb0b25c2682383783cbf93fc90f553193153bc33f6d6694df9ecf8f26 -dist/2026-07-13/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.xz=98f613a5cef016619d51d1af2b3d8c4d8a16a951acd0406656cbc853df1ed30e -dist/2026-07-13/rust-std-beta-x86_64-linux-android.tar.gz=44bfeaa1a75918cb4579135e5ec2914ab72d62745503009eadc754824bf1f198 -dist/2026-07-13/rust-std-beta-x86_64-linux-android.tar.xz=94a9e0feb88d6a5f9ff8e80f753c6b04ce76936bbc7600b34a4b8011718d0b6b -dist/2026-07-13/rust-std-beta-x86_64-pc-solaris.tar.gz=b4a439caa9c77d8afae8b00842ddd516748bb665260c0174ba6f03f6ec9af004 -dist/2026-07-13/rust-std-beta-x86_64-pc-solaris.tar.xz=4b88687739316fd56325a47fa846fd40004a85245c84c08a2c7f28ccc1218251 -dist/2026-07-13/rust-std-beta-x86_64-pc-windows-gnu.tar.gz=0d464534d254385e7986ea9e0561e40673bec9fd852e84b057ad547cd3ea1ba3 -dist/2026-07-13/rust-std-beta-x86_64-pc-windows-gnu.tar.xz=9ed7c41528247023a46199f04c74bd23bafbc273996dd11b75ecb262d6c6b1c3 -dist/2026-07-13/rust-std-beta-x86_64-pc-windows-gnullvm.tar.gz=eda596ed2c56703ad88f21dcaf34ac54a219a60186205a86b446536be5b0ffc2 -dist/2026-07-13/rust-std-beta-x86_64-pc-windows-gnullvm.tar.xz=5df24f682eb40a7cbb08a60be259dae3a47142accf1d22567a5cd7acc94d9d8e -dist/2026-07-13/rust-std-beta-x86_64-pc-windows-msvc.tar.gz=6dff672a3c1874796cf53195fb075fea706a95fa1a1fa9c09e61e79db469f05d -dist/2026-07-13/rust-std-beta-x86_64-pc-windows-msvc.tar.xz=79c8ef57c50fe3d63e913ac41bcffc153911d4283a90ed348eec01b2e9a4ad23 -dist/2026-07-13/rust-std-beta-x86_64-unknown-freebsd.tar.gz=5eeeb42fa30f47a343960cf2d8d805693faabc7c65e79a512be3d93af97f3173 -dist/2026-07-13/rust-std-beta-x86_64-unknown-freebsd.tar.xz=95e2f6b7ba8bf2ff9a47b7c28a4b93d818cf922a2dc6a8e670c269a0e789bca5 -dist/2026-07-13/rust-std-beta-x86_64-unknown-fuchsia.tar.gz=6f0f7380dd0d5da1b3105e5224e05ec69b533406ba39aa7ec6b3ab55147e0241 -dist/2026-07-13/rust-std-beta-x86_64-unknown-fuchsia.tar.xz=f2fa2bf371fb8995253acb5f3a55313e9c9553248b7ce69c8e04380f795a3663 -dist/2026-07-13/rust-std-beta-x86_64-unknown-illumos.tar.gz=b3d51c721465b50192b558b1c6fd4198d8d47fad4f17155622be6b418ed17b15 -dist/2026-07-13/rust-std-beta-x86_64-unknown-illumos.tar.xz=0f9b8fe4f28322bf03c4f0b64fa61a5927142d62645afa2309155bf7fe656253 -dist/2026-07-13/rust-std-beta-x86_64-unknown-linux-gnu.tar.gz=8c3fa46f63d0de26949c3af324b694262a8c2db3f6011c75f2fe84a8f5963537 -dist/2026-07-13/rust-std-beta-x86_64-unknown-linux-gnu.tar.xz=93c2358aae670c19a2422e2ae2789af2638a6b7b2590f8c935c2148ffa3b6b2d -dist/2026-07-13/rust-std-beta-x86_64-unknown-linux-gnuasan.tar.gz=362a148239be2e58742ec8f21a05b8540c968ec78e7a5f054a810690cdd7a328 -dist/2026-07-13/rust-std-beta-x86_64-unknown-linux-gnuasan.tar.xz=7903d0de94e106b058f023f65511fecbcf03f2e61092db21325aa6697ffc3304 -dist/2026-07-13/rust-std-beta-x86_64-unknown-linux-gnumsan.tar.gz=80fad6ee51add443c08ca3e82f5699736e2f9bdbb8c1701d288e8f1ec1fde164 -dist/2026-07-13/rust-std-beta-x86_64-unknown-linux-gnumsan.tar.xz=b0df56a095a2e2a1f99a3d2270a9e19b693bd97088fcd58b7b0f68d11ba3b184 -dist/2026-07-13/rust-std-beta-x86_64-unknown-linux-gnutsan.tar.gz=9117c7ecb3d6ba1fd352ab5e447164f5f8c2fdd4639f4179aebee4adbaa444eb -dist/2026-07-13/rust-std-beta-x86_64-unknown-linux-gnutsan.tar.xz=1dc7c52c42184c83aa1b44039efccef96f4f80c4ad2c6a941ce0fb9ffbb0ec5d -dist/2026-07-13/rust-std-beta-x86_64-unknown-linux-gnux32.tar.gz=89716266f6d4fcc6573096f4930dff600ac7eaf40434f8b357c216d1c75aef8b -dist/2026-07-13/rust-std-beta-x86_64-unknown-linux-gnux32.tar.xz=3c2b626cd00b204782b3c283f1ed7530400e6e27c30436463bd83f194db4e12a -dist/2026-07-13/rust-std-beta-x86_64-unknown-linux-musl.tar.gz=3ba2d2dd9ff7bbd26517ad15d2d232a5f0beaf4f4a8d18d298db56a7837549f7 -dist/2026-07-13/rust-std-beta-x86_64-unknown-linux-musl.tar.xz=d9ea053af3fa135a30b7d69fa4ee81e6c72857c7f42c30e6d1e9cbc7bda88c4e -dist/2026-07-13/rust-std-beta-x86_64-unknown-linux-ohos.tar.gz=0133863bdc19c076b6d6b66b4127b72f34e7e71491d997c110107ed9021a9d46 -dist/2026-07-13/rust-std-beta-x86_64-unknown-linux-ohos.tar.xz=f2f8d9bd8cddd9e37b5c4d56c2aa847b5a7bbcde09e289f529181428a7f32dfc -dist/2026-07-13/rust-std-beta-x86_64-unknown-netbsd.tar.gz=72165cca1dff23952c03a8c3c469da219cd923696381ccbdd369bbf4f82e4171 -dist/2026-07-13/rust-std-beta-x86_64-unknown-netbsd.tar.xz=1985ecc7017436d1b3a04948cd9eed316ef88fedd973f67342ca176ddf0e5ff5 -dist/2026-07-13/rust-std-beta-x86_64-unknown-none.tar.gz=76ac79828b8b98ba518413ed337e512632570868fc1bc8b0466137f4c72c8682 -dist/2026-07-13/rust-std-beta-x86_64-unknown-none.tar.xz=a02b8908c7c801ecd0ea93e7d87cd2ceca3ef927ed02dd7bcffd1a61b9dfa5a3 -dist/2026-07-13/rust-std-beta-x86_64-unknown-redox.tar.gz=a184b7e7c8be796cf0dfb47ef4aab609d57a8938575c75ef32ada896603060d3 -dist/2026-07-13/rust-std-beta-x86_64-unknown-redox.tar.xz=fd6a3aa96a560144bd5801e505c9c585101fa132d2c795a6d7c67445cba4038a -dist/2026-07-13/rust-std-beta-x86_64-unknown-uefi.tar.gz=27765881ffd0b3335233204194e72e682607879cf0e886ea941cd63ac2328f3d -dist/2026-07-13/rust-std-beta-x86_64-unknown-uefi.tar.xz=ba138f8d11e9a7eb50e7b8fa30ef687055637696f6c827713625289a458f8e26 -dist/2026-07-13/cargo-beta-aarch64-apple-darwin.tar.gz=41c871b02f9824b9cc772edc37bd9ee1b42992ea88333f8eb15935a230c3127b -dist/2026-07-13/cargo-beta-aarch64-apple-darwin.tar.xz=35b810e30b4b2ccbed6b39e00c7c6463de07adda803e2ff05d9df7a7cc37b196 -dist/2026-07-13/cargo-beta-aarch64-pc-windows-gnullvm.tar.gz=766cc2b9faff9362246a342f76874afd504dd479dbf1123d1feaf348916d48a9 -dist/2026-07-13/cargo-beta-aarch64-pc-windows-gnullvm.tar.xz=e0d0ed242e92d404e5a1cbffed3bdab262ff2722ff69cd6e82542931ad42e8a9 -dist/2026-07-13/cargo-beta-aarch64-pc-windows-msvc.tar.gz=e42169d6ff51acd84b13a94cbbdbf63165e1b9ae5089979e204a1f4764fa162a -dist/2026-07-13/cargo-beta-aarch64-pc-windows-msvc.tar.xz=d3cfb03acd936a91840a27e4afc66d7691f7305021f7f281da80b55ca45915bb -dist/2026-07-13/cargo-beta-aarch64-unknown-freebsd.tar.gz=c3b29bde33e74296a7d08382b7a288ca8341e0686266dcdbfa2bce86048c084c -dist/2026-07-13/cargo-beta-aarch64-unknown-freebsd.tar.xz=fbf8822702642ae9dd618e8c026d4a706c69ae1ce4fd8275860c4c6af4e89103 -dist/2026-07-13/cargo-beta-aarch64-unknown-linux-gnu.tar.gz=f2532dc57e621a4fd8188f98c3387811c6989a9b1b2dc463e073cb7dad1d2950 -dist/2026-07-13/cargo-beta-aarch64-unknown-linux-gnu.tar.xz=bc15dc0f8a7e79ead130ee3ab905176d31354a94a7db7e1a6a0cdcaf714dd33c -dist/2026-07-13/cargo-beta-aarch64-unknown-linux-musl.tar.gz=76f947f3579a70cb894b63845dac627cb5d96b202ef8ae9eb708a2b1967385e7 -dist/2026-07-13/cargo-beta-aarch64-unknown-linux-musl.tar.xz=6c6509f36d0a62aef77207158547319fb1c3b37a23747f89455056561a98a136 -dist/2026-07-13/cargo-beta-aarch64-unknown-linux-ohos.tar.gz=4ed811d6aea6d6a62413ce1929bbae0f1ecdc4d2e2e60139821ffc9f683d9504 -dist/2026-07-13/cargo-beta-aarch64-unknown-linux-ohos.tar.xz=4d726c1e35347ead84724f5b0beefca4391b5a807ac27b0474651d474316dccd -dist/2026-07-13/cargo-beta-arm-unknown-linux-gnueabi.tar.gz=616130792c19dd8e6cfb4cac6c9c3f2ec664b586dbdef0b303b00ad5fc43c086 -dist/2026-07-13/cargo-beta-arm-unknown-linux-gnueabi.tar.xz=9b283f4872125d7e640b92535096d892aafcbc715ec9f690cfa28a175fccd8cb -dist/2026-07-13/cargo-beta-arm-unknown-linux-gnueabihf.tar.gz=69560389eb235acd6669edde5e217ac4af91c83d3c17b2555e96650675d0c54e -dist/2026-07-13/cargo-beta-arm-unknown-linux-gnueabihf.tar.xz=feae73d79eaf414e4f83d8045e3792155cc25887935bb29d0277ac5b83f02eaa -dist/2026-07-13/cargo-beta-armv7-unknown-linux-gnueabihf.tar.gz=9f5502a05cda3cd7dd8d5f10823f9308f4d838258bcf1da8819b9f5c86a1d942 -dist/2026-07-13/cargo-beta-armv7-unknown-linux-gnueabihf.tar.xz=cd0c2e19adbe005676e51d7db74181ea7fac5e10d41ea9bfc2388b4e8c126aa9 -dist/2026-07-13/cargo-beta-i686-pc-windows-gnu.tar.gz=f5c5ebc398370282d72052582b4ddea3d3595c28ef6a0f4a1f324cb62fe699ab -dist/2026-07-13/cargo-beta-i686-pc-windows-gnu.tar.xz=dd78feee7aca67a8bb0249359a40d9cfb0b7cbd7b887c4cceb824f16ab0cbe2d -dist/2026-07-13/cargo-beta-i686-pc-windows-msvc.tar.gz=5fe3737b227877bf506f488013e4e28ae70fd1ab16d9501b206f38384be55d8b -dist/2026-07-13/cargo-beta-i686-pc-windows-msvc.tar.xz=b7a1ff34e48a8e14d208d31d19976c5132afee13e6d8e6d8538101d4432f1b5b -dist/2026-07-13/cargo-beta-i686-unknown-linux-gnu.tar.gz=895801a8404339ca6b408dcfee15d01a15f7f11fa891a36df8f30d1c8c074dde -dist/2026-07-13/cargo-beta-i686-unknown-linux-gnu.tar.xz=82dfa129e4313d421c1b839d1770358758253237dfdff6e74b204306862a6821 -dist/2026-07-13/cargo-beta-loongarch64-unknown-linux-gnu.tar.gz=06d23529acd488f4f68787f161abf41ea173211e819e7d3b41124fc42d5cf6b5 -dist/2026-07-13/cargo-beta-loongarch64-unknown-linux-gnu.tar.xz=ee309c3a6b4ce8f4e4814bf2f2acff48fda4c7488dc2616c67c66760ee896cbf -dist/2026-07-13/cargo-beta-loongarch64-unknown-linux-musl.tar.gz=2f0f8f1ac8bf6d8559c9fa803ecaf6792f4c3c7a44e2aa65c4c4e2bd86f6d803 -dist/2026-07-13/cargo-beta-loongarch64-unknown-linux-musl.tar.xz=a47b8fe85a95a9577e2bbf5a837cfe481e5980bdd7b5db742603e0257434588b -dist/2026-07-13/cargo-beta-powerpc-unknown-linux-gnu.tar.gz=d0792d1bd7b0425f258bfdde5f94d369c0e10346aea432db4676ab67545a7351 -dist/2026-07-13/cargo-beta-powerpc-unknown-linux-gnu.tar.xz=7dc9766de6fbd0a6bdbdcfb09f2fc2786a536c0b6f714ceb8c893ea7da5fdbe0 -dist/2026-07-13/cargo-beta-powerpc64-unknown-linux-gnu.tar.gz=634f54ee46f7b1cc0a784db41de60fa4d3aa07d4a45a85c159e3ac3da3788de8 -dist/2026-07-13/cargo-beta-powerpc64-unknown-linux-gnu.tar.xz=eaaf413faaf0955661fa4ed12a394fb828278168f4d8481de755bab57d67e03a -dist/2026-07-13/cargo-beta-powerpc64-unknown-linux-musl.tar.gz=eaeceec0dcc39003debeeedfea29a959a96efe65598279b9ee5051b041e92c43 -dist/2026-07-13/cargo-beta-powerpc64-unknown-linux-musl.tar.xz=688a28a9f66c6f4f5ae0f1867a42cf417281365c2fbe031665e5fa08eb41ad91 -dist/2026-07-13/cargo-beta-powerpc64le-unknown-linux-gnu.tar.gz=410fece1974344e5277d5a1aa7705aeeebeaa4a496f62c2a217c07b74d7742f6 -dist/2026-07-13/cargo-beta-powerpc64le-unknown-linux-gnu.tar.xz=56527fe65bc8934da06961cef9464d03e1da4831617df5192ba1a2b5fcfe327b -dist/2026-07-13/cargo-beta-powerpc64le-unknown-linux-musl.tar.gz=0cf02955359eebdbf6460f207b01ff913cff5004027379dd664b4fd8ad49fd0e -dist/2026-07-13/cargo-beta-powerpc64le-unknown-linux-musl.tar.xz=2223cd8f5d801b3ae34273fb3b58d0effc782012d38f1856ca04de32fd862f1c -dist/2026-07-13/cargo-beta-riscv64gc-unknown-linux-gnu.tar.gz=ab94d49d29cf3bd44cbdb80284379fbb14e5f1b6884d7e8ec22a89d4dd2ab1e8 -dist/2026-07-13/cargo-beta-riscv64gc-unknown-linux-gnu.tar.xz=b6dedadb2b47ce3e091123fb7b1e7db141b678d35d4b6bbf3cc1f579b46e3242 -dist/2026-07-13/cargo-beta-s390x-unknown-linux-gnu.tar.gz=8490dad36183837c61f417934e19d14737db34e5808394bf7a4fdd9d354c56a3 -dist/2026-07-13/cargo-beta-s390x-unknown-linux-gnu.tar.xz=e6ce38f5ecb743c5662d04123f57723a31f57cd74440015705045156a874a946 -dist/2026-07-13/cargo-beta-sparcv9-sun-solaris.tar.gz=e5b76409f87dab34603ebca8b6abd220f570885d6648e40a2030c2833fd983ad -dist/2026-07-13/cargo-beta-sparcv9-sun-solaris.tar.xz=103d1a29ff93992d55b7c301910282166a83aa6d40ecd1ddb7ae78e743c37bf5 -dist/2026-07-13/cargo-beta-x86_64-apple-darwin.tar.gz=cdcbd89e83f937addb6a4162ac42e0bb0bd51a4c192a7df92d027a0e21e3b74f -dist/2026-07-13/cargo-beta-x86_64-apple-darwin.tar.xz=70817e0bacf347a987d07c31429979ee5c383274d96108ff7c52f70a75f329c5 -dist/2026-07-13/cargo-beta-x86_64-pc-solaris.tar.gz=b1c54b84d49a879ed8b391d5ad4f5dcf8702ed8153c5893400e0c87caa1dbb9b -dist/2026-07-13/cargo-beta-x86_64-pc-solaris.tar.xz=fcb12d010439448c0292ec575a96b430e1f9b7b85660ffb5b62c99168d1536a6 -dist/2026-07-13/cargo-beta-x86_64-pc-windows-gnu.tar.gz=1db36f34d4f2f413cd982f605502682e2c149942ae31f1aaad850fd60dfbd276 -dist/2026-07-13/cargo-beta-x86_64-pc-windows-gnu.tar.xz=491cd0f57263ed6a9c23888386cad4a650805b70cb64596d1998ae47503a1ee6 -dist/2026-07-13/cargo-beta-x86_64-pc-windows-gnullvm.tar.gz=00bd2aa2fdb0b448d1197481bda53e5a80e43f8eaf109598de8c24cad274d7f4 -dist/2026-07-13/cargo-beta-x86_64-pc-windows-gnullvm.tar.xz=f4f1f887647a0dc7189727939127ebda0eda326dde38e6fb25f143f088224fb4 -dist/2026-07-13/cargo-beta-x86_64-pc-windows-msvc.tar.gz=2ebcec1935db54da8b704489705f33ad1880e36fbe17c765de7fb7fc69dd2e65 -dist/2026-07-13/cargo-beta-x86_64-pc-windows-msvc.tar.xz=f91ad459dcafa50270cd76df73b866ec4be8dd4870a7267213e2c09bf9eca019 -dist/2026-07-13/cargo-beta-x86_64-unknown-freebsd.tar.gz=84850927ba20b961f580232e2de7962af30d9c0c60aea1d6179332461ae74b0c -dist/2026-07-13/cargo-beta-x86_64-unknown-freebsd.tar.xz=7ef69cc255720e0cd64449d5377143f8e22a89b5ab2efef0c22435f35f4e5506 -dist/2026-07-13/cargo-beta-x86_64-unknown-illumos.tar.gz=1195937fbb0e08490c313c46069a4dd92d28248a2eed9f9805d5d1dcf3d26643 -dist/2026-07-13/cargo-beta-x86_64-unknown-illumos.tar.xz=abd973481c8719580acd86b69ec5509e81cefc1ea7b8fb5771863040983957f3 -dist/2026-07-13/cargo-beta-x86_64-unknown-linux-gnu.tar.gz=8e755ca7870bf9d372c2b1d64cb55204f79514df3dadc01576e29377620b6f49 -dist/2026-07-13/cargo-beta-x86_64-unknown-linux-gnu.tar.xz=92117f7948653b7263e6479d04ddf5f31cc8adf9499539ea95e24d61218a2fd6 -dist/2026-07-13/cargo-beta-x86_64-unknown-linux-musl.tar.gz=c9eae558297e06a36c3e4cf1c1a11df4446097cac6f9cdf712133a184fa9277a -dist/2026-07-13/cargo-beta-x86_64-unknown-linux-musl.tar.xz=4afeeda18e9b7f0f03d776853859dd96029997c85097a244e61fab5fdbeb621c -dist/2026-07-13/cargo-beta-x86_64-unknown-netbsd.tar.gz=573b3c9d14a25451efdbb05c0c787227c813a96cb3ed86fb8fe67ba31f8d4654 -dist/2026-07-13/cargo-beta-x86_64-unknown-netbsd.tar.xz=14f5ec8373488ffa42cc3d5edd605335857b510fdba5d4862a20ec1f8906f218 -dist/2026-07-13/clippy-beta-aarch64-apple-darwin.tar.gz=5bde0caea43c68c270f5160a96c2e418ac6ccff7c3822a2284d8e555e5e7e405 -dist/2026-07-13/clippy-beta-aarch64-apple-darwin.tar.xz=a8dd16e2e066d93dd7286fde1e81ce46a75d492c995d34f8845abcf05856df7c -dist/2026-07-13/clippy-beta-aarch64-pc-windows-gnullvm.tar.gz=fe2e8bde851f08f0caa7fa043fb9458439f89516ddc8ff4e864f0316bb0abc6d -dist/2026-07-13/clippy-beta-aarch64-pc-windows-gnullvm.tar.xz=73f90665d313afb44ffe6f8527ff7aa2b07131f9e2e5ca3200be245ac43121fa -dist/2026-07-13/clippy-beta-aarch64-pc-windows-msvc.tar.gz=e07d9ab15de44f39202f4ed51b2a9ceae6fabf861ff88178c1d2627b78f894e9 -dist/2026-07-13/clippy-beta-aarch64-pc-windows-msvc.tar.xz=4104ce240ad943c8553e92d1367634c7a01757c080e4267200601735f1095250 -dist/2026-07-13/clippy-beta-aarch64-unknown-freebsd.tar.gz=b2aa19d6e12cf24f757797c9ab88184fd4e38e5ebe678148fdbd5501397f25ae -dist/2026-07-13/clippy-beta-aarch64-unknown-freebsd.tar.xz=ede1fb4aa3ce713a12d43ddf210e80462628683fd4352eb619dc4028b6d58a83 -dist/2026-07-13/clippy-beta-aarch64-unknown-linux-gnu.tar.gz=ac4f48231525984782dfb2977ae61acb5d2e0aff7d13d067075169a709d0eb7d -dist/2026-07-13/clippy-beta-aarch64-unknown-linux-gnu.tar.xz=e5c9fc172e0f63a8ffaef49d11a4c33d03cb14a6714b9df6000d61c476e053e6 -dist/2026-07-13/clippy-beta-aarch64-unknown-linux-musl.tar.gz=4aee6abfeb7ff1175b4fe73df4cad4a844b3d77875be763d1d925c2efc498291 -dist/2026-07-13/clippy-beta-aarch64-unknown-linux-musl.tar.xz=4f6e95ea724c63e31926deaa6d8a634cf0e8c920dfd13005b4d0c82a53d6ed55 -dist/2026-07-13/clippy-beta-aarch64-unknown-linux-ohos.tar.gz=b5fe16b033bb445d7d5b8bf26bde718c8b329fc7386a9a0a45c479551916fe90 -dist/2026-07-13/clippy-beta-aarch64-unknown-linux-ohos.tar.xz=f430b2ec1e74a3918ad214ef7825e6ad0e524059cd05a10d59e5d533e6ec16e6 -dist/2026-07-13/clippy-beta-arm-unknown-linux-gnueabi.tar.gz=7071da93d8faa03ba4d92adabaa3e5bfb4844f00fdd2d0ba9b4c26dca0825559 -dist/2026-07-13/clippy-beta-arm-unknown-linux-gnueabi.tar.xz=5ad6fd3f9f56de7331aaad2e25db8c9f560173313661d177478ab41000363e67 -dist/2026-07-13/clippy-beta-arm-unknown-linux-gnueabihf.tar.gz=9447ced2cebb7fffa87bb1c05a416f1744354ad34ce32381d4839983e5fd55b2 -dist/2026-07-13/clippy-beta-arm-unknown-linux-gnueabihf.tar.xz=2fdd189c6c0a80d4bac0143f52f4a32c83f74be4d9970bd6378d7f2036d172de -dist/2026-07-13/clippy-beta-armv7-unknown-linux-gnueabihf.tar.gz=9bbb527f01a34b5778ae8aab67ff0403858de0a24ba32a5f626375bf405c23a7 -dist/2026-07-13/clippy-beta-armv7-unknown-linux-gnueabihf.tar.xz=6a817e5f1e9f610dbedbee5430bd852a5fd9b3227672623c66ed1a6e5d9e9189 -dist/2026-07-13/clippy-beta-i686-pc-windows-gnu.tar.gz=4c13d42132e82b797f87667f4f71960da6737cd04dee944a6603cfec276925d8 -dist/2026-07-13/clippy-beta-i686-pc-windows-gnu.tar.xz=d0ef5bc02bbce035d14d939237b8a7f8a47737228bc3e262d82b60e4fc3dbfd0 -dist/2026-07-13/clippy-beta-i686-pc-windows-msvc.tar.gz=edce04e22efd7f2a0635e8ce8bd4660fd6d7936290912fa43e8d69d81474fbb6 -dist/2026-07-13/clippy-beta-i686-pc-windows-msvc.tar.xz=7a81b44c79a54bda593b07989b6f501aafead45a77f885d1d115f130c8b7425c -dist/2026-07-13/clippy-beta-i686-unknown-linux-gnu.tar.gz=f0d10a8773e943a416d25263a1a65d3127b2f805421ed1a32179515d045211a9 -dist/2026-07-13/clippy-beta-i686-unknown-linux-gnu.tar.xz=6a151c1320a34279b0f8151629010014c68b2f54afff6f1615849ae9d9ebeed5 -dist/2026-07-13/clippy-beta-loongarch64-unknown-linux-gnu.tar.gz=d8a24caf25cabd777e630add80610a040cd0e313b604368094855cc8e9377f04 -dist/2026-07-13/clippy-beta-loongarch64-unknown-linux-gnu.tar.xz=6fadda72d4281224cb5bd4fd5e81cdd0e50a1970ecefa4a164c6e21fb4c889bf -dist/2026-07-13/clippy-beta-loongarch64-unknown-linux-musl.tar.gz=848d95852e3571730d2a77b2d70df5f90e3be393cfb37be7993cda0845849ed6 -dist/2026-07-13/clippy-beta-loongarch64-unknown-linux-musl.tar.xz=e191f65e3d8955bb7b031f3855c6386b1de3425a0b3295a8e2483c04493da8e6 -dist/2026-07-13/clippy-beta-powerpc-unknown-linux-gnu.tar.gz=5cad01712886f4c151bfd093da395cea615428816864a29fade7f383d37373e3 -dist/2026-07-13/clippy-beta-powerpc-unknown-linux-gnu.tar.xz=5a96cfc6b979f188ec2b3648b6281ccca6dcd93bf78e21105654e90a44872b7e -dist/2026-07-13/clippy-beta-powerpc64-unknown-linux-gnu.tar.gz=382f12fdf1027a4a601172bbfe5250271c38dc13ef048cb6c1b9a5e4b21ac98d -dist/2026-07-13/clippy-beta-powerpc64-unknown-linux-gnu.tar.xz=46012ef29809b57d3ef586aa2e6f53a45ae115daeb39c641457750acf19e5f6c -dist/2026-07-13/clippy-beta-powerpc64-unknown-linux-musl.tar.gz=be06962e3084310327c6ca5153bcaf9cfbe8343934d718726b8741c813923305 -dist/2026-07-13/clippy-beta-powerpc64-unknown-linux-musl.tar.xz=22dbffc420f26ba4bd0f4b9483b81a24c590adee592199be723ab8c5b6d4861f -dist/2026-07-13/clippy-beta-powerpc64le-unknown-linux-gnu.tar.gz=ee85ea65bffa6d5fd8c40635d0b8636ad590e47afd9a10958a0407f32d0d083d -dist/2026-07-13/clippy-beta-powerpc64le-unknown-linux-gnu.tar.xz=882b0cbe23d21b86512288837df458e2ab7daba227894520b17a2ec6455e9361 -dist/2026-07-13/clippy-beta-powerpc64le-unknown-linux-musl.tar.gz=cc3f187f8d4fe5edb3800697c021aee9be24a1940c4411baf7cb81d5a735d0a1 -dist/2026-07-13/clippy-beta-powerpc64le-unknown-linux-musl.tar.xz=e6c26a9be3d7e9c9e381c007f2709fb7e7a145c212b4f7a044e1f322b042b1d8 -dist/2026-07-13/clippy-beta-riscv64gc-unknown-linux-gnu.tar.gz=da15dfbd4b622d5f63f0859bedb26569b96e9e2d56992fb81c3aabdd66015f33 -dist/2026-07-13/clippy-beta-riscv64gc-unknown-linux-gnu.tar.xz=e8ab1a302898542dc5e970543635c4c91645a14e054edb7ba2ac72ddf473e708 -dist/2026-07-13/clippy-beta-s390x-unknown-linux-gnu.tar.gz=d9ec9dffbe67faa9f7d50a599b3fb5a84e39e44855f9d81e840d46ee9d0c952b -dist/2026-07-13/clippy-beta-s390x-unknown-linux-gnu.tar.xz=853397166718f12f6897ba854b854a93b01f90ec699806c664aa2871f55d8172 -dist/2026-07-13/clippy-beta-sparcv9-sun-solaris.tar.gz=ddda6ec338744df4c0d5b170a59040731f3c3635c1869d07fa5b609f3b8063ac -dist/2026-07-13/clippy-beta-sparcv9-sun-solaris.tar.xz=b5347c0945afeda876a976f47a79b892d5cda677a541b600c763a22570037b0e -dist/2026-07-13/clippy-beta-x86_64-apple-darwin.tar.gz=95739c918a223db2f4ed9743325e9e7ede52670f2f65f376af37a3ce65e31087 -dist/2026-07-13/clippy-beta-x86_64-apple-darwin.tar.xz=1af1ef86da4f368f8cafa60ed25d3335408c90aa6305953e7d110c8b0eb56d14 -dist/2026-07-13/clippy-beta-x86_64-pc-solaris.tar.gz=68fac6e15df0f46922faf4db9c57e3c4dc76c76fb85dc198fa4c68325cb7bf90 -dist/2026-07-13/clippy-beta-x86_64-pc-solaris.tar.xz=2775099f76654e3a160d65cd4ba72e5eddb2617f765b3736a59368424b89af5c -dist/2026-07-13/clippy-beta-x86_64-pc-windows-gnu.tar.gz=76dad5f455200fe132a7534ade960c775dedcf2c22568862dd4ea3fd12fc66be -dist/2026-07-13/clippy-beta-x86_64-pc-windows-gnu.tar.xz=8ff774259a357f81715cdc687c4795d6c075a9efa7fc81e52e8d2491c96faf3f -dist/2026-07-13/clippy-beta-x86_64-pc-windows-gnullvm.tar.gz=10c6f94c22cfc14ce96e39c7d104b058088e3293e16f25534fbec2aeb471576b -dist/2026-07-13/clippy-beta-x86_64-pc-windows-gnullvm.tar.xz=b248a311869da84e19765667e8929b69340a4017fea54fa59ccd46509d8a22fb -dist/2026-07-13/clippy-beta-x86_64-pc-windows-msvc.tar.gz=bf049e7b02644fede85e4ad00789ef1cca586b8f94e41547751984429686dfb2 -dist/2026-07-13/clippy-beta-x86_64-pc-windows-msvc.tar.xz=288b14fdd60a25c74956a35c54c9c6395c21c3a9de1aa24a0b1a38066909c024 -dist/2026-07-13/clippy-beta-x86_64-unknown-freebsd.tar.gz=255e51b9a1b4a576a85dca7765065b90a0f7f29ed501abc44d636dbf9d6d1b01 -dist/2026-07-13/clippy-beta-x86_64-unknown-freebsd.tar.xz=25b0379ec8d95ce15285f6d7880e296478b0a65b2301eb01d485f87ad9c5aa79 -dist/2026-07-13/clippy-beta-x86_64-unknown-illumos.tar.gz=b6d1e08d354ecbff81f0a6287627413aa63ee48e952bb8c58920f89748642693 -dist/2026-07-13/clippy-beta-x86_64-unknown-illumos.tar.xz=4da3564df96f68a96693cb58a8e60afa8f66c91b01c20efa7f331f91020dd249 -dist/2026-07-13/clippy-beta-x86_64-unknown-linux-gnu.tar.gz=ba25809bbde44b17cdce378017cf8e89de4bcaa7663b106392563952eca73b18 -dist/2026-07-13/clippy-beta-x86_64-unknown-linux-gnu.tar.xz=dfeec4ed4bc5a364faac5244d2c619a2095ab21b522e4eba2a98760242e33265 -dist/2026-07-13/clippy-beta-x86_64-unknown-linux-musl.tar.gz=21ec27ea52d38e09323e9eeaca41813370a6efb7a8e2ef2c6f873df9a8fe0f94 -dist/2026-07-13/clippy-beta-x86_64-unknown-linux-musl.tar.xz=fb76cd76256506d8c789d9b8a4e651c75141d17eeeeb1bd61a3e3e2ad4b323bc -dist/2026-07-13/clippy-beta-x86_64-unknown-netbsd.tar.gz=8d6c5bc7f745ae9afd64ad31ae8c70369c2c2dd4dfe8899b33042f0b9f909f0a -dist/2026-07-13/clippy-beta-x86_64-unknown-netbsd.tar.xz=2dfa71b3ad6d3807d6fc7640210957365e1048841cb5b07060c79778d4226dd1 -dist/2026-07-13/rust-beta-aarch64-pc-windows-gnullvm.msi=02aee63a1f49ddd335e819074ccd7043d10f9cee504cc598b74b1d3077ead106 -dist/2026-07-13/rust-beta-aarch64-pc-windows-msvc.msi=bdb4c9612224b4379e1954960deaaba08a752a19a681197ed13af29160e68001 -dist/2026-07-13/rust-beta-i686-pc-windows-gnu.msi=c2a4934b6b0079ade6204498033d2da31d8a7f238d7b9934ce985a2c7b909749 -dist/2026-07-13/rust-beta-i686-pc-windows-msvc.msi=96c6c60d8cd85d0e970c23894ef963e6497a18d568d894a4311a68e267586ddb -dist/2026-07-13/rust-beta-x86_64-pc-windows-gnu.msi=d5e4029889d9002f36b6121c45bdddb36462b10a136b273fa45f76703cb7a01f -dist/2026-07-13/rust-beta-x86_64-pc-windows-gnullvm.msi=acddeab202edebbe7a75340dfce19a82e9c0875abf770613938414bac8062a2d -dist/2026-07-13/rust-beta-x86_64-pc-windows-msvc.msi=3ec927ffc8a8f10faa6381478ba8b5c0e7d6f9e77d7004fee5365d5d1379634b -dist/2026-07-13/rust-beta-aarch64-apple-darwin.pkg=3dcae8599465b9af2d6c03d39ce2b2bfa33f563c16b77ec7b53a0256294cb21c -dist/2026-07-13/rust-beta-x86_64-apple-darwin.pkg=540cfa508aef7c84435779c0b77abdd3fa73a8116b1600233de84ca8dc4d9e11 -dist/2026-07-13/rustc-beta-src.tar.gz=ed1105e85d21fbaa38c183e94f110cdd99024edbc4a01740607901c1d107f520 -dist/2026-07-13/rustc-beta-src.tar.xz=1af6c6308008b6396b3a5653f1be4b656d078769159a6147e6a4d40effe5bcb7 -dist/2026-07-13/rustfmt-nightly-aarch64-apple-darwin.tar.gz=c4fe0b75d1b72ebca65dcf10e0bf0976e68f5b7292d8903cbb719dc1b058e70a -dist/2026-07-13/rustfmt-nightly-aarch64-apple-darwin.tar.xz=6ffaa0522f74b2a9c42d655c0dd14d906deec4fad39d8df3bf69456dc21b46d4 -dist/2026-07-13/rustfmt-nightly-aarch64-pc-windows-gnullvm.tar.gz=787de8663bb4de262da9c6448c091937991452e5925d5253dbaacf69288d7835 -dist/2026-07-13/rustfmt-nightly-aarch64-pc-windows-gnullvm.tar.xz=e50bdb4a0fa9e8bbcad63c2972a359c8a346f4c232b0759a4cd53f9e26954db5 -dist/2026-07-13/rustfmt-nightly-aarch64-pc-windows-msvc.tar.gz=0851cc4e9170fcd734fe86ed9124d0222c473f3d3982fa802e2ef7b116df3ce4 -dist/2026-07-13/rustfmt-nightly-aarch64-pc-windows-msvc.tar.xz=9306f9ccc3b446d656babb295a2e0831cdb0a44f6eb8501f771ba480a1e05e1a -dist/2026-07-13/rustfmt-nightly-aarch64-unknown-freebsd.tar.gz=499aae8a621c10fb7ce15eabd311f3fbcb2fd40b40c148c038d48755bd031812 -dist/2026-07-13/rustfmt-nightly-aarch64-unknown-freebsd.tar.xz=9560e8282c35ee15ddbb2b312ca6487211105be0c91be19f293f312da19d6988 -dist/2026-07-13/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.gz=66f8e02623a2a7d427234554fd6618d35a2d853ccaef769bc9e663d7f0fcd9e3 -dist/2026-07-13/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz=508863b915993209767b67237ad059e74543c97d5aca1ac132f823840ee893eb -dist/2026-07-13/rustfmt-nightly-aarch64-unknown-linux-musl.tar.gz=dddfb976c0313337fee9c120b99ac54e27559e06c34518d74f26093c8c934715 -dist/2026-07-13/rustfmt-nightly-aarch64-unknown-linux-musl.tar.xz=96a40578e970d03625666e7d118a7d56b6bd8b64934d23c560b84696efae4beb -dist/2026-07-13/rustfmt-nightly-aarch64-unknown-linux-ohos.tar.gz=a13420d507086ed57bd28de7e05a6b9a22805ce30be6fe28cc439ccc0dce87d5 -dist/2026-07-13/rustfmt-nightly-aarch64-unknown-linux-ohos.tar.xz=ae8f8ceea1f5616323ee1162ac62f9566e059c56535332ebb6cb23d09f4c9909 -dist/2026-07-13/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.gz=b96ab3c24a94c8b190d2060b6c487bd2b3e670b2508cb869b59cb954a9a954a8 -dist/2026-07-13/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.xz=bed71618d41c403a63ae592b786d678a1e36d4b3edaff9b9d85f979b9fbe6fbe -dist/2026-07-13/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.gz=d3be420109a0a738dac65992bb52a42686ffbae63e45704da37fa4f5e6968616 -dist/2026-07-13/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.xz=cb5e8664ad96e2cb8f25f96317d995bb1e71ee9f39953e7a81c4332c512e6a16 -dist/2026-07-13/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.gz=a7e50521bdc4aa4bf7abe00285ae3e0887f628470c1705d6309e8a951f17e6aa -dist/2026-07-13/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.xz=6585a81b7b3de23476415018e78b3d8c27bd881c0bb04aae2c3d481fe773f8c3 -dist/2026-07-13/rustfmt-nightly-i686-pc-windows-gnu.tar.gz=5547add346e653e59dadeee182b8f665bf34ce627d00d429618c79740e4e7a0a -dist/2026-07-13/rustfmt-nightly-i686-pc-windows-gnu.tar.xz=33240019b78dcc7b22895c25e0da420670b1ceae7991594dc9e9295082db9d35 -dist/2026-07-13/rustfmt-nightly-i686-pc-windows-msvc.tar.gz=8cb6170041f0ac51b298cff2bb532beb4474c48eb4f4f7e77537c0c991214aae -dist/2026-07-13/rustfmt-nightly-i686-pc-windows-msvc.tar.xz=7518d53d7446ac5789a58413c1460da047fac99ad60c7305022f11a285136489 -dist/2026-07-13/rustfmt-nightly-i686-unknown-linux-gnu.tar.gz=5b18836b0b2620eadfcb3653b5939fab06fe136611f90c7318ce09f0a07aefd6 -dist/2026-07-13/rustfmt-nightly-i686-unknown-linux-gnu.tar.xz=fd849575042d0831ca99f0bc83768004e277b6057fab0738d2b66f27562086bb -dist/2026-07-13/rustfmt-nightly-loongarch64-unknown-linux-gnu.tar.gz=8fbb4c2ae88a0fba34ce550d7c4f3d068e1a105f71beb6bf6738fb8390aedf4b -dist/2026-07-13/rustfmt-nightly-loongarch64-unknown-linux-gnu.tar.xz=4c27c399d5d1e9f9efc44f0b4ca0eeeca43cb19814d77df92856dd83bfb9903c -dist/2026-07-13/rustfmt-nightly-loongarch64-unknown-linux-musl.tar.gz=ff8d23330a7c22f1310cbc2ce2800dbcb4c969b70f38354ac0d4727b2863b872 -dist/2026-07-13/rustfmt-nightly-loongarch64-unknown-linux-musl.tar.xz=c3b289702b1d5a909a6aedc934f59a391afe132cde7c420ba4c3b45a2884eca0 -dist/2026-07-13/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.gz=6234c9aa4fc01853a051ed8a7e3ccd08fc9eb9dbfd0b0750e87cc3d37a6e5eb5 -dist/2026-07-13/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.xz=c14dfb54d1a7b95596a1f4d7796b054884279a624b21d8900d6de9d7f415fdbd -dist/2026-07-13/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.gz=3074bb6405811b3cc7a19f8d6c5f370a3fc27e62716a4464bdf4646eabd1cf3a -dist/2026-07-13/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.xz=495201626a0854f8123266cdc4792809da517bfe8c2d2eb9dff3cd9aeb916a56 -dist/2026-07-13/rustfmt-nightly-powerpc64-unknown-linux-musl.tar.gz=a88a229d36a33ca7992b373ff8a0ceef021e1fadfd1576e5dcfbbdea4d752a88 -dist/2026-07-13/rustfmt-nightly-powerpc64-unknown-linux-musl.tar.xz=083f1d9e276e4abb68182be1d56bacd9ebface8e3670cc5a81b464f1da271307 -dist/2026-07-13/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.gz=3dcd320e9db489f728cb9659c3f2148f1d0161e51c96748262112840914c7a35 -dist/2026-07-13/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.xz=77d8c0039bae164f4875b08294c79e5008e7b8d84d542a0b07eab7848ab13632 -dist/2026-07-13/rustfmt-nightly-powerpc64le-unknown-linux-musl.tar.gz=eae1cf8afa716bbb8818aa21640f36308561d1390d8226a917188a49bb3faa24 -dist/2026-07-13/rustfmt-nightly-powerpc64le-unknown-linux-musl.tar.xz=1b669136ea460dfa51bc98c1fd4684db167aef0113e0dd8765047b033c2f1a19 -dist/2026-07-13/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.gz=6d94bcbad402b98e159a2ade130ce204e6be91de7be8328756ff87d9c511fa1d -dist/2026-07-13/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.xz=e06bd1b42a28f6abaf8b526d9e7e8fa143eece01a78a848b0088b2a501669a75 -dist/2026-07-13/rustfmt-nightly-s390x-unknown-linux-gnu.tar.gz=c7eb4ec6ed296b0237de8aad6ea3464b8eefb76ac3f85620e2fddef37615c37b -dist/2026-07-13/rustfmt-nightly-s390x-unknown-linux-gnu.tar.xz=537d0f778b9dbf41668e6e2d940638e9660cde8a1f8975e1c6a52ef9d984a1aa -dist/2026-07-13/rustfmt-nightly-sparcv9-sun-solaris.tar.gz=af36417ad1bda9f3ff49e1617a02970516bdd2f9cfc066f3022e9173525eef4a -dist/2026-07-13/rustfmt-nightly-sparcv9-sun-solaris.tar.xz=ac6f8917529a4acd7f4d3b2a28d45e8d50da0a5097b247c1c2ce0d8a394d2040 -dist/2026-07-13/rustfmt-nightly-x86_64-apple-darwin.tar.gz=f1dcc2a21a79ba0a8f277512b93eb72ff53f2d88cbcdc55d142b37d52fb64067 -dist/2026-07-13/rustfmt-nightly-x86_64-apple-darwin.tar.xz=e70126091cf58f6f9d62c4a8974daf099af622516b7f84859c3583e72230b20d -dist/2026-07-13/rustfmt-nightly-x86_64-pc-solaris.tar.gz=ac014c3c5f604e54a90611456fcdb011b9ed9dfd74b22098c15a7cbbe5d1b054 -dist/2026-07-13/rustfmt-nightly-x86_64-pc-solaris.tar.xz=37d5cbbe0777c68b1e548bfeda163f6f41cb5638a100a78c08d3e00fa82fc410 -dist/2026-07-13/rustfmt-nightly-x86_64-pc-windows-gnu.tar.gz=83322897c84ff533674dfa139188f30884ad6bae06060e6473156aff09444c5f -dist/2026-07-13/rustfmt-nightly-x86_64-pc-windows-gnu.tar.xz=cbb421bb1ad05209a72b3425b51c33266f65cf113edab617f3eb93513b3e6f97 -dist/2026-07-13/rustfmt-nightly-x86_64-pc-windows-gnullvm.tar.gz=c72ccf93893dac3fcdb1dc009e310e87bbf8c64544002157826d7ac24e7b58cc -dist/2026-07-13/rustfmt-nightly-x86_64-pc-windows-gnullvm.tar.xz=0ba1610d0efe7b3f4b6c408f6efe8e114837509cb4617063f24a811c5f52f697 -dist/2026-07-13/rustfmt-nightly-x86_64-pc-windows-msvc.tar.gz=32f88062aedfb7c3a6fff3e807f573e3da295181394b6145a1be077db4c1c7a4 -dist/2026-07-13/rustfmt-nightly-x86_64-pc-windows-msvc.tar.xz=2a8112b835e528f0fe6a98cf16d45df35d0e9aef7b852b21f0a85f8404114d4e -dist/2026-07-13/rustfmt-nightly-x86_64-unknown-freebsd.tar.gz=3b07021b57f95d4fc4cf50cc3e4075e6e2c67fc356fb444fcd8778e9aaa4ee83 -dist/2026-07-13/rustfmt-nightly-x86_64-unknown-freebsd.tar.xz=703f69f8b1d4b824cc070571346736d9569baff407cf0162d20cb819ac8f4e05 -dist/2026-07-13/rustfmt-nightly-x86_64-unknown-illumos.tar.gz=9066897f502d5c3f18bac61e125101fd2ff906bfcf47d1b4f3901160e30a536c -dist/2026-07-13/rustfmt-nightly-x86_64-unknown-illumos.tar.xz=2f6504cfd48f627cfc0abaf3449cf46f171e35a82be5cdd752c04bef39468967 -dist/2026-07-13/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.gz=2c401432028297d12f159fe53715af30713913a74b63c34f747a3c831e807bbc -dist/2026-07-13/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz=e065beeec64626c2be391b34390e29ceaa97074f9724c4578f677a9a0660a721 -dist/2026-07-13/rustfmt-nightly-x86_64-unknown-linux-musl.tar.gz=39708df244746485679b2fa1d03be6415f182481015c48ceb322dac22c1ed0b6 -dist/2026-07-13/rustfmt-nightly-x86_64-unknown-linux-musl.tar.xz=6b596c3ef4fdbfa22b7a73310a17c390ab075ff428c3f16862935bf3419bc235 -dist/2026-07-13/rustfmt-nightly-x86_64-unknown-netbsd.tar.gz=f4c7e4339af69ad13560c3ca73bf3c4e90e6f00b5112aab9508cb4a8a0df0db7 -dist/2026-07-13/rustfmt-nightly-x86_64-unknown-netbsd.tar.xz=9ee6b6bf9fd3c14805cdf24e3c110c20386b60eb946cc1f866e0385aea67f54e -dist/2026-07-13/rustc-nightly-aarch64-apple-darwin.tar.gz=49f1f3c5d68b7e82e32d5d84fd7f7b1b95b592f465f21bb799f38ebf51dcf131 -dist/2026-07-13/rustc-nightly-aarch64-apple-darwin.tar.xz=7208e571e81bede535ae14535d63f68a1dbc5fadbe81d1792452512520d9f7cc -dist/2026-07-13/rustc-nightly-aarch64-pc-windows-gnullvm.tar.gz=20d63242cf34a9b3238f9f68ce3483ebe961478bf74562e0de9f91dd06fe8127 -dist/2026-07-13/rustc-nightly-aarch64-pc-windows-gnullvm.tar.xz=4cf4c03cd1f3d3c5925912a1c27379301a126cc7703bbaa7c13df50d935652a8 -dist/2026-07-13/rustc-nightly-aarch64-pc-windows-msvc.tar.gz=7b265aec5151cf2b4bedab917114ab2652def4bb718eba79abbb7f7ef0321ff5 -dist/2026-07-13/rustc-nightly-aarch64-pc-windows-msvc.tar.xz=6e7b5a2fb67e91a43e4f72d9960eec7d1d61d8320853dbcd5a41fd36dd36dc38 -dist/2026-07-13/rustc-nightly-aarch64-unknown-freebsd.tar.gz=a35256ca23b1761718eefcded9097b35489809268b218a4e02afe7cc4fba3572 -dist/2026-07-13/rustc-nightly-aarch64-unknown-freebsd.tar.xz=14cdc2ea08b1b0d93be308283a4df44e84e024b4e1be72545dc186a8f80494a5 -dist/2026-07-13/rustc-nightly-aarch64-unknown-linux-gnu.tar.gz=74e1f8397bab6df84d17bb9550571e0dc69968597b8cd25e92388124febd0320 -dist/2026-07-13/rustc-nightly-aarch64-unknown-linux-gnu.tar.xz=e0ff8bf0f4272c064238b4350f3352056b85da9b589ad649b87ac200236fbab9 -dist/2026-07-13/rustc-nightly-aarch64-unknown-linux-musl.tar.gz=06bd68cbbcef91e599a4ae29b73b85ed091195edc165ffb3fae27fa28178fa5c -dist/2026-07-13/rustc-nightly-aarch64-unknown-linux-musl.tar.xz=43dcdcc4ec6b8934da1042a501b3326e6b2a834892400b534f7c21bf00904bcf -dist/2026-07-13/rustc-nightly-aarch64-unknown-linux-ohos.tar.gz=6c3ceb65db27ef931e4baeb5786642426a48133cfbf2099bd5df5fac843684dd -dist/2026-07-13/rustc-nightly-aarch64-unknown-linux-ohos.tar.xz=a2aadce25ce5b5ff7052fa55531adec3444bc5e552c1f822781d60a26d9c7f21 -dist/2026-07-13/rustc-nightly-arm-unknown-linux-gnueabi.tar.gz=79f26d69a1907b1e22b3e815802d10f581f3ba15fcebd8ec982483603f35ce0f -dist/2026-07-13/rustc-nightly-arm-unknown-linux-gnueabi.tar.xz=7baf445dd19ce463f1315e990f9ac04db35790428da614b204c499b0096cf32b -dist/2026-07-13/rustc-nightly-arm-unknown-linux-gnueabihf.tar.gz=92b81c45ec0247e3d1db9465caa3fddb87f0eee4205506854d511a46270416e2 -dist/2026-07-13/rustc-nightly-arm-unknown-linux-gnueabihf.tar.xz=04b20d0c36f2698e4d4baa8673318d1496bd65abe28a8e138c798aefd19c2528 -dist/2026-07-13/rustc-nightly-armv7-unknown-linux-gnueabihf.tar.gz=c6c295f3ff02c62bb3e481df229f4097acb2668ff1cd07db44d8a169d7c374e7 -dist/2026-07-13/rustc-nightly-armv7-unknown-linux-gnueabihf.tar.xz=0935c8efb5a5e4983a7c072238fd09b16a165b2309be6836ee3c0a11fcf8ea6d -dist/2026-07-13/rustc-nightly-i686-pc-windows-gnu.tar.gz=99544e27c2bc140d206707b728ef6b01417ffe3ea02687dbc64dee315e5f8cb9 -dist/2026-07-13/rustc-nightly-i686-pc-windows-gnu.tar.xz=6e1722bae8a1ea134936d93cca1affee5a1b11604d87eec78f6561130e26abe3 -dist/2026-07-13/rustc-nightly-i686-pc-windows-msvc.tar.gz=0d33b996f7253e0594d1f542a04218b71e4e58abf5bb2b924d09467d9b064a86 -dist/2026-07-13/rustc-nightly-i686-pc-windows-msvc.tar.xz=f78fdfaa9c339c9eafe9a776e1ab9bc38638875ab5503d135a42f5c60282cb65 -dist/2026-07-13/rustc-nightly-i686-unknown-linux-gnu.tar.gz=7cde373ef6fcbb9607bd441d0f8ba630a3d5de38b67d3f698cc13320312f9621 -dist/2026-07-13/rustc-nightly-i686-unknown-linux-gnu.tar.xz=3f4ede8c31bb4f8b689d9504874c315690a20ab124dcd43c9e4ea9a78ad2b469 -dist/2026-07-13/rustc-nightly-loongarch64-unknown-linux-gnu.tar.gz=5134eba3e1d581d3fcee05944eefcfd679e698a5d6784d717724fdd36c83978f -dist/2026-07-13/rustc-nightly-loongarch64-unknown-linux-gnu.tar.xz=a800df1e60b54a59088a4b0d40ffe5ba59cbd7224e921425034086a89a91e606 -dist/2026-07-13/rustc-nightly-loongarch64-unknown-linux-musl.tar.gz=543bb7f2e027d36ba3ffac9c11f14df883ade2f56ffc9f938ae0f8e864b719ec -dist/2026-07-13/rustc-nightly-loongarch64-unknown-linux-musl.tar.xz=204966cd30652de2e6d2bb93481f12ac5ad83fa15c29d07e453f26722a265b87 -dist/2026-07-13/rustc-nightly-powerpc-unknown-linux-gnu.tar.gz=6b562be61c8feeb1f6a8f73b8dc88dae647817894690e227e9f504eb449d4466 -dist/2026-07-13/rustc-nightly-powerpc-unknown-linux-gnu.tar.xz=ade4488e4bdd27d9ca74f65071d83a9f736f0d2728656ff574252c1ea2c59c17 -dist/2026-07-13/rustc-nightly-powerpc64-unknown-linux-gnu.tar.gz=b5d6b394aa61545da633cc8ea56294ece740df09f5ea6ff759485799717b31fc -dist/2026-07-13/rustc-nightly-powerpc64-unknown-linux-gnu.tar.xz=3b7af404ef4b7800137ca415637fe0ef52eabd15fdf0202d6799380e8781cdd1 -dist/2026-07-13/rustc-nightly-powerpc64-unknown-linux-musl.tar.gz=4c7a4607837794c75d417de5093d946067aceea8af706d76dab45cd0319a5381 -dist/2026-07-13/rustc-nightly-powerpc64-unknown-linux-musl.tar.xz=976bce7f3241aca918c2723d38a0dbb3b008db288d97cf32f3c0843ec1f3b375 -dist/2026-07-13/rustc-nightly-powerpc64le-unknown-linux-gnu.tar.gz=219921a367439a804c19a43ce28925c802b1ebb1d6518808aa270f8a0b05d462 -dist/2026-07-13/rustc-nightly-powerpc64le-unknown-linux-gnu.tar.xz=a110d06e94a791ad0a228efc795f3743b497a68dadbfa4a43f108fe99d4ed28a -dist/2026-07-13/rustc-nightly-powerpc64le-unknown-linux-musl.tar.gz=a0aaa68059e002be5cd69bcdedf47afee5cd6689308ada31668694c052bf26e7 -dist/2026-07-13/rustc-nightly-powerpc64le-unknown-linux-musl.tar.xz=3e09c39884b4066288d0fb897afbadd915dfb75110dd1c6baf47097ed4ece33c -dist/2026-07-13/rustc-nightly-riscv64gc-unknown-linux-gnu.tar.gz=11e2a67f857acb5d1ecb6cb2c442c7dd36866c5a1fbcae56ba3fd2fe57dc67c6 -dist/2026-07-13/rustc-nightly-riscv64gc-unknown-linux-gnu.tar.xz=d4d3a93f63465228f605b32e1823a74ede3d67cccc02c8dedf08911c587b6f9f -dist/2026-07-13/rustc-nightly-s390x-unknown-linux-gnu.tar.gz=1384f7297351b86541b888bf1c534207fb5393b5b1a0dc7532297a98b36de0a7 -dist/2026-07-13/rustc-nightly-s390x-unknown-linux-gnu.tar.xz=23dde3e90fa69a926d790a37936230669d7a837881a3f4fa35b99e4bda3e1ec3 -dist/2026-07-13/rustc-nightly-sparcv9-sun-solaris.tar.gz=5ebe1206fb85a0890199213c849e39e3eb4c0c30b7d5f8a30b03ddd14f99b61b -dist/2026-07-13/rustc-nightly-sparcv9-sun-solaris.tar.xz=3d93fa39f7dc7dde238133a883aced4dd80e0d0f4a509ad4a7b137347257f2b0 -dist/2026-07-13/rustc-nightly-x86_64-apple-darwin.tar.gz=ada9e433ffa1b637e3742d0a310f872e3e922386799b103ed0c8ada76e18ca20 -dist/2026-07-13/rustc-nightly-x86_64-apple-darwin.tar.xz=e5a646aed9d168501ce175c4fdbabbfbe704359997db8ce693a9e222a439d9b6 -dist/2026-07-13/rustc-nightly-x86_64-pc-solaris.tar.gz=cc027fb988c1bb28a825cc6f8eacf3fde2d2170a7f74d7394284c189b87d81cc -dist/2026-07-13/rustc-nightly-x86_64-pc-solaris.tar.xz=3e9cea14c7d7a88758d50d9a7f2be44cd927bf246eef47a79c288089f27f2230 -dist/2026-07-13/rustc-nightly-x86_64-pc-windows-gnu.tar.gz=af49c7eae1f43d0865691089ecee380a48e7fb97c6b1ed5e31f87878d2a44709 -dist/2026-07-13/rustc-nightly-x86_64-pc-windows-gnu.tar.xz=d766c3852b21b4b521c5423e7a432ebddf89c03326c55e1b4dd8f8caf2a273e2 -dist/2026-07-13/rustc-nightly-x86_64-pc-windows-gnullvm.tar.gz=9a730cd68d35110ce9f92ddf3a5dbaa5d79cb227c9b0c866fc20dc614c8bc0e9 -dist/2026-07-13/rustc-nightly-x86_64-pc-windows-gnullvm.tar.xz=2792241f67d89af0e3c857d0bce2c40b3d73698acfa82dd1d92c0e7279e4f67b -dist/2026-07-13/rustc-nightly-x86_64-pc-windows-msvc.tar.gz=bb3aa99b33ac3083d7fe3b5a52a526550760abf569bd5dbf76bc30de39c6b9cb -dist/2026-07-13/rustc-nightly-x86_64-pc-windows-msvc.tar.xz=3ff6bf9ee779b3352136fd7dad86ccdddd78ff3bc173e1a64791f84446b53256 -dist/2026-07-13/rustc-nightly-x86_64-unknown-freebsd.tar.gz=3697111f5bc8645aeb79266e6d638be9688e65fec3560dfdab6eca314a167e46 -dist/2026-07-13/rustc-nightly-x86_64-unknown-freebsd.tar.xz=f6b6f8700b0b8b6b16dd9d0b749aa69971a32ea381e9f0e17e1b09b3d7639ee7 -dist/2026-07-13/rustc-nightly-x86_64-unknown-illumos.tar.gz=d72c027ca360a64d41015a6cac2a89d515233e1e9683a881f2d24d4e046dbe54 -dist/2026-07-13/rustc-nightly-x86_64-unknown-illumos.tar.xz=c74fabfbeceac8504676205e4a83e51ea1994e455ed6a13a8005202483feab42 -dist/2026-07-13/rustc-nightly-x86_64-unknown-linux-gnu.tar.gz=c6732dcf983308708b2962e22cae4a56b8b8b60a01f13e10f456c84d78170331 -dist/2026-07-13/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz=fccb42894543d399b4096377356cb44b3edad98f0f36e004d6a38d7868ef1f98 -dist/2026-07-13/rustc-nightly-x86_64-unknown-linux-musl.tar.gz=d567dfd9d985b450a5bbf2e483848fed918234c1a9b1df93c7013997d0e00191 -dist/2026-07-13/rustc-nightly-x86_64-unknown-linux-musl.tar.xz=9c150c30d9838fc579648654f12b288ef6f998fe87cba5a334bfbe9de5074cc2 -dist/2026-07-13/rustc-nightly-x86_64-unknown-netbsd.tar.gz=22233c06a393b7d2167f387649eef031f87dca283f6b9204c9f9597c500f61f3 -dist/2026-07-13/rustc-nightly-x86_64-unknown-netbsd.tar.xz=cec4704708237f23f67a2e10404aa25174ec745ef800b2bab1fa386b432ce41c -dist/2026-07-13/rust-nightly-aarch64-pc-windows-gnullvm.msi=86cd0bc21f83c5b002ce202f188866403527094f972d9c60d0473a7f0cda3677 -dist/2026-07-13/rust-nightly-aarch64-pc-windows-msvc.msi=a039fe857d876696d525632e90815ac546b2c94c394233e939f663882be60120 -dist/2026-07-13/rust-nightly-i686-pc-windows-gnu.msi=99062562e6866f05659906585f0ef19729aa175048b3b757227139a42d2945c4 -dist/2026-07-13/rust-nightly-i686-pc-windows-msvc.msi=599c5605aebbbb3a7e3c32c65fdfb947e26f70a7d6aab5670c77e980d36e68d9 -dist/2026-07-13/rust-nightly-x86_64-pc-windows-gnu.msi=760975781feeb0f7d05d1f60ae050731fef114f558729793666ade2320038489 -dist/2026-07-13/rust-nightly-x86_64-pc-windows-gnullvm.msi=d6b23478986dedb6796aae818388b8a825887f4a3cd02d1a9e11f29df5606b39 -dist/2026-07-13/rust-nightly-x86_64-pc-windows-msvc.msi=9e850302ab588a91be827a545c323c5bdee54161888ca6f228f92253f35c6bfd -dist/2026-07-13/rust-nightly-aarch64-apple-darwin.pkg=ed350a1a6965bb92489ed3d4112bd399646a4e3b761e61bbc82bab969fba36e6 -dist/2026-07-13/rust-nightly-x86_64-apple-darwin.pkg=b74c67d11de242e78aeeedba7e6f7ac964ef7e3094bf634949714c0ec0e2f8fb -dist/2026-07-13/rustc-nightly-src.tar.gz=80066d109bd6b7bc4069cc48ed4cb16a033b3d9db06d82cb0dcd46fb5b9f4a1b -dist/2026-07-13/rustc-nightly-src.tar.xz=6d8cba3429bec8f85b39a2ca6b5f306648d4b244cb478466322f56852cc72dcf +dist/2026-08-18/rustc-beta-aarch64-apple-darwin.tar.gz=4e04b1d8e2de5099073f7165c9473ae6e6b5cf7206382a6f943d37f557f90252 +dist/2026-08-18/rustc-beta-aarch64-apple-darwin.tar.xz=23f57cd995a7131558c74da34707dbafae6b89a1557534820c7d5f09a030c80e +dist/2026-08-18/rustc-beta-aarch64-pc-windows-gnullvm.tar.gz=c5b821b82d01fcd996bc2937abcbe6b395d7869dc12ba72ff1895282bd4acec3 +dist/2026-08-18/rustc-beta-aarch64-pc-windows-gnullvm.tar.xz=ca7098528a3f9eb604036943dab84bb9c83733c95de79748b249762fa3c309d3 +dist/2026-08-18/rustc-beta-aarch64-pc-windows-msvc.tar.gz=18be6800753c250d59d4558b4d3210bb5565b0f64b76e93a310967df031785f9 +dist/2026-08-18/rustc-beta-aarch64-pc-windows-msvc.tar.xz=1310e973389038d668781e0e53bfd1817f72774b9974dcac39599a00e60130b6 +dist/2026-08-18/rustc-beta-aarch64-unknown-freebsd.tar.gz=d52701206dab37eeff082d1fdd3ca4158b6c3fe391ec14a1b124e314db82b50b +dist/2026-08-18/rustc-beta-aarch64-unknown-freebsd.tar.xz=5363d51a3c0349a6306234743cee60432f4725678fa8efb1a046ecc9f3a3c0bd +dist/2026-08-18/rustc-beta-aarch64-unknown-linux-gnu.tar.gz=3855b3810d036cbe22ec3ee1e924f8fa85222399f84f0205c75d4e7e13dfdfe1 +dist/2026-08-18/rustc-beta-aarch64-unknown-linux-gnu.tar.xz=db329b33fed3303ce317e15054e22c599b50794362ed1a9643500671908c8a95 +dist/2026-08-18/rustc-beta-aarch64-unknown-linux-musl.tar.gz=f5f329b194f4b57b9ce226b79142f8ff040b9b8a46627efd0611fe9476faa100 +dist/2026-08-18/rustc-beta-aarch64-unknown-linux-musl.tar.xz=debf6ca1b5df26926eefb86cd78b16a4785c6e901cb7420753efea9e173a5725 +dist/2026-08-18/rustc-beta-aarch64-unknown-linux-ohos.tar.gz=6844476814d2bb90b53af87b94c4851d74a77cb071ebda6902223a8594f51597 +dist/2026-08-18/rustc-beta-aarch64-unknown-linux-ohos.tar.xz=8c522be24939b1529ae1861ebb9d5d0d51a74145d88fddd252cdfc6bec19e867 +dist/2026-08-18/rustc-beta-arm-unknown-linux-gnueabi.tar.gz=717dd10b35c068afb1f241caba5488aed9a2f7cf4b187be2dfc0cd888932e19d +dist/2026-08-18/rustc-beta-arm-unknown-linux-gnueabi.tar.xz=3569084f389294cad8314db51601a51f84fdf562f125169a01a1326f6b190d6f +dist/2026-08-18/rustc-beta-arm-unknown-linux-gnueabihf.tar.gz=a93b5721ceb24371de80046fa72923b182df2ffdf571ce217f31531178caa4cc +dist/2026-08-18/rustc-beta-arm-unknown-linux-gnueabihf.tar.xz=36e7b26884281544d386c9faef0d45e92387032f6f3825725ba922d5ade8fdfb +dist/2026-08-18/rustc-beta-armv7-unknown-linux-gnueabihf.tar.gz=2120ad8499f7d18f1bdc382796af43d257c15f5c40e49aa158ed92e057e801bc +dist/2026-08-18/rustc-beta-armv7-unknown-linux-gnueabihf.tar.xz=575b270ece686b6fb8545cd8ca7de143d8cb0b46987e554f5f35dc2caa02a9ec +dist/2026-08-18/rustc-beta-i686-pc-windows-gnu.tar.gz=ae4f7ce459c4bcadc7fa2b58e47071d131e378df6b08c4ce2d1f7d9e8f375cae +dist/2026-08-18/rustc-beta-i686-pc-windows-gnu.tar.xz=c821cabd5de0c7167b27911a6f1a55e1194be915ab16259ba039f762605846de +dist/2026-08-18/rustc-beta-i686-pc-windows-msvc.tar.gz=24bb41d3dce7e9b66468654bd35b765ae435da92e626a6e5f23c0ec13b8d982a +dist/2026-08-18/rustc-beta-i686-pc-windows-msvc.tar.xz=aa1457f95d957283f7bc0858fcd43399277cc7e7dc32410a15377ad828352111 +dist/2026-08-18/rustc-beta-i686-unknown-linux-gnu.tar.gz=9f42adaf503c9afaac3b20b7b877af2ef2af563b5fd02d11cde3f5f231a27380 +dist/2026-08-18/rustc-beta-i686-unknown-linux-gnu.tar.xz=62ea2c3ea2ad18009968d2656d0bb603a3ca1ec9d0a13531b52b81194b29050b +dist/2026-08-18/rustc-beta-loongarch64-unknown-linux-gnu.tar.gz=1c9e9e6fddd7d89382be658235819a4bc05b122d0a7ef716d4ab365721eb798d +dist/2026-08-18/rustc-beta-loongarch64-unknown-linux-gnu.tar.xz=7ffef16a0588c5428906aa2546a19c4333a7fb4cc689cca2d598a13a086612cb +dist/2026-08-18/rustc-beta-loongarch64-unknown-linux-musl.tar.gz=3e9f29411e26fbf96e97fb2b5bb6e6c4b3310dfd583163b19a2d5dc559e6bfc8 +dist/2026-08-18/rustc-beta-loongarch64-unknown-linux-musl.tar.xz=fb545c822175c6f3bd3975e988eaf472a4349d890e3453932ed289891031099b +dist/2026-08-18/rustc-beta-powerpc-unknown-linux-gnu.tar.gz=a45c291440db15376e06f67c752d0d4d31cd03a706c4ecca9c75686e4e1f9503 +dist/2026-08-18/rustc-beta-powerpc-unknown-linux-gnu.tar.xz=dd12b86878741ed0b348d85060aac1bd7e64327b87f8c9d92cce16bb78736a88 +dist/2026-08-18/rustc-beta-powerpc64-unknown-linux-gnu.tar.gz=02bb7a5d7524e8eef2fd6a182b9d3335ce89a8454f8bed8ea1e37a4fa8360029 +dist/2026-08-18/rustc-beta-powerpc64-unknown-linux-gnu.tar.xz=0f6ebebc1d45dd8a05e108631f05d726badcfa9f2a56bb6f366cf01f8850cbd0 +dist/2026-08-18/rustc-beta-powerpc64-unknown-linux-musl.tar.gz=3a81060f6a6b6c5130cc9ca7e33aaadab0e5efab4113c9e6c90eb1bb3742002a +dist/2026-08-18/rustc-beta-powerpc64-unknown-linux-musl.tar.xz=787c1702bb8a3f390ff4f2fa724fa357cd780446bdf9492d0b528f155d63a400 +dist/2026-08-18/rustc-beta-powerpc64le-unknown-linux-gnu.tar.gz=41e6812404daf866dda17d6389f2dd164d48e227bc91207d6ec17964e2796c30 +dist/2026-08-18/rustc-beta-powerpc64le-unknown-linux-gnu.tar.xz=d1f8f153e216356bf034d804a816c874e2cb0a1b2a289f7e944bf07e52f55c3e +dist/2026-08-18/rustc-beta-powerpc64le-unknown-linux-musl.tar.gz=765771107ada2703cc0528affeafe47334bf8fc9816c6103d1acf388602029f2 +dist/2026-08-18/rustc-beta-powerpc64le-unknown-linux-musl.tar.xz=3f913b5a72f14ebabc07c6cf80a0fe2ea6fd450355ead4fd027183849a93d316 +dist/2026-08-18/rustc-beta-riscv64gc-unknown-linux-gnu.tar.gz=680b09e7b774c6deb0ce1e6a630d1cfc40d8d6a7a0eec84fc5a342cde16c30b3 +dist/2026-08-18/rustc-beta-riscv64gc-unknown-linux-gnu.tar.xz=aba55cab20c6c384f0660047ea2c1e5c7f0607be751d78009d089be824ff178a +dist/2026-08-18/rustc-beta-riscv64gc-unknown-linux-musl.tar.gz=f178f8b873cbdad29ebd9c3bf77288ab198e71e1245e382d7daa1fdaeef0ca13 +dist/2026-08-18/rustc-beta-riscv64gc-unknown-linux-musl.tar.xz=80a6a15d4f647d4d2f271e4b730b7bc95abff3e040ca65f78937ffa1cdea6028 +dist/2026-08-18/rustc-beta-s390x-unknown-linux-gnu.tar.gz=b9b7bd2d193dc92cb4bfc2903b295d6661026ffec7d03691169675d7c839602b +dist/2026-08-18/rustc-beta-s390x-unknown-linux-gnu.tar.xz=61ca8e658188cb8657bac8f8c197c79bdd18f7bf50929b2c83905f21777bd8b8 +dist/2026-08-18/rustc-beta-sparcv9-sun-solaris.tar.gz=dfcab6819e60e6d8168bbcd9ae6179c1764d6d4fd5bb50585e686c97ab882ecb +dist/2026-08-18/rustc-beta-sparcv9-sun-solaris.tar.xz=595e66e81982690ff4249a58b0e7551b06884ec61dcf2db146b1123190274b28 +dist/2026-08-18/rustc-beta-x86_64-apple-darwin.tar.gz=381bd8e703643b8eaabbd4a6d57810d7d3d3be88f3c8c4b00a7463426cd8ffb4 +dist/2026-08-18/rustc-beta-x86_64-apple-darwin.tar.xz=61bc970524afc5daa0922e94cb5ba6c4ceedfae02500e8d02f4aad8a78e66b30 +dist/2026-08-18/rustc-beta-x86_64-pc-solaris.tar.gz=a3615e85f1ecb3adb6a2730473d98d509939c0f03cc365114b2dfcbfe73cf21b +dist/2026-08-18/rustc-beta-x86_64-pc-solaris.tar.xz=b0d62333a8d1207c6ba8a5668737252e2fdd8807c51be1f7716de6411459d1fe +dist/2026-08-18/rustc-beta-x86_64-pc-windows-gnu.tar.gz=c56b41ac05d836723b5782660ef09a66a0f40eb08d7bcac261c40a7f2d573e45 +dist/2026-08-18/rustc-beta-x86_64-pc-windows-gnu.tar.xz=1659dca16389fe3534712e460541a47be22d0c108a97dd7d8c3f3b7b3d57c5d1 +dist/2026-08-18/rustc-beta-x86_64-pc-windows-gnullvm.tar.gz=bf006112bd8f4de8d6f5487fbeb81b50145353243d96790bbdee5db64438f6cc +dist/2026-08-18/rustc-beta-x86_64-pc-windows-gnullvm.tar.xz=70ed4cb39020b89e7a750788aaec9fb375c46b6f2a834260f3ad3b1add6c8f0b +dist/2026-08-18/rustc-beta-x86_64-pc-windows-msvc.tar.gz=2c3988db60d89a8d87a3ff3a796cf3246579c5bddbf04d966050beb8065978c3 +dist/2026-08-18/rustc-beta-x86_64-pc-windows-msvc.tar.xz=876caa0be5e7b089fd8277a4257e2e088d129e2b90df5860b35b5669197c760a +dist/2026-08-18/rustc-beta-x86_64-unknown-freebsd.tar.gz=4a059078cdb1677a8eceb7aae1eed70ed228bd790564927df8b3ecbbda348857 +dist/2026-08-18/rustc-beta-x86_64-unknown-freebsd.tar.xz=32d8f974359bab0158e7e29985f50eaef90e9b4ed6afba20e456459cc693354b +dist/2026-08-18/rustc-beta-x86_64-unknown-illumos.tar.gz=64d67ee42a8099946482ac57f4a5aea941162296041ab244f18c6eae22b72fd4 +dist/2026-08-18/rustc-beta-x86_64-unknown-illumos.tar.xz=fb161219e0c9119e13d3d3e29252d8ca14b207e376925318688d980451f924c3 +dist/2026-08-18/rustc-beta-x86_64-unknown-linux-gnu.tar.gz=f9e6ae7af4c3a8044b53e63afdfb57da7d81afb6c76b4dc56fc9dbd655147988 +dist/2026-08-18/rustc-beta-x86_64-unknown-linux-gnu.tar.xz=984458ef8cfe2e544ff9002b29aae08d77368713d905d236fd31a9ea41234d5c +dist/2026-08-18/rustc-beta-x86_64-unknown-linux-musl.tar.gz=08673148e2beff75af3bd110833b9d00a5d6f08faf87f5ef89e4a8f3943bb460 +dist/2026-08-18/rustc-beta-x86_64-unknown-linux-musl.tar.xz=857c0346c487d9a1bd7ef9fb14b36259ba0654845ff48a3b9967c49b9a589359 +dist/2026-08-18/rustc-beta-x86_64-unknown-netbsd.tar.gz=e15857d6f2b2f21b6cf188db2260d5490e2be3531d430b9994e8934329095c01 +dist/2026-08-18/rustc-beta-x86_64-unknown-netbsd.tar.xz=2a5c52fee84fc55836aee4189f16737b60b31f712157ba8a4ebb15c4d8499fe2 +dist/2026-08-18/rust-std-beta-aarch64-apple-darwin.tar.gz=34834a3732a7acc760a1eaeea63ddd74338d5b9bc54f12098a2b3ca3c65e6787 +dist/2026-08-18/rust-std-beta-aarch64-apple-darwin.tar.xz=9329d72e3f56915f580f9968ba50a5055e32c3466b20e2c59309f3fc560b9826 +dist/2026-08-18/rust-std-beta-aarch64-apple-ios.tar.gz=8b4df0bd79bf101064d6c785a25405830947ecd9b42e1bf5209af926bb29ea99 +dist/2026-08-18/rust-std-beta-aarch64-apple-ios.tar.xz=be4d8fe624282bd30c3a67811f5e14f32dc16013480b364eacedcf39be5b2976 +dist/2026-08-18/rust-std-beta-aarch64-apple-ios-macabi.tar.gz=2f1804ad64cf220db1d8ceed5c898002604ba0c26ce29100c68f80ce1c5b4a8a +dist/2026-08-18/rust-std-beta-aarch64-apple-ios-macabi.tar.xz=24a621ab6c15670ff5c456e1e6843389dc3c5312799bae9a218c66c82ddba52f +dist/2026-08-18/rust-std-beta-aarch64-apple-ios-sim.tar.gz=833645565f778c3783fba3f008c9620155c731b5c98e35686972f7a5093a964b +dist/2026-08-18/rust-std-beta-aarch64-apple-ios-sim.tar.xz=55d0507f3904efb1d005bdd13c2a131c2935aabea3c1620931c2e79a195564a9 +dist/2026-08-18/rust-std-beta-aarch64-apple-tvos.tar.gz=1a50623dadf720e75ceba9fdc48207db2c80c70d3d052e431ce4181a38479522 +dist/2026-08-18/rust-std-beta-aarch64-apple-tvos.tar.xz=9ac966df182833b323f4293fa63e4bb24e07cbbec0ffc96758d860c712a3c775 +dist/2026-08-18/rust-std-beta-aarch64-apple-tvos-sim.tar.gz=4ac899af9afd534ece4d4894752889d63355390b27da040bfea240b4314f7bf8 +dist/2026-08-18/rust-std-beta-aarch64-apple-tvos-sim.tar.xz=4095069b71b40cc6966b48d0eac459fe54627c8abf8b07867f56e32a6a7ee984 +dist/2026-08-18/rust-std-beta-aarch64-apple-visionos.tar.gz=8cba6a324f3e03aa0001199ed21aea27caa1951223050204bfefc11db93e6301 +dist/2026-08-18/rust-std-beta-aarch64-apple-visionos.tar.xz=3062fb044995d684f495583f2f90b707e1a60655043ec539038ef2e064ff1a4f +dist/2026-08-18/rust-std-beta-aarch64-apple-visionos-sim.tar.gz=80693d5bddc90add2b3889efecbc33e94dce5f7b77763db83bf089ecdbb5bd6b +dist/2026-08-18/rust-std-beta-aarch64-apple-visionos-sim.tar.xz=643307ce75ac8dd24192468607e36306dbff89f92b75cbd38604abf5b188c297 +dist/2026-08-18/rust-std-beta-aarch64-apple-watchos.tar.gz=ea41e3775809ec9f5fefd158801e82987e027d28556b8beb8000a965d2303263 +dist/2026-08-18/rust-std-beta-aarch64-apple-watchos.tar.xz=a86df724b5e843038e2e8c796d87ebda49e87c364b8d94410a36d079180f384a +dist/2026-08-18/rust-std-beta-aarch64-apple-watchos-sim.tar.gz=c0b7c2c5e945b54003e1449db974dcda1dbb9287fe1d04e60c1e7b3c44a55138 +dist/2026-08-18/rust-std-beta-aarch64-apple-watchos-sim.tar.xz=57b245490bb3208b0531e59a59d9dd393c5ba251903706b539bed962ec4d705d +dist/2026-08-18/rust-std-beta-aarch64-linux-android.tar.gz=32844779365cb1f7ff6f0c23ef25041c2428f0431ee7aadebe0d3c7202e6472e +dist/2026-08-18/rust-std-beta-aarch64-linux-android.tar.xz=b5610133a25db38f19b305a02e01a8f70a3dba06abc790c8d98264968cfb65c8 +dist/2026-08-18/rust-std-beta-aarch64-pc-windows-gnullvm.tar.gz=5347597c4547cfcb92e87f64fad06cb6f0398d017370be2618ffd25c62ce77ed +dist/2026-08-18/rust-std-beta-aarch64-pc-windows-gnullvm.tar.xz=c82e0315ff536d1680b1f7b72cf02f58048f37824e90848322536a2cd6733c8e +dist/2026-08-18/rust-std-beta-aarch64-pc-windows-msvc.tar.gz=c7961799c6eaf17b0761116dd34717d44c305e5c72b6799bf5219a821966b3e6 +dist/2026-08-18/rust-std-beta-aarch64-pc-windows-msvc.tar.xz=8ca6c068d24a4f0e68e6ba32842fc90624c474edce560eb2ee15d78cc8952ae6 +dist/2026-08-18/rust-std-beta-aarch64-unknown-freebsd.tar.gz=cb921d27103accc84ceb60ab8bdb1555f42570156ac24117c94c7f373463d21f +dist/2026-08-18/rust-std-beta-aarch64-unknown-freebsd.tar.xz=ef81216d517d2512305943dd1e7e8be2c355990581a86821bf73c40c39013256 +dist/2026-08-18/rust-std-beta-aarch64-unknown-fuchsia.tar.gz=b98d1928d05baa48a904dd0ee22a2c22bdecc008b1279b6475dcb860a350223b +dist/2026-08-18/rust-std-beta-aarch64-unknown-fuchsia.tar.xz=fef6c278692eb43215f8ace09cf1cb4aea8664dbf72bf6096b814454adf5658e +dist/2026-08-18/rust-std-beta-aarch64-unknown-linux-gnu.tar.gz=1f97f2e0738bcb2ce250e48975a8b8fbcd70506285be4384caa2e7e360c90638 +dist/2026-08-18/rust-std-beta-aarch64-unknown-linux-gnu.tar.xz=812c4d65cb4c94d0298163dc4a9895fa0d6454d37d343af0d83eec41a8b28a1a +dist/2026-08-18/rust-std-beta-aarch64-unknown-linux-musl.tar.gz=1750b0d88d77910f1ee9ca73cfaf72c459f330cb666217e06b37e2b17ca80319 +dist/2026-08-18/rust-std-beta-aarch64-unknown-linux-musl.tar.xz=c5212cab3b201497d96b156f097cf8290174f938e4a93cfac720158b52319a3e +dist/2026-08-18/rust-std-beta-aarch64-unknown-linux-ohos.tar.gz=bb2838a893c513de58e87f736e4ea4038fb4c990afc4c18da82ff6a7826bbf7f +dist/2026-08-18/rust-std-beta-aarch64-unknown-linux-ohos.tar.xz=fffc1c914777a192781564e7d0ad626605083085c7295d4fca08ca1797ce2afb +dist/2026-08-18/rust-std-beta-aarch64-unknown-none.tar.gz=29fda5895f9add0c81fa1d5547999a02675f48c289ad0f288e69d2594e1e8543 +dist/2026-08-18/rust-std-beta-aarch64-unknown-none.tar.xz=82fc6096a49543fdce15d5d686250403c1789a849e09c0da6508d728bfaafe00 +dist/2026-08-18/rust-std-beta-aarch64-unknown-none-softfloat.tar.gz=2ff6ce8f11fb5623061a4ce0bd83a2397c51a74b0fa018ae400e93ec6ca95b69 +dist/2026-08-18/rust-std-beta-aarch64-unknown-none-softfloat.tar.xz=5a9c290858327f612b1c090ca8a61ca8535f4ebbb4091e99888fc8fddea91498 +dist/2026-08-18/rust-std-beta-aarch64-unknown-uefi.tar.gz=0a493ae8437efbe27c36edd7a27c436df95b1d71f91b6347a5bd22c32a2c8d23 +dist/2026-08-18/rust-std-beta-aarch64-unknown-uefi.tar.xz=fb5564beaa147e5f1e4a38c076c9df70a9836c041fc5ece7023ff49d82908da8 +dist/2026-08-18/rust-std-beta-arm-linux-androideabi.tar.gz=e2dbaff7a2868eb72825878ed7fb45c1b567c432999996240c0bdbf15be71f93 +dist/2026-08-18/rust-std-beta-arm-linux-androideabi.tar.xz=61bb58c6b73ff6ae587a2e86f2f921e70da132dcaf3176a5620c37d41af793f0 +dist/2026-08-18/rust-std-beta-arm-unknown-linux-gnueabi.tar.gz=41e980987fb1db88074228b5525d5ae00462ac2dc29a22b712785ade9b89199e +dist/2026-08-18/rust-std-beta-arm-unknown-linux-gnueabi.tar.xz=ec0c9a221402fd508a846e4dd7fc92ed6d8afdd99a06bb28bd5214ad91a8715b +dist/2026-08-18/rust-std-beta-arm-unknown-linux-gnueabihf.tar.gz=07cfd6006c5551e266c0b862c8abe17daf8ce4027a7c18f845044bf5d6ba8cda +dist/2026-08-18/rust-std-beta-arm-unknown-linux-gnueabihf.tar.xz=b81824402050964457fb7930fa3556ed35f79d6fc7ac496a074e8f766a8fa967 +dist/2026-08-18/rust-std-beta-arm-unknown-linux-musleabi.tar.gz=ab1d60983a7a65723b98398989cc73d3bdcf30f055592f89af1d7d15ad2a4fa3 +dist/2026-08-18/rust-std-beta-arm-unknown-linux-musleabi.tar.xz=12518d18c2b2ccaf1e0821a262a84f06a96cb98007aeb950f6702a3ba93bf25b +dist/2026-08-18/rust-std-beta-arm-unknown-linux-musleabihf.tar.gz=75aa7f1551a3b573b4ec0c39e7c1e7e66a6fd8fc6bd8c8f1f2d0cc4dd617ad9e +dist/2026-08-18/rust-std-beta-arm-unknown-linux-musleabihf.tar.xz=5b554f3d76b0271ab3c241a9c518e991bd1d9c547c3cfabd753463c9173c2caf +dist/2026-08-18/rust-std-beta-arm64ec-pc-windows-msvc.tar.gz=3664fec431f39b3b8ab8511124ba7aa55a8cb094c931bb627d04ace7490b23d6 +dist/2026-08-18/rust-std-beta-arm64ec-pc-windows-msvc.tar.xz=bd6647ae522fc81f979328c1afe2959c2f635a663a3cd9f33b52b943e3a06226 +dist/2026-08-18/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.gz=3958e36d7bc0c19069ee721b34798e2abc529ffd71fa30e131cee115d53cac28 +dist/2026-08-18/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.xz=27976b41113939065bb389aaa6530687e0cc60e4a9c5663826d394dec8ea19ee +dist/2026-08-18/rust-std-beta-armv5te-unknown-linux-musleabi.tar.gz=5b8cea4d1cc40af06f7715a5aec3596e0165f90836648e78615f61ed0d7f675a +dist/2026-08-18/rust-std-beta-armv5te-unknown-linux-musleabi.tar.xz=72fc0625e95ed31619a37099a478c82d9b7ffe7e8f5defcde2735f613a81bb0a +dist/2026-08-18/rust-std-beta-armv7-linux-androideabi.tar.gz=b703064c3a27b22ef57056db5009103d854e8bdf39622103dad58ee9f9150e4a +dist/2026-08-18/rust-std-beta-armv7-linux-androideabi.tar.xz=4a03d3a9d9a002306b5bdb7cb5cfb170f6c5ecffe624a244acce3807ddf35ceb +dist/2026-08-18/rust-std-beta-armv7-unknown-linux-gnueabi.tar.gz=9aae96ab8882a45588998feb941764ed5e5d0df2ab32cf3d6d281029e9a09707 +dist/2026-08-18/rust-std-beta-armv7-unknown-linux-gnueabi.tar.xz=337278c86fc2f998a50ce25f8fd5cdd5d3a41b92eb30e2bd4c01aea1dbc66720 +dist/2026-08-18/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.gz=6a8bd67c2029f181ee41a9315afe936e8641f15406bf4301b6d441d3028540e0 +dist/2026-08-18/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.xz=8477c949c59dea0003897cc3a5624ba011b335192c9d8354ea0b371252646ae1 +dist/2026-08-18/rust-std-beta-armv7-unknown-linux-musleabi.tar.gz=3fdfe336fc7fe6304304b0e1cba416c44d4344acc3c8e92aff9650bd61e78add +dist/2026-08-18/rust-std-beta-armv7-unknown-linux-musleabi.tar.xz=e9b310c49fbaeaef5c4260e403b1df4dd3223c77574db2be4d6dd4e129c6105e +dist/2026-08-18/rust-std-beta-armv7-unknown-linux-musleabihf.tar.gz=5ef1634babcd37af66128f46c3384a7bcf936b54212bb79f91f651a14e61e79a +dist/2026-08-18/rust-std-beta-armv7-unknown-linux-musleabihf.tar.xz=7a19827f6ccbe866689f798d5cb85337a123e3170c33e7526c9568c8f6aa7ef9 +dist/2026-08-18/rust-std-beta-armv7-unknown-linux-ohos.tar.gz=b7819cd9f01e881ee55ac742290e36ff08b01f26302cc54378fb241aec9f12b3 +dist/2026-08-18/rust-std-beta-armv7-unknown-linux-ohos.tar.xz=a7befe40f281f00182b4874726f6575797fce00144ec88ed588da323824f2889 +dist/2026-08-18/rust-std-beta-armv7a-none-eabi.tar.gz=ade7b42b966bc689acb6cd70b08d3426d6a2b72c8088dc21a55edcdaf16674ea +dist/2026-08-18/rust-std-beta-armv7a-none-eabi.tar.xz=4fa9375932737c11fb58b00091ed0bae2726843fb99fb9d3d3adadd922d99ed8 +dist/2026-08-18/rust-std-beta-armv7a-none-eabihf.tar.gz=573ab85be5e7ccdb2095979bb585a5ff0ae939acec60be1d8465e6394e494028 +dist/2026-08-18/rust-std-beta-armv7a-none-eabihf.tar.xz=1484581e5d9af650f22da71f9d6349bf50e7e5a52601dc7c7e3ce482a76b1733 +dist/2026-08-18/rust-std-beta-armv7r-none-eabi.tar.gz=581b334afa99cbf801ee3d3ca0a644f3b6e44071dc46d6de4259bbc63238a366 +dist/2026-08-18/rust-std-beta-armv7r-none-eabi.tar.xz=dc0065ffe0672dbacae3986760aa843216bb8a4ec84c10d6050e3d6f29a81df2 +dist/2026-08-18/rust-std-beta-armv7r-none-eabihf.tar.gz=f11b94b577afff0f9b7f31c492e8e11a90f41a2b128d4a48be1af96d61fc325c +dist/2026-08-18/rust-std-beta-armv7r-none-eabihf.tar.xz=117da690023ee06e258a4efdacd4611c9cdc9d666af45d57ca59a6f11af0098d +dist/2026-08-18/rust-std-beta-armv8r-none-eabihf.tar.gz=0b4609dd9c98de14f996f89739cb2fcf6eb7e5ac4ae1150dca02d0559c50d05c +dist/2026-08-18/rust-std-beta-armv8r-none-eabihf.tar.xz=c0c3006daecc37acb35aeadf02fe95f84a36a9bb95792e4fe999cce9067e79c0 +dist/2026-08-18/rust-std-beta-i586-unknown-linux-gnu.tar.gz=ccd007bea8986e20876377d6ee626fb546bf4d58e6f6bc9277bc875850d162c0 +dist/2026-08-18/rust-std-beta-i586-unknown-linux-gnu.tar.xz=d1fead88db7a134f096ab6dd4de1970ab6934878d74919c6211ec15db6d33a1a +dist/2026-08-18/rust-std-beta-i586-unknown-linux-musl.tar.gz=ef5d4b552d0924c42b84270828c8fc68f092e3b52aa9d21134c9d67b97257b76 +dist/2026-08-18/rust-std-beta-i586-unknown-linux-musl.tar.xz=ef51f4e7059cdf6bb8a6cce9717b42d5d429988dba84261804a0fb513667706c +dist/2026-08-18/rust-std-beta-i686-linux-android.tar.gz=c53aed6571880b250a2497eac0b42f6cdd568d961bc87b0022b1e9ede7f0fa58 +dist/2026-08-18/rust-std-beta-i686-linux-android.tar.xz=18fb44e0bbaba05e2261588d8c4bd709c220e6e270ec6173fc0b10e379dae8b0 +dist/2026-08-18/rust-std-beta-i686-pc-windows-gnu.tar.gz=24bcf9e24998ced5bdb6b786d880776f6c1019876749afde55ba6d73dcea8fd5 +dist/2026-08-18/rust-std-beta-i686-pc-windows-gnu.tar.xz=9009e3b19474ea7eecf4032ffcde52335870daf1515221b1092ef8c76b99dc06 +dist/2026-08-18/rust-std-beta-i686-pc-windows-gnullvm.tar.gz=9df7c78051113071c6b2616e20014324a64e8f3f3670a4a36f9023299b6b7c64 +dist/2026-08-18/rust-std-beta-i686-pc-windows-gnullvm.tar.xz=1b10465d807043c035db811c1cf4969f9d0c322bb8558f274533a9305e37af9d +dist/2026-08-18/rust-std-beta-i686-pc-windows-msvc.tar.gz=e0a69a32e978b2d0134d3d3c6a1246959dc4cd1d7c4e81ea7d01bca4ebc2e6c3 +dist/2026-08-18/rust-std-beta-i686-pc-windows-msvc.tar.xz=a4b54b0268d1820b6c1c31ae73b288a5d2869a2ff6f64e17bf91ebd0449f6d10 +dist/2026-08-18/rust-std-beta-i686-unknown-freebsd.tar.gz=a3b9949948cf9482b7f462b0355bbd63b093ace7c0e02f1be7e92475b5419823 +dist/2026-08-18/rust-std-beta-i686-unknown-freebsd.tar.xz=cdbd22ae0966afcbd0bea8b6686cee392d8a293069ec80a3e571445f9382bbc6 +dist/2026-08-18/rust-std-beta-i686-unknown-linux-gnu.tar.gz=b3c435de1b8e7384f3c10f518f4910ae482b4f5f65c850ee1c417c61c8810bff +dist/2026-08-18/rust-std-beta-i686-unknown-linux-gnu.tar.xz=9537a3cd2d2ec665f5939fb1ae385d889813749d872e5d712f899500f352e927 +dist/2026-08-18/rust-std-beta-i686-unknown-linux-musl.tar.gz=86a15ced2374683aa3057a7e94f90ef49f88a4e88382604ff67732a2b1fc11f4 +dist/2026-08-18/rust-std-beta-i686-unknown-linux-musl.tar.xz=ecf636e1477b0597aa7452c5832853fdfbacee3314cbc7718de7bf0713df7559 +dist/2026-08-18/rust-std-beta-i686-unknown-uefi.tar.gz=eb5a0f499dfb1bac444e3dc882a9394c92bea31b0474a24da511100c9ad23774 +dist/2026-08-18/rust-std-beta-i686-unknown-uefi.tar.xz=fbd30e34ed7644acdbe55f78eed1ceb4396cd03a25864a3c6e1901c9119be3ef +dist/2026-08-18/rust-std-beta-loongarch32-unknown-none.tar.gz=90bc2e6610d4b9e3e3fd8841b6000d9926e5a5cf569789645dd96687f81b5bb1 +dist/2026-08-18/rust-std-beta-loongarch32-unknown-none.tar.xz=bf9c673894c724fa31122e9914fdd3e114ecf20251014e903981ad51a371c1d1 +dist/2026-08-18/rust-std-beta-loongarch32-unknown-none-softfloat.tar.gz=11fd9f4b909ce0dbb58997e5bcf0387186d7d154107bd084eb26ac5c41b61294 +dist/2026-08-18/rust-std-beta-loongarch32-unknown-none-softfloat.tar.xz=a1a0dc03fd40e4a77d0e1551d5c4d8741789efcb3d157f5f9533ff07d6adb9d4 +dist/2026-08-18/rust-std-beta-loongarch64-unknown-linux-gnu.tar.gz=cad9ce9002b37341d7ae52b4acd6d50cb712af1443079f2c301313699413e9bb +dist/2026-08-18/rust-std-beta-loongarch64-unknown-linux-gnu.tar.xz=9285c13a94a0d3480ee50b72fc7f26d00fc97f3afd4b57a2287b21035e3dc821 +dist/2026-08-18/rust-std-beta-loongarch64-unknown-linux-musl.tar.gz=57943248450839c467dd817f11dae6a9ce7ca19726d696fc211861d584908aa7 +dist/2026-08-18/rust-std-beta-loongarch64-unknown-linux-musl.tar.xz=dbfb7582486a7352f64a9a6c500d53921ae7520cbdbf79ebff770181315df42e +dist/2026-08-18/rust-std-beta-loongarch64-unknown-none.tar.gz=02de7811f7559a69ba441f4185fce172bb2343adf74fcbdbbea93a457202f733 +dist/2026-08-18/rust-std-beta-loongarch64-unknown-none.tar.xz=dcf2ce821b50aa3db0d944b83c74e3ffce54dd752cb3e20180d8e0f76806c234 +dist/2026-08-18/rust-std-beta-loongarch64-unknown-none-softfloat.tar.gz=26061f8fe261d1be1e0c39d4f0d43013d0f4152f511364102d7086e8c99aec20 +dist/2026-08-18/rust-std-beta-loongarch64-unknown-none-softfloat.tar.xz=035e63e86a1ed04a4d267b2eb4a1d73d088227ac70ac0686c648b47190b1541a +dist/2026-08-18/rust-std-beta-nvptx64-nvidia-cuda.tar.gz=0751c940c4e555c43eac082cd0ca4a55c71fe084978478817a54a5e6fb4069f1 +dist/2026-08-18/rust-std-beta-nvptx64-nvidia-cuda.tar.xz=da142c0f895799f9e988b596edcc1abe89c5243c364ed6a8cd0f18ba9fad7bbd +dist/2026-08-18/rust-std-beta-powerpc-unknown-linux-gnu.tar.gz=82f148ada0f7a0c0e887720b647e348849c7f7416455afb8807abdc895d08cc7 +dist/2026-08-18/rust-std-beta-powerpc-unknown-linux-gnu.tar.xz=75e1a9b47514b72bb26e24b74dac3d7f9297e9a24e7d685b091bf6c08d995f98 +dist/2026-08-18/rust-std-beta-powerpc64-unknown-linux-gnu.tar.gz=33e13d632efe4765ab2093eab4fc68f4202223f274e0350b72673625f3478ca9 +dist/2026-08-18/rust-std-beta-powerpc64-unknown-linux-gnu.tar.xz=71c058fe88ec219a8fcfbc5ac4d20af66726db797f9ffd587bff081b2ca64081 +dist/2026-08-18/rust-std-beta-powerpc64-unknown-linux-musl.tar.gz=8d57d035e2bd60d11f5ed31ca94896e78e5fd665e4825f70e11cca2d53f6985d +dist/2026-08-18/rust-std-beta-powerpc64-unknown-linux-musl.tar.xz=3ca6248f199bf9aed97549b96440dc1decd102282e72be2d1873b1571d12eae7 +dist/2026-08-18/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.gz=bd0336716b73e4110f1140048fbc0f65492737a8d2febf238543455884814d40 +dist/2026-08-18/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.xz=de06218dd3797cd9b634abb6f595c654e8f478858c4091ec2ec41ab62b303854 +dist/2026-08-18/rust-std-beta-powerpc64le-unknown-linux-musl.tar.gz=9d0ad884617ebe1033e6dfe91673c15e5751b04663afeb25fbf9b14c725623b6 +dist/2026-08-18/rust-std-beta-powerpc64le-unknown-linux-musl.tar.xz=417d40ab222a2add87d277711983e1d846235c4221f64b54c5ef643d898af40c +dist/2026-08-18/rust-std-beta-riscv32i-unknown-none-elf.tar.gz=5e494883642b408d716715234845d26d2172446cf1ce330d6658a310da8cb127 +dist/2026-08-18/rust-std-beta-riscv32i-unknown-none-elf.tar.xz=a1c089849361724dd9106c6dd7447402e40ed4851bebd444cfaab2aa1f2fe293 +dist/2026-08-18/rust-std-beta-riscv32im-unknown-none-elf.tar.gz=d2a0c901bbf91ef5933e7f66d64e5635a6cbdd428b665789400f9efc9b926081 +dist/2026-08-18/rust-std-beta-riscv32im-unknown-none-elf.tar.xz=04f2999eaa1b38e6800d0c725ad761932430d6fdac9c841b7e7e0b30b681933c +dist/2026-08-18/rust-std-beta-riscv32imac-unknown-none-elf.tar.gz=e977988456540ea9280802102cd4d3a48f745940400960c1d22b64de2a0297e0 +dist/2026-08-18/rust-std-beta-riscv32imac-unknown-none-elf.tar.xz=8681ca97d702581f48229342921f064f65babd5688be88426d5eb553e9b8f481 +dist/2026-08-18/rust-std-beta-riscv32imafc-unknown-none-elf.tar.gz=d430ba157c422f3d5cc2390c58f7304b69dc7dcd72ac26f7ec988e04e1c1b886 +dist/2026-08-18/rust-std-beta-riscv32imafc-unknown-none-elf.tar.xz=ae7011392aed6d69a7c3c57ffe639ddf0b8c5e6151e35badc7d1d522203328b5 +dist/2026-08-18/rust-std-beta-riscv32imc-unknown-none-elf.tar.gz=0ea48d15d79f29d9aa8f0488f2626eb54e29da9db308728e6cb2ed3f8ef52d44 +dist/2026-08-18/rust-std-beta-riscv32imc-unknown-none-elf.tar.xz=02b2901a9d3df3ea58733327147073150b6449a5eb13c34a65819eabc9c7dccd +dist/2026-08-18/rust-std-beta-riscv64a23-unknown-linux-gnu.tar.gz=0573dd8ac8eadbd8366eddf11f08886a2a8f0930ce3640638160f4bf98d6b5c0 +dist/2026-08-18/rust-std-beta-riscv64a23-unknown-linux-gnu.tar.xz=eeb6909ded0c7c04b295fe3e79d3db9eed6b2f21f6e720cce5f1822311153583 +dist/2026-08-18/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.gz=b2bf8d4a8789627acfd37ff732eadc6657ec6e07aaa42f8d51d139d84933274e +dist/2026-08-18/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.xz=d0037e7da6ac8cb0e9fea048e93c4bdf878d0be6339cbf890a97930605232357 +dist/2026-08-18/rust-std-beta-riscv64gc-unknown-linux-musl.tar.gz=bf52f259973d538fec8a903370be3b347e5d3ee341ce8f0cf42386668705bd99 +dist/2026-08-18/rust-std-beta-riscv64gc-unknown-linux-musl.tar.xz=23b92d8e7e40922c395d4997be32a5c580b1dab4fcfb1b80e515eb18957b4327 +dist/2026-08-18/rust-std-beta-riscv64gc-unknown-none-elf.tar.gz=419d18bf44b0b0308fbd7c6d623064cde8eb8672ac6d81d24dc5b2a1b98e690d +dist/2026-08-18/rust-std-beta-riscv64gc-unknown-none-elf.tar.xz=98db402b82cad0495a8021b4da09df41421eb6f3e249493d06a00af5c5b5a3d5 +dist/2026-08-18/rust-std-beta-riscv64imac-unknown-none-elf.tar.gz=4d12962b4350783e6d976da210ebb10e0f5f98c97d828ff3201742e25a12fc2a +dist/2026-08-18/rust-std-beta-riscv64imac-unknown-none-elf.tar.xz=a33b67d9f80db5845e423f21fad8bdc8ce8f81eed11528bb488ad995762f04bd +dist/2026-08-18/rust-std-beta-s390x-unknown-linux-gnu.tar.gz=40e3ceedbd8efdae307e29082bb4aafebf9712d58316a2c93d85e96f8b91b4bb +dist/2026-08-18/rust-std-beta-s390x-unknown-linux-gnu.tar.xz=b4c3f8b9b6f454d295b0e4487fd48ef87b74e9a83455de1d135810c485f81a48 +dist/2026-08-18/rust-std-beta-sparc64-unknown-linux-gnu.tar.gz=d5576fd1f9a3383b08ac07347f44ea0bee108faebdbaac2aacaa3e40b8c75fd5 +dist/2026-08-18/rust-std-beta-sparc64-unknown-linux-gnu.tar.xz=b6c983501fd9072db9041eb90770128e3bfaca71e52f9772108bba3d126530fd +dist/2026-08-18/rust-std-beta-sparcv9-sun-solaris.tar.gz=41d93cbe9bcc9237988a159364809b36456d4b7ceea69ed0f71c7ef3371376c5 +dist/2026-08-18/rust-std-beta-sparcv9-sun-solaris.tar.xz=369d00cb600849f69c20a4094433e4fcf199632d31110fc48d053dcf78528323 +dist/2026-08-18/rust-std-beta-thumbv6m-none-eabi.tar.gz=feaa560f63a5edfe234bcbc019a14e610a311c26311cc1cd9c5fc321c0a3dc16 +dist/2026-08-18/rust-std-beta-thumbv6m-none-eabi.tar.xz=9cd3af4baa64ee8e49cb2dbe3a2116ddec18ddf17e631ba806486afc8f9fae99 +dist/2026-08-18/rust-std-beta-thumbv7a-none-eabi.tar.gz=bbcb01314c8551cfd921030da82e7f7d9159205f2e0ad92b32c03ef5e24b348a +dist/2026-08-18/rust-std-beta-thumbv7a-none-eabi.tar.xz=e75c6fc1dfcffe2a6cc59019d63c17978ce35f2bb327ffead1a7c5ad23093741 +dist/2026-08-18/rust-std-beta-thumbv7a-none-eabihf.tar.gz=fc7ba754b6a5aace65805071b00cd6d8bee45985af55409efa78801979190375 +dist/2026-08-18/rust-std-beta-thumbv7a-none-eabihf.tar.xz=4cbd907d064d7cfa5fa50d01cc0eb340ef2d043542ccf9beb53c69ac6bc962bc +dist/2026-08-18/rust-std-beta-thumbv7em-none-eabi.tar.gz=aa793233f7bb7fe0cddd7c5a5cdbdae37045bdd2ade9ad324a783d6e2fc38139 +dist/2026-08-18/rust-std-beta-thumbv7em-none-eabi.tar.xz=565eae0f73e5f34fba9497e1952989bc5c33628b2035b4845fe7df9b1747553b +dist/2026-08-18/rust-std-beta-thumbv7em-none-eabihf.tar.gz=9d3a12dd7fdfbc6c79218e4c48d750648a3414af9bbd119497539274f55942aa +dist/2026-08-18/rust-std-beta-thumbv7em-none-eabihf.tar.xz=2eb2d70d1477f5c7bdcc55864f71a9d35c4ce0003137422513cc0afde74790cb +dist/2026-08-18/rust-std-beta-thumbv7m-none-eabi.tar.gz=c487a3ae94aa8987715f8b2c81554b88fb46a953c60c7915b1ae06050208321d +dist/2026-08-18/rust-std-beta-thumbv7m-none-eabi.tar.xz=130f816b0dd9bbc3e33626b91f9a172c41894942561d7bf70fc84a354cb1539c +dist/2026-08-18/rust-std-beta-thumbv7neon-linux-androideabi.tar.gz=433d6557f9f3fe7bef498508887d849c762947b47b19606df2847183376a0540 +dist/2026-08-18/rust-std-beta-thumbv7neon-linux-androideabi.tar.xz=b0be39d694e7f3585c91a1a8a477c97679ec40486cdab3788a916e955a1567a8 +dist/2026-08-18/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.gz=d21a967b1e0449f743953d8b73ea7cf66d03672195711a822b3101c6f66b7528 +dist/2026-08-18/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.xz=780512ddb91330a366fa8183e793667cc1ec37384da08495faedced5f0d89e93 +dist/2026-08-18/rust-std-beta-thumbv7r-none-eabi.tar.gz=a96f2769c37781202b359c93fccdf7bcb88f2de7be28536c15e1edc18b9f6419 +dist/2026-08-18/rust-std-beta-thumbv7r-none-eabi.tar.xz=755fcca4591e5cfaa2f1eac8a191844006531d4d45e3f66e22ddef4477b66082 +dist/2026-08-18/rust-std-beta-thumbv7r-none-eabihf.tar.gz=ad60aa1c0f5eb69cba9cf3048a8404b8b519a3218ce1971b4d4d172e694c07ec +dist/2026-08-18/rust-std-beta-thumbv7r-none-eabihf.tar.xz=f8b3a42c17f98387c8a35940e6ddd8246e48e87a97388bf01259c5203d0b4aaf +dist/2026-08-18/rust-std-beta-thumbv8m.base-none-eabi.tar.gz=abda1031eea6925d529842e5777475c79a62d4e0ee68003e108a85f6107f80f9 +dist/2026-08-18/rust-std-beta-thumbv8m.base-none-eabi.tar.xz=e7ea22d26dd3f87bbc618c954f047c32e15189bca3730ac390a4670822e55d6e +dist/2026-08-18/rust-std-beta-thumbv8m.main-none-eabi.tar.gz=f9c224b391cbf3bd8f4f1abd82a8cab80fc7099935f46b846d687627d23ca6b9 +dist/2026-08-18/rust-std-beta-thumbv8m.main-none-eabi.tar.xz=b68e769e593444a1b09981f1517ce9217e02e8ac997cbb1caa514c8cdf5bbd1b +dist/2026-08-18/rust-std-beta-thumbv8m.main-none-eabihf.tar.gz=def20bc12fa35b64dcdd05669351ad6e15238dd15830eb88fc11c7298ed4bbcb +dist/2026-08-18/rust-std-beta-thumbv8m.main-none-eabihf.tar.xz=de82adeb27d1247e67e96d78ee46a8e3a1f9f5240a9ae75680e8b30fff3d13c2 +dist/2026-08-18/rust-std-beta-thumbv8r-none-eabihf.tar.gz=b77cd1ddaa277ae2de9bb683249b5220e47a8a3ffbbffd42f7eb0c547e2854bc +dist/2026-08-18/rust-std-beta-thumbv8r-none-eabihf.tar.xz=f2f6d6e4ab4b2cd7f02f2f1927adae35c869bbdb4d47af955bc0395fed05256d +dist/2026-08-18/rust-std-beta-wasm32-unknown-emscripten.tar.gz=a2c4876eb3a6a217e18e835bb4845483db2d31489713cbe3a0e70cfad4ffd46f +dist/2026-08-18/rust-std-beta-wasm32-unknown-emscripten.tar.xz=5012e27d94c93c9de88d36f6e80d109156b3c98824e63f38d48be70099da6ed9 +dist/2026-08-18/rust-std-beta-wasm32-unknown-unknown.tar.gz=2cccf18769ad214b6cfc86f12ccbc6bffc9e3b6d0ff5cc3cb9c3b864daad9d35 +dist/2026-08-18/rust-std-beta-wasm32-unknown-unknown.tar.xz=672aa082395be89a958b718bf65efbfac9674af366ca04fdf6426643b49baa1d +dist/2026-08-18/rust-std-beta-wasm32-wasip1.tar.gz=9d8c6c2fd9116236036a782a70b7c2aca953f22a3114c0cacaaf343a0f1d47d9 +dist/2026-08-18/rust-std-beta-wasm32-wasip1.tar.xz=ab889ce4db42f253dc4ea2b95824218e8b8d0f08608ed8857941a85c4fe0d04e +dist/2026-08-18/rust-std-beta-wasm32-wasip1-threads.tar.gz=98fffa4fc85dfcd2725929158146f19466742fe58cd0a4ee53f24ffdd18afe76 +dist/2026-08-18/rust-std-beta-wasm32-wasip1-threads.tar.xz=a453485e1a0b76aef806f73d4903d4b2d9a068a47c38fa6ed1f8c4075deb2619 +dist/2026-08-18/rust-std-beta-wasm32-wasip2.tar.gz=b07bc47ba8d0fa7d6d5749686ae1335c60c6995b8150bf6bcd60d71fc4ff0980 +dist/2026-08-18/rust-std-beta-wasm32-wasip2.tar.xz=6b7b1e6f097d298709335b1dd34d109cfef42195dbb55250d9f13983cc36aae6 +dist/2026-08-18/rust-std-beta-wasm32v1-none.tar.gz=e8ae650b7a0e0e63c837c7a8b26fac1e60c53ae5cbf062c97999f563e5b37f93 +dist/2026-08-18/rust-std-beta-wasm32v1-none.tar.xz=bf4e91d4eb2fdea5a38847df2fa435543e435b0cb118368cfc4f4e226130c792 +dist/2026-08-18/rust-std-beta-x86_64-apple-darwin.tar.gz=9f0c07733b3ce60ad0e6b2b94899359d10b48237edc56a87e67c396ff8f6f7de +dist/2026-08-18/rust-std-beta-x86_64-apple-darwin.tar.xz=19a832229cb48e0292c591f986cb304ecafe0b99d02c084e8c958960e1da1920 +dist/2026-08-18/rust-std-beta-x86_64-apple-ios.tar.gz=a7637319dd2ed867914a7294112c2b4b8614b3fab1d81223853858a3468b1248 +dist/2026-08-18/rust-std-beta-x86_64-apple-ios.tar.xz=f9ea76c0533b9ed163bbbdfaa4c46d59e6245f4a815b9e0af3cecbe1ea7a65fc +dist/2026-08-18/rust-std-beta-x86_64-apple-ios-macabi.tar.gz=62c682bf98f9359174d1d5eaf9c0d02f07a901d35a9cc9d07811e52ef6dda082 +dist/2026-08-18/rust-std-beta-x86_64-apple-ios-macabi.tar.xz=69d907f47da87fd4822972f59ff991f86144f0c2dff8465ffd107bb6517c36f6 +dist/2026-08-18/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.gz=8d2a4e09e3472d55865bfaabe4087241d6602834a914dd980396f682c4fc3d1c +dist/2026-08-18/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.xz=5fc7ebb2ec72193fd3bea974a29bcdf4f4807191c0f94dbfc8ee9575bc32615c +dist/2026-08-18/rust-std-beta-x86_64-linux-android.tar.gz=1bf77b56ec03260ea17d1a3910d53331ecd9b10c0c1936ab95e316fa172688ed +dist/2026-08-18/rust-std-beta-x86_64-linux-android.tar.xz=2d5dc26bf724b1aa1b98e92bcff52a8e70f259bf19c5e793595e8fa9e4e452a6 +dist/2026-08-18/rust-std-beta-x86_64-pc-solaris.tar.gz=a30a78879ee94297ff5399dc84412ed083097deda10f9990076fc61b816d8f7c +dist/2026-08-18/rust-std-beta-x86_64-pc-solaris.tar.xz=19b960b55da422632779b09df31daaeaaae0103b16b1b520af4b1cec75bd7641 +dist/2026-08-18/rust-std-beta-x86_64-pc-windows-gnu.tar.gz=927d02ab22fa436a2aa63f15eb3bd07a0ddcfae14e9e4ba746eaba22e67ccdf2 +dist/2026-08-18/rust-std-beta-x86_64-pc-windows-gnu.tar.xz=9ff3bb08d2622fe4a012d13cb68ee800f802220d65e6796c016bf7da080453bc +dist/2026-08-18/rust-std-beta-x86_64-pc-windows-gnullvm.tar.gz=ce0729a8e6b27ef85c061fd48d1c301504181e00da85c4e2c605f09a1c6b20d7 +dist/2026-08-18/rust-std-beta-x86_64-pc-windows-gnullvm.tar.xz=7a2440b42cc956862b279116dcbdcc5e50bf08a5b3a2dc5ba1cfe744cdaf6e14 +dist/2026-08-18/rust-std-beta-x86_64-pc-windows-msvc.tar.gz=f165427ae926cffcff75ab6a29fb1376fccc7e21bebfd74d0c2a48e42824da36 +dist/2026-08-18/rust-std-beta-x86_64-pc-windows-msvc.tar.xz=0c0955300d9c8b86fe8bc96b4b909ef1ea8df2418eb9e7a4a79bf5b789d9830d +dist/2026-08-18/rust-std-beta-x86_64-unknown-freebsd.tar.gz=6138f76740a957614d600cfc4dd75da376a49038ec67981a2a0d4a2ae132fd07 +dist/2026-08-18/rust-std-beta-x86_64-unknown-freebsd.tar.xz=b1463bc56af553251f9ff437e8c8a943113ba840c086c7a5a5ada90df03b1b97 +dist/2026-08-18/rust-std-beta-x86_64-unknown-fuchsia.tar.gz=737d6c1765f9f9abf1d19c4b7c02b2e217fb1fe8d315456abdaaf7ec583a50ef +dist/2026-08-18/rust-std-beta-x86_64-unknown-fuchsia.tar.xz=470bfa673d0aa4aacd7bff4370943c2ec0aa0b7b77ae17b8fea38ff1eb744fde +dist/2026-08-18/rust-std-beta-x86_64-unknown-illumos.tar.gz=deeca38b53e700671c553342cfde9609e121c2b392db8694d6a1d99f81d84738 +dist/2026-08-18/rust-std-beta-x86_64-unknown-illumos.tar.xz=06d4153c8d3bedfe19184a5c9eca4fa11a989da0c178897f594d133a5c391dd5 +dist/2026-08-18/rust-std-beta-x86_64-unknown-linux-gnu.tar.gz=2cc5cea651371e4ae2b8cbae1e9b2b226f2ae814e72260c189aa87b408651c69 +dist/2026-08-18/rust-std-beta-x86_64-unknown-linux-gnu.tar.xz=43fb198f1a3c3b9d2c056bd8b818128356014732a1a1de16027ed927b559ef0d +dist/2026-08-18/rust-std-beta-x86_64-unknown-linux-gnuasan.tar.gz=9fc4dc11ac79631173c5d61bd51e5a5c215da2784c46f6d31d6e010a45681349 +dist/2026-08-18/rust-std-beta-x86_64-unknown-linux-gnuasan.tar.xz=edf9de2127f330877fd108e9eb74514cf2c401f12eb3f3c065489eef68bf24ce +dist/2026-08-18/rust-std-beta-x86_64-unknown-linux-gnumsan.tar.gz=b14ed9acde7162a5d64a731f35db5f93ef40b745c39079cd37b1e4c916d2054b +dist/2026-08-18/rust-std-beta-x86_64-unknown-linux-gnumsan.tar.xz=ac1269c347b1d5bc3c44fa3e61b16b7aae0573428fd79732d837dcdf98f58acf +dist/2026-08-18/rust-std-beta-x86_64-unknown-linux-gnutsan.tar.gz=1572a2f9b94dab1abff33c262448a677b64da34e1644128479121a5cd918f769 +dist/2026-08-18/rust-std-beta-x86_64-unknown-linux-gnutsan.tar.xz=b2054ff433da395465819c7be4cb9ec43fd526c5aa9e00265ad327cf333e2477 +dist/2026-08-18/rust-std-beta-x86_64-unknown-linux-gnux32.tar.gz=ba7a9ca84f37a7e7f4e5b8a9ac7348e41a2f275c625833a1a9bd84642fef4122 +dist/2026-08-18/rust-std-beta-x86_64-unknown-linux-gnux32.tar.xz=96795295816bdd7d31633f9a0f99db06d97ed1763b97fc92fc897d8d624707fd +dist/2026-08-18/rust-std-beta-x86_64-unknown-linux-musl.tar.gz=575f397c532d297e6a0ea5e7b150f0494684b8afd085eb25e62006af87ae4be3 +dist/2026-08-18/rust-std-beta-x86_64-unknown-linux-musl.tar.xz=36029c14a57a5687a1aab57a6c742d6f300d6aac3f54f103c8571632f8903047 +dist/2026-08-18/rust-std-beta-x86_64-unknown-linux-ohos.tar.gz=6e765b32274d7c513af104afd323530aca14155828b6d15ea56ba57b36ec6110 +dist/2026-08-18/rust-std-beta-x86_64-unknown-linux-ohos.tar.xz=c829acf9d3eae4d2fc338b1a65357e3685c29f80a2a5dedfa7d28a9b98cefeea +dist/2026-08-18/rust-std-beta-x86_64-unknown-netbsd.tar.gz=5d5cd4bcc16d52d15d8ff64c51b3a10df87fe811260659253ad89d26ad105fa0 +dist/2026-08-18/rust-std-beta-x86_64-unknown-netbsd.tar.xz=b5f5d13c1ba56fefd789dba094eef61abcfc7b59e03b34583606599c8a1f9177 +dist/2026-08-18/rust-std-beta-x86_64-unknown-none.tar.gz=d250f8849e1a0d33564dadce29e1c257778a4da67f4de2d2333f22546ee5cfd0 +dist/2026-08-18/rust-std-beta-x86_64-unknown-none.tar.xz=a0f6930fe4808ff4a31539c33509d9015c92024a1c3c2c3dee1f1b04a4eb65cf +dist/2026-08-18/rust-std-beta-x86_64-unknown-redox.tar.gz=9756c71c869dc619372ae4eb24a96252709bbcf8039a5502347ec00418a99c58 +dist/2026-08-18/rust-std-beta-x86_64-unknown-redox.tar.xz=73a698c9099bad4115fcc650bfdc611d497bf46b1b77b7b721b8453b723fcb06 +dist/2026-08-18/rust-std-beta-x86_64-unknown-uefi.tar.gz=77222a2b46518d5aeb9652d7e939a0654c6a8441ae608e958dc77ad045a4b45f +dist/2026-08-18/rust-std-beta-x86_64-unknown-uefi.tar.xz=ad7118856f9a41706cc6465efa9118dfd00259f656f79bfe52d22374b86adf5b +dist/2026-08-18/cargo-beta-aarch64-apple-darwin.tar.gz=424927100212831a294b17c04b196e5a5de82681dfaf86991533406051791192 +dist/2026-08-18/cargo-beta-aarch64-apple-darwin.tar.xz=c6e606cc652aa373368283d8246de82667c32284935b3dbca0abac0f5a8f14a8 +dist/2026-08-18/cargo-beta-aarch64-pc-windows-gnullvm.tar.gz=898c236611c6c350d3075d06fd22426edf0c6edcff6f2c81cb25a83560486241 +dist/2026-08-18/cargo-beta-aarch64-pc-windows-gnullvm.tar.xz=912630573060444545fb1c17493acd7ee62396f0893dbee10a0ca703701c8c51 +dist/2026-08-18/cargo-beta-aarch64-pc-windows-msvc.tar.gz=f046787529f076ee159bfb5503432ce9d9d1dddc78c3c665c85564c433177f08 +dist/2026-08-18/cargo-beta-aarch64-pc-windows-msvc.tar.xz=5256cba7138f02320a6252f11f66a18d691290d7d9624666944a16544e2f73d8 +dist/2026-08-18/cargo-beta-aarch64-unknown-freebsd.tar.gz=51fc228c980b69160aae66dedc1600fe6404ea1186672ec10e03243f76325904 +dist/2026-08-18/cargo-beta-aarch64-unknown-freebsd.tar.xz=36b689a54d704cafed73ce5d2a01ed0b4418a4b77dc8ac7e39930273ebfe340f +dist/2026-08-18/cargo-beta-aarch64-unknown-linux-gnu.tar.gz=27a8c441081d7d53e6be98f1a81a43bda6fd96d757ce85b6d35917fb81098fb7 +dist/2026-08-18/cargo-beta-aarch64-unknown-linux-gnu.tar.xz=4dffb31c03af5d381eab76ea6992598cf481fa73d760184138298138d776a661 +dist/2026-08-18/cargo-beta-aarch64-unknown-linux-musl.tar.gz=4bfa647b80f633f82a477135365d0c459dc00b4a365fa4bb7ce2ff2b531a8ad4 +dist/2026-08-18/cargo-beta-aarch64-unknown-linux-musl.tar.xz=234b8671193d5772b39ad0d30cb9822776eef1b26ed92d68fe504331fcc68eaa +dist/2026-08-18/cargo-beta-aarch64-unknown-linux-ohos.tar.gz=80b13c14d55f3af8e173473664fec8b0658833d01dc66fde12c54b33725a15e2 +dist/2026-08-18/cargo-beta-aarch64-unknown-linux-ohos.tar.xz=8bf4339eb6f11037098a8d8c9383397929e12566924a1c5563e4f11728301e3c +dist/2026-08-18/cargo-beta-arm-unknown-linux-gnueabi.tar.gz=81a09dd8d86020bc414f53d9f8d3f01b769fca4015c8b492bf0bfdb84f85ce9c +dist/2026-08-18/cargo-beta-arm-unknown-linux-gnueabi.tar.xz=f0b089b59c14c1979b94d5cc068fb89777e2ae194ecadc54b4ccf54244c32aa5 +dist/2026-08-18/cargo-beta-arm-unknown-linux-gnueabihf.tar.gz=9b1f316355fc394c270fe2bcc97b9d75345aa8444fd66c7a145cafc31c616090 +dist/2026-08-18/cargo-beta-arm-unknown-linux-gnueabihf.tar.xz=32a4a7dc9845afcea8eab677d173151af1c674eaa1c9e541e94c15ecf6d7b141 +dist/2026-08-18/cargo-beta-armv7-unknown-linux-gnueabihf.tar.gz=57558eaea67aa66563fab5562bac551adb2685a55505851336621e8e5583797f +dist/2026-08-18/cargo-beta-armv7-unknown-linux-gnueabihf.tar.xz=1eca79bd1d55882fdc93fcd1487891b8dc906330b1f78d6d0b8630d541030474 +dist/2026-08-18/cargo-beta-i686-pc-windows-gnu.tar.gz=e73b6d7b286eac143d43e7b2ba2ed5245ebbefe5b558a2a490e4a6d40113b8cd +dist/2026-08-18/cargo-beta-i686-pc-windows-gnu.tar.xz=92b4f592f837c58492d9be16dc2e650b3dde996f12d1430f57c7ba02ff4b079c +dist/2026-08-18/cargo-beta-i686-pc-windows-msvc.tar.gz=678ca4a0a7db21705980c77bb00711b1263e0bdaa9369ee3c941b0ab2c80fe45 +dist/2026-08-18/cargo-beta-i686-pc-windows-msvc.tar.xz=a30a0ce6c67e0505f648d236d3a4e08571a9ae174fcdb4c266373f65b1e98d2e +dist/2026-08-18/cargo-beta-i686-unknown-linux-gnu.tar.gz=18a1e12717023c45c5d01c5c9100e4a2bead108bb861cdbf17a073bc64b1d5ad +dist/2026-08-18/cargo-beta-i686-unknown-linux-gnu.tar.xz=cc1beb2273d154c6daf6e215f7f6214718d0701f53f71731fb48c38aad4414fa +dist/2026-08-18/cargo-beta-loongarch64-unknown-linux-gnu.tar.gz=c0e5e6b2bc3d907a752fad7f982fa3c4feffb0d5e0fbbe00034a45e84e1fbf9c +dist/2026-08-18/cargo-beta-loongarch64-unknown-linux-gnu.tar.xz=10bdaf4ac8109c4addb500df4618b254c86c920a73076633a246f437bb77fbaa +dist/2026-08-18/cargo-beta-loongarch64-unknown-linux-musl.tar.gz=397039a85cc300997f5e9c540bfc7b5ac5f56202d50c7244da628bda6690535b +dist/2026-08-18/cargo-beta-loongarch64-unknown-linux-musl.tar.xz=fabd6e56b86d69cc36fa61b101a0da9ac210c6618edab55dba684254b3c22741 +dist/2026-08-18/cargo-beta-powerpc-unknown-linux-gnu.tar.gz=cbdf7d2958df1f9a37314059512a53c4749b441addf30bb84a83c689d9d11dde +dist/2026-08-18/cargo-beta-powerpc-unknown-linux-gnu.tar.xz=573b9be1e0066ac4359bc8c696315988fd475386a92a4dfe27db0a5d63abf036 +dist/2026-08-18/cargo-beta-powerpc64-unknown-linux-gnu.tar.gz=201ccfd4e24b2891809f0a2d3cdd0e57757e46c436fa50ad1912af237b4fc06d +dist/2026-08-18/cargo-beta-powerpc64-unknown-linux-gnu.tar.xz=ebed264b9cbe05465dbcc3d1c618833f6e401db02df282f856cafa0a8737861d +dist/2026-08-18/cargo-beta-powerpc64-unknown-linux-musl.tar.gz=9c457b61f3d8cd547d68f92e129be23fa43f5e542d42a156b19f598d1ac45184 +dist/2026-08-18/cargo-beta-powerpc64-unknown-linux-musl.tar.xz=0abf134c439af2f9e915fb6849c0d0223754d2fa572d69d25d230d344a4b267b +dist/2026-08-18/cargo-beta-powerpc64le-unknown-linux-gnu.tar.gz=61b406d8bfe5a28cd7076fdb164e005a999bd8a97825deabf31a16ab997f474a +dist/2026-08-18/cargo-beta-powerpc64le-unknown-linux-gnu.tar.xz=49661faa1e97dd357787821beb5bb260259b658959247ea55ffdc08218567be6 +dist/2026-08-18/cargo-beta-powerpc64le-unknown-linux-musl.tar.gz=b16a47da9a5ba8271cf381b95365c5189a5abf91ef8a37f841774375aee59a0a +dist/2026-08-18/cargo-beta-powerpc64le-unknown-linux-musl.tar.xz=4ab9b6309902f12c0003b89fb7fd2acae48bf6a583f322c1ab10f794866c272d +dist/2026-08-18/cargo-beta-riscv64gc-unknown-linux-gnu.tar.gz=778bd607c173c2a417be15d050ea07b78f0a8affa4e54b61f8a8cb3b89f954d7 +dist/2026-08-18/cargo-beta-riscv64gc-unknown-linux-gnu.tar.xz=bc4aa00b04f62ae8cf93d1643a39fe74927b42c795d738927182470febe14436 +dist/2026-08-18/cargo-beta-riscv64gc-unknown-linux-musl.tar.gz=40ee8c220f453a5f9a6fe37453e25a16052fb148a1c8ebbff8eff32914b8b520 +dist/2026-08-18/cargo-beta-riscv64gc-unknown-linux-musl.tar.xz=c90545ca7bb32764a618c63c4ec5e0f4e96494b9d1fba56a4577e12d826f0653 +dist/2026-08-18/cargo-beta-s390x-unknown-linux-gnu.tar.gz=db62de0842a76f63bc87988e57255ffebc86d5df46626e9ad5c0f424abd721f3 +dist/2026-08-18/cargo-beta-s390x-unknown-linux-gnu.tar.xz=26f786c87899d55212c97260e3ae99b0374fed80b418e3b15f0c21b45012ac0c +dist/2026-08-18/cargo-beta-sparcv9-sun-solaris.tar.gz=5436d9476157d5e30e0be155a545a61597563c9c25ccbad80f8a6e0e81872772 +dist/2026-08-18/cargo-beta-sparcv9-sun-solaris.tar.xz=294b9110e182deb5468c88dd68f1647f4d25d37d6373c222940d01fabcf2f770 +dist/2026-08-18/cargo-beta-x86_64-apple-darwin.tar.gz=ad73fe27d749dc82fd51a39a56cb76ba9731c23e968656500193cae116727ff1 +dist/2026-08-18/cargo-beta-x86_64-apple-darwin.tar.xz=f6107108f9f6a684c59a61cfceae0a9309e8c5c4314a6bc105c2888bdc699bd8 +dist/2026-08-18/cargo-beta-x86_64-pc-solaris.tar.gz=fb88d7175f5fa8750f56cee9c0fc4493a66253256a9da1cd9ae947c4f7a8289f +dist/2026-08-18/cargo-beta-x86_64-pc-solaris.tar.xz=48bba42d85d677b28c2ab3748052b46cee4caec43f05434f7cba0adca4a43d5b +dist/2026-08-18/cargo-beta-x86_64-pc-windows-gnu.tar.gz=39a70736a0f5ceb9727b941c4299577646ef7264e398aabbb77763ec4f10c3de +dist/2026-08-18/cargo-beta-x86_64-pc-windows-gnu.tar.xz=9f4ebc59f40d448d703f7b1b6a07a84c60cc4b2e526465be9fee6fe49ac5dd09 +dist/2026-08-18/cargo-beta-x86_64-pc-windows-gnullvm.tar.gz=e0540a0b1a37a590b80d32725c654d8f1fa9c13da5aba1101e069b00befe28af +dist/2026-08-18/cargo-beta-x86_64-pc-windows-gnullvm.tar.xz=a01efa5cbeaa2adb44ddf93c010da7e9e26802852bc6640618261e410c747350 +dist/2026-08-18/cargo-beta-x86_64-pc-windows-msvc.tar.gz=c1d9d27a66930cec6e7db1f2b3114843c4cc60991b112ae4c05782660d53fde4 +dist/2026-08-18/cargo-beta-x86_64-pc-windows-msvc.tar.xz=92f46aa54cf0715bc5449cc5ddebebfc57a372d5b1c2ce4169af94fecc1ba1c5 +dist/2026-08-18/cargo-beta-x86_64-unknown-freebsd.tar.gz=fef1a5fb244689c8464496dd98580b7fc0964b90dbfbbb0c52526b58f14228e8 +dist/2026-08-18/cargo-beta-x86_64-unknown-freebsd.tar.xz=2749ad0cae6a035309a5ad0c277ae6b127aa22a095d7be8e5f92191e9f6ad4e7 +dist/2026-08-18/cargo-beta-x86_64-unknown-illumos.tar.gz=321af127d565e1baab5430bcc0a15538f7a76c58d918b59003c7220d4ef844df +dist/2026-08-18/cargo-beta-x86_64-unknown-illumos.tar.xz=41e33ecc4f3e317e94ef9f70caad18c449d4089777c31a40b560ad73490b11bc +dist/2026-08-18/cargo-beta-x86_64-unknown-linux-gnu.tar.gz=2ebc1e00cb2369c3a0dc6d21b8d8293aef2e42964ddd51aa56dc81f221a64cff +dist/2026-08-18/cargo-beta-x86_64-unknown-linux-gnu.tar.xz=79eb6a12e9b8fea72cd8e02dc39e633f51c485812e32a0048a5dad8b8644b4b0 +dist/2026-08-18/cargo-beta-x86_64-unknown-linux-musl.tar.gz=5d62ece374c942eab596efdb13205d7d23e16d32eed33e260ec01cf718c3a71c +dist/2026-08-18/cargo-beta-x86_64-unknown-linux-musl.tar.xz=33ca929e222d2f8b32988913bcb2bbf882ab9134b1590ad6e9b6ed6a4e81015d +dist/2026-08-18/cargo-beta-x86_64-unknown-netbsd.tar.gz=05f04d6023f28b372845c03da306941759fa1fdabfabe86b628e6fa7800e17d6 +dist/2026-08-18/cargo-beta-x86_64-unknown-netbsd.tar.xz=8b98637a31736cb9a8789f4c6ca0fc8e4fff0297f8efebee632c0cd521e2c029 +dist/2026-08-18/clippy-beta-aarch64-apple-darwin.tar.gz=5fe4bcaa4a8eb063132cbf24922d1502eb1974d255d2ec8a2743f6c226cd95a8 +dist/2026-08-18/clippy-beta-aarch64-apple-darwin.tar.xz=4df93e14e99505ec00ba4003c8b22330dbb801d02eac0f37f052c965d703cc28 +dist/2026-08-18/clippy-beta-aarch64-pc-windows-gnullvm.tar.gz=4abaa22dfbec4b506243b4bffced79568c50510d364ecbf2fe1e574cedb9faa7 +dist/2026-08-18/clippy-beta-aarch64-pc-windows-gnullvm.tar.xz=cea81f55e98d070e7644192319754c488a8e7758ea2b6dedf83a62ff4d6f0841 +dist/2026-08-18/clippy-beta-aarch64-pc-windows-msvc.tar.gz=e9b23658c3a1fe8ca459e0c40719412bf83d64896e19a5fd31d8de4bc826b778 +dist/2026-08-18/clippy-beta-aarch64-pc-windows-msvc.tar.xz=8343af10d4ebb040b7d0cf95574d10df986aa152fa1923ca740a9f41697422a6 +dist/2026-08-18/clippy-beta-aarch64-unknown-freebsd.tar.gz=be1a6654df4ec2038ccd08405eb2ec8bd30fa87813930b69557e2c9cf862d471 +dist/2026-08-18/clippy-beta-aarch64-unknown-freebsd.tar.xz=c13ca8153d949384cc99738c81d3e9022aa41fcf40f7c117143aeec48e21c9a2 +dist/2026-08-18/clippy-beta-aarch64-unknown-linux-gnu.tar.gz=bfe2e44d96c499dd4eb93c4a4eef715321749dda1050bf8dcda52fd6515f463e +dist/2026-08-18/clippy-beta-aarch64-unknown-linux-gnu.tar.xz=29b109b977dba9cbcffb74dcf6371f91ffdff5fc66f1f3f4abef9703d4b59e4c +dist/2026-08-18/clippy-beta-aarch64-unknown-linux-musl.tar.gz=710964e2d7b0432eb48d887805004fc521e380c898e308ba072a49bdf3363e3b +dist/2026-08-18/clippy-beta-aarch64-unknown-linux-musl.tar.xz=96f52e5b75225936d8beb48e895e43a8e8f7332312ac9a919916d1cb8552c74c +dist/2026-08-18/clippy-beta-aarch64-unknown-linux-ohos.tar.gz=d0a7c144e68c433175e489566cc9cedd5ae83fee367f4513edd06dfb85af37e4 +dist/2026-08-18/clippy-beta-aarch64-unknown-linux-ohos.tar.xz=55b5e8116ad9e29ae977fcf495d932e2d17d67ea048b734a733403b1bf32f136 +dist/2026-08-18/clippy-beta-arm-unknown-linux-gnueabi.tar.gz=6b74750557ab040db72e8fd2daca67e7e75f8845d360afaaba8ea8c90b6d8f2d +dist/2026-08-18/clippy-beta-arm-unknown-linux-gnueabi.tar.xz=e656572744817e497f2199270bd7ad7597056cfd1dbc4ab959c90290e5fea806 +dist/2026-08-18/clippy-beta-arm-unknown-linux-gnueabihf.tar.gz=000dc860666d8f1f27d1525dbf32bc0cc824205b91781e6c0854b550086a5789 +dist/2026-08-18/clippy-beta-arm-unknown-linux-gnueabihf.tar.xz=16e89c2a4a7a38a7eb1654c8a4e8f897c2c89f97e93afd5f2b68b8bc8ed366ab +dist/2026-08-18/clippy-beta-armv7-unknown-linux-gnueabihf.tar.gz=2cfea19e1e8307759be2f7bf0bd4c575c46055dceabbce086f7c8793f73646d0 +dist/2026-08-18/clippy-beta-armv7-unknown-linux-gnueabihf.tar.xz=e3c03d5d36d973da1ec3db60de8c8e0280230d217103ec8d34a8ae393d9912c6 +dist/2026-08-18/clippy-beta-i686-pc-windows-gnu.tar.gz=8fc7f489cfb38d98e0da8d1aa568887e95c85f1635db967adb5342f47e75bf06 +dist/2026-08-18/clippy-beta-i686-pc-windows-gnu.tar.xz=2d774e50c1a2a8ffa63ee819f38c4073e867ee86b3b3936afc9ad78fd6d6f7fc +dist/2026-08-18/clippy-beta-i686-pc-windows-msvc.tar.gz=c13eed86659d04d0c329e53f2daa9261960181f8f22ecaa05e83c801cd913cdf +dist/2026-08-18/clippy-beta-i686-pc-windows-msvc.tar.xz=71d3c6dc8c091245bab4d19383b75241623dfda4102c313ba6d0887ba9253f7f +dist/2026-08-18/clippy-beta-i686-unknown-linux-gnu.tar.gz=fe3963d203d7a42f27493c35166ac06b56c3dd9c34d28e99259059899dee7c2a +dist/2026-08-18/clippy-beta-i686-unknown-linux-gnu.tar.xz=a4407a9362f9d88f5475a8a1f948f1bae645553be19dcb2493072dab6ecb0004 +dist/2026-08-18/clippy-beta-loongarch64-unknown-linux-gnu.tar.gz=a803b0db04ffb55e4de3445d92d89217161daf345304f7a9e8230a2db37e798f +dist/2026-08-18/clippy-beta-loongarch64-unknown-linux-gnu.tar.xz=f3f03c257648f844b2f25ab2bf30b25f0bd964cd85e802cf92ccd86dee47ab92 +dist/2026-08-18/clippy-beta-loongarch64-unknown-linux-musl.tar.gz=4d1f89b20d2b78ac50a865aacc3c3558a88889ad4e5b4c6dc95dc6dfba45c2f5 +dist/2026-08-18/clippy-beta-loongarch64-unknown-linux-musl.tar.xz=cd89e3232cd92b71510627f2fcecb4ddb047995fb3c97effee1261b0779d7e31 +dist/2026-08-18/clippy-beta-powerpc-unknown-linux-gnu.tar.gz=02070d386593a771d8a386683e4c905cb3eb0bdac88971e5edcbc9d8fe8e2ce6 +dist/2026-08-18/clippy-beta-powerpc-unknown-linux-gnu.tar.xz=f297680488988d2e5a17784692ffecafa6f716fc7cd2f483b7d4bfc000e9ffbc +dist/2026-08-18/clippy-beta-powerpc64-unknown-linux-gnu.tar.gz=87d7d0fb031e473e969b2ed227102a4a5eb6267628d0c77505201613ea96f430 +dist/2026-08-18/clippy-beta-powerpc64-unknown-linux-gnu.tar.xz=9971af904468f255b5e26189b86586b82a5f548bb7b6df94a77bca1b222e8250 +dist/2026-08-18/clippy-beta-powerpc64-unknown-linux-musl.tar.gz=085f0d5146a60c1af737b83aae5c6b0d6edbb1187adc08b994592bace9690e32 +dist/2026-08-18/clippy-beta-powerpc64-unknown-linux-musl.tar.xz=d218a1d0203825acd3061885a1dcdc1067e853f37621533ef027de9ddabbc24f +dist/2026-08-18/clippy-beta-powerpc64le-unknown-linux-gnu.tar.gz=b8fc87bd4da8652cc018f2fef37805961c588753de747ebdd4e607173834892e +dist/2026-08-18/clippy-beta-powerpc64le-unknown-linux-gnu.tar.xz=2719977ab366d4cbf20bcf0dea4efbf6f7d479f1de1ee53550b7e0db9fef2ce1 +dist/2026-08-18/clippy-beta-powerpc64le-unknown-linux-musl.tar.gz=859cbd1aeda298301110f20b19d94eccf1b93019e9271a2298e6b6c88ea70e93 +dist/2026-08-18/clippy-beta-powerpc64le-unknown-linux-musl.tar.xz=d4e99335ad9e260d48a8916fd03b57576c0de9ac7bd53b3cb309f4cb9a548e79 +dist/2026-08-18/clippy-beta-riscv64gc-unknown-linux-gnu.tar.gz=9f0d343ef1d303edcd695e8ce15eb98eda15c17427cf6be4d40f5d7a96200bb6 +dist/2026-08-18/clippy-beta-riscv64gc-unknown-linux-gnu.tar.xz=5a58eb5ae9a0483971b1ae1ded6b6573ac42f105e0d535c56dcadce4c25c1164 +dist/2026-08-18/clippy-beta-riscv64gc-unknown-linux-musl.tar.gz=6a445ac80f3af92ccd8a3b1a1ec01dd96c87acb7c44745361e91006158b3483f +dist/2026-08-18/clippy-beta-riscv64gc-unknown-linux-musl.tar.xz=e2032fc84c9a380ea190640de7a1171974468be465bb0c8d7f89374d8a4b5556 +dist/2026-08-18/clippy-beta-s390x-unknown-linux-gnu.tar.gz=d0aaab88f485fa6736459cce8927e4daf9e8794e7c2e520cf64364258567a032 +dist/2026-08-18/clippy-beta-s390x-unknown-linux-gnu.tar.xz=c86f64909bd17001dcbc4daf0035ed582d876eaff810e75a07625b225f147ec8 +dist/2026-08-18/clippy-beta-sparcv9-sun-solaris.tar.gz=ba2e26b4add71aa42534d78ea1891777a91cf66f6bb9fe766cbccd60901eb897 +dist/2026-08-18/clippy-beta-sparcv9-sun-solaris.tar.xz=d098d8fcc5a795ed9b8e0196fcc94e427bd66cc3e9263c563faa26264226aa1a +dist/2026-08-18/clippy-beta-x86_64-apple-darwin.tar.gz=040b2fa856b4b978b7db6672bef0d7736df30a7ba38471f759f0f53d85c28c85 +dist/2026-08-18/clippy-beta-x86_64-apple-darwin.tar.xz=85e428d68a2b1f7ef5fbf94ccb8009de7ccf2b49493e507f5e730da9e425d3ae +dist/2026-08-18/clippy-beta-x86_64-pc-solaris.tar.gz=219ca608ad967d9fcf2f7a3764e52e5e8d6b60ff99eaa86c4fb571b96bd37acd +dist/2026-08-18/clippy-beta-x86_64-pc-solaris.tar.xz=e5dc215e559977a4772074094847a9b8da4283b5ad51fb73bb10c7a506e0115d +dist/2026-08-18/clippy-beta-x86_64-pc-windows-gnu.tar.gz=380c6ba6f747b36e4e011cd0d47c9091838b12aa510612c3fa6aefa782ff32d6 +dist/2026-08-18/clippy-beta-x86_64-pc-windows-gnu.tar.xz=8b2d086e6c00a2c0b0a856f7575c120faf75f5f645157a54b5ae77cf4410bb3c +dist/2026-08-18/clippy-beta-x86_64-pc-windows-gnullvm.tar.gz=fbcae84f6a5fef2f30a790d1a975cd8475035da251298b45ac4963cdaa9caebb +dist/2026-08-18/clippy-beta-x86_64-pc-windows-gnullvm.tar.xz=e4dbab41c356ef08493074bfbddd20ca06666a1e94d111998783b12e7c69c0a5 +dist/2026-08-18/clippy-beta-x86_64-pc-windows-msvc.tar.gz=e7bcc1e2bfe7b11808e110185ca23494f68213e2f0ee5588ca6adb8b43ab9f9e +dist/2026-08-18/clippy-beta-x86_64-pc-windows-msvc.tar.xz=3327ee1ac890f035160ca6e17c49ad2e78b4dbefab8133ea55dca70c2f498f63 +dist/2026-08-18/clippy-beta-x86_64-unknown-freebsd.tar.gz=bbbb6f42ac5e928ea72a4dac33406218de329a6fb36a54b5ff383a18888a0a1e +dist/2026-08-18/clippy-beta-x86_64-unknown-freebsd.tar.xz=b1e02c55a0a5969c786a0fb29576a56b6439ab00a24329dbd518e4fb8c71bd6e +dist/2026-08-18/clippy-beta-x86_64-unknown-illumos.tar.gz=e1a9eb87354cac8d97c8fa4a0972b67ae55599b1554ee7eb35a3e0b0b78a218f +dist/2026-08-18/clippy-beta-x86_64-unknown-illumos.tar.xz=fd47d0feeeadf79868feaa90f7b41497f6c87f54751d2fa57b1d8ff326fcd4ce +dist/2026-08-18/clippy-beta-x86_64-unknown-linux-gnu.tar.gz=be8b1a104953fa0a37b57966d1972f1e268d38e5f7bf83c34f9fa00798f371bc +dist/2026-08-18/clippy-beta-x86_64-unknown-linux-gnu.tar.xz=d2a0656ce333814b44ef5c6ef668a7df50cc87380936c30633ed68490a89ab88 +dist/2026-08-18/clippy-beta-x86_64-unknown-linux-musl.tar.gz=ee3481b87d2c0a2c5affcabbd5a538463574480870c0afe407589f8e1df48499 +dist/2026-08-18/clippy-beta-x86_64-unknown-linux-musl.tar.xz=9ce41c196580e20f8ee8bc369fc0bbe917145ae4ea39dd3a1ec67ffa22fa868b +dist/2026-08-18/clippy-beta-x86_64-unknown-netbsd.tar.gz=91ad76c2f79f61c422772ede44ce8f599a646a3c1da05fbfc5324beb97b2aeb8 +dist/2026-08-18/clippy-beta-x86_64-unknown-netbsd.tar.xz=fc14aa158d837ce9bdd0959a52f4d7538b362a1ab8bb0370fff08b0ff283ef7d +dist/2026-08-18/rust-beta-aarch64-pc-windows-gnullvm.msi=39ae595efd47c05544e5f7f36a4267dd339ece63f1d0f845d8e92f7ba0d0df01 +dist/2026-08-18/rust-beta-aarch64-pc-windows-msvc.msi=1aba33d2f85ac14e5e042b2eb55612ffa9945d11b41fd8a1e1756add7d15da21 +dist/2026-08-18/rust-beta-i686-pc-windows-gnu.msi=fa748daeb0befe69dd3434ec14447d684ca86e6c359c06781485312c93d7569b +dist/2026-08-18/rust-beta-i686-pc-windows-msvc.msi=c8eeed7b49523ad840bf29786037dc00bee0d742026e3d0f10286d437b9a1c3d +dist/2026-08-18/rust-beta-x86_64-pc-windows-gnu.msi=f61f5cb62ad64741f475dd9907fca3228707603e8627e8eed1e5097e09dd7b37 +dist/2026-08-18/rust-beta-x86_64-pc-windows-gnullvm.msi=2d49b873458e82c9ae91ecc0d2bbf42cdaaeb578945915777b4099d201f5c3bc +dist/2026-08-18/rust-beta-x86_64-pc-windows-msvc.msi=dd41ede2e8794fc2b85d195761fc775fc77e2e9cafe265026a5c7b9eb4f50df6 +dist/2026-08-18/rust-beta-aarch64-apple-darwin.pkg=95fe89d9e2c66ac7dc4454b1f00a55112057f5721fe7ce5be79e5e33d6f2af9f +dist/2026-08-18/rust-beta-x86_64-apple-darwin.pkg=e70190e1aef5edc5395a82f22f976055a8bacdbaea4c8e908dc0b06b8c5769ba +dist/2026-08-18/rustc-beta-src.tar.gz=f9179e80c6ffe453d24a9679500c41cb94538e2259cd79dbd43e6392376b0450 +dist/2026-08-18/rustc-beta-src.tar.xz=818fcd0a361460db2bf5ad529669c04f23fd75790ccf2900fe3e54d4db68da1c +dist/2026-08-18/rustfmt-nightly-aarch64-apple-darwin.tar.gz=8359cc560de936d29f7b13594ec54a1286e815d5154e55781d250c95efefdca2 +dist/2026-08-18/rustfmt-nightly-aarch64-apple-darwin.tar.xz=ec133fedfc39881527478364eae364c09eb866bea7b26cf8a607f712b0c4b8b1 +dist/2026-08-18/rustfmt-nightly-aarch64-pc-windows-gnullvm.tar.gz=eb6f8b751210b668b9bd50d4bd2a85138666fd9ddb3034084cd7e605dfd4eb10 +dist/2026-08-18/rustfmt-nightly-aarch64-pc-windows-gnullvm.tar.xz=d2fb7a64f3eef4baba3356baffb74aaa496efc39a6b30ed79ddefcc441038292 +dist/2026-08-18/rustfmt-nightly-aarch64-pc-windows-msvc.tar.gz=25459d38e45d450da824ac60adcf22d5218635d41bdc65675955ca201b3c2c07 +dist/2026-08-18/rustfmt-nightly-aarch64-pc-windows-msvc.tar.xz=72fedf763c73f88b4b314866e94866435f9037187cb879aef6907eb138e91fd3 +dist/2026-08-18/rustfmt-nightly-aarch64-unknown-freebsd.tar.gz=0683d2ac65a9f9a81012c82f74adb73b9c720d2ce8edd054018aaad7e64697e0 +dist/2026-08-18/rustfmt-nightly-aarch64-unknown-freebsd.tar.xz=5ed2b494f90358fd2a6294a00b802dcc27b1b7fb51bd62ebf602e6bb047cb825 +dist/2026-08-18/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.gz=d9b00b9350cbf4b07223bbb58f0c77a79ef8a4761adcb33915e2db2779cb605d +dist/2026-08-18/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz=0c596e26cc710ab63779b40b3fe476cf763ccd15d6fade17bcc22e46b1a24154 +dist/2026-08-18/rustfmt-nightly-aarch64-unknown-linux-musl.tar.gz=a4445c0bcbb7aae83fdd5bc7fe7318c2146c1826caf48fce44424386835cd3f8 +dist/2026-08-18/rustfmt-nightly-aarch64-unknown-linux-musl.tar.xz=aa302f6c50e0e109ae31785398952c0b9cdf24be41c80abd63ab8e7c95c52b20 +dist/2026-08-18/rustfmt-nightly-aarch64-unknown-linux-ohos.tar.gz=8034cd2b2e540e990f4a8de35b8cdfcb1c72c6228bdc66a470d1c4c8ee5f57e1 +dist/2026-08-18/rustfmt-nightly-aarch64-unknown-linux-ohos.tar.xz=58fb965551e248148bb56437e6553edc9204d68c0beeea587bb6645108869b24 +dist/2026-08-18/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.gz=f1891d9684248d8193a9d8e67107885a0b9ada5fa1e9e38479923e39ea9928f7 +dist/2026-08-18/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.xz=d54e511333b0d1e8e7c19f93ebcf0c56698faed1955318ffea6d2b4d1dd4d6ea +dist/2026-08-18/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.gz=7b35463a8357816e7022bea356e92d847011c17a3295a0e2f4850a811f6dd1db +dist/2026-08-18/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.xz=ca255881fe209ea1955386a633572239636d010156368e38ff2f6ad6efbf7ea2 +dist/2026-08-18/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.gz=c2c1146a102ac34f76543ac08239411c2c1c043e091e3637deffeef4181e25ba +dist/2026-08-18/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.xz=acb1a26de680d4e435877e5fedae2a0063e019ce414072c10615a9b6cef454e4 +dist/2026-08-18/rustfmt-nightly-i686-pc-windows-gnu.tar.gz=761ae1d0ed7c4fee126d76d59e26edeb9599e01ec338f36b9e0f8b04de262391 +dist/2026-08-18/rustfmt-nightly-i686-pc-windows-gnu.tar.xz=6ef0e2d34e32dd354116b12002efd911c7f734b8c7708108d541a79572f3aa7a +dist/2026-08-18/rustfmt-nightly-i686-pc-windows-msvc.tar.gz=ce84297a9c0e9454d17cd3144eb68463e9b4281c9c08207763277bfd33b9cbca +dist/2026-08-18/rustfmt-nightly-i686-pc-windows-msvc.tar.xz=8d3ecf716222af8d140b3580771fdcfe84194df3c4cb5809e9c0f1d010f3d91f +dist/2026-08-18/rustfmt-nightly-i686-unknown-linux-gnu.tar.gz=e9e9b19491a1edcfd6e96554e5867f4d1c00a5ac3d458368ed9c7ca82eb1cd13 +dist/2026-08-18/rustfmt-nightly-i686-unknown-linux-gnu.tar.xz=6d0ee5a0d6354607d40d0718e92c850aa47e2914d5c99c91c908b2bab5120b91 +dist/2026-08-18/rustfmt-nightly-loongarch64-unknown-linux-gnu.tar.gz=d7c573130ca761dca1a5fde6c0c5811294ca6597ed3ba0e34c16209b7e63f41a +dist/2026-08-18/rustfmt-nightly-loongarch64-unknown-linux-gnu.tar.xz=36f454c6a7c98876af766199ec1141c102dceb72de75dd2a29dec7597d4536ad +dist/2026-08-18/rustfmt-nightly-loongarch64-unknown-linux-musl.tar.gz=c440bedec3ba4f4fb86c5f2743eb681de7a7f9610b7a42cd912a9980d472149c +dist/2026-08-18/rustfmt-nightly-loongarch64-unknown-linux-musl.tar.xz=4a3ca8b699b176f1480a85c4c36ca869d4a069330c4d79248ae1428d4b522088 +dist/2026-08-18/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.gz=a52ca1bbb2ff0940b131c99dd0caa4bf0f0a6c4de37730cee7dba449c41b219f +dist/2026-08-18/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.xz=c67b4b8c8a7d6bfe425c04b5a528aa67f5cabfcabef7a5c0761db4335ac7ab79 +dist/2026-08-18/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.gz=54777ec5f3ec8a92e6431bc7356657348d359e683ee2105d1155ea29f5ce841d +dist/2026-08-18/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.xz=0400aa5c5c4948afc27d6ab7da6dbb9b609b446dcc88fa674ea92831bc8a90a6 +dist/2026-08-18/rustfmt-nightly-powerpc64-unknown-linux-musl.tar.gz=141fab1a35a405881d5f000b8f1a4f5db1aad8d7b7b980474868078410dec883 +dist/2026-08-18/rustfmt-nightly-powerpc64-unknown-linux-musl.tar.xz=430ce7d3e0ff163f62c560b6501307740407fe4f383f323777a54cb5e4bd5003 +dist/2026-08-18/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.gz=d0205048d10bcbf43feb63a118e5773357da8b646f9754e80a5893b5532b9a87 +dist/2026-08-18/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.xz=f15f429488bca14ec7e31a531be7b4f2366d50a5153ac3f8265eff5d4948d270 +dist/2026-08-18/rustfmt-nightly-powerpc64le-unknown-linux-musl.tar.gz=8aedd4c25762ac9fbdadd8448f0af721fbd315bec419fbd5e8e98dad6e6b4b1a +dist/2026-08-18/rustfmt-nightly-powerpc64le-unknown-linux-musl.tar.xz=ca853671fe6367d119aafd4c15d6371575b545c505b969ea89db3df87a51cc11 +dist/2026-08-18/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.gz=2792f02d0729f1a7ec58331c310931ff8dc785ba59c617ca383797b87520bcea +dist/2026-08-18/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.xz=90d4d96e16c158ca54d1028254353447580039b370fcd7a21ddabd391170c3bd +dist/2026-08-18/rustfmt-nightly-riscv64gc-unknown-linux-musl.tar.gz=85d51033a76ffd8d654c348d0288cec35806ff078d2d8c033794d3dae3d6d5c5 +dist/2026-08-18/rustfmt-nightly-riscv64gc-unknown-linux-musl.tar.xz=bdf31ec8ba7e306c424301a0a95b74305b2280bfde67e2d44dfd589092070e53 +dist/2026-08-18/rustfmt-nightly-s390x-unknown-linux-gnu.tar.gz=2c73ea8c782f6f067d809b38ba95e25a7cb6a4d4d5a6746f6ce586a6707084bb +dist/2026-08-18/rustfmt-nightly-s390x-unknown-linux-gnu.tar.xz=5ca41c228a27b0245f22a1623ad5ffeff166fb97bfdec1769fdd5bfff35c1763 +dist/2026-08-18/rustfmt-nightly-sparcv9-sun-solaris.tar.gz=febe662245a6c32aa49e715eb3908e910c1d9e5551141dcc1e29bbbe17c0facb +dist/2026-08-18/rustfmt-nightly-sparcv9-sun-solaris.tar.xz=4c5a4081e335f712834fa7edb512e3def45d06945bf563e6bbc02c4c82661ee7 +dist/2026-08-18/rustfmt-nightly-x86_64-apple-darwin.tar.gz=5af08000206f3eb5baf9ed5768ae573962692d4ca3af5ea43264d5cac10cc269 +dist/2026-08-18/rustfmt-nightly-x86_64-apple-darwin.tar.xz=348cf7b79ac548b9c830c1c91b6cb38f0bfefbfb5038c4a898bdb46e38f812a4 +dist/2026-08-18/rustfmt-nightly-x86_64-pc-solaris.tar.gz=0410ab96d92c1f5fdedd40b7c38b5b531c94e241de2e131002b73f627850c229 +dist/2026-08-18/rustfmt-nightly-x86_64-pc-solaris.tar.xz=c627bcd965c8be7496a6bb17509228d737b11b5c521746a01d4b6a24516eee98 +dist/2026-08-18/rustfmt-nightly-x86_64-pc-windows-gnu.tar.gz=c2099b8a326297dd379ecd31cf2020610a9f5d8d92950335ecd7681225faff10 +dist/2026-08-18/rustfmt-nightly-x86_64-pc-windows-gnu.tar.xz=086a7054834620d56a1242c126c24269b8440a25c07c0c8ff49155477ad31afe +dist/2026-08-18/rustfmt-nightly-x86_64-pc-windows-gnullvm.tar.gz=9386779ce495ea8fad7e5b29de837e77b972a3dd519af6db622af2f9f4488676 +dist/2026-08-18/rustfmt-nightly-x86_64-pc-windows-gnullvm.tar.xz=d7893bc04f62551ea7e24aaeb6d79b31b600f2bc4a01412929764b0021dd06d1 +dist/2026-08-18/rustfmt-nightly-x86_64-pc-windows-msvc.tar.gz=42c06fde187281cee1fde78b7a96555e776d6e5082e08817591348940598a95d +dist/2026-08-18/rustfmt-nightly-x86_64-pc-windows-msvc.tar.xz=1ef75c6b455cf046bfc72efc1c8db406c364a3f445ed460e5ca3092af3dab9f1 +dist/2026-08-18/rustfmt-nightly-x86_64-unknown-freebsd.tar.gz=4a2d0e7910ddac9c4afe2ac88194fce6ce809257f31a69589af1f4d0e0636a54 +dist/2026-08-18/rustfmt-nightly-x86_64-unknown-freebsd.tar.xz=0773f4684b9a56696ea378dc65c011e6cb296c9e939438e3d21f002e301045da +dist/2026-08-18/rustfmt-nightly-x86_64-unknown-illumos.tar.gz=6c21d29bb79ea41acd2c56f2a4f5e8125bb15bcff2bb8acb3f7c87d1ee966627 +dist/2026-08-18/rustfmt-nightly-x86_64-unknown-illumos.tar.xz=840190d0139a742cd8422813330241d74b96783dbc38c2833b128d7599a65347 +dist/2026-08-18/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.gz=c2b427d6383bfed96f8a22a861ad58c19b79dfcc562136ab03ab46d7c75eeef3 +dist/2026-08-18/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz=79a022906526fd663dfa429ee4c6ac5719d4d14c0fe11c2bed92fe2978220112 +dist/2026-08-18/rustfmt-nightly-x86_64-unknown-linux-musl.tar.gz=0786d79adaafca96e857cf624daa2cae6a8a91155de1d97518bd2609073e056c +dist/2026-08-18/rustfmt-nightly-x86_64-unknown-linux-musl.tar.xz=506f0055aa468f9261453fa7afa1b16000f2a0adb82f4ae306b1c9ec7e725ff7 +dist/2026-08-18/rustfmt-nightly-x86_64-unknown-netbsd.tar.gz=fb061689c906438646f70b76fa8db0dc4269cc85783806e74098b5f856b7bb13 +dist/2026-08-18/rustfmt-nightly-x86_64-unknown-netbsd.tar.xz=2af4814be862f5dfa71c9967ada639511fae01e56e3a5bd008f4cd2a2238a173 +dist/2026-08-18/rustc-nightly-aarch64-apple-darwin.tar.gz=55df1ca82348fd415ac6f470e91ccfbad719edc58ffffb1ab7474ca3f893b18f +dist/2026-08-18/rustc-nightly-aarch64-apple-darwin.tar.xz=919397ba2d0fafdb54cc3a15d7bd44c2477eee35b078d091e83d700a4aee915b +dist/2026-08-18/rustc-nightly-aarch64-pc-windows-gnullvm.tar.gz=87a9314b0b8c22e5f569b5786286944d9b8e343e0c147861be27933508e71950 +dist/2026-08-18/rustc-nightly-aarch64-pc-windows-gnullvm.tar.xz=23393b9fe0484bac67cad7a752202a4589d15b23416cdad4bc1ac2be59483d24 +dist/2026-08-18/rustc-nightly-aarch64-pc-windows-msvc.tar.gz=ca448c196560cbea8b71eb507bb6b442ce1d92bf38a5b37233167faed8a49ce5 +dist/2026-08-18/rustc-nightly-aarch64-pc-windows-msvc.tar.xz=b50b89b68bd6d0fe6b33d5b36329f4280084c938d7c46035a7647e113b6e6902 +dist/2026-08-18/rustc-nightly-aarch64-unknown-freebsd.tar.gz=e0ba0b49b170f0ed801e45f9decb566207897d99b625c11557c19c1cd1b2c305 +dist/2026-08-18/rustc-nightly-aarch64-unknown-freebsd.tar.xz=68f7ced91e30a4997424c9a8945bb224691664a286412dba047e8778df27f775 +dist/2026-08-18/rustc-nightly-aarch64-unknown-linux-gnu.tar.gz=b2d731e4546187b7f4ea76492ad1bb73ec322603843d49a39b197e9cb87aaa71 +dist/2026-08-18/rustc-nightly-aarch64-unknown-linux-gnu.tar.xz=0ff40c661fe771e73bb8620cdedbce33dbc5d5862e40373bc2d394a557c21ac1 +dist/2026-08-18/rustc-nightly-aarch64-unknown-linux-musl.tar.gz=162ef1fc6f822d676e945d11a7162b5096c133a42deb038aaadad15164eeb7b6 +dist/2026-08-18/rustc-nightly-aarch64-unknown-linux-musl.tar.xz=c6f918dc6cca5ad702aba57750f08c3c76f80ae53a799f9983bf3514e835d10d +dist/2026-08-18/rustc-nightly-aarch64-unknown-linux-ohos.tar.gz=fabe9610683c3ed4a12090a6bda9e918dd14f69d3475e4d15b769fa2eb91fed9 +dist/2026-08-18/rustc-nightly-aarch64-unknown-linux-ohos.tar.xz=926807f8dfed16eb6deb142f94b6ce46fb26d21c7346b1ff689d3f6e831d7aa8 +dist/2026-08-18/rustc-nightly-arm-unknown-linux-gnueabi.tar.gz=97f6ac3d02cefcd21f097ff4e663f8df8d87a31d07fa9f10851753bcb44ac75e +dist/2026-08-18/rustc-nightly-arm-unknown-linux-gnueabi.tar.xz=ef28e740d733e69d2b4e4058272c7b1fb352b2d080e80a2e11a7ba257736366d +dist/2026-08-18/rustc-nightly-arm-unknown-linux-gnueabihf.tar.gz=97c543c70c28d8c069798889f756793ca672583508dac205187cb2721eb041dc +dist/2026-08-18/rustc-nightly-arm-unknown-linux-gnueabihf.tar.xz=fa807d0f373683da3c98d49e5167dce2a962578dc19b205aeea8fcdad9c5ad82 +dist/2026-08-18/rustc-nightly-armv7-unknown-linux-gnueabihf.tar.gz=9492faf8bea9d7fa8ccfa757f979a76ef08ffb3189f673b2534abdeefaa54eaf +dist/2026-08-18/rustc-nightly-armv7-unknown-linux-gnueabihf.tar.xz=25238ee74921a5c4350f20638cc66a7ce51dbd48784312d556c84c2955507604 +dist/2026-08-18/rustc-nightly-i686-pc-windows-gnu.tar.gz=104518b6dddf82b291c362f9c5f1f2b29745ca846d1d1d00ebbe7914082c42c2 +dist/2026-08-18/rustc-nightly-i686-pc-windows-gnu.tar.xz=077a79233305d157fafc9918aff9f25e8fc19faaef8ad446a25f2c57b5ec86fb +dist/2026-08-18/rustc-nightly-i686-pc-windows-msvc.tar.gz=362519da71603e964cadc8b78cc7aa62e53a6a8956fe3db1efca089024b2900a +dist/2026-08-18/rustc-nightly-i686-pc-windows-msvc.tar.xz=4c65e07738dce9c01cf46395ad246b9e3de49f9b37bf6f8cdee44bc0b7d6a8cb +dist/2026-08-18/rustc-nightly-i686-unknown-linux-gnu.tar.gz=487345081f4eed3c8cf00eb73c850ff62214554b807f2e6984951d72dd324a64 +dist/2026-08-18/rustc-nightly-i686-unknown-linux-gnu.tar.xz=6fe9b5bbe02bd679cb1953cf44a153c9a534b903acf419983276a38e49d6940c +dist/2026-08-18/rustc-nightly-loongarch64-unknown-linux-gnu.tar.gz=f907053ef2e214fa5b1ec1b531df6c4c809eab35be5ed1d158f9296e9b0e016c +dist/2026-08-18/rustc-nightly-loongarch64-unknown-linux-gnu.tar.xz=42e38accce541fdd1c3f886a2fca2d1a9f63ac2ae9431cc7dcd127a44558a885 +dist/2026-08-18/rustc-nightly-loongarch64-unknown-linux-musl.tar.gz=68790cb993c600acd2517f491164e883e0a18efaa8027f2741560dc63df0a278 +dist/2026-08-18/rustc-nightly-loongarch64-unknown-linux-musl.tar.xz=de6c9c4533698a338bb46219eefb26d0c4cb01bf4f1c2c2ffe4b3b96b6166af7 +dist/2026-08-18/rustc-nightly-powerpc-unknown-linux-gnu.tar.gz=db3a467e6123469d030d64a5919f1172d614571cfd745bb7b9f23e27395b06d6 +dist/2026-08-18/rustc-nightly-powerpc-unknown-linux-gnu.tar.xz=59409e90d7a34387f617428b3f2c58bc6cd1c8bbf8a7589db97119293cb652b4 +dist/2026-08-18/rustc-nightly-powerpc64-unknown-linux-gnu.tar.gz=5f41fe6610ff78a66315174f2ff6a687f60501c5a16e96e09fdbc2d46b9eec49 +dist/2026-08-18/rustc-nightly-powerpc64-unknown-linux-gnu.tar.xz=4e1fd93779c24b894713de2a78a33ca50c82dbe7261838f03e51329a259680f7 +dist/2026-08-18/rustc-nightly-powerpc64-unknown-linux-musl.tar.gz=5e506f24af0ee0525e2853a7ed5b334254967cfb59d8d0d069b624104746d0de +dist/2026-08-18/rustc-nightly-powerpc64-unknown-linux-musl.tar.xz=4a45b2823afc85baaccdbb6b01fb65a8e3236735631de4f113de031440422b84 +dist/2026-08-18/rustc-nightly-powerpc64le-unknown-linux-gnu.tar.gz=76d60c5f368ccccf0b01d5a63172edec52cb5a9240cafcc75151061cd0e90387 +dist/2026-08-18/rustc-nightly-powerpc64le-unknown-linux-gnu.tar.xz=bbc30451f394f80bdb79123a1883c0bef4cb00c40dd15fad98a35622c0de0b6e +dist/2026-08-18/rustc-nightly-powerpc64le-unknown-linux-musl.tar.gz=ee14def5f91bc833ab0c72658b4d196821ba5a1481a5a182477577d3e35bd6ed +dist/2026-08-18/rustc-nightly-powerpc64le-unknown-linux-musl.tar.xz=0a5d855c1b557a7ac9387f97b9005e74c14c14bc7a95ca3c87861eaee16372fa +dist/2026-08-18/rustc-nightly-riscv64gc-unknown-linux-gnu.tar.gz=034c79fb5e4bee7ad29067d63bb456dbb64a67a494e50086f07d681212dc4ecf +dist/2026-08-18/rustc-nightly-riscv64gc-unknown-linux-gnu.tar.xz=f2fb76c3cae4542dc891f4cf06eebd786c5f3da028ed0ea484a381c372de2ebe +dist/2026-08-18/rustc-nightly-riscv64gc-unknown-linux-musl.tar.gz=f3d926753babb8b9bc8904ad9f5df639635be320f667bbcf1618c49c7e76b75d +dist/2026-08-18/rustc-nightly-riscv64gc-unknown-linux-musl.tar.xz=eb1228896c98ad4ade6b967b0643079033005218417290c72ed788f6756c4064 +dist/2026-08-18/rustc-nightly-s390x-unknown-linux-gnu.tar.gz=c57a90a45053fbb53d645cd80f0577bef7068fd12f3875bc6462686334a5c1fe +dist/2026-08-18/rustc-nightly-s390x-unknown-linux-gnu.tar.xz=9608cdf34d7d37bc075a030de31bb4b261cf0205589ccdeb6b2a091cf17772fa +dist/2026-08-18/rustc-nightly-sparcv9-sun-solaris.tar.gz=30a75702b6a61c5e61bce2e32b0a9561ae3e00fecd87bc8d88e1277b2e5c9fc8 +dist/2026-08-18/rustc-nightly-sparcv9-sun-solaris.tar.xz=fcf621dae0a9162f3727bffc20ef4af805cfd9866e1952a4873e488a54d9fb06 +dist/2026-08-18/rustc-nightly-x86_64-apple-darwin.tar.gz=89f18bbcfc47190c2569ed90af1eb7bcccb040190d2437d3c50e5f2c55afab60 +dist/2026-08-18/rustc-nightly-x86_64-apple-darwin.tar.xz=612cc0142c5c838c975d49b81d8557964cac360f2a7cf3bcb295fa1514154ca8 +dist/2026-08-18/rustc-nightly-x86_64-pc-solaris.tar.gz=5d6937928b1928a219c3cd8e7c274b5e7b706b0933368e8edb73a061f4cf4c8b +dist/2026-08-18/rustc-nightly-x86_64-pc-solaris.tar.xz=141598ad72363b070fc4843a991ecf3d8986622536698e1743191e82b1aba5f7 +dist/2026-08-18/rustc-nightly-x86_64-pc-windows-gnu.tar.gz=0fcf7497f77d715542b3ddecf7a216b48ad832329ae0b1d12c5fbc01c9a6f00a +dist/2026-08-18/rustc-nightly-x86_64-pc-windows-gnu.tar.xz=93cff41c7ce08537557c80f243b1d8a03d2fe86da9b94523c3a77da683babfae +dist/2026-08-18/rustc-nightly-x86_64-pc-windows-gnullvm.tar.gz=babc16bb58f82d99e7766c3e53037cb6669331b8cb24d4c3bdfff0ce259a55ed +dist/2026-08-18/rustc-nightly-x86_64-pc-windows-gnullvm.tar.xz=6de4b5f59f6f303a8f4d12cb3b2cd121e81e3373d96400279718fda3fdbad00e +dist/2026-08-18/rustc-nightly-x86_64-pc-windows-msvc.tar.gz=068d8e709a0067f01dccda415e840d0ba3e3b23c93941ec2d49f31e6d7c4b6f7 +dist/2026-08-18/rustc-nightly-x86_64-pc-windows-msvc.tar.xz=8a3756be311c70e5e0a96013c05ed722d32a1b34d0907d620f7b6cbbfa186b02 +dist/2026-08-18/rustc-nightly-x86_64-unknown-freebsd.tar.gz=0bcc22a6a5ae3098a567e18ab22f0577dfab3554085fd2f9999e78009d70269d +dist/2026-08-18/rustc-nightly-x86_64-unknown-freebsd.tar.xz=d03e5df866c860e45ab492ea85874f6d32c21978c73883dbe523b54c0113e5a1 +dist/2026-08-18/rustc-nightly-x86_64-unknown-illumos.tar.gz=9fd49f5f363d407549f284145b58124d78027d306b0f4e1ee66b1ac3041845a4 +dist/2026-08-18/rustc-nightly-x86_64-unknown-illumos.tar.xz=2641a0ee225272620be1a0e491c8e09a8fa6897de6c9f3a136656f89f9176dfa +dist/2026-08-18/rustc-nightly-x86_64-unknown-linux-gnu.tar.gz=e05f9bfebc9fbe968792a69b5fc2229a2a4b03179e5f03989801833f5adc766d +dist/2026-08-18/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz=d363d6d9d78e0a65c91763866f54baa2a9d59f4f48fae07697c450b715326685 +dist/2026-08-18/rustc-nightly-x86_64-unknown-linux-musl.tar.gz=2789540ecb7f9b6e0448d2596c1968a4b5640d20e00e0b4c83beb7d20f8997c3 +dist/2026-08-18/rustc-nightly-x86_64-unknown-linux-musl.tar.xz=00730e7cdb24bfede2256b8c58d14626a3b9d8fa58a391945f42342d4b08ca6c +dist/2026-08-18/rustc-nightly-x86_64-unknown-netbsd.tar.gz=ea3961377ee8acdf8e32bfefcd3ff2188e4dc272c35f93a2f809b0130e313d77 +dist/2026-08-18/rustc-nightly-x86_64-unknown-netbsd.tar.xz=83a06931285b8ecbb6f7cee75f44e15c7b308716f8d5864cde2a533a8693dc26 +dist/2026-08-18/rust-nightly-aarch64-pc-windows-gnullvm.msi=f911335169b70dab3ae0251d327109a96c1a884dc5e2bd53f157c2453db5aa35 +dist/2026-08-18/rust-nightly-aarch64-pc-windows-msvc.msi=c0c356e9dd3d2260426e942332ed1be71ada04035424e447b456bef707fde106 +dist/2026-08-18/rust-nightly-i686-pc-windows-gnu.msi=d6e498b7c77c29913c239b98be256c05ac02c91de6570b563e4dda628765a420 +dist/2026-08-18/rust-nightly-i686-pc-windows-msvc.msi=05ecee49dd6751c323353b69617dac4e13fb485efa2ab84a35b6fb0e04d9f81a +dist/2026-08-18/rust-nightly-x86_64-pc-windows-gnu.msi=00b1eaaac8412a125911bafe9eee25ae6e9dc1a2e3b680eebf9aa8a6dc5a318d +dist/2026-08-18/rust-nightly-x86_64-pc-windows-gnullvm.msi=87d187b541d90a7537014f7a03a6c53ce19c49c8a85ed3c8b83f1f74e8c73dfd +dist/2026-08-18/rust-nightly-x86_64-pc-windows-msvc.msi=e3a11247f04d54c505fb2c6bce1b9a8de53a6baaf67322ac832d5e4896a67450 +dist/2026-08-18/rust-nightly-aarch64-apple-darwin.pkg=ac481df372d9b7827993416223ba12d8505060ae5f66267135203ab86e3e897e +dist/2026-08-18/rust-nightly-x86_64-apple-darwin.pkg=0cccf72b516978d7ceb0187e6c40ba2213dd62ef4d364f197c44a6c29a1b4a9e +dist/2026-08-18/rustc-nightly-src.tar.gz=f6bbe8ac8c45dc92eedb208f8c3d451b156b4c818d87be16dce083b33c313af7 +dist/2026-08-18/rustc-nightly-src.tar.xz=14e366ab22e3ab6fa0a7146be747797663c00db3d1d04834d1b55187a9efdfc7 diff --git a/src/tools/clippy/clippy_lints/src/derive/derive_partial_eq_without_eq.rs b/src/tools/clippy/clippy_lints/src/derive/derive_partial_eq_without_eq.rs index 51412cd1d8a6e..65a305d361af8 100644 --- a/src/tools/clippy/clippy_lints/src/derive/derive_partial_eq_without_eq.rs +++ b/src/tools/clippy/clippy_lints/src/derive/derive_partial_eq_without_eq.rs @@ -5,7 +5,7 @@ use rustc_errors::Applicability; use rustc_hir::def_id::DefId; use rustc_hir::{self as hir, HirId}; use rustc_lint::LateContext; -use rustc_middle::ty::{self, ClauseKind, GenericParamDefKind, ParamEnv, TraitPredicate, Ty, TyCtxt, Upcast as _}; +use rustc_middle::ty::{self, ClauseKind, GenericParamDefKind, ParamEnv, TraitClause, Ty, TyCtxt, Upcast as _}; use rustc_span::{Span, sym}; use super::DERIVE_PARTIAL_EQ_WITHOUT_EQ; @@ -78,9 +78,9 @@ fn typing_env_for_derived_eq(tcx: TyCtxt<'_>, did: DefId, eq_trait_id: DefId) -> let param_env = ParamEnv::new(tcx.mk_clauses_from_iter(ty_clauses.iter().map(|&(c, _)| c).chain( params.iter().filter(|&&(_, needs_eq)| needs_eq).map(|&(param, _)| { - ClauseKind::Trait(TraitPredicate { + ClauseKind::Trait(TraitClause { trait_ref: ty::TraitRef::new(tcx, eq_trait_id, [tcx.mk_param_from_def(param)]), - polarity: ty::PredicatePolarity::Positive, + polarity: ty::ClausePolarity::Positive, }) .upcast(tcx) }), diff --git a/src/tools/clippy/clippy_lints/src/eta_reduction.rs b/src/tools/clippy/clippy_lints/src/eta_reduction.rs index e1ad4649a5e3e..d84166766aa4e 100644 --- a/src/tools/clippy/clippy_lints/src/eta_reduction.rs +++ b/src/tools/clippy/clippy_lints/src/eta_reduction.rs @@ -207,7 +207,7 @@ fn check_closure<'tcx>(cx: &LateContext<'tcx>, outer_receiver: Option<&Expr<'tcx .type_implements_fn_trait( cx.param_env, Binder::bind_with_vars(callee_ty_adjusted, List::empty()), - ty::PredicatePolarity::Positive, + ty::ClausePolarity::Positive, ) { span_lint_hir_and_then( diff --git a/src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs b/src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs index 8ae27b2342d18..cd0bc5a67f0c3 100644 --- a/src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs +++ b/src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs @@ -17,7 +17,7 @@ use rustc_lint::LateContext; use rustc_middle::mir::Mutability; use rustc_middle::ty::adjustment::{Adjust, Adjustment, DerefAdjustKind, OverloadedDeref}; use rustc_middle::ty::{ - self, ClauseKind, GenericArg, GenericArgKind, GenericArgsRef, ParamTy, ProjectionPredicate, TraitPredicate, Ty, + self, ClauseKind, GenericArg, GenericArgKind, GenericArgsRef, ParamTy, ProjectionClause, TraitClause, Ty, }; use rustc_span::Symbol; use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt as _; @@ -473,12 +473,12 @@ fn get_callee_generic_args_and_args<'tcx>( None } -/// Returns the `TraitPredicate`s and `ProjectionPredicate`s for a function's input type. +/// Returns the `TraitClause`s and `ProjectionClause`s for a function's input type. fn get_input_traits_and_projections<'tcx>( cx: &LateContext<'tcx>, callee_def_id: DefId, input: Ty<'tcx>, -) -> (Vec>, Vec>) { +) -> (Vec>, Vec>) { let mut trait_predicates = Vec::new(); let mut projection_predicates = Vec::new(); for clause in cx.tcx.param_env(callee_def_id).caller_bounds() { @@ -740,7 +740,7 @@ fn check_borrow_predicate<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { && let Some(borrow_id) = cx.tcx.get_diagnostic_item(sym::Borrow) && cx.tcx.clauses_of(method_def_id).clauses.iter().any(|(clause, _)| { if let ClauseKind::Trait(trait_pred) = clause.kind().skip_binder() - && trait_pred.polarity == ty::PredicatePolarity::Positive + && trait_pred.polarity == ty::ClausePolarity::Positive && trait_pred.trait_ref.def_id == borrow_id { true diff --git a/src/tools/clippy/clippy_lints/src/needless_borrows_for_generic_args.rs b/src/tools/clippy/clippy_lints/src/needless_borrows_for_generic_args.rs index 7b5635f8555a0..1ae9d8791954d 100644 --- a/src/tools/clippy/clippy_lints/src/needless_borrows_for_generic_args.rs +++ b/src/tools/clippy/clippy_lints/src/needless_borrows_for_generic_args.rs @@ -14,7 +14,7 @@ use rustc_infer::infer::TyCtxtInferExt as _; use rustc_lint::{LateContext, LateLintPass}; use rustc_middle::mir::{Rvalue, StatementKind}; use rustc_middle::ty::{ - self, ClauseKind, EarlyBinder, FnSig, GenericArg, GenericArgKind, ParamTy, ProjectionPredicate, Ty, Unnormalized, + self, ClauseKind, EarlyBinder, FnSig, GenericArg, GenericArgKind, ParamTy, ProjectionClause, Ty, Unnormalized, }; use rustc_session::impl_lint_pass; use rustc_span::SyntaxContext; @@ -328,7 +328,7 @@ fn has_ref_mut_self_method(cx: &LateContext<'_>, trait_def_id: DefId) -> bool { fn is_mixed_projection_predicate<'tcx>( cx: &LateContext<'tcx>, callee_def_id: DefId, - projection_predicate: &ProjectionPredicate<'tcx>, + projection_predicate: &ProjectionClause<'tcx>, ) -> bool { let generics = cx.tcx.generics_of(callee_def_id); // The predicate requires the projected type to equal a type parameter from the parent context. @@ -402,7 +402,7 @@ fn replace_types<'tcx>( new_ty: Ty<'tcx>, fn_sig: FnSig<'tcx>, arg_index: usize, - projection_predicates: &[ProjectionPredicate<'tcx>], + projection_predicates: &[ProjectionClause<'tcx>], args: &mut [GenericArg<'tcx>], ) -> bool { let mut replaced = DenseBitSet::new_empty(args.len()); diff --git a/src/tools/clippy/clippy_lints/src/needless_maybe_sized.rs b/src/tools/clippy/clippy_lints/src/needless_maybe_sized.rs index 079f5a4929dc7..79db70d7f97f0 100644 --- a/src/tools/clippy/clippy_lints/src/needless_maybe_sized.rs +++ b/src/tools/clippy/clippy_lints/src/needless_maybe_sized.rs @@ -4,7 +4,7 @@ use rustc_errors::Applicability; use rustc_hir::def_id::{DefId, DefIdMap}; use rustc_hir::{BoundPolarity, GenericBound, Generics, PolyTraitRef, TraitBoundModifiers, WherePredicateKind}; use rustc_lint::{LateContext, LateLintPass}; -use rustc_middle::ty::{ClauseKind, PredicatePolarity, Unnormalized}; +use rustc_middle::ty::{ClauseKind, ClausePolarity, Unnormalized}; use rustc_session::declare_lint_pass; use rustc_span::symbol::Ident; @@ -99,7 +99,7 @@ fn path_to_sized_bound(cx: &LateContext<'_>, trait_bound: &PolyTraitRef<'_>) -> .map(Unnormalized::skip_norm_wip) { if let ClauseKind::Trait(trait_predicate) = clause.kind().skip_binder() - && trait_predicate.polarity == PredicatePolarity::Positive + && trait_predicate.polarity == ClausePolarity::Positive && !path.contains(&trait_predicate.def_id()) { path.push(trait_predicate.def_id()); diff --git a/src/tools/clippy/clippy_lints/src/ranges.rs b/src/tools/clippy/clippy_lints/src/ranges.rs index 18b3ecb474bba..164d08c9a2fc3 100644 --- a/src/tools/clippy/clippy_lints/src/ranges.rs +++ b/src/tools/clippy/clippy_lints/src/ranges.rs @@ -15,7 +15,7 @@ use rustc_errors::Applicability; use rustc_hir::attrs::lang_items::LangItem; use rustc_hir::{BinOpKind, Expr, ExprKind, HirId, Node}; use rustc_lint::{LateContext, LateLintPass, Lint}; -use rustc_middle::ty::{self, ClauseKind, GenericArgKind, PredicatePolarity, Ty}; +use rustc_middle::ty::{self, ClauseKind, GenericArgKind, ClausePolarity, Ty}; use rustc_session::impl_lint_pass; use rustc_span::{DesugaringKind, Span, Spanned, SyntaxContext}; use std::cmp::Ordering; @@ -436,7 +436,7 @@ fn can_switch_ranges<'tcx>( .into_iter() .any(|c| { if let ClauseKind::Trait(t) = c.kind().skip_binder() - && t.polarity == PredicatePolarity::Positive + && t.polarity == ClausePolarity::Positive && matches!( cx.tcx.get_diagnostic_name(t.trait_ref.def_id), Some(sym::Iterator | sym::IntoIterator | sym::RangeBounds) diff --git a/src/tools/clippy/clippy_lints/src/unit_return_expecting_ord.rs b/src/tools/clippy/clippy_lints/src/unit_return_expecting_ord.rs index 49488c9da34a5..193be59be6a6c 100644 --- a/src/tools/clippy/clippy_lints/src/unit_return_expecting_ord.rs +++ b/src/tools/clippy/clippy_lints/src/unit_return_expecting_ord.rs @@ -3,7 +3,7 @@ use rustc_hir::def_id::DefId; use rustc_hir::{Closure, Expr, ExprKind, StmtKind}; use rustc_lint::{LateContext, LateLintPass}; use rustc_middle::ty; -use rustc_middle::ty::{ClauseKind, GenericClauses, ProjectionPredicate, TraitPredicate}; +use rustc_middle::ty::{ClauseKind, GenericClauses, ProjectionClause, TraitClause}; use rustc_session::declare_lint_pass; use rustc_span::{BytePos, Span, Symbol, sym}; @@ -40,7 +40,7 @@ fn get_trait_predicates_for_trait_ids<'tcx>( cx: &LateContext<'tcx>, generics: GenericClauses<'tcx>, trait_ids: &[Option], // At least 2 ids -) -> [Vec>; 3] { +) -> [Vec>; 3] { debug_assert!(trait_ids.len() >= 2); let mut preds = [Vec::new(), Vec::new(), Vec::new()]; for (clause, _) in generics.clauses { @@ -63,8 +63,8 @@ fn get_trait_predicates_for_trait_ids<'tcx>( fn get_projection_pred<'tcx>( cx: &LateContext<'tcx>, generics: GenericClauses<'tcx>, - trait_pred: TraitPredicate<'tcx>, -) -> Option> { + trait_pred: TraitClause<'tcx>, +) -> Option> { generics.clauses.iter().find_map(|(clause, _)| { if let ClauseKind::Projection(pred) = clause.kind().skip_binder() { let projection_pred = cx.tcx.instantiate_bound_regions_with_erased(clause.kind().rebind(pred)); diff --git a/src/tools/miri/src/lib.rs b/src/tools/miri/src/lib.rs index c74b786eada85..7d878024b02e2 100644 --- a/src/tools/miri/src/lib.rs +++ b/src/tools/miri/src/lib.rs @@ -18,8 +18,8 @@ #![feature(try_blocks)] #![feature(io_error_more)] #![feature(io_error_inprogress)] -#![cfg_attr(not(bootstrap), feature(io_error_input_output_error))] -#![cfg_attr(not(bootstrap), feature(io_error_too_many_open_files))] +#![feature(io_error_input_output_error)] +#![feature(io_error_too_many_open_files)] #![feature(variant_count)] #![feature(yeet_expr)] #![feature(pointer_is_aligned_to)] diff --git a/src/tools/miri/src/shims/io_error.rs b/src/tools/miri/src/shims/io_error.rs index 346b6423ca176..67b85ecb8985b 100644 --- a/src/tools/miri/src/shims/io_error.rs +++ b/src/tools/miri/src/shims/io_error.rs @@ -94,7 +94,6 @@ const UNIX_IO_ERROR_TABLE: &[(&str, std::io::ErrorKind)] = { ("ETXTBSY", ExecutableFileBusy), ("EXDEV", CrossesDevices), ("EINPROGRESS", InProgress), - #[cfg(not(bootstrap))] ("EIO", InputOutputError), // The following have two valid options. We have both for the forwards mapping; only the // first one will be used for the backwards mapping. @@ -105,9 +104,7 @@ const UNIX_IO_ERROR_TABLE: &[(&str, std::io::ErrorKind)] = { ("ENOSYS", Unsupported), ("EOPNOTSUPP", Unsupported), ("ENOTSUP", Unsupported), - #[cfg(not(bootstrap))] ("EMFILE", TooManyOpenFiles), - #[cfg(not(bootstrap))] ("ENFILE", TooManyOpenFiles), ] }; @@ -264,9 +261,7 @@ const WINDOWS_IO_ERROR_TABLE: &[(&str, std::io::ErrorKind)] = { ("ERROR_TOO_MANY_LINKS", TooManyLinks), ("ERROR_CALL_NOT_IMPLEMENTED", Unsupported), ("WSAEWOULDBLOCK", WouldBlock), - #[cfg(not(bootstrap))] ("ERROR_TOO_MANY_OPEN_FILES", TooManyOpenFiles), - #[cfg(not(bootstrap))] ("ERROR_IO_DEVICE", InputOutputError), ] }; diff --git a/src/tools/miri/src/shims/native_lib/trace/child.rs b/src/tools/miri/src/shims/native_lib/trace/child.rs index d50d6ddc0416d..23670a2cfb053 100644 --- a/src/tools/miri/src/shims/native_lib/trace/child.rs +++ b/src/tools/miri/src/shims/native_lib/trace/child.rs @@ -1,8 +1,5 @@ use std::cell::RefCell; -#[cfg(not(bootstrap))] use std::panic::abort_on_unwind; -#[cfg(bootstrap)] -use std::panic::abort_unwind as abort_on_unwind; use std::ptr::NonNull; use std::rc::Rc; diff --git a/src/tools/rustc-perf b/src/tools/rustc-perf index 0a054b0ead56e..94df17b4a0fba 160000 --- a/src/tools/rustc-perf +++ b/src/tools/rustc-perf @@ -1 +1 @@ -Subproject commit 0a054b0ead56e41a4584bfab6fdc1a5fad2aedc3 +Subproject commit 94df17b4a0fbafae5e534b6a754a6a6ee7d51708 diff --git a/tests/codegen-llvm/arm-abi/homogeneous-aggregate.rs b/tests/codegen-llvm/arm-abi/homogeneous-aggregate.rs new file mode 100644 index 0000000000000..c44dc4fa56f5f --- /dev/null +++ b/tests/codegen-llvm/arm-abi/homogeneous-aggregate.rs @@ -0,0 +1,180 @@ +//@ add-minicore +//@ compile-flags: -Cno-prepopulate-passes -Copt-level=0 +// +//@ revisions: linux eabi watchos +//@[linux] compile-flags: --target armv7-unknown-linux-gnueabihf +//@[eabi] compile-flags: --target armv7r-none-eabi +//@[watchos] compile-flags: --target armv7k-apple-watchos +// +//@ needs-llvm-components: arm + +// Test that homogeneous aggregates are passed and returned with the correct ABI on 32-bit arm. + +#![feature(no_core, lang_items)] +#![crate_type = "lib"] +#![no_core] + +extern crate minicore; +use minicore::*; + +// A homogeneous float aggregate, which a hard-float ABI passes in VFP registers. +#[repr(C)] +pub struct Hfa { + pub a: f32, + pub b: f32, +} +impl Copy for Hfa {} + +// linux: define void @test_hfa([2 x float] %0) +// eabi: define dso_local void @test_hfa([2 x i32] %0) +// watchos: define void @test_hfa([2 x float] %0) +#[unsafe(no_mangle)] +pub extern "C" fn test_hfa(a: Hfa) { + hint::black_box(a); +} + +// linux: define [2 x float] @ret_hfa([2 x float] %0) +// eabi: define dso_local void @ret_hfa(ptr sret([8 x i8]) align 4 %_0, [2 x i32] %0) +// watchos: define [2 x float] @ret_hfa([2 x float] %0) +#[unsafe(no_mangle)] +pub extern "C" fn ret_hfa(a: Hfa) -> Hfa { + a +} + +// When we ask for `extern "aapcs"` specifically, GPRs are used, except on watchOS. +// +// linux: define arm_aapcscc void @test_hfa_aapcs([2 x i32] %0) +// eabi: define dso_local arm_aapcscc void @test_hfa_aapcs([2 x i32] %0) +// watchos: define arm_aapcscc void @test_hfa_aapcs([2 x float] %0) +#[unsafe(no_mangle)] +pub extern "aapcs" fn test_hfa_aapcs(a: Hfa) { + hint::black_box(a); +} + +// A homogeneous aggregate can have at most 4 fields. +#[repr(C)] +pub struct Hfa4F64 { + pub a: f64, + pub b: f64, + pub c: f64, + pub d: f64, +} + +// linux: define void @test_hfa_4_f64([4 x double] %0) +// eabi: define dso_local void @test_hfa_4_f64([4 x i64] %0) +// watchos: define void @test_hfa_4_f64([4 x double] %0) +#[unsafe(no_mangle)] +pub extern "C" fn test_hfa_4_f64(a: Hfa4F64) { + hint::black_box(a); +} + +// A homogeneous aggregate can have at most 4 fields, so this does not qualify. +#[repr(C)] +pub struct Floats5 { + pub a: f32, + pub b: f32, + pub c: f32, + pub d: f32, + pub e: f32, +} + +// linux: define void @test_floats_5([5 x i32] %0) +// eabi: define dso_local void @test_floats_5([5 x i32] %0) +// watchos: define void @test_floats_5(ptr align 4 %a) +#[unsafe(no_mangle)] +pub extern "C" fn test_floats_5(a: Floats5) { + hint::black_box(a); +} + +// Just a big struct, note how watchOS passes it indirectly. +#[repr(C)] +pub struct Ints6 { + pub a: u32, + pub b: u32, + pub c: u32, + pub d: u32, + pub e: u32, + pub f: u32, +} +impl Copy for Ints6 {} + +// linux: define void @test_ints_6([6 x i32] %0) +// eabi: define dso_local void @test_ints_6([6 x i32] %0) +// watchos: define void @test_ints_6(ptr align 4 %a) +#[unsafe(no_mangle)] +pub extern "C" fn test_ints_6(a: Ints6) { + hint::black_box(a); +} + +#[repr(C)] +pub struct Natural { + pub a: u32, + pub b: u32, +} + +// Returns are indirect once they exceed 32 bits, except on watchOS. +// +// linux: define void @ret_natural(ptr sret([8 x i8]) align 4 %_0, [2 x i32] %0) +// eabi: define dso_local void @ret_natural(ptr sret([8 x i8]) align 4 %_0, [2 x i32] %0) +// watchos: define [2 x i32] @ret_natural([2 x i32] %0) +#[unsafe(no_mangle)] +pub extern "C" fn ret_natural(a: Natural) -> Natural { + a +} + +#[repr(C)] +#[repr(align(16))] +pub struct Align16 { + pub a: u32, + pub b: u32, +} + +// linux: define void @ret_align16(ptr sret([16 x i8]) align 16 %_0, [4 x i32] %0) +// eabi: define dso_local void @ret_align16(ptr sret([16 x i8]) align 16 %_0, [4 x i32] %0) +// watchos: define [4 x i32] @ret_align16([2 x i64] %0) +#[unsafe(no_mangle)] +pub extern "C" fn ret_align16(a: Align16) -> Align16 { + a +} + +// Larger than 128 bits, so the return is indirect everywhere. +// +// linux: define void @ret_ints_6(ptr sret([24 x i8]) align 4 %_0, [6 x i32] %0) +// eabi: define dso_local void @ret_ints_6(ptr sret([24 x i8]) align 4 %_0, [6 x i32] %0) +// watchos: define void @ret_ints_6(ptr sret([24 x i8]) align 4 %_0, ptr align 4 %a) +#[unsafe(no_mangle)] +pub extern "C" fn ret_ints_6(a: Ints6) -> Ints6 { + a +} + +extern "C" { + // linux: declare void @test_hfa_variadic_c([2 x i32], ...) + // eabi: declare dso_local void @test_hfa_variadic_c([2 x i32], ...) + // watchos: declare void @test_hfa_variadic_c([2 x float], ...) + fn test_hfa_variadic_c(_: Hfa, ...); + + // linux: declare void @test_ints_6_variadic_c([6 x i32], ...) + // eabi: declare dso_local void @test_ints_6_variadic_c([6 x i32], ...) + // watchos: declare void @test_ints_6_variadic_c(ptr align 4, ...) + fn test_ints_6_variadic_c(_: Ints6, ...); +} + +extern "aapcs" { + // linux: declare arm_aapcscc void @test_hfa_variadic_aapcs([2 x i32], ...) + // eabi: declare dso_local arm_aapcscc void @test_hfa_variadic_aapcs([2 x i32], ...) + // watchos: declare arm_aapcscc void @test_hfa_variadic_aapcs([2 x float], ...) + fn test_hfa_variadic_aapcs(_: Hfa, ...); + + // linux: declare arm_aapcscc void @test_ints_6_variadic_aapcs([6 x i32], ...) + // eabi: declare dso_local arm_aapcscc void @test_ints_6_variadic_aapcs([6 x i32], ...) + // watchos: declare arm_aapcscc void @test_ints_6_variadic_aapcs(ptr align 4, ...) + fn test_ints_6_variadic_aapcs(_: Ints6, ...); +} + +pub unsafe fn call_variadics(a: Hfa, b: Ints6) { + test_hfa_variadic_c(a); + test_ints_6_variadic_c(b); + + test_hfa_variadic_aapcs(a); + test_ints_6_variadic_aapcs(b); +} diff --git a/tests/codegen-llvm/arm-abi/struct-alignment.rs b/tests/codegen-llvm/arm-abi/struct-alignment.rs new file mode 100644 index 0000000000000..1921b8a9ddda9 --- /dev/null +++ b/tests/codegen-llvm/arm-abi/struct-alignment.rs @@ -0,0 +1,115 @@ +//@ add-minicore +//@ compile-flags: -Cno-prepopulate-passes -Copt-level=0 +// +//@ revisions: linux eabi watchos +//@[linux] compile-flags: --target armv7-unknown-linux-gnueabihf +//@[eabi] compile-flags: --target armv7r-none-eabi +//@[watchos] compile-flags: --target armv7k-apple-watchos +// +//@ needs-llvm-components: arm + +// Test that structs are passed with the correct register alignment. + +#![feature(no_core, lang_items)] +#![crate_type = "lib"] +#![no_core] + +extern crate minicore; +use minicore::*; + +#[repr(C)] +pub struct Natural { + pub a: u32, + pub b: u32, +} + +// linux: define void @test_natural([2 x i32] %0) +// eabi: define dso_local void @test_natural([2 x i32] %0) +// watchos: define void @test_natural([2 x i32] %0) +#[unsafe(no_mangle)] +pub extern "C" fn test_natural(a: Natural) { + hint::black_box(a); +} + +#[repr(C)] +pub struct HasU64 { + pub a: u64, +} + +// linux: define void @test_has_u64(i64 %0) +// eabi: define dso_local void @test_has_u64(i64 %0) +// watchos: define void @test_has_u64(i64 %0) +#[unsafe(no_mangle)] +pub extern "C" fn test_has_u64(a: HasU64) { + hint::black_box(a); +} + +#[repr(C)] +#[repr(align(8))] +pub struct Align8 { + pub a: u32, + pub b: u32, +} + +#[repr(transparent)] +pub struct Transparent8 { + a: Align8, +} + +// Here watchOS deviates from the others. On linux and eabi, the natural alignment of the struct +// contents is used, and the alignment modifier of the struct is not considered for ABI purposes. +// watchOS does respect the alignment annotation for register allocation. +// +// linux: define void @test_8([2 x i32] %0, [2 x i32] %1) +// eabi: define dso_local void @test_8([2 x i32] %0, [2 x i32] %1) +// watchos: define void @test_8(i64 %0, i64 %1) +#[unsafe(no_mangle)] +pub extern "C" fn test_8(a: Align8, b: Transparent8) { + hint::black_box(a); + hint::black_box(b); +} + +#[repr(C)] +#[repr(align(16))] +pub struct Align16 { + pub a: u32, + pub b: u32, +} + +#[repr(transparent)] +pub struct Transparent16 { + a: Align16, +} + +#[repr(C)] +pub struct Wrapped16 { + pub a: Align16, +} + +// Wrapping resets the unadjusted alignment. +// +// linux: define void @test_16([4 x i32] %0, [4 x i32] %1, [2 x i64] %2) +// eabi: define dso_local void @test_16([4 x i32] %0, [4 x i32] %1, [2 x i64] %2) +// watchos: define void @test_16([2 x i64] %0, [2 x i64] %1, [2 x i64] %2) +#[unsafe(no_mangle)] +pub extern "C" fn test_16(a: Align16, b: Transparent16, c: Wrapped16) { + hint::black_box(a); + hint::black_box(b); + hint::black_box(c); +} + +// Packing is different, the alignment is 1 across targets. +#[repr(C)] +#[repr(packed)] +pub struct Packed { + pub a: u8, + pub b: u64, +} + +// linux: define void @test_packed([3 x i32] %0) +// eabi: define dso_local void @test_packed([3 x i32] %0) +// watchos: define void @test_packed([3 x i32] %0) +#[unsafe(no_mangle)] +pub extern "C" fn test_packed(a: Packed) { + hint::black_box(a); +} diff --git a/tests/rustdoc-gui/go-to-collapsed-elem.goml b/tests/rustdoc-gui/go-to-collapsed-elem.goml index e56e7ba08cd81..ff85f37047e92 100644 --- a/tests/rustdoc-gui/go-to-collapsed-elem.goml +++ b/tests/rustdoc-gui/go-to-collapsed-elem.goml @@ -1,6 +1,7 @@ // This test ensures that when clicking on a link which leads to an item inside a collapsed element, // the collapsed element will be expanded. go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html" +include: "utils.goml" // We check that the implementors block is expanded. assert-property: ("#implementations-list .implementors-toggle", {"open": "true"}) // We now collapse the implementors block. @@ -16,6 +17,7 @@ define-function: ("collapsed-from-search", [], block { // Then we collapse the section again... set-property: ("#implementations-list .implementors-toggle", {"open": "false"}) // Then we run the search. + call-function: ("open-search", {}) write-into: (".search-input", "foo::must_use") wait-for: "//*[@id='search']//a[@href='../test_docs/struct.Foo.html#method.must_use']" click: "//*[@id='search']//a[@href='../test_docs/struct.Foo.html#method.must_use']" diff --git a/tests/rustdoc-gui/search-elements.goml b/tests/rustdoc-gui/search-elements.goml new file mode 100644 index 0000000000000..a06421c9a6598 --- /dev/null +++ b/tests/rustdoc-gui/search-elements.goml @@ -0,0 +1,15 @@ +// This test ensures that the search elements are not created in the DOM before being needed. + +go-to: "file://" + |DOC_PATH| + "/test_docs/index.html" +store-value: (search_selector, "#search") + +// This selector is not supposed to exist yet. +assert-false: |search_selector| + +// It should be generated when the search "begins". +click: "#search-button" +wait-for: |search_selector| + +// When we arrive on a page with a search query parameter, the element should also be present. +go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=a" +wait-for: |search_selector| diff --git a/tests/rustdoc-gui/sidebar-source-code-display.goml b/tests/rustdoc-gui/sidebar-source-code-display.goml index d2b667b498bc6..4394204900117 100644 --- a/tests/rustdoc-gui/sidebar-source-code-display.goml +++ b/tests/rustdoc-gui/sidebar-source-code-display.goml @@ -53,7 +53,8 @@ define-function: ( "#src-sidebar details[open] > .files a:not(.selected):focus", {"color": |color_hover|, "background-color": |background_hover|}, ) - focus: ".search-input" + // Focus another element to remove focus from the
element. + focus: "#search-button" // With hover. move-cursor-to: "#src-sidebar details[open] > .files a:not(.selected)" assert-css: ( @@ -72,7 +73,8 @@ define-function: ( "#src-sidebar .dir-entry summary:focus", {"color": |color_hover|, "background-color": |background_hover|}, ) - focus: ".search-input" + // Focus another element to remove focus from the element. + focus: "#search-button" // With hover. move-cursor-to: "#src-sidebar .dir-entry summary" assert-css: ( @@ -91,7 +93,8 @@ define-function: ( "#src-sidebar details[open] > .folders > details > summary:focus", {"color": |color_hover|, "background-color": |background_hover|}, ) - focus: ".search-input" + // Focus another element to remove focus from the element. + focus: "#search-button" // With hover. move-cursor-to: "#src-sidebar details[open] > .folders > details > summary" assert-css: ( diff --git a/tests/rustdoc-html/repr.rs b/tests/rustdoc-html/repr.rs index 1e8fad6ec0a66..6e80abb855d7f 100644 --- a/tests/rustdoc-html/repr.rs +++ b/tests/rustdoc-html/repr.rs @@ -1,5 +1,6 @@ // Test the rendering of `#[repr]` on ADTs. #![feature(repr_simd)] // only used for the `ReprSimd` test case +#![feature(rustc_attrs)] // only used for the `RustcPubTransparent` test case // Check the "local case" (HIR cleaning) // @@ -147,6 +148,16 @@ pub enum ReprTransparentEnumHidden1ZstField { }, } +// Regression test for . +//@ has 'repr/struct.RustcPubTransparent.html' +//@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]' +#[repr(transparent)] // public... +#[rustc_pub_transparent] // ...since this attribute was applied +pub struct RustcPubTransparent { + // ...despite this field being private + field: u64, +} + struct Marker; // 1-ZST // Check the "extern case" (middle cleaning) // diff --git a/tests/ui/associated-types/issue-65774-1.rs b/tests/ui/associated-types/issue-65774-1.rs index 9345140558b07..93b24471d7b7c 100644 --- a/tests/ui/associated-types/issue-65774-1.rs +++ b/tests/ui/associated-types/issue-65774-1.rs @@ -39,7 +39,7 @@ impl ProcessType for Process { // writer.my_write(valref) // This one causes the ICE: - // FulfillmentError(Obligation(predicate=Binder(TraitPredicate()), + // FulfillmentError(Obligation(predicate=Binder(TraitClause()), // depth=1),Unimplemented) let closure = |config: &mut ::MpuConfig| writer.my_write(&config); //~^ ERROR the trait bound `T: MyDisplay` is not satisfied diff --git a/tests/ui/associated-types/issue-65774-2.rs b/tests/ui/associated-types/issue-65774-2.rs index 171e0893b4719..accc349758cea 100644 --- a/tests/ui/associated-types/issue-65774-2.rs +++ b/tests/ui/associated-types/issue-65774-2.rs @@ -40,7 +40,7 @@ impl ProcessType for Process { //~^ ERROR the trait bound `T: MyDisplay` is not satisfied // This one causes the ICE: - // FulfillmentError(Obligation(predicate=Binder(TraitPredicate()), + // FulfillmentError(Obligation(predicate=Binder(TraitClause()), // depth=1),Unimplemented) /*let closure = |config: &mut ::MpuConfig| writer.my_write(&config); closure(valref);*/ diff --git a/tests/ui/async-await/async-drop/async-drop-async-gen-return-pending.rs b/tests/ui/async-await/async-drop/async-drop-async-gen-return-pending.rs new file mode 100644 index 0000000000000..375fd80ad60ad --- /dev/null +++ b/tests/ui/async-await/async-drop/async-drop-async-gen-return-pending.rs @@ -0,0 +1,14 @@ +// issue - https://github.com/rust-lang/rust/issues/161101 +//@ build-pass +//@ compile-flags: --crate-type=lib +//@ edition: 2024 +#![feature(async_drop)] +#![feature(gen_blocks)] +#![allow(incomplete_features)] + +pub async fn html() { + async gen { + gen { yield }; + yield + }; +} diff --git a/tests/ui/attributes/dump-clauses.stderr b/tests/ui/attributes/dump-clauses.stderr index 0a91751c59ba2..93d2057d88cd5 100644 --- a/tests/ui/attributes/dump-clauses.stderr +++ b/tests/ui/attributes/dump-clauses.stderr @@ -4,12 +4,12 @@ error: rustc_dump_clauses LL | trait Trait: Iterator | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] } - = note: Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] } - = note: Binder { value: TraitPredicate(<::Item as std::marker::Copy>, polarity:Positive), bound_vars: [] } - = note: Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] } - = note: Binder { value: TraitPredicate(>, polarity:Positive), bound_vars: [] } - = note: Binder { value: TraitPredicate(>, polarity:Positive), bound_vars: [] } + = note: Binder { value: TraitClause(, polarity:Positive), bound_vars: [] } + = note: Binder { value: TraitClause(, polarity:Positive), bound_vars: [] } + = note: Binder { value: TraitClause(<::Item as std::marker::Copy>, polarity:Positive), bound_vars: [] } + = note: Binder { value: TraitClause(, polarity:Positive), bound_vars: [] } + = note: Binder { value: TraitClause(>, polarity:Positive), bound_vars: [] } + = note: Binder { value: TraitClause(>, polarity:Positive), bound_vars: [] } error: rustc_dump_clauses --> $DIR/dump-clauses.rs:13:5 @@ -17,15 +17,15 @@ error: rustc_dump_clauses LL | type Assoc: std::ops::Deref | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] } - = note: Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] } - = note: Binder { value: TraitPredicate(<::Item as std::marker::Copy>, polarity:Positive), bound_vars: [] } - = note: Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] } - = note: Binder { value: TraitPredicate(>, polarity:Positive), bound_vars: [] } - = note: Binder { value: TraitPredicate(>, polarity:Positive), bound_vars: [] } - = note: Binder { value: TraitPredicate(

, polarity:Positive), bound_vars: [] } - = note: Binder { value: TraitPredicate(

, polarity:Positive), bound_vars: [] } - = note: Binder { value: TraitPredicate(<>::Assoc<()> as std::marker::Copy>, polarity:Positive), bound_vars: [] } + = note: Binder { value: TraitClause(, polarity:Positive), bound_vars: [] } + = note: Binder { value: TraitClause(, polarity:Positive), bound_vars: [] } + = note: Binder { value: TraitClause(<::Item as std::marker::Copy>, polarity:Positive), bound_vars: [] } + = note: Binder { value: TraitClause(, polarity:Positive), bound_vars: [] } + = note: Binder { value: TraitClause(>, polarity:Positive), bound_vars: [] } + = note: Binder { value: TraitClause(>, polarity:Positive), bound_vars: [] } + = note: Binder { value: TraitClause(

, polarity:Positive), bound_vars: [] } + = note: Binder { value: TraitClause(

, polarity:Positive), bound_vars: [] } + = note: Binder { value: TraitClause(<>::Assoc<()> as std::marker::Copy>, polarity:Positive), bound_vars: [] } error: rustc_dump_item_bounds --> $DIR/dump-clauses.rs:13:5 @@ -33,9 +33,9 @@ error: rustc_dump_item_bounds LL | type Assoc: std::ops::Deref | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: Binder { value: ProjectionPredicate(Alias { kind: ProjectionTy { def_id: DefId(..) }, args: [Alias(No, Alias { kind: Projection { def_id: DefId(..) }, args: [Self/#0, T/#1, P/#2], .. })], .. }, Term::Ty(())), bound_vars: [] } - = note: Binder { value: TraitPredicate(<>::Assoc

as std::ops::Deref>, polarity:Positive), bound_vars: [] } - = note: Binder { value: TraitPredicate(<>::Assoc

as std::marker::Sized>, polarity:Positive), bound_vars: [] } + = note: Binder { value: ProjectionClause(Alias { kind: ProjectionTy { def_id: DefId(..) }, args: [Alias(No, Alias { kind: Projection { def_id: DefId(..) }, args: [Self/#0, T/#1, P/#2], .. })], .. }, Term::Ty(())), bound_vars: [] } + = note: Binder { value: TraitClause(<>::Assoc

as std::ops::Deref>, polarity:Positive), bound_vars: [] } + = note: Binder { value: TraitClause(<>::Assoc

as std::marker::Sized>, polarity:Positive), bound_vars: [] } error: aborting due to 3 previous errors diff --git a/tests/ui/const-generics/adt_const_params/byte-string-u8-validation.rs b/tests/ui/const-generics/adt_const_params/byte-string-u8-validation.rs index 1ba509cb9ed43..5bb893719de30 100644 --- a/tests/ui/const-generics/adt_const_params/byte-string-u8-validation.rs +++ b/tests/ui/const-generics/adt_const_params/byte-string-u8-validation.rs @@ -8,7 +8,7 @@ struct ConstBytes //~^ ERROR rustc_dump_clauses //~| NOTE Binder { value: ConstArgHasType(T/#0, &'static [*mut u8; 3_usize]), bound_vars: [] } -//~| NOTE Binder { value: TraitPredicate( as std::marker::Sized>, polarity:Positive), bound_vars: [] } +//~| NOTE Binder { value: TraitClause( as std::marker::Sized>, polarity:Positive), bound_vars: [] } //~| NOTE expected because of the type of the const parameter where ConstBytes: Sized; diff --git a/tests/ui/const-generics/adt_const_params/byte-string-u8-validation.stderr b/tests/ui/const-generics/adt_const_params/byte-string-u8-validation.stderr index 5626c6f04eb7a..bb7e4e253f907 100644 --- a/tests/ui/const-generics/adt_const_params/byte-string-u8-validation.stderr +++ b/tests/ui/const-generics/adt_const_params/byte-string-u8-validation.stderr @@ -19,7 +19,7 @@ LL | struct ConstBytes | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: Binder { value: ConstArgHasType(T/#0, &'static [*mut u8; 3_usize]), bound_vars: [] } - = note: Binder { value: TraitPredicate( as std::marker::Sized>, polarity:Positive), bound_vars: [] } + = note: Binder { value: TraitClause( as std::marker::Sized>, polarity:Positive), bound_vars: [] } error: aborting due to 2 previous errors diff --git a/tests/ui/consts/const-fn-error.rs b/tests/ui/consts/const-fn-error.rs deleted file mode 100644 index b71517824232f..0000000000000 --- a/tests/ui/consts/const-fn-error.rs +++ /dev/null @@ -1,16 +0,0 @@ -const X : usize = 2; - -const fn f(x: usize) -> usize { - let mut sum = 0; - for i in 0..x { - //~^ ERROR cannot use `for` - //~| ERROR cannot use `for` - sum += i; - } - sum -} - -#[allow(unused_variables)] -fn main() { - let a : [i32; f(X)]; -} diff --git a/tests/ui/consts/const-fn-error.stderr b/tests/ui/consts/const-fn-error.stderr deleted file mode 100644 index 3d4cf6539c896..0000000000000 --- a/tests/ui/consts/const-fn-error.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0015]: cannot use `for` loop on `std::ops::Range` in constant functions - --> $DIR/const-fn-error.rs:5:14 - | -LL | for i in 0..x { - | ^^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants - -error[E0015]: cannot use `for` loop on `std::ops::Range` in constant functions - --> $DIR/const-fn-error.rs:5:14 - | -LL | for i in 0..x { - | ^^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants - = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/eii/default/auxiliary/decl_with_default.rs b/tests/ui/eii/default/auxiliary/decl_with_default.rs index 8d962c19c94d9..cf9d86d561733 100644 --- a/tests/ui/eii/default/auxiliary/decl_with_default.rs +++ b/tests/ui/eii/default/auxiliary/decl_with_default.rs @@ -1,4 +1,5 @@ //@ no-prefer-dynamic +//@[dylib] compile-flags: --crate-type=dylib -Cprefer-dynamic #![crate_type = "rlib"] #![feature(extern_item_impls)] diff --git a/tests/ui/eii/default/auxiliary/decl_with_default_panics.rs b/tests/ui/eii/default/auxiliary/decl_with_default_panics.rs index 3867bfb85c9fe..11209e86b2588 100644 --- a/tests/ui/eii/default/auxiliary/decl_with_default_panics.rs +++ b/tests/ui/eii/default/auxiliary/decl_with_default_panics.rs @@ -1,3 +1,5 @@ +//@ no-prefer-dynamic +//@[dylib] compile-flags: --crate-type=dylib -Cprefer-dynamic //@ needs-unwind //@ exec-env:RUST_BACKTRACE=1 #![crate_type = "rlib"] diff --git a/tests/ui/eii/default/auxiliary/impl1.rs b/tests/ui/eii/default/auxiliary/impl1.rs index 5ed6ab639a883..321ba913a01a6 100644 --- a/tests/ui/eii/default/auxiliary/impl1.rs +++ b/tests/ui/eii/default/auxiliary/impl1.rs @@ -1,4 +1,5 @@ //@ no-prefer-dynamic +//@[dylib-impl] compile-flags: --crate-type=dylib -Cprefer-dynamic //@ aux-build: decl_with_default.rs #![crate_type = "rlib"] #![feature(extern_item_impls)] diff --git a/tests/ui/eii/default/call_default.run.stdout b/tests/ui/eii/default/call_default.dylib.run.stdout similarity index 100% rename from tests/ui/eii/default/call_default.run.stdout rename to tests/ui/eii/default/call_default.dylib.run.stdout diff --git a/tests/ui/eii/default/call_default.rlib.run.stdout b/tests/ui/eii/default/call_default.rlib.run.stdout new file mode 100644 index 0000000000000..1e49486f6aaf4 --- /dev/null +++ b/tests/ui/eii/default/call_default.rlib.run.stdout @@ -0,0 +1 @@ +default 10 diff --git a/tests/ui/eii/default/call_default.rs b/tests/ui/eii/default/call_default.rs index c090043106903..7769ae00bb0f5 100644 --- a/tests/ui/eii/default/call_default.rs +++ b/tests/ui/eii/default/call_default.rs @@ -1,3 +1,5 @@ +//@ revisions: rlib dylib +//@[dylib] needs-crate-type: dylib //@ aux-build: decl_with_default.rs //@ run-pass //@ check-run-results diff --git a/tests/ui/eii/default/call_default_panics.rs b/tests/ui/eii/default/call_default_panics.rs index 68740d5ab80d8..d027748b0ffb3 100644 --- a/tests/ui/eii/default/call_default_panics.rs +++ b/tests/ui/eii/default/call_default_panics.rs @@ -1,3 +1,5 @@ +//@ revisions: rlib dylib +//@[dylib] needs-crate-type: dylib //@ aux-build: decl_with_default_panics.rs //@ edition: 2021 //@ run-pass diff --git a/tests/ui/eii/default/call_impl.run.stdout b/tests/ui/eii/default/call_impl.dylib-impl.run.stdout similarity index 100% rename from tests/ui/eii/default/call_impl.run.stdout rename to tests/ui/eii/default/call_impl.dylib-impl.run.stdout diff --git a/tests/ui/eii/default/call_impl.rlib.run.stdout b/tests/ui/eii/default/call_impl.rlib.run.stdout new file mode 100644 index 0000000000000..bc6298e80ad4b --- /dev/null +++ b/tests/ui/eii/default/call_impl.rlib.run.stdout @@ -0,0 +1 @@ +110 diff --git a/tests/ui/eii/default/call_impl.rs b/tests/ui/eii/default/call_impl.rs index f5b0cca2998f3..4b64033a940f5 100644 --- a/tests/ui/eii/default/call_impl.rs +++ b/tests/ui/eii/default/call_impl.rs @@ -1,3 +1,5 @@ +//@ revisions: rlib dylib-impl +//@[dylib-impl] needs-crate-type: dylib //@ aux-build: decl_with_default.rs //@ aux-build: impl1.rs //@ run-pass diff --git a/tests/ui/eii/duplicate/auxiliary/impl1.rs b/tests/ui/eii/duplicate/auxiliary/impl1.rs index 86017eec20763..e845b8c99fbe8 100644 --- a/tests/ui/eii/duplicate/auxiliary/impl1.rs +++ b/tests/ui/eii/duplicate/auxiliary/impl1.rs @@ -1,3 +1,5 @@ +//@ no-prefer-dynamic +//@[dylib] compile-flags: --crate-type=dylib -Cprefer-dynamic //@ aux-build: decl.rs #![crate_type = "rlib"] #![feature(extern_item_impls)] diff --git a/tests/ui/eii/duplicate/auxiliary/impl2.rs b/tests/ui/eii/duplicate/auxiliary/impl2.rs index 928433d832c2d..931f2bdc28be5 100644 --- a/tests/ui/eii/duplicate/auxiliary/impl2.rs +++ b/tests/ui/eii/duplicate/auxiliary/impl2.rs @@ -1,3 +1,5 @@ +//@ no-prefer-dynamic +//@[dylib] compile-flags: --crate-type=dylib -Cprefer-dynamic //@ aux-build: decl.rs #![crate_type = "rlib"] #![feature(extern_item_impls)] diff --git a/tests/ui/eii/duplicate/auxiliary/impl3.rs b/tests/ui/eii/duplicate/auxiliary/impl3.rs index 3f0be04377fce..45406a109a2fc 100644 --- a/tests/ui/eii/duplicate/auxiliary/impl3.rs +++ b/tests/ui/eii/duplicate/auxiliary/impl3.rs @@ -1,3 +1,4 @@ +//@ no-prefer-dynamic //@ aux-build: decl.rs #![crate_type = "rlib"] #![feature(extern_item_impls)] diff --git a/tests/ui/eii/duplicate/auxiliary/impl4.rs b/tests/ui/eii/duplicate/auxiliary/impl4.rs index 959746f5117f3..9fd6cbbe376bf 100644 --- a/tests/ui/eii/duplicate/auxiliary/impl4.rs +++ b/tests/ui/eii/duplicate/auxiliary/impl4.rs @@ -1,3 +1,4 @@ +//@ no-prefer-dynamic //@ aux-build: decl.rs #![crate_type = "rlib"] #![feature(extern_item_impls)] diff --git a/tests/ui/eii/duplicate/duplicate1.stderr b/tests/ui/eii/duplicate/duplicate1.dylib.stderr similarity index 86% rename from tests/ui/eii/duplicate/duplicate1.stderr rename to tests/ui/eii/duplicate/duplicate1.dylib.stderr index f691043e6a597..6c4758d3beece 100644 --- a/tests/ui/eii/duplicate/duplicate1.stderr +++ b/tests/ui/eii/duplicate/duplicate1.dylib.stderr @@ -1,10 +1,10 @@ error: multiple implementations of `#[eii1]` - --> $DIR/auxiliary/impl1.rs:9:1 + --> $DIR/auxiliary/impl1.rs:11:1 | LL | fn other(x: u64) { | ^^^^^^^^^^^^^^^^ first implemented here in crate `impl1` | - ::: $DIR/auxiliary/impl2.rs:9:1 + ::: $DIR/auxiliary/impl2.rs:11:1 | LL | fn other(x: u64) { | ---------------- also implemented here in crate `impl2` diff --git a/tests/ui/eii/duplicate/duplicate1.rlib.stderr b/tests/ui/eii/duplicate/duplicate1.rlib.stderr new file mode 100644 index 0000000000000..6c4758d3beece --- /dev/null +++ b/tests/ui/eii/duplicate/duplicate1.rlib.stderr @@ -0,0 +1,15 @@ +error: multiple implementations of `#[eii1]` + --> $DIR/auxiliary/impl1.rs:11:1 + | +LL | fn other(x: u64) { + | ^^^^^^^^^^^^^^^^ first implemented here in crate `impl1` + | + ::: $DIR/auxiliary/impl2.rs:11:1 + | +LL | fn other(x: u64) { + | ---------------- also implemented here in crate `impl2` + | + = help: an "externally implementable item" can only have a single implementation in the final artifact. When multiple implementations are found, also in different crates, they conflict + +error: aborting due to 1 previous error + diff --git a/tests/ui/eii/duplicate/duplicate1.rs b/tests/ui/eii/duplicate/duplicate1.rs index 0ac0f16af5078..54803f31c85f4 100644 --- a/tests/ui/eii/duplicate/duplicate1.rs +++ b/tests/ui/eii/duplicate/duplicate1.rs @@ -1,3 +1,5 @@ +//@ revisions: rlib dylib +//@[dylib] needs-crate-type: dylib //@ aux-build: impl1.rs //@ aux-build: impl2.rs //@ ignore-backends: gcc diff --git a/tests/ui/eii/duplicate/duplicate2.stderr b/tests/ui/eii/duplicate/duplicate2.stderr index 492d2b3e6004b..fb0c552cc8719 100644 --- a/tests/ui/eii/duplicate/duplicate2.stderr +++ b/tests/ui/eii/duplicate/duplicate2.stderr @@ -1,10 +1,10 @@ error: multiple implementations of `#[eii1]` - --> $DIR/auxiliary/impl1.rs:9:1 + --> $DIR/auxiliary/impl1.rs:11:1 | LL | fn other(x: u64) { | ^^^^^^^^^^^^^^^^ first implemented here in crate `impl1` | - ::: $DIR/auxiliary/impl2.rs:9:1 + ::: $DIR/auxiliary/impl2.rs:11:1 | LL | fn other(x: u64) { | ---------------- also implemented here in crate `impl2` diff --git a/tests/ui/eii/duplicate/duplicate3.stderr b/tests/ui/eii/duplicate/duplicate3.stderr index f3ca087a27325..caa11c5cf4e92 100644 --- a/tests/ui/eii/duplicate/duplicate3.stderr +++ b/tests/ui/eii/duplicate/duplicate3.stderr @@ -1,10 +1,10 @@ error: multiple implementations of `#[eii1]` - --> $DIR/auxiliary/impl1.rs:9:1 + --> $DIR/auxiliary/impl1.rs:11:1 | LL | fn other(x: u64) { | ^^^^^^^^^^^^^^^^ first implemented here in crate `impl1` | - ::: $DIR/auxiliary/impl2.rs:9:1 + ::: $DIR/auxiliary/impl2.rs:11:1 | LL | fn other(x: u64) { | ---------------- also implemented here in crate `impl2` diff --git a/tests/ui/eii/duplicate/dylib_default_duplicate.rs b/tests/ui/eii/duplicate/dylib_default_duplicate.rs index 28c79ae35dd97..5480bb13b4a49 100644 --- a/tests/ui/eii/duplicate/dylib_default_duplicate.rs +++ b/tests/ui/eii/duplicate/dylib_default_duplicate.rs @@ -2,8 +2,8 @@ //@ needs-crate-type: dylib //@ compile-flags: --emit link //@ ignore-backends: gcc -// FIXME: linking on windows (specifically mingw) not yet supported, see tracking issue #125418 -//@ ignore-windows +// FIXME(#125418): linking on Windows GNU targets is not yet supported. +//@ ignore-windows-gnu // Regression test for https://github.com/rust-lang/rust/issues/156320. // A default implementation from an upstream dylib has already been selected and // must not be overridden by a downstream explicit implementation. diff --git a/tests/ui/eii/linking/track_caller_cross_crate.rs b/tests/ui/eii/linking/track_caller_cross_crate.rs index 2e16ec7b9fb23..e8ba5dc2b864b 100644 --- a/tests/ui/eii/linking/track_caller_cross_crate.rs +++ b/tests/ui/eii/linking/track_caller_cross_crate.rs @@ -3,7 +3,8 @@ //@ aux-build: track_caller_cross_other_crate.rs //@ compile-flags: -O //@ ignore-backends: gcc -//@ ignore-windows +// FIXME(#125418): linking on Windows GNU targets is not yet supported. +//@ ignore-windows-gnu // Tests that `#[track_caller]` on an EII declaration in one crate is derived // onto an explicit implementation in another crate. diff --git a/tests/ui/eii/static/auxiliary/cross_crate_def.rs b/tests/ui/eii/static/auxiliary/cross_crate_def.rs index 56d3f6fcdc557..5956c081c80b5 100644 --- a/tests/ui/eii/static/auxiliary/cross_crate_def.rs +++ b/tests/ui/eii/static/auxiliary/cross_crate_def.rs @@ -1,3 +1,5 @@ +//@ no-prefer-dynamic +//@[dylib] compile-flags: --crate-type=dylib -Cprefer-dynamic #![crate_type = "rlib"] #![feature(extern_item_impls)] diff --git a/tests/ui/eii/static/auxiliary/decl_with_default.rs b/tests/ui/eii/static/auxiliary/decl_with_default.rs index 53cdc8d62bb7e..82e817cda6df0 100644 --- a/tests/ui/eii/static/auxiliary/decl_with_default.rs +++ b/tests/ui/eii/static/auxiliary/decl_with_default.rs @@ -1,4 +1,5 @@ //@ no-prefer-dynamic +//@[dylib] compile-flags: --crate-type=dylib -Cprefer-dynamic #![crate_type = "rlib"] #![feature(extern_item_impls)] diff --git a/tests/ui/eii/static/auxiliary/impl_default_override.rs b/tests/ui/eii/static/auxiliary/impl_default_override.rs index 03cb061135e70..2ab43ab37d0af 100644 --- a/tests/ui/eii/static/auxiliary/impl_default_override.rs +++ b/tests/ui/eii/static/auxiliary/impl_default_override.rs @@ -1,4 +1,5 @@ //@ no-prefer-dynamic +//@[dylib-impl] compile-flags: --crate-type=dylib -Cprefer-dynamic //@ aux-build: decl_with_default.rs #![crate_type = "rlib"] #![feature(extern_item_impls)] diff --git a/tests/ui/eii/static/cross_crate_def.run.stdout b/tests/ui/eii/static/cross_crate_def.dylib.run.stdout similarity index 100% rename from tests/ui/eii/static/cross_crate_def.run.stdout rename to tests/ui/eii/static/cross_crate_def.dylib.run.stdout diff --git a/tests/ui/eii/static/cross_crate_def.rlib.run.stdout b/tests/ui/eii/static/cross_crate_def.rlib.run.stdout new file mode 100644 index 0000000000000..fd3c81a4d7631 --- /dev/null +++ b/tests/ui/eii/static/cross_crate_def.rlib.run.stdout @@ -0,0 +1,2 @@ +5 +5 diff --git a/tests/ui/eii/static/cross_crate_def.rs b/tests/ui/eii/static/cross_crate_def.rs index ad8bbcd0fb963..19dbdaadeef05 100644 --- a/tests/ui/eii/static/cross_crate_def.rs +++ b/tests/ui/eii/static/cross_crate_def.rs @@ -1,3 +1,5 @@ +//@ revisions: rlib dylib +//@[dylib] needs-crate-type: dylib //@ run-pass //@ check-run-results //@ aux-build: cross_crate_def.rs diff --git a/tests/ui/eii/static/default_cross_crate.run.stdout b/tests/ui/eii/static/default_cross_crate.dylib.run.stdout similarity index 100% rename from tests/ui/eii/static/default_cross_crate.run.stdout rename to tests/ui/eii/static/default_cross_crate.dylib.run.stdout diff --git a/tests/ui/eii/static/default_cross_crate.rlib.run.stdout b/tests/ui/eii/static/default_cross_crate.rlib.run.stdout new file mode 100644 index 0000000000000..7ed6ff82de6bc --- /dev/null +++ b/tests/ui/eii/static/default_cross_crate.rlib.run.stdout @@ -0,0 +1 @@ +5 diff --git a/tests/ui/eii/static/default_cross_crate.rs b/tests/ui/eii/static/default_cross_crate.rs index 7a2e5ae3925ad..9d6df257ffbef 100644 --- a/tests/ui/eii/static/default_cross_crate.rs +++ b/tests/ui/eii/static/default_cross_crate.rs @@ -1,3 +1,5 @@ +//@ revisions: rlib dylib +//@[dylib] needs-crate-type: dylib //@ aux-build: decl_with_default.rs //@ run-pass //@ check-run-results diff --git a/tests/ui/eii/static/default_cross_crate_explicit.run.stdout b/tests/ui/eii/static/default_cross_crate_explicit.dylib-impl.run.stdout similarity index 100% rename from tests/ui/eii/static/default_cross_crate_explicit.run.stdout rename to tests/ui/eii/static/default_cross_crate_explicit.dylib-impl.run.stdout diff --git a/tests/ui/eii/static/default_cross_crate_explicit.rlib.run.stdout b/tests/ui/eii/static/default_cross_crate_explicit.rlib.run.stdout new file mode 100644 index 0000000000000..f599e28b8ab0d --- /dev/null +++ b/tests/ui/eii/static/default_cross_crate_explicit.rlib.run.stdout @@ -0,0 +1 @@ +10 diff --git a/tests/ui/eii/static/default_cross_crate_explicit.rs b/tests/ui/eii/static/default_cross_crate_explicit.rs index 183342930ad8c..6ad015b9b601b 100644 --- a/tests/ui/eii/static/default_cross_crate_explicit.rs +++ b/tests/ui/eii/static/default_cross_crate_explicit.rs @@ -1,3 +1,5 @@ +//@ revisions: rlib dylib-impl +//@[dylib-impl] needs-crate-type: dylib //@ aux-build: decl_with_default.rs //@ aux-build: impl_default_override.rs //@ run-pass diff --git a/tests/ui/eii/track_caller.rs b/tests/ui/eii/track_caller.rs index 62f48467839af..5e298fba9675a 100644 --- a/tests/ui/eii/track_caller.rs +++ b/tests/ui/eii/track_caller.rs @@ -1,6 +1,7 @@ //@ run-pass //@ ignore-backends: gcc -//@ ignore-windows +// FIXME(#125418): linking on Windows GNU targets is not yet supported. +//@ ignore-windows-gnu // Tests that `#[track_caller]` on an EII declaration is threaded through both // the default impl (no override) and an explicit override (which does not // repeat `#[track_caller]` — it is derived during codegen so the shim ABI matches). diff --git a/tests/ui/imports/remove-unused-private-import-errors.remove.stderr b/tests/ui/imports/remove-unused-private-import-errors.remove.stderr new file mode 100644 index 0000000000000..b5c11af17c1bb --- /dev/null +++ b/tests/ui/imports/remove-unused-private-import-errors.remove.stderr @@ -0,0 +1,9 @@ +error[E0433]: cannot find module `Ident` in this scope + --> $DIR/remove-unused-private-import-errors.rs:16:5 + | +LL | Ident::x(); + | ^^^^^ `Ident` is a variant, not a module + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0433`. diff --git a/tests/ui/imports/remove-unused-private-import-errors.rs b/tests/ui/imports/remove-unused-private-import-errors.rs new file mode 100644 index 0000000000000..a51305327d7fa --- /dev/null +++ b/tests/ui/imports/remove-unused-private-import-errors.rs @@ -0,0 +1,40 @@ +//! Removing a private import that triggers `hidden_glob_reexports` can +//! break upstream code! +//! +//! Also see + +//@revisions: keep remove +//@[keep]check-pass + +#![crate_type = "lib"] + +use rustc_span::Ident; + +pub fn foo() { + use rustc_ast::*; // Must be inside the function scope + let _ /* fn(_,_) -> _*/ = Ident; + Ident::x(); + //[remove]~^ ERROR cannot find module `Ident` in this scope +} + +pub mod rustc_ast { + pub use self::TokenKind::*; + + #[cfg(keep)] // Compile error if false + #[expect(hidden_glob_reexports, unused_imports)] + use super::rustc_span::Ident; + + pub enum TokenKind { + Ident(u8, u8), + } +} + +pub mod rustc_span { + pub struct Ident {} + + impl Ident { + pub fn x() -> bool { + true + } + } +} diff --git a/tests/ui/liveness/unused-assignments-match-guard-issue-80954.rs b/tests/ui/liveness/unused-assignments-match-guard-issue-80954.rs new file mode 100644 index 0000000000000..0093eacc31f14 --- /dev/null +++ b/tests/ui/liveness/unused-assignments-match-guard-issue-80954.rs @@ -0,0 +1,24 @@ +// Regression test for https://github.com/rust-lang/rust/issues/80954 +// Rustc diagnostics should recognize that +// the assignment to 'x' and 'n' are being used +//@ check-pass + +fn main() { + let mut x = 0; + match () { + () if { + x = 42; + false + } => {} + _ => { + println!("{}", x); + } + } + + let mut n = 0; + match 0 { + | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ if + { println!("{}", n); n += 1; false } => {} + _ => {} + } +} diff --git a/tests/ui/static/static-mut-not-constant.rs b/tests/ui/static/static-mut-not-constant.rs index 3830b46828707..48129c09c8dc2 100644 --- a/tests/ui/static/static-mut-not-constant.rs +++ b/tests/ui/static/static-mut-not-constant.rs @@ -1,4 +1,10 @@ -static mut a: Box = Box::new(3); +struct Foo {} + +impl Foo { + fn new(_a: usize) -> Self { Foo{} } +} + +static mut a: Foo = Foo::new(3); //~^ ERROR cannot call non-const associated function fn main() {} diff --git a/tests/ui/static/static-mut-not-constant.stderr b/tests/ui/static/static-mut-not-constant.stderr index f28ea0b1689ab..c96eab038c778 100644 --- a/tests/ui/static/static-mut-not-constant.stderr +++ b/tests/ui/static/static-mut-not-constant.stderr @@ -1,8 +1,8 @@ -error[E0015]: cannot call non-const associated function `Box::::new` in statics - --> $DIR/static-mut-not-constant.rs:1:28 +error[E0015]: cannot call non-const associated function `Foo::new` in statics + --> $DIR/static-mut-not-constant.rs:7:21 | -LL | static mut a: Box = Box::new(3); - | ^^^^^^^^^^^ +LL | static mut a: Foo = Foo::new(3); + | ^^^^^^^^^^^ | = note: calls in statics are limited to constant functions, tuple structs and tuple variants = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)` diff --git a/tests/ui/supertrait-shadowing/assoc-type-clauses.rs b/tests/ui/supertrait-shadowing/assoc-type-clauses.rs index ebd9bc15ef282..e4092f53d8ac8 100644 --- a/tests/ui/supertrait-shadowing/assoc-type-clauses.rs +++ b/tests/ui/supertrait-shadowing/assoc-type-clauses.rs @@ -24,22 +24,22 @@ impl C for T {} #[rustc_dump_clauses] fn a_bound>() {} //~^ ERROR rustc_dump_clauses -//~| NOTE TraitPredicate( -//~| NOTE TraitPredicate( +//~| NOTE TraitClause( +//~| NOTE TraitClause( //~| NOTE A::Assoc #[rustc_dump_clauses] fn b_bound>() {} //~^ ERROR rustc_dump_clauses -//~| NOTE TraitPredicate( -//~| NOTE TraitPredicate( +//~| NOTE TraitClause( +//~| NOTE TraitClause( //~| NOTE B::Assoc #[rustc_dump_clauses] fn c_bound>() {} //~^ ERROR rustc_dump_clauses -//~| NOTE TraitPredicate( -//~| NOTE TraitPredicate( +//~| NOTE TraitClause( +//~| NOTE TraitClause( //~| NOTE B::Assoc fn main() {} diff --git a/tests/ui/supertrait-shadowing/assoc-type-clauses.stderr b/tests/ui/supertrait-shadowing/assoc-type-clauses.stderr index 3a42da43f3ba1..50649b1c1fe3b 100644 --- a/tests/ui/supertrait-shadowing/assoc-type-clauses.stderr +++ b/tests/ui/supertrait-shadowing/assoc-type-clauses.stderr @@ -4,9 +4,9 @@ error: rustc_dump_clauses LL | fn a_bound>() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] } - = note: Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] } - = note: Binder { value: ProjectionPredicate(Alias { kind: ProjectionTy { def_id: DefId(0:4 ~ assoc_type_clauses[HASH]::A::Assoc) }, args: [T/#0], .. }, Term::Ty(i8)), bound_vars: [] } + = note: Binder { value: TraitClause(, polarity:Positive), bound_vars: [] } + = note: Binder { value: TraitClause(, polarity:Positive), bound_vars: [] } + = note: Binder { value: ProjectionClause(Alias { kind: ProjectionTy { def_id: DefId(0:4 ~ assoc_type_clauses[HASH]::A::Assoc) }, args: [T/#0], .. }, Term::Ty(i8)), bound_vars: [] } error: rustc_dump_clauses --> $DIR/assoc-type-clauses.rs:32:1 @@ -14,9 +14,9 @@ error: rustc_dump_clauses LL | fn b_bound>() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] } - = note: Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] } - = note: Binder { value: ProjectionPredicate(Alias { kind: ProjectionTy { def_id: DefId(0:9 ~ assoc_type_clauses[HASH]::B::Assoc) }, args: [T/#0], .. }, Term::Ty(i16)), bound_vars: [] } + = note: Binder { value: TraitClause(, polarity:Positive), bound_vars: [] } + = note: Binder { value: TraitClause(, polarity:Positive), bound_vars: [] } + = note: Binder { value: ProjectionClause(Alias { kind: ProjectionTy { def_id: DefId(0:9 ~ assoc_type_clauses[HASH]::B::Assoc) }, args: [T/#0], .. }, Term::Ty(i16)), bound_vars: [] } error: rustc_dump_clauses --> $DIR/assoc-type-clauses.rs:39:1 @@ -24,9 +24,9 @@ error: rustc_dump_clauses LL | fn c_bound>() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] } - = note: Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] } - = note: Binder { value: ProjectionPredicate(Alias { kind: ProjectionTy { def_id: DefId(0:9 ~ assoc_type_clauses[HASH]::B::Assoc) }, args: [T/#0], .. }, Term::Ty(i16)), bound_vars: [] } + = note: Binder { value: TraitClause(, polarity:Positive), bound_vars: [] } + = note: Binder { value: TraitClause(, polarity:Positive), bound_vars: [] } + = note: Binder { value: ProjectionClause(Alias { kind: ProjectionTy { def_id: DefId(0:9 ~ assoc_type_clauses[HASH]::B::Assoc) }, args: [T/#0], .. }, Term::Ty(i16)), bound_vars: [] } error: aborting due to 3 previous errors diff --git a/tests/ui/traits/cache-reached-depth-ice.rs b/tests/ui/traits/cache-reached-depth-ice.rs index bc62adf4842d3..921e557bba4af 100644 --- a/tests/ui/traits/cache-reached-depth-ice.rs +++ b/tests/ui/traits/cache-reached-depth-ice.rs @@ -42,5 +42,5 @@ fn test() {} fn main() { test::(); - //~^ ERROR evaluate(Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) + //~^ ERROR evaluate(Binder { value: TraitClause(, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) } diff --git a/tests/ui/traits/cache-reached-depth-ice.stderr b/tests/ui/traits/cache-reached-depth-ice.stderr index fd76dc92dfbd7..5cff962008e04 100644 --- a/tests/ui/traits/cache-reached-depth-ice.stderr +++ b/tests/ui/traits/cache-reached-depth-ice.stderr @@ -1,4 +1,4 @@ -error: evaluate(Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) +error: evaluate(Binder { value: TraitClause(, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) --> $DIR/cache-reached-depth-ice.rs:44:5 | LL | fn test() {} diff --git a/tests/ui/traits/issue-83538-tainted-cache-after-cycle.rs b/tests/ui/traits/issue-83538-tainted-cache-after-cycle.rs index 5136aef4f7aa7..5cb3e255580e3 100644 --- a/tests/ui/traits/issue-83538-tainted-cache-after-cycle.rs +++ b/tests/ui/traits/issue-83538-tainted-cache-after-cycle.rs @@ -57,10 +57,10 @@ fn main() { // Key is that Vec is "ok" and Third<'_, Ty> is "ok modulo regions": forward(); - //~^ ERROR evaluate(Binder { value: TraitPredicate( as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) - //~| ERROR evaluate(Binder { value: TraitPredicate( as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions) + //~^ ERROR evaluate(Binder { value: TraitClause( as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) + //~| ERROR evaluate(Binder { value: TraitClause( as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions) reverse(); - //~^ ERROR evaluate(Binder { value: TraitPredicate( as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) - //~| ERROR evaluate(Binder { value: TraitPredicate( as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions) + //~^ ERROR evaluate(Binder { value: TraitClause( as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) + //~| ERROR evaluate(Binder { value: TraitClause( as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions) } diff --git a/tests/ui/traits/issue-83538-tainted-cache-after-cycle.stderr b/tests/ui/traits/issue-83538-tainted-cache-after-cycle.stderr index 96baec76a17ec..f61d09a3fb737 100644 --- a/tests/ui/traits/issue-83538-tainted-cache-after-cycle.stderr +++ b/tests/ui/traits/issue-83538-tainted-cache-after-cycle.stderr @@ -1,4 +1,4 @@ -error: evaluate(Binder { value: TraitPredicate( as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) +error: evaluate(Binder { value: TraitClause( as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) --> $DIR/issue-83538-tainted-cache-after-cycle.rs:59:5 | LL | Vec: Unpin, @@ -7,7 +7,7 @@ LL | Vec: Unpin, LL | forward(); | ^^^^^^^ -error: evaluate(Binder { value: TraitPredicate( as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions) +error: evaluate(Binder { value: TraitClause( as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions) --> $DIR/issue-83538-tainted-cache-after-cycle.rs:59:5 | LL | Third<'a, Ty>: Unpin, @@ -16,7 +16,7 @@ LL | Third<'a, Ty>: Unpin, LL | forward(); | ^^^^^^^ -error: evaluate(Binder { value: TraitPredicate( as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions) +error: evaluate(Binder { value: TraitClause( as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions) --> $DIR/issue-83538-tainted-cache-after-cycle.rs:63:5 | LL | Third<'a, Ty>: Unpin, @@ -25,7 +25,7 @@ LL | Third<'a, Ty>: Unpin, LL | reverse(); | ^^^^^^^ -error: evaluate(Binder { value: TraitPredicate( as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) +error: evaluate(Binder { value: TraitClause( as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) --> $DIR/issue-83538-tainted-cache-after-cycle.rs:63:5 | LL | Vec: Unpin, diff --git a/tests/ui/traits/issue-85360-eval-obligation-ice.rs b/tests/ui/traits/issue-85360-eval-obligation-ice.rs index f7c49049e2d33..fd77c729a248c 100644 --- a/tests/ui/traits/issue-85360-eval-obligation-ice.rs +++ b/tests/ui/traits/issue-85360-eval-obligation-ice.rs @@ -7,10 +7,10 @@ use core::marker::PhantomData; fn main() { test::>>(make()); - //~^ ERROR evaluate(Binder { value: TraitPredicate(> as std::marker::Sized>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) + //~^ ERROR evaluate(Binder { value: TraitClause(> as std::marker::Sized>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) test::>>(make()); - //~^ ERROR evaluate(Binder { value: TraitPredicate(> as std::marker::Sized>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions) + //~^ ERROR evaluate(Binder { value: TraitClause(> as std::marker::Sized>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions) } #[rustc_evaluate_where_clauses] diff --git a/tests/ui/traits/issue-85360-eval-obligation-ice.stderr b/tests/ui/traits/issue-85360-eval-obligation-ice.stderr index d2b00a45a4f15..d7861984411de 100644 --- a/tests/ui/traits/issue-85360-eval-obligation-ice.stderr +++ b/tests/ui/traits/issue-85360-eval-obligation-ice.stderr @@ -1,4 +1,4 @@ -error: evaluate(Binder { value: TraitPredicate(> as std::marker::Sized>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) +error: evaluate(Binder { value: TraitClause(> as std::marker::Sized>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) --> $DIR/issue-85360-eval-obligation-ice.rs:9:5 | LL | test::>>(make()); @@ -7,7 +7,7 @@ LL | test::>>(make()); LL | fn test(_: T) {} | ----- predicate -error: evaluate(Binder { value: TraitPredicate(> as std::marker::Sized>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions) +error: evaluate(Binder { value: TraitClause(> as std::marker::Sized>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions) --> $DIR/issue-85360-eval-obligation-ice.rs:12:5 | LL | test::>>(make()); diff --git a/tests/ui/traits/project-modulo-regions.rs b/tests/ui/traits/project-modulo-regions.rs index 3af5fbc7ea76d..42e188aba70db 100644 --- a/tests/ui/traits/project-modulo-regions.rs +++ b/tests/ui/traits/project-modulo-regions.rs @@ -48,8 +48,8 @@ fn test(val: MyStruct) where Helper: HelperTrait { fn foo(val: MyStruct) { test(val); - //[with_clause]~^ ERROR evaluate(Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions) - //[without_clause]~^^ ERROR evaluate(Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) + //[with_clause]~^ ERROR evaluate(Binder { value: TraitClause(, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions) + //[without_clause]~^^ ERROR evaluate(Binder { value: TraitClause(, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) } fn main() {} diff --git a/tests/ui/traits/project-modulo-regions.with_clause.stderr b/tests/ui/traits/project-modulo-regions.with_clause.stderr index 0e3081ddfdfeb..398116153bc3d 100644 --- a/tests/ui/traits/project-modulo-regions.with_clause.stderr +++ b/tests/ui/traits/project-modulo-regions.with_clause.stderr @@ -1,4 +1,4 @@ -error: evaluate(Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions) +error: evaluate(Binder { value: TraitClause(, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions) --> $DIR/project-modulo-regions.rs:50:5 | LL | fn test(val: MyStruct) where Helper: HelperTrait { diff --git a/tests/ui/traits/project-modulo-regions.without_clause.stderr b/tests/ui/traits/project-modulo-regions.without_clause.stderr index 830a07c4f5f79..283da7f136f8c 100644 --- a/tests/ui/traits/project-modulo-regions.without_clause.stderr +++ b/tests/ui/traits/project-modulo-regions.without_clause.stderr @@ -1,4 +1,4 @@ -error: evaluate(Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) +error: evaluate(Binder { value: TraitClause(, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) --> $DIR/project-modulo-regions.rs:50:5 | LL | fn test(val: MyStruct) where Helper: HelperTrait { diff --git a/tests/ui/type-alias-impl-trait/in-where-clause.stderr b/tests/ui/type-alias-impl-trait/in-where-clause.stderr index 122cfdcabadd5..97b63a8ad3e32 100644 --- a/tests/ui/type-alias-impl-trait/in-where-clause.stderr +++ b/tests/ui/type-alias-impl-trait/in-where-clause.stderr @@ -21,7 +21,7 @@ note: ...which requires computing revealed normalized predicates of `foo::{const | LL | [0; 1 + 2] | ^^^^^ - = note: ...which requires revealing opaque types in `[Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] }]`... + = note: ...which requires revealing opaque types in `[Binder { value: TraitClause(, polarity:Positive), bound_vars: [] }]`... note: ...which requires computing type of `Bar::{opaque#0}`... --> $DIR/in-where-clause.rs:5:12 | diff --git a/triagebot.toml b/triagebot.toml index a842b2a07c15f..6e8fbbad2651a 100644 --- a/triagebot.toml +++ b/triagebot.toml @@ -97,6 +97,13 @@ Thanks! <3 """ label = "O-ARM" +[ping.arm-maintainers] +message = """\ +Dear ARM Maintainers, your feedback has been requested on this issue/PR. +Thanks! <3 +""" +label = "O-ARM" + [ping.loongarch] message = """\ Hey LoongArch Group! This issue has been identified as a good "LoongArch candidate". @@ -1807,7 +1814,7 @@ dep-bumps = [ # ------------------------------------------------------------------------------ [no-merges] -exclude_titles = ["Rollup of", "subtree update", "Subtree update"] +exclude_titles = ["Rollup of", "subtree update", "Subtree update", "subtree sync", "Subtree sync"] labels = ["has-merge-commits", "S-waiting-on-author"] [github-releases]