From 67c61cefaf87cb842b2248935dcc481faad21b14 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 23 Oct 2025 09:39:13 +0000 Subject: [PATCH 001/265] Remove opts field from CodegenContext --- src/back/lto.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/back/lto.rs b/src/back/lto.rs index 404064fb7a06..08c36d2b7318 100644 --- a/src/back/lto.rs +++ b/src/back/lto.rs @@ -290,7 +290,7 @@ pub(crate) fn run_thin( let dcx = cgcx.create_dcx(); let dcx = dcx.handle(); let lto_data = prepare_lto(cgcx, each_linked_rlib_for_lto, dcx); - if cgcx.opts.cg.linker_plugin_lto.enabled() { + if cgcx.use_linker_plugin_lto { unreachable!( "We should never reach this case if the LTO step \ is deferred to the linker" From 385590e9dc85761402f278c61fd081c24c184cb6 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Fri, 21 Nov 2025 15:08:09 +0000 Subject: [PATCH 002/265] Remove SharedEmitter from CodegenContext --- src/back/lto.rs | 12 +++++------- src/back/write.rs | 8 ++++++-- src/lib.rs | 14 +++++++++----- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src/back/lto.rs b/src/back/lto.rs index 08c36d2b7318..24be3ee4c34d 100644 --- a/src/back/lto.rs +++ b/src/back/lto.rs @@ -26,11 +26,11 @@ use std::sync::atomic::Ordering; use gccjit::{Context, OutputKind}; use object::read::archive::ArchiveFile; use rustc_codegen_ssa::back::lto::{SerializedModule, ThinModule, ThinShared}; -use rustc_codegen_ssa::back::write::{CodegenContext, FatLtoInput}; +use rustc_codegen_ssa::back::write::{CodegenContext, FatLtoInput, SharedEmitter}; use rustc_codegen_ssa::traits::*; use rustc_codegen_ssa::{ModuleCodegen, ModuleKind, looks_like_rust_object_file}; use rustc_data_structures::memmap::Mmap; -use rustc_errors::DiagCtxtHandle; +use rustc_errors::{DiagCtxt, DiagCtxtHandle}; use rustc_log::tracing::info; use rustc_middle::bug; use rustc_middle::dep_graph::WorkProduct; @@ -112,10 +112,11 @@ fn save_as_file(obj: &[u8], path: &Path) -> Result<(), LtoBitcodeFromRlib> { /// for further optimization. pub(crate) fn run_fat( cgcx: &CodegenContext, + shared_emitter: &SharedEmitter, each_linked_rlib_for_lto: &[PathBuf], modules: Vec>, ) -> ModuleCodegen { - let dcx = cgcx.create_dcx(); + let dcx = DiagCtxt::new(Box::new(shared_emitter.clone())); let dcx = dcx.handle(); let lto_data = prepare_lto(cgcx, each_linked_rlib_for_lto, dcx); /*let symbols_below_threshold = @@ -283,12 +284,11 @@ impl ModuleBufferMethods for ModuleBuffer { /// can simply be copied over from the incr. comp. cache. pub(crate) fn run_thin( cgcx: &CodegenContext, + dcx: DiagCtxtHandle<'_>, each_linked_rlib_for_lto: &[PathBuf], modules: Vec<(String, ThinBuffer)>, cached_modules: Vec<(SerializedModule, WorkProduct)>, ) -> (Vec>, Vec) { - let dcx = cgcx.create_dcx(); - let dcx = dcx.handle(); let lto_data = prepare_lto(cgcx, each_linked_rlib_for_lto, dcx); if cgcx.use_linker_plugin_lto { unreachable!( @@ -522,8 +522,6 @@ pub fn optimize_thin_module( thin_module: ThinModule, _cgcx: &CodegenContext, ) -> ModuleCodegen { - //let dcx = cgcx.create_dcx(); - //let module_name = &thin_module.shared.module_names[thin_module.idx]; /*let tm_factory_config = TargetMachineFactoryConfig::new(cgcx, module_name.to_str().unwrap()); let tm = (cgcx.tm_factory)(tm_factory_config).map_err(|e| write::llvm_err(&dcx, e))?;*/ diff --git a/src/back/write.rs b/src/back/write.rs index eae0f2aa00f6..b6223c5be370 100644 --- a/src/back/write.rs +++ b/src/back/write.rs @@ -2,8 +2,11 @@ use std::{env, fs}; use gccjit::{Context, OutputKind}; use rustc_codegen_ssa::back::link::ensure_removed; -use rustc_codegen_ssa::back::write::{BitcodeSection, CodegenContext, EmitObj, ModuleConfig}; +use rustc_codegen_ssa::back::write::{ + BitcodeSection, CodegenContext, EmitObj, ModuleConfig, SharedEmitter, +}; use rustc_codegen_ssa::{CompiledModule, ModuleCodegen}; +use rustc_errors::DiagCtxt; use rustc_fs_util::link_or_copy; use rustc_log::tracing::debug; use rustc_session::config::OutputType; @@ -15,10 +18,11 @@ use crate::{GccCodegenBackend, GccContext, LtoMode}; pub(crate) fn codegen( cgcx: &CodegenContext, + shared_emitter: &SharedEmitter, module: ModuleCodegen, config: &ModuleConfig, ) -> CompiledModule { - let dcx = cgcx.create_dcx(); + let dcx = DiagCtxt::new(Box::new(shared_emitter.clone())); let dcx = dcx.handle(); let _timer = cgcx.prof.generic_activity_with_arg("GCC_module_codegen", &*module.name); diff --git a/src/lib.rs b/src/lib.rs index 409b7886740a..5a2ec0a2fc68 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -82,7 +82,7 @@ use gccjit::{TargetInfo, Version}; use rustc_ast::expand::allocator::AllocatorMethod; use rustc_codegen_ssa::back::lto::{SerializedModule, ThinModule}; use rustc_codegen_ssa::back::write::{ - CodegenContext, FatLtoInput, ModuleConfig, TargetMachineFactoryFn, + CodegenContext, FatLtoInput, ModuleConfig, SharedEmitter, TargetMachineFactoryFn, }; use rustc_codegen_ssa::base::codegen_crate; use rustc_codegen_ssa::target_features::cfg_target_feature; @@ -371,23 +371,25 @@ impl WriteBackendMethods for GccCodegenBackend { fn run_and_optimize_fat_lto( cgcx: &CodegenContext, + shared_emitter: &SharedEmitter, // FIXME(bjorn3): Limit LTO exports to these symbols _exported_symbols_for_lto: &[String], each_linked_rlib_for_lto: &[PathBuf], modules: Vec>, ) -> ModuleCodegen { - back::lto::run_fat(cgcx, each_linked_rlib_for_lto, modules) + back::lto::run_fat(cgcx, shared_emitter, each_linked_rlib_for_lto, modules) } fn run_thin_lto( cgcx: &CodegenContext, + dcx: DiagCtxtHandle<'_>, // FIXME(bjorn3): Limit LTO exports to these symbols _exported_symbols_for_lto: &[String], each_linked_rlib_for_lto: &[PathBuf], modules: Vec<(String, Self::ThinBuffer)>, cached_modules: Vec<(SerializedModule, WorkProduct)>, ) -> (Vec>, Vec) { - back::lto::run_thin(cgcx, each_linked_rlib_for_lto, modules, cached_modules) + back::lto::run_thin(cgcx, dcx, each_linked_rlib_for_lto, modules, cached_modules) } fn print_pass_timings(&self) { @@ -400,7 +402,7 @@ impl WriteBackendMethods for GccCodegenBackend { fn optimize( _cgcx: &CodegenContext, - _dcx: DiagCtxtHandle<'_>, + _shared_emitter: &SharedEmitter, module: &mut ModuleCodegen, config: &ModuleConfig, ) { @@ -409,6 +411,7 @@ impl WriteBackendMethods for GccCodegenBackend { fn optimize_thin( cgcx: &CodegenContext, + _shared_emitter: &SharedEmitter, thin: ThinModule, ) -> ModuleCodegen { back::lto::optimize_thin_module(thin, cgcx) @@ -416,10 +419,11 @@ impl WriteBackendMethods for GccCodegenBackend { fn codegen( cgcx: &CodegenContext, + shared_emitter: &SharedEmitter, module: ModuleCodegen, config: &ModuleConfig, ) -> CompiledModule { - back::write::codegen(cgcx, module, config) + back::write::codegen(cgcx, shared_emitter, module, config) } fn prepare_thin(module: ModuleCodegen) -> (String, Self::ThinBuffer) { From 9e638455220c0c67393cfb1ed14cc3f0c23bf8f0 Mon Sep 17 00:00:00 2001 From: Shoyu Vanilla Date: Fri, 12 Dec 2025 18:26:16 +0900 Subject: [PATCH 003/265] `-Znext-solver` Remove the forced ambiguity hack from search graph --- .../rustc_type_ir/src/search_graph/mod.rs | 31 ++----------- .../global-where-bound-normalization.rs | 45 +++++++++++++++++++ 2 files changed, 48 insertions(+), 28 deletions(-) create mode 100644 tests/ui/traits/next-solver/global-where-bound-normalization.rs diff --git a/compiler/rustc_type_ir/src/search_graph/mod.rs b/compiler/rustc_type_ir/src/search_graph/mod.rs index 8e6376b22ce6..7c58cd7303eb 100644 --- a/compiler/rustc_type_ir/src/search_graph/mod.rs +++ b/compiler/rustc_type_ir/src/search_graph/mod.rs @@ -916,10 +916,9 @@ impl, X: Cx> SearchGraph { /// heads from the stack. This may not necessarily mean that we've actually /// reached a fixpoint for that cycle head, which impacts the way we rebase /// provisional cache entries. -#[derive_where(Debug; X: Cx)] -enum RebaseReason { +#[derive(Debug)] +enum RebaseReason { NoCycleUsages, - Ambiguity(X::AmbiguityInfo), Overflow, /// We've actually reached a fixpoint. /// @@ -956,7 +955,7 @@ impl, X: Cx> SearchGraph { &mut self, cx: X, stack_entry: &StackEntry, - rebase_reason: RebaseReason, + rebase_reason: RebaseReason, ) { let popped_head_index = self.stack.next_index(); #[allow(rustc::potential_query_instability)] @@ -1035,9 +1034,6 @@ impl, X: Cx> SearchGraph { // is not actually equal to the final provisional result. We // need to discard the provisional cache entry in this case. RebaseReason::NoCycleUsages => return false, - RebaseReason::Ambiguity(info) => { - *result = D::propagate_ambiguity(cx, input, info); - } RebaseReason::Overflow => *result = D::fixpoint_overflow_result(cx, input), RebaseReason::ReachedFixpoint(None) => {} RebaseReason::ReachedFixpoint(Some(path_kind)) => { @@ -1352,27 +1348,6 @@ impl, X: Cx> SearchGraph { return EvaluationResult::finalize(stack_entry, encountered_overflow, result); } - // If computing this goal results in ambiguity with no constraints, - // we do not rerun it. It's incredibly difficult to get a different - // response in the next iteration in this case. These changes would - // likely either be caused by incompleteness or can change the maybe - // cause from ambiguity to overflow. Returning ambiguity always - // preserves soundness and completeness even if the goal is be known - // to succeed or fail. - // - // This prevents exponential blowup affecting multiple major crates. - // As we only get to this branch if we haven't yet reached a fixpoint, - // we also taint all provisional cache entries which depend on the - // current goal. - if let Some(info) = D::is_ambiguous_result(result) { - self.rebase_provisional_cache_entries( - cx, - &stack_entry, - RebaseReason::Ambiguity(info), - ); - return EvaluationResult::finalize(stack_entry, encountered_overflow, result); - }; - // If we've reached the fixpoint step limit, we bail with overflow and taint all // provisional cache entries which depend on the current goal. i += 1; diff --git a/tests/ui/traits/next-solver/global-where-bound-normalization.rs b/tests/ui/traits/next-solver/global-where-bound-normalization.rs new file mode 100644 index 000000000000..e57fbf378a0d --- /dev/null +++ b/tests/ui/traits/next-solver/global-where-bound-normalization.rs @@ -0,0 +1,45 @@ +//@ check-pass +//@ compile-flags: -Znext-solver + +// Regression test for https://github.com/rust-lang/trait-system-refactor-initiative/issues/257. + +#![feature(rustc_attrs)] +#![expect(internal_features)] +#![rustc_no_implicit_bounds] + +pub trait Bound {} +impl Bound for u8 {} + +pub trait Proj { + type Assoc; +} +impl Proj for U { + type Assoc = U; +} +impl Proj for MyField { + type Assoc = u8; +} + +// While wf-checking the global bounds of `fn foo`, elaborating this outlives predicate triggered a +// cycle in the search graph along a particular probe path, which was not an actual solution. +// That cycle then resulted in a forced false-positive ambiguity due to a performance hack in the +// search graph and then ended up floundering the root goal evaluation. +pub trait Field: Proj {} + +struct MyField; +impl Field for MyField {} + +trait IdReqField { + type This; +} +impl IdReqField for F { + type This = F; +} + +fn foo() +where + ::This: Field, +{ +} + +fn main() {} From bf5283cf6fe637fba494f81793be5a40acf93e1f Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sun, 21 Dec 2025 00:13:38 +0100 Subject: [PATCH 004/265] Merge commit '02f889aec5dc9b4e51d4cfd86c67ce5e4a0bbf72' --- build_system/src/build.rs | 12 +++- rust-toolchain | 2 +- src/intrinsic/archs.rs | 123 +++++++++++++++++++++++++++++-------- tests/failing-ui-tests.txt | 9 +++ triagebot.toml | 3 - 5 files changed, 118 insertions(+), 31 deletions(-) diff --git a/build_system/src/build.rs b/build_system/src/build.rs index 27476465d740..9b7ee8380ca5 100644 --- a/build_system/src/build.rs +++ b/build_system/src/build.rs @@ -111,14 +111,20 @@ pub fn build_sysroot(env: &HashMap, config: &ConfigInfo) -> Resu // Symlink libgccjit.so to sysroot. let lib_path = start_dir.join("sysroot").join("lib"); + let rustlib_target_path = lib_path + .join("rustlib") + .join(&config.host_triple) + .join("codegen-backends") + .join("lib") + .join(&config.target_triple); let libgccjit_path = PathBuf::from(config.gcc_path.as_ref().expect("libgccjit should be set by this point")) .join("libgccjit.so"); - let libgccjit_in_sysroot_path = lib_path.join("libgccjit.so"); + let libgccjit_in_sysroot_path = rustlib_target_path.join("libgccjit.so"); // First remove the file to be able to create the symlink even when the file already exists. let _ = fs::remove_file(&libgccjit_in_sysroot_path); - create_dir(&lib_path)?; - symlink(libgccjit_path, libgccjit_in_sysroot_path) + create_dir(&rustlib_target_path)?; + symlink(libgccjit_path, &libgccjit_in_sysroot_path) .map_err(|error| format!("Cannot create symlink for libgccjit.so: {}", error))?; let library_dir = start_dir.join("sysroot_src").join("library"); diff --git a/rust-toolchain b/rust-toolchain index f9645451e964..86ae738d4483 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2025-11-24" +channel = "nightly-2025-12-20" components = ["rust-src", "rustc-dev", "llvm-tools-preview"] diff --git a/src/intrinsic/archs.rs b/src/intrinsic/archs.rs index bb8bcbf66f38..43e7c352c34a 100644 --- a/src/intrinsic/archs.rs +++ b/src/intrinsic/archs.rs @@ -70,10 +70,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "sve.sm4e" => "__builtin_sve_svsm4e_u32", "sve.sm4ekey" => "__builtin_sve_svsm4ekey_u32", "sve.wrffr" => "__builtin_sve_svwrffr", - "tcancel" => "__builtin_arm_tcancel", - "tcommit" => "__builtin_arm_tcommit", - "tstart" => "__builtin_arm_tstart", - "ttest" => "__builtin_arm_ttest", _ => unimplemented!("***** unsupported LLVM intrinsic {full_name}"), } } @@ -1632,6 +1628,14 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "V6.vabs.f8.128B" => "__builtin_HEXAGON_V6_vabs_f8_128B", "V6.vabs.hf" => "__builtin_HEXAGON_V6_vabs_hf", "V6.vabs.hf.128B" => "__builtin_HEXAGON_V6_vabs_hf_128B", + "V6.vabs.qf16.hf" => "__builtin_HEXAGON_V6_vabs_qf16_hf", + "V6.vabs.qf16.hf.128B" => "__builtin_HEXAGON_V6_vabs_qf16_hf_128B", + "V6.vabs.qf16.qf16" => "__builtin_HEXAGON_V6_vabs_qf16_qf16", + "V6.vabs.qf16.qf16.128B" => "__builtin_HEXAGON_V6_vabs_qf16_qf16_128B", + "V6.vabs.qf32.qf32" => "__builtin_HEXAGON_V6_vabs_qf32_qf32", + "V6.vabs.qf32.qf32.128B" => "__builtin_HEXAGON_V6_vabs_qf32_qf32_128B", + "V6.vabs.qf32.sf" => "__builtin_HEXAGON_V6_vabs_qf32_sf", + "V6.vabs.qf32.sf.128B" => "__builtin_HEXAGON_V6_vabs_qf32_sf_128B", "V6.vabs.sf" => "__builtin_HEXAGON_V6_vabs_sf", "V6.vabs.sf.128B" => "__builtin_HEXAGON_V6_vabs_sf_128B", "V6.vabsb" => "__builtin_HEXAGON_V6_vabsb", @@ -1744,6 +1748,8 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "V6.vaddwsat.128B" => "__builtin_HEXAGON_V6_vaddwsat_128B", "V6.vaddwsat.dv" => "__builtin_HEXAGON_V6_vaddwsat_dv", "V6.vaddwsat.dv.128B" => "__builtin_HEXAGON_V6_vaddwsat_dv_128B", + "V6.valign4" => "__builtin_HEXAGON_V6_valign4", + "V6.valign4.128B" => "__builtin_HEXAGON_V6_valign4_128B", "V6.valignb" => "__builtin_HEXAGON_V6_valignb", "V6.valignb.128B" => "__builtin_HEXAGON_V6_valignb_128B", "V6.valignbi" => "__builtin_HEXAGON_V6_valignbi", @@ -1862,14 +1868,30 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "V6.vcl0w.128B" => "__builtin_HEXAGON_V6_vcl0w_128B", "V6.vcombine" => "__builtin_HEXAGON_V6_vcombine", "V6.vcombine.128B" => "__builtin_HEXAGON_V6_vcombine_128B", + "V6.vconv.bf.qf32" => "__builtin_HEXAGON_V6_vconv_bf_qf32", + "V6.vconv.bf.qf32.128B" => "__builtin_HEXAGON_V6_vconv_bf_qf32_128B", + "V6.vconv.f8.qf16" => "__builtin_HEXAGON_V6_vconv_f8_qf16", + "V6.vconv.f8.qf16.128B" => "__builtin_HEXAGON_V6_vconv_f8_qf16_128B", "V6.vconv.h.hf" => "__builtin_HEXAGON_V6_vconv_h_hf", "V6.vconv.h.hf.128B" => "__builtin_HEXAGON_V6_vconv_h_hf_128B", + "V6.vconv.h.hf.rnd" => "__builtin_HEXAGON_V6_vconv_h_hf_rnd", + "V6.vconv.h.hf.rnd.128B" => "__builtin_HEXAGON_V6_vconv_h_hf_rnd_128B", "V6.vconv.hf.h" => "__builtin_HEXAGON_V6_vconv_hf_h", "V6.vconv.hf.h.128B" => "__builtin_HEXAGON_V6_vconv_hf_h_128B", "V6.vconv.hf.qf16" => "__builtin_HEXAGON_V6_vconv_hf_qf16", "V6.vconv.hf.qf16.128B" => "__builtin_HEXAGON_V6_vconv_hf_qf16_128B", "V6.vconv.hf.qf32" => "__builtin_HEXAGON_V6_vconv_hf_qf32", "V6.vconv.hf.qf32.128B" => "__builtin_HEXAGON_V6_vconv_hf_qf32_128B", + "V6.vconv.qf16.f8" => "__builtin_HEXAGON_V6_vconv_qf16_f8", + "V6.vconv.qf16.f8.128B" => "__builtin_HEXAGON_V6_vconv_qf16_f8_128B", + "V6.vconv.qf16.hf" => "__builtin_HEXAGON_V6_vconv_qf16_hf", + "V6.vconv.qf16.hf.128B" => "__builtin_HEXAGON_V6_vconv_qf16_hf_128B", + "V6.vconv.qf16.qf16" => "__builtin_HEXAGON_V6_vconv_qf16_qf16", + "V6.vconv.qf16.qf16.128B" => "__builtin_HEXAGON_V6_vconv_qf16_qf16_128B", + "V6.vconv.qf32.qf32" => "__builtin_HEXAGON_V6_vconv_qf32_qf32", + "V6.vconv.qf32.qf32.128B" => "__builtin_HEXAGON_V6_vconv_qf32_qf32_128B", + "V6.vconv.qf32.sf" => "__builtin_HEXAGON_V6_vconv_qf32_sf", + "V6.vconv.qf32.sf.128B" => "__builtin_HEXAGON_V6_vconv_qf32_sf_128B", "V6.vconv.sf.qf32" => "__builtin_HEXAGON_V6_vconv_sf_qf32", "V6.vconv.sf.qf32.128B" => "__builtin_HEXAGON_V6_vconv_sf_qf32_128B", "V6.vconv.sf.w" => "__builtin_HEXAGON_V6_vconv_sf_w", @@ -1984,6 +2006,22 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "V6.veqh.or.128B" => "__builtin_HEXAGON_V6_veqh_or_128B", "V6.veqh.xor" => "__builtin_HEXAGON_V6_veqh_xor", "V6.veqh.xor.128B" => "__builtin_HEXAGON_V6_veqh_xor_128B", + "V6.veqhf" => "__builtin_HEXAGON_V6_veqhf", + "V6.veqhf.128B" => "__builtin_HEXAGON_V6_veqhf_128B", + "V6.veqhf.and" => "__builtin_HEXAGON_V6_veqhf_and", + "V6.veqhf.and.128B" => "__builtin_HEXAGON_V6_veqhf_and_128B", + "V6.veqhf.or" => "__builtin_HEXAGON_V6_veqhf_or", + "V6.veqhf.or.128B" => "__builtin_HEXAGON_V6_veqhf_or_128B", + "V6.veqhf.xor" => "__builtin_HEXAGON_V6_veqhf_xor", + "V6.veqhf.xor.128B" => "__builtin_HEXAGON_V6_veqhf_xor_128B", + "V6.veqsf" => "__builtin_HEXAGON_V6_veqsf", + "V6.veqsf.128B" => "__builtin_HEXAGON_V6_veqsf_128B", + "V6.veqsf.and" => "__builtin_HEXAGON_V6_veqsf_and", + "V6.veqsf.and.128B" => "__builtin_HEXAGON_V6_veqsf_and_128B", + "V6.veqsf.or" => "__builtin_HEXAGON_V6_veqsf_or", + "V6.veqsf.or.128B" => "__builtin_HEXAGON_V6_veqsf_or_128B", + "V6.veqsf.xor" => "__builtin_HEXAGON_V6_veqsf_xor", + "V6.veqsf.xor.128B" => "__builtin_HEXAGON_V6_veqsf_xor_128B", "V6.veqw" => "__builtin_HEXAGON_V6_veqw", "V6.veqw.128B" => "__builtin_HEXAGON_V6_veqw_128B", "V6.veqw.and" => "__builtin_HEXAGON_V6_veqw_and", @@ -2096,6 +2134,14 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "V6.vgtw.or.128B" => "__builtin_HEXAGON_V6_vgtw_or_128B", "V6.vgtw.xor" => "__builtin_HEXAGON_V6_vgtw_xor", "V6.vgtw.xor.128B" => "__builtin_HEXAGON_V6_vgtw_xor_128B", + "V6.vilog2.hf" => "__builtin_HEXAGON_V6_vilog2_hf", + "V6.vilog2.hf.128B" => "__builtin_HEXAGON_V6_vilog2_hf_128B", + "V6.vilog2.qf16" => "__builtin_HEXAGON_V6_vilog2_qf16", + "V6.vilog2.qf16.128B" => "__builtin_HEXAGON_V6_vilog2_qf16_128B", + "V6.vilog2.qf32" => "__builtin_HEXAGON_V6_vilog2_qf32", + "V6.vilog2.qf32.128B" => "__builtin_HEXAGON_V6_vilog2_qf32_128B", + "V6.vilog2.sf" => "__builtin_HEXAGON_V6_vilog2_sf", + "V6.vilog2.sf.128B" => "__builtin_HEXAGON_V6_vilog2_sf_128B", "V6.vinsertwr" => "__builtin_HEXAGON_V6_vinsertwr", "V6.vinsertwr.128B" => "__builtin_HEXAGON_V6_vinsertwr_128B", "V6.vlalignb" => "__builtin_HEXAGON_V6_vlalignb", @@ -2350,6 +2396,14 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "V6.vnavgub.128B" => "__builtin_HEXAGON_V6_vnavgub_128B", "V6.vnavgw" => "__builtin_HEXAGON_V6_vnavgw", "V6.vnavgw.128B" => "__builtin_HEXAGON_V6_vnavgw_128B", + "V6.vneg.qf16.hf" => "__builtin_HEXAGON_V6_vneg_qf16_hf", + "V6.vneg.qf16.hf.128B" => "__builtin_HEXAGON_V6_vneg_qf16_hf_128B", + "V6.vneg.qf16.qf16" => "__builtin_HEXAGON_V6_vneg_qf16_qf16", + "V6.vneg.qf16.qf16.128B" => "__builtin_HEXAGON_V6_vneg_qf16_qf16_128B", + "V6.vneg.qf32.qf32" => "__builtin_HEXAGON_V6_vneg_qf32_qf32", + "V6.vneg.qf32.qf32.128B" => "__builtin_HEXAGON_V6_vneg_qf32_qf32_128B", + "V6.vneg.qf32.sf" => "__builtin_HEXAGON_V6_vneg_qf32_sf", + "V6.vneg.qf32.sf.128B" => "__builtin_HEXAGON_V6_vneg_qf32_sf_128B", "V6.vnormamth" => "__builtin_HEXAGON_V6_vnormamth", "V6.vnormamth.128B" => "__builtin_HEXAGON_V6_vnormamth_128B", "V6.vnormamtw" => "__builtin_HEXAGON_V6_vnormamtw", @@ -2684,6 +2738,24 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "iocsrwr.d" => "__builtin_loongarch_iocsrwr_d", "iocsrwr.h" => "__builtin_loongarch_iocsrwr_h", "iocsrwr.w" => "__builtin_loongarch_iocsrwr_w", + "lasx.cast.128" => "__builtin_lasx_cast_128", + "lasx.cast.128.d" => "__builtin_lasx_cast_128_d", + "lasx.cast.128.s" => "__builtin_lasx_cast_128_s", + "lasx.concat.128" => "__builtin_lasx_concat_128", + "lasx.concat.128.d" => "__builtin_lasx_concat_128_d", + "lasx.concat.128.s" => "__builtin_lasx_concat_128_s", + "lasx.extract.128.hi" => "__builtin_lasx_extract_128_hi", + "lasx.extract.128.hi.d" => "__builtin_lasx_extract_128_hi_d", + "lasx.extract.128.hi.s" => "__builtin_lasx_extract_128_hi_s", + "lasx.extract.128.lo" => "__builtin_lasx_extract_128_lo", + "lasx.extract.128.lo.d" => "__builtin_lasx_extract_128_lo_d", + "lasx.extract.128.lo.s" => "__builtin_lasx_extract_128_lo_s", + "lasx.insert.128.hi" => "__builtin_lasx_insert_128_hi", + "lasx.insert.128.hi.d" => "__builtin_lasx_insert_128_hi_d", + "lasx.insert.128.hi.s" => "__builtin_lasx_insert_128_hi_s", + "lasx.insert.128.lo" => "__builtin_lasx_insert_128_lo", + "lasx.insert.128.lo.d" => "__builtin_lasx_insert_128_lo_d", + "lasx.insert.128.lo.s" => "__builtin_lasx_insert_128_lo_s", "lasx.vext2xv.d.b" => "__builtin_lasx_vext2xv_d_b", "lasx.vext2xv.d.h" => "__builtin_lasx_vext2xv_d_h", "lasx.vext2xv.d.w" => "__builtin_lasx_vext2xv_d_w", @@ -4950,8 +5022,20 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "f16x2.to.e5m2x2.rn.relu" => "__nvvm_f16x2_to_e5m2x2_rn_relu", "f2bf16.rn" => "__nvvm_f2bf16_rn", "f2bf16.rn.relu" => "__nvvm_f2bf16_rn_relu", + "f2bf16.rn.relu.satfinite" => "__nvvm_f2bf16_rn_relu_satfinite", + "f2bf16.rn.satfinite" => "__nvvm_f2bf16_rn_satfinite", "f2bf16.rz" => "__nvvm_f2bf16_rz", "f2bf16.rz.relu" => "__nvvm_f2bf16_rz_relu", + "f2bf16.rz.relu.satfinite" => "__nvvm_f2bf16_rz_relu_satfinite", + "f2bf16.rz.satfinite" => "__nvvm_f2bf16_rz_satfinite", + "f2f16.rn" => "__nvvm_f2f16_rn", + "f2f16.rn.relu" => "__nvvm_f2f16_rn_relu", + "f2f16.rn.relu.satfinite" => "__nvvm_f2f16_rn_relu_satfinite", + "f2f16.rn.satfinite" => "__nvvm_f2f16_rn_satfinite", + "f2f16.rz" => "__nvvm_f2f16_rz", + "f2f16.rz.relu" => "__nvvm_f2f16_rz_relu", + "f2f16.rz.relu.satfinite" => "__nvvm_f2f16_rz_relu_satfinite", + "f2f16.rz.satfinite" => "__nvvm_f2f16_rz_satfinite", "f2h.rn" => "__nvvm_f2h_rn", "f2h.rn.ftz" => "__nvvm_f2h_rn_ftz", "f2i.rm" => "__nvvm_f2i_rm", @@ -5035,20 +5119,28 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "ff.to.ue8m0x2.rz.satfinite" => "__nvvm_ff_to_ue8m0x2_rz_satfinite", "ff2bf16x2.rn" => "__nvvm_ff2bf16x2_rn", "ff2bf16x2.rn.relu" => "__nvvm_ff2bf16x2_rn_relu", + "ff2bf16x2.rn.relu.satfinite" => "__nvvm_ff2bf16x2_rn_relu_satfinite", + "ff2bf16x2.rn.satfinite" => "__nvvm_ff2bf16x2_rn_satfinite", "ff2bf16x2.rs" => "__nvvm_ff2bf16x2_rs", "ff2bf16x2.rs.relu" => "__nvvm_ff2bf16x2_rs_relu", "ff2bf16x2.rs.relu.satfinite" => "__nvvm_ff2bf16x2_rs_relu_satfinite", "ff2bf16x2.rs.satfinite" => "__nvvm_ff2bf16x2_rs_satfinite", "ff2bf16x2.rz" => "__nvvm_ff2bf16x2_rz", "ff2bf16x2.rz.relu" => "__nvvm_ff2bf16x2_rz_relu", + "ff2bf16x2.rz.relu.satfinite" => "__nvvm_ff2bf16x2_rz_relu_satfinite", + "ff2bf16x2.rz.satfinite" => "__nvvm_ff2bf16x2_rz_satfinite", "ff2f16x2.rn" => "__nvvm_ff2f16x2_rn", "ff2f16x2.rn.relu" => "__nvvm_ff2f16x2_rn_relu", + "ff2f16x2.rn.relu.satfinite" => "__nvvm_ff2f16x2_rn_relu_satfinite", + "ff2f16x2.rn.satfinite" => "__nvvm_ff2f16x2_rn_satfinite", "ff2f16x2.rs" => "__nvvm_ff2f16x2_rs", "ff2f16x2.rs.relu" => "__nvvm_ff2f16x2_rs_relu", "ff2f16x2.rs.relu.satfinite" => "__nvvm_ff2f16x2_rs_relu_satfinite", "ff2f16x2.rs.satfinite" => "__nvvm_ff2f16x2_rs_satfinite", "ff2f16x2.rz" => "__nvvm_ff2f16x2_rz", "ff2f16x2.rz.relu" => "__nvvm_ff2f16x2_rz_relu", + "ff2f16x2.rz.relu.satfinite" => "__nvvm_ff2f16x2_rz_relu_satfinite", + "ff2f16x2.rz.satfinite" => "__nvvm_ff2f16x2_rz_satfinite", "floor.d" => "__nvvm_floor_d", "floor.f" => "__nvvm_floor_f", "floor.ftz.f" => "__nvvm_floor_ftz_f", @@ -5942,6 +6034,8 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "altivec.vupklsb" => "__builtin_altivec_vupklsb", "altivec.vupklsh" => "__builtin_altivec_vupklsh", "altivec.vupklsw" => "__builtin_altivec_vupklsw", + "amo.ldat" => "__builtin_amo_ldat", + "amo.lwat" => "__builtin_amo_lwat", "bcdadd" => "__builtin_ppc_bcdadd", "bcdadd.p" => "__builtin_ppc_bcdadd_p", "bcdcopysign" => "__builtin_ppc_bcdcopysign", @@ -6202,6 +6296,7 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "vsx.xvminsp" => "__builtin_vsx_xvminsp", "vsx.xvredp" => "__builtin_vsx_xvredp", "vsx.xvresp" => "__builtin_vsx_xvresp", + "vsx.xvrlw" => "__builtin_vsx_xvrlw", "vsx.xvrsqrtedp" => "__builtin_vsx_xvrsqrtedp", "vsx.xvrsqrtesp" => "__builtin_vsx_xvrsqrtesp", "vsx.xvtdivdp" => "__builtin_vsx_xvtdivdp", @@ -10158,24 +10253,16 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "stui" => "__builtin_ia32_stui", "subborrow.u32" => "__builtin_ia32_subborrow_u32", "subborrow.u64" => "__builtin_ia32_subborrow_u64", - "t2rpntlvwz0" => "__builtin_ia32_t2rpntlvwz0", "t2rpntlvwz0rs" => "__builtin_ia32_t2rpntlvwz0rs", "t2rpntlvwz0rst1" => "__builtin_ia32_t2rpntlvwz0rst1", - "t2rpntlvwz0t1" => "__builtin_ia32_t2rpntlvwz0t1", - "t2rpntlvwz1" => "__builtin_ia32_t2rpntlvwz1", "t2rpntlvwz1rs" => "__builtin_ia32_t2rpntlvwz1rs", "t2rpntlvwz1rst1" => "__builtin_ia32_t2rpntlvwz1rst1", - "t2rpntlvwz1t1" => "__builtin_ia32_t2rpntlvwz1t1", "tbm.bextri.u32" => "__builtin_ia32_bextri_u32", "tbm.bextri.u64" => "__builtin_ia32_bextri_u64", "tcmmimfp16ps" => "__builtin_ia32_tcmmimfp16ps", "tcmmimfp16ps.internal" => "__builtin_ia32_tcmmimfp16ps_internal", "tcmmrlfp16ps" => "__builtin_ia32_tcmmrlfp16ps", "tcmmrlfp16ps.internal" => "__builtin_ia32_tcmmrlfp16ps_internal", - "tconjtcmmimfp16ps" => "__builtin_ia32_tconjtcmmimfp16ps", - "tconjtcmmimfp16ps.internal" => "__builtin_ia32_tconjtcmmimfp16ps_internal", - "tconjtfp16" => "__builtin_ia32_tconjtfp16", - "tconjtfp16.internal" => "__builtin_ia32_tconjtfp16_internal", "tcvtrowd2ps" => "__builtin_ia32_tcvtrowd2ps", "tcvtrowd2ps.internal" => "__builtin_ia32_tcvtrowd2ps_internal", "tcvtrowps2bf16h" => "__builtin_ia32_tcvtrowps2bf16h", @@ -10225,18 +10312,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "tmmultf32ps" => "__builtin_ia32_tmmultf32ps", "tmmultf32ps.internal" => "__builtin_ia32_tmmultf32ps_internal", "tpause" => "__builtin_ia32_tpause", - "ttcmmimfp16ps" => "__builtin_ia32_ttcmmimfp16ps", - "ttcmmimfp16ps.internal" => "__builtin_ia32_ttcmmimfp16ps_internal", - "ttcmmrlfp16ps" => "__builtin_ia32_ttcmmrlfp16ps", - "ttcmmrlfp16ps.internal" => "__builtin_ia32_ttcmmrlfp16ps_internal", - "ttdpbf16ps" => "__builtin_ia32_ttdpbf16ps", - "ttdpbf16ps.internal" => "__builtin_ia32_ttdpbf16ps_internal", - "ttdpfp16ps" => "__builtin_ia32_ttdpfp16ps", - "ttdpfp16ps.internal" => "__builtin_ia32_ttdpfp16ps_internal", - "ttmmultf32ps" => "__builtin_ia32_ttmmultf32ps", - "ttmmultf32ps.internal" => "__builtin_ia32_ttmmultf32ps_internal", - "ttransposed" => "__builtin_ia32_ttransposed", - "ttransposed.internal" => "__builtin_ia32_ttransposed_internal", "umonitor" => "__builtin_ia32_umonitor", "umwait" => "__builtin_ia32_umwait", "urdmsr" => "__builtin_ia32_urdmsr", diff --git a/tests/failing-ui-tests.txt b/tests/failing-ui-tests.txt index 2380bd0fc137..99a80fa7e4f4 100644 --- a/tests/failing-ui-tests.txt +++ b/tests/failing-ui-tests.txt @@ -88,3 +88,12 @@ tests/ui/test-attrs/test-panic-while-printing.rs tests/ui/thir-print/offset_of.rs tests/ui/iterators/rangefrom-overflow-debug.rs tests/ui/iterators/rangefrom-overflow-overflow-checks.rs +tests/ui/iterators/iter-filter-count-debug-check.rs +tests/ui/eii/codegen_single_crate.rs +tests/ui/eii/codegen_cross_crate.rs +tests/ui/eii/default/local_crate.rs +tests/ui/eii/multiple_impls.rs +tests/ui/eii/default/call_default.rs +tests/ui/eii/same-symbol.rs +tests/ui/eii/privacy1.rs +tests/ui/eii/default/call_impl.rs diff --git a/triagebot.toml b/triagebot.toml index 13da0a87def3..eb0c7b011f60 100644 --- a/triagebot.toml +++ b/triagebot.toml @@ -2,6 +2,3 @@ # Prevents un-canonicalized issue links (to avoid wrong issues being linked in r-l/rust) [issue-links] - -# Prevents mentions in commits to avoid users being spammed -[no-mentions] From 9ba3ed5423d409cf92ab85a80c9b49dd9a148c92 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 18 Sep 2025 13:25:01 +0000 Subject: [PATCH 005/265] Move llvm intrinsic call to backend --- src/intrinsic/mod.rs | 52 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/src/intrinsic/mod.rs b/src/intrinsic/mod.rs index d2714ba7914f..75ea39c23114 100644 --- a/src/intrinsic/mod.rs +++ b/src/intrinsic/mod.rs @@ -9,7 +9,7 @@ use gccjit::Type; use gccjit::{ComparisonOp, Function, FunctionType, RValue, ToRValue, UnaryOp}; #[cfg(feature = "master")] use rustc_abi::ExternAbi; -use rustc_abi::{BackendRepr, HasDataLayout}; +use rustc_abi::{BackendRepr, HasDataLayout, WrappingRange}; use rustc_codegen_ssa::MemFlags; use rustc_codegen_ssa::base::wants_msvc_seh; use rustc_codegen_ssa::common::IntPredicate; @@ -20,7 +20,7 @@ use rustc_codegen_ssa::mir::place::{PlaceRef, PlaceValue}; use rustc_codegen_ssa::traits::MiscCodegenMethods; use rustc_codegen_ssa::traits::{ ArgAbiBuilderMethods, BaseTypeCodegenMethods, BuilderMethods, ConstCodegenMethods, - IntrinsicCallBuilderMethods, + IntrinsicCallBuilderMethods, LayoutTypeCodegenMethods, }; use rustc_middle::bug; #[cfg(feature = "master")] @@ -609,6 +609,54 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tc Ok(()) } + fn codegen_llvm_intrinsic_call( + &mut self, + instance: ty::Instance<'tcx>, + args: &[OperandRef<'tcx, Self::Value>], + is_cleanup: bool, + ) -> Self::Value { + let fn_ptr = self.get_fn_addr(instance); + let fn_ty = fn_ptr.get_type(); + + let mut llargs = vec![]; + + for arg in args { + match arg.val { + OperandValue::ZeroSized => {} + OperandValue::Immediate(_) => llargs.push(arg.immediate()), + OperandValue::Pair(a, b) => { + llargs.push(a); + llargs.push(b); + } + OperandValue::Ref(op_place_val) => { + let mut llval = op_place_val.llval; + // We can't use `PlaceRef::load` here because the argument + // may have a type we don't treat as immediate, but the ABI + // used for this call is passing it by-value. In that case, + // the load would just produce `OperandValue::Ref` instead + // of the `OperandValue::Immediate` we need for the call. + llval = self.load(self.backend_type(arg.layout), llval, op_place_val.align); + if let BackendRepr::Scalar(scalar) = arg.layout.backend_repr { + if scalar.is_bool() { + self.range_metadata(llval, WrappingRange { start: 0, end: 1 }); + } + // We store bools as `i8` so we need to truncate to `i1`. + llval = self.to_immediate_scalar(llval, scalar); + } + llargs.push(llval); + } + } + } + + // FIXME directly use the llvm intrinsic adjustment functions here + let llret = self.call(fn_ty, None, None, fn_ptr, &llargs, None, None); + if is_cleanup { + self.apply_attrs_to_cleanup_callsite(llret); + } + + llret + } + fn abort(&mut self) { let func = self.context.get_builtin_function("abort"); let func: RValue<'gcc> = unsafe { std::mem::transmute(func) }; From 0462ce9934e6b66e44c5f4ab673ff3fde52395b7 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Tue, 11 Nov 2025 11:03:25 +0100 Subject: [PATCH 006/265] Don't assume get_fn is only called from codegen_mir in cg_gcc --- src/builder.rs | 1 + src/context.rs | 4 +--- src/declare.rs | 8 ++------ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/builder.rs b/src/builder.rs index 79228c20d292..f57c50eb64d1 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -514,6 +514,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> { type CodegenCx = CodegenCx<'gcc, 'tcx>; fn build(cx: &'a CodegenCx<'gcc, 'tcx>, block: Block<'gcc>) -> Builder<'a, 'gcc, 'tcx> { + *cx.current_func.borrow_mut() = Some(block.get_function()); Builder::with_cx(cx, block) } diff --git a/src/context.rs b/src/context.rs index dbb89a4ff7db..67bec261cc2e 100644 --- a/src/context.rs +++ b/src/context.rs @@ -391,9 +391,7 @@ impl<'gcc, 'tcx> MiscCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> { } fn get_fn(&self, instance: Instance<'tcx>) -> Function<'gcc> { - let func = get_fn(self, instance); - *self.current_func.borrow_mut() = Some(func); - func + get_fn(self, instance) } fn get_fn_addr(&self, instance: Instance<'tcx>) -> RValue<'gcc> { diff --git a/src/declare.rs b/src/declare.rs index 42d6fb17a88b..fec7d9d0a403 100644 --- a/src/declare.rs +++ b/src/declare.rs @@ -100,18 +100,14 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> { let return_type = self.type_i32(); let variadic = false; self.linkage.set(FunctionType::Exported); - let func = declare_raw_fn( + declare_raw_fn( self, name, callconv, return_type, &[self.type_i32(), const_string], variadic, - ); - // NOTE: it is needed to set the current_func here as well, because get_fn() is not called - // for the main function. - *self.current_func.borrow_mut() = Some(func); - func + ) } pub fn declare_fn(&self, name: &str, fn_abi: &FnAbi<'tcx, Ty<'tcx>>) -> Function<'gcc> { From 56be08eb45c2a1e0169470a3f0644fe296d1b534 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Tue, 11 Nov 2025 11:14:03 +0100 Subject: [PATCH 007/265] Pass Function to Builder::function_call in cg_gcc --- src/builder.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/builder.rs b/src/builder.rs index f57c50eb64d1..8b4a8de94bf3 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -316,12 +316,10 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> { fn function_call( &mut self, - func: RValue<'gcc>, + func: Function<'gcc>, args: &[RValue<'gcc>], _funclet: Option<&Funclet>, ) -> RValue<'gcc> { - // TODO(antoyo): remove when the API supports a different type for functions. - let func: Function<'gcc> = self.cx.rvalue_as_function(func); let args = self.check_call("call", func, args); // gccjit requires to use the result of functions, even when it's not used. @@ -1766,6 +1764,8 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> { // FIXME(antoyo): remove when having a proper API. let gcc_func = unsafe { std::mem::transmute::, Function<'gcc>>(func) }; let call = if self.functions.borrow().values().any(|value| *value == gcc_func) { + // TODO(antoyo): remove when the API supports a different type for functions. + let func: Function<'gcc> = self.cx.rvalue_as_function(func); self.function_call(func, args, funclet) } else { // If it's a not function that was defined, it's a function pointer. From 5bcd472b8688437b4967bcba077c4089572a17ea Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Mon, 10 Nov 2025 13:42:32 +0000 Subject: [PATCH 008/265] Partially inline get_fn_addr/get_fn in codegen_llvm_intrinsic_call This moves all LLVM intrinsic handling out of the regular call path for cg_gcc and makes it easier to hook into this code for future cg_llvm changes. --- src/builder.rs | 2 +- src/context.rs | 7 ++++--- src/declare.rs | 14 -------------- src/intrinsic/mod.rs | 42 +++++++++++++++++++++++++++++++++++++++++- 4 files changed, 46 insertions(+), 19 deletions(-) diff --git a/src/builder.rs b/src/builder.rs index 8b4a8de94bf3..3def9a5c015c 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -314,7 +314,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> { self.block.get_function() } - fn function_call( + pub fn function_call( &mut self, func: Function<'gcc>, args: &[RValue<'gcc>], diff --git a/src/context.rs b/src/context.rs index 67bec261cc2e..d200d5319a93 100644 --- a/src/context.rs +++ b/src/context.rs @@ -92,6 +92,8 @@ pub struct CodegenCx<'gcc, 'tcx> { pub instances: RefCell, LValue<'gcc>>>, /// Cache function instances of monomorphic and polymorphic items pub function_instances: RefCell, Function<'gcc>>>, + /// Cache function instances of intrinsics + pub intrinsic_instances: RefCell, Function<'gcc>>>, /// Cache generated vtables pub vtables: RefCell, Option>), RValue<'gcc>>>, @@ -280,6 +282,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> { linkage: Cell::new(FunctionType::Internal), instances: Default::default(), function_instances: Default::default(), + intrinsic_instances: Default::default(), on_stack_params: Default::default(), on_stack_function_params: Default::default(), vtables: Default::default(), @@ -397,9 +400,7 @@ impl<'gcc, 'tcx> MiscCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> { fn get_fn_addr(&self, instance: Instance<'tcx>) -> RValue<'gcc> { let func_name = self.tcx.symbol_name(instance).name; - let func = if self.intrinsics.borrow().contains_key(func_name) { - self.intrinsics.borrow()[func_name] - } else if let Some(variable) = self.get_declared_value(func_name) { + let func = if let Some(variable) = self.get_declared_value(func_name) { return variable; } else { get_fn(self, instance) diff --git a/src/declare.rs b/src/declare.rs index fec7d9d0a403..e4130b221ee3 100644 --- a/src/declare.rs +++ b/src/declare.rs @@ -8,7 +8,6 @@ use rustc_target::callconv::FnAbi; use crate::abi::{FnAbiGcc, FnAbiGccExt}; use crate::context::CodegenCx; -use crate::intrinsic::llvm; impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> { pub fn get_or_insert_global( @@ -162,19 +161,6 @@ fn declare_raw_fn<'gcc>( param_types: &[Type<'gcc>], variadic: bool, ) -> Function<'gcc> { - if name.starts_with("llvm.") { - let intrinsic = match name { - "llvm.fma.f16" => { - // fma is not a target builtin, but a normal builtin, so we handle it differently - // here. - cx.context.get_builtin_function("fma") - } - _ => llvm::intrinsic(name, cx), - }; - - cx.intrinsics.borrow_mut().insert(name.to_string(), intrinsic); - return intrinsic; - } let func = if cx.functions.borrow().contains_key(name) { cx.functions.borrow()[name] } else { diff --git a/src/intrinsic/mod.rs b/src/intrinsic/mod.rs index 75ea39c23114..77b88a969084 100644 --- a/src/intrinsic/mod.rs +++ b/src/intrinsic/mod.rs @@ -615,7 +615,47 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tc args: &[OperandRef<'tcx, Self::Value>], is_cleanup: bool, ) -> Self::Value { - let fn_ptr = self.get_fn_addr(instance); + let func = if let Some(&func) = self.intrinsic_instances.borrow().get(&instance) { + func + } else { + let sym = self.tcx.symbol_name(instance).name; + + let func = if let Some(func) = self.intrinsics.borrow().get(sym) { + *func + } else { + self.linkage.set(FunctionType::Extern); + let fn_abi = self.fn_abi_of_instance(instance, ty::List::empty()); + let fn_ty = fn_abi.gcc_type(self); + + let func = match sym { + "llvm.fma.f16" => { + // fma is not a target builtin, but a normal builtin, so we handle it differently + // here. + self.context.get_builtin_function("fma") + } + _ => llvm::intrinsic(sym, self), + }; + + self.intrinsics.borrow_mut().insert(sym.to_string(), func); + + self.on_stack_function_params + .borrow_mut() + .insert(func, fn_ty.on_stack_param_indices); + #[cfg(feature = "master")] + for fn_attr in fn_ty.fn_attributes { + func.add_attribute(fn_attr); + } + + crate::attributes::from_fn_attrs(self, func, instance); + + func + }; + + self.intrinsic_instances.borrow_mut().insert(instance, func); + + func + }; + let fn_ptr = func.get_address(None); let fn_ty = fn_ptr.get_type(); let mut llargs = vec![]; From ea8f037c760f1eb0099521230c87318d028d8e49 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sat, 27 Dec 2025 08:49:59 +0000 Subject: [PATCH 009/265] Fix compilation of cg_gcc with master feature disabled --- src/intrinsic/mod.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/intrinsic/mod.rs b/src/intrinsic/mod.rs index 77b88a969084..36ea76cbc51a 100644 --- a/src/intrinsic/mod.rs +++ b/src/intrinsic/mod.rs @@ -23,16 +23,12 @@ use rustc_codegen_ssa::traits::{ IntrinsicCallBuilderMethods, LayoutTypeCodegenMethods, }; use rustc_middle::bug; -#[cfg(feature = "master")] -use rustc_middle::ty::layout::FnAbiOf; -use rustc_middle::ty::layout::LayoutOf; +use rustc_middle::ty::layout::{FnAbiOf, LayoutOf}; use rustc_middle::ty::{self, Instance, Ty}; use rustc_span::{Span, Symbol, sym}; use rustc_target::callconv::{ArgAbi, PassMode}; -#[cfg(feature = "master")] -use crate::abi::FnAbiGccExt; -use crate::abi::GccType; +use crate::abi::{FnAbiGccExt, GccType}; use crate::builder::Builder; use crate::common::{SignType, TypeReflection}; use crate::context::CodegenCx; From e79fef40866bfbf2a4ae33b0030205ce51a7adf9 Mon Sep 17 00:00:00 2001 From: A4-Tacks Date: Thu, 1 Jan 2026 22:21:57 +0800 Subject: [PATCH 010/265] Fix incorrect Self path expand for inline_call Example --- ```rust trait Trait { fn f() -> Self; } struct Foo<'a>(&'a ()); impl<'a> Trait for Foo<'a> { fn f() -> Self { Self(&()) } } impl Foo<'_> { fn new() -> Self { Self::$0f() } } ``` **Before this PR** ```rust trait Trait { fn f() -> Self; } struct Foo<'a>(&'a ()); impl<'a> Trait for Foo<'a> { fn f() -> Self { Self(&()) } } impl Foo<'_> { fn new() -> Self { Foo<'a>(&()) } } ``` **After this PR** ```rust trait Trait { fn f() -> Self; } struct Foo<'a>(&'a ()); impl<'a> Trait for Foo<'a> { fn f() -> Self { Self(&()) } } impl Foo<'_> { fn new() -> Self { Foo(&()) } } ``` --- .../ide-assists/src/handlers/inline_call.rs | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/inline_call.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/inline_call.rs index fa4f2a78c8b7..21f2249a19c9 100644 --- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/inline_call.rs +++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/inline_call.rs @@ -403,6 +403,12 @@ fn inline( .find(|tok| tok.kind() == SyntaxKind::SELF_TYPE_KW) { let replace_with = t.clone_subtree().syntax().clone_for_update(); + if !is_in_type_path(&self_tok) + && let Some(ty) = ast::Type::cast(replace_with.clone()) + && let Some(generic_arg_list) = ty.generic_arg_list() + { + ted::remove(generic_arg_list.syntax()); + } ted::replace(self_tok, replace_with); } } @@ -588,6 +594,17 @@ fn inline( } } +fn is_in_type_path(self_tok: &syntax::SyntaxToken) -> bool { + self_tok + .parent_ancestors() + .skip_while(|it| !ast::Path::can_cast(it.kind())) + .map_while(ast::Path::cast) + .last() + .and_then(|it| it.syntax().parent()) + .and_then(ast::PathType::cast) + .is_some() +} + fn path_expr_as_record_field(usage: &PathExpr) -> Option { let path = usage.path()?; let name_ref = path.as_single_name_ref()?; @@ -1694,6 +1711,41 @@ fn main() { ) } + #[test] + fn inline_trait_method_call_with_lifetimes() { + check_assist( + inline_call, + r#" +trait Trait { + fn f() -> Self; +} +struct Foo<'a>(&'a ()); +impl<'a> Trait for Foo<'a> { + fn f() -> Self { Self(&()) } +} +impl Foo<'_> { + fn new() -> Self { + Self::$0f() + } +} +"#, + r#" +trait Trait { + fn f() -> Self; +} +struct Foo<'a>(&'a ()); +impl<'a> Trait for Foo<'a> { + fn f() -> Self { Self(&()) } +} +impl Foo<'_> { + fn new() -> Self { + Foo(&()) + } +} +"#, + ) + } + #[test] fn method_by_reborrow() { check_assist( From f091a8acad5c52378be2f1b6f29cc2d21ff7bf5f Mon Sep 17 00:00:00 2001 From: A4-Tacks Date: Sun, 4 Jan 2026 20:54:19 +0800 Subject: [PATCH 011/265] Fix complete semicolon in array expression Example --- ```rust fn foo() {} fn bar() { let _ = [fo$0]; } ``` **Before this PR** ```rust fn foo() {} fn bar() { let _ = [foo();$0]; } ``` **After this PR** ```rust fn foo() {} fn bar() { let _ = [foo()$0]; } ``` --- .../crates/ide-completion/src/context.rs | 5 ++++- .../ide-completion/src/render/function.rs | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/tools/rust-analyzer/crates/ide-completion/src/context.rs b/src/tools/rust-analyzer/crates/ide-completion/src/context.rs index d116f665adbd..7f3e69c8ab30 100644 --- a/src/tools/rust-analyzer/crates/ide-completion/src/context.rs +++ b/src/tools/rust-analyzer/crates/ide-completion/src/context.rs @@ -821,7 +821,10 @@ impl<'db> CompletionContext<'db> { CompleteSemicolon::DoNotComplete } else if let Some(term_node) = sema.token_ancestors_with_macros(token.clone()).find(|node| { - matches!(node.kind(), BLOCK_EXPR | MATCH_ARM | CLOSURE_EXPR | ARG_LIST | PAREN_EXPR) + matches!( + node.kind(), + BLOCK_EXPR | MATCH_ARM | CLOSURE_EXPR | ARG_LIST | PAREN_EXPR | ARRAY_EXPR + ) }) { let next_token = iter::successors(token.next_token(), |it| it.next_token()) diff --git a/src/tools/rust-analyzer/crates/ide-completion/src/render/function.rs b/src/tools/rust-analyzer/crates/ide-completion/src/render/function.rs index 4713b1f1afa7..475e00dfcf29 100644 --- a/src/tools/rust-analyzer/crates/ide-completion/src/render/function.rs +++ b/src/tools/rust-analyzer/crates/ide-completion/src/render/function.rs @@ -905,6 +905,25 @@ fn baz(_: impl FnOnce()) {} fn bar() { baz(foo()$0); } +"#, + ); + } + + #[test] + fn no_semicolon_in_array() { + check_edit( + r#"foo"#, + r#" +fn foo() {} +fn bar() { + let _ = [fo$0]; +} +"#, + r#" +fn foo() {} +fn bar() { + let _ = [foo()$0]; +} "#, ); } From f004b3eb19b988a9066ca9dc9b2a63919f504ada Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sun, 28 Dec 2025 13:05:09 +0000 Subject: [PATCH 012/265] Reduce usage of FnAbi in codegen_llvm_intrinsic_call --- src/intrinsic/mod.rs | 88 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 84 insertions(+), 4 deletions(-) diff --git a/src/intrinsic/mod.rs b/src/intrinsic/mod.rs index 36ea76cbc51a..f138b87d3405 100644 --- a/src/intrinsic/mod.rs +++ b/src/intrinsic/mod.rs @@ -4,10 +4,10 @@ mod simd; #[cfg(feature = "master")] use std::iter; -#[cfg(feature = "master")] -use gccjit::Type; use gccjit::{ComparisonOp, Function, FunctionType, RValue, ToRValue, UnaryOp}; #[cfg(feature = "master")] +use gccjit::{FnAttribute, Type}; +#[cfg(feature = "master")] use rustc_abi::ExternAbi; use rustc_abi::{BackendRepr, HasDataLayout, WrappingRange}; use rustc_codegen_ssa::MemFlags; @@ -22,13 +22,18 @@ use rustc_codegen_ssa::traits::{ ArgAbiBuilderMethods, BaseTypeCodegenMethods, BuilderMethods, ConstCodegenMethods, IntrinsicCallBuilderMethods, LayoutTypeCodegenMethods, }; +use rustc_data_structures::fx::FxHashSet; use rustc_middle::bug; use rustc_middle::ty::layout::{FnAbiOf, LayoutOf}; use rustc_middle::ty::{self, Instance, Ty}; +#[cfg(feature = "master")] +use rustc_session::config; use rustc_span::{Span, Symbol, sym}; +#[cfg(feature = "master")] +use rustc_target::callconv::ArgAttributes; use rustc_target::callconv::{ArgAbi, PassMode}; -use crate::abi::{FnAbiGccExt, GccType}; +use crate::abi::{FnAbiGcc, FnAbiGccExt, GccType}; use crate::builder::Builder; use crate::common::{SignType, TypeReflection}; use crate::context::CodegenCx; @@ -621,7 +626,82 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tc } else { self.linkage.set(FunctionType::Extern); let fn_abi = self.fn_abi_of_instance(instance, ty::List::empty()); - let fn_ty = fn_abi.gcc_type(self); + assert!(!fn_abi.ret.is_indirect()); + assert!(!fn_abi.c_variadic); + + let return_type = match fn_abi.ret.mode { + PassMode::Ignore => self.type_void(), + PassMode::Direct(_) | PassMode::Pair(..) => { + fn_abi.ret.layout.immediate_gcc_type(self) + } + PassMode::Cast { .. } | PassMode::Indirect { .. } => { + unreachable!() + } + }; + + #[cfg(feature = "master")] + let mut non_null_args = Vec::new(); + + #[cfg(feature = "master")] + let mut apply_attrs = + |mut ty: Type<'gcc>, attrs: &ArgAttributes, arg_index: usize| { + if self.sess().opts.optimize == config::OptLevel::No { + return ty; + } + if attrs.regular.contains(rustc_target::callconv::ArgAttribute::NoAlias) { + ty = ty.make_restrict() + } + if attrs.regular.contains(rustc_target::callconv::ArgAttribute::NonNull) { + non_null_args.push(arg_index as i32 + 1); + } + ty + }; + #[cfg(not(feature = "master"))] + let apply_attrs = |ty: Type<'gcc>, _attrs: &ArgAttributes, _arg_index: usize| ty; + + let mut argument_tys = Vec::with_capacity(fn_abi.args.len()); + for arg in fn_abi.args.iter() { + match arg.mode { + PassMode::Ignore => {} + PassMode::Pair(a, b) => { + let arg_pos = argument_tys.len(); + argument_tys.push(apply_attrs( + arg.layout.scalar_pair_element_gcc_type(self, 0), + &a, + arg_pos, + )); + argument_tys.push(apply_attrs( + arg.layout.scalar_pair_element_gcc_type(self, 1), + &b, + arg_pos + 1, + )); + } + PassMode::Direct(attrs) => argument_tys.push(apply_attrs( + arg.layout.immediate_gcc_type(self), + &attrs, + argument_tys.len(), + )), + PassMode::Indirect { .. } | PassMode::Cast { .. } => { + unreachable!() + } + } + } + + #[cfg(feature = "master")] + let fn_attrs = if non_null_args.is_empty() { + Vec::new() + } else { + vec![FnAttribute::NonNull(non_null_args)] + }; + + let fn_ty = FnAbiGcc { + return_type, + arguments_type: argument_tys, + is_c_variadic: false, + on_stack_param_indices: FxHashSet::default(), + #[cfg(feature = "master")] + fn_attributes: fn_attrs, + }; let func = match sym { "llvm.fma.f16" => { From e90414f6224b95662c2f52fcfc508a316f54db09 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 8 Jan 2026 10:47:29 +0000 Subject: [PATCH 013/265] Don't compute FnAbi for LLVM intrinsics in backends --- src/intrinsic/mod.rs | 101 ++++--------------------------------------- 1 file changed, 9 insertions(+), 92 deletions(-) diff --git a/src/intrinsic/mod.rs b/src/intrinsic/mod.rs index f138b87d3405..de262994fa45 100644 --- a/src/intrinsic/mod.rs +++ b/src/intrinsic/mod.rs @@ -4,9 +4,9 @@ mod simd; #[cfg(feature = "master")] use std::iter; -use gccjit::{ComparisonOp, Function, FunctionType, RValue, ToRValue, UnaryOp}; #[cfg(feature = "master")] -use gccjit::{FnAttribute, Type}; +use gccjit::Type; +use gccjit::{ComparisonOp, Function, FunctionType, RValue, ToRValue, UnaryOp}; #[cfg(feature = "master")] use rustc_abi::ExternAbi; use rustc_abi::{BackendRepr, HasDataLayout, WrappingRange}; @@ -24,16 +24,16 @@ use rustc_codegen_ssa::traits::{ }; use rustc_data_structures::fx::FxHashSet; use rustc_middle::bug; -use rustc_middle::ty::layout::{FnAbiOf, LayoutOf}; +#[cfg(feature = "master")] +use rustc_middle::ty::layout::FnAbiOf; +use rustc_middle::ty::layout::LayoutOf; use rustc_middle::ty::{self, Instance, Ty}; -#[cfg(feature = "master")] -use rustc_session::config; use rustc_span::{Span, Symbol, sym}; -#[cfg(feature = "master")] -use rustc_target::callconv::ArgAttributes; use rustc_target::callconv::{ArgAbi, PassMode}; -use crate::abi::{FnAbiGcc, FnAbiGccExt, GccType}; +#[cfg(feature = "master")] +use crate::abi::FnAbiGccExt; +use crate::abi::GccType; use crate::builder::Builder; use crate::common::{SignType, TypeReflection}; use crate::context::CodegenCx; @@ -625,83 +625,6 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tc *func } else { self.linkage.set(FunctionType::Extern); - let fn_abi = self.fn_abi_of_instance(instance, ty::List::empty()); - assert!(!fn_abi.ret.is_indirect()); - assert!(!fn_abi.c_variadic); - - let return_type = match fn_abi.ret.mode { - PassMode::Ignore => self.type_void(), - PassMode::Direct(_) | PassMode::Pair(..) => { - fn_abi.ret.layout.immediate_gcc_type(self) - } - PassMode::Cast { .. } | PassMode::Indirect { .. } => { - unreachable!() - } - }; - - #[cfg(feature = "master")] - let mut non_null_args = Vec::new(); - - #[cfg(feature = "master")] - let mut apply_attrs = - |mut ty: Type<'gcc>, attrs: &ArgAttributes, arg_index: usize| { - if self.sess().opts.optimize == config::OptLevel::No { - return ty; - } - if attrs.regular.contains(rustc_target::callconv::ArgAttribute::NoAlias) { - ty = ty.make_restrict() - } - if attrs.regular.contains(rustc_target::callconv::ArgAttribute::NonNull) { - non_null_args.push(arg_index as i32 + 1); - } - ty - }; - #[cfg(not(feature = "master"))] - let apply_attrs = |ty: Type<'gcc>, _attrs: &ArgAttributes, _arg_index: usize| ty; - - let mut argument_tys = Vec::with_capacity(fn_abi.args.len()); - for arg in fn_abi.args.iter() { - match arg.mode { - PassMode::Ignore => {} - PassMode::Pair(a, b) => { - let arg_pos = argument_tys.len(); - argument_tys.push(apply_attrs( - arg.layout.scalar_pair_element_gcc_type(self, 0), - &a, - arg_pos, - )); - argument_tys.push(apply_attrs( - arg.layout.scalar_pair_element_gcc_type(self, 1), - &b, - arg_pos + 1, - )); - } - PassMode::Direct(attrs) => argument_tys.push(apply_attrs( - arg.layout.immediate_gcc_type(self), - &attrs, - argument_tys.len(), - )), - PassMode::Indirect { .. } | PassMode::Cast { .. } => { - unreachable!() - } - } - } - - #[cfg(feature = "master")] - let fn_attrs = if non_null_args.is_empty() { - Vec::new() - } else { - vec![FnAttribute::NonNull(non_null_args)] - }; - - let fn_ty = FnAbiGcc { - return_type, - arguments_type: argument_tys, - is_c_variadic: false, - on_stack_param_indices: FxHashSet::default(), - #[cfg(feature = "master")] - fn_attributes: fn_attrs, - }; let func = match sym { "llvm.fma.f16" => { @@ -714,13 +637,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tc self.intrinsics.borrow_mut().insert(sym.to_string(), func); - self.on_stack_function_params - .borrow_mut() - .insert(func, fn_ty.on_stack_param_indices); - #[cfg(feature = "master")] - for fn_attr in fn_ty.fn_attributes { - func.add_attribute(fn_attr); - } + self.on_stack_function_params.borrow_mut().insert(func, FxHashSet::default()); crate::attributes::from_fn_attrs(self, func, instance); From fe0facf0f6f021f0c5d597fb214d96ae48571c91 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Thu, 1 Jan 2026 10:47:22 +0100 Subject: [PATCH 014/265] Finish transition from `semitransparent` to `semiopaque` for `rustc_macro_transparency` --- example/mini_core.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/example/mini_core.rs b/example/mini_core.rs index 64a5b431bd07..0aba44a88c5a 100644 --- a/example/mini_core.rs +++ b/example/mini_core.rs @@ -748,25 +748,25 @@ extern "C" { pub struct VaList<'a>(&'a mut VaListImpl); #[rustc_builtin_macro] -#[rustc_macro_transparency = "semitransparent"] +#[rustc_macro_transparency = "semiopaque"] pub macro stringify($($t:tt)*) { /* compiler built-in */ } #[rustc_builtin_macro] -#[rustc_macro_transparency = "semitransparent"] +#[rustc_macro_transparency = "semiopaque"] pub macro file() { /* compiler built-in */ } #[rustc_builtin_macro] -#[rustc_macro_transparency = "semitransparent"] +#[rustc_macro_transparency = "semiopaque"] pub macro line() { /* compiler built-in */ } #[rustc_builtin_macro] -#[rustc_macro_transparency = "semitransparent"] +#[rustc_macro_transparency = "semiopaque"] pub macro cfg() { /* compiler built-in */ } From c9a063ced93ec7dce1dfaca57f818dba5334cfca Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 14 Jan 2026 10:30:08 +1100 Subject: [PATCH 015/265] Remove `Deref`/`DerefMut` impl for `Providers`. It's described as a "backwards compatibility hack to keep the diff small". Removing it requires only a modest amount of churn, and the resulting code is clearer without the invisible derefs. --- src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 96d3a0024f41..cf1be1806235 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -286,7 +286,8 @@ impl CodegenBackend for GccCodegenBackend { } fn provide(&self, providers: &mut Providers) { - providers.global_backend_features = |tcx, ()| gcc_util::global_gcc_features(tcx.sess) + providers.queries.global_backend_features = + |tcx, ()| gcc_util::global_gcc_features(tcx.sess) } fn codegen_crate(&self, tcx: TyCtxt<'_>) -> Box { From 3e789ed57663cac867309eb4d9e1f14094b02900 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 12 Jan 2026 16:38:10 +0100 Subject: [PATCH 016/265] Stop cloning old `llvmint` repositories to generate intrinsics --- src/intrinsic/archs.rs | 1424 +--------------------------------- src/intrinsic/llvm.rs | 2 + src/intrinsic/old_archs.rs | 1384 +++++++++++++++++++++++++++++++++ tools/generate_intrinsics.py | 50 +- 4 files changed, 1420 insertions(+), 1440 deletions(-) create mode 100644 src/intrinsic/old_archs.rs diff --git a/src/intrinsic/archs.rs b/src/intrinsic/archs.rs index 43e7c352c34a..89a6cf7f3d6e 100644 --- a/src/intrinsic/archs.rs +++ b/src/intrinsic/archs.rs @@ -6,47 +6,13 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { unimplemented!("***** unsupported LLVM intrinsic {}", full_name) }; let Some((arch, name)) = name.split_once('.') else { - unimplemented!("***** unsupported LLVM intrinsic {}", name) + unimplemented!("***** unsupported LLVM intrinsic llvm.{}", name) }; + let old_arch_res = old_archs(arch, name); + if let ArchCheckResult::Ok(res) = old_arch_res { + return res; + } match arch { - "AMDGPU" => { - #[expect(non_snake_case)] - fn AMDGPU(name: &str, full_name: &str) -> &'static str { - match name { - // AMDGPU - "div.fixup.f32" => "__builtin_amdgpu_div_fixup", - "div.fixup.f64" => "__builtin_amdgpu_div_fixup", - "div.fixup.v2f64" => "__builtin_amdgpu_div_fixup", - "div.fixup.v4f32" => "__builtin_amdgpu_div_fixup", - "div.fmas.f32" => "__builtin_amdgpu_div_fmas", - "div.fmas.f64" => "__builtin_amdgpu_div_fmas", - "div.fmas.v2f64" => "__builtin_amdgpu_div_fmas", - "div.fmas.v4f32" => "__builtin_amdgpu_div_fmas", - "ldexp.f32" => "__builtin_amdgpu_ldexp", - "ldexp.f64" => "__builtin_amdgpu_ldexp", - "ldexp.v2f64" => "__builtin_amdgpu_ldexp", - "ldexp.v4f32" => "__builtin_amdgpu_ldexp", - "rcp.f32" => "__builtin_amdgpu_rcp", - "rcp.f64" => "__builtin_amdgpu_rcp", - "rcp.v2f64" => "__builtin_amdgpu_rcp", - "rcp.v4f32" => "__builtin_amdgpu_rcp", - "rsq.clamped.f32" => "__builtin_amdgpu_rsq_clamped", - "rsq.clamped.f64" => "__builtin_amdgpu_rsq_clamped", - "rsq.clamped.v2f64" => "__builtin_amdgpu_rsq_clamped", - "rsq.clamped.v4f32" => "__builtin_amdgpu_rsq_clamped", - "rsq.f32" => "__builtin_amdgpu_rsq", - "rsq.f64" => "__builtin_amdgpu_rsq", - "rsq.v2f64" => "__builtin_amdgpu_rsq", - "rsq.v4f32" => "__builtin_amdgpu_rsq", - "trig.preop.f32" => "__builtin_amdgpu_trig_preop", - "trig.preop.f64" => "__builtin_amdgpu_trig_preop", - "trig.preop.v2f64" => "__builtin_amdgpu_trig_preop", - "trig.preop.v4f32" => "__builtin_amdgpu_trig_preop", - _ => unimplemented!("***** unsupported LLVM intrinsic {full_name}"), - } - } - AMDGPU(name, full_name) - } "aarch64" => { fn aarch64(name: &str, full_name: &str) -> &'static str { match name { @@ -537,8 +503,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "ldcl" => "__builtin_arm_ldcl", "mcr" => "__builtin_arm_mcr", "mcr2" => "__builtin_arm_mcr2", - "mcrr" => "__builtin_arm_mcrr", - "mcrr2" => "__builtin_arm_mcrr2", "mrc" => "__builtin_arm_mrc", "mrc2" => "__builtin_arm_mrc2", "qadd" => "__builtin_arm_qadd", @@ -595,7 +559,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "stcl" => "__builtin_arm_stcl", "sxtab16" => "__builtin_arm_sxtab16", "sxtb16" => "__builtin_arm_sxtb16", - "thread.pointer" => "__builtin_thread_pointer", "uadd16" => "__builtin_arm_uadd16", "uadd8" => "__builtin_arm_uadd8", "uasx" => "__builtin_arm_uasx", @@ -646,16 +609,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { } bpf(name, full_name) } - "cuda" => { - fn cuda(name: &str, full_name: &str) -> &'static str { - match name { - // cuda - "syncthreads" => "__syncthreads", - _ => unimplemented!("***** unsupported LLVM intrinsic {full_name}"), - } - } - cuda(name, full_name) - } "hexagon" => { fn hexagon(name: &str, full_name: &str) -> &'static str { match name { @@ -959,19 +912,10 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "F2.dfcmpge" => "__builtin_HEXAGON_F2_dfcmpge", "F2.dfcmpgt" => "__builtin_HEXAGON_F2_dfcmpgt", "F2.dfcmpuo" => "__builtin_HEXAGON_F2_dfcmpuo", - "F2.dffixupd" => "__builtin_HEXAGON_F2_dffixupd", - "F2.dffixupn" => "__builtin_HEXAGON_F2_dffixupn", - "F2.dffixupr" => "__builtin_HEXAGON_F2_dffixupr", - "F2.dffma" => "__builtin_HEXAGON_F2_dffma", - "F2.dffma.lib" => "__builtin_HEXAGON_F2_dffma_lib", - "F2.dffma.sc" => "__builtin_HEXAGON_F2_dffma_sc", - "F2.dffms" => "__builtin_HEXAGON_F2_dffms", - "F2.dffms.lib" => "__builtin_HEXAGON_F2_dffms_lib", "F2.dfimm.n" => "__builtin_HEXAGON_F2_dfimm_n", "F2.dfimm.p" => "__builtin_HEXAGON_F2_dfimm_p", "F2.dfmax" => "__builtin_HEXAGON_F2_dfmax", "F2.dfmin" => "__builtin_HEXAGON_F2_dfmin", - "F2.dfmpy" => "__builtin_HEXAGON_F2_dfmpy", "F2.dfmpyfix" => "__builtin_HEXAGON_F2_dfmpyfix", "F2.dfmpyhh" => "__builtin_HEXAGON_F2_dfmpyhh", "F2.dfmpylh" => "__builtin_HEXAGON_F2_dfmpylh", @@ -1398,7 +1342,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "S2.asr.r.vw" => "__builtin_HEXAGON_S2_asr_r_vw", "S2.brev" => "__builtin_HEXAGON_S2_brev", "S2.brevp" => "__builtin_HEXAGON_S2_brevp", - "S2.cabacencbin" => "__builtin_HEXAGON_S2_cabacencbin", "S2.cl0" => "__builtin_HEXAGON_S2_cl0", "S2.cl0p" => "__builtin_HEXAGON_S2_cl0p", "S2.cl1" => "__builtin_HEXAGON_S2_cl1", @@ -1569,7 +1512,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "S6.vsplatrbp" => "__builtin_HEXAGON_S6_vsplatrbp", "S6.vtrunehb.ppp" => "__builtin_HEXAGON_S6_vtrunehb_ppp", "S6.vtrunohb.ppp" => "__builtin_HEXAGON_S6_vtrunohb_ppp", - "SI.to.SXTHI.asrh" => "__builtin_SI_to_SXTHI_asrh", "V6.extractw" => "__builtin_HEXAGON_V6_extractw", "V6.extractw.128B" => "__builtin_HEXAGON_V6_extractw_128B", "V6.get.qfext" => "__builtin_HEXAGON_V6_get_qfext", @@ -2160,14 +2102,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "V6.vlsrwv.128B" => "__builtin_HEXAGON_V6_vlsrwv_128B", "V6.vlut4" => "__builtin_HEXAGON_V6_vlut4", "V6.vlut4.128B" => "__builtin_HEXAGON_V6_vlut4_128B", - "V6.vlutb" => "__builtin_HEXAGON_V6_vlutb", - "V6.vlutb.128B" => "__builtin_HEXAGON_V6_vlutb_128B", - "V6.vlutb.acc" => "__builtin_HEXAGON_V6_vlutb_acc", - "V6.vlutb.acc.128B" => "__builtin_HEXAGON_V6_vlutb_acc_128B", - "V6.vlutb.dv" => "__builtin_HEXAGON_V6_vlutb_dv", - "V6.vlutb.dv.128B" => "__builtin_HEXAGON_V6_vlutb_dv_128B", - "V6.vlutb.dv.acc" => "__builtin_HEXAGON_V6_vlutb_dv_acc", - "V6.vlutb.dv.acc.128B" => "__builtin_HEXAGON_V6_vlutb_dv_acc_128B", "V6.vlutvvb" => "__builtin_HEXAGON_V6_vlutvvb", "V6.vlutvvb.128B" => "__builtin_HEXAGON_V6_vlutvvb_128B", "V6.vlutvvb.nm" => "__builtin_HEXAGON_V6_vlutvvb_nm", @@ -2669,17 +2603,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "Y6.dmresume" => "__builtin_HEXAGON_Y6_dmresume", "Y6.dmstart" => "__builtin_HEXAGON_Y6_dmstart", "Y6.dmwait" => "__builtin_HEXAGON_Y6_dmwait", - "brev.ldb" => "__builtin_brev_ldb", - "brev.ldd" => "__builtin_brev_ldd", - "brev.ldh" => "__builtin_brev_ldh", - "brev.ldub" => "__builtin_brev_ldub", - "brev.lduh" => "__builtin_brev_lduh", - "brev.ldw" => "__builtin_brev_ldw", - "brev.stb" => "__builtin_brev_stb", - "brev.std" => "__builtin_brev_std", - "brev.sth" => "__builtin_brev_sth", - "brev.sthhi" => "__builtin_brev_sthhi", - "brev.stw" => "__builtin_brev_stw", "circ.ldb" => "__builtin_circ_ldb", "circ.ldd" => "__builtin_circ_ldd", "circ.ldh" => "__builtin_circ_ldh", @@ -2691,7 +2614,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "circ.sth" => "__builtin_circ_sth", "circ.sthhi" => "__builtin_circ_sthhi", "circ.stw" => "__builtin_circ_stw", - "mm256i.vaddw" => "__builtin__mm256i_vaddw", "prefetch" => "__builtin_HEXAGON_prefetch", "vmemcpy" => "__builtin_hexagon_vmemcpy", "vmemset" => "__builtin_hexagon_vmemset", @@ -4910,8 +4832,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { fn nvvm(name: &str, full_name: &str) -> &'static str { match name { // nvvm - "abs.i" => "__nvvm_abs_i", - "abs.ll" => "__nvvm_abs_ll", "activemask" => "__nvvm_activemask", "add.rm.d" => "__nvvm_add_rm_d", "add.rm.f" => "__nvvm_add_rm_f", @@ -4925,10 +4845,7 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "add.rz.d" => "__nvvm_add_rz_d", "add.rz.f" => "__nvvm_add_rz_f", "add.rz.ftz.f" => "__nvvm_add_rz_ftz_f", - "bar.sync" => "__nvvm_bar_sync", "bar.warp.sync" => "__nvvm_bar_warp_sync", - "barrier0" => "__nvvm_bar0", - // [DUPLICATE]: "barrier0" => "__syncthreads", "barrier0.and" => "__nvvm_bar0_and", "barrier0.or" => "__nvvm_bar0_or", "barrier0.popc" => "__nvvm_bar0_popc", @@ -4938,17 +4855,9 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "bf16x2.to.ue8m0x2.rz.satfinite" => "__nvvm_bf16x2_to_ue8m0x2_rz_satfinite", "bf2h.rn" => "__nvvm_bf2h_rn", "bf2h.rn.ftz" => "__nvvm_bf2h_rn_ftz", - "bitcast.d2ll" => "__nvvm_bitcast_d2ll", - "bitcast.f2i" => "__nvvm_bitcast_f2i", - "bitcast.i2f" => "__nvvm_bitcast_i2f", - "bitcast.ll2d" => "__nvvm_bitcast_ll2d", - "brev32" => "__nvvm_brev32", - "brev64" => "__nvvm_brev64", "ceil.d" => "__nvvm_ceil_d", "ceil.f" => "__nvvm_ceil_f", "ceil.ftz.f" => "__nvvm_ceil_ftz_f", - "clz.i" => "__nvvm_clz_i", - "clz.ll" => "__nvvm_clz_ll", "cos.approx.f" => "__nvvm_cos_approx_f", "cos.approx.ftz.f" => "__nvvm_cos_approx_ftz_f", "cp.async.commit.group" => "__nvvm_cp_async_commit_group", @@ -5012,9 +4921,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "e4m3x2.to.f16x2.rn.relu" => "__nvvm_e4m3x2_to_f16x2_rn_relu", "e5m2x2.to.f16x2.rn" => "__nvvm_e5m2x2_to_f16x2_rn", "e5m2x2.to.f16x2.rn.relu" => "__nvvm_e5m2x2_to_f16x2_rn_relu", - "ex2.approx.d" => "__nvvm_ex2_approx_d", - "ex2.approx.f" => "__nvvm_ex2_approx_f", - "ex2.approx.ftz.f" => "__nvvm_ex2_approx_ftz_f", "exit" => "__nvvm_exit", "f16x2.to.e4m3x2.rn" => "__nvvm_f16x2_to_e4m3x2_rn", "f16x2.to.e4m3x2.rn.relu" => "__nvvm_f16x2_to_e4m3x2_rn_relu", @@ -5100,9 +5006,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "__nvvm_f32x4_to_e5m2x4_rs_relu_satfinite" } "f32x4.to.e5m2x4.rs.satfinite" => "__nvvm_f32x4_to_e5m2x4_rs_satfinite", - "fabs.d" => "__nvvm_fabs_d", - "fabs.f" => "__nvvm_fabs_f", - "fabs.ftz.f" => "__nvvm_fabs_ftz_f", "ff.to.e2m1x2.rn.relu.satfinite" => "__nvvm_ff_to_e2m1x2_rn_relu_satfinite", "ff.to.e2m1x2.rn.satfinite" => "__nvvm_ff_to_e2m1x2_rn_satfinite", "ff.to.e2m3x2.rn.relu.satfinite" => "__nvvm_ff_to_e2m3x2_rn_relu_satfinite", @@ -5219,7 +5122,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "fmin.xorsign.abs.bf16x2" => "__nvvm_fmin_xorsign_abs_bf16x2", "fmin.xorsign.abs.f" => "__nvvm_fmin_xorsign_abs_f", "fns" => "__nvvm_fns", - "h2f" => "__nvvm_h2f", "i2d.rm" => "__nvvm_i2d_rm", "i2d.rn" => "__nvvm_i2d_rn", "i2d.rp" => "__nvvm_i2d_rp", @@ -5250,10 +5152,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "lohi.i2d" => "__nvvm_lohi_i2d", "match.any.sync.i32" => "__nvvm_match_any_sync_i32", "match.any.sync.i64" => "__nvvm_match_any_sync_i64", - "max.i" => "__nvvm_max_i", - "max.ll" => "__nvvm_max_ll", - "max.ui" => "__nvvm_max_ui", - "max.ull" => "__nvvm_max_ull", "mbarrier.arrive" => "__nvvm_mbarrier_arrive", "mbarrier.arrive.drop" => "__nvvm_mbarrier_arrive_drop", "mbarrier.arrive.drop.noComplete" => "__nvvm_mbarrier_arrive_drop_noComplete", @@ -5276,10 +5174,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "membar.cta" => "__nvvm_membar_cta", "membar.gl" => "__nvvm_membar_gl", "membar.sys" => "__nvvm_membar_sys", - "min.i" => "__nvvm_min_i", - "min.ll" => "__nvvm_min_ll", - "min.ui" => "__nvvm_min_ui", - "min.ull" => "__nvvm_min_ull", "mul.rm.d" => "__nvvm_mul_rm_d", "mul.rm.f" => "__nvvm_mul_rm_f", "mul.rm.ftz.f" => "__nvvm_mul_rm_ftz_f", @@ -5304,8 +5198,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "neg.bf16" => "__nvvm_neg_bf16", "neg.bf16x2" => "__nvvm_neg_bf16x2", "pm.event.mask" => "__nvvm_pm_event_mask", - "popc.i" => "__nvvm_popc_i", - "popc.ll" => "__nvvm_popc_ll", "prmt" => "__nvvm_prmt", "rcp.approx.ftz.d" => "__nvvm_rcp_approx_ftz_d", "rcp.approx.ftz.f" => "__nvvm_rcp_approx_ftz_f", @@ -5322,9 +5214,7 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "rcp.rz.f" => "__nvvm_rcp_rz_f", "rcp.rz.ftz.f" => "__nvvm_rcp_rz_ftz_f", "read.ptx.sreg.clock" => "__nvvm_read_ptx_sreg_clock", - // [DUPLICATE]: "read.ptx.sreg.clock" => "__nvvm_read_ptx_sreg_", "read.ptx.sreg.clock64" => "__nvvm_read_ptx_sreg_clock64", - // [DUPLICATE]: "read.ptx.sreg.clock64" => "__nvvm_read_ptx_sreg_", "read.ptx.sreg.ctaid.w" => "__nvvm_read_ptx_sreg_ctaid_w", "read.ptx.sreg.ctaid.x" => "__nvvm_read_ptx_sreg_ctaid_x", "read.ptx.sreg.ctaid.y" => "__nvvm_read_ptx_sreg_ctaid_y", @@ -5364,49 +5254,33 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "read.ptx.sreg.globaltimer" => "__nvvm_read_ptx_sreg_globaltimer", "read.ptx.sreg.globaltimer.lo" => "__nvvm_read_ptx_sreg_globaltimer_lo", "read.ptx.sreg.gridid" => "__nvvm_read_ptx_sreg_gridid", - // [DUPLICATE]: "read.ptx.sreg.gridid" => "__nvvm_read_ptx_sreg_", "read.ptx.sreg.laneid" => "__nvvm_read_ptx_sreg_laneid", - // [DUPLICATE]: "read.ptx.sreg.laneid" => "__nvvm_read_ptx_sreg_", "read.ptx.sreg.lanemask.eq" => "__nvvm_read_ptx_sreg_lanemask_eq", - // [DUPLICATE]: "read.ptx.sreg.lanemask.eq" => "__nvvm_read_ptx_sreg_", "read.ptx.sreg.lanemask.ge" => "__nvvm_read_ptx_sreg_lanemask_ge", - // [DUPLICATE]: "read.ptx.sreg.lanemask.ge" => "__nvvm_read_ptx_sreg_", "read.ptx.sreg.lanemask.gt" => "__nvvm_read_ptx_sreg_lanemask_gt", - // [DUPLICATE]: "read.ptx.sreg.lanemask.gt" => "__nvvm_read_ptx_sreg_", "read.ptx.sreg.lanemask.le" => "__nvvm_read_ptx_sreg_lanemask_le", - // [DUPLICATE]: "read.ptx.sreg.lanemask.le" => "__nvvm_read_ptx_sreg_", "read.ptx.sreg.lanemask.lt" => "__nvvm_read_ptx_sreg_lanemask_lt", - // [DUPLICATE]: "read.ptx.sreg.lanemask.lt" => "__nvvm_read_ptx_sreg_", "read.ptx.sreg.nctaid.w" => "__nvvm_read_ptx_sreg_nctaid_w", "read.ptx.sreg.nctaid.x" => "__nvvm_read_ptx_sreg_nctaid_x", "read.ptx.sreg.nctaid.y" => "__nvvm_read_ptx_sreg_nctaid_y", "read.ptx.sreg.nctaid.z" => "__nvvm_read_ptx_sreg_nctaid_z", "read.ptx.sreg.nsmid" => "__nvvm_read_ptx_sreg_nsmid", - // [DUPLICATE]: "read.ptx.sreg.nsmid" => "__nvvm_read_ptx_sreg_", "read.ptx.sreg.ntid.w" => "__nvvm_read_ptx_sreg_ntid_w", "read.ptx.sreg.ntid.x" => "__nvvm_read_ptx_sreg_ntid_x", "read.ptx.sreg.ntid.y" => "__nvvm_read_ptx_sreg_ntid_y", "read.ptx.sreg.ntid.z" => "__nvvm_read_ptx_sreg_ntid_z", "read.ptx.sreg.nwarpid" => "__nvvm_read_ptx_sreg_nwarpid", - // [DUPLICATE]: "read.ptx.sreg.nwarpid" => "__nvvm_read_ptx_sreg_", "read.ptx.sreg.pm0" => "__nvvm_read_ptx_sreg_pm0", - // [DUPLICATE]: "read.ptx.sreg.pm0" => "__nvvm_read_ptx_sreg_", "read.ptx.sreg.pm1" => "__nvvm_read_ptx_sreg_pm1", - // [DUPLICATE]: "read.ptx.sreg.pm1" => "__nvvm_read_ptx_sreg_", "read.ptx.sreg.pm2" => "__nvvm_read_ptx_sreg_pm2", - // [DUPLICATE]: "read.ptx.sreg.pm2" => "__nvvm_read_ptx_sreg_", "read.ptx.sreg.pm3" => "__nvvm_read_ptx_sreg_pm3", - // [DUPLICATE]: "read.ptx.sreg.pm3" => "__nvvm_read_ptx_sreg_", "read.ptx.sreg.smid" => "__nvvm_read_ptx_sreg_smid", - // [DUPLICATE]: "read.ptx.sreg.smid" => "__nvvm_read_ptx_sreg_", "read.ptx.sreg.tid.w" => "__nvvm_read_ptx_sreg_tid_w", "read.ptx.sreg.tid.x" => "__nvvm_read_ptx_sreg_tid_x", "read.ptx.sreg.tid.y" => "__nvvm_read_ptx_sreg_tid_y", "read.ptx.sreg.tid.z" => "__nvvm_read_ptx_sreg_tid_z", "read.ptx.sreg.warpid" => "__nvvm_read_ptx_sreg_warpid", - // [DUPLICATE]: "read.ptx.sreg.warpid" => "__nvvm_read_ptx_sreg_", "read.ptx.sreg.warpsize" => "__nvvm_read_ptx_sreg_warpsize", - // [DUPLICATE]: "read.ptx.sreg.warpsize" => "__nvvm_read_ptx_sreg_", "redux.sync.add" => "__nvvm_redux_sync_add", "redux.sync.and" => "__nvvm_redux_sync_and", "redux.sync.fmax" => "__nvvm_redux_sync_fmax", @@ -5424,9 +5298,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "redux.sync.umin" => "__nvvm_redux_sync_umin", "redux.sync.xor" => "__nvvm_redux_sync_xor", "reflect" => "__nvvm_reflect", - "rotate.b32" => "__nvvm_rotate_b32", - "rotate.b64" => "__nvvm_rotate_b64", - "rotate.right.b64" => "__nvvm_rotate_right_b64", "round.d" => "__nvvm_round_d", "round.f" => "__nvvm_round_f", "round.ftz.f" => "__nvvm_round_ftz_f", @@ -5692,7 +5563,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "sust.p.3d.v4i16.trap" => "__nvvm_sust_p_3d_v4i16_trap", "sust.p.3d.v4i32.trap" => "__nvvm_sust_p_3d_v4i32_trap", "sust.p.3d.v4i8.trap" => "__nvvm_sust_p_3d_v4i8_trap", - "swap.lo.hi.b64" => "__nvvm_swap_lo_hi_b64", "trunc.d" => "__nvvm_trunc_d", "trunc.f" => "__nvvm_trunc_f", "trunc.ftz.f" => "__nvvm_trunc_ftz_f", @@ -6132,89 +6002,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "packed2zoned" => "__builtin_ppc_packed2zoned", "pdepd" => "__builtin_pdepd", "pextd" => "__builtin_pextd", - "qpx.qvfabs" => "__builtin_qpx_qvfabs", - "qpx.qvfadd" => "__builtin_qpx_qvfadd", - "qpx.qvfadds" => "__builtin_qpx_qvfadds", - "qpx.qvfcfid" => "__builtin_qpx_qvfcfid", - "qpx.qvfcfids" => "__builtin_qpx_qvfcfids", - "qpx.qvfcfidu" => "__builtin_qpx_qvfcfidu", - "qpx.qvfcfidus" => "__builtin_qpx_qvfcfidus", - "qpx.qvfcmpeq" => "__builtin_qpx_qvfcmpeq", - "qpx.qvfcmpgt" => "__builtin_qpx_qvfcmpgt", - "qpx.qvfcmplt" => "__builtin_qpx_qvfcmplt", - "qpx.qvfcpsgn" => "__builtin_qpx_qvfcpsgn", - "qpx.qvfctid" => "__builtin_qpx_qvfctid", - "qpx.qvfctidu" => "__builtin_qpx_qvfctidu", - "qpx.qvfctiduz" => "__builtin_qpx_qvfctiduz", - "qpx.qvfctidz" => "__builtin_qpx_qvfctidz", - "qpx.qvfctiw" => "__builtin_qpx_qvfctiw", - "qpx.qvfctiwu" => "__builtin_qpx_qvfctiwu", - "qpx.qvfctiwuz" => "__builtin_qpx_qvfctiwuz", - "qpx.qvfctiwz" => "__builtin_qpx_qvfctiwz", - "qpx.qvflogical" => "__builtin_qpx_qvflogical", - "qpx.qvfmadd" => "__builtin_qpx_qvfmadd", - "qpx.qvfmadds" => "__builtin_qpx_qvfmadds", - "qpx.qvfmsub" => "__builtin_qpx_qvfmsub", - "qpx.qvfmsubs" => "__builtin_qpx_qvfmsubs", - "qpx.qvfmul" => "__builtin_qpx_qvfmul", - "qpx.qvfmuls" => "__builtin_qpx_qvfmuls", - "qpx.qvfnabs" => "__builtin_qpx_qvfnabs", - "qpx.qvfneg" => "__builtin_qpx_qvfneg", - "qpx.qvfnmadd" => "__builtin_qpx_qvfnmadd", - "qpx.qvfnmadds" => "__builtin_qpx_qvfnmadds", - "qpx.qvfnmsub" => "__builtin_qpx_qvfnmsub", - "qpx.qvfnmsubs" => "__builtin_qpx_qvfnmsubs", - "qpx.qvfperm" => "__builtin_qpx_qvfperm", - "qpx.qvfre" => "__builtin_qpx_qvfre", - "qpx.qvfres" => "__builtin_qpx_qvfres", - "qpx.qvfrim" => "__builtin_qpx_qvfrim", - "qpx.qvfrin" => "__builtin_qpx_qvfrin", - "qpx.qvfrip" => "__builtin_qpx_qvfrip", - "qpx.qvfriz" => "__builtin_qpx_qvfriz", - "qpx.qvfrsp" => "__builtin_qpx_qvfrsp", - "qpx.qvfrsqrte" => "__builtin_qpx_qvfrsqrte", - "qpx.qvfrsqrtes" => "__builtin_qpx_qvfrsqrtes", - "qpx.qvfsel" => "__builtin_qpx_qvfsel", - "qpx.qvfsub" => "__builtin_qpx_qvfsub", - "qpx.qvfsubs" => "__builtin_qpx_qvfsubs", - "qpx.qvftstnan" => "__builtin_qpx_qvftstnan", - "qpx.qvfxmadd" => "__builtin_qpx_qvfxmadd", - "qpx.qvfxmadds" => "__builtin_qpx_qvfxmadds", - "qpx.qvfxmul" => "__builtin_qpx_qvfxmul", - "qpx.qvfxmuls" => "__builtin_qpx_qvfxmuls", - "qpx.qvfxxcpnmadd" => "__builtin_qpx_qvfxxcpnmadd", - "qpx.qvfxxcpnmadds" => "__builtin_qpx_qvfxxcpnmadds", - "qpx.qvfxxmadd" => "__builtin_qpx_qvfxxmadd", - "qpx.qvfxxmadds" => "__builtin_qpx_qvfxxmadds", - "qpx.qvfxxnpmadd" => "__builtin_qpx_qvfxxnpmadd", - "qpx.qvfxxnpmadds" => "__builtin_qpx_qvfxxnpmadds", - "qpx.qvgpci" => "__builtin_qpx_qvgpci", - "qpx.qvlfcd" => "__builtin_qpx_qvlfcd", - "qpx.qvlfcda" => "__builtin_qpx_qvlfcda", - "qpx.qvlfcs" => "__builtin_qpx_qvlfcs", - "qpx.qvlfcsa" => "__builtin_qpx_qvlfcsa", - "qpx.qvlfd" => "__builtin_qpx_qvlfd", - "qpx.qvlfda" => "__builtin_qpx_qvlfda", - "qpx.qvlfiwa" => "__builtin_qpx_qvlfiwa", - "qpx.qvlfiwaa" => "__builtin_qpx_qvlfiwaa", - "qpx.qvlfiwz" => "__builtin_qpx_qvlfiwz", - "qpx.qvlfiwza" => "__builtin_qpx_qvlfiwza", - "qpx.qvlfs" => "__builtin_qpx_qvlfs", - "qpx.qvlfsa" => "__builtin_qpx_qvlfsa", - "qpx.qvlpcld" => "__builtin_qpx_qvlpcld", - "qpx.qvlpcls" => "__builtin_qpx_qvlpcls", - "qpx.qvlpcrd" => "__builtin_qpx_qvlpcrd", - "qpx.qvlpcrs" => "__builtin_qpx_qvlpcrs", - "qpx.qvstfcd" => "__builtin_qpx_qvstfcd", - "qpx.qvstfcda" => "__builtin_qpx_qvstfcda", - "qpx.qvstfcs" => "__builtin_qpx_qvstfcs", - "qpx.qvstfcsa" => "__builtin_qpx_qvstfcsa", - "qpx.qvstfd" => "__builtin_qpx_qvstfd", - "qpx.qvstfda" => "__builtin_qpx_qvstfda", - "qpx.qvstfiw" => "__builtin_qpx_qvstfiw", - "qpx.qvstfiwa" => "__builtin_qpx_qvstfiwa", - "qpx.qvstfs" => "__builtin_qpx_qvstfs", - "qpx.qvstfsa" => "__builtin_qpx_qvstfsa", "readflm" => "__builtin_readflm", "rlwimi" => "__builtin_ppc_rlwimi", "rlwnm" => "__builtin_ppc_rlwnm", @@ -6329,33 +6116,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { } ppc(name, full_name) } - "ptx" => { - fn ptx(name: &str, full_name: &str) -> &'static str { - match name { - // ptx - "bar.sync" => "__builtin_ptx_bar_sync", - "read.clock" => "__builtin_ptx_read_clock", - "read.clock64" => "__builtin_ptx_read_clock64", - "read.gridid" => "__builtin_ptx_read_gridid", - "read.laneid" => "__builtin_ptx_read_laneid", - "read.lanemask.eq" => "__builtin_ptx_read_lanemask_eq", - "read.lanemask.ge" => "__builtin_ptx_read_lanemask_ge", - "read.lanemask.gt" => "__builtin_ptx_read_lanemask_gt", - "read.lanemask.le" => "__builtin_ptx_read_lanemask_le", - "read.lanemask.lt" => "__builtin_ptx_read_lanemask_lt", - "read.nsmid" => "__builtin_ptx_read_nsmid", - "read.nwarpid" => "__builtin_ptx_read_nwarpid", - "read.pm0" => "__builtin_ptx_read_pm0", - "read.pm1" => "__builtin_ptx_read_pm1", - "read.pm2" => "__builtin_ptx_read_pm2", - "read.pm3" => "__builtin_ptx_read_pm3", - "read.smid" => "__builtin_ptx_read_smid", - "read.warpid" => "__builtin_ptx_read_warpid", - _ => unimplemented!("***** unsupported LLVM intrinsic {full_name}"), - } - } - ptx(name, full_name) - } "r600" => { fn r600(name: &str, full_name: &str) -> &'static str { match name { @@ -7902,10 +7662,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "aadd64" => "__builtin_ia32_aadd64", "aand32" => "__builtin_ia32_aand32", "aand64" => "__builtin_ia32_aand64", - "addcarry.u32" => "__builtin_ia32_addcarry_u32", - "addcarry.u64" => "__builtin_ia32_addcarry_u64", - "addcarryx.u32" => "__builtin_ia32_addcarryx_u32", - "addcarryx.u64" => "__builtin_ia32_addcarryx_u64", "aesni.aesdec" => "__builtin_ia32_aesdec128", "aesni.aesdec.256" => "__builtin_ia32_aesdec256", "aesni.aesdec.512" => "__builtin_ia32_aesdec512", @@ -7924,18 +7680,11 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "aor64" => "__builtin_ia32_aor64", "avx.addsub.pd.256" => "__builtin_ia32_addsubpd256", "avx.addsub.ps.256" => "__builtin_ia32_addsubps256", - "avx.blend.pd.256" => "__builtin_ia32_blendpd256", - "avx.blend.ps.256" => "__builtin_ia32_blendps256", "avx.blendv.pd.256" => "__builtin_ia32_blendvpd256", "avx.blendv.ps.256" => "__builtin_ia32_blendvps256", - "avx.cmp.pd.256" => "__builtin_ia32_cmppd256", - "avx.cmp.ps.256" => "__builtin_ia32_cmpps256", "avx.cvt.pd2.ps.256" => "__builtin_ia32_cvtpd2ps256", "avx.cvt.pd2dq.256" => "__builtin_ia32_cvtpd2dq256", - "avx.cvt.ps2.pd.256" => "__builtin_ia32_cvtps2pd256", "avx.cvt.ps2dq.256" => "__builtin_ia32_cvtps2dq256", - "avx.cvtdq2.pd.256" => "__builtin_ia32_cvtdq2pd256", - "avx.cvtdq2.ps.256" => "__builtin_ia32_cvtdq2ps256", "avx.cvtt.pd2dq.256" => "__builtin_ia32_cvttpd2dq256", "avx.cvtt.ps2dq.256" => "__builtin_ia32_cvttps2dq256", "avx.dp.ps.256" => "__builtin_ia32_dpps256", @@ -7965,22 +7714,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx.round.pd.256" => "__builtin_ia32_roundpd256", "avx.round.ps.256" => "__builtin_ia32_roundps256", "avx.rsqrt.ps.256" => "__builtin_ia32_rsqrtps256", - "avx.sqrt.pd.256" => "__builtin_ia32_sqrtpd256", - "avx.sqrt.ps.256" => "__builtin_ia32_sqrtps256", - "avx.storeu.dq.256" => "__builtin_ia32_storedqu256", - "avx.storeu.pd.256" => "__builtin_ia32_storeupd256", - "avx.storeu.ps.256" => "__builtin_ia32_storeups256", - "avx.vbroadcastf128.pd.256" => "__builtin_ia32_vbroadcastf128_pd256", - "avx.vbroadcastf128.ps.256" => "__builtin_ia32_vbroadcastf128_ps256", - "avx.vextractf128.pd.256" => "__builtin_ia32_vextractf128_pd256", - "avx.vextractf128.ps.256" => "__builtin_ia32_vextractf128_ps256", - "avx.vextractf128.si.256" => "__builtin_ia32_vextractf128_si256", - "avx.vinsertf128.pd.256" => "__builtin_ia32_vinsertf128_pd256", - "avx.vinsertf128.ps.256" => "__builtin_ia32_vinsertf128_ps256", - "avx.vinsertf128.si.256" => "__builtin_ia32_vinsertf128_si256", - "avx.vperm2f128.pd.256" => "__builtin_ia32_vperm2f128_pd256", - "avx.vperm2f128.ps.256" => "__builtin_ia32_vperm2f128_ps256", - "avx.vperm2f128.si.256" => "__builtin_ia32_vperm2f128_si256", "avx.vpermilvar.pd" => "__builtin_ia32_vpermilvarpd", "avx.vpermilvar.pd.256" => "__builtin_ia32_vpermilvarpd256", "avx.vpermilvar.ps" => "__builtin_ia32_vpermilvarps", @@ -8265,33 +7998,14 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx2.maskstore.d.256" => "__builtin_ia32_maskstored256", "avx2.maskstore.q" => "__builtin_ia32_maskstoreq", "avx2.maskstore.q.256" => "__builtin_ia32_maskstoreq256", - "avx2.movntdqa" => "__builtin_ia32_movntdqa256", "avx2.mpsadbw" => "__builtin_ia32_mpsadbw256", - "avx2.pabs.b" => "__builtin_ia32_pabsb256", - "avx2.pabs.d" => "__builtin_ia32_pabsd256", - "avx2.pabs.w" => "__builtin_ia32_pabsw256", "avx2.packssdw" => "__builtin_ia32_packssdw256", "avx2.packsswb" => "__builtin_ia32_packsswb256", "avx2.packusdw" => "__builtin_ia32_packusdw256", "avx2.packuswb" => "__builtin_ia32_packuswb256", - "avx2.padds.b" => "__builtin_ia32_paddsb256", - "avx2.padds.w" => "__builtin_ia32_paddsw256", - "avx2.paddus.b" => "__builtin_ia32_paddusb256", - "avx2.paddus.w" => "__builtin_ia32_paddusw256", "avx2.pavg.b" => "__builtin_ia32_pavgb256", "avx2.pavg.w" => "__builtin_ia32_pavgw256", - "avx2.pblendd.128" => "__builtin_ia32_pblendd128", - "avx2.pblendd.256" => "__builtin_ia32_pblendd256", "avx2.pblendvb" => "__builtin_ia32_pblendvb256", - "avx2.pblendw" => "__builtin_ia32_pblendw256", - "avx2.pbroadcastb.128" => "__builtin_ia32_pbroadcastb128", - "avx2.pbroadcastb.256" => "__builtin_ia32_pbroadcastb256", - "avx2.pbroadcastd.128" => "__builtin_ia32_pbroadcastd128", - "avx2.pbroadcastd.256" => "__builtin_ia32_pbroadcastd256", - "avx2.pbroadcastq.128" => "__builtin_ia32_pbroadcastq128", - "avx2.pbroadcastq.256" => "__builtin_ia32_pbroadcastq256", - "avx2.pbroadcastw.128" => "__builtin_ia32_pbroadcastw128", - "avx2.pbroadcastw.256" => "__builtin_ia32_pbroadcastw256", "avx2.permd" => "__builtin_ia32_permvarsi256", "avx2.permps" => "__builtin_ia32_permvarsf256", "avx2.phadd.d" => "__builtin_ia32_phaddd256", @@ -8302,44 +8016,16 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx2.phsub.w" => "__builtin_ia32_phsubw256", "avx2.pmadd.ub.sw" => "__builtin_ia32_pmaddubsw256", "avx2.pmadd.wd" => "__builtin_ia32_pmaddwd256", - "avx2.pmaxs.b" => "__builtin_ia32_pmaxsb256", - "avx2.pmaxs.d" => "__builtin_ia32_pmaxsd256", - "avx2.pmaxs.w" => "__builtin_ia32_pmaxsw256", - "avx2.pmaxu.b" => "__builtin_ia32_pmaxub256", - "avx2.pmaxu.d" => "__builtin_ia32_pmaxud256", - "avx2.pmaxu.w" => "__builtin_ia32_pmaxuw256", - "avx2.pmins.b" => "__builtin_ia32_pminsb256", - "avx2.pmins.d" => "__builtin_ia32_pminsd256", - "avx2.pmins.w" => "__builtin_ia32_pminsw256", - "avx2.pminu.b" => "__builtin_ia32_pminub256", - "avx2.pminu.d" => "__builtin_ia32_pminud256", - "avx2.pminu.w" => "__builtin_ia32_pminuw256", "avx2.pmovmskb" => "__builtin_ia32_pmovmskb256", - "avx2.pmovsxbd" => "__builtin_ia32_pmovsxbd256", - "avx2.pmovsxbq" => "__builtin_ia32_pmovsxbq256", - "avx2.pmovsxbw" => "__builtin_ia32_pmovsxbw256", - "avx2.pmovsxdq" => "__builtin_ia32_pmovsxdq256", - "avx2.pmovsxwd" => "__builtin_ia32_pmovsxwd256", - "avx2.pmovsxwq" => "__builtin_ia32_pmovsxwq256", - "avx2.pmovzxbd" => "__builtin_ia32_pmovzxbd256", - "avx2.pmovzxbq" => "__builtin_ia32_pmovzxbq256", - "avx2.pmovzxbw" => "__builtin_ia32_pmovzxbw256", - "avx2.pmovzxdq" => "__builtin_ia32_pmovzxdq256", - "avx2.pmovzxwd" => "__builtin_ia32_pmovzxwd256", - "avx2.pmovzxwq" => "__builtin_ia32_pmovzxwq256", - "avx2.pmul.dq" => "__builtin_ia32_pmuldq256", "avx2.pmul.hr.sw" => "__builtin_ia32_pmulhrsw256", "avx2.pmulh.w" => "__builtin_ia32_pmulhw256", "avx2.pmulhu.w" => "__builtin_ia32_pmulhuw256", - "avx2.pmulu.dq" => "__builtin_ia32_pmuludq256", "avx2.psad.bw" => "__builtin_ia32_psadbw256", "avx2.pshuf.b" => "__builtin_ia32_pshufb256", "avx2.psign.b" => "__builtin_ia32_psignb256", "avx2.psign.d" => "__builtin_ia32_psignd256", "avx2.psign.w" => "__builtin_ia32_psignw256", "avx2.psll.d" => "__builtin_ia32_pslld256", - "avx2.psll.dq" => "__builtin_ia32_pslldqi256", - "avx2.psll.dq.bs" => "__builtin_ia32_pslldqi256_byteshift", "avx2.psll.q" => "__builtin_ia32_psllq256", "avx2.psll.w" => "__builtin_ia32_psllw256", "avx2.pslli.d" => "__builtin_ia32_pslldi256", @@ -8356,8 +8042,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx2.psrav.d" => "__builtin_ia32_psrav4si", "avx2.psrav.d.256" => "__builtin_ia32_psrav8si", "avx2.psrl.d" => "__builtin_ia32_psrld256", - "avx2.psrl.dq" => "__builtin_ia32_psrldqi256", - "avx2.psrl.dq.bs" => "__builtin_ia32_psrldqi256_byteshift", "avx2.psrl.q" => "__builtin_ia32_psrlq256", "avx2.psrl.w" => "__builtin_ia32_psrlw256", "avx2.psrli.d" => "__builtin_ia32_psrldi256", @@ -8367,15 +8051,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx2.psrlv.d.256" => "__builtin_ia32_psrlv8si", "avx2.psrlv.q" => "__builtin_ia32_psrlv2di", "avx2.psrlv.q.256" => "__builtin_ia32_psrlv4di", - "avx2.psubs.b" => "__builtin_ia32_psubsb256", - "avx2.psubs.w" => "__builtin_ia32_psubsw256", - "avx2.psubus.b" => "__builtin_ia32_psubusb256", - "avx2.psubus.w" => "__builtin_ia32_psubusw256", - "avx2.vbroadcast.sd.pd.256" => "__builtin_ia32_vbroadcastsd_pd256", - "avx2.vbroadcast.ss.ps" => "__builtin_ia32_vbroadcastss_ps", - "avx2.vbroadcast.ss.ps.256" => "__builtin_ia32_vbroadcastss_ps256", - "avx2.vextracti128" => "__builtin_ia32_extract128i256", - "avx2.vinserti128" => "__builtin_ia32_insert128i256", "avx2.vpdpbssd.128" => "__builtin_ia32_vpdpbssd128", "avx2.vpdpbssd.256" => "__builtin_ia32_vpdpbssd256", "avx2.vpdpbssds.128" => "__builtin_ia32_vpdpbssds128", @@ -8400,7 +8075,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx2.vpdpwuud.256" => "__builtin_ia32_vpdpwuud256", "avx2.vpdpwuuds.128" => "__builtin_ia32_vpdpwuuds128", "avx2.vpdpwuuds.256" => "__builtin_ia32_vpdpwuuds256", - "avx2.vperm2i128" => "__builtin_ia32_permti256", "avx512.add.pd.512" => "__builtin_ia32_addpd512", "avx512.add.ps.512" => "__builtin_ia32_addps512", "avx512.broadcastmb.128" => "__builtin_ia32_broadcastmb128", @@ -8415,194 +8089,32 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx512.conflict.q.128" => "__builtin_ia32_vpconflictdi_128", "avx512.conflict.q.256" => "__builtin_ia32_vpconflictdi_256", "avx512.conflict.q.512" => "__builtin_ia32_vpconflictdi_512", - "avx512.cvtb2mask.128" => "__builtin_ia32_cvtb2mask128", - "avx512.cvtb2mask.256" => "__builtin_ia32_cvtb2mask256", - "avx512.cvtb2mask.512" => "__builtin_ia32_cvtb2mask512", - "avx512.cvtd2mask.128" => "__builtin_ia32_cvtd2mask128", - "avx512.cvtd2mask.256" => "__builtin_ia32_cvtd2mask256", - "avx512.cvtd2mask.512" => "__builtin_ia32_cvtd2mask512", - "avx512.cvtmask2b.128" => "__builtin_ia32_cvtmask2b128", - "avx512.cvtmask2b.256" => "__builtin_ia32_cvtmask2b256", - "avx512.cvtmask2b.512" => "__builtin_ia32_cvtmask2b512", - "avx512.cvtmask2d.128" => "__builtin_ia32_cvtmask2d128", - "avx512.cvtmask2d.256" => "__builtin_ia32_cvtmask2d256", - "avx512.cvtmask2d.512" => "__builtin_ia32_cvtmask2d512", - "avx512.cvtmask2q.128" => "__builtin_ia32_cvtmask2q128", - "avx512.cvtmask2q.256" => "__builtin_ia32_cvtmask2q256", - "avx512.cvtmask2q.512" => "__builtin_ia32_cvtmask2q512", - "avx512.cvtmask2w.128" => "__builtin_ia32_cvtmask2w128", - "avx512.cvtmask2w.256" => "__builtin_ia32_cvtmask2w256", - "avx512.cvtmask2w.512" => "__builtin_ia32_cvtmask2w512", - "avx512.cvtq2mask.128" => "__builtin_ia32_cvtq2mask128", - "avx512.cvtq2mask.256" => "__builtin_ia32_cvtq2mask256", - "avx512.cvtq2mask.512" => "__builtin_ia32_cvtq2mask512", - "avx512.cvtsd2usi" => "__builtin_ia32_cvtsd2usi", - "avx512.cvtsd2usi64" => "__builtin_ia32_cvtsd2usi64", - "avx512.cvtsi2sd32" => "__builtin_ia32_cvtsi2sd32", "avx512.cvtsi2sd64" => "__builtin_ia32_cvtsi2sd64", "avx512.cvtsi2ss32" => "__builtin_ia32_cvtsi2ss32", "avx512.cvtsi2ss64" => "__builtin_ia32_cvtsi2ss64", - "avx512.cvtss2usi" => "__builtin_ia32_cvtss2usi", - "avx512.cvtss2usi64" => "__builtin_ia32_cvtss2usi64", "avx512.cvttsd2si" => "__builtin_ia32_vcvttsd2si32", "avx512.cvttsd2si64" => "__builtin_ia32_vcvttsd2si64", "avx512.cvttsd2usi" => "__builtin_ia32_vcvttsd2usi32", - // [DUPLICATE]: "avx512.cvttsd2usi" => "__builtin_ia32_cvttsd2usi", "avx512.cvttsd2usi64" => "__builtin_ia32_vcvttsd2usi64", - // [DUPLICATE]: "avx512.cvttsd2usi64" => "__builtin_ia32_cvttsd2usi64", "avx512.cvttss2si" => "__builtin_ia32_vcvttss2si32", "avx512.cvttss2si64" => "__builtin_ia32_vcvttss2si64", "avx512.cvttss2usi" => "__builtin_ia32_vcvttss2usi32", - // [DUPLICATE]: "avx512.cvttss2usi" => "__builtin_ia32_cvttss2usi", "avx512.cvttss2usi64" => "__builtin_ia32_vcvttss2usi64", - // [DUPLICATE]: "avx512.cvttss2usi64" => "__builtin_ia32_cvttss2usi64", - "avx512.cvtusi2sd" => "__builtin_ia32_cvtusi2sd", - // [DUPLICATE]: "avx512.cvtusi2sd" => "__builtin_ia32_cvtusi2sd32", "avx512.cvtusi2ss" => "__builtin_ia32_cvtusi2ss32", - // [DUPLICATE]: "avx512.cvtusi2ss" => "__builtin_ia32_cvtusi2ss", "avx512.cvtusi642sd" => "__builtin_ia32_cvtusi2sd64", - // [DUPLICATE]: "avx512.cvtusi642sd" => "__builtin_ia32_cvtusi642sd", "avx512.cvtusi642ss" => "__builtin_ia32_cvtusi2ss64", - // [DUPLICATE]: "avx512.cvtusi642ss" => "__builtin_ia32_cvtusi642ss", - "avx512.cvtw2mask.128" => "__builtin_ia32_cvtw2mask128", - "avx512.cvtw2mask.256" => "__builtin_ia32_cvtw2mask256", - "avx512.cvtw2mask.512" => "__builtin_ia32_cvtw2mask512", "avx512.dbpsadbw.128" => "__builtin_ia32_dbpsadbw128", "avx512.dbpsadbw.256" => "__builtin_ia32_dbpsadbw256", "avx512.dbpsadbw.512" => "__builtin_ia32_dbpsadbw512", "avx512.div.pd.512" => "__builtin_ia32_divpd512", "avx512.div.ps.512" => "__builtin_ia32_divps512", - "avx512.exp2.pd" => "__builtin_ia32_exp2pd_mask", - "avx512.exp2.ps" => "__builtin_ia32_exp2ps_mask", - "avx512.gather.dpd.512" => "__builtin_ia32_gathersiv8df", - "avx512.gather.dpi.512" => "__builtin_ia32_gathersiv16si", - "avx512.gather.dpq.512" => "__builtin_ia32_gathersiv8di", - "avx512.gather.dps.512" => "__builtin_ia32_gathersiv16sf", - "avx512.gather.qpd.512" => "__builtin_ia32_gatherdiv8df", - "avx512.gather.qpi.512" => "__builtin_ia32_gatherdiv16si", - "avx512.gather.qpq.512" => "__builtin_ia32_gatherdiv8di", - "avx512.gather.qps.512" => "__builtin_ia32_gatherdiv16sf", - "avx512.gather3div2.df" => "__builtin_ia32_gather3div2df", - "avx512.gather3div2.di" => "__builtin_ia32_gather3div2di", - "avx512.gather3div4.df" => "__builtin_ia32_gather3div4df", - "avx512.gather3div4.di" => "__builtin_ia32_gather3div4di", - "avx512.gather3div4.sf" => "__builtin_ia32_gather3div4sf", - "avx512.gather3div4.si" => "__builtin_ia32_gather3div4si", - "avx512.gather3div8.sf" => "__builtin_ia32_gather3div8sf", - "avx512.gather3div8.si" => "__builtin_ia32_gather3div8si", - "avx512.gather3siv2.df" => "__builtin_ia32_gather3siv2df", - "avx512.gather3siv2.di" => "__builtin_ia32_gather3siv2di", - "avx512.gather3siv4.df" => "__builtin_ia32_gather3siv4df", - "avx512.gather3siv4.di" => "__builtin_ia32_gather3siv4di", - "avx512.gather3siv4.sf" => "__builtin_ia32_gather3siv4sf", - "avx512.gather3siv4.si" => "__builtin_ia32_gather3siv4si", - "avx512.gather3siv8.sf" => "__builtin_ia32_gather3siv8sf", - "avx512.gather3siv8.si" => "__builtin_ia32_gather3siv8si", - "avx512.gatherpf.dpd.512" => "__builtin_ia32_gatherpfdpd", - "avx512.gatherpf.dps.512" => "__builtin_ia32_gatherpfdps", - "avx512.gatherpf.qpd.512" => "__builtin_ia32_gatherpfqpd", - "avx512.gatherpf.qps.512" => "__builtin_ia32_gatherpfqps", - "avx512.kand.w" => "__builtin_ia32_kandhi", - "avx512.kandn.w" => "__builtin_ia32_kandnhi", - "avx512.knot.w" => "__builtin_ia32_knothi", - "avx512.kor.w" => "__builtin_ia32_korhi", - "avx512.kortestc.w" => "__builtin_ia32_kortestchi", - "avx512.kortestz.w" => "__builtin_ia32_kortestzhi", - "avx512.kunpck.bw" => "__builtin_ia32_kunpckhi", - "avx512.kunpck.dq" => "__builtin_ia32_kunpckdi", - "avx512.kunpck.wd" => "__builtin_ia32_kunpcksi", - "avx512.kxnor.w" => "__builtin_ia32_kxnorhi", - "avx512.kxor.w" => "__builtin_ia32_kxorhi", - "avx512.mask.add.pd.128" => "__builtin_ia32_addpd128_mask", - "avx512.mask.add.pd.256" => "__builtin_ia32_addpd256_mask", - "avx512.mask.add.pd.512" => "__builtin_ia32_addpd512_mask", - "avx512.mask.add.ps.128" => "__builtin_ia32_addps128_mask", - "avx512.mask.add.ps.256" => "__builtin_ia32_addps256_mask", - "avx512.mask.add.ps.512" => "__builtin_ia32_addps512_mask", // [INVALID CONVERSION]: "avx512.mask.add.sd.round" => "__builtin_ia32_addsd_round_mask", // [INVALID CONVERSION]: "avx512.mask.add.ss.round" => "__builtin_ia32_addss_round_mask", - "avx512.mask.and.pd.128" => "__builtin_ia32_andpd128_mask", - "avx512.mask.and.pd.256" => "__builtin_ia32_andpd256_mask", - "avx512.mask.and.pd.512" => "__builtin_ia32_andpd512_mask", - "avx512.mask.and.ps.128" => "__builtin_ia32_andps128_mask", - "avx512.mask.and.ps.256" => "__builtin_ia32_andps256_mask", - "avx512.mask.and.ps.512" => "__builtin_ia32_andps512_mask", - "avx512.mask.andn.pd.128" => "__builtin_ia32_andnpd128_mask", - "avx512.mask.andn.pd.256" => "__builtin_ia32_andnpd256_mask", - "avx512.mask.andn.pd.512" => "__builtin_ia32_andnpd512_mask", - "avx512.mask.andn.ps.128" => "__builtin_ia32_andnps128_mask", - "avx512.mask.andn.ps.256" => "__builtin_ia32_andnps256_mask", - "avx512.mask.andn.ps.512" => "__builtin_ia32_andnps512_mask", - "avx512.mask.blend.d.512" => "__builtin_ia32_blendmd_512_mask", - "avx512.mask.blend.pd.512" => "__builtin_ia32_blendmpd_512_mask", - "avx512.mask.blend.ps.512" => "__builtin_ia32_blendmps_512_mask", - "avx512.mask.blend.q.512" => "__builtin_ia32_blendmq_512_mask", - "avx512.mask.broadcastf32x2.256" => "__builtin_ia32_broadcastf32x2_256_mask", - "avx512.mask.broadcastf32x2.512" => "__builtin_ia32_broadcastf32x2_512_mask", - "avx512.mask.broadcastf32x4.256" => "__builtin_ia32_broadcastf32x4_256_mask", - "avx512.mask.broadcastf32x4.512" => "__builtin_ia32_broadcastf32x4_512", - "avx512.mask.broadcastf32x8.512" => "__builtin_ia32_broadcastf32x8_512_mask", - "avx512.mask.broadcastf64x2.256" => "__builtin_ia32_broadcastf64x2_256_mask", - "avx512.mask.broadcastf64x2.512" => "__builtin_ia32_broadcastf64x2_512_mask", - "avx512.mask.broadcastf64x4.512" => "__builtin_ia32_broadcastf64x4_512", - "avx512.mask.broadcasti32x2.128" => "__builtin_ia32_broadcasti32x2_128_mask", - "avx512.mask.broadcasti32x2.256" => "__builtin_ia32_broadcasti32x2_256_mask", - "avx512.mask.broadcasti32x2.512" => "__builtin_ia32_broadcasti32x2_512_mask", - "avx512.mask.broadcasti32x4.256" => "__builtin_ia32_broadcasti32x4_256_mask", - "avx512.mask.broadcasti32x4.512" => "__builtin_ia32_broadcasti32x4_512", - "avx512.mask.broadcasti32x8.512" => "__builtin_ia32_broadcasti32x8_512_mask", - "avx512.mask.broadcasti64x2.256" => "__builtin_ia32_broadcasti64x2_256_mask", - "avx512.mask.broadcasti64x2.512" => "__builtin_ia32_broadcasti64x2_512_mask", - "avx512.mask.broadcasti64x4.512" => "__builtin_ia32_broadcasti64x4_512", - "avx512.mask.cmp.pd.128" => "__builtin_ia32_cmppd128_mask", - "avx512.mask.cmp.pd.256" => "__builtin_ia32_cmppd256_mask", - "avx512.mask.cmp.pd.512" => "__builtin_ia32_cmppd512_mask", - "avx512.mask.cmp.ps.128" => "__builtin_ia32_cmpps128_mask", - "avx512.mask.cmp.ps.256" => "__builtin_ia32_cmpps256_mask", - "avx512.mask.cmp.ps.512" => "__builtin_ia32_cmpps512_mask", "avx512.mask.cmp.sd" => "__builtin_ia32_cmpsd_mask", "avx512.mask.cmp.ss" => "__builtin_ia32_cmpss_mask", - "avx512.mask.compress.d.128" => "__builtin_ia32_compresssi128_mask", - "avx512.mask.compress.d.256" => "__builtin_ia32_compresssi256_mask", - "avx512.mask.compress.d.512" => "__builtin_ia32_compresssi512_mask", - "avx512.mask.compress.pd.128" => "__builtin_ia32_compressdf128_mask", - "avx512.mask.compress.pd.256" => "__builtin_ia32_compressdf256_mask", - "avx512.mask.compress.pd.512" => "__builtin_ia32_compressdf512_mask", - "avx512.mask.compress.ps.128" => "__builtin_ia32_compresssf128_mask", - "avx512.mask.compress.ps.256" => "__builtin_ia32_compresssf256_mask", - "avx512.mask.compress.ps.512" => "__builtin_ia32_compresssf512_mask", - "avx512.mask.compress.q.128" => "__builtin_ia32_compressdi128_mask", - "avx512.mask.compress.q.256" => "__builtin_ia32_compressdi256_mask", - "avx512.mask.compress.q.512" => "__builtin_ia32_compressdi512_mask", - "avx512.mask.compress.store.d.128" => "__builtin_ia32_compressstoresi128_mask", - "avx512.mask.compress.store.d.256" => "__builtin_ia32_compressstoresi256_mask", - "avx512.mask.compress.store.d.512" => "__builtin_ia32_compressstoresi512_mask", - "avx512.mask.compress.store.pd.128" => "__builtin_ia32_compressstoredf128_mask", - "avx512.mask.compress.store.pd.256" => "__builtin_ia32_compressstoredf256_mask", - "avx512.mask.compress.store.pd.512" => "__builtin_ia32_compressstoredf512_mask", - "avx512.mask.compress.store.ps.128" => "__builtin_ia32_compressstoresf128_mask", - "avx512.mask.compress.store.ps.256" => "__builtin_ia32_compressstoresf256_mask", - "avx512.mask.compress.store.ps.512" => "__builtin_ia32_compressstoresf512_mask", - "avx512.mask.compress.store.q.128" => "__builtin_ia32_compressstoredi128_mask", - "avx512.mask.compress.store.q.256" => "__builtin_ia32_compressstoredi256_mask", - "avx512.mask.compress.store.q.512" => "__builtin_ia32_compressstoredi512_mask", - "avx512.mask.conflict.d.128" => "__builtin_ia32_vpconflictsi_128_mask", - "avx512.mask.conflict.d.256" => "__builtin_ia32_vpconflictsi_256_mask", - "avx512.mask.conflict.d.512" => "__builtin_ia32_vpconflictsi_512_mask", - "avx512.mask.conflict.q.128" => "__builtin_ia32_vpconflictdi_128_mask", - "avx512.mask.conflict.q.256" => "__builtin_ia32_vpconflictdi_256_mask", - "avx512.mask.conflict.q.512" => "__builtin_ia32_vpconflictdi_512_mask", - "avx512.mask.cvtdq2pd.128" => "__builtin_ia32_cvtdq2pd128_mask", - "avx512.mask.cvtdq2pd.256" => "__builtin_ia32_cvtdq2pd256_mask", - "avx512.mask.cvtdq2pd.512" => "__builtin_ia32_cvtdq2pd512_mask", - "avx512.mask.cvtdq2ps.128" => "__builtin_ia32_cvtdq2ps128_mask", - "avx512.mask.cvtdq2ps.256" => "__builtin_ia32_cvtdq2ps256_mask", - "avx512.mask.cvtdq2ps.512" => "__builtin_ia32_cvtdq2ps512_mask", "avx512.mask.cvtpd2dq.128" => "__builtin_ia32_cvtpd2dq128_mask", - "avx512.mask.cvtpd2dq.256" => "__builtin_ia32_cvtpd2dq256_mask", "avx512.mask.cvtpd2dq.512" => "__builtin_ia32_cvtpd2dq512_mask", "avx512.mask.cvtpd2ps" => "__builtin_ia32_cvtpd2ps_mask", - "avx512.mask.cvtpd2ps.256" => "__builtin_ia32_cvtpd2ps256_mask", "avx512.mask.cvtpd2ps.512" => "__builtin_ia32_cvtpd2ps512_mask", "avx512.mask.cvtpd2qq.128" => "__builtin_ia32_cvtpd2qq128_mask", "avx512.mask.cvtpd2qq.256" => "__builtin_ia32_cvtpd2qq256_mask", @@ -8616,8 +8128,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx512.mask.cvtps2dq.128" => "__builtin_ia32_cvtps2dq128_mask", "avx512.mask.cvtps2dq.256" => "__builtin_ia32_cvtps2dq256_mask", "avx512.mask.cvtps2dq.512" => "__builtin_ia32_cvtps2dq512_mask", - "avx512.mask.cvtps2pd.128" => "__builtin_ia32_cvtps2pd128_mask", - "avx512.mask.cvtps2pd.256" => "__builtin_ia32_cvtps2pd256_mask", "avx512.mask.cvtps2pd.512" => "__builtin_ia32_cvtps2pd512_mask", "avx512.mask.cvtps2qq.128" => "__builtin_ia32_cvtps2qq128_mask", "avx512.mask.cvtps2qq.256" => "__builtin_ia32_cvtps2qq256_mask", @@ -8628,16 +8138,10 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx512.mask.cvtps2uqq.128" => "__builtin_ia32_cvtps2uqq128_mask", "avx512.mask.cvtps2uqq.256" => "__builtin_ia32_cvtps2uqq256_mask", "avx512.mask.cvtps2uqq.512" => "__builtin_ia32_cvtps2uqq512_mask", - "avx512.mask.cvtqq2pd.128" => "__builtin_ia32_cvtqq2pd128_mask", - "avx512.mask.cvtqq2pd.256" => "__builtin_ia32_cvtqq2pd256_mask", - "avx512.mask.cvtqq2pd.512" => "__builtin_ia32_cvtqq2pd512_mask", "avx512.mask.cvtqq2ps.128" => "__builtin_ia32_cvtqq2ps128_mask", - "avx512.mask.cvtqq2ps.256" => "__builtin_ia32_cvtqq2ps256_mask", - "avx512.mask.cvtqq2ps.512" => "__builtin_ia32_cvtqq2ps512_mask", // [INVALID CONVERSION]: "avx512.mask.cvtsd2ss.round" => "__builtin_ia32_cvtsd2ss_round_mask", // [INVALID CONVERSION]: "avx512.mask.cvtss2sd.round" => "__builtin_ia32_cvtss2sd_round_mask", "avx512.mask.cvttpd2dq.128" => "__builtin_ia32_cvttpd2dq128_mask", - "avx512.mask.cvttpd2dq.256" => "__builtin_ia32_cvttpd2dq256_mask", "avx512.mask.cvttpd2dq.512" => "__builtin_ia32_cvttpd2dq512_mask", "avx512.mask.cvttpd2qq.128" => "__builtin_ia32_cvttpd2qq128_mask", "avx512.mask.cvttpd2qq.256" => "__builtin_ia32_cvttpd2qq256_mask", @@ -8648,8 +8152,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx512.mask.cvttpd2uqq.128" => "__builtin_ia32_cvttpd2uqq128_mask", "avx512.mask.cvttpd2uqq.256" => "__builtin_ia32_cvttpd2uqq256_mask", "avx512.mask.cvttpd2uqq.512" => "__builtin_ia32_cvttpd2uqq512_mask", - "avx512.mask.cvttps2dq.128" => "__builtin_ia32_cvttps2dq128_mask", - "avx512.mask.cvttps2dq.256" => "__builtin_ia32_cvttps2dq256_mask", "avx512.mask.cvttps2dq.512" => "__builtin_ia32_cvttps2dq512_mask", "avx512.mask.cvttps2qq.128" => "__builtin_ia32_cvttps2qq128_mask", "avx512.mask.cvttps2qq.256" => "__builtin_ia32_cvttps2qq256_mask", @@ -8660,53 +8162,9 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx512.mask.cvttps2uqq.128" => "__builtin_ia32_cvttps2uqq128_mask", "avx512.mask.cvttps2uqq.256" => "__builtin_ia32_cvttps2uqq256_mask", "avx512.mask.cvttps2uqq.512" => "__builtin_ia32_cvttps2uqq512_mask", - "avx512.mask.cvtudq2pd.128" => "__builtin_ia32_cvtudq2pd128_mask", - "avx512.mask.cvtudq2pd.256" => "__builtin_ia32_cvtudq2pd256_mask", - "avx512.mask.cvtudq2pd.512" => "__builtin_ia32_cvtudq2pd512_mask", - "avx512.mask.cvtudq2ps.128" => "__builtin_ia32_cvtudq2ps128_mask", - "avx512.mask.cvtudq2ps.256" => "__builtin_ia32_cvtudq2ps256_mask", - "avx512.mask.cvtudq2ps.512" => "__builtin_ia32_cvtudq2ps512_mask", - "avx512.mask.cvtuqq2pd.128" => "__builtin_ia32_cvtuqq2pd128_mask", - "avx512.mask.cvtuqq2pd.256" => "__builtin_ia32_cvtuqq2pd256_mask", - "avx512.mask.cvtuqq2pd.512" => "__builtin_ia32_cvtuqq2pd512_mask", "avx512.mask.cvtuqq2ps.128" => "__builtin_ia32_cvtuqq2ps128_mask", - "avx512.mask.cvtuqq2ps.256" => "__builtin_ia32_cvtuqq2ps256_mask", - "avx512.mask.cvtuqq2ps.512" => "__builtin_ia32_cvtuqq2ps512_mask", - "avx512.mask.dbpsadbw.128" => "__builtin_ia32_dbpsadbw128_mask", - "avx512.mask.dbpsadbw.256" => "__builtin_ia32_dbpsadbw256_mask", - "avx512.mask.dbpsadbw.512" => "__builtin_ia32_dbpsadbw512_mask", - "avx512.mask.div.pd.128" => "__builtin_ia32_divpd_mask", - "avx512.mask.div.pd.256" => "__builtin_ia32_divpd256_mask", - "avx512.mask.div.pd.512" => "__builtin_ia32_divpd512_mask", - "avx512.mask.div.ps.128" => "__builtin_ia32_divps_mask", - "avx512.mask.div.ps.256" => "__builtin_ia32_divps256_mask", - "avx512.mask.div.ps.512" => "__builtin_ia32_divps512_mask", // [INVALID CONVERSION]: "avx512.mask.div.sd.round" => "__builtin_ia32_divsd_round_mask", // [INVALID CONVERSION]: "avx512.mask.div.ss.round" => "__builtin_ia32_divss_round_mask", - "avx512.mask.expand.d.128" => "__builtin_ia32_expandsi128_mask", - "avx512.mask.expand.d.256" => "__builtin_ia32_expandsi256_mask", - "avx512.mask.expand.d.512" => "__builtin_ia32_expandsi512_mask", - "avx512.mask.expand.load.d.128" => "__builtin_ia32_expandloadsi128_mask", - "avx512.mask.expand.load.d.256" => "__builtin_ia32_expandloadsi256_mask", - "avx512.mask.expand.load.d.512" => "__builtin_ia32_expandloadsi512_mask", - "avx512.mask.expand.load.pd.128" => "__builtin_ia32_expandloaddf128_mask", - "avx512.mask.expand.load.pd.256" => "__builtin_ia32_expandloaddf256_mask", - "avx512.mask.expand.load.pd.512" => "__builtin_ia32_expandloaddf512_mask", - "avx512.mask.expand.load.ps.128" => "__builtin_ia32_expandloadsf128_mask", - "avx512.mask.expand.load.ps.256" => "__builtin_ia32_expandloadsf256_mask", - "avx512.mask.expand.load.ps.512" => "__builtin_ia32_expandloadsf512_mask", - "avx512.mask.expand.load.q.128" => "__builtin_ia32_expandloaddi128_mask", - "avx512.mask.expand.load.q.256" => "__builtin_ia32_expandloaddi256_mask", - "avx512.mask.expand.load.q.512" => "__builtin_ia32_expandloaddi512_mask", - "avx512.mask.expand.pd.128" => "__builtin_ia32_expanddf128_mask", - "avx512.mask.expand.pd.256" => "__builtin_ia32_expanddf256_mask", - "avx512.mask.expand.pd.512" => "__builtin_ia32_expanddf512_mask", - "avx512.mask.expand.ps.128" => "__builtin_ia32_expandsf128_mask", - "avx512.mask.expand.ps.256" => "__builtin_ia32_expandsf256_mask", - "avx512.mask.expand.ps.512" => "__builtin_ia32_expandsf512_mask", - "avx512.mask.expand.q.128" => "__builtin_ia32_expanddi128_mask", - "avx512.mask.expand.q.256" => "__builtin_ia32_expanddi256_mask", - "avx512.mask.expand.q.512" => "__builtin_ia32_expanddi512_mask", "avx512.mask.fixupimm.pd.128" => "__builtin_ia32_fixupimmpd128_mask", "avx512.mask.fixupimm.pd.256" => "__builtin_ia32_fixupimmpd256_mask", "avx512.mask.fixupimm.pd.512" => "__builtin_ia32_fixupimmpd512_mask", @@ -8715,12 +8173,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx512.mask.fixupimm.ps.512" => "__builtin_ia32_fixupimmps512_mask", "avx512.mask.fixupimm.sd" => "__builtin_ia32_fixupimmsd_mask", "avx512.mask.fixupimm.ss" => "__builtin_ia32_fixupimmss_mask", - "avx512.mask.fpclass.pd.128" => "__builtin_ia32_fpclasspd128_mask", - "avx512.mask.fpclass.pd.256" => "__builtin_ia32_fpclasspd256_mask", - "avx512.mask.fpclass.pd.512" => "__builtin_ia32_fpclasspd512_mask", - "avx512.mask.fpclass.ps.128" => "__builtin_ia32_fpclassps128_mask", - "avx512.mask.fpclass.ps.256" => "__builtin_ia32_fpclassps256_mask", - "avx512.mask.fpclass.ps.512" => "__builtin_ia32_fpclassps512_mask", "avx512.mask.fpclass.sd" => "__builtin_ia32_fpclasssd_mask", "avx512.mask.fpclass.ss" => "__builtin_ia32_fpclassss_mask", "avx512.mask.getexp.pd.128" => "__builtin_ia32_getexppd128_mask", @@ -8739,226 +8191,19 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx512.mask.getmant.ps.512" => "__builtin_ia32_getmantps512_mask", // [INVALID CONVERSION]: "avx512.mask.getmant.sd" => "__builtin_ia32_getmantsd_round_mask", // [INVALID CONVERSION]: "avx512.mask.getmant.ss" => "__builtin_ia32_getmantss_round_mask", - "avx512.mask.insertf32x4.256" => "__builtin_ia32_insertf32x4_256_mask", - "avx512.mask.insertf32x4.512" => "__builtin_ia32_insertf32x4_mask", - "avx512.mask.insertf32x8.512" => "__builtin_ia32_insertf32x8_mask", - "avx512.mask.insertf64x2.256" => "__builtin_ia32_insertf64x2_256_mask", - "avx512.mask.insertf64x2.512" => "__builtin_ia32_insertf64x2_512_mask", - "avx512.mask.insertf64x4.512" => "__builtin_ia32_insertf64x4_mask", - "avx512.mask.inserti32x4.256" => "__builtin_ia32_inserti32x4_256_mask", - "avx512.mask.inserti32x4.512" => "__builtin_ia32_inserti32x4_mask", - "avx512.mask.inserti32x8.512" => "__builtin_ia32_inserti32x8_mask", - "avx512.mask.inserti64x2.256" => "__builtin_ia32_inserti64x2_256_mask", - "avx512.mask.inserti64x2.512" => "__builtin_ia32_inserti64x2_512_mask", - "avx512.mask.inserti64x4.512" => "__builtin_ia32_inserti64x4_mask", - "avx512.mask.loadu.d.512" => "__builtin_ia32_loaddqusi512_mask", - "avx512.mask.loadu.pd.512" => "__builtin_ia32_loadupd512_mask", - "avx512.mask.loadu.ps.512" => "__builtin_ia32_loadups512_mask", - "avx512.mask.loadu.q.512" => "__builtin_ia32_loaddqudi512_mask", - "avx512.mask.lzcnt.d.512" => "__builtin_ia32_vplzcntd_512_mask", - "avx512.mask.lzcnt.q.512" => "__builtin_ia32_vplzcntq_512_mask", - "avx512.mask.max.pd.128" => "__builtin_ia32_maxpd_mask", - "avx512.mask.max.pd.256" => "__builtin_ia32_maxpd256_mask", - "avx512.mask.max.pd.512" => "__builtin_ia32_maxpd512_mask", - "avx512.mask.max.ps.128" => "__builtin_ia32_maxps_mask", - "avx512.mask.max.ps.256" => "__builtin_ia32_maxps256_mask", - "avx512.mask.max.ps.512" => "__builtin_ia32_maxps512_mask", // [INVALID CONVERSION]: "avx512.mask.max.sd.round" => "__builtin_ia32_maxsd_round_mask", // [INVALID CONVERSION]: "avx512.mask.max.ss.round" => "__builtin_ia32_maxss_round_mask", - "avx512.mask.min.pd.128" => "__builtin_ia32_minpd_mask", - "avx512.mask.min.pd.256" => "__builtin_ia32_minpd256_mask", - "avx512.mask.min.pd.512" => "__builtin_ia32_minpd512_mask", - "avx512.mask.min.ps.128" => "__builtin_ia32_minps_mask", - "avx512.mask.min.ps.256" => "__builtin_ia32_minps256_mask", - "avx512.mask.min.ps.512" => "__builtin_ia32_minps512_mask", // [INVALID CONVERSION]: "avx512.mask.min.sd.round" => "__builtin_ia32_minsd_round_mask", // [INVALID CONVERSION]: "avx512.mask.min.ss.round" => "__builtin_ia32_minss_round_mask", - "avx512.mask.move.sd" => "__builtin_ia32_movsd_mask", - "avx512.mask.move.ss" => "__builtin_ia32_movss_mask", - "avx512.mask.mul.pd.128" => "__builtin_ia32_mulpd_mask", - "avx512.mask.mul.pd.256" => "__builtin_ia32_mulpd256_mask", - "avx512.mask.mul.pd.512" => "__builtin_ia32_mulpd512_mask", - "avx512.mask.mul.ps.128" => "__builtin_ia32_mulps_mask", - "avx512.mask.mul.ps.256" => "__builtin_ia32_mulps256_mask", - "avx512.mask.mul.ps.512" => "__builtin_ia32_mulps512_mask", // [INVALID CONVERSION]: "avx512.mask.mul.sd.round" => "__builtin_ia32_mulsd_round_mask", // [INVALID CONVERSION]: "avx512.mask.mul.ss.round" => "__builtin_ia32_mulss_round_mask", - "avx512.mask.or.pd.128" => "__builtin_ia32_orpd128_mask", - "avx512.mask.or.pd.256" => "__builtin_ia32_orpd256_mask", - "avx512.mask.or.pd.512" => "__builtin_ia32_orpd512_mask", - "avx512.mask.or.ps.128" => "__builtin_ia32_orps128_mask", - "avx512.mask.or.ps.256" => "__builtin_ia32_orps256_mask", - "avx512.mask.or.ps.512" => "__builtin_ia32_orps512_mask", - "avx512.mask.pabs.b.128" => "__builtin_ia32_pabsb128_mask", - "avx512.mask.pabs.b.256" => "__builtin_ia32_pabsb256_mask", - "avx512.mask.pabs.b.512" => "__builtin_ia32_pabsb512_mask", - "avx512.mask.pabs.d.128" => "__builtin_ia32_pabsd128_mask", - "avx512.mask.pabs.d.256" => "__builtin_ia32_pabsd256_mask", - "avx512.mask.pabs.d.512" => "__builtin_ia32_pabsd512_mask", - "avx512.mask.pabs.q.128" => "__builtin_ia32_pabsq128_mask", - "avx512.mask.pabs.q.256" => "__builtin_ia32_pabsq256_mask", - "avx512.mask.pabs.q.512" => "__builtin_ia32_pabsq512_mask", - "avx512.mask.pabs.w.128" => "__builtin_ia32_pabsw128_mask", - "avx512.mask.pabs.w.256" => "__builtin_ia32_pabsw256_mask", - "avx512.mask.pabs.w.512" => "__builtin_ia32_pabsw512_mask", - "avx512.mask.packssdw.128" => "__builtin_ia32_packssdw128_mask", - "avx512.mask.packssdw.256" => "__builtin_ia32_packssdw256_mask", - "avx512.mask.packssdw.512" => "__builtin_ia32_packssdw512_mask", - "avx512.mask.packsswb.128" => "__builtin_ia32_packsswb128_mask", - "avx512.mask.packsswb.256" => "__builtin_ia32_packsswb256_mask", - "avx512.mask.packsswb.512" => "__builtin_ia32_packsswb512_mask", - "avx512.mask.packusdw.128" => "__builtin_ia32_packusdw128_mask", - "avx512.mask.packusdw.256" => "__builtin_ia32_packusdw256_mask", - "avx512.mask.packusdw.512" => "__builtin_ia32_packusdw512_mask", - "avx512.mask.packuswb.128" => "__builtin_ia32_packuswb128_mask", - "avx512.mask.packuswb.256" => "__builtin_ia32_packuswb256_mask", - "avx512.mask.packuswb.512" => "__builtin_ia32_packuswb512_mask", - "avx512.mask.padd.b.128" => "__builtin_ia32_paddb128_mask", - "avx512.mask.padd.b.256" => "__builtin_ia32_paddb256_mask", - "avx512.mask.padd.b.512" => "__builtin_ia32_paddb512_mask", - "avx512.mask.padd.d.128" => "__builtin_ia32_paddd128_mask", - "avx512.mask.padd.d.256" => "__builtin_ia32_paddd256_mask", - "avx512.mask.padd.d.512" => "__builtin_ia32_paddd512_mask", - "avx512.mask.padd.q.128" => "__builtin_ia32_paddq128_mask", - "avx512.mask.padd.q.256" => "__builtin_ia32_paddq256_mask", - "avx512.mask.padd.q.512" => "__builtin_ia32_paddq512_mask", - "avx512.mask.padd.w.128" => "__builtin_ia32_paddw128_mask", - "avx512.mask.padd.w.256" => "__builtin_ia32_paddw256_mask", - "avx512.mask.padd.w.512" => "__builtin_ia32_paddw512_mask", - "avx512.mask.padds.b.128" => "__builtin_ia32_paddsb128_mask", - "avx512.mask.padds.b.256" => "__builtin_ia32_paddsb256_mask", - "avx512.mask.padds.b.512" => "__builtin_ia32_paddsb512_mask", - "avx512.mask.padds.w.128" => "__builtin_ia32_paddsw128_mask", - "avx512.mask.padds.w.256" => "__builtin_ia32_paddsw256_mask", - "avx512.mask.padds.w.512" => "__builtin_ia32_paddsw512_mask", - "avx512.mask.paddus.b.128" => "__builtin_ia32_paddusb128_mask", - "avx512.mask.paddus.b.256" => "__builtin_ia32_paddusb256_mask", - "avx512.mask.paddus.b.512" => "__builtin_ia32_paddusb512_mask", - "avx512.mask.paddus.w.128" => "__builtin_ia32_paddusw128_mask", - "avx512.mask.paddus.w.256" => "__builtin_ia32_paddusw256_mask", - "avx512.mask.paddus.w.512" => "__builtin_ia32_paddusw512_mask", - "avx512.mask.pand.d.512" => "__builtin_ia32_pandd512_mask", - "avx512.mask.pand.q.512" => "__builtin_ia32_pandq512_mask", - "avx512.mask.pavg.b.128" => "__builtin_ia32_pavgb128_mask", - "avx512.mask.pavg.b.256" => "__builtin_ia32_pavgb256_mask", - "avx512.mask.pavg.b.512" => "__builtin_ia32_pavgb512_mask", - "avx512.mask.pavg.w.128" => "__builtin_ia32_pavgw128_mask", - "avx512.mask.pavg.w.256" => "__builtin_ia32_pavgw256_mask", - "avx512.mask.pavg.w.512" => "__builtin_ia32_pavgw512_mask", - "avx512.mask.pbroadcast.b.gpr.128" => "__builtin_ia32_pbroadcastb128_gpr_mask", - "avx512.mask.pbroadcast.b.gpr.256" => "__builtin_ia32_pbroadcastb256_gpr_mask", - "avx512.mask.pbroadcast.b.gpr.512" => "__builtin_ia32_pbroadcastb512_gpr_mask", - "avx512.mask.pbroadcast.d.gpr.128" => "__builtin_ia32_pbroadcastd128_gpr_mask", - "avx512.mask.pbroadcast.d.gpr.256" => "__builtin_ia32_pbroadcastd256_gpr_mask", - "avx512.mask.pbroadcast.d.gpr.512" => "__builtin_ia32_pbroadcastd512_gpr_mask", - "avx512.mask.pbroadcast.q.gpr.128" => "__builtin_ia32_pbroadcastq128_gpr_mask", - "avx512.mask.pbroadcast.q.gpr.256" => "__builtin_ia32_pbroadcastq256_gpr_mask", - "avx512.mask.pbroadcast.q.gpr.512" => "__builtin_ia32_pbroadcastq512_gpr_mask", - "avx512.mask.pbroadcast.q.mem.512" => "__builtin_ia32_pbroadcastq512_mem_mask", - "avx512.mask.pbroadcast.w.gpr.128" => "__builtin_ia32_pbroadcastw128_gpr_mask", - "avx512.mask.pbroadcast.w.gpr.256" => "__builtin_ia32_pbroadcastw256_gpr_mask", - "avx512.mask.pbroadcast.w.gpr.512" => "__builtin_ia32_pbroadcastw512_gpr_mask", - "avx512.mask.pcmpeq.b.128" => "__builtin_ia32_pcmpeqb128_mask", - "avx512.mask.pcmpeq.b.256" => "__builtin_ia32_pcmpeqb256_mask", - "avx512.mask.pcmpeq.b.512" => "__builtin_ia32_pcmpeqb512_mask", - "avx512.mask.pcmpeq.d.128" => "__builtin_ia32_pcmpeqd128_mask", - "avx512.mask.pcmpeq.d.256" => "__builtin_ia32_pcmpeqd256_mask", - "avx512.mask.pcmpeq.d.512" => "__builtin_ia32_pcmpeqd512_mask", - "avx512.mask.pcmpeq.q.128" => "__builtin_ia32_pcmpeqq128_mask", - "avx512.mask.pcmpeq.q.256" => "__builtin_ia32_pcmpeqq256_mask", - "avx512.mask.pcmpeq.q.512" => "__builtin_ia32_pcmpeqq512_mask", - "avx512.mask.pcmpeq.w.128" => "__builtin_ia32_pcmpeqw128_mask", - "avx512.mask.pcmpeq.w.256" => "__builtin_ia32_pcmpeqw256_mask", - "avx512.mask.pcmpeq.w.512" => "__builtin_ia32_pcmpeqw512_mask", - "avx512.mask.pcmpgt.b.128" => "__builtin_ia32_pcmpgtb128_mask", - "avx512.mask.pcmpgt.b.256" => "__builtin_ia32_pcmpgtb256_mask", - "avx512.mask.pcmpgt.b.512" => "__builtin_ia32_pcmpgtb512_mask", - "avx512.mask.pcmpgt.d.128" => "__builtin_ia32_pcmpgtd128_mask", - "avx512.mask.pcmpgt.d.256" => "__builtin_ia32_pcmpgtd256_mask", - "avx512.mask.pcmpgt.d.512" => "__builtin_ia32_pcmpgtd512_mask", - "avx512.mask.pcmpgt.q.128" => "__builtin_ia32_pcmpgtq128_mask", - "avx512.mask.pcmpgt.q.256" => "__builtin_ia32_pcmpgtq256_mask", - "avx512.mask.pcmpgt.q.512" => "__builtin_ia32_pcmpgtq512_mask", - "avx512.mask.pcmpgt.w.128" => "__builtin_ia32_pcmpgtw128_mask", - "avx512.mask.pcmpgt.w.256" => "__builtin_ia32_pcmpgtw256_mask", - "avx512.mask.pcmpgt.w.512" => "__builtin_ia32_pcmpgtw512_mask", - "avx512.mask.permvar.df.256" => "__builtin_ia32_permvardf256_mask", - "avx512.mask.permvar.df.512" => "__builtin_ia32_permvardf512_mask", - "avx512.mask.permvar.di.256" => "__builtin_ia32_permvardi256_mask", - "avx512.mask.permvar.di.512" => "__builtin_ia32_permvardi512_mask", - "avx512.mask.permvar.hi.128" => "__builtin_ia32_permvarhi128_mask", - "avx512.mask.permvar.hi.256" => "__builtin_ia32_permvarhi256_mask", - "avx512.mask.permvar.hi.512" => "__builtin_ia32_permvarhi512_mask", - "avx512.mask.permvar.qi.128" => "__builtin_ia32_permvarqi128_mask", - "avx512.mask.permvar.qi.256" => "__builtin_ia32_permvarqi256_mask", - "avx512.mask.permvar.qi.512" => "__builtin_ia32_permvarqi512_mask", - "avx512.mask.permvar.sf.256" => "__builtin_ia32_permvarsf256_mask", - "avx512.mask.permvar.sf.512" => "__builtin_ia32_permvarsf512_mask", - "avx512.mask.permvar.si.256" => "__builtin_ia32_permvarsi256_mask", - "avx512.mask.permvar.si.512" => "__builtin_ia32_permvarsi512_mask", - "avx512.mask.pmaddubs.w.128" => "__builtin_ia32_pmaddubsw128_mask", - "avx512.mask.pmaddubs.w.256" => "__builtin_ia32_pmaddubsw256_mask", - "avx512.mask.pmaddubs.w.512" => "__builtin_ia32_pmaddubsw512_mask", - "avx512.mask.pmaddw.d.128" => "__builtin_ia32_pmaddwd128_mask", - "avx512.mask.pmaddw.d.256" => "__builtin_ia32_pmaddwd256_mask", - "avx512.mask.pmaddw.d.512" => "__builtin_ia32_pmaddwd512_mask", - "avx512.mask.pmaxs.b.128" => "__builtin_ia32_pmaxsb128_mask", - "avx512.mask.pmaxs.b.256" => "__builtin_ia32_pmaxsb256_mask", - "avx512.mask.pmaxs.b.512" => "__builtin_ia32_pmaxsb512_mask", - "avx512.mask.pmaxs.d.128" => "__builtin_ia32_pmaxsd128_mask", - "avx512.mask.pmaxs.d.256" => "__builtin_ia32_pmaxsd256_mask", - "avx512.mask.pmaxs.d.512" => "__builtin_ia32_pmaxsd512_mask", - "avx512.mask.pmaxs.q.128" => "__builtin_ia32_pmaxsq128_mask", - "avx512.mask.pmaxs.q.256" => "__builtin_ia32_pmaxsq256_mask", - "avx512.mask.pmaxs.q.512" => "__builtin_ia32_pmaxsq512_mask", - "avx512.mask.pmaxs.w.128" => "__builtin_ia32_pmaxsw128_mask", - "avx512.mask.pmaxs.w.256" => "__builtin_ia32_pmaxsw256_mask", - "avx512.mask.pmaxs.w.512" => "__builtin_ia32_pmaxsw512_mask", - "avx512.mask.pmaxu.b.128" => "__builtin_ia32_pmaxub128_mask", - "avx512.mask.pmaxu.b.256" => "__builtin_ia32_pmaxub256_mask", - "avx512.mask.pmaxu.b.512" => "__builtin_ia32_pmaxub512_mask", - "avx512.mask.pmaxu.d.128" => "__builtin_ia32_pmaxud128_mask", - "avx512.mask.pmaxu.d.256" => "__builtin_ia32_pmaxud256_mask", - "avx512.mask.pmaxu.d.512" => "__builtin_ia32_pmaxud512_mask", - "avx512.mask.pmaxu.q.128" => "__builtin_ia32_pmaxuq128_mask", - "avx512.mask.pmaxu.q.256" => "__builtin_ia32_pmaxuq256_mask", - "avx512.mask.pmaxu.q.512" => "__builtin_ia32_pmaxuq512_mask", - "avx512.mask.pmaxu.w.128" => "__builtin_ia32_pmaxuw128_mask", - "avx512.mask.pmaxu.w.256" => "__builtin_ia32_pmaxuw256_mask", - "avx512.mask.pmaxu.w.512" => "__builtin_ia32_pmaxuw512_mask", - "avx512.mask.pmins.b.128" => "__builtin_ia32_pminsb128_mask", - "avx512.mask.pmins.b.256" => "__builtin_ia32_pminsb256_mask", - "avx512.mask.pmins.b.512" => "__builtin_ia32_pminsb512_mask", - "avx512.mask.pmins.d.128" => "__builtin_ia32_pminsd128_mask", - "avx512.mask.pmins.d.256" => "__builtin_ia32_pminsd256_mask", - "avx512.mask.pmins.d.512" => "__builtin_ia32_pminsd512_mask", - "avx512.mask.pmins.q.128" => "__builtin_ia32_pminsq128_mask", - "avx512.mask.pmins.q.256" => "__builtin_ia32_pminsq256_mask", - "avx512.mask.pmins.q.512" => "__builtin_ia32_pminsq512_mask", - "avx512.mask.pmins.w.128" => "__builtin_ia32_pminsw128_mask", - "avx512.mask.pmins.w.256" => "__builtin_ia32_pminsw256_mask", - "avx512.mask.pmins.w.512" => "__builtin_ia32_pminsw512_mask", - "avx512.mask.pminu.b.128" => "__builtin_ia32_pminub128_mask", - "avx512.mask.pminu.b.256" => "__builtin_ia32_pminub256_mask", - "avx512.mask.pminu.b.512" => "__builtin_ia32_pminub512_mask", - "avx512.mask.pminu.d.128" => "__builtin_ia32_pminud128_mask", - "avx512.mask.pminu.d.256" => "__builtin_ia32_pminud256_mask", - "avx512.mask.pminu.d.512" => "__builtin_ia32_pminud512_mask", - "avx512.mask.pminu.q.128" => "__builtin_ia32_pminuq128_mask", - "avx512.mask.pminu.q.256" => "__builtin_ia32_pminuq256_mask", - "avx512.mask.pminu.q.512" => "__builtin_ia32_pminuq512_mask", - "avx512.mask.pminu.w.128" => "__builtin_ia32_pminuw128_mask", - "avx512.mask.pminu.w.256" => "__builtin_ia32_pminuw256_mask", - "avx512.mask.pminu.w.512" => "__builtin_ia32_pminuw512_mask", "avx512.mask.pmov.db.128" => "__builtin_ia32_pmovdb128_mask", "avx512.mask.pmov.db.256" => "__builtin_ia32_pmovdb256_mask", - "avx512.mask.pmov.db.512" => "__builtin_ia32_pmovdb512_mask", "avx512.mask.pmov.db.mem.128" => "__builtin_ia32_pmovdb128mem_mask", "avx512.mask.pmov.db.mem.256" => "__builtin_ia32_pmovdb256mem_mask", "avx512.mask.pmov.db.mem.512" => "__builtin_ia32_pmovdb512mem_mask", "avx512.mask.pmov.dw.128" => "__builtin_ia32_pmovdw128_mask", "avx512.mask.pmov.dw.256" => "__builtin_ia32_pmovdw256_mask", - "avx512.mask.pmov.dw.512" => "__builtin_ia32_pmovdw512_mask", "avx512.mask.pmov.dw.mem.128" => "__builtin_ia32_pmovdw128mem_mask", "avx512.mask.pmov.dw.mem.256" => "__builtin_ia32_pmovdw256mem_mask", "avx512.mask.pmov.dw.mem.512" => "__builtin_ia32_pmovdw512mem_mask", @@ -8969,20 +8214,15 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx512.mask.pmov.qb.mem.256" => "__builtin_ia32_pmovqb256mem_mask", "avx512.mask.pmov.qb.mem.512" => "__builtin_ia32_pmovqb512mem_mask", "avx512.mask.pmov.qd.128" => "__builtin_ia32_pmovqd128_mask", - "avx512.mask.pmov.qd.256" => "__builtin_ia32_pmovqd256_mask", - "avx512.mask.pmov.qd.512" => "__builtin_ia32_pmovqd512_mask", "avx512.mask.pmov.qd.mem.128" => "__builtin_ia32_pmovqd128mem_mask", "avx512.mask.pmov.qd.mem.256" => "__builtin_ia32_pmovqd256mem_mask", "avx512.mask.pmov.qd.mem.512" => "__builtin_ia32_pmovqd512mem_mask", "avx512.mask.pmov.qw.128" => "__builtin_ia32_pmovqw128_mask", "avx512.mask.pmov.qw.256" => "__builtin_ia32_pmovqw256_mask", - "avx512.mask.pmov.qw.512" => "__builtin_ia32_pmovqw512_mask", "avx512.mask.pmov.qw.mem.128" => "__builtin_ia32_pmovqw128mem_mask", "avx512.mask.pmov.qw.mem.256" => "__builtin_ia32_pmovqw256mem_mask", "avx512.mask.pmov.qw.mem.512" => "__builtin_ia32_pmovqw512mem_mask", "avx512.mask.pmov.wb.128" => "__builtin_ia32_pmovwb128_mask", - "avx512.mask.pmov.wb.256" => "__builtin_ia32_pmovwb256_mask", - "avx512.mask.pmov.wb.512" => "__builtin_ia32_pmovwb512_mask", "avx512.mask.pmov.wb.mem.128" => "__builtin_ia32_pmovwb128mem_mask", "avx512.mask.pmov.wb.mem.256" => "__builtin_ia32_pmovwb256mem_mask", "avx512.mask.pmov.wb.mem.512" => "__builtin_ia32_pmovwb512mem_mask", @@ -9022,24 +8262,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx512.mask.pmovs.wb.mem.128" => "__builtin_ia32_pmovswb128mem_mask", "avx512.mask.pmovs.wb.mem.256" => "__builtin_ia32_pmovswb256mem_mask", "avx512.mask.pmovs.wb.mem.512" => "__builtin_ia32_pmovswb512mem_mask", - "avx512.mask.pmovsxb.d.128" => "__builtin_ia32_pmovsxbd128_mask", - "avx512.mask.pmovsxb.d.256" => "__builtin_ia32_pmovsxbd256_mask", - "avx512.mask.pmovsxb.d.512" => "__builtin_ia32_pmovsxbd512_mask", - "avx512.mask.pmovsxb.q.128" => "__builtin_ia32_pmovsxbq128_mask", - "avx512.mask.pmovsxb.q.256" => "__builtin_ia32_pmovsxbq256_mask", - "avx512.mask.pmovsxb.q.512" => "__builtin_ia32_pmovsxbq512_mask", - "avx512.mask.pmovsxb.w.128" => "__builtin_ia32_pmovsxbw128_mask", - "avx512.mask.pmovsxb.w.256" => "__builtin_ia32_pmovsxbw256_mask", - "avx512.mask.pmovsxb.w.512" => "__builtin_ia32_pmovsxbw512_mask", - "avx512.mask.pmovsxd.q.128" => "__builtin_ia32_pmovsxdq128_mask", - "avx512.mask.pmovsxd.q.256" => "__builtin_ia32_pmovsxdq256_mask", - "avx512.mask.pmovsxd.q.512" => "__builtin_ia32_pmovsxdq512_mask", - "avx512.mask.pmovsxw.d.128" => "__builtin_ia32_pmovsxwd128_mask", - "avx512.mask.pmovsxw.d.256" => "__builtin_ia32_pmovsxwd256_mask", - "avx512.mask.pmovsxw.d.512" => "__builtin_ia32_pmovsxwd512_mask", - "avx512.mask.pmovsxw.q.128" => "__builtin_ia32_pmovsxwq128_mask", - "avx512.mask.pmovsxw.q.256" => "__builtin_ia32_pmovsxwq256_mask", - "avx512.mask.pmovsxw.q.512" => "__builtin_ia32_pmovsxwq512_mask", "avx512.mask.pmovus.db.128" => "__builtin_ia32_pmovusdb128_mask", "avx512.mask.pmovus.db.256" => "__builtin_ia32_pmovusdb256_mask", "avx512.mask.pmovus.db.512" => "__builtin_ia32_pmovusdb512_mask", @@ -9076,191 +8298,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx512.mask.pmovus.wb.mem.128" => "__builtin_ia32_pmovuswb128mem_mask", "avx512.mask.pmovus.wb.mem.256" => "__builtin_ia32_pmovuswb256mem_mask", "avx512.mask.pmovus.wb.mem.512" => "__builtin_ia32_pmovuswb512mem_mask", - "avx512.mask.pmovzxb.d.128" => "__builtin_ia32_pmovzxbd128_mask", - "avx512.mask.pmovzxb.d.256" => "__builtin_ia32_pmovzxbd256_mask", - "avx512.mask.pmovzxb.d.512" => "__builtin_ia32_pmovzxbd512_mask", - "avx512.mask.pmovzxb.q.128" => "__builtin_ia32_pmovzxbq128_mask", - "avx512.mask.pmovzxb.q.256" => "__builtin_ia32_pmovzxbq256_mask", - "avx512.mask.pmovzxb.q.512" => "__builtin_ia32_pmovzxbq512_mask", - "avx512.mask.pmovzxb.w.128" => "__builtin_ia32_pmovzxbw128_mask", - "avx512.mask.pmovzxb.w.256" => "__builtin_ia32_pmovzxbw256_mask", - "avx512.mask.pmovzxb.w.512" => "__builtin_ia32_pmovzxbw512_mask", - "avx512.mask.pmovzxd.q.128" => "__builtin_ia32_pmovzxdq128_mask", - "avx512.mask.pmovzxd.q.256" => "__builtin_ia32_pmovzxdq256_mask", - "avx512.mask.pmovzxd.q.512" => "__builtin_ia32_pmovzxdq512_mask", - "avx512.mask.pmovzxw.d.128" => "__builtin_ia32_pmovzxwd128_mask", - "avx512.mask.pmovzxw.d.256" => "__builtin_ia32_pmovzxwd256_mask", - "avx512.mask.pmovzxw.d.512" => "__builtin_ia32_pmovzxwd512_mask", - "avx512.mask.pmovzxw.q.128" => "__builtin_ia32_pmovzxwq128_mask", - "avx512.mask.pmovzxw.q.256" => "__builtin_ia32_pmovzxwq256_mask", - "avx512.mask.pmovzxw.q.512" => "__builtin_ia32_pmovzxwq512_mask", - "avx512.mask.pmul.dq.128" => "__builtin_ia32_pmuldq128_mask", - "avx512.mask.pmul.dq.256" => "__builtin_ia32_pmuldq256_mask", - "avx512.mask.pmul.dq.512" => "__builtin_ia32_pmuldq512_mask", - "avx512.mask.pmul.hr.sw.128" => "__builtin_ia32_pmulhrsw128_mask", - "avx512.mask.pmul.hr.sw.256" => "__builtin_ia32_pmulhrsw256_mask", - "avx512.mask.pmul.hr.sw.512" => "__builtin_ia32_pmulhrsw512_mask", - "avx512.mask.pmulh.w.128" => "__builtin_ia32_pmulhw128_mask", - "avx512.mask.pmulh.w.256" => "__builtin_ia32_pmulhw256_mask", - "avx512.mask.pmulh.w.512" => "__builtin_ia32_pmulhw512_mask", - "avx512.mask.pmulhu.w.128" => "__builtin_ia32_pmulhuw128_mask", - "avx512.mask.pmulhu.w.256" => "__builtin_ia32_pmulhuw256_mask", - "avx512.mask.pmulhu.w.512" => "__builtin_ia32_pmulhuw512_mask", - "avx512.mask.pmull.d.128" => "__builtin_ia32_pmulld128_mask", - "avx512.mask.pmull.d.256" => "__builtin_ia32_pmulld256_mask", - "avx512.mask.pmull.d.512" => "__builtin_ia32_pmulld512_mask", - "avx512.mask.pmull.q.128" => "__builtin_ia32_pmullq128_mask", - "avx512.mask.pmull.q.256" => "__builtin_ia32_pmullq256_mask", - "avx512.mask.pmull.q.512" => "__builtin_ia32_pmullq512_mask", - "avx512.mask.pmull.w.128" => "__builtin_ia32_pmullw128_mask", - "avx512.mask.pmull.w.256" => "__builtin_ia32_pmullw256_mask", - "avx512.mask.pmull.w.512" => "__builtin_ia32_pmullw512_mask", - "avx512.mask.pmultishift.qb.128" => "__builtin_ia32_vpmultishiftqb128_mask", - "avx512.mask.pmultishift.qb.256" => "__builtin_ia32_vpmultishiftqb256_mask", - "avx512.mask.pmultishift.qb.512" => "__builtin_ia32_vpmultishiftqb512_mask", - "avx512.mask.pmulu.dq.128" => "__builtin_ia32_pmuludq128_mask", - "avx512.mask.pmulu.dq.256" => "__builtin_ia32_pmuludq256_mask", - "avx512.mask.pmulu.dq.512" => "__builtin_ia32_pmuludq512_mask", - "avx512.mask.prol.d.128" => "__builtin_ia32_prold128_mask", - "avx512.mask.prol.d.256" => "__builtin_ia32_prold256_mask", - "avx512.mask.prol.d.512" => "__builtin_ia32_prold512_mask", - "avx512.mask.prol.q.128" => "__builtin_ia32_prolq128_mask", - "avx512.mask.prol.q.256" => "__builtin_ia32_prolq256_mask", - "avx512.mask.prol.q.512" => "__builtin_ia32_prolq512_mask", - "avx512.mask.prolv.d.128" => "__builtin_ia32_prolvd128_mask", - "avx512.mask.prolv.d.256" => "__builtin_ia32_prolvd256_mask", - "avx512.mask.prolv.d.512" => "__builtin_ia32_prolvd512_mask", - "avx512.mask.prolv.q.128" => "__builtin_ia32_prolvq128_mask", - "avx512.mask.prolv.q.256" => "__builtin_ia32_prolvq256_mask", - "avx512.mask.prolv.q.512" => "__builtin_ia32_prolvq512_mask", - "avx512.mask.pror.d.128" => "__builtin_ia32_prord128_mask", - "avx512.mask.pror.d.256" => "__builtin_ia32_prord256_mask", - "avx512.mask.pror.d.512" => "__builtin_ia32_prord512_mask", - "avx512.mask.pror.q.128" => "__builtin_ia32_prorq128_mask", - "avx512.mask.pror.q.256" => "__builtin_ia32_prorq256_mask", - "avx512.mask.pror.q.512" => "__builtin_ia32_prorq512_mask", - "avx512.mask.prorv.d.128" => "__builtin_ia32_prorvd128_mask", - "avx512.mask.prorv.d.256" => "__builtin_ia32_prorvd256_mask", - "avx512.mask.prorv.d.512" => "__builtin_ia32_prorvd512_mask", - "avx512.mask.prorv.q.128" => "__builtin_ia32_prorvq128_mask", - "avx512.mask.prorv.q.256" => "__builtin_ia32_prorvq256_mask", - "avx512.mask.prorv.q.512" => "__builtin_ia32_prorvq512_mask", - "avx512.mask.pshuf.b.128" => "__builtin_ia32_pshufb128_mask", - "avx512.mask.pshuf.b.256" => "__builtin_ia32_pshufb256_mask", - "avx512.mask.pshuf.b.512" => "__builtin_ia32_pshufb512_mask", - "avx512.mask.psll.d" => "__builtin_ia32_pslld512_mask", - "avx512.mask.psll.d.128" => "__builtin_ia32_pslld128_mask", - "avx512.mask.psll.d.256" => "__builtin_ia32_pslld256_mask", - "avx512.mask.psll.di.128" => "__builtin_ia32_pslldi128_mask", - "avx512.mask.psll.di.256" => "__builtin_ia32_pslldi256_mask", - "avx512.mask.psll.di.512" => "__builtin_ia32_pslldi512_mask", - "avx512.mask.psll.q" => "__builtin_ia32_psllq512_mask", - "avx512.mask.psll.q.128" => "__builtin_ia32_psllq128_mask", - "avx512.mask.psll.q.256" => "__builtin_ia32_psllq256_mask", - "avx512.mask.psll.qi.128" => "__builtin_ia32_psllqi128_mask", - "avx512.mask.psll.qi.256" => "__builtin_ia32_psllqi256_mask", - "avx512.mask.psll.qi.512" => "__builtin_ia32_psllqi512_mask", - "avx512.mask.psll.w.128" => "__builtin_ia32_psllw128_mask", - "avx512.mask.psll.w.256" => "__builtin_ia32_psllw256_mask", - "avx512.mask.psll.w.512" => "__builtin_ia32_psllw512_mask", - "avx512.mask.psll.wi.128" => "__builtin_ia32_psllwi128_mask", - "avx512.mask.psll.wi.256" => "__builtin_ia32_psllwi256_mask", - "avx512.mask.psll.wi.512" => "__builtin_ia32_psllwi512_mask", - "avx512.mask.psllv.d" => "__builtin_ia32_psllv16si_mask", - "avx512.mask.psllv.q" => "__builtin_ia32_psllv8di_mask", - "avx512.mask.psllv16.hi" => "__builtin_ia32_psllv16hi_mask", - "avx512.mask.psllv2.di" => "__builtin_ia32_psllv2di_mask", - "avx512.mask.psllv32hi" => "__builtin_ia32_psllv32hi_mask", - "avx512.mask.psllv4.di" => "__builtin_ia32_psllv4di_mask", - "avx512.mask.psllv4.si" => "__builtin_ia32_psllv4si_mask", - "avx512.mask.psllv8.hi" => "__builtin_ia32_psllv8hi_mask", - "avx512.mask.psllv8.si" => "__builtin_ia32_psllv8si_mask", - "avx512.mask.psra.d" => "__builtin_ia32_psrad512_mask", - "avx512.mask.psra.d.128" => "__builtin_ia32_psrad128_mask", - "avx512.mask.psra.d.256" => "__builtin_ia32_psrad256_mask", - "avx512.mask.psra.di.128" => "__builtin_ia32_psradi128_mask", - "avx512.mask.psra.di.256" => "__builtin_ia32_psradi256_mask", - "avx512.mask.psra.di.512" => "__builtin_ia32_psradi512_mask", - "avx512.mask.psra.q" => "__builtin_ia32_psraq512_mask", - "avx512.mask.psra.q.128" => "__builtin_ia32_psraq128_mask", - "avx512.mask.psra.q.256" => "__builtin_ia32_psraq256_mask", - "avx512.mask.psra.qi.128" => "__builtin_ia32_psraqi128_mask", - "avx512.mask.psra.qi.256" => "__builtin_ia32_psraqi256_mask", - "avx512.mask.psra.qi.512" => "__builtin_ia32_psraqi512_mask", - "avx512.mask.psra.w.128" => "__builtin_ia32_psraw128_mask", - "avx512.mask.psra.w.256" => "__builtin_ia32_psraw256_mask", - "avx512.mask.psra.w.512" => "__builtin_ia32_psraw512_mask", - "avx512.mask.psra.wi.128" => "__builtin_ia32_psrawi128_mask", - "avx512.mask.psra.wi.256" => "__builtin_ia32_psrawi256_mask", - "avx512.mask.psra.wi.512" => "__builtin_ia32_psrawi512_mask", - "avx512.mask.psrav.d" => "__builtin_ia32_psrav16si_mask", - "avx512.mask.psrav.q" => "__builtin_ia32_psrav8di_mask", - "avx512.mask.psrav.q.128" => "__builtin_ia32_psravq128_mask", - "avx512.mask.psrav.q.256" => "__builtin_ia32_psravq256_mask", - "avx512.mask.psrav16.hi" => "__builtin_ia32_psrav16hi_mask", - "avx512.mask.psrav32.hi" => "__builtin_ia32_psrav32hi_mask", - "avx512.mask.psrav4.si" => "__builtin_ia32_psrav4si_mask", - "avx512.mask.psrav8.hi" => "__builtin_ia32_psrav8hi_mask", - "avx512.mask.psrav8.si" => "__builtin_ia32_psrav8si_mask", - "avx512.mask.psrl.d" => "__builtin_ia32_psrld512_mask", - "avx512.mask.psrl.d.128" => "__builtin_ia32_psrld128_mask", - "avx512.mask.psrl.d.256" => "__builtin_ia32_psrld256_mask", - "avx512.mask.psrl.di.128" => "__builtin_ia32_psrldi128_mask", - "avx512.mask.psrl.di.256" => "__builtin_ia32_psrldi256_mask", - "avx512.mask.psrl.di.512" => "__builtin_ia32_psrldi512_mask", - "avx512.mask.psrl.q" => "__builtin_ia32_psrlq512_mask", - "avx512.mask.psrl.q.128" => "__builtin_ia32_psrlq128_mask", - "avx512.mask.psrl.q.256" => "__builtin_ia32_psrlq256_mask", - "avx512.mask.psrl.qi.128" => "__builtin_ia32_psrlqi128_mask", - "avx512.mask.psrl.qi.256" => "__builtin_ia32_psrlqi256_mask", - "avx512.mask.psrl.qi.512" => "__builtin_ia32_psrlqi512_mask", - "avx512.mask.psrl.w.128" => "__builtin_ia32_psrlw128_mask", - "avx512.mask.psrl.w.256" => "__builtin_ia32_psrlw256_mask", - "avx512.mask.psrl.w.512" => "__builtin_ia32_psrlw512_mask", - "avx512.mask.psrl.wi.128" => "__builtin_ia32_psrlwi128_mask", - "avx512.mask.psrl.wi.256" => "__builtin_ia32_psrlwi256_mask", - "avx512.mask.psrl.wi.512" => "__builtin_ia32_psrlwi512_mask", - "avx512.mask.psrlv.d" => "__builtin_ia32_psrlv16si_mask", - "avx512.mask.psrlv.q" => "__builtin_ia32_psrlv8di_mask", - "avx512.mask.psrlv16.hi" => "__builtin_ia32_psrlv16hi_mask", - "avx512.mask.psrlv2.di" => "__builtin_ia32_psrlv2di_mask", - "avx512.mask.psrlv32hi" => "__builtin_ia32_psrlv32hi_mask", - "avx512.mask.psrlv4.di" => "__builtin_ia32_psrlv4di_mask", - "avx512.mask.psrlv4.si" => "__builtin_ia32_psrlv4si_mask", - "avx512.mask.psrlv8.hi" => "__builtin_ia32_psrlv8hi_mask", - "avx512.mask.psrlv8.si" => "__builtin_ia32_psrlv8si_mask", - "avx512.mask.psub.b.128" => "__builtin_ia32_psubb128_mask", - "avx512.mask.psub.b.256" => "__builtin_ia32_psubb256_mask", - "avx512.mask.psub.b.512" => "__builtin_ia32_psubb512_mask", - "avx512.mask.psub.d.128" => "__builtin_ia32_psubd128_mask", - "avx512.mask.psub.d.256" => "__builtin_ia32_psubd256_mask", - "avx512.mask.psub.d.512" => "__builtin_ia32_psubd512_mask", - "avx512.mask.psub.q.128" => "__builtin_ia32_psubq128_mask", - "avx512.mask.psub.q.256" => "__builtin_ia32_psubq256_mask", - "avx512.mask.psub.q.512" => "__builtin_ia32_psubq512_mask", - "avx512.mask.psub.w.128" => "__builtin_ia32_psubw128_mask", - "avx512.mask.psub.w.256" => "__builtin_ia32_psubw256_mask", - "avx512.mask.psub.w.512" => "__builtin_ia32_psubw512_mask", - "avx512.mask.psubs.b.128" => "__builtin_ia32_psubsb128_mask", - "avx512.mask.psubs.b.256" => "__builtin_ia32_psubsb256_mask", - "avx512.mask.psubs.b.512" => "__builtin_ia32_psubsb512_mask", - "avx512.mask.psubs.w.128" => "__builtin_ia32_psubsw128_mask", - "avx512.mask.psubs.w.256" => "__builtin_ia32_psubsw256_mask", - "avx512.mask.psubs.w.512" => "__builtin_ia32_psubsw512_mask", - "avx512.mask.psubus.b.128" => "__builtin_ia32_psubusb128_mask", - "avx512.mask.psubus.b.256" => "__builtin_ia32_psubusb256_mask", - "avx512.mask.psubus.b.512" => "__builtin_ia32_psubusb512_mask", - "avx512.mask.psubus.w.128" => "__builtin_ia32_psubusw128_mask", - "avx512.mask.psubus.w.256" => "__builtin_ia32_psubusw256_mask", - "avx512.mask.psubus.w.512" => "__builtin_ia32_psubusw512_mask", - "avx512.mask.pternlog.d.128" => "__builtin_ia32_pternlogd128_mask", - "avx512.mask.pternlog.d.256" => "__builtin_ia32_pternlogd256_mask", - "avx512.mask.pternlog.d.512" => "__builtin_ia32_pternlogd512_mask", - "avx512.mask.pternlog.q.128" => "__builtin_ia32_pternlogq128_mask", - "avx512.mask.pternlog.q.256" => "__builtin_ia32_pternlogq256_mask", - "avx512.mask.pternlog.q.512" => "__builtin_ia32_pternlogq512_mask", - "avx512.mask.ptestm.d.512" => "__builtin_ia32_ptestmd512", - "avx512.mask.ptestm.q.512" => "__builtin_ia32_ptestmq512", "avx512.mask.range.pd.128" => "__builtin_ia32_rangepd128_mask", "avx512.mask.range.pd.256" => "__builtin_ia32_rangepd256_mask", "avx512.mask.range.pd.512" => "__builtin_ia32_rangepd512_mask", @@ -9293,181 +8330,11 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx512.mask.scalef.ps.512" => "__builtin_ia32_scalefps512_mask", // [INVALID CONVERSION]: "avx512.mask.scalef.sd" => "__builtin_ia32_scalefsd_round_mask", // [INVALID CONVERSION]: "avx512.mask.scalef.ss" => "__builtin_ia32_scalefss_round_mask", - "avx512.mask.shuf.f32x4" => "__builtin_ia32_shuf_f32x4_mask", - "avx512.mask.shuf.f32x4.256" => "__builtin_ia32_shuf_f32x4_256_mask", - "avx512.mask.shuf.f64x2" => "__builtin_ia32_shuf_f64x2_mask", - "avx512.mask.shuf.f64x2.256" => "__builtin_ia32_shuf_f64x2_256_mask", - "avx512.mask.shuf.i32x4" => "__builtin_ia32_shuf_i32x4_mask", - "avx512.mask.shuf.i32x4.256" => "__builtin_ia32_shuf_i32x4_256_mask", - "avx512.mask.shuf.i64x2" => "__builtin_ia32_shuf_i64x2_mask", - "avx512.mask.shuf.i64x2.256" => "__builtin_ia32_shuf_i64x2_256_mask", - "avx512.mask.shuf.pd.128" => "__builtin_ia32_shufpd128_mask", - "avx512.mask.shuf.pd.256" => "__builtin_ia32_shufpd256_mask", - "avx512.mask.shuf.pd.512" => "__builtin_ia32_shufpd512_mask", - "avx512.mask.shuf.ps.128" => "__builtin_ia32_shufps128_mask", - "avx512.mask.shuf.ps.256" => "__builtin_ia32_shufps256_mask", - "avx512.mask.shuf.ps.512" => "__builtin_ia32_shufps512_mask", - "avx512.mask.sqrt.pd.128" => "__builtin_ia32_sqrtpd128_mask", - "avx512.mask.sqrt.pd.256" => "__builtin_ia32_sqrtpd256_mask", - "avx512.mask.sqrt.pd.512" => "__builtin_ia32_sqrtpd512_mask", - "avx512.mask.sqrt.ps.128" => "__builtin_ia32_sqrtps128_mask", - "avx512.mask.sqrt.ps.256" => "__builtin_ia32_sqrtps256_mask", - "avx512.mask.sqrt.ps.512" => "__builtin_ia32_sqrtps512_mask", - // [INVALID CONVERSION]: "avx512.mask.sqrt.sd" => "__builtin_ia32_sqrtsd_round_mask", - // [INVALID CONVERSION]: "avx512.mask.sqrt.ss" => "__builtin_ia32_sqrtss_round_mask", - "avx512.mask.store.ss" => "__builtin_ia32_storess_mask", - "avx512.mask.storeu.d.512" => "__builtin_ia32_storedqusi512_mask", - "avx512.mask.storeu.pd.512" => "__builtin_ia32_storeupd512_mask", - "avx512.mask.storeu.ps.512" => "__builtin_ia32_storeups512_mask", - "avx512.mask.storeu.q.512" => "__builtin_ia32_storedqudi512_mask", - "avx512.mask.sub.pd.128" => "__builtin_ia32_subpd128_mask", - "avx512.mask.sub.pd.256" => "__builtin_ia32_subpd256_mask", - "avx512.mask.sub.pd.512" => "__builtin_ia32_subpd512_mask", - "avx512.mask.sub.ps.128" => "__builtin_ia32_subps128_mask", - "avx512.mask.sub.ps.256" => "__builtin_ia32_subps256_mask", - "avx512.mask.sub.ps.512" => "__builtin_ia32_subps512_mask", // [INVALID CONVERSION]: "avx512.mask.sub.sd.round" => "__builtin_ia32_subsd_round_mask", // [INVALID CONVERSION]: "avx512.mask.sub.ss.round" => "__builtin_ia32_subss_round_mask", - "avx512.mask.valign.d.128" => "__builtin_ia32_alignd128_mask", - "avx512.mask.valign.d.256" => "__builtin_ia32_alignd256_mask", - "avx512.mask.valign.d.512" => "__builtin_ia32_alignd512_mask", - "avx512.mask.valign.q.128" => "__builtin_ia32_alignq128_mask", - "avx512.mask.valign.q.256" => "__builtin_ia32_alignq256_mask", - "avx512.mask.valign.q.512" => "__builtin_ia32_alignq512_mask", - "avx512.mask.vcvtph2ps.128" => "__builtin_ia32_vcvtph2ps_mask", - "avx512.mask.vcvtph2ps.256" => "__builtin_ia32_vcvtph2ps256_mask", - "avx512.mask.vcvtph2ps.512" => "__builtin_ia32_vcvtph2ps512_mask", "avx512.mask.vcvtps2ph.128" => "__builtin_ia32_vcvtps2ph_mask", "avx512.mask.vcvtps2ph.256" => "__builtin_ia32_vcvtps2ph256_mask", "avx512.mask.vcvtps2ph.512" => "__builtin_ia32_vcvtps2ph512_mask", - "avx512.mask.vextractf32x4.256" => "__builtin_ia32_extractf32x4_256_mask", - "avx512.mask.vextractf32x4.512" => "__builtin_ia32_extractf32x4_mask", - "avx512.mask.vextractf32x8.512" => "__builtin_ia32_extractf32x8_mask", - "avx512.mask.vextractf64x2.256" => "__builtin_ia32_extractf64x2_256_mask", - "avx512.mask.vextractf64x2.512" => "__builtin_ia32_extractf64x2_512_mask", - "avx512.mask.vextractf64x4.512" => "__builtin_ia32_extractf64x4_mask", - "avx512.mask.vextracti32x4.256" => "__builtin_ia32_extracti32x4_256_mask", - "avx512.mask.vextracti32x4.512" => "__builtin_ia32_extracti32x4_mask", - "avx512.mask.vextracti32x8.512" => "__builtin_ia32_extracti32x8_mask", - "avx512.mask.vextracti64x2.256" => "__builtin_ia32_extracti64x2_256_mask", - "avx512.mask.vextracti64x2.512" => "__builtin_ia32_extracti64x2_512_mask", - "avx512.mask.vextracti64x4.512" => "__builtin_ia32_extracti64x4_mask", - "avx512.mask.vfmadd.pd.128" => "__builtin_ia32_vfmaddpd128_mask", - "avx512.mask.vfmadd.pd.256" => "__builtin_ia32_vfmaddpd256_mask", - "avx512.mask.vfmadd.pd.512" => "__builtin_ia32_vfmaddpd512_mask", - "avx512.mask.vfmadd.ps.128" => "__builtin_ia32_vfmaddps128_mask", - "avx512.mask.vfmadd.ps.256" => "__builtin_ia32_vfmaddps256_mask", - "avx512.mask.vfmadd.ps.512" => "__builtin_ia32_vfmaddps512_mask", - "avx512.mask.vfmadd.sd" => "__builtin_ia32_vfmaddsd3_mask", - "avx512.mask.vfmadd.ss" => "__builtin_ia32_vfmaddss3_mask", - "avx512.mask.vfmaddsub.pd.128" => "__builtin_ia32_vfmaddsubpd128_mask", - "avx512.mask.vfmaddsub.pd.256" => "__builtin_ia32_vfmaddsubpd256_mask", - "avx512.mask.vfmaddsub.pd.512" => "__builtin_ia32_vfmaddsubpd512_mask", - "avx512.mask.vfmaddsub.ps.128" => "__builtin_ia32_vfmaddsubps128_mask", - "avx512.mask.vfmaddsub.ps.256" => "__builtin_ia32_vfmaddsubps256_mask", - "avx512.mask.vfmaddsub.ps.512" => "__builtin_ia32_vfmaddsubps512_mask", - "avx512.mask.vfnmadd.pd.128" => "__builtin_ia32_vfnmaddpd128_mask", - "avx512.mask.vfnmadd.pd.256" => "__builtin_ia32_vfnmaddpd256_mask", - "avx512.mask.vfnmadd.pd.512" => "__builtin_ia32_vfnmaddpd512_mask", - "avx512.mask.vfnmadd.ps.128" => "__builtin_ia32_vfnmaddps128_mask", - "avx512.mask.vfnmadd.ps.256" => "__builtin_ia32_vfnmaddps256_mask", - "avx512.mask.vfnmadd.ps.512" => "__builtin_ia32_vfnmaddps512_mask", - "avx512.mask.vfnmsub.pd.128" => "__builtin_ia32_vfnmsubpd128_mask", - "avx512.mask.vfnmsub.pd.256" => "__builtin_ia32_vfnmsubpd256_mask", - "avx512.mask.vfnmsub.pd.512" => "__builtin_ia32_vfnmsubpd512_mask", - "avx512.mask.vfnmsub.ps.128" => "__builtin_ia32_vfnmsubps128_mask", - "avx512.mask.vfnmsub.ps.256" => "__builtin_ia32_vfnmsubps256_mask", - "avx512.mask.vfnmsub.ps.512" => "__builtin_ia32_vfnmsubps512_mask", - "avx512.mask.vpermi2var.d.128" => "__builtin_ia32_vpermi2vard128_mask", - "avx512.mask.vpermi2var.d.256" => "__builtin_ia32_vpermi2vard256_mask", - "avx512.mask.vpermi2var.d.512" => "__builtin_ia32_vpermi2vard512_mask", - "avx512.mask.vpermi2var.hi.128" => "__builtin_ia32_vpermi2varhi128_mask", - "avx512.mask.vpermi2var.hi.256" => "__builtin_ia32_vpermi2varhi256_mask", - "avx512.mask.vpermi2var.hi.512" => "__builtin_ia32_vpermi2varhi512_mask", - "avx512.mask.vpermi2var.pd.128" => "__builtin_ia32_vpermi2varpd128_mask", - "avx512.mask.vpermi2var.pd.256" => "__builtin_ia32_vpermi2varpd256_mask", - "avx512.mask.vpermi2var.pd.512" => "__builtin_ia32_vpermi2varpd512_mask", - "avx512.mask.vpermi2var.ps.128" => "__builtin_ia32_vpermi2varps128_mask", - "avx512.mask.vpermi2var.ps.256" => "__builtin_ia32_vpermi2varps256_mask", - "avx512.mask.vpermi2var.ps.512" => "__builtin_ia32_vpermi2varps512_mask", - "avx512.mask.vpermi2var.q.128" => "__builtin_ia32_vpermi2varq128_mask", - "avx512.mask.vpermi2var.q.256" => "__builtin_ia32_vpermi2varq256_mask", - "avx512.mask.vpermi2var.q.512" => "__builtin_ia32_vpermi2varq512_mask", - "avx512.mask.vpermi2var.qi.128" => "__builtin_ia32_vpermi2varqi128_mask", - "avx512.mask.vpermi2var.qi.256" => "__builtin_ia32_vpermi2varqi256_mask", - "avx512.mask.vpermi2var.qi.512" => "__builtin_ia32_vpermi2varqi512_mask", - "avx512.mask.vpermilvar.pd.128" => "__builtin_ia32_vpermilvarpd_mask", - "avx512.mask.vpermilvar.pd.256" => "__builtin_ia32_vpermilvarpd256_mask", - "avx512.mask.vpermilvar.pd.512" => "__builtin_ia32_vpermilvarpd512_mask", - "avx512.mask.vpermilvar.ps.128" => "__builtin_ia32_vpermilvarps_mask", - "avx512.mask.vpermilvar.ps.256" => "__builtin_ia32_vpermilvarps256_mask", - "avx512.mask.vpermilvar.ps.512" => "__builtin_ia32_vpermilvarps512_mask", - "avx512.mask.vpermt.d.512" => "__builtin_ia32_vpermt2vard512_mask", - "avx512.mask.vpermt.pd.512" => "__builtin_ia32_vpermt2varpd512_mask", - "avx512.mask.vpermt.ps.512" => "__builtin_ia32_vpermt2varps512_mask", - "avx512.mask.vpermt.q.512" => "__builtin_ia32_vpermt2varq512_mask", - "avx512.mask.vpermt2var.d.128" => "__builtin_ia32_vpermt2vard128_mask", - "avx512.mask.vpermt2var.d.256" => "__builtin_ia32_vpermt2vard256_mask", - "avx512.mask.vpermt2var.d.512" => "__builtin_ia32_vpermt2vard512_mask", - "avx512.mask.vpermt2var.hi.128" => "__builtin_ia32_vpermt2varhi128_mask", - "avx512.mask.vpermt2var.hi.256" => "__builtin_ia32_vpermt2varhi256_mask", - "avx512.mask.vpermt2var.hi.512" => "__builtin_ia32_vpermt2varhi512_mask", - "avx512.mask.vpermt2var.pd.128" => "__builtin_ia32_vpermt2varpd128_mask", - "avx512.mask.vpermt2var.pd.256" => "__builtin_ia32_vpermt2varpd256_mask", - "avx512.mask.vpermt2var.pd.512" => "__builtin_ia32_vpermt2varpd512_mask", - "avx512.mask.vpermt2var.ps.128" => "__builtin_ia32_vpermt2varps128_mask", - "avx512.mask.vpermt2var.ps.256" => "__builtin_ia32_vpermt2varps256_mask", - "avx512.mask.vpermt2var.ps.512" => "__builtin_ia32_vpermt2varps512_mask", - "avx512.mask.vpermt2var.q.128" => "__builtin_ia32_vpermt2varq128_mask", - "avx512.mask.vpermt2var.q.256" => "__builtin_ia32_vpermt2varq256_mask", - "avx512.mask.vpermt2var.q.512" => "__builtin_ia32_vpermt2varq512_mask", - "avx512.mask.vpermt2var.qi.128" => "__builtin_ia32_vpermt2varqi128_mask", - "avx512.mask.vpermt2var.qi.256" => "__builtin_ia32_vpermt2varqi256_mask", - "avx512.mask.vpermt2var.qi.512" => "__builtin_ia32_vpermt2varqi512_mask", - "avx512.mask.vpmadd52h.uq.128" => "__builtin_ia32_vpmadd52huq128_mask", - "avx512.mask.vpmadd52h.uq.256" => "__builtin_ia32_vpmadd52huq256_mask", - "avx512.mask.vpmadd52h.uq.512" => "__builtin_ia32_vpmadd52huq512_mask", - "avx512.mask.vpmadd52l.uq.128" => "__builtin_ia32_vpmadd52luq128_mask", - "avx512.mask.vpmadd52l.uq.256" => "__builtin_ia32_vpmadd52luq256_mask", - "avx512.mask.vpmadd52l.uq.512" => "__builtin_ia32_vpmadd52luq512_mask", - "avx512.mask.xor.pd.128" => "__builtin_ia32_xorpd128_mask", - "avx512.mask.xor.pd.256" => "__builtin_ia32_xorpd256_mask", - "avx512.mask.xor.pd.512" => "__builtin_ia32_xorpd512_mask", - "avx512.mask.xor.ps.128" => "__builtin_ia32_xorps128_mask", - "avx512.mask.xor.ps.256" => "__builtin_ia32_xorps256_mask", - "avx512.mask.xor.ps.512" => "__builtin_ia32_xorps512_mask", - "avx512.mask3.vfmadd.pd.128" => "__builtin_ia32_vfmaddpd128_mask3", - "avx512.mask3.vfmadd.pd.256" => "__builtin_ia32_vfmaddpd256_mask3", - "avx512.mask3.vfmadd.pd.512" => "__builtin_ia32_vfmaddpd512_mask3", - "avx512.mask3.vfmadd.ps.128" => "__builtin_ia32_vfmaddps128_mask3", - "avx512.mask3.vfmadd.ps.256" => "__builtin_ia32_vfmaddps256_mask3", - "avx512.mask3.vfmadd.ps.512" => "__builtin_ia32_vfmaddps512_mask3", - "avx512.mask3.vfmadd.sd" => "__builtin_ia32_vfmaddsd3_mask3", - "avx512.mask3.vfmadd.ss" => "__builtin_ia32_vfmaddss3_mask3", - "avx512.mask3.vfmaddsub.pd.128" => "__builtin_ia32_vfmaddsubpd128_mask3", - "avx512.mask3.vfmaddsub.pd.256" => "__builtin_ia32_vfmaddsubpd256_mask3", - "avx512.mask3.vfmaddsub.pd.512" => "__builtin_ia32_vfmaddsubpd512_mask3", - "avx512.mask3.vfmaddsub.ps.128" => "__builtin_ia32_vfmaddsubps128_mask3", - "avx512.mask3.vfmaddsub.ps.256" => "__builtin_ia32_vfmaddsubps256_mask3", - "avx512.mask3.vfmaddsub.ps.512" => "__builtin_ia32_vfmaddsubps512_mask3", - "avx512.mask3.vfmsub.pd.128" => "__builtin_ia32_vfmsubpd128_mask3", - "avx512.mask3.vfmsub.pd.256" => "__builtin_ia32_vfmsubpd256_mask3", - "avx512.mask3.vfmsub.pd.512" => "__builtin_ia32_vfmsubpd512_mask3", - "avx512.mask3.vfmsub.ps.128" => "__builtin_ia32_vfmsubps128_mask3", - "avx512.mask3.vfmsub.ps.256" => "__builtin_ia32_vfmsubps256_mask3", - "avx512.mask3.vfmsub.ps.512" => "__builtin_ia32_vfmsubps512_mask3", - "avx512.mask3.vfmsubadd.pd.128" => "__builtin_ia32_vfmsubaddpd128_mask3", - "avx512.mask3.vfmsubadd.pd.256" => "__builtin_ia32_vfmsubaddpd256_mask3", - "avx512.mask3.vfmsubadd.pd.512" => "__builtin_ia32_vfmsubaddpd512_mask3", - "avx512.mask3.vfmsubadd.ps.128" => "__builtin_ia32_vfmsubaddps128_mask3", - "avx512.mask3.vfmsubadd.ps.256" => "__builtin_ia32_vfmsubaddps256_mask3", - "avx512.mask3.vfmsubadd.ps.512" => "__builtin_ia32_vfmsubaddps512_mask3", - "avx512.mask3.vfnmsub.pd.128" => "__builtin_ia32_vfnmsubpd128_mask3", - "avx512.mask3.vfnmsub.pd.256" => "__builtin_ia32_vfnmsubpd256_mask3", - "avx512.mask3.vfnmsub.pd.512" => "__builtin_ia32_vfnmsubpd512_mask3", - "avx512.mask3.vfnmsub.ps.128" => "__builtin_ia32_vfnmsubps128_mask3", - "avx512.mask3.vfnmsub.ps.256" => "__builtin_ia32_vfnmsubps256_mask3", - "avx512.mask3.vfnmsub.ps.512" => "__builtin_ia32_vfnmsubps512_mask3", "avx512.maskz.fixupimm.pd.128" => "__builtin_ia32_fixupimmpd128_maskz", "avx512.maskz.fixupimm.pd.256" => "__builtin_ia32_fixupimmpd256_maskz", "avx512.maskz.fixupimm.pd.512" => "__builtin_ia32_fixupimmpd512_maskz", @@ -9476,55 +8343,10 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx512.maskz.fixupimm.ps.512" => "__builtin_ia32_fixupimmps512_maskz", "avx512.maskz.fixupimm.sd" => "__builtin_ia32_fixupimmsd_maskz", "avx512.maskz.fixupimm.ss" => "__builtin_ia32_fixupimmss_maskz", - "avx512.maskz.pternlog.d.128" => "__builtin_ia32_pternlogd128_maskz", - "avx512.maskz.pternlog.d.256" => "__builtin_ia32_pternlogd256_maskz", - "avx512.maskz.pternlog.d.512" => "__builtin_ia32_pternlogd512_maskz", - "avx512.maskz.pternlog.q.128" => "__builtin_ia32_pternlogq128_maskz", - "avx512.maskz.pternlog.q.256" => "__builtin_ia32_pternlogq256_maskz", - "avx512.maskz.pternlog.q.512" => "__builtin_ia32_pternlogq512_maskz", - "avx512.maskz.vfmadd.pd.128" => "__builtin_ia32_vfmaddpd128_maskz", - "avx512.maskz.vfmadd.pd.256" => "__builtin_ia32_vfmaddpd256_maskz", - "avx512.maskz.vfmadd.pd.512" => "__builtin_ia32_vfmaddpd512_maskz", - "avx512.maskz.vfmadd.ps.128" => "__builtin_ia32_vfmaddps128_maskz", - "avx512.maskz.vfmadd.ps.256" => "__builtin_ia32_vfmaddps256_maskz", - "avx512.maskz.vfmadd.ps.512" => "__builtin_ia32_vfmaddps512_maskz", - "avx512.maskz.vfmadd.sd" => "__builtin_ia32_vfmaddsd3_maskz", - "avx512.maskz.vfmadd.ss" => "__builtin_ia32_vfmaddss3_maskz", - "avx512.maskz.vfmaddsub.pd.128" => "__builtin_ia32_vfmaddsubpd128_maskz", - "avx512.maskz.vfmaddsub.pd.256" => "__builtin_ia32_vfmaddsubpd256_maskz", - "avx512.maskz.vfmaddsub.pd.512" => "__builtin_ia32_vfmaddsubpd512_maskz", - "avx512.maskz.vfmaddsub.ps.128" => "__builtin_ia32_vfmaddsubps128_maskz", - "avx512.maskz.vfmaddsub.ps.256" => "__builtin_ia32_vfmaddsubps256_maskz", - "avx512.maskz.vfmaddsub.ps.512" => "__builtin_ia32_vfmaddsubps512_maskz", - "avx512.maskz.vpermt2var.d.128" => "__builtin_ia32_vpermt2vard128_maskz", - "avx512.maskz.vpermt2var.d.256" => "__builtin_ia32_vpermt2vard256_maskz", - "avx512.maskz.vpermt2var.d.512" => "__builtin_ia32_vpermt2vard512_maskz", - "avx512.maskz.vpermt2var.hi.128" => "__builtin_ia32_vpermt2varhi128_maskz", - "avx512.maskz.vpermt2var.hi.256" => "__builtin_ia32_vpermt2varhi256_maskz", - "avx512.maskz.vpermt2var.hi.512" => "__builtin_ia32_vpermt2varhi512_maskz", - "avx512.maskz.vpermt2var.pd.128" => "__builtin_ia32_vpermt2varpd128_maskz", - "avx512.maskz.vpermt2var.pd.256" => "__builtin_ia32_vpermt2varpd256_maskz", - "avx512.maskz.vpermt2var.pd.512" => "__builtin_ia32_vpermt2varpd512_maskz", - "avx512.maskz.vpermt2var.ps.128" => "__builtin_ia32_vpermt2varps128_maskz", - "avx512.maskz.vpermt2var.ps.256" => "__builtin_ia32_vpermt2varps256_maskz", - "avx512.maskz.vpermt2var.ps.512" => "__builtin_ia32_vpermt2varps512_maskz", - "avx512.maskz.vpermt2var.q.128" => "__builtin_ia32_vpermt2varq128_maskz", - "avx512.maskz.vpermt2var.q.256" => "__builtin_ia32_vpermt2varq256_maskz", - "avx512.maskz.vpermt2var.q.512" => "__builtin_ia32_vpermt2varq512_maskz", - "avx512.maskz.vpermt2var.qi.128" => "__builtin_ia32_vpermt2varqi128_maskz", - "avx512.maskz.vpermt2var.qi.256" => "__builtin_ia32_vpermt2varqi256_maskz", - "avx512.maskz.vpermt2var.qi.512" => "__builtin_ia32_vpermt2varqi512_maskz", - "avx512.maskz.vpmadd52h.uq.128" => "__builtin_ia32_vpmadd52huq128_maskz", - "avx512.maskz.vpmadd52h.uq.256" => "__builtin_ia32_vpmadd52huq256_maskz", - "avx512.maskz.vpmadd52h.uq.512" => "__builtin_ia32_vpmadd52huq512_maskz", - "avx512.maskz.vpmadd52l.uq.128" => "__builtin_ia32_vpmadd52luq128_maskz", - "avx512.maskz.vpmadd52l.uq.256" => "__builtin_ia32_vpmadd52luq256_maskz", - "avx512.maskz.vpmadd52l.uq.512" => "__builtin_ia32_vpmadd52luq512_maskz", "avx512.max.pd.512" => "__builtin_ia32_maxpd512", "avx512.max.ps.512" => "__builtin_ia32_maxps512", "avx512.min.pd.512" => "__builtin_ia32_minpd512", "avx512.min.ps.512" => "__builtin_ia32_minps512", - "avx512.movntdqa" => "__builtin_ia32_movntdqa512", "avx512.mul.pd.512" => "__builtin_ia32_mulpd512", "avx512.mul.ps.512" => "__builtin_ia32_mulps512", "avx512.packssdw.512" => "__builtin_ia32_packssdw512", @@ -9533,8 +8355,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx512.packuswb.512" => "__builtin_ia32_packuswb512", "avx512.pavg.b.512" => "__builtin_ia32_pavgb512", "avx512.pavg.w.512" => "__builtin_ia32_pavgw512", - "avx512.pbroadcastd.512" => "__builtin_ia32_pbroadcastd512", - "avx512.pbroadcastq.512" => "__builtin_ia32_pbroadcastq512", "avx512.permvar.df.256" => "__builtin_ia32_permvardf256", "avx512.permvar.df.512" => "__builtin_ia32_permvardf512", "avx512.permvar.di.256" => "__builtin_ia32_permvardi256", @@ -9549,11 +8369,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx512.permvar.si.512" => "__builtin_ia32_permvarsi512", "avx512.pmaddubs.w.512" => "__builtin_ia32_pmaddubsw512", "avx512.pmaddw.d.512" => "__builtin_ia32_pmaddwd512", - "avx512.pmovzxbd" => "__builtin_ia32_pmovzxbd512", - "avx512.pmovzxbq" => "__builtin_ia32_pmovzxbq512", - "avx512.pmovzxdq" => "__builtin_ia32_pmovzxdq512", - "avx512.pmovzxwd" => "__builtin_ia32_pmovzxwd512", - "avx512.pmovzxwq" => "__builtin_ia32_pmovzxwq512", "avx512.pmul.hr.sw.512" => "__builtin_ia32_pmulhrsw512", "avx512.pmulh.w.512" => "__builtin_ia32_pmulhw512", "avx512.pmulhu.w.512" => "__builtin_ia32_pmulhuw512", @@ -9563,8 +8378,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx512.psad.bw.512" => "__builtin_ia32_psadbw512", "avx512.pshuf.b.512" => "__builtin_ia32_pshufb512", "avx512.psll.d.512" => "__builtin_ia32_pslld512", - "avx512.psll.dq" => "__builtin_ia32_pslldqi512", - "avx512.psll.dq.bs" => "__builtin_ia32_pslldqi512_byteshift", "avx512.psll.q.512" => "__builtin_ia32_psllq512", "avx512.psll.w.512" => "__builtin_ia32_psllw512", "avx512.pslli.d.512" => "__builtin_ia32_pslldi512", @@ -9593,8 +8406,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx512.psrav.w.256" => "__builtin_ia32_psrav16hi", "avx512.psrav.w.512" => "__builtin_ia32_psrav32hi", "avx512.psrl.d.512" => "__builtin_ia32_psrld512", - "avx512.psrl.dq" => "__builtin_ia32_psrldqi512", - "avx512.psrl.dq.bs" => "__builtin_ia32_psrldqi512_byteshift", "avx512.psrl.q.512" => "__builtin_ia32_psrlq512", "avx512.psrl.w.512" => "__builtin_ia32_psrlw512", "avx512.psrli.d.512" => "__builtin_ia32_psrldi512", @@ -9611,30 +8422,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx512.pternlog.q.128" => "__builtin_ia32_pternlogq128", "avx512.pternlog.q.256" => "__builtin_ia32_pternlogq256", "avx512.pternlog.q.512" => "__builtin_ia32_pternlogq512", - "avx512.ptestm.b.128" => "__builtin_ia32_ptestmb128", - "avx512.ptestm.b.256" => "__builtin_ia32_ptestmb256", - "avx512.ptestm.b.512" => "__builtin_ia32_ptestmb512", - "avx512.ptestm.d.128" => "__builtin_ia32_ptestmd128", - "avx512.ptestm.d.256" => "__builtin_ia32_ptestmd256", - "avx512.ptestm.d.512" => "__builtin_ia32_ptestmd512", - "avx512.ptestm.q.128" => "__builtin_ia32_ptestmq128", - "avx512.ptestm.q.256" => "__builtin_ia32_ptestmq256", - "avx512.ptestm.q.512" => "__builtin_ia32_ptestmq512", - "avx512.ptestm.w.128" => "__builtin_ia32_ptestmw128", - "avx512.ptestm.w.256" => "__builtin_ia32_ptestmw256", - "avx512.ptestm.w.512" => "__builtin_ia32_ptestmw512", - "avx512.ptestnm.b.128" => "__builtin_ia32_ptestnmb128", - "avx512.ptestnm.b.256" => "__builtin_ia32_ptestnmb256", - "avx512.ptestnm.b.512" => "__builtin_ia32_ptestnmb512", - "avx512.ptestnm.d.128" => "__builtin_ia32_ptestnmd128", - "avx512.ptestnm.d.256" => "__builtin_ia32_ptestnmd256", - "avx512.ptestnm.d.512" => "__builtin_ia32_ptestnmd512", - "avx512.ptestnm.q.128" => "__builtin_ia32_ptestnmq128", - "avx512.ptestnm.q.256" => "__builtin_ia32_ptestnmq256", - "avx512.ptestnm.q.512" => "__builtin_ia32_ptestnmq512", - "avx512.ptestnm.w.128" => "__builtin_ia32_ptestnmw128", - "avx512.ptestnm.w.256" => "__builtin_ia32_ptestnmw256", - "avx512.ptestnm.w.512" => "__builtin_ia32_ptestnmw512", "avx512.rcp14.pd.128" => "__builtin_ia32_rcp14pd128_mask", "avx512.rcp14.pd.256" => "__builtin_ia32_rcp14pd256_mask", "avx512.rcp14.pd.512" => "__builtin_ia32_rcp14pd512_mask", @@ -9643,14 +8430,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx512.rcp14.ps.512" => "__builtin_ia32_rcp14ps512_mask", "avx512.rcp14.sd" => "__builtin_ia32_rcp14sd_mask", "avx512.rcp14.ss" => "__builtin_ia32_rcp14ss_mask", - "avx512.rcp28.pd" => "__builtin_ia32_rcp28pd_mask", - "avx512.rcp28.ps" => "__builtin_ia32_rcp28ps_mask", - "avx512.rcp28.sd" => "__builtin_ia32_rcp28sd_mask", - // [DUPLICATE]: "avx512.rcp28.sd" => "__builtin_ia32_rcp28sd_round_mask", - "avx512.rcp28.ss" => "__builtin_ia32_rcp28ss_mask", - // [DUPLICATE]: "avx512.rcp28.ss" => "__builtin_ia32_rcp28ss_round_mask", - "avx512.rndscale.sd" => "__builtin_ia32_rndscalesd", - "avx512.rndscale.ss" => "__builtin_ia32_rndscaless", "avx512.rsqrt14.pd.128" => "__builtin_ia32_rsqrt14pd128_mask", "avx512.rsqrt14.pd.256" => "__builtin_ia32_rsqrt14pd256_mask", "avx512.rsqrt14.pd.512" => "__builtin_ia32_rsqrt14pd512_mask", @@ -9659,50 +8438,8 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx512.rsqrt14.ps.512" => "__builtin_ia32_rsqrt14ps512_mask", "avx512.rsqrt14.sd" => "__builtin_ia32_rsqrt14sd_mask", "avx512.rsqrt14.ss" => "__builtin_ia32_rsqrt14ss_mask", - "avx512.rsqrt28.pd" => "__builtin_ia32_rsqrt28pd_mask", - "avx512.rsqrt28.ps" => "__builtin_ia32_rsqrt28ps_mask", - "avx512.rsqrt28.sd" => "__builtin_ia32_rsqrt28sd_mask", - // [DUPLICATE]: "avx512.rsqrt28.sd" => "__builtin_ia32_rsqrt28sd_round_mask", - "avx512.rsqrt28.ss" => "__builtin_ia32_rsqrt28ss_mask", - // [DUPLICATE]: "avx512.rsqrt28.ss" => "__builtin_ia32_rsqrt28ss_round_mask", - "avx512.scatter.dpd.512" => "__builtin_ia32_scattersiv8df", - "avx512.scatter.dpi.512" => "__builtin_ia32_scattersiv16si", - "avx512.scatter.dpq.512" => "__builtin_ia32_scattersiv8di", - "avx512.scatter.dps.512" => "__builtin_ia32_scattersiv16sf", - "avx512.scatter.qpd.512" => "__builtin_ia32_scatterdiv8df", - "avx512.scatter.qpi.512" => "__builtin_ia32_scatterdiv16si", - "avx512.scatter.qpq.512" => "__builtin_ia32_scatterdiv8di", - "avx512.scatter.qps.512" => "__builtin_ia32_scatterdiv16sf", - "avx512.scatterdiv2.df" => "__builtin_ia32_scatterdiv2df", - "avx512.scatterdiv2.di" => "__builtin_ia32_scatterdiv2di", - "avx512.scatterdiv4.df" => "__builtin_ia32_scatterdiv4df", - "avx512.scatterdiv4.di" => "__builtin_ia32_scatterdiv4di", - "avx512.scatterdiv4.sf" => "__builtin_ia32_scatterdiv4sf", - "avx512.scatterdiv4.si" => "__builtin_ia32_scatterdiv4si", - "avx512.scatterdiv8.sf" => "__builtin_ia32_scatterdiv8sf", - "avx512.scatterdiv8.si" => "__builtin_ia32_scatterdiv8si", - "avx512.scatterpf.dpd.512" => "__builtin_ia32_scatterpfdpd", - "avx512.scatterpf.dps.512" => "__builtin_ia32_scatterpfdps", - "avx512.scatterpf.qpd.512" => "__builtin_ia32_scatterpfqpd", - "avx512.scatterpf.qps.512" => "__builtin_ia32_scatterpfqps", - "avx512.scattersiv2.df" => "__builtin_ia32_scattersiv2df", - "avx512.scattersiv2.di" => "__builtin_ia32_scattersiv2di", - "avx512.scattersiv4.df" => "__builtin_ia32_scattersiv4df", - "avx512.scattersiv4.di" => "__builtin_ia32_scattersiv4di", - "avx512.scattersiv4.sf" => "__builtin_ia32_scattersiv4sf", - "avx512.scattersiv4.si" => "__builtin_ia32_scattersiv4si", - "avx512.scattersiv8.sf" => "__builtin_ia32_scattersiv8sf", - "avx512.scattersiv8.si" => "__builtin_ia32_scattersiv8si", - "avx512.sqrt.pd.512" => "__builtin_ia32_sqrtpd512_mask", - "avx512.sqrt.ps.512" => "__builtin_ia32_sqrtps512_mask", - "avx512.sqrt.sd" => "__builtin_ia32_sqrtrndsd", - "avx512.sqrt.ss" => "__builtin_ia32_sqrtrndss", "avx512.sub.pd.512" => "__builtin_ia32_subpd512", "avx512.sub.ps.512" => "__builtin_ia32_subps512", - "avx512.vbroadcast.sd.512" => "__builtin_ia32_vbroadcastsd512", - "avx512.vbroadcast.sd.pd.512" => "__builtin_ia32_vbroadcastsd_pd512", - "avx512.vbroadcast.ss.512" => "__builtin_ia32_vbroadcastss512", - "avx512.vbroadcast.ss.ps.512" => "__builtin_ia32_vbroadcastss_ps512", "avx512.vcomi.sd" => "__builtin_ia32_vcomisd", "avx512.vcomi.ss" => "__builtin_ia32_vcomiss", "avx512.vcvtsd2si32" => "__builtin_ia32_vcvtsd2si32", @@ -9928,50 +8665,10 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "flags.read.u64" => "__builtin_ia32_readeflags_u64", "flags.write.u32" => "__builtin_ia32_writeeflags_u32", "flags.write.u64" => "__builtin_ia32_writeeflags_u64", - "fma.mask.vfmadd.pd.512" => "__builtin_ia32_vfmaddpd512_mask", - "fma.mask.vfmadd.ps.512" => "__builtin_ia32_vfmaddps512_mask", - "fma.mask.vfmaddsub.pd.512" => "__builtin_ia32_vfmaddsubpd512_mask", - "fma.mask.vfmaddsub.ps.512" => "__builtin_ia32_vfmaddsubps512_mask", - "fma.mask.vfmsub.pd.512" => "__builtin_ia32_vfmsubpd512_mask", - "fma.mask.vfmsub.ps.512" => "__builtin_ia32_vfmsubps512_mask", - "fma.mask.vfmsubadd.pd.512" => "__builtin_ia32_vfmsubaddpd512_mask", - "fma.mask.vfmsubadd.ps.512" => "__builtin_ia32_vfmsubaddps512_mask", - "fma.mask.vfnmadd.pd.512" => "__builtin_ia32_vfnmaddpd512_mask", - "fma.mask.vfnmadd.ps.512" => "__builtin_ia32_vfnmaddps512_mask", - "fma.mask.vfnmsub.pd.512" => "__builtin_ia32_vfnmsubpd512_mask", - "fma.mask.vfnmsub.ps.512" => "__builtin_ia32_vfnmsubps512_mask", - "fma.vfmadd.pd" => "__builtin_ia32_vfmaddpd", - "fma.vfmadd.pd.256" => "__builtin_ia32_vfmaddpd256", - "fma.vfmadd.ps" => "__builtin_ia32_vfmaddps", - "fma.vfmadd.ps.256" => "__builtin_ia32_vfmaddps256", - "fma.vfmadd.sd" => "__builtin_ia32_vfmaddsd", - "fma.vfmadd.ss" => "__builtin_ia32_vfmaddss", "fma.vfmaddsub.pd" => "__builtin_ia32_vfmaddsubpd", "fma.vfmaddsub.pd.256" => "__builtin_ia32_vfmaddsubpd256", "fma.vfmaddsub.ps" => "__builtin_ia32_vfmaddsubps", "fma.vfmaddsub.ps.256" => "__builtin_ia32_vfmaddsubps256", - "fma.vfmsub.pd" => "__builtin_ia32_vfmsubpd", - "fma.vfmsub.pd.256" => "__builtin_ia32_vfmsubpd256", - "fma.vfmsub.ps" => "__builtin_ia32_vfmsubps", - "fma.vfmsub.ps.256" => "__builtin_ia32_vfmsubps256", - "fma.vfmsub.sd" => "__builtin_ia32_vfmsubsd", - "fma.vfmsub.ss" => "__builtin_ia32_vfmsubss", - "fma.vfmsubadd.pd" => "__builtin_ia32_vfmsubaddpd", - "fma.vfmsubadd.pd.256" => "__builtin_ia32_vfmsubaddpd256", - "fma.vfmsubadd.ps" => "__builtin_ia32_vfmsubaddps", - "fma.vfmsubadd.ps.256" => "__builtin_ia32_vfmsubaddps256", - "fma.vfnmadd.pd" => "__builtin_ia32_vfnmaddpd", - "fma.vfnmadd.pd.256" => "__builtin_ia32_vfnmaddpd256", - "fma.vfnmadd.ps" => "__builtin_ia32_vfnmaddps", - "fma.vfnmadd.ps.256" => "__builtin_ia32_vfnmaddps256", - "fma.vfnmadd.sd" => "__builtin_ia32_vfnmaddsd", - "fma.vfnmadd.ss" => "__builtin_ia32_vfnmaddss", - "fma.vfnmsub.pd" => "__builtin_ia32_vfnmsubpd", - "fma.vfnmsub.pd.256" => "__builtin_ia32_vfnmsubpd256", - "fma.vfnmsub.ps" => "__builtin_ia32_vfnmsubps", - "fma.vfnmsub.ps.256" => "__builtin_ia32_vfnmsubps256", - "fma.vfnmsub.sd" => "__builtin_ia32_vfnmsubsd", - "fma.vfnmsub.ss" => "__builtin_ia32_vfnmsubss", "fxrstor" => "__builtin_ia32_fxrstor", "fxrstor64" => "__builtin_ia32_fxrstor64", "fxsave" => "__builtin_ia32_fxsave", @@ -9988,7 +8685,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "lwpval32" => "__builtin_ia32_lwpval32", "lwpval64" => "__builtin_ia32_lwpval64", "mmx.emms" => "__builtin_ia32_emms", - "mmx.femms" => "__builtin_ia32_femms", "monitorx" => "__builtin_ia32_monitorx", "movdir64b" => "__builtin_ia32_movdir64b", "movrsdi" => "__builtin_ia32_movrsdi", @@ -10013,7 +8709,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "rdsspd" => "__builtin_ia32_rdsspd", "rdsspq" => "__builtin_ia32_rdsspq", "rdtsc" => "__builtin_ia32_rdtsc", - "rdtscp" => "__builtin_ia32_rdtscp", "rstorssp" => "__builtin_ia32_rstorssp", "saveprevssp" => "__builtin_ia32_saveprevssp", "senduipi" => "__builtin_ia32_senduipi", @@ -10027,8 +8722,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "sha256msg2" => "__builtin_ia32_sha256msg2", "sha256rnds2" => "__builtin_ia32_sha256rnds2", "slwpcb" => "__builtin_ia32_slwpcb", - "sse.add.ss" => "__builtin_ia32_addss", - "sse.cmp.ps" => "__builtin_ia32_cmpps", "sse.cmp.ss" => "__builtin_ia32_cmpss", "sse.comieq.ss" => "__builtin_ia32_comieq", "sse.comige.ss" => "__builtin_ia32_comige", @@ -10036,37 +8729,27 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "sse.comile.ss" => "__builtin_ia32_comile", "sse.comilt.ss" => "__builtin_ia32_comilt", "sse.comineq.ss" => "__builtin_ia32_comineq", - "sse.cvtsi2ss" => "__builtin_ia32_cvtsi2ss", - "sse.cvtsi642ss" => "__builtin_ia32_cvtsi642ss", "sse.cvtss2si" => "__builtin_ia32_cvtss2si", "sse.cvtss2si64" => "__builtin_ia32_cvtss2si64", "sse.cvttss2si" => "__builtin_ia32_cvttss2si", "sse.cvttss2si64" => "__builtin_ia32_cvttss2si64", - "sse.div.ss" => "__builtin_ia32_divss", "sse.max.ps" => "__builtin_ia32_maxps", "sse.max.ss" => "__builtin_ia32_maxss", "sse.min.ps" => "__builtin_ia32_minps", "sse.min.ss" => "__builtin_ia32_minss", "sse.movmsk.ps" => "__builtin_ia32_movmskps", - "sse.mul.ss" => "__builtin_ia32_mulss", "sse.rcp.ps" => "__builtin_ia32_rcpps", "sse.rcp.ss" => "__builtin_ia32_rcpss", "sse.rsqrt.ps" => "__builtin_ia32_rsqrtps", "sse.rsqrt.ss" => "__builtin_ia32_rsqrtss", "sse.sfence" => "__builtin_ia32_sfence", - "sse.sqrt.ps" => "__builtin_ia32_sqrtps", - "sse.sqrt.ss" => "__builtin_ia32_sqrtss", - "sse.storeu.ps" => "__builtin_ia32_storeups", - "sse.sub.ss" => "__builtin_ia32_subss", "sse.ucomieq.ss" => "__builtin_ia32_ucomieq", "sse.ucomige.ss" => "__builtin_ia32_ucomige", "sse.ucomigt.ss" => "__builtin_ia32_ucomigt", "sse.ucomile.ss" => "__builtin_ia32_ucomile", "sse.ucomilt.ss" => "__builtin_ia32_ucomilt", "sse.ucomineq.ss" => "__builtin_ia32_ucomineq", - "sse2.add.sd" => "__builtin_ia32_addsd", "sse2.clflush" => "__builtin_ia32_clflush", - "sse2.cmp.pd" => "__builtin_ia32_cmppd", "sse2.cmp.sd" => "__builtin_ia32_cmpsd", "sse2.comieq.sd" => "__builtin_ia32_comisdeq", "sse2.comige.sd" => "__builtin_ia32_comisdge", @@ -10074,23 +8757,16 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "sse2.comile.sd" => "__builtin_ia32_comisdle", "sse2.comilt.sd" => "__builtin_ia32_comisdlt", "sse2.comineq.sd" => "__builtin_ia32_comisdneq", - "sse2.cvtdq2pd" => "__builtin_ia32_cvtdq2pd", - "sse2.cvtdq2ps" => "__builtin_ia32_cvtdq2ps", "sse2.cvtpd2dq" => "__builtin_ia32_cvtpd2dq", "sse2.cvtpd2ps" => "__builtin_ia32_cvtpd2ps", "sse2.cvtps2dq" => "__builtin_ia32_cvtps2dq", - "sse2.cvtps2pd" => "__builtin_ia32_cvtps2pd", "sse2.cvtsd2si" => "__builtin_ia32_cvtsd2si", "sse2.cvtsd2si64" => "__builtin_ia32_cvtsd2si64", "sse2.cvtsd2ss" => "__builtin_ia32_cvtsd2ss", - "sse2.cvtsi2sd" => "__builtin_ia32_cvtsi2sd", - "sse2.cvtsi642sd" => "__builtin_ia32_cvtsi642sd", - "sse2.cvtss2sd" => "__builtin_ia32_cvtss2sd", "sse2.cvttpd2dq" => "__builtin_ia32_cvttpd2dq", "sse2.cvttps2dq" => "__builtin_ia32_cvttps2dq", "sse2.cvttsd2si" => "__builtin_ia32_cvttsd2si", "sse2.cvttsd2si64" => "__builtin_ia32_cvttsd2si64", - "sse2.div.sd" => "__builtin_ia32_divsd", "sse2.lfence" => "__builtin_ia32_lfence", "sse2.maskmov.dqu" => "__builtin_ia32_maskmovdqu", "sse2.max.pd" => "__builtin_ia32_maxpd", @@ -10099,33 +8775,18 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "sse2.min.pd" => "__builtin_ia32_minpd", "sse2.min.sd" => "__builtin_ia32_minsd", "sse2.movmsk.pd" => "__builtin_ia32_movmskpd", - "sse2.mul.sd" => "__builtin_ia32_mulsd", "sse2.packssdw.128" => "__builtin_ia32_packssdw128", "sse2.packsswb.128" => "__builtin_ia32_packsswb128", "sse2.packuswb.128" => "__builtin_ia32_packuswb128", - "sse2.padds.b" => "__builtin_ia32_paddsb128", - "sse2.padds.w" => "__builtin_ia32_paddsw128", - "sse2.paddus.b" => "__builtin_ia32_paddusb128", - "sse2.paddus.w" => "__builtin_ia32_paddusw128", "sse2.pause" => "__builtin_ia32_pause", "sse2.pavg.b" => "__builtin_ia32_pavgb128", "sse2.pavg.w" => "__builtin_ia32_pavgw128", "sse2.pmadd.wd" => "__builtin_ia32_pmaddwd128", - "sse2.pmaxs.w" => "__builtin_ia32_pmaxsw128", - "sse2.pmaxu.b" => "__builtin_ia32_pmaxub128", - "sse2.pmins.w" => "__builtin_ia32_pminsw128", - "sse2.pminu.b" => "__builtin_ia32_pminub128", "sse2.pmovmskb.128" => "__builtin_ia32_pmovmskb128", "sse2.pmulh.w" => "__builtin_ia32_pmulhw128", "sse2.pmulhu.w" => "__builtin_ia32_pmulhuw128", - "sse2.pmulu.dq" => "__builtin_ia32_pmuludq128", "sse2.psad.bw" => "__builtin_ia32_psadbw128", - "sse2.pshuf.d" => "__builtin_ia32_pshufd", - "sse2.pshufh.w" => "__builtin_ia32_pshufhw", - "sse2.pshufl.w" => "__builtin_ia32_pshuflw", "sse2.psll.d" => "__builtin_ia32_pslld128", - "sse2.psll.dq" => "__builtin_ia32_pslldqi128", - "sse2.psll.dq.bs" => "__builtin_ia32_pslldqi128_byteshift", "sse2.psll.q" => "__builtin_ia32_psllq128", "sse2.psll.w" => "__builtin_ia32_psllw128", "sse2.pslli.d" => "__builtin_ia32_pslldi128", @@ -10136,23 +8797,11 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "sse2.psrai.d" => "__builtin_ia32_psradi128", "sse2.psrai.w" => "__builtin_ia32_psrawi128", "sse2.psrl.d" => "__builtin_ia32_psrld128", - "sse2.psrl.dq" => "__builtin_ia32_psrldqi128", - "sse2.psrl.dq.bs" => "__builtin_ia32_psrldqi128_byteshift", "sse2.psrl.q" => "__builtin_ia32_psrlq128", "sse2.psrl.w" => "__builtin_ia32_psrlw128", "sse2.psrli.d" => "__builtin_ia32_psrldi128", "sse2.psrli.q" => "__builtin_ia32_psrlqi128", "sse2.psrli.w" => "__builtin_ia32_psrlwi128", - "sse2.psubs.b" => "__builtin_ia32_psubsb128", - "sse2.psubs.w" => "__builtin_ia32_psubsw128", - "sse2.psubus.b" => "__builtin_ia32_psubusb128", - "sse2.psubus.w" => "__builtin_ia32_psubusw128", - "sse2.sqrt.pd" => "__builtin_ia32_sqrtpd", - "sse2.sqrt.sd" => "__builtin_ia32_sqrtsd", - "sse2.storel.dq" => "__builtin_ia32_storelv4si", - "sse2.storeu.dq" => "__builtin_ia32_storedqu", - "sse2.storeu.pd" => "__builtin_ia32_storeupd", - "sse2.sub.sd" => "__builtin_ia32_subsd", "sse2.ucomieq.sd" => "__builtin_ia32_ucomisdeq", "sse2.ucomige.sd" => "__builtin_ia32_ucomisdge", "sse2.ucomigt.sd" => "__builtin_ia32_ucomisdgt", @@ -10168,41 +8817,15 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "sse3.ldu.dq" => "__builtin_ia32_lddqu", "sse3.monitor" => "__builtin_ia32_monitor", "sse3.mwait" => "__builtin_ia32_mwait", - "sse41.blendpd" => "__builtin_ia32_blendpd", - "sse41.blendps" => "__builtin_ia32_blendps", "sse41.blendvpd" => "__builtin_ia32_blendvpd", "sse41.blendvps" => "__builtin_ia32_blendvps", "sse41.dppd" => "__builtin_ia32_dppd", "sse41.dpps" => "__builtin_ia32_dpps", - "sse41.extractps" => "__builtin_ia32_extractps128", "sse41.insertps" => "__builtin_ia32_insertps128", - "sse41.movntdqa" => "__builtin_ia32_movntdqa", "sse41.mpsadbw" => "__builtin_ia32_mpsadbw128", "sse41.packusdw" => "__builtin_ia32_packusdw128", "sse41.pblendvb" => "__builtin_ia32_pblendvb128", - "sse41.pblendw" => "__builtin_ia32_pblendw128", "sse41.phminposuw" => "__builtin_ia32_phminposuw128", - "sse41.pmaxsb" => "__builtin_ia32_pmaxsb128", - "sse41.pmaxsd" => "__builtin_ia32_pmaxsd128", - "sse41.pmaxud" => "__builtin_ia32_pmaxud128", - "sse41.pmaxuw" => "__builtin_ia32_pmaxuw128", - "sse41.pminsb" => "__builtin_ia32_pminsb128", - "sse41.pminsd" => "__builtin_ia32_pminsd128", - "sse41.pminud" => "__builtin_ia32_pminud128", - "sse41.pminuw" => "__builtin_ia32_pminuw128", - "sse41.pmovsxbd" => "__builtin_ia32_pmovsxbd128", - "sse41.pmovsxbq" => "__builtin_ia32_pmovsxbq128", - "sse41.pmovsxbw" => "__builtin_ia32_pmovsxbw128", - "sse41.pmovsxdq" => "__builtin_ia32_pmovsxdq128", - "sse41.pmovsxwd" => "__builtin_ia32_pmovsxwd128", - "sse41.pmovsxwq" => "__builtin_ia32_pmovsxwq128", - "sse41.pmovzxbd" => "__builtin_ia32_pmovzxbd128", - "sse41.pmovzxbq" => "__builtin_ia32_pmovzxbq128", - "sse41.pmovzxbw" => "__builtin_ia32_pmovzxbw128", - "sse41.pmovzxdq" => "__builtin_ia32_pmovzxdq128", - "sse41.pmovzxwd" => "__builtin_ia32_pmovzxwd128", - "sse41.pmovzxwq" => "__builtin_ia32_pmovzxwq128", - "sse41.pmuldq" => "__builtin_ia32_pmuldq128", "sse41.ptestc" => "__builtin_ia32_ptestc128", "sse41.ptestnzc" => "__builtin_ia32_ptestnzc128", "sse41.ptestz" => "__builtin_ia32_ptestz128", @@ -10232,11 +8855,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "sse4a.extrqi" => "__builtin_ia32_extrqi", "sse4a.insertq" => "__builtin_ia32_insertq", "sse4a.insertqi" => "__builtin_ia32_insertqi", - "sse4a.movnt.sd" => "__builtin_ia32_movntsd", - "sse4a.movnt.ss" => "__builtin_ia32_movntss", - "ssse3.pabs.b.128" => "__builtin_ia32_pabsb128", - "ssse3.pabs.d.128" => "__builtin_ia32_pabsd128", - "ssse3.pabs.w.128" => "__builtin_ia32_pabsw128", "ssse3.phadd.d.128" => "__builtin_ia32_phaddd128", "ssse3.phadd.sw.128" => "__builtin_ia32_phaddsw128", "ssse3.phadd.w.128" => "__builtin_ia32_phaddw128", @@ -10251,8 +8869,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "ssse3.psign.w.128" => "__builtin_ia32_psignw128", "sttilecfg" => "__builtin_ia32_tile_storeconfig", "stui" => "__builtin_ia32_stui", - "subborrow.u32" => "__builtin_ia32_subborrow_u32", - "subborrow.u64" => "__builtin_ia32_subborrow_u64", "t2rpntlvwz0rs" => "__builtin_ia32_t2rpntlvwz0rs", "t2rpntlvwz0rst1" => "__builtin_ia32_t2rpntlvwz0rst1", "t2rpntlvwz1rs" => "__builtin_ia32_t2rpntlvwz1rs", @@ -10330,8 +8946,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "vcvtneoph2ps256" => "__builtin_ia32_vcvtneoph2ps256", "vcvtneps2bf16128" => "__builtin_ia32_vcvtneps2bf16128", "vcvtneps2bf16256" => "__builtin_ia32_vcvtneps2bf16256", - "vcvtph2ps.128" => "__builtin_ia32_vcvtph2ps", - "vcvtph2ps.256" => "__builtin_ia32_vcvtph2ps256", "vcvtps2ph.128" => "__builtin_ia32_vcvtps2ph", "vcvtps2ph.256" => "__builtin_ia32_vcvtps2ph256", "vgf2p8affineinvqb.128" => "__builtin_ia32_vgf2p8affineinvqb_v16qi", @@ -10375,16 +8989,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "xop.vfrcz.ps.256" => "__builtin_ia32_vfrczps256", "xop.vfrcz.sd" => "__builtin_ia32_vfrczsd", "xop.vfrcz.ss" => "__builtin_ia32_vfrczss", - "xop.vpcmov" => "__builtin_ia32_vpcmov", - "xop.vpcmov.256" => "__builtin_ia32_vpcmov_256", - "xop.vpcomb" => "__builtin_ia32_vpcomb", - "xop.vpcomd" => "__builtin_ia32_vpcomd", - "xop.vpcomq" => "__builtin_ia32_vpcomq", - "xop.vpcomub" => "__builtin_ia32_vpcomub", - "xop.vpcomud" => "__builtin_ia32_vpcomud", - "xop.vpcomuq" => "__builtin_ia32_vpcomuq", - "xop.vpcomuw" => "__builtin_ia32_vpcomuw", - "xop.vpcomw" => "__builtin_ia32_vpcomw", "xop.vpermil2pd" => "__builtin_ia32_vpermil2pd", "xop.vpermil2pd.256" => "__builtin_ia32_vpermil2pd256", "xop.vpermil2ps" => "__builtin_ia32_vpermil2ps", @@ -10417,14 +9021,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "xop.vpmadcsswd" => "__builtin_ia32_vpmadcsswd", "xop.vpmadcswd" => "__builtin_ia32_vpmadcswd", "xop.vpperm" => "__builtin_ia32_vpperm", - "xop.vprotb" => "__builtin_ia32_vprotb", - "xop.vprotbi" => "__builtin_ia32_vprotbi", - "xop.vprotd" => "__builtin_ia32_vprotd", - "xop.vprotdi" => "__builtin_ia32_vprotdi", - "xop.vprotq" => "__builtin_ia32_vprotq", - "xop.vprotqi" => "__builtin_ia32_vprotqi", - "xop.vprotw" => "__builtin_ia32_vprotw", - "xop.vprotwi" => "__builtin_ia32_vprotwi", "xop.vpshab" => "__builtin_ia32_vpshab", "xop.vpshad" => "__builtin_ia32_vpshad", "xop.vpshaq" => "__builtin_ia32_vpshaq", @@ -10454,6 +9050,14 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { } xcore(name, full_name) } - _ => unimplemented!("***** unsupported LLVM architecture {arch}, intrinsic:{full_name}"), + _ => match old_arch_res { + ArchCheckResult::UnknownIntrinsic => { + unimplemented!("***** unsupported LLVM intrinsic {full_name}") + } + ArchCheckResult::UnknownArch => { + unimplemented!("***** unsupported LLVM architecture {arch}, intrinsic: {full_name}") + } + ArchCheckResult::Ok(_) => unreachable!(), + }, } } diff --git a/src/intrinsic/llvm.rs b/src/intrinsic/llvm.rs index e3d189c95ced..72fc72d118b7 100644 --- a/src/intrinsic/llvm.rs +++ b/src/intrinsic/llvm.rs @@ -1604,5 +1604,7 @@ pub fn intrinsic<'gcc, 'tcx>(name: &str, cx: &CodegenCx<'gcc, 'tcx>) -> Function func } +#[cfg(feature = "master")] +include!("old_archs.rs"); #[cfg(feature = "master")] include!("archs.rs"); diff --git a/src/intrinsic/old_archs.rs b/src/intrinsic/old_archs.rs new file mode 100644 index 000000000000..3a59707b2ebe --- /dev/null +++ b/src/intrinsic/old_archs.rs @@ -0,0 +1,1384 @@ +// All these translations used to be automatically generated in the past. However, since they never +// changed, we decided to simplify the translation generation script to move them directly into this +// file. +// +// So in short: avoid editing this file. + +pub(crate) enum ArchCheckResult { + Ok(&'static str), + UnknownIntrinsic, + UnknownArch, +} + +pub(crate) fn old_archs(arch: &str, name: &str) -> ArchCheckResult { + ArchCheckResult::Ok(match arch { + "AMDGPU" => match name { + "div.fixup.f32" => "__builtin_amdgpu_div_fixup", + "div.fixup.f64" => "__builtin_amdgpu_div_fixup", + "div.fixup.v2f64" => "__builtin_amdgpu_div_fixup", + "div.fixup.v4f32" => "__builtin_amdgpu_div_fixup", + "div.fmas.f32" => "__builtin_amdgpu_div_fmas", + "div.fmas.f64" => "__builtin_amdgpu_div_fmas", + "div.fmas.v2f64" => "__builtin_amdgpu_div_fmas", + "div.fmas.v4f32" => "__builtin_amdgpu_div_fmas", + "ldexp.f32" => "__builtin_amdgpu_ldexp", + "ldexp.f64" => "__builtin_amdgpu_ldexp", + "ldexp.v2f64" => "__builtin_amdgpu_ldexp", + "ldexp.v4f32" => "__builtin_amdgpu_ldexp", + "rcp.f32" => "__builtin_amdgpu_rcp", + "rcp.f64" => "__builtin_amdgpu_rcp", + "rcp.v2f64" => "__builtin_amdgpu_rcp", + "rcp.v4f32" => "__builtin_amdgpu_rcp", + "rsq.clamped.f32" => "__builtin_amdgpu_rsq_clamped", + "rsq.clamped.f64" => "__builtin_amdgpu_rsq_clamped", + "rsq.clamped.v2f64" => "__builtin_amdgpu_rsq_clamped", + "rsq.clamped.v4f32" => "__builtin_amdgpu_rsq_clamped", + "rsq.f32" => "__builtin_amdgpu_rsq", + "rsq.f64" => "__builtin_amdgpu_rsq", + "rsq.v2f64" => "__builtin_amdgpu_rsq", + "rsq.v4f32" => "__builtin_amdgpu_rsq", + "trig.preop.f32" => "__builtin_amdgpu_trig_preop", + "trig.preop.f64" => "__builtin_amdgpu_trig_preop", + "trig.preop.v2f64" => "__builtin_amdgpu_trig_preop", + "trig.preop.v4f32" => "__builtin_amdgpu_trig_preop", + _ => return ArchCheckResult::UnknownIntrinsic, + }, + "arm" => match name { + "mcrr" => "__builtin_arm_mcrr", + "mcrr2" => "__builtin_arm_mcrr2", + "thread.pointer" => "__builtin_thread_pointer", + _ => return ArchCheckResult::UnknownIntrinsic, + }, + "cuda" => match name { + "syncthreads" => "__syncthreads", + _ => return ArchCheckResult::UnknownIntrinsic, + }, + "hexagon" => match name { + "F2.dffixupd" => "__builtin_HEXAGON_F2_dffixupd", + "F2.dffixupn" => "__builtin_HEXAGON_F2_dffixupn", + "F2.dffixupr" => "__builtin_HEXAGON_F2_dffixupr", + "F2.dffma" => "__builtin_HEXAGON_F2_dffma", + "F2.dffma.lib" => "__builtin_HEXAGON_F2_dffma_lib", + "F2.dffma.sc" => "__builtin_HEXAGON_F2_dffma_sc", + "F2.dffms" => "__builtin_HEXAGON_F2_dffms", + "F2.dffms.lib" => "__builtin_HEXAGON_F2_dffms_lib", + "F2.dfmpy" => "__builtin_HEXAGON_F2_dfmpy", + "S2.cabacencbin" => "__builtin_HEXAGON_S2_cabacencbin", + "SI.to.SXTHI.asrh" => "__builtin_SI_to_SXTHI_asrh", + "V6.vlutb" => "__builtin_HEXAGON_V6_vlutb", + "V6.vlutb.128B" => "__builtin_HEXAGON_V6_vlutb_128B", + "V6.vlutb.acc" => "__builtin_HEXAGON_V6_vlutb_acc", + "V6.vlutb.acc.128B" => "__builtin_HEXAGON_V6_vlutb_acc_128B", + "V6.vlutb.dv" => "__builtin_HEXAGON_V6_vlutb_dv", + "V6.vlutb.dv.128B" => "__builtin_HEXAGON_V6_vlutb_dv_128B", + "V6.vlutb.dv.acc" => "__builtin_HEXAGON_V6_vlutb_dv_acc", + "V6.vlutb.dv.acc.128B" => "__builtin_HEXAGON_V6_vlutb_dv_acc_128B", + "brev.ldb" => "__builtin_brev_ldb", + "brev.ldd" => "__builtin_brev_ldd", + "brev.ldh" => "__builtin_brev_ldh", + "brev.ldub" => "__builtin_brev_ldub", + "brev.lduh" => "__builtin_brev_lduh", + "brev.ldw" => "__builtin_brev_ldw", + "brev.stb" => "__builtin_brev_stb", + "brev.std" => "__builtin_brev_std", + "brev.sth" => "__builtin_brev_sth", + "brev.sthhi" => "__builtin_brev_sthhi", + "brev.stw" => "__builtin_brev_stw", + "mm256i.vaddw" => "__builtin__mm256i_vaddw", + _ => return ArchCheckResult::UnknownIntrinsic, + }, + "nvvm" => match name { + "abs.i" => "__nvvm_abs_i", + "abs.ll" => "__nvvm_abs_ll", + "bar.sync" => "__nvvm_bar_sync", + "barrier0" => "__nvvm_bar0", + "bitcast.d2ll" => "__nvvm_bitcast_d2ll", + "bitcast.f2i" => "__nvvm_bitcast_f2i", + "bitcast.i2f" => "__nvvm_bitcast_i2f", + "bitcast.ll2d" => "__nvvm_bitcast_ll2d", + "brev32" => "__nvvm_brev32", + "brev64" => "__nvvm_brev64", + "clz.i" => "__nvvm_clz_i", + "clz.ll" => "__nvvm_clz_ll", + "ex2.approx.d" => "__nvvm_ex2_approx_d", + "ex2.approx.f" => "__nvvm_ex2_approx_f", + "ex2.approx.ftz.f" => "__nvvm_ex2_approx_ftz_f", + "fabs.d" => "__nvvm_fabs_d", + "fabs.f" => "__nvvm_fabs_f", + "fabs.ftz.f" => "__nvvm_fabs_ftz_f", + "h2f" => "__nvvm_h2f", + "max.i" => "__nvvm_max_i", + "max.ll" => "__nvvm_max_ll", + "max.ui" => "__nvvm_max_ui", + "max.ull" => "__nvvm_max_ull", + "min.i" => "__nvvm_min_i", + "min.ll" => "__nvvm_min_ll", + "min.ui" => "__nvvm_min_ui", + "min.ull" => "__nvvm_min_ull", + "popc.i" => "__nvvm_popc_i", + "popc.ll" => "__nvvm_popc_ll", + "rotate.b32" => "__nvvm_rotate_b32", + "rotate.b64" => "__nvvm_rotate_b64", + "rotate.right.b64" => "__nvvm_rotate_right_b64", + "swap.lo.hi.b64" => "__nvvm_swap_lo_hi_b64", + _ => return ArchCheckResult::UnknownIntrinsic, + }, + "ppc" => match name { + "qpx.qvfabs" => "__builtin_qpx_qvfabs", + "qpx.qvfadd" => "__builtin_qpx_qvfadd", + "qpx.qvfadds" => "__builtin_qpx_qvfadds", + "qpx.qvfcfid" => "__builtin_qpx_qvfcfid", + "qpx.qvfcfids" => "__builtin_qpx_qvfcfids", + "qpx.qvfcfidu" => "__builtin_qpx_qvfcfidu", + "qpx.qvfcfidus" => "__builtin_qpx_qvfcfidus", + "qpx.qvfcmpeq" => "__builtin_qpx_qvfcmpeq", + "qpx.qvfcmpgt" => "__builtin_qpx_qvfcmpgt", + "qpx.qvfcmplt" => "__builtin_qpx_qvfcmplt", + "qpx.qvfcpsgn" => "__builtin_qpx_qvfcpsgn", + "qpx.qvfctid" => "__builtin_qpx_qvfctid", + "qpx.qvfctidu" => "__builtin_qpx_qvfctidu", + "qpx.qvfctiduz" => "__builtin_qpx_qvfctiduz", + "qpx.qvfctidz" => "__builtin_qpx_qvfctidz", + "qpx.qvfctiw" => "__builtin_qpx_qvfctiw", + "qpx.qvfctiwu" => "__builtin_qpx_qvfctiwu", + "qpx.qvfctiwuz" => "__builtin_qpx_qvfctiwuz", + "qpx.qvfctiwz" => "__builtin_qpx_qvfctiwz", + "qpx.qvflogical" => "__builtin_qpx_qvflogical", + "qpx.qvfmadd" => "__builtin_qpx_qvfmadd", + "qpx.qvfmadds" => "__builtin_qpx_qvfmadds", + "qpx.qvfmsub" => "__builtin_qpx_qvfmsub", + "qpx.qvfmsubs" => "__builtin_qpx_qvfmsubs", + "qpx.qvfmul" => "__builtin_qpx_qvfmul", + "qpx.qvfmuls" => "__builtin_qpx_qvfmuls", + "qpx.qvfnabs" => "__builtin_qpx_qvfnabs", + "qpx.qvfneg" => "__builtin_qpx_qvfneg", + "qpx.qvfnmadd" => "__builtin_qpx_qvfnmadd", + "qpx.qvfnmadds" => "__builtin_qpx_qvfnmadds", + "qpx.qvfnmsub" => "__builtin_qpx_qvfnmsub", + "qpx.qvfnmsubs" => "__builtin_qpx_qvfnmsubs", + "qpx.qvfperm" => "__builtin_qpx_qvfperm", + "qpx.qvfre" => "__builtin_qpx_qvfre", + "qpx.qvfres" => "__builtin_qpx_qvfres", + "qpx.qvfrim" => "__builtin_qpx_qvfrim", + "qpx.qvfrin" => "__builtin_qpx_qvfrin", + "qpx.qvfrip" => "__builtin_qpx_qvfrip", + "qpx.qvfriz" => "__builtin_qpx_qvfriz", + "qpx.qvfrsp" => "__builtin_qpx_qvfrsp", + "qpx.qvfrsqrte" => "__builtin_qpx_qvfrsqrte", + "qpx.qvfrsqrtes" => "__builtin_qpx_qvfrsqrtes", + "qpx.qvfsel" => "__builtin_qpx_qvfsel", + "qpx.qvfsub" => "__builtin_qpx_qvfsub", + "qpx.qvfsubs" => "__builtin_qpx_qvfsubs", + "qpx.qvftstnan" => "__builtin_qpx_qvftstnan", + "qpx.qvfxmadd" => "__builtin_qpx_qvfxmadd", + "qpx.qvfxmadds" => "__builtin_qpx_qvfxmadds", + "qpx.qvfxmul" => "__builtin_qpx_qvfxmul", + "qpx.qvfxmuls" => "__builtin_qpx_qvfxmuls", + "qpx.qvfxxcpnmadd" => "__builtin_qpx_qvfxxcpnmadd", + "qpx.qvfxxcpnmadds" => "__builtin_qpx_qvfxxcpnmadds", + "qpx.qvfxxmadd" => "__builtin_qpx_qvfxxmadd", + "qpx.qvfxxmadds" => "__builtin_qpx_qvfxxmadds", + "qpx.qvfxxnpmadd" => "__builtin_qpx_qvfxxnpmadd", + "qpx.qvfxxnpmadds" => "__builtin_qpx_qvfxxnpmadds", + "qpx.qvgpci" => "__builtin_qpx_qvgpci", + "qpx.qvlfcd" => "__builtin_qpx_qvlfcd", + "qpx.qvlfcda" => "__builtin_qpx_qvlfcda", + "qpx.qvlfcs" => "__builtin_qpx_qvlfcs", + "qpx.qvlfcsa" => "__builtin_qpx_qvlfcsa", + "qpx.qvlfd" => "__builtin_qpx_qvlfd", + "qpx.qvlfda" => "__builtin_qpx_qvlfda", + "qpx.qvlfiwa" => "__builtin_qpx_qvlfiwa", + "qpx.qvlfiwaa" => "__builtin_qpx_qvlfiwaa", + "qpx.qvlfiwz" => "__builtin_qpx_qvlfiwz", + "qpx.qvlfiwza" => "__builtin_qpx_qvlfiwza", + "qpx.qvlfs" => "__builtin_qpx_qvlfs", + "qpx.qvlfsa" => "__builtin_qpx_qvlfsa", + "qpx.qvlpcld" => "__builtin_qpx_qvlpcld", + "qpx.qvlpcls" => "__builtin_qpx_qvlpcls", + "qpx.qvlpcrd" => "__builtin_qpx_qvlpcrd", + "qpx.qvlpcrs" => "__builtin_qpx_qvlpcrs", + "qpx.qvstfcd" => "__builtin_qpx_qvstfcd", + "qpx.qvstfcda" => "__builtin_qpx_qvstfcda", + "qpx.qvstfcs" => "__builtin_qpx_qvstfcs", + "qpx.qvstfcsa" => "__builtin_qpx_qvstfcsa", + "qpx.qvstfd" => "__builtin_qpx_qvstfd", + "qpx.qvstfda" => "__builtin_qpx_qvstfda", + "qpx.qvstfiw" => "__builtin_qpx_qvstfiw", + "qpx.qvstfiwa" => "__builtin_qpx_qvstfiwa", + "qpx.qvstfs" => "__builtin_qpx_qvstfs", + "qpx.qvstfsa" => "__builtin_qpx_qvstfsa", + _ => return ArchCheckResult::UnknownIntrinsic, + }, + "ptx" => match name { + "bar.sync" => "__builtin_ptx_bar_sync", + "read.clock" => "__builtin_ptx_read_clock", + "read.clock64" => "__builtin_ptx_read_clock64", + "read.gridid" => "__builtin_ptx_read_gridid", + "read.laneid" => "__builtin_ptx_read_laneid", + "read.lanemask.eq" => "__builtin_ptx_read_lanemask_eq", + "read.lanemask.ge" => "__builtin_ptx_read_lanemask_ge", + "read.lanemask.gt" => "__builtin_ptx_read_lanemask_gt", + "read.lanemask.le" => "__builtin_ptx_read_lanemask_le", + "read.lanemask.lt" => "__builtin_ptx_read_lanemask_lt", + "read.nsmid" => "__builtin_ptx_read_nsmid", + "read.nwarpid" => "__builtin_ptx_read_nwarpid", + "read.pm0" => "__builtin_ptx_read_pm0", + "read.pm1" => "__builtin_ptx_read_pm1", + "read.pm2" => "__builtin_ptx_read_pm2", + "read.pm3" => "__builtin_ptx_read_pm3", + "read.smid" => "__builtin_ptx_read_smid", + "read.warpid" => "__builtin_ptx_read_warpid", + _ => return ArchCheckResult::UnknownIntrinsic, + }, + "x86" => match name { + "addcarry.u32" => "__builtin_ia32_addcarry_u32", + "addcarry.u64" => "__builtin_ia32_addcarry_u64", + "addcarryx.u32" => "__builtin_ia32_addcarryx_u32", + "addcarryx.u64" => "__builtin_ia32_addcarryx_u64", + "avx.blend.pd.256" => "__builtin_ia32_blendpd256", + "avx.blend.ps.256" => "__builtin_ia32_blendps256", + "avx.cmp.pd.256" => "__builtin_ia32_cmppd256", + "avx.cmp.ps.256" => "__builtin_ia32_cmpps256", + "avx.cvt.ps2.pd.256" => "__builtin_ia32_cvtps2pd256", + "avx.cvtdq2.pd.256" => "__builtin_ia32_cvtdq2pd256", + "avx.cvtdq2.ps.256" => "__builtin_ia32_cvtdq2ps256", + "avx.sqrt.pd.256" => "__builtin_ia32_sqrtpd256", + "avx.sqrt.ps.256" => "__builtin_ia32_sqrtps256", + "avx.storeu.dq.256" => "__builtin_ia32_storedqu256", + "avx.storeu.pd.256" => "__builtin_ia32_storeupd256", + "avx.storeu.ps.256" => "__builtin_ia32_storeups256", + "avx.vbroadcastf128.pd.256" => "__builtin_ia32_vbroadcastf128_pd256", + "avx.vbroadcastf128.ps.256" => "__builtin_ia32_vbroadcastf128_ps256", + "avx.vextractf128.pd.256" => "__builtin_ia32_vextractf128_pd256", + "avx.vextractf128.ps.256" => "__builtin_ia32_vextractf128_ps256", + "avx.vextractf128.si.256" => "__builtin_ia32_vextractf128_si256", + "avx.vinsertf128.pd.256" => "__builtin_ia32_vinsertf128_pd256", + "avx.vinsertf128.ps.256" => "__builtin_ia32_vinsertf128_ps256", + "avx.vinsertf128.si.256" => "__builtin_ia32_vinsertf128_si256", + "avx.vperm2f128.pd.256" => "__builtin_ia32_vperm2f128_pd256", + "avx.vperm2f128.ps.256" => "__builtin_ia32_vperm2f128_ps256", + "avx.vperm2f128.si.256" => "__builtin_ia32_vperm2f128_si256", + "avx2.movntdqa" => "__builtin_ia32_movntdqa256", + "avx2.pabs.b" => "__builtin_ia32_pabsb256", + "avx2.pabs.d" => "__builtin_ia32_pabsd256", + "avx2.pabs.w" => "__builtin_ia32_pabsw256", + "avx2.padds.b" => "__builtin_ia32_paddsb256", + "avx2.padds.w" => "__builtin_ia32_paddsw256", + "avx2.paddus.b" => "__builtin_ia32_paddusb256", + "avx2.paddus.w" => "__builtin_ia32_paddusw256", + "avx2.pblendd.128" => "__builtin_ia32_pblendd128", + "avx2.pblendd.256" => "__builtin_ia32_pblendd256", + "avx2.pblendw" => "__builtin_ia32_pblendw256", + "avx2.pbroadcastb.128" => "__builtin_ia32_pbroadcastb128", + "avx2.pbroadcastb.256" => "__builtin_ia32_pbroadcastb256", + "avx2.pbroadcastd.128" => "__builtin_ia32_pbroadcastd128", + "avx2.pbroadcastd.256" => "__builtin_ia32_pbroadcastd256", + "avx2.pbroadcastq.128" => "__builtin_ia32_pbroadcastq128", + "avx2.pbroadcastq.256" => "__builtin_ia32_pbroadcastq256", + "avx2.pbroadcastw.128" => "__builtin_ia32_pbroadcastw128", + "avx2.pbroadcastw.256" => "__builtin_ia32_pbroadcastw256", + "avx2.pmaxs.b" => "__builtin_ia32_pmaxsb256", + "avx2.pmaxs.d" => "__builtin_ia32_pmaxsd256", + "avx2.pmaxs.w" => "__builtin_ia32_pmaxsw256", + "avx2.pmaxu.b" => "__builtin_ia32_pmaxub256", + "avx2.pmaxu.d" => "__builtin_ia32_pmaxud256", + "avx2.pmaxu.w" => "__builtin_ia32_pmaxuw256", + "avx2.pmins.b" => "__builtin_ia32_pminsb256", + "avx2.pmins.d" => "__builtin_ia32_pminsd256", + "avx2.pmins.w" => "__builtin_ia32_pminsw256", + "avx2.pminu.b" => "__builtin_ia32_pminub256", + "avx2.pminu.d" => "__builtin_ia32_pminud256", + "avx2.pminu.w" => "__builtin_ia32_pminuw256", + "avx2.pmovsxbd" => "__builtin_ia32_pmovsxbd256", + "avx2.pmovsxbq" => "__builtin_ia32_pmovsxbq256", + "avx2.pmovsxbw" => "__builtin_ia32_pmovsxbw256", + "avx2.pmovsxdq" => "__builtin_ia32_pmovsxdq256", + "avx2.pmovsxwd" => "__builtin_ia32_pmovsxwd256", + "avx2.pmovsxwq" => "__builtin_ia32_pmovsxwq256", + "avx2.pmovzxbd" => "__builtin_ia32_pmovzxbd256", + "avx2.pmovzxbq" => "__builtin_ia32_pmovzxbq256", + "avx2.pmovzxbw" => "__builtin_ia32_pmovzxbw256", + "avx2.pmovzxdq" => "__builtin_ia32_pmovzxdq256", + "avx2.pmovzxwd" => "__builtin_ia32_pmovzxwd256", + "avx2.pmovzxwq" => "__builtin_ia32_pmovzxwq256", + "avx2.pmul.dq" => "__builtin_ia32_pmuldq256", + "avx2.pmulu.dq" => "__builtin_ia32_pmuludq256", + "avx2.psll.dq" => "__builtin_ia32_pslldqi256", + "avx2.psll.dq.bs" => "__builtin_ia32_pslldqi256_byteshift", + "avx2.psrl.dq" => "__builtin_ia32_psrldqi256", + "avx2.psrl.dq.bs" => "__builtin_ia32_psrldqi256_byteshift", + "avx2.psubs.b" => "__builtin_ia32_psubsb256", + "avx2.psubs.w" => "__builtin_ia32_psubsw256", + "avx2.psubus.b" => "__builtin_ia32_psubusb256", + "avx2.psubus.w" => "__builtin_ia32_psubusw256", + "avx2.vbroadcast.sd.pd.256" => "__builtin_ia32_vbroadcastsd_pd256", + "avx2.vbroadcast.ss.ps" => "__builtin_ia32_vbroadcastss_ps", + "avx2.vbroadcast.ss.ps.256" => "__builtin_ia32_vbroadcastss_ps256", + "avx2.vextracti128" => "__builtin_ia32_extract128i256", + "avx2.vinserti128" => "__builtin_ia32_insert128i256", + "avx2.vperm2i128" => "__builtin_ia32_permti256", + "avx512.cvtb2mask.128" => "__builtin_ia32_cvtb2mask128", + "avx512.cvtb2mask.256" => "__builtin_ia32_cvtb2mask256", + "avx512.cvtb2mask.512" => "__builtin_ia32_cvtb2mask512", + "avx512.cvtd2mask.128" => "__builtin_ia32_cvtd2mask128", + "avx512.cvtd2mask.256" => "__builtin_ia32_cvtd2mask256", + "avx512.cvtd2mask.512" => "__builtin_ia32_cvtd2mask512", + "avx512.cvtmask2b.128" => "__builtin_ia32_cvtmask2b128", + "avx512.cvtmask2b.256" => "__builtin_ia32_cvtmask2b256", + "avx512.cvtmask2b.512" => "__builtin_ia32_cvtmask2b512", + "avx512.cvtmask2d.128" => "__builtin_ia32_cvtmask2d128", + "avx512.cvtmask2d.256" => "__builtin_ia32_cvtmask2d256", + "avx512.cvtmask2d.512" => "__builtin_ia32_cvtmask2d512", + "avx512.cvtmask2q.128" => "__builtin_ia32_cvtmask2q128", + "avx512.cvtmask2q.256" => "__builtin_ia32_cvtmask2q256", + "avx512.cvtmask2q.512" => "__builtin_ia32_cvtmask2q512", + "avx512.cvtmask2w.128" => "__builtin_ia32_cvtmask2w128", + "avx512.cvtmask2w.256" => "__builtin_ia32_cvtmask2w256", + "avx512.cvtmask2w.512" => "__builtin_ia32_cvtmask2w512", + "avx512.cvtq2mask.128" => "__builtin_ia32_cvtq2mask128", + "avx512.cvtq2mask.256" => "__builtin_ia32_cvtq2mask256", + "avx512.cvtq2mask.512" => "__builtin_ia32_cvtq2mask512", + "avx512.cvtsd2usi" => "__builtin_ia32_cvtsd2usi", + "avx512.cvtsd2usi64" => "__builtin_ia32_cvtsd2usi64", + "avx512.cvtsi2sd32" => "__builtin_ia32_cvtsi2sd32", + "avx512.cvtss2usi" => "__builtin_ia32_cvtss2usi", + "avx512.cvtss2usi64" => "__builtin_ia32_cvtss2usi64", + "avx512.cvtw2mask.128" => "__builtin_ia32_cvtw2mask128", + "avx512.cvtw2mask.256" => "__builtin_ia32_cvtw2mask256", + "avx512.cvtw2mask.512" => "__builtin_ia32_cvtw2mask512", + "avx512.exp2.pd" => "__builtin_ia32_exp2pd_mask", + "avx512.exp2.ps" => "__builtin_ia32_exp2ps_mask", + "avx512.gather.dpd.512" => "__builtin_ia32_gathersiv8df", + "avx512.gather.dpi.512" => "__builtin_ia32_gathersiv16si", + "avx512.gather.dpq.512" => "__builtin_ia32_gathersiv8di", + "avx512.gather.dps.512" => "__builtin_ia32_gathersiv16sf", + "avx512.gather.qpd.512" => "__builtin_ia32_gatherdiv8df", + "avx512.gather.qpi.512" => "__builtin_ia32_gatherdiv16si", + "avx512.gather.qpq.512" => "__builtin_ia32_gatherdiv8di", + "avx512.gather.qps.512" => "__builtin_ia32_gatherdiv16sf", + "avx512.gather3div2.df" => "__builtin_ia32_gather3div2df", + "avx512.gather3div2.di" => "__builtin_ia32_gather3div2di", + "avx512.gather3div4.df" => "__builtin_ia32_gather3div4df", + "avx512.gather3div4.di" => "__builtin_ia32_gather3div4di", + "avx512.gather3div4.sf" => "__builtin_ia32_gather3div4sf", + "avx512.gather3div4.si" => "__builtin_ia32_gather3div4si", + "avx512.gather3div8.sf" => "__builtin_ia32_gather3div8sf", + "avx512.gather3div8.si" => "__builtin_ia32_gather3div8si", + "avx512.gather3siv2.df" => "__builtin_ia32_gather3siv2df", + "avx512.gather3siv2.di" => "__builtin_ia32_gather3siv2di", + "avx512.gather3siv4.df" => "__builtin_ia32_gather3siv4df", + "avx512.gather3siv4.di" => "__builtin_ia32_gather3siv4di", + "avx512.gather3siv4.sf" => "__builtin_ia32_gather3siv4sf", + "avx512.gather3siv4.si" => "__builtin_ia32_gather3siv4si", + "avx512.gather3siv8.sf" => "__builtin_ia32_gather3siv8sf", + "avx512.gather3siv8.si" => "__builtin_ia32_gather3siv8si", + "avx512.gatherpf.dpd.512" => "__builtin_ia32_gatherpfdpd", + "avx512.gatherpf.dps.512" => "__builtin_ia32_gatherpfdps", + "avx512.gatherpf.qpd.512" => "__builtin_ia32_gatherpfqpd", + "avx512.gatherpf.qps.512" => "__builtin_ia32_gatherpfqps", + "avx512.kand.w" => "__builtin_ia32_kandhi", + "avx512.kandn.w" => "__builtin_ia32_kandnhi", + "avx512.knot.w" => "__builtin_ia32_knothi", + "avx512.kor.w" => "__builtin_ia32_korhi", + "avx512.kortestc.w" => "__builtin_ia32_kortestchi", + "avx512.kortestz.w" => "__builtin_ia32_kortestzhi", + "avx512.kunpck.bw" => "__builtin_ia32_kunpckhi", + "avx512.kunpck.dq" => "__builtin_ia32_kunpckdi", + "avx512.kunpck.wd" => "__builtin_ia32_kunpcksi", + "avx512.kxnor.w" => "__builtin_ia32_kxnorhi", + "avx512.kxor.w" => "__builtin_ia32_kxorhi", + "avx512.mask.add.pd.128" => "__builtin_ia32_addpd128_mask", + "avx512.mask.add.pd.256" => "__builtin_ia32_addpd256_mask", + "avx512.mask.add.pd.512" => "__builtin_ia32_addpd512_mask", + "avx512.mask.add.ps.128" => "__builtin_ia32_addps128_mask", + "avx512.mask.add.ps.256" => "__builtin_ia32_addps256_mask", + "avx512.mask.add.ps.512" => "__builtin_ia32_addps512_mask", + "avx512.mask.and.pd.128" => "__builtin_ia32_andpd128_mask", + "avx512.mask.and.pd.256" => "__builtin_ia32_andpd256_mask", + "avx512.mask.and.pd.512" => "__builtin_ia32_andpd512_mask", + "avx512.mask.and.ps.128" => "__builtin_ia32_andps128_mask", + "avx512.mask.and.ps.256" => "__builtin_ia32_andps256_mask", + "avx512.mask.and.ps.512" => "__builtin_ia32_andps512_mask", + "avx512.mask.andn.pd.128" => "__builtin_ia32_andnpd128_mask", + "avx512.mask.andn.pd.256" => "__builtin_ia32_andnpd256_mask", + "avx512.mask.andn.pd.512" => "__builtin_ia32_andnpd512_mask", + "avx512.mask.andn.ps.128" => "__builtin_ia32_andnps128_mask", + "avx512.mask.andn.ps.256" => "__builtin_ia32_andnps256_mask", + "avx512.mask.andn.ps.512" => "__builtin_ia32_andnps512_mask", + "avx512.mask.blend.d.512" => "__builtin_ia32_blendmd_512_mask", + "avx512.mask.blend.pd.512" => "__builtin_ia32_blendmpd_512_mask", + "avx512.mask.blend.ps.512" => "__builtin_ia32_blendmps_512_mask", + "avx512.mask.blend.q.512" => "__builtin_ia32_blendmq_512_mask", + "avx512.mask.broadcastf32x2.256" => "__builtin_ia32_broadcastf32x2_256_mask", + "avx512.mask.broadcastf32x2.512" => "__builtin_ia32_broadcastf32x2_512_mask", + "avx512.mask.broadcastf32x4.256" => "__builtin_ia32_broadcastf32x4_256_mask", + "avx512.mask.broadcastf32x4.512" => "__builtin_ia32_broadcastf32x4_512", + "avx512.mask.broadcastf32x8.512" => "__builtin_ia32_broadcastf32x8_512_mask", + "avx512.mask.broadcastf64x2.256" => "__builtin_ia32_broadcastf64x2_256_mask", + "avx512.mask.broadcastf64x2.512" => "__builtin_ia32_broadcastf64x2_512_mask", + "avx512.mask.broadcastf64x4.512" => "__builtin_ia32_broadcastf64x4_512", + "avx512.mask.broadcasti32x2.128" => "__builtin_ia32_broadcasti32x2_128_mask", + "avx512.mask.broadcasti32x2.256" => "__builtin_ia32_broadcasti32x2_256_mask", + "avx512.mask.broadcasti32x2.512" => "__builtin_ia32_broadcasti32x2_512_mask", + "avx512.mask.broadcasti32x4.256" => "__builtin_ia32_broadcasti32x4_256_mask", + "avx512.mask.broadcasti32x4.512" => "__builtin_ia32_broadcasti32x4_512", + "avx512.mask.broadcasti32x8.512" => "__builtin_ia32_broadcasti32x8_512_mask", + "avx512.mask.broadcasti64x2.256" => "__builtin_ia32_broadcasti64x2_256_mask", + "avx512.mask.broadcasti64x2.512" => "__builtin_ia32_broadcasti64x2_512_mask", + "avx512.mask.broadcasti64x4.512" => "__builtin_ia32_broadcasti64x4_512", + "avx512.mask.cmp.pd.128" => "__builtin_ia32_cmppd128_mask", + "avx512.mask.cmp.pd.256" => "__builtin_ia32_cmppd256_mask", + "avx512.mask.cmp.pd.512" => "__builtin_ia32_cmppd512_mask", + "avx512.mask.cmp.ps.128" => "__builtin_ia32_cmpps128_mask", + "avx512.mask.cmp.ps.256" => "__builtin_ia32_cmpps256_mask", + "avx512.mask.cmp.ps.512" => "__builtin_ia32_cmpps512_mask", + "avx512.mask.compress.d.128" => "__builtin_ia32_compresssi128_mask", + "avx512.mask.compress.d.256" => "__builtin_ia32_compresssi256_mask", + "avx512.mask.compress.d.512" => "__builtin_ia32_compresssi512_mask", + "avx512.mask.compress.pd.128" => "__builtin_ia32_compressdf128_mask", + "avx512.mask.compress.pd.256" => "__builtin_ia32_compressdf256_mask", + "avx512.mask.compress.pd.512" => "__builtin_ia32_compressdf512_mask", + "avx512.mask.compress.ps.128" => "__builtin_ia32_compresssf128_mask", + "avx512.mask.compress.ps.256" => "__builtin_ia32_compresssf256_mask", + "avx512.mask.compress.ps.512" => "__builtin_ia32_compresssf512_mask", + "avx512.mask.compress.q.128" => "__builtin_ia32_compressdi128_mask", + "avx512.mask.compress.q.256" => "__builtin_ia32_compressdi256_mask", + "avx512.mask.compress.q.512" => "__builtin_ia32_compressdi512_mask", + "avx512.mask.compress.store.d.128" => "__builtin_ia32_compressstoresi128_mask", + "avx512.mask.compress.store.d.256" => "__builtin_ia32_compressstoresi256_mask", + "avx512.mask.compress.store.d.512" => "__builtin_ia32_compressstoresi512_mask", + "avx512.mask.compress.store.pd.128" => "__builtin_ia32_compressstoredf128_mask", + "avx512.mask.compress.store.pd.256" => "__builtin_ia32_compressstoredf256_mask", + "avx512.mask.compress.store.pd.512" => "__builtin_ia32_compressstoredf512_mask", + "avx512.mask.compress.store.ps.128" => "__builtin_ia32_compressstoresf128_mask", + "avx512.mask.compress.store.ps.256" => "__builtin_ia32_compressstoresf256_mask", + "avx512.mask.compress.store.ps.512" => "__builtin_ia32_compressstoresf512_mask", + "avx512.mask.compress.store.q.128" => "__builtin_ia32_compressstoredi128_mask", + "avx512.mask.compress.store.q.256" => "__builtin_ia32_compressstoredi256_mask", + "avx512.mask.compress.store.q.512" => "__builtin_ia32_compressstoredi512_mask", + "avx512.mask.conflict.d.128" => "__builtin_ia32_vpconflictsi_128_mask", + "avx512.mask.conflict.d.256" => "__builtin_ia32_vpconflictsi_256_mask", + "avx512.mask.conflict.d.512" => "__builtin_ia32_vpconflictsi_512_mask", + "avx512.mask.conflict.q.128" => "__builtin_ia32_vpconflictdi_128_mask", + "avx512.mask.conflict.q.256" => "__builtin_ia32_vpconflictdi_256_mask", + "avx512.mask.conflict.q.512" => "__builtin_ia32_vpconflictdi_512_mask", + "avx512.mask.cvtdq2pd.128" => "__builtin_ia32_cvtdq2pd128_mask", + "avx512.mask.cvtdq2pd.256" => "__builtin_ia32_cvtdq2pd256_mask", + "avx512.mask.cvtdq2pd.512" => "__builtin_ia32_cvtdq2pd512_mask", + "avx512.mask.cvtdq2ps.128" => "__builtin_ia32_cvtdq2ps128_mask", + "avx512.mask.cvtdq2ps.256" => "__builtin_ia32_cvtdq2ps256_mask", + "avx512.mask.cvtdq2ps.512" => "__builtin_ia32_cvtdq2ps512_mask", + "avx512.mask.cvtpd2dq.256" => "__builtin_ia32_cvtpd2dq256_mask", + "avx512.mask.cvtps2pd.128" => "__builtin_ia32_cvtps2pd128_mask", + "avx512.mask.cvtps2pd.256" => "__builtin_ia32_cvtps2pd256_mask", + "avx512.mask.cvtqq2pd.128" => "__builtin_ia32_cvtqq2pd128_mask", + "avx512.mask.cvtqq2pd.256" => "__builtin_ia32_cvtqq2pd256_mask", + "avx512.mask.cvtqq2pd.512" => "__builtin_ia32_cvtqq2pd512_mask", + "avx512.mask.cvtqq2ps.256" => "__builtin_ia32_cvtqq2ps256_mask", + "avx512.mask.cvtqq2ps.512" => "__builtin_ia32_cvtqq2ps512_mask", + "avx512.mask.cvttpd2dq.256" => "__builtin_ia32_cvttpd2dq256_mask", + "avx512.mask.cvttps2dq.128" => "__builtin_ia32_cvttps2dq128_mask", + "avx512.mask.cvttps2dq.256" => "__builtin_ia32_cvttps2dq256_mask", + "avx512.mask.cvtudq2pd.128" => "__builtin_ia32_cvtudq2pd128_mask", + "avx512.mask.cvtudq2pd.256" => "__builtin_ia32_cvtudq2pd256_mask", + "avx512.mask.cvtudq2pd.512" => "__builtin_ia32_cvtudq2pd512_mask", + "avx512.mask.cvtudq2ps.128" => "__builtin_ia32_cvtudq2ps128_mask", + "avx512.mask.cvtudq2ps.256" => "__builtin_ia32_cvtudq2ps256_mask", + "avx512.mask.cvtudq2ps.512" => "__builtin_ia32_cvtudq2ps512_mask", + "avx512.mask.cvtuqq2pd.128" => "__builtin_ia32_cvtuqq2pd128_mask", + "avx512.mask.cvtuqq2pd.256" => "__builtin_ia32_cvtuqq2pd256_mask", + "avx512.mask.cvtuqq2pd.512" => "__builtin_ia32_cvtuqq2pd512_mask", + "avx512.mask.cvtuqq2ps.256" => "__builtin_ia32_cvtuqq2ps256_mask", + "avx512.mask.cvtuqq2ps.512" => "__builtin_ia32_cvtuqq2ps512_mask", + "avx512.mask.dbpsadbw.128" => "__builtin_ia32_dbpsadbw128_mask", + "avx512.mask.dbpsadbw.256" => "__builtin_ia32_dbpsadbw256_mask", + "avx512.mask.dbpsadbw.512" => "__builtin_ia32_dbpsadbw512_mask", + "avx512.mask.div.pd.128" => "__builtin_ia32_divpd_mask", + "avx512.mask.div.pd.256" => "__builtin_ia32_divpd256_mask", + "avx512.mask.div.pd.512" => "__builtin_ia32_divpd512_mask", + "avx512.mask.div.ps.128" => "__builtin_ia32_divps_mask", + "avx512.mask.div.ps.256" => "__builtin_ia32_divps256_mask", + "avx512.mask.div.ps.512" => "__builtin_ia32_divps512_mask", + "avx512.mask.expand.d.128" => "__builtin_ia32_expandsi128_mask", + "avx512.mask.expand.d.256" => "__builtin_ia32_expandsi256_mask", + "avx512.mask.expand.d.512" => "__builtin_ia32_expandsi512_mask", + "avx512.mask.expand.load.d.128" => "__builtin_ia32_expandloadsi128_mask", + "avx512.mask.expand.load.d.256" => "__builtin_ia32_expandloadsi256_mask", + "avx512.mask.expand.load.d.512" => "__builtin_ia32_expandloadsi512_mask", + "avx512.mask.expand.load.pd.128" => "__builtin_ia32_expandloaddf128_mask", + "avx512.mask.expand.load.pd.256" => "__builtin_ia32_expandloaddf256_mask", + "avx512.mask.expand.load.pd.512" => "__builtin_ia32_expandloaddf512_mask", + "avx512.mask.expand.load.ps.128" => "__builtin_ia32_expandloadsf128_mask", + "avx512.mask.expand.load.ps.256" => "__builtin_ia32_expandloadsf256_mask", + "avx512.mask.expand.load.ps.512" => "__builtin_ia32_expandloadsf512_mask", + "avx512.mask.expand.load.q.128" => "__builtin_ia32_expandloaddi128_mask", + "avx512.mask.expand.load.q.256" => "__builtin_ia32_expandloaddi256_mask", + "avx512.mask.expand.load.q.512" => "__builtin_ia32_expandloaddi512_mask", + "avx512.mask.expand.pd.128" => "__builtin_ia32_expanddf128_mask", + "avx512.mask.expand.pd.256" => "__builtin_ia32_expanddf256_mask", + "avx512.mask.expand.pd.512" => "__builtin_ia32_expanddf512_mask", + "avx512.mask.expand.ps.128" => "__builtin_ia32_expandsf128_mask", + "avx512.mask.expand.ps.256" => "__builtin_ia32_expandsf256_mask", + "avx512.mask.expand.ps.512" => "__builtin_ia32_expandsf512_mask", + "avx512.mask.expand.q.128" => "__builtin_ia32_expanddi128_mask", + "avx512.mask.expand.q.256" => "__builtin_ia32_expanddi256_mask", + "avx512.mask.expand.q.512" => "__builtin_ia32_expanddi512_mask", + "avx512.mask.fpclass.pd.128" => "__builtin_ia32_fpclasspd128_mask", + "avx512.mask.fpclass.pd.256" => "__builtin_ia32_fpclasspd256_mask", + "avx512.mask.fpclass.pd.512" => "__builtin_ia32_fpclasspd512_mask", + "avx512.mask.fpclass.ps.128" => "__builtin_ia32_fpclassps128_mask", + "avx512.mask.fpclass.ps.256" => "__builtin_ia32_fpclassps256_mask", + "avx512.mask.fpclass.ps.512" => "__builtin_ia32_fpclassps512_mask", + "avx512.mask.insertf32x4.256" => "__builtin_ia32_insertf32x4_256_mask", + "avx512.mask.insertf32x4.512" => "__builtin_ia32_insertf32x4_mask", + "avx512.mask.insertf32x8.512" => "__builtin_ia32_insertf32x8_mask", + "avx512.mask.insertf64x2.256" => "__builtin_ia32_insertf64x2_256_mask", + "avx512.mask.insertf64x2.512" => "__builtin_ia32_insertf64x2_512_mask", + "avx512.mask.insertf64x4.512" => "__builtin_ia32_insertf64x4_mask", + "avx512.mask.inserti32x4.256" => "__builtin_ia32_inserti32x4_256_mask", + "avx512.mask.inserti32x4.512" => "__builtin_ia32_inserti32x4_mask", + "avx512.mask.inserti32x8.512" => "__builtin_ia32_inserti32x8_mask", + "avx512.mask.inserti64x2.256" => "__builtin_ia32_inserti64x2_256_mask", + "avx512.mask.inserti64x2.512" => "__builtin_ia32_inserti64x2_512_mask", + "avx512.mask.inserti64x4.512" => "__builtin_ia32_inserti64x4_mask", + "avx512.mask.loadu.d.512" => "__builtin_ia32_loaddqusi512_mask", + "avx512.mask.loadu.pd.512" => "__builtin_ia32_loadupd512_mask", + "avx512.mask.loadu.ps.512" => "__builtin_ia32_loadups512_mask", + "avx512.mask.loadu.q.512" => "__builtin_ia32_loaddqudi512_mask", + "avx512.mask.lzcnt.d.512" => "__builtin_ia32_vplzcntd_512_mask", + "avx512.mask.lzcnt.q.512" => "__builtin_ia32_vplzcntq_512_mask", + "avx512.mask.max.pd.128" => "__builtin_ia32_maxpd_mask", + "avx512.mask.max.pd.256" => "__builtin_ia32_maxpd256_mask", + "avx512.mask.max.pd.512" => "__builtin_ia32_maxpd512_mask", + "avx512.mask.max.ps.128" => "__builtin_ia32_maxps_mask", + "avx512.mask.max.ps.256" => "__builtin_ia32_maxps256_mask", + "avx512.mask.max.ps.512" => "__builtin_ia32_maxps512_mask", + "avx512.mask.min.pd.128" => "__builtin_ia32_minpd_mask", + "avx512.mask.min.pd.256" => "__builtin_ia32_minpd256_mask", + "avx512.mask.min.pd.512" => "__builtin_ia32_minpd512_mask", + "avx512.mask.min.ps.128" => "__builtin_ia32_minps_mask", + "avx512.mask.min.ps.256" => "__builtin_ia32_minps256_mask", + "avx512.mask.min.ps.512" => "__builtin_ia32_minps512_mask", + "avx512.mask.move.sd" => "__builtin_ia32_movsd_mask", + "avx512.mask.move.ss" => "__builtin_ia32_movss_mask", + "avx512.mask.mul.pd.128" => "__builtin_ia32_mulpd_mask", + "avx512.mask.mul.pd.256" => "__builtin_ia32_mulpd256_mask", + "avx512.mask.mul.pd.512" => "__builtin_ia32_mulpd512_mask", + "avx512.mask.mul.ps.128" => "__builtin_ia32_mulps_mask", + "avx512.mask.mul.ps.256" => "__builtin_ia32_mulps256_mask", + "avx512.mask.mul.ps.512" => "__builtin_ia32_mulps512_mask", + "avx512.mask.or.pd.128" => "__builtin_ia32_orpd128_mask", + "avx512.mask.or.pd.256" => "__builtin_ia32_orpd256_mask", + "avx512.mask.or.pd.512" => "__builtin_ia32_orpd512_mask", + "avx512.mask.or.ps.128" => "__builtin_ia32_orps128_mask", + "avx512.mask.or.ps.256" => "__builtin_ia32_orps256_mask", + "avx512.mask.or.ps.512" => "__builtin_ia32_orps512_mask", + "avx512.mask.pabs.b.128" => "__builtin_ia32_pabsb128_mask", + "avx512.mask.pabs.b.256" => "__builtin_ia32_pabsb256_mask", + "avx512.mask.pabs.b.512" => "__builtin_ia32_pabsb512_mask", + "avx512.mask.pabs.d.128" => "__builtin_ia32_pabsd128_mask", + "avx512.mask.pabs.d.256" => "__builtin_ia32_pabsd256_mask", + "avx512.mask.pabs.d.512" => "__builtin_ia32_pabsd512_mask", + "avx512.mask.pabs.q.128" => "__builtin_ia32_pabsq128_mask", + "avx512.mask.pabs.q.256" => "__builtin_ia32_pabsq256_mask", + "avx512.mask.pabs.q.512" => "__builtin_ia32_pabsq512_mask", + "avx512.mask.pabs.w.128" => "__builtin_ia32_pabsw128_mask", + "avx512.mask.pabs.w.256" => "__builtin_ia32_pabsw256_mask", + "avx512.mask.pabs.w.512" => "__builtin_ia32_pabsw512_mask", + "avx512.mask.packssdw.128" => "__builtin_ia32_packssdw128_mask", + "avx512.mask.packssdw.256" => "__builtin_ia32_packssdw256_mask", + "avx512.mask.packssdw.512" => "__builtin_ia32_packssdw512_mask", + "avx512.mask.packsswb.128" => "__builtin_ia32_packsswb128_mask", + "avx512.mask.packsswb.256" => "__builtin_ia32_packsswb256_mask", + "avx512.mask.packsswb.512" => "__builtin_ia32_packsswb512_mask", + "avx512.mask.packusdw.128" => "__builtin_ia32_packusdw128_mask", + "avx512.mask.packusdw.256" => "__builtin_ia32_packusdw256_mask", + "avx512.mask.packusdw.512" => "__builtin_ia32_packusdw512_mask", + "avx512.mask.packuswb.128" => "__builtin_ia32_packuswb128_mask", + "avx512.mask.packuswb.256" => "__builtin_ia32_packuswb256_mask", + "avx512.mask.packuswb.512" => "__builtin_ia32_packuswb512_mask", + "avx512.mask.padd.b.128" => "__builtin_ia32_paddb128_mask", + "avx512.mask.padd.b.256" => "__builtin_ia32_paddb256_mask", + "avx512.mask.padd.b.512" => "__builtin_ia32_paddb512_mask", + "avx512.mask.padd.d.128" => "__builtin_ia32_paddd128_mask", + "avx512.mask.padd.d.256" => "__builtin_ia32_paddd256_mask", + "avx512.mask.padd.d.512" => "__builtin_ia32_paddd512_mask", + "avx512.mask.padd.q.128" => "__builtin_ia32_paddq128_mask", + "avx512.mask.padd.q.256" => "__builtin_ia32_paddq256_mask", + "avx512.mask.padd.q.512" => "__builtin_ia32_paddq512_mask", + "avx512.mask.padd.w.128" => "__builtin_ia32_paddw128_mask", + "avx512.mask.padd.w.256" => "__builtin_ia32_paddw256_mask", + "avx512.mask.padd.w.512" => "__builtin_ia32_paddw512_mask", + "avx512.mask.padds.b.128" => "__builtin_ia32_paddsb128_mask", + "avx512.mask.padds.b.256" => "__builtin_ia32_paddsb256_mask", + "avx512.mask.padds.b.512" => "__builtin_ia32_paddsb512_mask", + "avx512.mask.padds.w.128" => "__builtin_ia32_paddsw128_mask", + "avx512.mask.padds.w.256" => "__builtin_ia32_paddsw256_mask", + "avx512.mask.padds.w.512" => "__builtin_ia32_paddsw512_mask", + "avx512.mask.paddus.b.128" => "__builtin_ia32_paddusb128_mask", + "avx512.mask.paddus.b.256" => "__builtin_ia32_paddusb256_mask", + "avx512.mask.paddus.b.512" => "__builtin_ia32_paddusb512_mask", + "avx512.mask.paddus.w.128" => "__builtin_ia32_paddusw128_mask", + "avx512.mask.paddus.w.256" => "__builtin_ia32_paddusw256_mask", + "avx512.mask.paddus.w.512" => "__builtin_ia32_paddusw512_mask", + "avx512.mask.pand.d.512" => "__builtin_ia32_pandd512_mask", + "avx512.mask.pand.q.512" => "__builtin_ia32_pandq512_mask", + "avx512.mask.pavg.b.128" => "__builtin_ia32_pavgb128_mask", + "avx512.mask.pavg.b.256" => "__builtin_ia32_pavgb256_mask", + "avx512.mask.pavg.b.512" => "__builtin_ia32_pavgb512_mask", + "avx512.mask.pavg.w.128" => "__builtin_ia32_pavgw128_mask", + "avx512.mask.pavg.w.256" => "__builtin_ia32_pavgw256_mask", + "avx512.mask.pavg.w.512" => "__builtin_ia32_pavgw512_mask", + "avx512.mask.pbroadcast.b.gpr.128" => "__builtin_ia32_pbroadcastb128_gpr_mask", + "avx512.mask.pbroadcast.b.gpr.256" => "__builtin_ia32_pbroadcastb256_gpr_mask", + "avx512.mask.pbroadcast.b.gpr.512" => "__builtin_ia32_pbroadcastb512_gpr_mask", + "avx512.mask.pbroadcast.d.gpr.128" => "__builtin_ia32_pbroadcastd128_gpr_mask", + "avx512.mask.pbroadcast.d.gpr.256" => "__builtin_ia32_pbroadcastd256_gpr_mask", + "avx512.mask.pbroadcast.d.gpr.512" => "__builtin_ia32_pbroadcastd512_gpr_mask", + "avx512.mask.pbroadcast.q.gpr.128" => "__builtin_ia32_pbroadcastq128_gpr_mask", + "avx512.mask.pbroadcast.q.gpr.256" => "__builtin_ia32_pbroadcastq256_gpr_mask", + "avx512.mask.pbroadcast.q.gpr.512" => "__builtin_ia32_pbroadcastq512_gpr_mask", + "avx512.mask.pbroadcast.q.mem.512" => "__builtin_ia32_pbroadcastq512_mem_mask", + "avx512.mask.pbroadcast.w.gpr.128" => "__builtin_ia32_pbroadcastw128_gpr_mask", + "avx512.mask.pbroadcast.w.gpr.256" => "__builtin_ia32_pbroadcastw256_gpr_mask", + "avx512.mask.pbroadcast.w.gpr.512" => "__builtin_ia32_pbroadcastw512_gpr_mask", + "avx512.mask.pcmpeq.b.128" => "__builtin_ia32_pcmpeqb128_mask", + "avx512.mask.pcmpeq.b.256" => "__builtin_ia32_pcmpeqb256_mask", + "avx512.mask.pcmpeq.b.512" => "__builtin_ia32_pcmpeqb512_mask", + "avx512.mask.pcmpeq.d.128" => "__builtin_ia32_pcmpeqd128_mask", + "avx512.mask.pcmpeq.d.256" => "__builtin_ia32_pcmpeqd256_mask", + "avx512.mask.pcmpeq.d.512" => "__builtin_ia32_pcmpeqd512_mask", + "avx512.mask.pcmpeq.q.128" => "__builtin_ia32_pcmpeqq128_mask", + "avx512.mask.pcmpeq.q.256" => "__builtin_ia32_pcmpeqq256_mask", + "avx512.mask.pcmpeq.q.512" => "__builtin_ia32_pcmpeqq512_mask", + "avx512.mask.pcmpeq.w.128" => "__builtin_ia32_pcmpeqw128_mask", + "avx512.mask.pcmpeq.w.256" => "__builtin_ia32_pcmpeqw256_mask", + "avx512.mask.pcmpeq.w.512" => "__builtin_ia32_pcmpeqw512_mask", + "avx512.mask.pcmpgt.b.128" => "__builtin_ia32_pcmpgtb128_mask", + "avx512.mask.pcmpgt.b.256" => "__builtin_ia32_pcmpgtb256_mask", + "avx512.mask.pcmpgt.b.512" => "__builtin_ia32_pcmpgtb512_mask", + "avx512.mask.pcmpgt.d.128" => "__builtin_ia32_pcmpgtd128_mask", + "avx512.mask.pcmpgt.d.256" => "__builtin_ia32_pcmpgtd256_mask", + "avx512.mask.pcmpgt.d.512" => "__builtin_ia32_pcmpgtd512_mask", + "avx512.mask.pcmpgt.q.128" => "__builtin_ia32_pcmpgtq128_mask", + "avx512.mask.pcmpgt.q.256" => "__builtin_ia32_pcmpgtq256_mask", + "avx512.mask.pcmpgt.q.512" => "__builtin_ia32_pcmpgtq512_mask", + "avx512.mask.pcmpgt.w.128" => "__builtin_ia32_pcmpgtw128_mask", + "avx512.mask.pcmpgt.w.256" => "__builtin_ia32_pcmpgtw256_mask", + "avx512.mask.pcmpgt.w.512" => "__builtin_ia32_pcmpgtw512_mask", + "avx512.mask.permvar.df.256" => "__builtin_ia32_permvardf256_mask", + "avx512.mask.permvar.df.512" => "__builtin_ia32_permvardf512_mask", + "avx512.mask.permvar.di.256" => "__builtin_ia32_permvardi256_mask", + "avx512.mask.permvar.di.512" => "__builtin_ia32_permvardi512_mask", + "avx512.mask.permvar.hi.128" => "__builtin_ia32_permvarhi128_mask", + "avx512.mask.permvar.hi.256" => "__builtin_ia32_permvarhi256_mask", + "avx512.mask.permvar.hi.512" => "__builtin_ia32_permvarhi512_mask", + "avx512.mask.permvar.qi.128" => "__builtin_ia32_permvarqi128_mask", + "avx512.mask.permvar.qi.256" => "__builtin_ia32_permvarqi256_mask", + "avx512.mask.permvar.qi.512" => "__builtin_ia32_permvarqi512_mask", + "avx512.mask.permvar.sf.256" => "__builtin_ia32_permvarsf256_mask", + "avx512.mask.permvar.sf.512" => "__builtin_ia32_permvarsf512_mask", + "avx512.mask.permvar.si.256" => "__builtin_ia32_permvarsi256_mask", + "avx512.mask.permvar.si.512" => "__builtin_ia32_permvarsi512_mask", + "avx512.mask.pmaddubs.w.128" => "__builtin_ia32_pmaddubsw128_mask", + "avx512.mask.pmaddubs.w.256" => "__builtin_ia32_pmaddubsw256_mask", + "avx512.mask.pmaddubs.w.512" => "__builtin_ia32_pmaddubsw512_mask", + "avx512.mask.pmaddw.d.128" => "__builtin_ia32_pmaddwd128_mask", + "avx512.mask.pmaddw.d.256" => "__builtin_ia32_pmaddwd256_mask", + "avx512.mask.pmaddw.d.512" => "__builtin_ia32_pmaddwd512_mask", + "avx512.mask.pmaxs.b.128" => "__builtin_ia32_pmaxsb128_mask", + "avx512.mask.pmaxs.b.256" => "__builtin_ia32_pmaxsb256_mask", + "avx512.mask.pmaxs.b.512" => "__builtin_ia32_pmaxsb512_mask", + "avx512.mask.pmaxs.d.128" => "__builtin_ia32_pmaxsd128_mask", + "avx512.mask.pmaxs.d.256" => "__builtin_ia32_pmaxsd256_mask", + "avx512.mask.pmaxs.d.512" => "__builtin_ia32_pmaxsd512_mask", + "avx512.mask.pmaxs.q.128" => "__builtin_ia32_pmaxsq128_mask", + "avx512.mask.pmaxs.q.256" => "__builtin_ia32_pmaxsq256_mask", + "avx512.mask.pmaxs.q.512" => "__builtin_ia32_pmaxsq512_mask", + "avx512.mask.pmaxs.w.128" => "__builtin_ia32_pmaxsw128_mask", + "avx512.mask.pmaxs.w.256" => "__builtin_ia32_pmaxsw256_mask", + "avx512.mask.pmaxs.w.512" => "__builtin_ia32_pmaxsw512_mask", + "avx512.mask.pmaxu.b.128" => "__builtin_ia32_pmaxub128_mask", + "avx512.mask.pmaxu.b.256" => "__builtin_ia32_pmaxub256_mask", + "avx512.mask.pmaxu.b.512" => "__builtin_ia32_pmaxub512_mask", + "avx512.mask.pmaxu.d.128" => "__builtin_ia32_pmaxud128_mask", + "avx512.mask.pmaxu.d.256" => "__builtin_ia32_pmaxud256_mask", + "avx512.mask.pmaxu.d.512" => "__builtin_ia32_pmaxud512_mask", + "avx512.mask.pmaxu.q.128" => "__builtin_ia32_pmaxuq128_mask", + "avx512.mask.pmaxu.q.256" => "__builtin_ia32_pmaxuq256_mask", + "avx512.mask.pmaxu.q.512" => "__builtin_ia32_pmaxuq512_mask", + "avx512.mask.pmaxu.w.128" => "__builtin_ia32_pmaxuw128_mask", + "avx512.mask.pmaxu.w.256" => "__builtin_ia32_pmaxuw256_mask", + "avx512.mask.pmaxu.w.512" => "__builtin_ia32_pmaxuw512_mask", + "avx512.mask.pmins.b.128" => "__builtin_ia32_pminsb128_mask", + "avx512.mask.pmins.b.256" => "__builtin_ia32_pminsb256_mask", + "avx512.mask.pmins.b.512" => "__builtin_ia32_pminsb512_mask", + "avx512.mask.pmins.d.128" => "__builtin_ia32_pminsd128_mask", + "avx512.mask.pmins.d.256" => "__builtin_ia32_pminsd256_mask", + "avx512.mask.pmins.d.512" => "__builtin_ia32_pminsd512_mask", + "avx512.mask.pmins.q.128" => "__builtin_ia32_pminsq128_mask", + "avx512.mask.pmins.q.256" => "__builtin_ia32_pminsq256_mask", + "avx512.mask.pmins.q.512" => "__builtin_ia32_pminsq512_mask", + "avx512.mask.pmins.w.128" => "__builtin_ia32_pminsw128_mask", + "avx512.mask.pmins.w.256" => "__builtin_ia32_pminsw256_mask", + "avx512.mask.pmins.w.512" => "__builtin_ia32_pminsw512_mask", + "avx512.mask.pminu.b.128" => "__builtin_ia32_pminub128_mask", + "avx512.mask.pminu.b.256" => "__builtin_ia32_pminub256_mask", + "avx512.mask.pminu.b.512" => "__builtin_ia32_pminub512_mask", + "avx512.mask.pminu.d.128" => "__builtin_ia32_pminud128_mask", + "avx512.mask.pminu.d.256" => "__builtin_ia32_pminud256_mask", + "avx512.mask.pminu.d.512" => "__builtin_ia32_pminud512_mask", + "avx512.mask.pminu.q.128" => "__builtin_ia32_pminuq128_mask", + "avx512.mask.pminu.q.256" => "__builtin_ia32_pminuq256_mask", + "avx512.mask.pminu.q.512" => "__builtin_ia32_pminuq512_mask", + "avx512.mask.pminu.w.128" => "__builtin_ia32_pminuw128_mask", + "avx512.mask.pminu.w.256" => "__builtin_ia32_pminuw256_mask", + "avx512.mask.pminu.w.512" => "__builtin_ia32_pminuw512_mask", + "avx512.mask.pmov.db.512" => "__builtin_ia32_pmovdb512_mask", + "avx512.mask.pmov.dw.512" => "__builtin_ia32_pmovdw512_mask", + "avx512.mask.pmov.qd.256" => "__builtin_ia32_pmovqd256_mask", + "avx512.mask.pmov.qd.512" => "__builtin_ia32_pmovqd512_mask", + "avx512.mask.pmov.qw.512" => "__builtin_ia32_pmovqw512_mask", + "avx512.mask.pmov.wb.256" => "__builtin_ia32_pmovwb256_mask", + "avx512.mask.pmov.wb.512" => "__builtin_ia32_pmovwb512_mask", + "avx512.mask.pmovsxb.d.128" => "__builtin_ia32_pmovsxbd128_mask", + "avx512.mask.pmovsxb.d.256" => "__builtin_ia32_pmovsxbd256_mask", + "avx512.mask.pmovsxb.d.512" => "__builtin_ia32_pmovsxbd512_mask", + "avx512.mask.pmovsxb.q.128" => "__builtin_ia32_pmovsxbq128_mask", + "avx512.mask.pmovsxb.q.256" => "__builtin_ia32_pmovsxbq256_mask", + "avx512.mask.pmovsxb.q.512" => "__builtin_ia32_pmovsxbq512_mask", + "avx512.mask.pmovsxb.w.128" => "__builtin_ia32_pmovsxbw128_mask", + "avx512.mask.pmovsxb.w.256" => "__builtin_ia32_pmovsxbw256_mask", + "avx512.mask.pmovsxb.w.512" => "__builtin_ia32_pmovsxbw512_mask", + "avx512.mask.pmovsxd.q.128" => "__builtin_ia32_pmovsxdq128_mask", + "avx512.mask.pmovsxd.q.256" => "__builtin_ia32_pmovsxdq256_mask", + "avx512.mask.pmovsxd.q.512" => "__builtin_ia32_pmovsxdq512_mask", + "avx512.mask.pmovsxw.d.128" => "__builtin_ia32_pmovsxwd128_mask", + "avx512.mask.pmovsxw.d.256" => "__builtin_ia32_pmovsxwd256_mask", + "avx512.mask.pmovsxw.d.512" => "__builtin_ia32_pmovsxwd512_mask", + "avx512.mask.pmovsxw.q.128" => "__builtin_ia32_pmovsxwq128_mask", + "avx512.mask.pmovsxw.q.256" => "__builtin_ia32_pmovsxwq256_mask", + "avx512.mask.pmovsxw.q.512" => "__builtin_ia32_pmovsxwq512_mask", + "avx512.mask.pmovzxb.d.128" => "__builtin_ia32_pmovzxbd128_mask", + "avx512.mask.pmovzxb.d.256" => "__builtin_ia32_pmovzxbd256_mask", + "avx512.mask.pmovzxb.d.512" => "__builtin_ia32_pmovzxbd512_mask", + "avx512.mask.pmovzxb.q.128" => "__builtin_ia32_pmovzxbq128_mask", + "avx512.mask.pmovzxb.q.256" => "__builtin_ia32_pmovzxbq256_mask", + "avx512.mask.pmovzxb.q.512" => "__builtin_ia32_pmovzxbq512_mask", + "avx512.mask.pmovzxb.w.128" => "__builtin_ia32_pmovzxbw128_mask", + "avx512.mask.pmovzxb.w.256" => "__builtin_ia32_pmovzxbw256_mask", + "avx512.mask.pmovzxb.w.512" => "__builtin_ia32_pmovzxbw512_mask", + "avx512.mask.pmovzxd.q.128" => "__builtin_ia32_pmovzxdq128_mask", + "avx512.mask.pmovzxd.q.256" => "__builtin_ia32_pmovzxdq256_mask", + "avx512.mask.pmovzxd.q.512" => "__builtin_ia32_pmovzxdq512_mask", + "avx512.mask.pmovzxw.d.128" => "__builtin_ia32_pmovzxwd128_mask", + "avx512.mask.pmovzxw.d.256" => "__builtin_ia32_pmovzxwd256_mask", + "avx512.mask.pmovzxw.d.512" => "__builtin_ia32_pmovzxwd512_mask", + "avx512.mask.pmovzxw.q.128" => "__builtin_ia32_pmovzxwq128_mask", + "avx512.mask.pmovzxw.q.256" => "__builtin_ia32_pmovzxwq256_mask", + "avx512.mask.pmovzxw.q.512" => "__builtin_ia32_pmovzxwq512_mask", + "avx512.mask.pmul.dq.128" => "__builtin_ia32_pmuldq128_mask", + "avx512.mask.pmul.dq.256" => "__builtin_ia32_pmuldq256_mask", + "avx512.mask.pmul.dq.512" => "__builtin_ia32_pmuldq512_mask", + "avx512.mask.pmul.hr.sw.128" => "__builtin_ia32_pmulhrsw128_mask", + "avx512.mask.pmul.hr.sw.256" => "__builtin_ia32_pmulhrsw256_mask", + "avx512.mask.pmul.hr.sw.512" => "__builtin_ia32_pmulhrsw512_mask", + "avx512.mask.pmulh.w.128" => "__builtin_ia32_pmulhw128_mask", + "avx512.mask.pmulh.w.256" => "__builtin_ia32_pmulhw256_mask", + "avx512.mask.pmulh.w.512" => "__builtin_ia32_pmulhw512_mask", + "avx512.mask.pmulhu.w.128" => "__builtin_ia32_pmulhuw128_mask", + "avx512.mask.pmulhu.w.256" => "__builtin_ia32_pmulhuw256_mask", + "avx512.mask.pmulhu.w.512" => "__builtin_ia32_pmulhuw512_mask", + "avx512.mask.pmull.d.128" => "__builtin_ia32_pmulld128_mask", + "avx512.mask.pmull.d.256" => "__builtin_ia32_pmulld256_mask", + "avx512.mask.pmull.d.512" => "__builtin_ia32_pmulld512_mask", + "avx512.mask.pmull.q.128" => "__builtin_ia32_pmullq128_mask", + "avx512.mask.pmull.q.256" => "__builtin_ia32_pmullq256_mask", + "avx512.mask.pmull.q.512" => "__builtin_ia32_pmullq512_mask", + "avx512.mask.pmull.w.128" => "__builtin_ia32_pmullw128_mask", + "avx512.mask.pmull.w.256" => "__builtin_ia32_pmullw256_mask", + "avx512.mask.pmull.w.512" => "__builtin_ia32_pmullw512_mask", + "avx512.mask.pmultishift.qb.128" => "__builtin_ia32_vpmultishiftqb128_mask", + "avx512.mask.pmultishift.qb.256" => "__builtin_ia32_vpmultishiftqb256_mask", + "avx512.mask.pmultishift.qb.512" => "__builtin_ia32_vpmultishiftqb512_mask", + "avx512.mask.pmulu.dq.128" => "__builtin_ia32_pmuludq128_mask", + "avx512.mask.pmulu.dq.256" => "__builtin_ia32_pmuludq256_mask", + "avx512.mask.pmulu.dq.512" => "__builtin_ia32_pmuludq512_mask", + "avx512.mask.prol.d.128" => "__builtin_ia32_prold128_mask", + "avx512.mask.prol.d.256" => "__builtin_ia32_prold256_mask", + "avx512.mask.prol.d.512" => "__builtin_ia32_prold512_mask", + "avx512.mask.prol.q.128" => "__builtin_ia32_prolq128_mask", + "avx512.mask.prol.q.256" => "__builtin_ia32_prolq256_mask", + "avx512.mask.prol.q.512" => "__builtin_ia32_prolq512_mask", + "avx512.mask.prolv.d.128" => "__builtin_ia32_prolvd128_mask", + "avx512.mask.prolv.d.256" => "__builtin_ia32_prolvd256_mask", + "avx512.mask.prolv.d.512" => "__builtin_ia32_prolvd512_mask", + "avx512.mask.prolv.q.128" => "__builtin_ia32_prolvq128_mask", + "avx512.mask.prolv.q.256" => "__builtin_ia32_prolvq256_mask", + "avx512.mask.prolv.q.512" => "__builtin_ia32_prolvq512_mask", + "avx512.mask.pror.d.128" => "__builtin_ia32_prord128_mask", + "avx512.mask.pror.d.256" => "__builtin_ia32_prord256_mask", + "avx512.mask.pror.d.512" => "__builtin_ia32_prord512_mask", + "avx512.mask.pror.q.128" => "__builtin_ia32_prorq128_mask", + "avx512.mask.pror.q.256" => "__builtin_ia32_prorq256_mask", + "avx512.mask.pror.q.512" => "__builtin_ia32_prorq512_mask", + "avx512.mask.prorv.d.128" => "__builtin_ia32_prorvd128_mask", + "avx512.mask.prorv.d.256" => "__builtin_ia32_prorvd256_mask", + "avx512.mask.prorv.d.512" => "__builtin_ia32_prorvd512_mask", + "avx512.mask.prorv.q.128" => "__builtin_ia32_prorvq128_mask", + "avx512.mask.prorv.q.256" => "__builtin_ia32_prorvq256_mask", + "avx512.mask.prorv.q.512" => "__builtin_ia32_prorvq512_mask", + "avx512.mask.pshuf.b.128" => "__builtin_ia32_pshufb128_mask", + "avx512.mask.pshuf.b.256" => "__builtin_ia32_pshufb256_mask", + "avx512.mask.pshuf.b.512" => "__builtin_ia32_pshufb512_mask", + "avx512.mask.psll.d" => "__builtin_ia32_pslld512_mask", + "avx512.mask.psll.d.128" => "__builtin_ia32_pslld128_mask", + "avx512.mask.psll.d.256" => "__builtin_ia32_pslld256_mask", + "avx512.mask.psll.di.128" => "__builtin_ia32_pslldi128_mask", + "avx512.mask.psll.di.256" => "__builtin_ia32_pslldi256_mask", + "avx512.mask.psll.di.512" => "__builtin_ia32_pslldi512_mask", + "avx512.mask.psll.q" => "__builtin_ia32_psllq512_mask", + "avx512.mask.psll.q.128" => "__builtin_ia32_psllq128_mask", + "avx512.mask.psll.q.256" => "__builtin_ia32_psllq256_mask", + "avx512.mask.psll.qi.128" => "__builtin_ia32_psllqi128_mask", + "avx512.mask.psll.qi.256" => "__builtin_ia32_psllqi256_mask", + "avx512.mask.psll.qi.512" => "__builtin_ia32_psllqi512_mask", + "avx512.mask.psll.w.128" => "__builtin_ia32_psllw128_mask", + "avx512.mask.psll.w.256" => "__builtin_ia32_psllw256_mask", + "avx512.mask.psll.w.512" => "__builtin_ia32_psllw512_mask", + "avx512.mask.psll.wi.128" => "__builtin_ia32_psllwi128_mask", + "avx512.mask.psll.wi.256" => "__builtin_ia32_psllwi256_mask", + "avx512.mask.psll.wi.512" => "__builtin_ia32_psllwi512_mask", + "avx512.mask.psllv.d" => "__builtin_ia32_psllv16si_mask", + "avx512.mask.psllv.q" => "__builtin_ia32_psllv8di_mask", + "avx512.mask.psllv16.hi" => "__builtin_ia32_psllv16hi_mask", + "avx512.mask.psllv2.di" => "__builtin_ia32_psllv2di_mask", + "avx512.mask.psllv32hi" => "__builtin_ia32_psllv32hi_mask", + "avx512.mask.psllv4.di" => "__builtin_ia32_psllv4di_mask", + "avx512.mask.psllv4.si" => "__builtin_ia32_psllv4si_mask", + "avx512.mask.psllv8.hi" => "__builtin_ia32_psllv8hi_mask", + "avx512.mask.psllv8.si" => "__builtin_ia32_psllv8si_mask", + "avx512.mask.psra.d" => "__builtin_ia32_psrad512_mask", + "avx512.mask.psra.d.128" => "__builtin_ia32_psrad128_mask", + "avx512.mask.psra.d.256" => "__builtin_ia32_psrad256_mask", + "avx512.mask.psra.di.128" => "__builtin_ia32_psradi128_mask", + "avx512.mask.psra.di.256" => "__builtin_ia32_psradi256_mask", + "avx512.mask.psra.di.512" => "__builtin_ia32_psradi512_mask", + "avx512.mask.psra.q" => "__builtin_ia32_psraq512_mask", + "avx512.mask.psra.q.128" => "__builtin_ia32_psraq128_mask", + "avx512.mask.psra.q.256" => "__builtin_ia32_psraq256_mask", + "avx512.mask.psra.qi.128" => "__builtin_ia32_psraqi128_mask", + "avx512.mask.psra.qi.256" => "__builtin_ia32_psraqi256_mask", + "avx512.mask.psra.qi.512" => "__builtin_ia32_psraqi512_mask", + "avx512.mask.psra.w.128" => "__builtin_ia32_psraw128_mask", + "avx512.mask.psra.w.256" => "__builtin_ia32_psraw256_mask", + "avx512.mask.psra.w.512" => "__builtin_ia32_psraw512_mask", + "avx512.mask.psra.wi.128" => "__builtin_ia32_psrawi128_mask", + "avx512.mask.psra.wi.256" => "__builtin_ia32_psrawi256_mask", + "avx512.mask.psra.wi.512" => "__builtin_ia32_psrawi512_mask", + "avx512.mask.psrav.d" => "__builtin_ia32_psrav16si_mask", + "avx512.mask.psrav.q" => "__builtin_ia32_psrav8di_mask", + "avx512.mask.psrav.q.128" => "__builtin_ia32_psravq128_mask", + "avx512.mask.psrav.q.256" => "__builtin_ia32_psravq256_mask", + "avx512.mask.psrav16.hi" => "__builtin_ia32_psrav16hi_mask", + "avx512.mask.psrav32.hi" => "__builtin_ia32_psrav32hi_mask", + "avx512.mask.psrav4.si" => "__builtin_ia32_psrav4si_mask", + "avx512.mask.psrav8.hi" => "__builtin_ia32_psrav8hi_mask", + "avx512.mask.psrav8.si" => "__builtin_ia32_psrav8si_mask", + "avx512.mask.psrl.d" => "__builtin_ia32_psrld512_mask", + "avx512.mask.psrl.d.128" => "__builtin_ia32_psrld128_mask", + "avx512.mask.psrl.d.256" => "__builtin_ia32_psrld256_mask", + "avx512.mask.psrl.di.128" => "__builtin_ia32_psrldi128_mask", + "avx512.mask.psrl.di.256" => "__builtin_ia32_psrldi256_mask", + "avx512.mask.psrl.di.512" => "__builtin_ia32_psrldi512_mask", + "avx512.mask.psrl.q" => "__builtin_ia32_psrlq512_mask", + "avx512.mask.psrl.q.128" => "__builtin_ia32_psrlq128_mask", + "avx512.mask.psrl.q.256" => "__builtin_ia32_psrlq256_mask", + "avx512.mask.psrl.qi.128" => "__builtin_ia32_psrlqi128_mask", + "avx512.mask.psrl.qi.256" => "__builtin_ia32_psrlqi256_mask", + "avx512.mask.psrl.qi.512" => "__builtin_ia32_psrlqi512_mask", + "avx512.mask.psrl.w.128" => "__builtin_ia32_psrlw128_mask", + "avx512.mask.psrl.w.256" => "__builtin_ia32_psrlw256_mask", + "avx512.mask.psrl.w.512" => "__builtin_ia32_psrlw512_mask", + "avx512.mask.psrl.wi.128" => "__builtin_ia32_psrlwi128_mask", + "avx512.mask.psrl.wi.256" => "__builtin_ia32_psrlwi256_mask", + "avx512.mask.psrl.wi.512" => "__builtin_ia32_psrlwi512_mask", + "avx512.mask.psrlv.d" => "__builtin_ia32_psrlv16si_mask", + "avx512.mask.psrlv.q" => "__builtin_ia32_psrlv8di_mask", + "avx512.mask.psrlv16.hi" => "__builtin_ia32_psrlv16hi_mask", + "avx512.mask.psrlv2.di" => "__builtin_ia32_psrlv2di_mask", + "avx512.mask.psrlv32hi" => "__builtin_ia32_psrlv32hi_mask", + "avx512.mask.psrlv4.di" => "__builtin_ia32_psrlv4di_mask", + "avx512.mask.psrlv4.si" => "__builtin_ia32_psrlv4si_mask", + "avx512.mask.psrlv8.hi" => "__builtin_ia32_psrlv8hi_mask", + "avx512.mask.psrlv8.si" => "__builtin_ia32_psrlv8si_mask", + "avx512.mask.psub.b.128" => "__builtin_ia32_psubb128_mask", + "avx512.mask.psub.b.256" => "__builtin_ia32_psubb256_mask", + "avx512.mask.psub.b.512" => "__builtin_ia32_psubb512_mask", + "avx512.mask.psub.d.128" => "__builtin_ia32_psubd128_mask", + "avx512.mask.psub.d.256" => "__builtin_ia32_psubd256_mask", + "avx512.mask.psub.d.512" => "__builtin_ia32_psubd512_mask", + "avx512.mask.psub.q.128" => "__builtin_ia32_psubq128_mask", + "avx512.mask.psub.q.256" => "__builtin_ia32_psubq256_mask", + "avx512.mask.psub.q.512" => "__builtin_ia32_psubq512_mask", + "avx512.mask.psub.w.128" => "__builtin_ia32_psubw128_mask", + "avx512.mask.psub.w.256" => "__builtin_ia32_psubw256_mask", + "avx512.mask.psub.w.512" => "__builtin_ia32_psubw512_mask", + "avx512.mask.psubs.b.128" => "__builtin_ia32_psubsb128_mask", + "avx512.mask.psubs.b.256" => "__builtin_ia32_psubsb256_mask", + "avx512.mask.psubs.b.512" => "__builtin_ia32_psubsb512_mask", + "avx512.mask.psubs.w.128" => "__builtin_ia32_psubsw128_mask", + "avx512.mask.psubs.w.256" => "__builtin_ia32_psubsw256_mask", + "avx512.mask.psubs.w.512" => "__builtin_ia32_psubsw512_mask", + "avx512.mask.psubus.b.128" => "__builtin_ia32_psubusb128_mask", + "avx512.mask.psubus.b.256" => "__builtin_ia32_psubusb256_mask", + "avx512.mask.psubus.b.512" => "__builtin_ia32_psubusb512_mask", + "avx512.mask.psubus.w.128" => "__builtin_ia32_psubusw128_mask", + "avx512.mask.psubus.w.256" => "__builtin_ia32_psubusw256_mask", + "avx512.mask.psubus.w.512" => "__builtin_ia32_psubusw512_mask", + "avx512.mask.pternlog.d.128" => "__builtin_ia32_pternlogd128_mask", + "avx512.mask.pternlog.d.256" => "__builtin_ia32_pternlogd256_mask", + "avx512.mask.pternlog.d.512" => "__builtin_ia32_pternlogd512_mask", + "avx512.mask.pternlog.q.128" => "__builtin_ia32_pternlogq128_mask", + "avx512.mask.pternlog.q.256" => "__builtin_ia32_pternlogq256_mask", + "avx512.mask.pternlog.q.512" => "__builtin_ia32_pternlogq512_mask", + "avx512.mask.ptestm.d.512" => "__builtin_ia32_ptestmd512", + "avx512.mask.ptestm.q.512" => "__builtin_ia32_ptestmq512", + "avx512.mask.shuf.f32x4" => "__builtin_ia32_shuf_f32x4_mask", + "avx512.mask.shuf.f32x4.256" => "__builtin_ia32_shuf_f32x4_256_mask", + "avx512.mask.shuf.f64x2" => "__builtin_ia32_shuf_f64x2_mask", + "avx512.mask.shuf.f64x2.256" => "__builtin_ia32_shuf_f64x2_256_mask", + "avx512.mask.shuf.i32x4" => "__builtin_ia32_shuf_i32x4_mask", + "avx512.mask.shuf.i32x4.256" => "__builtin_ia32_shuf_i32x4_256_mask", + "avx512.mask.shuf.i64x2" => "__builtin_ia32_shuf_i64x2_mask", + "avx512.mask.shuf.i64x2.256" => "__builtin_ia32_shuf_i64x2_256_mask", + "avx512.mask.shuf.pd.128" => "__builtin_ia32_shufpd128_mask", + "avx512.mask.shuf.pd.256" => "__builtin_ia32_shufpd256_mask", + "avx512.mask.shuf.pd.512" => "__builtin_ia32_shufpd512_mask", + "avx512.mask.shuf.ps.128" => "__builtin_ia32_shufps128_mask", + "avx512.mask.shuf.ps.256" => "__builtin_ia32_shufps256_mask", + "avx512.mask.shuf.ps.512" => "__builtin_ia32_shufps512_mask", + "avx512.mask.sqrt.pd.128" => "__builtin_ia32_sqrtpd128_mask", + "avx512.mask.sqrt.pd.256" => "__builtin_ia32_sqrtpd256_mask", + "avx512.mask.sqrt.pd.512" => "__builtin_ia32_sqrtpd512_mask", + "avx512.mask.sqrt.ps.128" => "__builtin_ia32_sqrtps128_mask", + "avx512.mask.sqrt.ps.256" => "__builtin_ia32_sqrtps256_mask", + "avx512.mask.sqrt.ps.512" => "__builtin_ia32_sqrtps512_mask", + "avx512.mask.store.ss" => "__builtin_ia32_storess_mask", + "avx512.mask.storeu.d.512" => "__builtin_ia32_storedqusi512_mask", + "avx512.mask.storeu.pd.512" => "__builtin_ia32_storeupd512_mask", + "avx512.mask.storeu.ps.512" => "__builtin_ia32_storeups512_mask", + "avx512.mask.storeu.q.512" => "__builtin_ia32_storedqudi512_mask", + "avx512.mask.sub.pd.128" => "__builtin_ia32_subpd128_mask", + "avx512.mask.sub.pd.256" => "__builtin_ia32_subpd256_mask", + "avx512.mask.sub.pd.512" => "__builtin_ia32_subpd512_mask", + "avx512.mask.sub.ps.128" => "__builtin_ia32_subps128_mask", + "avx512.mask.sub.ps.256" => "__builtin_ia32_subps256_mask", + "avx512.mask.sub.ps.512" => "__builtin_ia32_subps512_mask", + "avx512.mask.valign.d.128" => "__builtin_ia32_alignd128_mask", + "avx512.mask.valign.d.256" => "__builtin_ia32_alignd256_mask", + "avx512.mask.valign.d.512" => "__builtin_ia32_alignd512_mask", + "avx512.mask.valign.q.128" => "__builtin_ia32_alignq128_mask", + "avx512.mask.valign.q.256" => "__builtin_ia32_alignq256_mask", + "avx512.mask.valign.q.512" => "__builtin_ia32_alignq512_mask", + "avx512.mask.vcvtph2ps.128" => "__builtin_ia32_vcvtph2ps_mask", + "avx512.mask.vcvtph2ps.256" => "__builtin_ia32_vcvtph2ps256_mask", + "avx512.mask.vcvtph2ps.512" => "__builtin_ia32_vcvtph2ps512_mask", + "avx512.mask.vextractf32x4.256" => "__builtin_ia32_extractf32x4_256_mask", + "avx512.mask.vextractf32x4.512" => "__builtin_ia32_extractf32x4_mask", + "avx512.mask.vextractf32x8.512" => "__builtin_ia32_extractf32x8_mask", + "avx512.mask.vextractf64x2.256" => "__builtin_ia32_extractf64x2_256_mask", + "avx512.mask.vextractf64x2.512" => "__builtin_ia32_extractf64x2_512_mask", + "avx512.mask.vextractf64x4.512" => "__builtin_ia32_extractf64x4_mask", + "avx512.mask.vextracti32x4.256" => "__builtin_ia32_extracti32x4_256_mask", + "avx512.mask.vextracti32x4.512" => "__builtin_ia32_extracti32x4_mask", + "avx512.mask.vextracti32x8.512" => "__builtin_ia32_extracti32x8_mask", + "avx512.mask.vextracti64x2.256" => "__builtin_ia32_extracti64x2_256_mask", + "avx512.mask.vextracti64x2.512" => "__builtin_ia32_extracti64x2_512_mask", + "avx512.mask.vextracti64x4.512" => "__builtin_ia32_extracti64x4_mask", + "avx512.mask.vfmadd.pd.128" => "__builtin_ia32_vfmaddpd128_mask", + "avx512.mask.vfmadd.pd.256" => "__builtin_ia32_vfmaddpd256_mask", + "avx512.mask.vfmadd.pd.512" => "__builtin_ia32_vfmaddpd512_mask", + "avx512.mask.vfmadd.ps.128" => "__builtin_ia32_vfmaddps128_mask", + "avx512.mask.vfmadd.ps.256" => "__builtin_ia32_vfmaddps256_mask", + "avx512.mask.vfmadd.ps.512" => "__builtin_ia32_vfmaddps512_mask", + "avx512.mask.vfmadd.sd" => "__builtin_ia32_vfmaddsd3_mask", + "avx512.mask.vfmadd.ss" => "__builtin_ia32_vfmaddss3_mask", + "avx512.mask.vfmaddsub.pd.128" => "__builtin_ia32_vfmaddsubpd128_mask", + "avx512.mask.vfmaddsub.pd.256" => "__builtin_ia32_vfmaddsubpd256_mask", + "avx512.mask.vfmaddsub.pd.512" => "__builtin_ia32_vfmaddsubpd512_mask", + "avx512.mask.vfmaddsub.ps.128" => "__builtin_ia32_vfmaddsubps128_mask", + "avx512.mask.vfmaddsub.ps.256" => "__builtin_ia32_vfmaddsubps256_mask", + "avx512.mask.vfmaddsub.ps.512" => "__builtin_ia32_vfmaddsubps512_mask", + "avx512.mask.vfnmadd.pd.128" => "__builtin_ia32_vfnmaddpd128_mask", + "avx512.mask.vfnmadd.pd.256" => "__builtin_ia32_vfnmaddpd256_mask", + "avx512.mask.vfnmadd.pd.512" => "__builtin_ia32_vfnmaddpd512_mask", + "avx512.mask.vfnmadd.ps.128" => "__builtin_ia32_vfnmaddps128_mask", + "avx512.mask.vfnmadd.ps.256" => "__builtin_ia32_vfnmaddps256_mask", + "avx512.mask.vfnmadd.ps.512" => "__builtin_ia32_vfnmaddps512_mask", + "avx512.mask.vfnmsub.pd.128" => "__builtin_ia32_vfnmsubpd128_mask", + "avx512.mask.vfnmsub.pd.256" => "__builtin_ia32_vfnmsubpd256_mask", + "avx512.mask.vfnmsub.pd.512" => "__builtin_ia32_vfnmsubpd512_mask", + "avx512.mask.vfnmsub.ps.128" => "__builtin_ia32_vfnmsubps128_mask", + "avx512.mask.vfnmsub.ps.256" => "__builtin_ia32_vfnmsubps256_mask", + "avx512.mask.vfnmsub.ps.512" => "__builtin_ia32_vfnmsubps512_mask", + "avx512.mask.vpermi2var.d.128" => "__builtin_ia32_vpermi2vard128_mask", + "avx512.mask.vpermi2var.d.256" => "__builtin_ia32_vpermi2vard256_mask", + "avx512.mask.vpermi2var.d.512" => "__builtin_ia32_vpermi2vard512_mask", + "avx512.mask.vpermi2var.hi.128" => "__builtin_ia32_vpermi2varhi128_mask", + "avx512.mask.vpermi2var.hi.256" => "__builtin_ia32_vpermi2varhi256_mask", + "avx512.mask.vpermi2var.hi.512" => "__builtin_ia32_vpermi2varhi512_mask", + "avx512.mask.vpermi2var.pd.128" => "__builtin_ia32_vpermi2varpd128_mask", + "avx512.mask.vpermi2var.pd.256" => "__builtin_ia32_vpermi2varpd256_mask", + "avx512.mask.vpermi2var.pd.512" => "__builtin_ia32_vpermi2varpd512_mask", + "avx512.mask.vpermi2var.ps.128" => "__builtin_ia32_vpermi2varps128_mask", + "avx512.mask.vpermi2var.ps.256" => "__builtin_ia32_vpermi2varps256_mask", + "avx512.mask.vpermi2var.ps.512" => "__builtin_ia32_vpermi2varps512_mask", + "avx512.mask.vpermi2var.q.128" => "__builtin_ia32_vpermi2varq128_mask", + "avx512.mask.vpermi2var.q.256" => "__builtin_ia32_vpermi2varq256_mask", + "avx512.mask.vpermi2var.q.512" => "__builtin_ia32_vpermi2varq512_mask", + "avx512.mask.vpermi2var.qi.128" => "__builtin_ia32_vpermi2varqi128_mask", + "avx512.mask.vpermi2var.qi.256" => "__builtin_ia32_vpermi2varqi256_mask", + "avx512.mask.vpermi2var.qi.512" => "__builtin_ia32_vpermi2varqi512_mask", + "avx512.mask.vpermilvar.pd.128" => "__builtin_ia32_vpermilvarpd_mask", + "avx512.mask.vpermilvar.pd.256" => "__builtin_ia32_vpermilvarpd256_mask", + "avx512.mask.vpermilvar.pd.512" => "__builtin_ia32_vpermilvarpd512_mask", + "avx512.mask.vpermilvar.ps.128" => "__builtin_ia32_vpermilvarps_mask", + "avx512.mask.vpermilvar.ps.256" => "__builtin_ia32_vpermilvarps256_mask", + "avx512.mask.vpermilvar.ps.512" => "__builtin_ia32_vpermilvarps512_mask", + "avx512.mask.vpermt.d.512" => "__builtin_ia32_vpermt2vard512_mask", + "avx512.mask.vpermt.pd.512" => "__builtin_ia32_vpermt2varpd512_mask", + "avx512.mask.vpermt.ps.512" => "__builtin_ia32_vpermt2varps512_mask", + "avx512.mask.vpermt.q.512" => "__builtin_ia32_vpermt2varq512_mask", + "avx512.mask.vpermt2var.d.128" => "__builtin_ia32_vpermt2vard128_mask", + "avx512.mask.vpermt2var.d.256" => "__builtin_ia32_vpermt2vard256_mask", + "avx512.mask.vpermt2var.d.512" => "__builtin_ia32_vpermt2vard512_mask", + "avx512.mask.vpermt2var.hi.128" => "__builtin_ia32_vpermt2varhi128_mask", + "avx512.mask.vpermt2var.hi.256" => "__builtin_ia32_vpermt2varhi256_mask", + "avx512.mask.vpermt2var.hi.512" => "__builtin_ia32_vpermt2varhi512_mask", + "avx512.mask.vpermt2var.pd.128" => "__builtin_ia32_vpermt2varpd128_mask", + "avx512.mask.vpermt2var.pd.256" => "__builtin_ia32_vpermt2varpd256_mask", + "avx512.mask.vpermt2var.pd.512" => "__builtin_ia32_vpermt2varpd512_mask", + "avx512.mask.vpermt2var.ps.128" => "__builtin_ia32_vpermt2varps128_mask", + "avx512.mask.vpermt2var.ps.256" => "__builtin_ia32_vpermt2varps256_mask", + "avx512.mask.vpermt2var.ps.512" => "__builtin_ia32_vpermt2varps512_mask", + "avx512.mask.vpermt2var.q.128" => "__builtin_ia32_vpermt2varq128_mask", + "avx512.mask.vpermt2var.q.256" => "__builtin_ia32_vpermt2varq256_mask", + "avx512.mask.vpermt2var.q.512" => "__builtin_ia32_vpermt2varq512_mask", + "avx512.mask.vpermt2var.qi.128" => "__builtin_ia32_vpermt2varqi128_mask", + "avx512.mask.vpermt2var.qi.256" => "__builtin_ia32_vpermt2varqi256_mask", + "avx512.mask.vpermt2var.qi.512" => "__builtin_ia32_vpermt2varqi512_mask", + "avx512.mask.vpmadd52h.uq.128" => "__builtin_ia32_vpmadd52huq128_mask", + "avx512.mask.vpmadd52h.uq.256" => "__builtin_ia32_vpmadd52huq256_mask", + "avx512.mask.vpmadd52h.uq.512" => "__builtin_ia32_vpmadd52huq512_mask", + "avx512.mask.vpmadd52l.uq.128" => "__builtin_ia32_vpmadd52luq128_mask", + "avx512.mask.vpmadd52l.uq.256" => "__builtin_ia32_vpmadd52luq256_mask", + "avx512.mask.vpmadd52l.uq.512" => "__builtin_ia32_vpmadd52luq512_mask", + "avx512.mask.xor.pd.128" => "__builtin_ia32_xorpd128_mask", + "avx512.mask.xor.pd.256" => "__builtin_ia32_xorpd256_mask", + "avx512.mask.xor.pd.512" => "__builtin_ia32_xorpd512_mask", + "avx512.mask.xor.ps.128" => "__builtin_ia32_xorps128_mask", + "avx512.mask.xor.ps.256" => "__builtin_ia32_xorps256_mask", + "avx512.mask.xor.ps.512" => "__builtin_ia32_xorps512_mask", + "avx512.mask3.vfmadd.pd.128" => "__builtin_ia32_vfmaddpd128_mask3", + "avx512.mask3.vfmadd.pd.256" => "__builtin_ia32_vfmaddpd256_mask3", + "avx512.mask3.vfmadd.pd.512" => "__builtin_ia32_vfmaddpd512_mask3", + "avx512.mask3.vfmadd.ps.128" => "__builtin_ia32_vfmaddps128_mask3", + "avx512.mask3.vfmadd.ps.256" => "__builtin_ia32_vfmaddps256_mask3", + "avx512.mask3.vfmadd.ps.512" => "__builtin_ia32_vfmaddps512_mask3", + "avx512.mask3.vfmadd.sd" => "__builtin_ia32_vfmaddsd3_mask3", + "avx512.mask3.vfmadd.ss" => "__builtin_ia32_vfmaddss3_mask3", + "avx512.mask3.vfmaddsub.pd.128" => "__builtin_ia32_vfmaddsubpd128_mask3", + "avx512.mask3.vfmaddsub.pd.256" => "__builtin_ia32_vfmaddsubpd256_mask3", + "avx512.mask3.vfmaddsub.pd.512" => "__builtin_ia32_vfmaddsubpd512_mask3", + "avx512.mask3.vfmaddsub.ps.128" => "__builtin_ia32_vfmaddsubps128_mask3", + "avx512.mask3.vfmaddsub.ps.256" => "__builtin_ia32_vfmaddsubps256_mask3", + "avx512.mask3.vfmaddsub.ps.512" => "__builtin_ia32_vfmaddsubps512_mask3", + "avx512.mask3.vfmsub.pd.128" => "__builtin_ia32_vfmsubpd128_mask3", + "avx512.mask3.vfmsub.pd.256" => "__builtin_ia32_vfmsubpd256_mask3", + "avx512.mask3.vfmsub.pd.512" => "__builtin_ia32_vfmsubpd512_mask3", + "avx512.mask3.vfmsub.ps.128" => "__builtin_ia32_vfmsubps128_mask3", + "avx512.mask3.vfmsub.ps.256" => "__builtin_ia32_vfmsubps256_mask3", + "avx512.mask3.vfmsub.ps.512" => "__builtin_ia32_vfmsubps512_mask3", + "avx512.mask3.vfmsubadd.pd.128" => "__builtin_ia32_vfmsubaddpd128_mask3", + "avx512.mask3.vfmsubadd.pd.256" => "__builtin_ia32_vfmsubaddpd256_mask3", + "avx512.mask3.vfmsubadd.pd.512" => "__builtin_ia32_vfmsubaddpd512_mask3", + "avx512.mask3.vfmsubadd.ps.128" => "__builtin_ia32_vfmsubaddps128_mask3", + "avx512.mask3.vfmsubadd.ps.256" => "__builtin_ia32_vfmsubaddps256_mask3", + "avx512.mask3.vfmsubadd.ps.512" => "__builtin_ia32_vfmsubaddps512_mask3", + "avx512.mask3.vfnmsub.pd.128" => "__builtin_ia32_vfnmsubpd128_mask3", + "avx512.mask3.vfnmsub.pd.256" => "__builtin_ia32_vfnmsubpd256_mask3", + "avx512.mask3.vfnmsub.pd.512" => "__builtin_ia32_vfnmsubpd512_mask3", + "avx512.mask3.vfnmsub.ps.128" => "__builtin_ia32_vfnmsubps128_mask3", + "avx512.mask3.vfnmsub.ps.256" => "__builtin_ia32_vfnmsubps256_mask3", + "avx512.mask3.vfnmsub.ps.512" => "__builtin_ia32_vfnmsubps512_mask3", + "avx512.maskz.pternlog.d.128" => "__builtin_ia32_pternlogd128_maskz", + "avx512.maskz.pternlog.d.256" => "__builtin_ia32_pternlogd256_maskz", + "avx512.maskz.pternlog.d.512" => "__builtin_ia32_pternlogd512_maskz", + "avx512.maskz.pternlog.q.128" => "__builtin_ia32_pternlogq128_maskz", + "avx512.maskz.pternlog.q.256" => "__builtin_ia32_pternlogq256_maskz", + "avx512.maskz.pternlog.q.512" => "__builtin_ia32_pternlogq512_maskz", + "avx512.maskz.vfmadd.pd.128" => "__builtin_ia32_vfmaddpd128_maskz", + "avx512.maskz.vfmadd.pd.256" => "__builtin_ia32_vfmaddpd256_maskz", + "avx512.maskz.vfmadd.pd.512" => "__builtin_ia32_vfmaddpd512_maskz", + "avx512.maskz.vfmadd.ps.128" => "__builtin_ia32_vfmaddps128_maskz", + "avx512.maskz.vfmadd.ps.256" => "__builtin_ia32_vfmaddps256_maskz", + "avx512.maskz.vfmadd.ps.512" => "__builtin_ia32_vfmaddps512_maskz", + "avx512.maskz.vfmadd.sd" => "__builtin_ia32_vfmaddsd3_maskz", + "avx512.maskz.vfmadd.ss" => "__builtin_ia32_vfmaddss3_maskz", + "avx512.maskz.vfmaddsub.pd.128" => "__builtin_ia32_vfmaddsubpd128_maskz", + "avx512.maskz.vfmaddsub.pd.256" => "__builtin_ia32_vfmaddsubpd256_maskz", + "avx512.maskz.vfmaddsub.pd.512" => "__builtin_ia32_vfmaddsubpd512_maskz", + "avx512.maskz.vfmaddsub.ps.128" => "__builtin_ia32_vfmaddsubps128_maskz", + "avx512.maskz.vfmaddsub.ps.256" => "__builtin_ia32_vfmaddsubps256_maskz", + "avx512.maskz.vfmaddsub.ps.512" => "__builtin_ia32_vfmaddsubps512_maskz", + "avx512.maskz.vpermt2var.d.128" => "__builtin_ia32_vpermt2vard128_maskz", + "avx512.maskz.vpermt2var.d.256" => "__builtin_ia32_vpermt2vard256_maskz", + "avx512.maskz.vpermt2var.d.512" => "__builtin_ia32_vpermt2vard512_maskz", + "avx512.maskz.vpermt2var.hi.128" => "__builtin_ia32_vpermt2varhi128_maskz", + "avx512.maskz.vpermt2var.hi.256" => "__builtin_ia32_vpermt2varhi256_maskz", + "avx512.maskz.vpermt2var.hi.512" => "__builtin_ia32_vpermt2varhi512_maskz", + "avx512.maskz.vpermt2var.pd.128" => "__builtin_ia32_vpermt2varpd128_maskz", + "avx512.maskz.vpermt2var.pd.256" => "__builtin_ia32_vpermt2varpd256_maskz", + "avx512.maskz.vpermt2var.pd.512" => "__builtin_ia32_vpermt2varpd512_maskz", + "avx512.maskz.vpermt2var.ps.128" => "__builtin_ia32_vpermt2varps128_maskz", + "avx512.maskz.vpermt2var.ps.256" => "__builtin_ia32_vpermt2varps256_maskz", + "avx512.maskz.vpermt2var.ps.512" => "__builtin_ia32_vpermt2varps512_maskz", + "avx512.maskz.vpermt2var.q.128" => "__builtin_ia32_vpermt2varq128_maskz", + "avx512.maskz.vpermt2var.q.256" => "__builtin_ia32_vpermt2varq256_maskz", + "avx512.maskz.vpermt2var.q.512" => "__builtin_ia32_vpermt2varq512_maskz", + "avx512.maskz.vpermt2var.qi.128" => "__builtin_ia32_vpermt2varqi128_maskz", + "avx512.maskz.vpermt2var.qi.256" => "__builtin_ia32_vpermt2varqi256_maskz", + "avx512.maskz.vpermt2var.qi.512" => "__builtin_ia32_vpermt2varqi512_maskz", + "avx512.maskz.vpmadd52h.uq.128" => "__builtin_ia32_vpmadd52huq128_maskz", + "avx512.maskz.vpmadd52h.uq.256" => "__builtin_ia32_vpmadd52huq256_maskz", + "avx512.maskz.vpmadd52h.uq.512" => "__builtin_ia32_vpmadd52huq512_maskz", + "avx512.maskz.vpmadd52l.uq.128" => "__builtin_ia32_vpmadd52luq128_maskz", + "avx512.maskz.vpmadd52l.uq.256" => "__builtin_ia32_vpmadd52luq256_maskz", + "avx512.maskz.vpmadd52l.uq.512" => "__builtin_ia32_vpmadd52luq512_maskz", + "avx512.movntdqa" => "__builtin_ia32_movntdqa512", + "avx512.pbroadcastd.512" => "__builtin_ia32_pbroadcastd512", + "avx512.pbroadcastq.512" => "__builtin_ia32_pbroadcastq512", + "avx512.pmovzxbd" => "__builtin_ia32_pmovzxbd512", + "avx512.pmovzxbq" => "__builtin_ia32_pmovzxbq512", + "avx512.pmovzxdq" => "__builtin_ia32_pmovzxdq512", + "avx512.pmovzxwd" => "__builtin_ia32_pmovzxwd512", + "avx512.pmovzxwq" => "__builtin_ia32_pmovzxwq512", + "avx512.psll.dq" => "__builtin_ia32_pslldqi512", + "avx512.psll.dq.bs" => "__builtin_ia32_pslldqi512_byteshift", + "avx512.psrl.dq" => "__builtin_ia32_psrldqi512", + "avx512.psrl.dq.bs" => "__builtin_ia32_psrldqi512_byteshift", + "avx512.ptestm.b.128" => "__builtin_ia32_ptestmb128", + "avx512.ptestm.b.256" => "__builtin_ia32_ptestmb256", + "avx512.ptestm.b.512" => "__builtin_ia32_ptestmb512", + "avx512.ptestm.d.128" => "__builtin_ia32_ptestmd128", + "avx512.ptestm.d.256" => "__builtin_ia32_ptestmd256", + "avx512.ptestm.d.512" => "__builtin_ia32_ptestmd512", + "avx512.ptestm.q.128" => "__builtin_ia32_ptestmq128", + "avx512.ptestm.q.256" => "__builtin_ia32_ptestmq256", + "avx512.ptestm.q.512" => "__builtin_ia32_ptestmq512", + "avx512.ptestm.w.128" => "__builtin_ia32_ptestmw128", + "avx512.ptestm.w.256" => "__builtin_ia32_ptestmw256", + "avx512.ptestm.w.512" => "__builtin_ia32_ptestmw512", + "avx512.ptestnm.b.128" => "__builtin_ia32_ptestnmb128", + "avx512.ptestnm.b.256" => "__builtin_ia32_ptestnmb256", + "avx512.ptestnm.b.512" => "__builtin_ia32_ptestnmb512", + "avx512.ptestnm.d.128" => "__builtin_ia32_ptestnmd128", + "avx512.ptestnm.d.256" => "__builtin_ia32_ptestnmd256", + "avx512.ptestnm.d.512" => "__builtin_ia32_ptestnmd512", + "avx512.ptestnm.q.128" => "__builtin_ia32_ptestnmq128", + "avx512.ptestnm.q.256" => "__builtin_ia32_ptestnmq256", + "avx512.ptestnm.q.512" => "__builtin_ia32_ptestnmq512", + "avx512.ptestnm.w.128" => "__builtin_ia32_ptestnmw128", + "avx512.ptestnm.w.256" => "__builtin_ia32_ptestnmw256", + "avx512.ptestnm.w.512" => "__builtin_ia32_ptestnmw512", + "avx512.rcp28.pd" => "__builtin_ia32_rcp28pd_mask", + "avx512.rcp28.ps" => "__builtin_ia32_rcp28ps_mask", + "avx512.rcp28.sd" => "__builtin_ia32_rcp28sd_mask", + "avx512.rcp28.ss" => "__builtin_ia32_rcp28ss_mask", + "avx512.rndscale.sd" => "__builtin_ia32_rndscalesd", + "avx512.rndscale.ss" => "__builtin_ia32_rndscaless", + "avx512.rsqrt28.pd" => "__builtin_ia32_rsqrt28pd_mask", + "avx512.rsqrt28.ps" => "__builtin_ia32_rsqrt28ps_mask", + "avx512.rsqrt28.sd" => "__builtin_ia32_rsqrt28sd_mask", + "avx512.rsqrt28.ss" => "__builtin_ia32_rsqrt28ss_mask", + "avx512.scatter.dpd.512" => "__builtin_ia32_scattersiv8df", + "avx512.scatter.dpi.512" => "__builtin_ia32_scattersiv16si", + "avx512.scatter.dpq.512" => "__builtin_ia32_scattersiv8di", + "avx512.scatter.dps.512" => "__builtin_ia32_scattersiv16sf", + "avx512.scatter.qpd.512" => "__builtin_ia32_scatterdiv8df", + "avx512.scatter.qpi.512" => "__builtin_ia32_scatterdiv16si", + "avx512.scatter.qpq.512" => "__builtin_ia32_scatterdiv8di", + "avx512.scatter.qps.512" => "__builtin_ia32_scatterdiv16sf", + "avx512.scatterdiv2.df" => "__builtin_ia32_scatterdiv2df", + "avx512.scatterdiv2.di" => "__builtin_ia32_scatterdiv2di", + "avx512.scatterdiv4.df" => "__builtin_ia32_scatterdiv4df", + "avx512.scatterdiv4.di" => "__builtin_ia32_scatterdiv4di", + "avx512.scatterdiv4.sf" => "__builtin_ia32_scatterdiv4sf", + "avx512.scatterdiv4.si" => "__builtin_ia32_scatterdiv4si", + "avx512.scatterdiv8.sf" => "__builtin_ia32_scatterdiv8sf", + "avx512.scatterdiv8.si" => "__builtin_ia32_scatterdiv8si", + "avx512.scatterpf.dpd.512" => "__builtin_ia32_scatterpfdpd", + "avx512.scatterpf.dps.512" => "__builtin_ia32_scatterpfdps", + "avx512.scatterpf.qpd.512" => "__builtin_ia32_scatterpfqpd", + "avx512.scatterpf.qps.512" => "__builtin_ia32_scatterpfqps", + "avx512.scattersiv2.df" => "__builtin_ia32_scattersiv2df", + "avx512.scattersiv2.di" => "__builtin_ia32_scattersiv2di", + "avx512.scattersiv4.df" => "__builtin_ia32_scattersiv4df", + "avx512.scattersiv4.di" => "__builtin_ia32_scattersiv4di", + "avx512.scattersiv4.sf" => "__builtin_ia32_scattersiv4sf", + "avx512.scattersiv4.si" => "__builtin_ia32_scattersiv4si", + "avx512.scattersiv8.sf" => "__builtin_ia32_scattersiv8sf", + "avx512.scattersiv8.si" => "__builtin_ia32_scattersiv8si", + "avx512.sqrt.pd.512" => "__builtin_ia32_sqrtpd512_mask", + "avx512.sqrt.ps.512" => "__builtin_ia32_sqrtps512_mask", + "avx512.sqrt.sd" => "__builtin_ia32_sqrtrndsd", + "avx512.sqrt.ss" => "__builtin_ia32_sqrtrndss", + "avx512.vbroadcast.sd.512" => "__builtin_ia32_vbroadcastsd512", + "avx512.vbroadcast.sd.pd.512" => "__builtin_ia32_vbroadcastsd_pd512", + "avx512.vbroadcast.ss.512" => "__builtin_ia32_vbroadcastss512", + "avx512.vbroadcast.ss.ps.512" => "__builtin_ia32_vbroadcastss_ps512", + "fma.mask.vfmadd.pd.512" => "__builtin_ia32_vfmaddpd512_mask", + "fma.mask.vfmadd.ps.512" => "__builtin_ia32_vfmaddps512_mask", + "fma.mask.vfmaddsub.pd.512" => "__builtin_ia32_vfmaddsubpd512_mask", + "fma.mask.vfmaddsub.ps.512" => "__builtin_ia32_vfmaddsubps512_mask", + "fma.mask.vfmsub.pd.512" => "__builtin_ia32_vfmsubpd512_mask", + "fma.mask.vfmsub.ps.512" => "__builtin_ia32_vfmsubps512_mask", + "fma.mask.vfmsubadd.pd.512" => "__builtin_ia32_vfmsubaddpd512_mask", + "fma.mask.vfmsubadd.ps.512" => "__builtin_ia32_vfmsubaddps512_mask", + "fma.mask.vfnmadd.pd.512" => "__builtin_ia32_vfnmaddpd512_mask", + "fma.mask.vfnmadd.ps.512" => "__builtin_ia32_vfnmaddps512_mask", + "fma.mask.vfnmsub.pd.512" => "__builtin_ia32_vfnmsubpd512_mask", + "fma.mask.vfnmsub.ps.512" => "__builtin_ia32_vfnmsubps512_mask", + "fma.vfmadd.pd" => "__builtin_ia32_vfmaddpd", + "fma.vfmadd.pd.256" => "__builtin_ia32_vfmaddpd256", + "fma.vfmadd.ps" => "__builtin_ia32_vfmaddps", + "fma.vfmadd.ps.256" => "__builtin_ia32_vfmaddps256", + "fma.vfmadd.sd" => "__builtin_ia32_vfmaddsd", + "fma.vfmadd.ss" => "__builtin_ia32_vfmaddss", + "fma.vfmsub.pd" => "__builtin_ia32_vfmsubpd", + "fma.vfmsub.pd.256" => "__builtin_ia32_vfmsubpd256", + "fma.vfmsub.ps" => "__builtin_ia32_vfmsubps", + "fma.vfmsub.ps.256" => "__builtin_ia32_vfmsubps256", + "fma.vfmsub.sd" => "__builtin_ia32_vfmsubsd", + "fma.vfmsub.ss" => "__builtin_ia32_vfmsubss", + "fma.vfmsubadd.pd" => "__builtin_ia32_vfmsubaddpd", + "fma.vfmsubadd.pd.256" => "__builtin_ia32_vfmsubaddpd256", + "fma.vfmsubadd.ps" => "__builtin_ia32_vfmsubaddps", + "fma.vfmsubadd.ps.256" => "__builtin_ia32_vfmsubaddps256", + "fma.vfnmadd.pd" => "__builtin_ia32_vfnmaddpd", + "fma.vfnmadd.pd.256" => "__builtin_ia32_vfnmaddpd256", + "fma.vfnmadd.ps" => "__builtin_ia32_vfnmaddps", + "fma.vfnmadd.ps.256" => "__builtin_ia32_vfnmaddps256", + "fma.vfnmadd.sd" => "__builtin_ia32_vfnmaddsd", + "fma.vfnmadd.ss" => "__builtin_ia32_vfnmaddss", + "fma.vfnmsub.pd" => "__builtin_ia32_vfnmsubpd", + "fma.vfnmsub.pd.256" => "__builtin_ia32_vfnmsubpd256", + "fma.vfnmsub.ps" => "__builtin_ia32_vfnmsubps", + "fma.vfnmsub.ps.256" => "__builtin_ia32_vfnmsubps256", + "fma.vfnmsub.sd" => "__builtin_ia32_vfnmsubsd", + "fma.vfnmsub.ss" => "__builtin_ia32_vfnmsubss", + "mmx.femms" => "__builtin_ia32_femms", + "rdtscp" => "__builtin_ia32_rdtscp", + "sse.add.ss" => "__builtin_ia32_addss", + "sse.cmp.ps" => "__builtin_ia32_cmpps", + "sse.cvtsi2ss" => "__builtin_ia32_cvtsi2ss", + "sse.cvtsi642ss" => "__builtin_ia32_cvtsi642ss", + "sse.div.ss" => "__builtin_ia32_divss", + "sse.mul.ss" => "__builtin_ia32_mulss", + "sse.sqrt.ps" => "__builtin_ia32_sqrtps", + "sse.sqrt.ss" => "__builtin_ia32_sqrtss", + "sse.storeu.ps" => "__builtin_ia32_storeups", + "sse.sub.ss" => "__builtin_ia32_subss", + "sse2.add.sd" => "__builtin_ia32_addsd", + "sse2.cmp.pd" => "__builtin_ia32_cmppd", + "sse2.cvtdq2pd" => "__builtin_ia32_cvtdq2pd", + "sse2.cvtdq2ps" => "__builtin_ia32_cvtdq2ps", + "sse2.cvtps2pd" => "__builtin_ia32_cvtps2pd", + "sse2.cvtsi2sd" => "__builtin_ia32_cvtsi2sd", + "sse2.cvtsi642sd" => "__builtin_ia32_cvtsi642sd", + "sse2.cvtss2sd" => "__builtin_ia32_cvtss2sd", + "sse2.div.sd" => "__builtin_ia32_divsd", + "sse2.mul.sd" => "__builtin_ia32_mulsd", + "sse2.padds.b" => "__builtin_ia32_paddsb128", + "sse2.padds.w" => "__builtin_ia32_paddsw128", + "sse2.paddus.b" => "__builtin_ia32_paddusb128", + "sse2.paddus.w" => "__builtin_ia32_paddusw128", + "sse2.pmaxs.w" => "__builtin_ia32_pmaxsw128", + "sse2.pmaxu.b" => "__builtin_ia32_pmaxub128", + "sse2.pmins.w" => "__builtin_ia32_pminsw128", + "sse2.pminu.b" => "__builtin_ia32_pminub128", + "sse2.pmulu.dq" => "__builtin_ia32_pmuludq128", + "sse2.pshuf.d" => "__builtin_ia32_pshufd", + "sse2.pshufh.w" => "__builtin_ia32_pshufhw", + "sse2.pshufl.w" => "__builtin_ia32_pshuflw", + "sse2.psll.dq" => "__builtin_ia32_pslldqi128", + "sse2.psll.dq.bs" => "__builtin_ia32_pslldqi128_byteshift", + "sse2.psrl.dq" => "__builtin_ia32_psrldqi128", + "sse2.psrl.dq.bs" => "__builtin_ia32_psrldqi128_byteshift", + "sse2.psubs.b" => "__builtin_ia32_psubsb128", + "sse2.psubs.w" => "__builtin_ia32_psubsw128", + "sse2.psubus.b" => "__builtin_ia32_psubusb128", + "sse2.psubus.w" => "__builtin_ia32_psubusw128", + "sse2.sqrt.pd" => "__builtin_ia32_sqrtpd", + "sse2.sqrt.sd" => "__builtin_ia32_sqrtsd", + "sse2.storel.dq" => "__builtin_ia32_storelv4si", + "sse2.storeu.dq" => "__builtin_ia32_storedqu", + "sse2.storeu.pd" => "__builtin_ia32_storeupd", + "sse2.sub.sd" => "__builtin_ia32_subsd", + "sse41.blendpd" => "__builtin_ia32_blendpd", + "sse41.blendps" => "__builtin_ia32_blendps", + "sse41.extractps" => "__builtin_ia32_extractps128", + "sse41.movntdqa" => "__builtin_ia32_movntdqa", + "sse41.pblendw" => "__builtin_ia32_pblendw128", + "sse41.pmaxsb" => "__builtin_ia32_pmaxsb128", + "sse41.pmaxsd" => "__builtin_ia32_pmaxsd128", + "sse41.pmaxud" => "__builtin_ia32_pmaxud128", + "sse41.pmaxuw" => "__builtin_ia32_pmaxuw128", + "sse41.pminsb" => "__builtin_ia32_pminsb128", + "sse41.pminsd" => "__builtin_ia32_pminsd128", + "sse41.pminud" => "__builtin_ia32_pminud128", + "sse41.pminuw" => "__builtin_ia32_pminuw128", + "sse41.pmovsxbd" => "__builtin_ia32_pmovsxbd128", + "sse41.pmovsxbq" => "__builtin_ia32_pmovsxbq128", + "sse41.pmovsxbw" => "__builtin_ia32_pmovsxbw128", + "sse41.pmovsxdq" => "__builtin_ia32_pmovsxdq128", + "sse41.pmovsxwd" => "__builtin_ia32_pmovsxwd128", + "sse41.pmovsxwq" => "__builtin_ia32_pmovsxwq128", + "sse41.pmovzxbd" => "__builtin_ia32_pmovzxbd128", + "sse41.pmovzxbq" => "__builtin_ia32_pmovzxbq128", + "sse41.pmovzxbw" => "__builtin_ia32_pmovzxbw128", + "sse41.pmovzxdq" => "__builtin_ia32_pmovzxdq128", + "sse41.pmovzxwd" => "__builtin_ia32_pmovzxwd128", + "sse41.pmovzxwq" => "__builtin_ia32_pmovzxwq128", + "sse41.pmuldq" => "__builtin_ia32_pmuldq128", + "sse4a.movnt.sd" => "__builtin_ia32_movntsd", + "sse4a.movnt.ss" => "__builtin_ia32_movntss", + "ssse3.pabs.b.128" => "__builtin_ia32_pabsb128", + "ssse3.pabs.d.128" => "__builtin_ia32_pabsd128", + "ssse3.pabs.w.128" => "__builtin_ia32_pabsw128", + "subborrow.u32" => "__builtin_ia32_subborrow_u32", + "subborrow.u64" => "__builtin_ia32_subborrow_u64", + "xop.vpcmov" => "__builtin_ia32_vpcmov", + "xop.vpcmov.256" => "__builtin_ia32_vpcmov_256", + "xop.vpcomb" => "__builtin_ia32_vpcomb", + "xop.vpcomd" => "__builtin_ia32_vpcomd", + "xop.vpcomq" => "__builtin_ia32_vpcomq", + "xop.vpcomub" => "__builtin_ia32_vpcomub", + "xop.vpcomud" => "__builtin_ia32_vpcomud", + "xop.vpcomuq" => "__builtin_ia32_vpcomuq", + "xop.vpcomuw" => "__builtin_ia32_vpcomuw", + "xop.vpcomw" => "__builtin_ia32_vpcomw", + "xop.vprotb" => "__builtin_ia32_vprotb", + "xop.vprotbi" => "__builtin_ia32_vprotbi", + "xop.vprotd" => "__builtin_ia32_vprotd", + "xop.vprotdi" => "__builtin_ia32_vprotdi", + "xop.vprotq" => "__builtin_ia32_vprotq", + "xop.vprotqi" => "__builtin_ia32_vprotqi", + "xop.vprotw" => "__builtin_ia32_vprotw", + "xop.vprotwi" => "__builtin_ia32_vprotwi", + _ => return ArchCheckResult::UnknownIntrinsic, + }, + _ => return ArchCheckResult::UnknownArch, + }) +} diff --git a/tools/generate_intrinsics.py b/tools/generate_intrinsics.py index 767082c23cce..56b425cdb0cd 100644 --- a/tools/generate_intrinsics.py +++ b/tools/generate_intrinsics.py @@ -147,14 +147,12 @@ def fill_intrinsics(intrinsics, from_intrinsics, all_intrinsics): all_intrinsics[entry[0]] = entry[1] -def update_intrinsics(llvm_path, llvmint, llvmint2): +def update_intrinsics(llvm_path): intrinsics_llvm = {} intrinsics_llvmint = {} all_intrinsics = {} extract_intrinsics_from_llvm(llvm_path, intrinsics_llvm) - extract_intrinsics_from_llvmint(llvmint, intrinsics_llvmint) - extract_intrinsics_from_llvmint(llvmint2, intrinsics_llvmint) intrinsics = {} # We give priority to translations from LLVM over the ones from llvmint. @@ -173,13 +171,17 @@ def update_intrinsics(llvm_path, llvmint, llvmint2): # Since all intrinsic names start with "llvm.", we skip that prefix. print("Updating content of `{}`...".format(output_file)) with open(output_file, "w", encoding="utf8") as out: - out.write("// File generated by `rustc_codegen_gcc/tools/generate_intrinsics.py`\n") - out.write("// DO NOT EDIT IT!\n") - out.write("/// Translate a given LLVM intrinsic name to an equivalent GCC one.\n") - out.write("fn map_arch_intrinsic(full_name:&str)->&'static str{\n") - out.write('let Some(name) = full_name.strip_prefix("llvm.") else { unimplemented!("***** unsupported LLVM intrinsic {}", full_name) };\n') - out.write('let Some((arch, name)) = name.split_once(\'.\') else { unimplemented!("***** unsupported LLVM intrinsic {}", name) };\n') - out.write("match arch {\n") + out.write("""// File generated by `rustc_codegen_gcc/tools/generate_intrinsics.py` +// DO NOT EDIT IT! +/// Translate a given LLVM intrinsic name to an equivalent GCC one. +fn map_arch_intrinsic(full_name:&str)-> &'static str { + let Some(name) = full_name.strip_prefix("llvm.") else { unimplemented!("***** unsupported LLVM intrinsic {}", full_name) }; + let Some((arch, name)) = name.split_once('.') else { unimplemented!("***** unsupported LLVM intrinsic llvm.{}", name) }; + let old_arch_res = old_archs(arch, name); + if let ArchCheckResult::Ok(res) = old_arch_res { + return res; + } +match arch {""") for arch in archs: if len(intrinsics[arch]) == 0: continue @@ -199,7 +201,13 @@ def update_intrinsics(llvm_path, llvmint, llvmint2): out.write(' "{}" => "{}",\n'.format(llvm_name, entry[1])) out.write(' _ => unimplemented!("***** unsupported LLVM intrinsic {full_name}"),\n') out.write("}} }} {}(name,full_name) }}\n,".format(arch)) - out.write(' _ => unimplemented!("***** unsupported LLVM architecture {arch}, intrinsic:{full_name}"),\n') + out.write(""" _ => { + match old_arch_res { + ArchCheckResult::UnknownIntrinsic => unimplemented!("***** unsupported LLVM intrinsic {full_name}"), + ArchCheckResult::UnknownArch => unimplemented!("***** unsupported LLVM architecture {arch}, intrinsic: {full_name}"), + ArchCheckResult::Ok(_) => unreachable!(), + } + }""") out.write("}\n}") subprocess.call(["rustfmt", output_file]) print("Done!") @@ -210,14 +218,6 @@ def main(): os.path.dirname(os.path.abspath(__file__)), "llvm-project", ) - llvmint_path = os.path.join( - os.path.dirname(os.path.abspath(__file__)), - "llvmint", - ) - llvmint2_path = os.path.join( - os.path.dirname(os.path.abspath(__file__)), - "llvmint-2", - ) # First, we clone the LLVM repository if it's not already here. clone_repository( @@ -227,17 +227,7 @@ def main(): branch="main", sub_paths=["llvm/include/llvm/IR", "llvm/include/llvm/CodeGen/"], ) - clone_repository( - "llvmint", - llvmint_path, - "https://github.com/GuillaumeGomez/llvmint", - ) - clone_repository( - "llvmint2", - llvmint2_path, - "https://github.com/antoyo/llvmint", - ) - update_intrinsics(llvm_path, llvmint_path, llvmint2_path) + update_intrinsics(llvm_path) if __name__ == "__main__": From 3dc60d0bf14638cbc2dcaf70e720c6f417608365 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 12 Jan 2026 16:48:14 +0100 Subject: [PATCH 017/265] Simplify intrinsics translation generation script --- tools/generate_intrinsics.py | 150 ++++++++--------------------------- 1 file changed, 33 insertions(+), 117 deletions(-) diff --git a/tools/generate_intrinsics.py b/tools/generate_intrinsics.py index 56b425cdb0cd..539032340777 100644 --- a/tools/generate_intrinsics.py +++ b/tools/generate_intrinsics.py @@ -12,7 +12,7 @@ def run_command(command, cwd=None): sys.exit(1) -def clone_repository(repo_name, path, repo_url, branch="master", sub_paths=None): +def clone_repository(repo_name, path, repo_url, sub_paths): if os.path.exists(path): while True: choice = input("There is already a `{}` folder, do you want to update it? [y/N]".format(path)) @@ -21,18 +21,15 @@ def clone_repository(repo_name, path, repo_url, branch="master", sub_paths=None) return elif choice.lower() == "y": print("Updating repository...") - run_command(["git", "pull", "origin", branch], cwd=path) + run_command(["git", "pull", "origin", "main"], cwd=path) return else: print("Didn't understand answer...") print("Cloning {} repository...".format(repo_name)) - if sub_paths is None: - run_command(["git", "clone", repo_url, "--depth", "1", path]) - else: - run_command(["git", "clone", repo_url, "--filter=tree:0", "--no-checkout", path]) - run_command(["git", "sparse-checkout", "init"], cwd=path) - run_command(["git", "sparse-checkout", "set", *sub_paths], cwd=path) - run_command(["git", "checkout"], cwd=path) + run_command(["git", "clone", repo_url, "--filter=tree:0", "--no-checkout", path]) + run_command(["git", "sparse-checkout", "init"], cwd=path) + run_command(["git", "sparse-checkout", "set", *sub_paths], cwd=path) + run_command(["git", "checkout"], cwd=path) def append_intrinsic(array, intrinsic_name, translation): @@ -45,119 +42,36 @@ def convert_to_string(content): return content -def extract_intrinsics_from_llvm(llvm_path, intrinsics): - command = ["llvm-tblgen", "llvm/IR/Intrinsics.td"] +def extract_intrinsics_from_llvm(llvm_path): + intrinsics = {} + command = ["llvm-tblgen", "llvm/IR/Intrinsics.td", "--dump-json"] cwd = os.path.join(llvm_path, "llvm/include") print("=> Running command `{}` from `{}`".format(command, cwd)) p = subprocess.Popen(command, cwd=cwd, stdout=subprocess.PIPE) output, err = p.communicate() - lines = convert_to_string(output).splitlines() - pos = 0 - while pos < len(lines): - line = lines[pos] - if not line.startswith("def "): - pos += 1 + content = json.loads(convert_to_string(output)) + for intrinsic in content: + data = content[intrinsic] + if not isinstance(data, dict): continue - intrinsic = line.split(" ")[1].strip() - content = line - while pos < len(lines): - line = lines[pos].split(" // ")[0].strip() - content += line - pos += 1 - if line == "}": - break - entries = re.findall('string ClangBuiltinName = "(\\w+)";', content) - current_arch = re.findall('string TargetPrefix = "(\\w+)";', content) - if len(entries) == 1 and len(current_arch) == 1: - current_arch = current_arch[0] - intrinsic = intrinsic.split("_") - if len(intrinsic) < 2 or intrinsic[0] != "int": - continue - intrinsic[0] = "llvm" - intrinsic = ".".join(intrinsic) - if current_arch not in intrinsics: - intrinsics[current_arch] = [] - append_intrinsic(intrinsics[current_arch], intrinsic, entries[0]) - - -def append_translation(json_data, p, array): - it = json_data["index"][p] - content = it["docs"].split('`') - if len(content) != 5: - return - append_intrinsic(array, content[1], content[3]) - - -def extract_intrinsics_from_llvmint(llvmint, intrinsics): - archs = [ - "AMDGPU", - "aarch64", - "arm", - "cuda", - "hexagon", - "mips", - "nvvm", - "ppc", - "ptx", - "x86", - "xcore", - ] - - json_file = os.path.join(llvmint, "target/doc/llvmint.json") - # We need to regenerate the documentation! - run_command( - ["cargo", "rustdoc", "--", "-Zunstable-options", "--output-format", "json"], - cwd=llvmint, - ) - with open(json_file, "r", encoding="utf8") as f: - json_data = json.loads(f.read()) - for p in json_data["paths"]: - it = json_data["paths"][p] - if it["crate_id"] != 0: - # This is from an external crate. + current_arch = data.get("TargetPrefix") + builtin_name = data.get("ClangBuiltinName") + if current_arch is None or current_arch == "" or builtin_name is None: continue - if it["kind"] != "function": - # We're only looking for functions. + intrinsic = intrinsic.split("_") + if len(intrinsic) < 2 or intrinsic[0] != "int": continue - # if len(it["path"]) == 2: - # # This is a "general" intrinsic, not bound to a specific arch. - # append_translation(json_data, p, general) - # continue - if len(it["path"]) != 3 or it["path"][1] not in archs: - continue - arch = it["path"][1] - if arch not in intrinsics: - intrinsics[arch] = [] - append_translation(json_data, p, intrinsics[arch]) + intrinsic[0] = "llvm" + intrinsic = ".".join(intrinsic) + if current_arch not in intrinsics: + intrinsics[current_arch] = [] + append_intrinsic(intrinsics[current_arch], intrinsic, builtin_name) - -def fill_intrinsics(intrinsics, from_intrinsics, all_intrinsics): - for arch in from_intrinsics: - if arch not in intrinsics: - intrinsics[arch] = [] - for entry in from_intrinsics[arch]: - if entry[0] in all_intrinsics: - if all_intrinsics[entry[0]] == entry[1]: - # This is a "full" duplicate, both the LLVM instruction and the GCC - # translation are the same. - continue - intrinsics[arch].append((entry[0], entry[1], True)) - else: - intrinsics[arch].append((entry[0], entry[1], False)) - all_intrinsics[entry[0]] = entry[1] + return intrinsics def update_intrinsics(llvm_path): - intrinsics_llvm = {} - intrinsics_llvmint = {} - all_intrinsics = {} - - extract_intrinsics_from_llvm(llvm_path, intrinsics_llvm) - - intrinsics = {} - # We give priority to translations from LLVM over the ones from llvmint. - fill_intrinsics(intrinsics, intrinsics_llvm, all_intrinsics) - fill_intrinsics(intrinsics, intrinsics_llvmint, all_intrinsics) + intrinsics = extract_intrinsics_from_llvm(llvm_path) archs = [arch for arch in intrinsics] archs.sort() @@ -187,15 +101,13 @@ match arch {""") continue attribute = "#[expect(non_snake_case)]" if arch[0].isupper() else "" out.write("\"{}\" => {{ {} fn {}(name: &str,full_name:&str) -> &'static str {{ match name {{".format(arch, attribute, arch)) - intrinsics[arch].sort(key=lambda x: (x[0], x[2])) + intrinsics[arch].sort(key=lambda x: (x[0], x[1])) out.write(' // {}\n'.format(arch)) for entry in intrinsics[arch]: llvm_name = entry[0].removeprefix("llvm."); llvm_name = llvm_name.removeprefix(arch); llvm_name = llvm_name.removeprefix("."); - if entry[2] is True: # if it is a duplicate - out.write(' // [DUPLICATE]: "{}" => "{}",\n'.format(llvm_name, entry[1])) - elif "_round_mask" in entry[1]: + if "_round_mask" in entry[1]: out.write(' // [INVALID CONVERSION]: "{}" => "{}",\n'.format(llvm_name, entry[1])) else: out.write(' "{}" => "{}",\n'.format(llvm_name, entry[1])) @@ -224,11 +136,15 @@ def main(): "llvm-project", llvm_path, "https://github.com/llvm/llvm-project", - branch="main", - sub_paths=["llvm/include/llvm/IR", "llvm/include/llvm/CodeGen/"], + ["llvm/include/llvm/IR", "llvm/include/llvm/CodeGen/"], ) update_intrinsics(llvm_path) +# llvm-tblgen can be built with: +# +# mkdir llvm-tblgen-build && cd llvm-tblgen-build +# cmake -G Ninja -DLLVM_ENABLE_PROJECTS="llvm" -DCMAKE_BUILD_TYPE=Release ../llvm +# ninja llvm-tblgen if __name__ == "__main__": sys.exit(main()) From c848b28a5d20b512e7edcd03da5ba616fabf0a8d Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 12 Jan 2026 17:05:01 +0100 Subject: [PATCH 018/265] Ignore `src/intrinsic/old_archs.rs` for typo checks --- .cspell.json | 1 + _typos.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.cspell.json b/.cspell.json index 388ccce2b091..556432d69a41 100644 --- a/.cspell.json +++ b/.cspell.json @@ -18,6 +18,7 @@ ], "ignorePaths": [ "src/intrinsic/archs.rs", + "src/intrinsic/old_archs.rs", "src/intrinsic/llvm.rs" ], "ignoreRegExpList": [ diff --git a/_typos.toml b/_typos.toml index 4a6a506a981a..c4918b114621 100644 --- a/_typos.toml +++ b/_typos.toml @@ -6,4 +6,4 @@ seh = "seh" typ = "typ" [files] -extend-exclude = ["src/intrinsic/archs.rs"] +extend-exclude = ["src/intrinsic/archs.rs", "src/intrinsic/old_archs.rs"] From 4f59819c26c72f86baa98a2805d411cd5b665759 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 16 Jan 2026 17:46:34 +0100 Subject: [PATCH 019/265] Regenerate intrinsics --- src/intrinsic/archs.rs | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/src/intrinsic/archs.rs b/src/intrinsic/archs.rs index 89a6cf7f3d6e..3c1698df6dec 100644 --- a/src/intrinsic/archs.rs +++ b/src/intrinsic/archs.rs @@ -24,6 +24,7 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "gcsss" => "__builtin_arm_gcsss", "isb" => "__builtin_arm_isb", "prefetch" => "__builtin_arm_prefetch", + "range.prefetch" => "__builtin_arm_range_prefetch", "sme.in.streaming.mode" => "__builtin_arm_in_streaming_mode", "sve.aesd" => "__builtin_sve_svaesd_u8", "sve.aese" => "__builtin_sve_svaese_u8", @@ -414,6 +415,7 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "s.wait.event.export.ready" => "__builtin_amdgcn_s_wait_event_export_ready", "s.wait.tensorcnt" => "__builtin_amdgcn_s_wait_tensorcnt", "s.waitcnt" => "__builtin_amdgcn_s_waitcnt", + "s.wakeup.barrier" => "__builtin_amdgcn_s_wakeup_barrier", "sad.hi.u8" => "__builtin_amdgcn_sad_hi_u8", "sad.u16" => "__builtin_amdgcn_sad_u16", "sad.u8" => "__builtin_amdgcn_sad_u8", @@ -4836,19 +4838,24 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "add.rm.d" => "__nvvm_add_rm_d", "add.rm.f" => "__nvvm_add_rm_f", "add.rm.ftz.f" => "__nvvm_add_rm_ftz_f", + "add.rm.ftz.sat.f" => "__nvvm_add_rm_ftz_sat_f", + "add.rm.sat.f" => "__nvvm_add_rm_sat_f", "add.rn.d" => "__nvvm_add_rn_d", "add.rn.f" => "__nvvm_add_rn_f", "add.rn.ftz.f" => "__nvvm_add_rn_ftz_f", + "add.rn.ftz.sat.f" => "__nvvm_add_rn_ftz_sat_f", + "add.rn.sat.f" => "__nvvm_add_rn_sat_f", "add.rp.d" => "__nvvm_add_rp_d", "add.rp.f" => "__nvvm_add_rp_f", "add.rp.ftz.f" => "__nvvm_add_rp_ftz_f", + "add.rp.ftz.sat.f" => "__nvvm_add_rp_ftz_sat_f", + "add.rp.sat.f" => "__nvvm_add_rp_sat_f", "add.rz.d" => "__nvvm_add_rz_d", "add.rz.f" => "__nvvm_add_rz_f", "add.rz.ftz.f" => "__nvvm_add_rz_ftz_f", + "add.rz.ftz.sat.f" => "__nvvm_add_rz_ftz_sat_f", + "add.rz.sat.f" => "__nvvm_add_rz_sat_f", "bar.warp.sync" => "__nvvm_bar_warp_sync", - "barrier0.and" => "__nvvm_bar0_and", - "barrier0.or" => "__nvvm_bar0_or", - "barrier0.popc" => "__nvvm_bar0_popc", "bf16x2.to.ue8m0x2.rp" => "__nvvm_bf16x2_to_ue8m0x2_rp", "bf16x2.to.ue8m0x2.rp.satfinite" => "__nvvm_bf16x2_to_ue8m0x2_rp_satfinite", "bf16x2.to.ue8m0x2.rz" => "__nvvm_bf16x2_to_ue8m0x2_rz", @@ -5050,6 +5057,8 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "fma.rm.d" => "__nvvm_fma_rm_d", "fma.rm.f" => "__nvvm_fma_rm_f", "fma.rm.ftz.f" => "__nvvm_fma_rm_ftz_f", + "fma.rm.ftz.sat.f" => "__nvvm_fma_rm_ftz_sat_f", + "fma.rm.sat.f" => "__nvvm_fma_rm_sat_f", "fma.rn.bf16" => "__nvvm_fma_rn_bf16", "fma.rn.bf16x2" => "__nvvm_fma_rn_bf16x2", "fma.rn.d" => "__nvvm_fma_rn_d", @@ -5061,16 +5070,22 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "fma.rn.ftz.relu.bf16x2" => "__nvvm_fma_rn_ftz_relu_bf16x2", "fma.rn.ftz.sat.bf16" => "__nvvm_fma_rn_ftz_sat_bf16", "fma.rn.ftz.sat.bf16x2" => "__nvvm_fma_rn_ftz_sat_bf16x2", + "fma.rn.ftz.sat.f" => "__nvvm_fma_rn_ftz_sat_f", "fma.rn.relu.bf16" => "__nvvm_fma_rn_relu_bf16", "fma.rn.relu.bf16x2" => "__nvvm_fma_rn_relu_bf16x2", "fma.rn.sat.bf16" => "__nvvm_fma_rn_sat_bf16", "fma.rn.sat.bf16x2" => "__nvvm_fma_rn_sat_bf16x2", + "fma.rn.sat.f" => "__nvvm_fma_rn_sat_f", "fma.rp.d" => "__nvvm_fma_rp_d", "fma.rp.f" => "__nvvm_fma_rp_f", "fma.rp.ftz.f" => "__nvvm_fma_rp_ftz_f", + "fma.rp.ftz.sat.f" => "__nvvm_fma_rp_ftz_sat_f", + "fma.rp.sat.f" => "__nvvm_fma_rp_sat_f", "fma.rz.d" => "__nvvm_fma_rz_d", "fma.rz.f" => "__nvvm_fma_rz_f", "fma.rz.ftz.f" => "__nvvm_fma_rz_ftz_f", + "fma.rz.ftz.sat.f" => "__nvvm_fma_rz_ftz_sat_f", + "fma.rz.sat.f" => "__nvvm_fma_rz_sat_f", "fmax.bf16" => "__nvvm_fmax_bf16", "fmax.bf16x2" => "__nvvm_fmax_bf16x2", "fmax.d" => "__nvvm_fmax_d", @@ -5274,6 +5289,7 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "read.ptx.sreg.pm1" => "__nvvm_read_ptx_sreg_pm1", "read.ptx.sreg.pm2" => "__nvvm_read_ptx_sreg_pm2", "read.ptx.sreg.pm3" => "__nvvm_read_ptx_sreg_pm3", + "read.ptx.sreg.pm4" => "__nvvm_read_ptx_sreg_pm4", "read.ptx.sreg.smid" => "__nvvm_read_ptx_sreg_smid", "read.ptx.sreg.tid.w" => "__nvvm_read_ptx_sreg_tid_w", "read.ptx.sreg.tid.x" => "__nvvm_read_ptx_sreg_tid_x", @@ -6370,6 +6386,7 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { fn spv(name: &str, full_name: &str) -> &'static str { match name { // spv + "group.memory.barrier.with.group.sync" => "__builtin_spirv_group_barrier", "num.subgroups" => "__builtin_spirv_num_subgroups", "subgroup.id" => "__builtin_spirv_subgroup_id", "subgroup.local.invocation.id" => { @@ -6377,6 +6394,7 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { } "subgroup.max.size" => "__builtin_spirv_subgroup_max_size", "subgroup.size" => "__builtin_spirv_subgroup_size", + "wave.ballot" => "__builtin_spirv_subgroup_ballot", _ => unimplemented!("***** unsupported LLVM intrinsic {full_name}"), } } @@ -7711,8 +7729,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "avx.ptestnzc.256" => "__builtin_ia32_ptestnzc256", "avx.ptestz.256" => "__builtin_ia32_ptestz256", "avx.rcp.ps.256" => "__builtin_ia32_rcpps256", - "avx.round.pd.256" => "__builtin_ia32_roundpd256", - "avx.round.ps.256" => "__builtin_ia32_roundps256", "avx.rsqrt.ps.256" => "__builtin_ia32_rsqrtps256", "avx.vpermilvar.pd" => "__builtin_ia32_vpermilvarpd", "avx.vpermilvar.pd.256" => "__builtin_ia32_vpermilvarpd256", @@ -8829,10 +8845,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "sse41.ptestc" => "__builtin_ia32_ptestc128", "sse41.ptestnzc" => "__builtin_ia32_ptestnzc128", "sse41.ptestz" => "__builtin_ia32_ptestz128", - "sse41.round.pd" => "__builtin_ia32_roundpd", - "sse41.round.ps" => "__builtin_ia32_roundps", - "sse41.round.sd" => "__builtin_ia32_roundsd", - "sse41.round.ss" => "__builtin_ia32_roundss", "sse42.crc32.32.16" => "__builtin_ia32_crc32hi", "sse42.crc32.32.32" => "__builtin_ia32_crc32si", "sse42.crc32.32.8" => "__builtin_ia32_crc32qi", @@ -8869,10 +8881,6 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "ssse3.psign.w.128" => "__builtin_ia32_psignw128", "sttilecfg" => "__builtin_ia32_tile_storeconfig", "stui" => "__builtin_ia32_stui", - "t2rpntlvwz0rs" => "__builtin_ia32_t2rpntlvwz0rs", - "t2rpntlvwz0rst1" => "__builtin_ia32_t2rpntlvwz0rst1", - "t2rpntlvwz1rs" => "__builtin_ia32_t2rpntlvwz1rs", - "t2rpntlvwz1rst1" => "__builtin_ia32_t2rpntlvwz1rst1", "tbm.bextri.u32" => "__builtin_ia32_bextri_u32", "tbm.bextri.u64" => "__builtin_ia32_bextri_u64", "tcmmimfp16ps" => "__builtin_ia32_tcmmimfp16ps", @@ -8881,14 +8889,19 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "tcmmrlfp16ps.internal" => "__builtin_ia32_tcmmrlfp16ps_internal", "tcvtrowd2ps" => "__builtin_ia32_tcvtrowd2ps", "tcvtrowd2ps.internal" => "__builtin_ia32_tcvtrowd2ps_internal", + "tcvtrowd2psi" => "__builtin_ia32_tcvtrowd2psi", "tcvtrowps2bf16h" => "__builtin_ia32_tcvtrowps2bf16h", "tcvtrowps2bf16h.internal" => "__builtin_ia32_tcvtrowps2bf16h_internal", + "tcvtrowps2bf16hi" => "__builtin_ia32_tcvtrowps2bf16hi", "tcvtrowps2bf16l" => "__builtin_ia32_tcvtrowps2bf16l", "tcvtrowps2bf16l.internal" => "__builtin_ia32_tcvtrowps2bf16l_internal", + "tcvtrowps2bf16li" => "__builtin_ia32_tcvtrowps2bf16li", "tcvtrowps2phh" => "__builtin_ia32_tcvtrowps2phh", "tcvtrowps2phh.internal" => "__builtin_ia32_tcvtrowps2phh_internal", + "tcvtrowps2phhi" => "__builtin_ia32_tcvtrowps2phhi", "tcvtrowps2phl" => "__builtin_ia32_tcvtrowps2phl", "tcvtrowps2phl.internal" => "__builtin_ia32_tcvtrowps2phl_internal", + "tcvtrowps2phli" => "__builtin_ia32_tcvtrowps2phli", "tdpbf16ps" => "__builtin_ia32_tdpbf16ps", "tdpbf16ps.internal" => "__builtin_ia32_tdpbf16ps_internal", "tdpbf8ps" => "__builtin_ia32_tdpbf8ps", @@ -8920,6 +8933,7 @@ fn map_arch_intrinsic(full_name: &str) -> &'static str { "tileloaddt164.internal" => "__builtin_ia32_tileloaddt164_internal", "tilemovrow" => "__builtin_ia32_tilemovrow", "tilemovrow.internal" => "__builtin_ia32_tilemovrow_internal", + "tilemovrowi" => "__builtin_ia32_tilemovrowi", "tilerelease" => "__builtin_ia32_tilerelease", "tilestored64" => "__builtin_ia32_tilestored64", "tilestored64.internal" => "__builtin_ia32_tilestored64_internal", From 2177aa9ac736b0c16c8ad73230508fcb273b980e Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 16 Jan 2026 18:09:37 +0100 Subject: [PATCH 020/265] Manually include intrinsic conversion that is not present in LLVM files --- src/intrinsic/old_archs.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/intrinsic/old_archs.rs b/src/intrinsic/old_archs.rs index 3a59707b2ebe..8d3e3487b5cb 100644 --- a/src/intrinsic/old_archs.rs +++ b/src/intrinsic/old_archs.rs @@ -242,6 +242,8 @@ pub(crate) fn old_archs(arch: &str, name: &str) -> ArchCheckResult { "avx.cvt.ps2.pd.256" => "__builtin_ia32_cvtps2pd256", "avx.cvtdq2.pd.256" => "__builtin_ia32_cvtdq2pd256", "avx.cvtdq2.ps.256" => "__builtin_ia32_cvtdq2ps256", + "avx.round.pd.256" => "__builtin_ia32_roundpd256", + "avx.round.ps.256" => "__builtin_ia32_roundps256", "avx.sqrt.pd.256" => "__builtin_ia32_sqrtpd256", "avx.sqrt.ps.256" => "__builtin_ia32_sqrtps256", "avx.storeu.dq.256" => "__builtin_ia32_storedqu256", @@ -1352,6 +1354,10 @@ pub(crate) fn old_archs(arch: &str, name: &str) -> ArchCheckResult { "sse41.pmovzxwd" => "__builtin_ia32_pmovzxwd128", "sse41.pmovzxwq" => "__builtin_ia32_pmovzxwq128", "sse41.pmuldq" => "__builtin_ia32_pmuldq128", + "sse41.round.pd" => "__builtin_ia32_roundpd", + "sse41.round.ps" => "__builtin_ia32_roundps", + "sse41.round.sd" => "__builtin_ia32_roundsd", + "sse41.round.ss" => "__builtin_ia32_roundss", "sse4a.movnt.sd" => "__builtin_ia32_movntsd", "sse4a.movnt.ss" => "__builtin_ia32_movntss", "ssse3.pabs.b.128" => "__builtin_ia32_pabsb128", From d6362e6d0fa95ec0d6d5bdcd2b81516bf9e3a4b6 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 17 Dec 2025 14:00:59 +0100 Subject: [PATCH 021/265] document guidelines for which shims have a place in Miri --- src/tools/miri/CONTRIBUTING.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/tools/miri/CONTRIBUTING.md b/src/tools/miri/CONTRIBUTING.md index 1995300c5bcb..f9cb60c66d91 100644 --- a/src/tools/miri/CONTRIBUTING.md +++ b/src/tools/miri/CONTRIBUTING.md @@ -66,6 +66,23 @@ process for such contributions: This process is largely informal, and its primary goal is to more clearly communicate expectations. Please get in touch with us if you have any questions! +## Scope of Miri shims + +Miri has "shims" to implement functionality that is usually implemented in C libraries which are +invoked from Rust code, such as opening files or spawning threads, as well as for +CPU-vendor-provided SIMD intrinsics. However, the set of C functions that Rust code invokes this way +is enormous, and for obvious reasons we have no intention of implementing every C API ever written +in Miri. + +At the moment, the general guideline for "could this function have a shim in Miri" is: we will +generally only add shims for functions that can be implemented in a portable way using just what is +provided by the Rust standard library. The function should also be reasonably widely-used in Rust +code to justify the review and maintenance effort (i.e. the easier the function is to implement, the +lower the barrier). Other than that, we might make exceptions for certain cases if (a) there is a +good case for why Miri should support those APIs, and (b) robust and widely-used portable libraries +exist in the Rust ecosystem. We will generally not add shims to Miri that would require Miri to +directly interact with platform-specific APIs (such as `libc` or `windows-sys`). + ## Preparing the build environment Miri heavily relies on internal and unstable rustc interfaces to execute MIR, From f11abba6415b5d7bd82c92196e8cfea61a192abe Mon Sep 17 00:00:00 2001 From: Folkert de Vries Date: Mon, 19 Jan 2026 00:42:38 +0100 Subject: [PATCH 022/265] add `simd_splat` intrinsic --- src/intrinsic/simd.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/intrinsic/simd.rs b/src/intrinsic/simd.rs index 39b4bb3ebefa..0606639d1731 100644 --- a/src/intrinsic/simd.rs +++ b/src/intrinsic/simd.rs @@ -121,6 +121,35 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>( return Ok(bx.vector_select(vector_mask, arg1, args[2].immediate())); } + if name == sym::simd_splat { + require_simd!(ret_ty, InvalidMonomorphization::SimdReturn { span, name, ty: ret_ty }); + let (out_len, out_ty) = ret_ty.simd_size_and_type(bx.tcx()); + + require!( + args[0].layout.ty == out_ty, + InvalidMonomorphization::ExpectedVectorElementType { + span, + name, + expected_element: out_ty, + vector_type: ret_ty, + } + ); + + let vec_ty = llret_ty.unqualified().dyncast_vector().expect("vector return type"); + let elem_ty = vec_ty.get_element_type(); + + // Cast pointer type to usize (GCC does not support pointer SIMD vectors). + let scalar = args[0].immediate(); + let scalar = if scalar.get_type().unqualified() != elem_ty.unqualified() { + bx.ptrtoint(scalar, elem_ty) + } else { + scalar + }; + + let elements = vec![scalar; out_len as usize]; + return Ok(bx.context.new_rvalue_from_vector(bx.location, llret_ty, &elements)); + } + // every intrinsic below takes a SIMD vector as its first argument require_simd!( args[0].layout.ty, From e0b87e4dd53c028e2db49fd8dc64e2f56d3548f8 Mon Sep 17 00:00:00 2001 From: Folkert de Vries Date: Mon, 19 Jan 2026 15:44:11 +0100 Subject: [PATCH 023/265] `simd_splat`: custom error in gcc backend for invalid element type --- src/intrinsic/simd.rs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/intrinsic/simd.rs b/src/intrinsic/simd.rs index 0606639d1731..eab067a02b7b 100644 --- a/src/intrinsic/simd.rs +++ b/src/intrinsic/simd.rs @@ -121,9 +121,9 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>( return Ok(bx.vector_select(vector_mask, arg1, args[2].immediate())); } + #[cfg(feature = "master")] if name == sym::simd_splat { - require_simd!(ret_ty, InvalidMonomorphization::SimdReturn { span, name, ty: ret_ty }); - let (out_len, out_ty) = ret_ty.simd_size_and_type(bx.tcx()); + let (out_len, out_ty) = require_simd2!(ret_ty, SimdReturn); require!( args[0].layout.ty == out_ty, @@ -139,11 +139,18 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>( let elem_ty = vec_ty.get_element_type(); // Cast pointer type to usize (GCC does not support pointer SIMD vectors). - let scalar = args[0].immediate(); - let scalar = if scalar.get_type().unqualified() != elem_ty.unqualified() { - bx.ptrtoint(scalar, elem_ty) + let value = args[0]; + let scalar = if value.layout.ty.is_numeric() { + value.immediate() + } else if value.layout.ty.is_raw_ptr() { + bx.ptrtoint(value.immediate(), elem_ty) } else { - scalar + return_error!(InvalidMonomorphization::UnsupportedOperation { + span, + name, + in_ty: ret_ty, + in_elem: value.layout.ty + }); }; let elements = vec![scalar; out_len as usize]; From 012c4603b720f9d0a402d6ca2620006abcce2acb Mon Sep 17 00:00:00 2001 From: Folkert de Vries Date: Sat, 27 Dec 2025 17:17:54 +0100 Subject: [PATCH 024/265] `c_variadic`: use `Clone` instead of LLVM `va_copy` --- src/intrinsic/mod.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/intrinsic/mod.rs b/src/intrinsic/mod.rs index 36ea76cbc51a..553e4d3d2fe0 100644 --- a/src/intrinsic/mod.rs +++ b/src/intrinsic/mod.rs @@ -391,9 +391,6 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tc sym::breakpoint => { unimplemented!(); } - sym::va_copy => { - unimplemented!(); - } sym::va_arg => { unimplemented!(); } From 0e6d6033b5893cb3d38f96915eb35a4e1b211e7f Mon Sep 17 00:00:00 2001 From: bit-aloo Date: Thu, 22 Jan 2026 19:04:36 +0530 Subject: [PATCH 025/265] migrate introduce_named_lifetime to SyntaxEditor --- .../src/handlers/introduce_named_lifetime.rs | 242 ++++++++++++------ 1 file changed, 157 insertions(+), 85 deletions(-) diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/introduce_named_lifetime.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/introduce_named_lifetime.rs index 264e3767a232..76d47b9276b1 100644 --- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/introduce_named_lifetime.rs +++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/introduce_named_lifetime.rs @@ -1,11 +1,11 @@ -use ide_db::FxHashSet; +use ide_db::{FileId, FxHashSet}; use syntax::{ - AstNode, TextRange, - ast::{self, HasGenericParams, edit_in_place::GenericParamsOwnerEdit, make}, - ted::{self, Position}, + AstNode, T, TextRange, + ast::{self, HasGenericParams, HasName, syntax_factory::SyntaxFactory}, + syntax_editor::{Element, Position, SyntaxEditor}, }; -use crate::{AssistContext, AssistId, Assists, assist_context::SourceChangeBuilder}; +use crate::{AssistContext, AssistId, Assists}; static ASSIST_NAME: &str = "introduce_named_lifetime"; static ASSIST_LABEL: &str = "Introduce named lifetime"; @@ -38,91 +38,23 @@ pub(crate) fn introduce_named_lifetime(acc: &mut Assists, ctx: &AssistContext<'_ // FIXME: should also add support for the case fun(f: &Foo) -> &$0Foo let lifetime = ctx.find_node_at_offset::().filter(|lifetime| lifetime.text() == "'_")?; + let file_id = ctx.vfs_file_id(); let lifetime_loc = lifetime.lifetime_ident_token()?.text_range(); if let Some(fn_def) = lifetime.syntax().ancestors().find_map(ast::Fn::cast) { - generate_fn_def_assist(acc, fn_def, lifetime_loc, lifetime) + generate_fn_def_assist(acc, fn_def, lifetime_loc, lifetime, file_id) } else if let Some(impl_def) = lifetime.syntax().ancestors().find_map(ast::Impl::cast) { - generate_impl_def_assist(acc, impl_def, lifetime_loc, lifetime) + generate_impl_def_assist(acc, impl_def, lifetime_loc, lifetime, file_id) } else { None } } -/// Generate the assist for the fn def case -fn generate_fn_def_assist( - acc: &mut Assists, - fn_def: ast::Fn, - lifetime_loc: TextRange, - lifetime: ast::Lifetime, -) -> Option<()> { - let param_list: ast::ParamList = fn_def.param_list()?; - let new_lifetime_param = generate_unique_lifetime_param_name(fn_def.generic_param_list())?; - let self_param = - // use the self if it's a reference and has no explicit lifetime - param_list.self_param().filter(|p| p.lifetime().is_none() && p.amp_token().is_some()); - // compute the location which implicitly has the same lifetime as the anonymous lifetime - let loc_needing_lifetime = if let Some(self_param) = self_param { - // if we have a self reference, use that - Some(NeedsLifetime::SelfParam(self_param)) - } else { - // otherwise, if there's a single reference parameter without a named lifetime, use that - let fn_params_without_lifetime: Vec<_> = param_list - .params() - .filter_map(|param| match param.ty() { - Some(ast::Type::RefType(ascribed_type)) if ascribed_type.lifetime().is_none() => { - Some(NeedsLifetime::RefType(ascribed_type)) - } - _ => None, - }) - .collect(); - match fn_params_without_lifetime.len() { - 1 => Some(fn_params_without_lifetime.into_iter().next()?), - 0 => None, - // multiple unnamed is invalid. assist is not applicable - _ => return None, - } - }; - acc.add(AssistId::refactor(ASSIST_NAME), ASSIST_LABEL, lifetime_loc, |builder| { - let fn_def = builder.make_mut(fn_def); - let lifetime = builder.make_mut(lifetime); - let loc_needing_lifetime = - loc_needing_lifetime.and_then(|it| it.make_mut(builder).to_position()); - - fn_def.get_or_create_generic_param_list().add_generic_param( - make::lifetime_param(new_lifetime_param.clone()).clone_for_update().into(), - ); - ted::replace(lifetime.syntax(), new_lifetime_param.clone_for_update().syntax()); - if let Some(position) = loc_needing_lifetime { - ted::insert(position, new_lifetime_param.clone_for_update().syntax()); - } - }) -} - -/// Generate the assist for the impl def case -fn generate_impl_def_assist( - acc: &mut Assists, - impl_def: ast::Impl, - lifetime_loc: TextRange, - lifetime: ast::Lifetime, -) -> Option<()> { - let new_lifetime_param = generate_unique_lifetime_param_name(impl_def.generic_param_list())?; - acc.add(AssistId::refactor(ASSIST_NAME), ASSIST_LABEL, lifetime_loc, |builder| { - let impl_def = builder.make_mut(impl_def); - let lifetime = builder.make_mut(lifetime); - - impl_def.get_or_create_generic_param_list().add_generic_param( - make::lifetime_param(new_lifetime_param.clone()).clone_for_update().into(), - ); - ted::replace(lifetime.syntax(), new_lifetime_param.clone_for_update().syntax()); - }) -} - /// Given a type parameter list, generate a unique lifetime parameter name /// which is not in the list fn generate_unique_lifetime_param_name( existing_type_param_list: Option, -) -> Option { +) -> Option { match existing_type_param_list { Some(type_params) => { let used_lifetime_params: FxHashSet<_> = @@ -131,7 +63,85 @@ fn generate_unique_lifetime_param_name( } None => Some("'a".to_owned()), } - .map(|it| make::lifetime(&it)) +} + +fn generate_fn_def_assist( + acc: &mut Assists, + fn_def: ast::Fn, + lifetime_loc: TextRange, + lifetime: ast::Lifetime, + file_id: FileId, +) -> Option<()> { + let param_list = fn_def.param_list()?; + let new_lifetime_name = generate_unique_lifetime_param_name(fn_def.generic_param_list())?; + let self_param = + param_list.self_param().filter(|p| p.lifetime().is_none() && p.amp_token().is_some()); + + let loc_needing_lifetime = if let Some(self_param) = self_param { + Some(NeedsLifetime::SelfParam(self_param)) + } else { + let unnamed_refs: Vec<_> = param_list + .params() + .filter_map(|param| match param.ty() { + Some(ast::Type::RefType(ref_type)) if ref_type.lifetime().is_none() => { + Some(NeedsLifetime::RefType(ref_type)) + } + _ => None, + }) + .collect(); + + match unnamed_refs.len() { + 1 => Some(unnamed_refs.into_iter().next()?), + 0 => None, + _ => return None, + } + }; + + acc.add(AssistId::refactor(ASSIST_NAME), ASSIST_LABEL, lifetime_loc, |edit| { + let root = fn_def.syntax().ancestors().last().unwrap().clone(); + let mut editor = SyntaxEditor::new(root); + let factory = SyntaxFactory::with_mappings(); + + if let Some(generic_list) = fn_def.generic_param_list() { + insert_lifetime_param(&mut editor, &factory, &generic_list, &new_lifetime_name); + } else { + insert_new_generic_param_list_fn(&mut editor, &factory, &fn_def, &new_lifetime_name); + } + + editor.replace(lifetime.syntax(), factory.lifetime(&new_lifetime_name).syntax()); + + if let Some(pos) = loc_needing_lifetime.and_then(|l| l.to_position()) { + editor.insert_all( + pos, + vec![ + factory.lifetime(&new_lifetime_name).syntax().clone().into(), + factory.whitespace(" ").into(), + ], + ); + } + + edit.add_file_edits(file_id, editor); + }) +} + +fn insert_new_generic_param_list_fn( + editor: &mut SyntaxEditor, + factory: &SyntaxFactory, + fn_def: &ast::Fn, + lifetime_name: &str, +) -> Option<()> { + let name = fn_def.name()?; + + editor.insert_all( + Position::after(name.syntax()), + vec![ + factory.token(T![<]).syntax_element(), + factory.lifetime(lifetime_name).syntax().syntax_element(), + factory.token(T![>]).syntax_element(), + ], + ); + + Some(()) } enum NeedsLifetime { @@ -140,13 +150,6 @@ enum NeedsLifetime { } impl NeedsLifetime { - fn make_mut(self, builder: &mut SourceChangeBuilder) -> Self { - match self { - Self::SelfParam(it) => Self::SelfParam(builder.make_mut(it)), - Self::RefType(it) => Self::RefType(builder.make_mut(it)), - } - } - fn to_position(self) -> Option { match self { Self::SelfParam(it) => Some(Position::after(it.amp_token()?)), @@ -155,6 +158,75 @@ impl NeedsLifetime { } } +fn generate_impl_def_assist( + acc: &mut Assists, + impl_def: ast::Impl, + lifetime_loc: TextRange, + lifetime: ast::Lifetime, + file_id: FileId, +) -> Option<()> { + let new_lifetime_name = generate_unique_lifetime_param_name(impl_def.generic_param_list())?; + + acc.add(AssistId::refactor(ASSIST_NAME), ASSIST_LABEL, lifetime_loc, |edit| { + let root = impl_def.syntax().ancestors().last().unwrap().clone(); + let mut editor = SyntaxEditor::new(root); + let factory = SyntaxFactory::without_mappings(); + + if let Some(generic_list) = impl_def.generic_param_list() { + insert_lifetime_param(&mut editor, &factory, &generic_list, &new_lifetime_name); + } else { + insert_new_generic_param_list_imp(&mut editor, &factory, &impl_def, &new_lifetime_name); + } + + editor.replace(lifetime.syntax(), factory.lifetime(&new_lifetime_name).syntax()); + + edit.add_file_edits(file_id, editor); + }) +} + +fn insert_new_generic_param_list_imp( + editor: &mut SyntaxEditor, + factory: &SyntaxFactory, + impl_: &ast::Impl, + lifetime_name: &str, +) -> Option<()> { + let impl_kw = impl_.impl_token()?; + + editor.insert_all( + Position::after(impl_kw), + vec![ + factory.token(T![<]).syntax_element(), + factory.lifetime(lifetime_name).syntax().syntax_element(), + factory.token(T![>]).syntax_element(), + ], + ); + + Some(()) +} + +fn insert_lifetime_param( + editor: &mut SyntaxEditor, + factory: &SyntaxFactory, + generic_list: &ast::GenericParamList, + lifetime_name: &str, +) -> Option<()> { + let r_angle = generic_list.r_angle_token()?; + let needs_comma = generic_list.generic_params().next().is_some(); + + let mut elements = Vec::new(); + + if needs_comma { + elements.push(factory.token(T![,]).syntax_element()); + elements.push(factory.whitespace(" ").syntax_element()); + } + + let lifetime = factory.lifetime(lifetime_name); + elements.push(lifetime.syntax().clone().into()); + + editor.insert_all(Position::before(r_angle), elements); + Some(()) +} + #[cfg(test)] mod tests { use super::*; From 0cb56dc92ca0f716a6e1512ce93ff5223bb191c9 Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Tue, 13 Jan 2026 16:52:02 +0200 Subject: [PATCH 026/265] abi: add a rust-preserve-none calling convention This is the conceptual opposite of the rust-cold calling convention and is particularly useful in combination with the new `explicit_tail_calls` feature. For relatively tight loops implemented with tail calling (`become`) each of the function with the regular calling convention is still responsible for restoring the initial value of the preserved registers. So it is not unusual to end up with a situation where each step in the tail call loop is spilling and reloading registers, along the lines of: foo: push r12 ; do things pop r12 jmp next_step This adds up quickly, especially when most of the clobberable registers are already used to pass arguments or other uses. I was thinking of making the name of this ABI a little less LLVM-derived and more like a conceptual inverse of `rust-cold`, but could not come with a great name (`rust-cold` is itself not a great name: cold in what context? from which perspective? is it supposed to mean that the function is rarely called?) --- src/abi.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/abi.rs b/src/abi.rs index cc2c9fca94df..56ed7c01ed20 100644 --- a/src/abi.rs +++ b/src/abi.rs @@ -243,6 +243,8 @@ impl<'gcc, 'tcx> FnAbiGccExt<'gcc, 'tcx> for FnAbi<'tcx, Ty<'tcx>> { pub fn conv_to_fn_attribute<'gcc>(conv: CanonAbi, arch: &Arch) -> Option> { let attribute = match conv { CanonAbi::C | CanonAbi::Rust => return None, + // gcc/gccjit does not have anything for this. + CanonAbi::RustPreserveNone => return None, CanonAbi::RustCold => FnAttribute::Cold, // Functions with this calling convention can only be called from assembly, but it is // possible to declare an `extern "custom"` block, so the backend still needs a calling From 58156c5cab242898ab0130b7a428b7e14bf3a066 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Sat, 24 Jan 2026 11:45:53 -0500 Subject: [PATCH 027/265] Fix segfault related to __builtin_unreachable with inline asm --- src/asm.rs | 4 +--- tests/run/unreachable-function.rs | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 tests/run/unreachable-function.rs diff --git a/src/asm.rs b/src/asm.rs index ceb3dd3ffedf..319f3d327873 100644 --- a/src/asm.rs +++ b/src/asm.rs @@ -575,9 +575,7 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> { } if dest.is_none() && options.contains(InlineAsmOptions::NORETURN) { let builtin_unreachable = self.context.get_builtin_function("__builtin_unreachable"); - let builtin_unreachable: RValue<'gcc> = - unsafe { std::mem::transmute(builtin_unreachable) }; - self.call(self.type_void(), None, None, builtin_unreachable, &[], None, None); + self.llbb().add_eval(None, self.context.new_call(None, builtin_unreachable, &[])); } // Write results to outputs. diff --git a/tests/run/unreachable-function.rs b/tests/run/unreachable-function.rs new file mode 100644 index 000000000000..0a975487dd78 --- /dev/null +++ b/tests/run/unreachable-function.rs @@ -0,0 +1,27 @@ +// Compiler: +// +// Run-time: +// status: 0 + +use std::arch::asm; + +fn exit_syscall(status: i32) -> ! { + #[cfg(target_arch = "x86_64")] + unsafe { + asm!( + "syscall", + in("rax") 60, + in("rdi") status, + options(noreturn) + ); + } + + #[cfg(not(target_arch = "x86_64"))] + std::process::exit(status); +} + +fn main() { + // Used to crash with rustc_codegen_gcc. + exit_syscall(0); + std::process::exit(1); +} From ed446599737fa64c2d0a16ceb49fc06fe4e46ec8 Mon Sep 17 00:00:00 2001 From: The Miri Cronjob Bot Date: Sun, 25 Jan 2026 05:05:35 +0000 Subject: [PATCH 028/265] Prepare for merging from rust-lang/rust This updates the rust-version file to 5a07626f4b8802d2baa260b76b2e1d0714674efe. --- src/tools/miri/rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/miri/rust-version b/src/tools/miri/rust-version index 90ba52120ee8..fa15ee59b241 100644 --- a/src/tools/miri/rust-version +++ b/src/tools/miri/rust-version @@ -1 +1 @@ -d10ac47c20152feb5e99b1c35a2e6830f77c66dc +5a07626f4b8802d2baa260b76b2e1d0714674efe From 81acbae770748d42f5d368cf156e21fd786fa7f5 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sun, 25 Jan 2026 21:02:34 +0100 Subject: [PATCH 029/265] Add missing intrinsic translation for `llvm.sqrt.f32` --- src/intrinsic/llvm.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/intrinsic/llvm.rs b/src/intrinsic/llvm.rs index 72fc72d118b7..10183c5ee526 100644 --- a/src/intrinsic/llvm.rs +++ b/src/intrinsic/llvm.rs @@ -1062,6 +1062,12 @@ pub fn intrinsic<'gcc, 'tcx>(name: &str, cx: &CodegenCx<'gcc, 'tcx>) -> Function "llvm.x86.xgetbv" => "__builtin_ia32_xgetbv", // NOTE: this doc specifies the equivalent GCC builtins: http://huonw.github.io/llvmint/llvmint/x86/index.html "llvm.sqrt.v2f64" => "__builtin_ia32_sqrtpd", + "llvm.sqrt.f32" => { + let gcc_name = "__builtin_sqrtf"; + let func = cx.context.get_builtin_function(gcc_name); + cx.functions.borrow_mut().insert(gcc_name.to_string(), func); + return func; + } "llvm.x86.avx512.pmul.dq.512" => "__builtin_ia32_pmuldq512_mask", "llvm.x86.avx512.pmulu.dq.512" => "__builtin_ia32_pmuludq512_mask", "llvm.x86.avx512.max.ps.512" => "__builtin_ia32_maxps512_mask", From d3df4bdba52b27d5bdace45b796177c891000f01 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sun, 25 Jan 2026 21:02:55 +0100 Subject: [PATCH 030/265] Add regression test for --- tests/run/call-llvm-intrinsics.rs | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tests/run/call-llvm-intrinsics.rs diff --git a/tests/run/call-llvm-intrinsics.rs b/tests/run/call-llvm-intrinsics.rs new file mode 100644 index 000000000000..86e041c3a2fb --- /dev/null +++ b/tests/run/call-llvm-intrinsics.rs @@ -0,0 +1,38 @@ +// Compiler: +// +// Run-time: +// status: 0 + +// FIXME: Remove this test once rustc's `./tests/codegen/riscv-abi/call-llvm-intrinsics.rs` +// stops ignoring GCC backend. + +#![feature(link_llvm_intrinsics)] +#![allow(internal_features)] + +struct A; + +impl Drop for A { + fn drop(&mut self) { + println!("A"); + } +} + +extern "C" { + #[link_name = "llvm.sqrt.f32"] + fn sqrt(x: f32) -> f32; +} + +pub fn do_call() { + let _a = A; + + unsafe { + // Ensure that we `call` LLVM intrinsics instead of trying to `invoke` them + // CHECK: store float 4.000000e+00, float* %{{.}}, align 4 + // CHECK: call float @llvm.sqrt.f32(float %{{.}} + sqrt(4.0); + } +} + +fn main() { + do_call(); +} From 20c31e0d00acf22635692fbd9d048925ae1bf635 Mon Sep 17 00:00:00 2001 From: The Miri Cronjob Bot Date: Mon, 26 Jan 2026 05:07:09 +0000 Subject: [PATCH 031/265] Prepare for merging from rust-lang/rust This updates the rust-version file to 873d4682c7d285540b8f28bfe637006cef8918a6. --- src/tools/miri/rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/miri/rust-version b/src/tools/miri/rust-version index fa15ee59b241..ccc0b55d4dc5 100644 --- a/src/tools/miri/rust-version +++ b/src/tools/miri/rust-version @@ -1 +1 @@ -5a07626f4b8802d2baa260b76b2e1d0714674efe +873d4682c7d285540b8f28bfe637006cef8918a6 From 25234f8652f59a796617c44688e8d4696611c314 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 26 Jan 2026 18:24:52 +0100 Subject: [PATCH 032/265] Add two new target-specific intrinsics mapping --- src/intrinsic/llvm.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/intrinsic/llvm.rs b/src/intrinsic/llvm.rs index 10183c5ee526..fbf3050a8a15 100644 --- a/src/intrinsic/llvm.rs +++ b/src/intrinsic/llvm.rs @@ -1061,13 +1061,18 @@ pub fn intrinsic<'gcc, 'tcx>(name: &str, cx: &CodegenCx<'gcc, 'tcx>) -> Function "llvm.x86.xgetbv" => "__builtin_ia32_xgetbv", // NOTE: this doc specifies the equivalent GCC builtins: http://huonw.github.io/llvmint/llvmint/x86/index.html + // FIXME: Should handle other targets than `ia32`. "llvm.sqrt.v2f64" => "__builtin_ia32_sqrtpd", + // FIXME: Should handle other targets than `ia32`. + "llvm.sqrt.v4f32" => "__builtin_ia32_sqrtps", "llvm.sqrt.f32" => { let gcc_name = "__builtin_sqrtf"; let func = cx.context.get_builtin_function(gcc_name); cx.functions.borrow_mut().insert(gcc_name.to_string(), func); return func; } + // FIXME: Should handle other targets than `ia32`. + "llvm.smax.v4i32" => "__builtin_ia32_pmaxsd128", "llvm.x86.avx512.pmul.dq.512" => "__builtin_ia32_pmuldq512_mask", "llvm.x86.avx512.pmulu.dq.512" => "__builtin_ia32_pmuludq512_mask", "llvm.x86.avx512.max.ps.512" => "__builtin_ia32_maxps512_mask", From 436ae1e0a0d48967677bb6bf567d3d7c4697f498 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 26 Jan 2026 18:25:25 +0100 Subject: [PATCH 033/265] Add regression test for `llvm.sqrt.v4f64` and `llvm.smax.v4i32` mapping --- tests/run/simd-ffi.rs | 102 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 tests/run/simd-ffi.rs diff --git a/tests/run/simd-ffi.rs b/tests/run/simd-ffi.rs new file mode 100644 index 000000000000..67cc2e5b96e3 --- /dev/null +++ b/tests/run/simd-ffi.rs @@ -0,0 +1,102 @@ +// Compiler: +// +// Run-time: +// status: 0 + +// FIXME: Remove this test once stops +// ignoring GCC backend. + +#![allow(internal_features, non_camel_case_types)] +// we can compile to a variety of platforms, because we don't need +// cross-compiled standard libraries. +#![feature(no_core, auto_traits)] +#![no_core] +#![feature(repr_simd, simd_ffi, link_llvm_intrinsics, lang_items, rustc_attrs)] + +#[derive(Copy)] +#[repr(simd)] +pub struct f32x4([f32; 4]); + +extern "C" { + #[link_name = "llvm.sqrt.v4f32"] + fn vsqrt(x: f32x4) -> f32x4; +} + +pub fn foo(x: f32x4) -> f32x4 { + unsafe { vsqrt(x) } +} + +#[derive(Copy)] +#[repr(simd)] +pub struct i32x4([i32; 4]); + +extern "C" { + // _mm_sll_epi32 + #[cfg(all(any(target_arch = "x86", target_arch = "x86-64"), target_feature = "sse2"))] + #[link_name = "llvm.x86.sse2.psll.d"] + fn integer(a: i32x4, b: i32x4) -> i32x4; + + // vmaxq_s32 + #[cfg(target_arch = "arm")] + #[link_name = "llvm.arm.neon.vmaxs.v4i32"] + fn integer(a: i32x4, b: i32x4) -> i32x4; + // vmaxq_s32 + #[cfg(target_arch = "aarch64")] + #[link_name = "llvm.aarch64.neon.maxs.v4i32"] + fn integer(a: i32x4, b: i32x4) -> i32x4; + + // Use a generic LLVM intrinsic to do type checking on other platforms + #[cfg(not(any( + all(any(target_arch = "x86", target_arch = "x86-64"), target_feature = "sse2"), + target_arch = "arm", + target_arch = "aarch64" + )))] + #[link_name = "llvm.smax.v4i32"] + fn integer(a: i32x4, b: i32x4) -> i32x4; +} + +pub fn bar(a: i32x4, b: i32x4) -> i32x4 { + unsafe { integer(a, b) } +} + +#[lang = "pointee_sized"] +pub trait PointeeSized {} + +#[lang = "meta_sized"] +pub trait MetaSized: PointeeSized {} + +#[lang = "sized"] +pub trait Sized: MetaSized {} + +#[lang = "copy"] +pub trait Copy {} + +impl Copy for f32 {} +impl Copy for i32 {} +impl Copy for [f32; 4] {} +impl Copy for [i32; 4] {} + +pub mod marker { + pub use Copy; +} + +#[lang = "freeze"] +auto trait Freeze {} + +#[macro_export] +#[rustc_builtin_macro] +macro_rules! Copy { + () => {}; +} +#[macro_export] +#[rustc_builtin_macro] +macro_rules! derive { + () => {}; +} + +#[lang = "start"] +fn start(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> isize { + 0 +} + +fn main() {} From b7728f072e3eae7c4cb0dfab62d575414c37d88f Mon Sep 17 00:00:00 2001 From: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Date: Mon, 26 Jan 2026 17:31:34 +0000 Subject: [PATCH 034/265] Omit standard copyright notice Remove copyright notices for files licensed under the standard terms (MIT OR Apache-2.0). --- example/alloc_system.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/example/alloc_system.rs b/example/alloc_system.rs index 4d70122496b7..31457185f1a8 100644 --- a/example/alloc_system.rs +++ b/example/alloc_system.rs @@ -1,6 +1,3 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// SPDX-FileCopyrightText: The Rust Project Developers (see https://thanks.rust-lang.org) - #![no_std] #![feature(allocator_api, rustc_private)] From db8f27619aa5b70e658c8b7906c8688f771ed59e Mon Sep 17 00:00:00 2001 From: The Miri Cronjob Bot Date: Wed, 28 Jan 2026 05:03:07 +0000 Subject: [PATCH 035/265] Prepare for merging from rust-lang/rust This updates the rust-version file to e96bb7e44fbcc23c1e6009e8d0ee8ab208668fb4. --- src/tools/miri/rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/miri/rust-version b/src/tools/miri/rust-version index ccc0b55d4dc5..cc1ff32815cd 100644 --- a/src/tools/miri/rust-version +++ b/src/tools/miri/rust-version @@ -1 +1 @@ -873d4682c7d285540b8f28bfe637006cef8918a6 +e96bb7e44fbcc23c1e6009e8d0ee8ab208668fb4 From 71294125eaafd54f3bf28ec643ac8f232e665e3f Mon Sep 17 00:00:00 2001 From: joboet Date: Wed, 28 Jan 2026 10:39:10 +0100 Subject: [PATCH 036/265] add a bug to the trophy shelf --- src/tools/miri/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/miri/README.md b/src/tools/miri/README.md index 925b85f58766..5153520bd43d 100644 --- a/src/tools/miri/README.md +++ b/src/tools/miri/README.md @@ -626,6 +626,7 @@ Definite bugs found: * [`ReentrantLock` not correctly dealing with reuse of addresses for TLS storage of different threads](https://github.com/rust-lang/rust/pull/141248) * [Rare Deadlock in the thread (un)parking example code](https://github.com/rust-lang/rust/issues/145816) * [`winit` registering a global constructor with the wrong ABI on Windows](https://github.com/rust-windowing/winit/issues/4435) +* [`VecDeque::splice` confusing physical and logical indices](https://github.com/rust-lang/rust/issues/151758) Violations of [Stacked Borrows] found that are likely bugs (but Stacked Borrows is currently just an experiment): From f67f5d910f5517a1ffa104136b56d43387c0653d Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 28 Jan 2026 11:23:55 +0100 Subject: [PATCH 037/265] bless android tests --- .../tests/fail-dep/libc/prctl-get-name-buffer-too-small.stderr | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tools/miri/tests/fail-dep/libc/prctl-get-name-buffer-too-small.stderr b/src/tools/miri/tests/fail-dep/libc/prctl-get-name-buffer-too-small.stderr index cc50564a43f5..09f1a3682da5 100644 --- a/src/tools/miri/tests/fail-dep/libc/prctl-get-name-buffer-too-small.stderr +++ b/src/tools/miri/tests/fail-dep/libc/prctl-get-name-buffer-too-small.stderr @@ -11,7 +11,6 @@ help: ALLOC was allocated here: | LL | let mut buf = vec![0u8; 15]; | ^^^^^^^^^^^^^ - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace From 4a6325de8ddea6e5a1ef148be919a12420257307 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Wed, 28 Jan 2026 14:07:36 -0500 Subject: [PATCH 038/265] Set gcc language name and compilation unit name --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- libgccjit.version | 2 +- src/context.rs | 7 +++++++ src/lib.rs | 2 ++ 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dea1207b05da..3b497f83cc0a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -56,18 +56,18 @@ dependencies = [ [[package]] name = "gccjit" -version = "3.1.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff80f4d6d0749eab3a69122210b3a1fdd52edb6162781aadd7c4842e26983683" +checksum = "ef03c8ae23826a0755b980999a553a262c61f2f585245e647192d95bf09eee79" dependencies = [ "gccjit_sys", ] [[package]] name = "gccjit_sys" -version = "1.1.2" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f81d901767ddba371a619fa9bba657066a4d3c5607ee69bbb557c1c5ba9bf85" +checksum = "0ff511da413e4a5da6f09607748395ba37525e01ba7d322cbec3efc43095dd60" dependencies = [ "libc", ] diff --git a/Cargo.toml b/Cargo.toml index 18847f50d46a..97735e49e84b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ default = ["master"] [dependencies] object = { version = "0.37.0", default-features = false, features = ["std", "read"] } tempfile = "3.20" -gccjit = { version = "3.1.1", features = ["dlopen"] } +gccjit = { version = "3.2.0", features = ["dlopen"] } #gccjit = { git = "https://github.com/rust-lang/gccjit.rs", branch = "error-dlopen", features = ["dlopen"] } # Local copy. diff --git a/libgccjit.version b/libgccjit.version index bab62f642365..e49b36557350 100644 --- a/libgccjit.version +++ b/libgccjit.version @@ -1 +1 @@ -0081ca6631abdfa02bf42bc85aaf507b8a0e6beb +586d798e864fb33b1b4e842c5493a653841a7c02 diff --git a/src/context.rs b/src/context.rs index dbb89a4ff7db..6143d27725e8 100644 --- a/src/context.rs +++ b/src/context.rs @@ -19,6 +19,8 @@ use rustc_middle::ty::layout::{ }; use rustc_middle::ty::{self, ExistentialTraitRef, Instance, Ty, TyCtxt}; use rustc_session::Session; +#[cfg(feature = "master")] +use rustc_session::config::DebugInfo; use rustc_span::source_map::respan; use rustc_span::{DUMMY_SP, Span}; use rustc_target::spec::{HasTargetSpec, HasX86AbiOpt, Target, TlsModel, X86Abi}; @@ -143,6 +145,11 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> { supports_f64_type: bool, supports_f128_type: bool, ) -> Self { + #[cfg(feature = "master")] + if tcx.sess.opts.debuginfo != DebugInfo::None { + context.set_filename(codegen_unit.name().as_str()); + } + let create_type = |ctype, rust_type| { let layout = tcx .layout_of(ty::TypingEnv::fully_monomorphized().as_query_input(rust_type)) diff --git a/src/lib.rs b/src/lib.rs index 96d3a0024f41..a8265cc86fa1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -240,6 +240,8 @@ impl CodegenBackend for GccCodegenBackend { #[cfg(feature = "master")] { + gccjit::set_lang_name(c"GNU Rust"); + let target_cpu = target_cpu(sess); // Get the second TargetInfo with the correct CPU features by setting the arch. From 49c9b0a7bf0dba213361fa181a2770c76652a0cf Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Wed, 28 Jan 2026 17:01:51 -0500 Subject: [PATCH 039/265] Update to nightly-2026-01-28 --- rust-toolchain | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain b/rust-toolchain index 86ae738d4483..2168c8e72cfb 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2025-12-20" +channel = "nightly-2026-01-28" components = ["rust-src", "rustc-dev", "llvm-tools-preview"] From bd71a5f4b0e38ea80ed3f0a0df33440b93d88312 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Wed, 28 Jan 2026 17:02:09 -0500 Subject: [PATCH 040/265] Implement new f16/f128 intrinsics and implement dummy va_end --- src/intrinsic/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/intrinsic/mod.rs b/src/intrinsic/mod.rs index 7b8d8602bcae..9a08003a7fb2 100644 --- a/src/intrinsic/mod.rs +++ b/src/intrinsic/mod.rs @@ -167,6 +167,7 @@ fn get_simple_function_f128<'gcc, 'tcx>( let f128_type = cx.type_f128(); let func_name = match name { sym::ceilf128 => "ceilf128", + sym::fabsf128 => "fabsf128", sym::floorf128 => "floorf128", sym::truncf128 => "truncf128", sym::roundf128 => "roundf128", @@ -221,6 +222,7 @@ fn f16_builtin<'gcc, 'tcx>( let builtin_name = match name { sym::ceilf16 => "__builtin_ceilf", sym::copysignf16 => "__builtin_copysignf", + sym::fabsf16 => "fabsf", sym::floorf16 => "__builtin_floorf", sym::fmaf16 => "fmaf", sym::maxnumf16 => "__builtin_fmaxf", @@ -287,6 +289,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tc } sym::ceilf16 | sym::copysignf16 + | sym::fabsf16 | sym::floorf16 | sym::fmaf16 | sym::maxnumf16 @@ -687,7 +690,8 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tc } fn va_end(&mut self, _va_list: RValue<'gcc>) -> RValue<'gcc> { - unimplemented!(); + // TODO(antoyo): implement. + self.context.new_rvalue_from_int(self.int_type, 0) } } From ce7c03d96de4eb0ff4ef4f7227f79ac52bd84112 Mon Sep 17 00:00:00 2001 From: The Miri Cronjob Bot Date: Fri, 30 Jan 2026 05:13:08 +0000 Subject: [PATCH 041/265] Prepare for merging from rust-lang/rust This updates the rust-version file to 35a31ba763976907cd38ba88743a3aefbaf8ffff. --- src/tools/miri/rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/miri/rust-version b/src/tools/miri/rust-version index cc1ff32815cd..3e8514346218 100644 --- a/src/tools/miri/rust-version +++ b/src/tools/miri/rust-version @@ -1 +1 @@ -e96bb7e44fbcc23c1e6009e8d0ee8ab208668fb4 +35a31ba763976907cd38ba88743a3aefbaf8ffff From ee9967bac019659ce17292fa5162da9b638464ed Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Wed, 28 Jan 2026 17:11:05 -0500 Subject: [PATCH 042/265] Fix clippy warning --- build_system/src/test.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_system/src/test.rs b/build_system/src/test.rs index ca2a2a7dc2de..096f8c98376c 100644 --- a/build_system/src/test.rs +++ b/build_system/src/test.rs @@ -679,10 +679,10 @@ fn test_projects(env: &Env, args: &TestArg) -> Result<(), String> { create_dir(projects_path)?; let nb_parts = args.nb_parts.unwrap_or(0); - if nb_parts > 0 { + if let Some(count) = projects.len().checked_div(nb_parts) { // We increment the number of tests by one because if this is an odd number, we would skip // one test. - let count = projects.len() / nb_parts + 1; + let count = count + 1; let current_part = args.current_part.unwrap(); let start = current_part * count; // We remove the projects we don't want to test. From ff4db77564dbf7c94cdda67dba687c244b888d1e Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Wed, 28 Jan 2026 17:14:27 -0500 Subject: [PATCH 043/265] Fix spelling mistake --- src/intrinsic/mod.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/intrinsic/mod.rs b/src/intrinsic/mod.rs index 9a08003a7fb2..7140456c3754 100644 --- a/src/intrinsic/mod.rs +++ b/src/intrinsic/mod.rs @@ -618,15 +618,15 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tc let fn_ptr = func.get_address(None); let fn_ty = fn_ptr.get_type(); - let mut llargs = vec![]; + let mut call_args = vec![]; for arg in args { match arg.val { OperandValue::ZeroSized => {} - OperandValue::Immediate(_) => llargs.push(arg.immediate()), + OperandValue::Immediate(_) => call_args.push(arg.immediate()), OperandValue::Pair(a, b) => { - llargs.push(a); - llargs.push(b); + call_args.push(a); + call_args.push(b); } OperandValue::Ref(op_place_val) => { let mut llval = op_place_val.llval; @@ -643,13 +643,13 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tc // We store bools as `i8` so we need to truncate to `i1`. llval = self.to_immediate_scalar(llval, scalar); } - llargs.push(llval); + call_args.push(llval); } } } // FIXME directly use the llvm intrinsic adjustment functions here - let llret = self.call(fn_ty, None, None, fn_ptr, &llargs, None, None); + let llret = self.call(fn_ty, None, None, fn_ptr, &call_args, None, None); if is_cleanup { self.apply_attrs_to_cleanup_callsite(llret); } From d299dce03a37d01b4e25b9033de7ab2e9112a7b4 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Wed, 28 Jan 2026 17:27:55 -0500 Subject: [PATCH 044/265] Fix the name of failing UI tests --- tests/failing-ui-tests.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/failing-ui-tests.txt b/tests/failing-ui-tests.txt index 99a80fa7e4f4..73d29426adf8 100644 --- a/tests/failing-ui-tests.txt +++ b/tests/failing-ui-tests.txt @@ -89,11 +89,11 @@ tests/ui/thir-print/offset_of.rs tests/ui/iterators/rangefrom-overflow-debug.rs tests/ui/iterators/rangefrom-overflow-overflow-checks.rs tests/ui/iterators/iter-filter-count-debug-check.rs -tests/ui/eii/codegen_single_crate.rs -tests/ui/eii/codegen_cross_crate.rs +tests/ui/eii/linking/codegen_single_crate.rs +tests/ui/eii/linking/codegen_cross_crate.rs tests/ui/eii/default/local_crate.rs -tests/ui/eii/multiple_impls.rs +tests/ui/eii/duplicate/multiple_impls.rs tests/ui/eii/default/call_default.rs -tests/ui/eii/same-symbol.rs +tests/ui/eii/linking/same-symbol.rs tests/ui/eii/privacy1.rs tests/ui/eii/default/call_impl.rs From dffd4ab825020322303b5e9e287519957b4d2594 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Thu, 29 Jan 2026 17:09:53 -0500 Subject: [PATCH 045/265] Ignore failing UI test --- tests/failing-ui-tests.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/failing-ui-tests.txt b/tests/failing-ui-tests.txt index 73d29426adf8..75ca1845f45e 100644 --- a/tests/failing-ui-tests.txt +++ b/tests/failing-ui-tests.txt @@ -97,3 +97,4 @@ tests/ui/eii/default/call_default.rs tests/ui/eii/linking/same-symbol.rs tests/ui/eii/privacy1.rs tests/ui/eii/default/call_impl.rs +tests/ui/c-variadic/copy.rs From e8282659f9683bb063396a32dbdc489736ee79e4 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Fri, 30 Jan 2026 08:32:03 -0500 Subject: [PATCH 046/265] Update to nightly-2026-01-30 --- rust-toolchain | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain b/rust-toolchain index 2168c8e72cfb..c2179bc3ff98 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2026-01-28" +channel = "nightly-2026-01-30" components = ["rust-src", "rustc-dev", "llvm-tools-preview"] From fb32a3f52e1a6d54921bcd9d4976bf22421227a4 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Fri, 30 Jan 2026 08:32:24 -0500 Subject: [PATCH 047/265] Update GCC version --- libgccjit.version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgccjit.version b/libgccjit.version index e49b36557350..25e1105ab07f 100644 --- a/libgccjit.version +++ b/libgccjit.version @@ -1 +1 @@ -586d798e864fb33b1b4e842c5493a653841a7c02 +896045775f7c40fafe48c6e398f6c53bf6af889e From a04934421ffa8ac4b6541772b5fef7c2778d3809 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Fri, 30 Jan 2026 11:16:26 -0500 Subject: [PATCH 048/265] Switch to new_array_type_u64 --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- src/builder.rs | 2 +- src/common.rs | 6 +++--- src/context.rs | 4 ++-- src/intrinsic/llvm.rs | 12 ++++++------ src/type_.rs | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3b497f83cc0a..a283ea4cb0b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -56,18 +56,18 @@ dependencies = [ [[package]] name = "gccjit" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef03c8ae23826a0755b980999a553a262c61f2f585245e647192d95bf09eee79" +checksum = "26b73d18b642ce16378af78f89664841d7eeafa113682ff5d14573424eb0232a" dependencies = [ "gccjit_sys", ] [[package]] name = "gccjit_sys" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ff511da413e4a5da6f09607748395ba37525e01ba7d322cbec3efc43095dd60" +checksum = "ee689456c013616942d5aef9a84d613cefcc3b335340d036f3650fc1a7459e15" dependencies = [ "libc", ] diff --git a/Cargo.toml b/Cargo.toml index 97735e49e84b..29af6a1fc434 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ default = ["master"] [dependencies] object = { version = "0.37.0", default-features = false, features = ["std", "read"] } tempfile = "3.20" -gccjit = { version = "3.2.0", features = ["dlopen"] } +gccjit = { version = "3.3.0", features = ["dlopen"] } #gccjit = { git = "https://github.com/rust-lang/gccjit.rs", branch = "error-dlopen", features = ["dlopen"] } # Local copy. diff --git a/src/builder.rs b/src/builder.rs index 3def9a5c015c..ea75b4294e04 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -1503,7 +1503,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> { let element_type = vector_type.get_element_type(); let vec_num_units = vector_type.get_num_units(); let array_type = - self.context.new_array_type(self.location, element_type, vec_num_units as u64); + self.context.new_array_type_u64(self.location, element_type, vec_num_units as u64); let array = self.context.new_bitcast(self.location, vec, array_type).to_rvalue(); self.context.new_array_access(self.location, array, idx).to_rvalue() } diff --git a/src/common.rs b/src/common.rs index 7c2969e58718..e71e1216dbd9 100644 --- a/src/common.rs +++ b/src/common.rs @@ -55,7 +55,7 @@ pub fn bytes_in_context<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, bytes: &[u8]) -> 0 => { let context = &cx.context; let byte_type = context.new_type::(); - let typ = context.new_array_type(None, byte_type, bytes.len() as u64 / 8); + let typ = context.new_array_type_u64(None, byte_type, bytes.len() as u64 / 8); let elements: Vec<_> = bytes .chunks_exact(8) .map(|arr| { @@ -76,7 +76,7 @@ pub fn bytes_in_context<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, bytes: &[u8]) -> 4 => { let context = &cx.context; let byte_type = context.new_type::(); - let typ = context.new_array_type(None, byte_type, bytes.len() as u64 / 4); + let typ = context.new_array_type_u64(None, byte_type, bytes.len() as u64 / 4); let elements: Vec<_> = bytes .chunks_exact(4) .map(|arr| { @@ -95,7 +95,7 @@ pub fn bytes_in_context<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, bytes: &[u8]) -> _ => { let context = cx.context; let byte_type = context.new_type::(); - let typ = context.new_array_type(None, byte_type, bytes.len() as u64); + let typ = context.new_array_type_u64(None, byte_type, bytes.len() as u64); let elements: Vec<_> = bytes .iter() .map(|&byte| context.new_rvalue_from_int(byte_type, byte as i32)) diff --git a/src/context.rs b/src/context.rs index 988743d0aef5..d4d4c490e75e 100644 --- a/src/context.rs +++ b/src/context.rs @@ -201,8 +201,8 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> { // TODO(antoyo): re-enable the alignment when libgccjit fixed the issue in // gcc_jit_context_new_array_constructor (it should not use reinterpret_cast). - let i128_type = context.new_array_type(None, i64_type, 2)/*.get_aligned(i128_align)*/; - let u128_type = context.new_array_type(None, u64_type, 2)/*.get_aligned(u128_align)*/; + let i128_type = context.new_array_type_u64(None, i64_type, 2)/*.get_aligned(i128_align)*/; + let u128_type = context.new_array_type_u64(None, u64_type, 2)/*.get_aligned(u128_align)*/; (i128_type, u128_type) }; diff --git a/src/intrinsic/llvm.rs b/src/intrinsic/llvm.rs index fbf3050a8a15..5c8bc5a4791c 100644 --- a/src/intrinsic/llvm.rs +++ b/src/intrinsic/llvm.rs @@ -585,7 +585,7 @@ pub fn adjust_intrinsic_arguments<'a, 'b, 'gcc, 'tcx>( "__builtin_ia32_encodekey128_u32" => { let mut new_args = args.to_vec(); let m128i = builder.context.new_vector_type(builder.i64_type, 2); - let array_type = builder.context.new_array_type(None, m128i, 6); + let array_type = builder.context.new_array_type_u64(None, m128i, 6); let result = builder.current_func().new_local(None, array_type, "result"); new_args.push(result.get_address(None)); args = new_args.into(); @@ -593,7 +593,7 @@ pub fn adjust_intrinsic_arguments<'a, 'b, 'gcc, 'tcx>( "__builtin_ia32_encodekey256_u32" => { let mut new_args = args.to_vec(); let m128i = builder.context.new_vector_type(builder.i64_type, 2); - let array_type = builder.context.new_array_type(None, m128i, 7); + let array_type = builder.context.new_array_type_u64(None, m128i, 7); let result = builder.current_func().new_local(None, array_type, "result"); new_args.push(result.get_address(None)); args = new_args.into(); @@ -620,7 +620,7 @@ pub fn adjust_intrinsic_arguments<'a, 'b, 'gcc, 'tcx>( let first_value = old_args.swap_remove(0); let element_type = first_value.get_type(); - let array_type = builder.context.new_array_type(None, element_type, 8); + let array_type = builder.context.new_array_type_u64(None, element_type, 8); let result = builder.current_func().new_local(None, array_type, "result"); new_args.push(result.get_address(None)); @@ -869,7 +869,7 @@ pub fn adjust_intrinsic_return_value<'a, 'gcc, 'tcx>( builder.llbb().add_assignment(None, field1, return_value); let field2 = result.access_field(None, field2); let field2_type = field2.to_rvalue().get_type(); - let array_type = builder.context.new_array_type(None, field2_type, 6); + let array_type = builder.context.new_array_type_u64(None, field2_type, 6); let ptr = builder.context.new_cast(None, args[2], array_type.make_pointer()); let field2_ptr = builder.context.new_cast(None, field2.get_address(None), array_type.make_pointer()); @@ -891,7 +891,7 @@ pub fn adjust_intrinsic_return_value<'a, 'gcc, 'tcx>( builder.llbb().add_assignment(None, field1, return_value); let field2 = result.access_field(None, field2); let field2_type = field2.to_rvalue().get_type(); - let array_type = builder.context.new_array_type(None, field2_type, 7); + let array_type = builder.context.new_array_type_u64(None, field2_type, 7); let ptr = builder.context.new_cast(None, args[3], array_type.make_pointer()); let field2_ptr = builder.context.new_cast(None, field2.get_address(None), array_type.make_pointer()); @@ -937,7 +937,7 @@ pub fn adjust_intrinsic_return_value<'a, 'gcc, 'tcx>( builder.llbb().add_assignment(None, field1, return_value); let field2 = result.access_field(None, field2); let field2_type = field2.to_rvalue().get_type(); - let array_type = builder.context.new_array_type(None, field2_type, 8); + let array_type = builder.context.new_array_type_u64(None, field2_type, 8); let ptr = builder.context.new_cast(None, args[0], array_type.make_pointer()); let field2_ptr = builder.context.new_cast(None, field2.get_address(None), array_type.make_pointer()); diff --git a/src/type_.rs b/src/type_.rs index d356b6af260a..7a6a5d3a10ea 100644 --- a/src/type_.rs +++ b/src/type_.rs @@ -311,7 +311,7 @@ impl<'gcc, 'tcx> BaseTypeCodegenMethods for CodegenCx<'gcc, 'tcx> { len = 0; } - self.context.new_array_type(None, ty, len) + self.context.new_array_type_u64(None, ty, len) } } From e4b746486c91de2a50eafadb9be71512aa149e73 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Fri, 30 Jan 2026 11:32:29 -0500 Subject: [PATCH 049/265] Ignore test when 128-bit integers are disabled --- .github/workflows/ci.yml | 4 ++++ tests/failing-ui-tests-without-128bit-integers.txt | 1 + 2 files changed, 5 insertions(+) create mode 100644 tests/failing-ui-tests-without-128bit-integers.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c8e7d628169..840c09409bba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -113,6 +113,10 @@ jobs: git config --global user.name "User" ./y.sh prepare + - name: Add more failing tests for GCC without 128-bit integers support + if: ${{ matrix.libgccjit_version.gcc == 'gcc-15-without-int128.deb' }} + run: cat tests/failing-ui-tests-without-128bit-integers.txt >> tests/failing-ui-tests.txt + - name: Run tests run: | ./y.sh test --release --clean --build-sysroot ${{ matrix.commands }} diff --git a/tests/failing-ui-tests-without-128bit-integers.txt b/tests/failing-ui-tests-without-128bit-integers.txt new file mode 100644 index 000000000000..1dc3859b335e --- /dev/null +++ b/tests/failing-ui-tests-without-128bit-integers.txt @@ -0,0 +1 @@ +tests/ui/simd/intrinsic/splat.rs From 455172fd0e3446127152506fc8cb8969e3b18a7f Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 31 Jan 2026 11:06:30 +0100 Subject: [PATCH 050/265] trophy case: oneshot data race --- src/tools/miri/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/miri/README.md b/src/tools/miri/README.md index 5153520bd43d..f254eb357a45 100644 --- a/src/tools/miri/README.md +++ b/src/tools/miri/README.md @@ -627,6 +627,7 @@ Definite bugs found: * [Rare Deadlock in the thread (un)parking example code](https://github.com/rust-lang/rust/issues/145816) * [`winit` registering a global constructor with the wrong ABI on Windows](https://github.com/rust-windowing/winit/issues/4435) * [`VecDeque::splice` confusing physical and logical indices](https://github.com/rust-lang/rust/issues/151758) +* [Data race in `oneshot` channel](https://github.com/faern/oneshot/issues/69) Violations of [Stacked Borrows] found that are likely bugs (but Stacked Borrows is currently just an experiment): From 1af122276e123b4f0ac747ddfe478ef667f9de05 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 1 Feb 2026 12:44:13 +0100 Subject: [PATCH 051/265] Prepare for merging from rust-lang/rust This updates the rust-version file to 878374e07f3bf038c96e94e5bc917471878e4bf6. --- src/tools/miri/rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/miri/rust-version b/src/tools/miri/rust-version index 3e8514346218..d7d94190c98b 100644 --- a/src/tools/miri/rust-version +++ b/src/tools/miri/rust-version @@ -1 +1 @@ -35a31ba763976907cd38ba88743a3aefbaf8ffff +878374e07f3bf038c96e94e5bc917471878e4bf6 From 070102bb1bc628f1b380db80f3e92c382259fb94 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 1 Feb 2026 12:56:35 +0100 Subject: [PATCH 052/265] fix building sysroot for JSON targets --- src/tools/miri/cargo-miri/src/setup.rs | 2 ++ src/tools/miri/ci/ci.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tools/miri/cargo-miri/src/setup.rs b/src/tools/miri/cargo-miri/src/setup.rs index c7682093663e..47c99f939254 100644 --- a/src/tools/miri/cargo-miri/src/setup.rs +++ b/src/tools/miri/cargo-miri/src/setup.rs @@ -88,6 +88,8 @@ pub fn setup( }; let cargo_cmd = { let mut command = cargo(); + // Allow JSON targets since users do not have a good way to set this flag otherwise. + command.arg("-Zjson-target-spec"); // Use Miri as rustc to build a libstd compatible with us (and use the right flags). // We set ourselves (`cargo-miri`) instead of Miri directly to be able to patch the flags // for `libpanic_abort` (usually this is done by bootstrap but we have to do it ourselves). diff --git a/src/tools/miri/ci/ci.sh b/src/tools/miri/ci/ci.sh index c8e359cf2385..0d3e70a163be 100755 --- a/src/tools/miri/ci/ci.sh +++ b/src/tools/miri/ci/ci.sh @@ -129,7 +129,7 @@ function run_tests_minimal { time ./miri test $TARGET_FLAG "$@" # Ensure that a small smoke test of cargo-miri works. - time cargo miri run --manifest-path test-cargo-miri/no-std-smoke/Cargo.toml $TARGET_FLAG + time cargo miri run --manifest-path test-cargo-miri/no-std-smoke/Cargo.toml -Zjson-target-spec $TARGET_FLAG endgroup } From c89a88ed1bb18ce0df23782c6484be3ab83cdf91 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 2 Feb 2026 19:31:40 +0100 Subject: [PATCH 053/265] do not run miri for the dependency build and reset MIRIFLAGS as well just to be safe --- src/tools/miri/cargo-miri/src/phases.rs | 3 +++ src/tools/miri/tests/deps/src/main.rs | 4 +++- src/tools/miri/tests/ui.rs | 13 +++++++++---- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/tools/miri/cargo-miri/src/phases.rs b/src/tools/miri/cargo-miri/src/phases.rs index 0f04397b72d2..0babccb40d33 100644 --- a/src/tools/miri/cargo-miri/src/phases.rs +++ b/src/tools/miri/cargo-miri/src/phases.rs @@ -63,6 +63,9 @@ pub fn phase_cargo_miri(mut args: impl Iterator) { "setup" => MiriCommand::Setup, "test" | "t" | "run" | "r" | "nextest" => MiriCommand::Forward(subcommand), "clean" => MiriCommand::Clean, + // For use by the `./miri test` dependency builder. + "build" if env::var_os("MIRI_BUILD_TEST_DEPS").is_some() => + MiriCommand::Forward("build".into()), _ => { // Check for version and help flags. if has_arg_flag("--help") || has_arg_flag("-h") { diff --git a/src/tools/miri/tests/deps/src/main.rs b/src/tools/miri/tests/deps/src/main.rs index f328e4d9d04c..363c9744fa48 100644 --- a/src/tools/miri/tests/deps/src/main.rs +++ b/src/tools/miri/tests/deps/src/main.rs @@ -1 +1,3 @@ -fn main() {} +fn main() { + unreachable!() +} diff --git a/src/tools/miri/tests/ui.rs b/src/tools/miri/tests/ui.rs index 70739eef2883..ebc127798787 100644 --- a/src/tools/miri/tests/ui.rs +++ b/src/tools/miri/tests/ui.rs @@ -132,14 +132,19 @@ fn miri_config( // (It's a separate crate, so we don't get an env var from cargo.) program: miri_path() .with_file_name(format!("cargo-miri{}", env::consts::EXE_SUFFIX)), - // There is no `cargo miri build` so we just use `cargo miri run`. // Add `-Zbinary-dep-depinfo` since it is needed for bootstrap builds (and doesn't harm otherwise). - args: ["miri", "run", "--quiet", "-Zbinary-dep-depinfo"] + args: ["miri", "build", "-Zbinary-dep-depinfo"] .into_iter() .map(Into::into) .collect(), - // Reset `RUSTFLAGS` to work around . - envs: vec![("RUSTFLAGS".into(), None)], + envs: vec![ + // Reset `RUSTFLAGS` to work around . + ("RUSTFLAGS".into(), None), + // Reset `MIRIFLAGS` because it caused trouble in the past and should not be needed. + ("MIRIFLAGS".into(), None), + // Allow `cargo miri build`. + ("MIRI_BUILD_TEST_DEPS".into(), Some("1".into())), + ], ..CommandBuilder::cargo() }, crate_manifest_path: Path::new("tests/deps").join("Cargo.toml"), From 1044241d38ad9b21e90cf1f6d5ca5c4fce2777eb Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 2 Feb 2026 20:50:09 +0100 Subject: [PATCH 054/265] do not forward run flags to dependency build --- src/tools/miri/tests/ui.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/tools/miri/tests/ui.rs b/src/tools/miri/tests/ui.rs index ebc127798787..047cdeb357c2 100644 --- a/src/tools/miri/tests/ui.rs +++ b/src/tools/miri/tests/ui.rs @@ -366,15 +366,16 @@ fn run_dep_mode(target: String, args: impl Iterator) -> Result< miri_config(&target, "", Mode::RunDep, Some(WithDependencies { bless: false })); config.comment_defaults.base().custom.remove("edition"); // `./miri` adds an `--edition` in `args`, so don't set it twice config.fill_host_and_target()?; + let dep_builder = BuildManager::one_off(config.clone()); + // Only set these for the actual run, not the dep builder, so invalid flags do not fail + // the dependency build. config.program.args = args.collect(); + let test_config = TestConfig::one_off_runner(config, PathBuf::new()); - let test_config = TestConfig::one_off_runner(config.clone(), PathBuf::new()); - - let build_manager = BuildManager::one_off(config); let mut cmd = test_config.config.program.build(&test_config.config.out_dir); cmd.arg("--target").arg(test_config.config.target.as_ref().unwrap()); // Build dependencies - test_config.apply_custom(&mut cmd, &build_manager).unwrap(); + test_config.apply_custom(&mut cmd, &dep_builder).expect("failed to build dependencies"); if cmd.spawn()?.wait()?.success() { Ok(()) } else { std::process::exit(1) } } From ab29d8285edf4ecb091676ba2f41dca2487b1e99 Mon Sep 17 00:00:00 2001 From: Chayim Refael Friedman Date: Tue, 3 Feb 2026 03:18:56 +0200 Subject: [PATCH 055/265] When autoimporting a segment followed by other segments, only consider items that will resolve with the after segments --- src/tools/rust-analyzer/crates/hir/src/lib.rs | 6 +- .../ide-assists/src/handlers/auto_import.rs | 33 ++++++- .../ide-db/src/imports/import_assets.rs | 88 +++++++++++++++++-- 3 files changed, 116 insertions(+), 11 deletions(-) diff --git a/src/tools/rust-analyzer/crates/hir/src/lib.rs b/src/tools/rust-analyzer/crates/hir/src/lib.rs index 252d71fb80a4..f2948ee83c57 100644 --- a/src/tools/rust-analyzer/crates/hir/src/lib.rs +++ b/src/tools/rust-analyzer/crates/hir/src/lib.rs @@ -6064,11 +6064,7 @@ impl<'db> Type<'db> { match name { Some(name) => { - match ctx.probe_for_name( - method_resolution::Mode::MethodCall, - name.clone(), - self_ty, - ) { + match ctx.probe_for_name(method_resolution::Mode::Path, name.clone(), self_ty) { Ok(candidate) | Err(method_resolution::MethodError::PrivateMatch(candidate)) => { let id = candidate.item.into(); diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/auto_import.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/auto_import.rs index cc2bf8174941..f4b84f9adb39 100644 --- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/auto_import.rs +++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/auto_import.rs @@ -351,7 +351,7 @@ mod tests { let config = TEST_CONFIG; let ctx = AssistContext::new(sema, &config, frange); let mut acc = Assists::new(&ctx, AssistResolveStrategy::All); - auto_import(&mut acc, &ctx); + hir::attach_db(&db, || auto_import(&mut acc, &ctx)); let assists = acc.finish(); let labels = assists.iter().map(|assist| assist.label.to_string()).collect::>(); @@ -1896,4 +1896,35 @@ fn foo(_: S) {} "#, ); } + + #[test] + fn with_after_segments() { + let before = r#" +mod foo { + pub mod wanted { + pub fn abc() {} + } +} + +mod bar { + pub mod wanted {} +} + +mod baz { + pub fn wanted() {} +} + +mod quux { + pub struct wanted; +} +impl quux::wanted { + fn abc() {} +} + +fn f() { + wanted$0::abc; +} + "#; + check_auto_import_order(before, &["Import `foo::wanted`", "Import `quux::wanted`"]); + } } diff --git a/src/tools/rust-analyzer/crates/ide-db/src/imports/import_assets.rs b/src/tools/rust-analyzer/crates/ide-db/src/imports/import_assets.rs index 35579eb2590d..1c485270272e 100644 --- a/src/tools/rust-analyzer/crates/ide-db/src/imports/import_assets.rs +++ b/src/tools/rust-analyzer/crates/ide-db/src/imports/import_assets.rs @@ -9,7 +9,7 @@ use hir::{ }; use itertools::Itertools; use rustc_hash::{FxHashMap, FxHashSet}; -use smallvec::SmallVec; +use smallvec::{SmallVec, smallvec}; use syntax::{ AstNode, SyntaxNode, ast::{self, HasName, make}, @@ -68,6 +68,8 @@ pub struct PathImportCandidate { pub qualifier: Vec, /// The name the item (struct, trait, enum, etc.) should have. pub name: NameToImport, + /// Potentially more segments that should resolve in the candidate. + pub after: Vec, } /// A name that will be used during item lookups. @@ -376,7 +378,7 @@ fn path_applicable_imports( ) -> FxIndexSet { let _p = tracing::info_span!("ImportAssets::path_applicable_imports").entered(); - match &*path_candidate.qualifier { + let mut result = match &*path_candidate.qualifier { [] => { items_locator::items_with_name( db, @@ -433,6 +435,75 @@ fn path_applicable_imports( }) .take(DEFAULT_QUERY_SEARCH_LIMIT) .collect(), + }; + + filter_candidates_by_after_path(db, scope, path_candidate, &mut result); + + result +} + +fn filter_candidates_by_after_path( + db: &RootDatabase, + scope: &SemanticsScope<'_>, + path_candidate: &PathImportCandidate, + imports: &mut FxIndexSet, +) { + if imports.len() <= 1 { + // Short-circuit, as even if it doesn't match fully we want it. + return; + } + + let Some((last_after, after_except_last)) = path_candidate.after.split_last() else { + return; + }; + + let original_imports = imports.clone(); + + let traits_in_scope = scope.visible_traits(); + imports.retain(|import| { + let items = if after_except_last.is_empty() { + smallvec![import.original_item] + } else { + let ItemInNs::Types(ModuleDef::Module(item)) = import.original_item else { + return false; + }; + // FIXME: This doesn't consider visibilities. + item.resolve_mod_path(db, after_except_last.iter().cloned()) + .into_iter() + .flatten() + .collect::>() + }; + items.into_iter().any(|item| { + let has_last_method = |ty: hir::Type<'_>| { + ty.iterate_path_candidates(db, scope, &traits_in_scope, Some(last_after), |_| { + Some(()) + }) + .is_some() + }; + // FIXME: A trait can have an assoc type that has a function/const, that's two segments before last. + match item { + // A module? Can we resolve one more segment? + ItemInNs::Types(ModuleDef::Module(module)) => module + .resolve_mod_path(db, [last_after.clone()]) + .is_some_and(|mut it| it.any(|_| true)), + // And ADT/Type Alias? That might be a method. + ItemInNs::Types(ModuleDef::Adt(it)) => has_last_method(it.ty(db)), + ItemInNs::Types(ModuleDef::BuiltinType(it)) => has_last_method(it.ty(db)), + ItemInNs::Types(ModuleDef::TypeAlias(it)) => has_last_method(it.ty(db)), + // A trait? Might have an associated item. + ItemInNs::Types(ModuleDef::Trait(it)) => it + .items(db) + .into_iter() + .any(|assoc_item| assoc_item.name(db) == Some(last_after.clone())), + // Other items? can't resolve one more segment. + _ => false, + } + }) + }); + + if imports.is_empty() { + // Better one half-match than zero full matches. + *imports = original_imports; } } @@ -759,10 +830,14 @@ impl<'db> ImportCandidate<'db> { if sema.resolve_path(path).is_some() { return None; } + let after = std::iter::successors(path.parent_path(), |it| it.parent_path()) + .map(|seg| seg.segment()?.name_ref().map(|name| Name::new_root(&name.text()))) + .collect::>()?; path_import_candidate( sema, path.qualifier(), NameToImport::exact_case_sensitive(path.segment()?.name_ref()?.to_string()), + after, ) } @@ -777,6 +852,7 @@ impl<'db> ImportCandidate<'db> { Some(ImportCandidate::Path(PathImportCandidate { qualifier: vec![], name: NameToImport::exact_case_sensitive(name.to_string()), + after: vec![], })) } @@ -785,7 +861,8 @@ impl<'db> ImportCandidate<'db> { fuzzy_name: String, sema: &Semantics<'db, RootDatabase>, ) -> Option { - path_import_candidate(sema, qualifier, NameToImport::fuzzy(fuzzy_name)) + // Assume a fuzzy match does not want the segments after. Because... I guess why not? + path_import_candidate(sema, qualifier, NameToImport::fuzzy(fuzzy_name), Vec::new()) } } @@ -793,6 +870,7 @@ fn path_import_candidate<'db>( sema: &Semantics<'db, RootDatabase>, qualifier: Option, name: NameToImport, + after: Vec, ) -> Option> { Some(match qualifier { Some(qualifier) => match sema.resolve_path(&qualifier) { @@ -802,7 +880,7 @@ fn path_import_candidate<'db>( .segments() .map(|seg| seg.name_ref().map(|name| Name::new_root(&name.text()))) .collect::>>()?; - ImportCandidate::Path(PathImportCandidate { qualifier, name }) + ImportCandidate::Path(PathImportCandidate { qualifier, name, after }) } else { return None; } @@ -826,7 +904,7 @@ fn path_import_candidate<'db>( } Some(_) => return None, }, - None => ImportCandidate::Path(PathImportCandidate { qualifier: vec![], name }), + None => ImportCandidate::Path(PathImportCandidate { qualifier: vec![], name, after }), }) } From 3eabab29a2685cd81f861b8a983883e8f49faea7 Mon Sep 17 00:00:00 2001 From: hsqStephenZhang Date: Mon, 2 Feb 2026 19:20:25 +0100 Subject: [PATCH 056/265] chore: configure capstone for x86 and clean up arm64 stub --- src/tools/miri/Cargo.toml | 2 +- src/tools/miri/src/shims/native_lib/trace/parent.rs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/tools/miri/Cargo.toml b/src/tools/miri/Cargo.toml index e7c90e45eba5..62387848868d 100644 --- a/src/tools/miri/Cargo.toml +++ b/src/tools/miri/Cargo.toml @@ -39,7 +39,7 @@ serde = { version = "1.0.219", features = ["derive"], optional = true } [target.'cfg(target_os = "linux")'.dependencies] nix = { version = "0.30.1", features = ["mman", "ptrace", "signal"], optional = true } ipc-channel = { version = "0.20.0", optional = true } -capstone = { version = "0.14", optional = true } +capstone = { version = "0.14", features = ["arch_x86", "full"], default-features = false, optional = true} [target.'cfg(all(target_os = "linux", target_pointer_width = "64", target_endian = "little"))'.dependencies] genmc-sys = { path = "./genmc-sys/", version = "0.1.0", optional = true } diff --git a/src/tools/miri/src/shims/native_lib/trace/parent.rs b/src/tools/miri/src/shims/native_lib/trace/parent.rs index 5476cccc02e3..f73b1359cef7 100644 --- a/src/tools/miri/src/shims/native_lib/trace/parent.rs +++ b/src/tools/miri/src/shims/native_lib/trace/parent.rs @@ -395,8 +395,6 @@ fn capstone_find_events( _ => (), } } - // FIXME: arm64 - _ => unimplemented!(), } false From dcb608d8180b5313119071be2d9f973488e62178 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 3 Feb 2026 10:42:22 +0100 Subject: [PATCH 057/265] re-balance CI --- src/tools/miri/ci/ci.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tools/miri/ci/ci.sh b/src/tools/miri/ci/ci.sh index 0d3e70a163be..53a7b3c047fa 100755 --- a/src/tools/miri/ci/ci.sh +++ b/src/tools/miri/ci/ci.sh @@ -174,6 +174,8 @@ case $HOST_TARGET in MIR_OPT=1 MANY_SEEDS=64 TEST_BENCH=1 CARGO_MIRI_ENV=1 run_tests # Custom target JSON file TEST_TARGET=tests/x86_64-unknown-kernel.json MIRI_NO_STD=1 run_tests_minimal no_std + # Not officially supported tier 2 + MANY_SEEDS=16 TEST_TARGET=x86_64-pc-solaris run_tests ;; aarch64-apple-darwin) # Host @@ -184,7 +186,6 @@ case $HOST_TARGET in # Not officially supported tier 2 MANY_SEEDS=16 TEST_TARGET=mips-unknown-linux-gnu run_tests # a 32bit big-endian target, and also a target without 64bit atomics MANY_SEEDS=16 TEST_TARGET=x86_64-unknown-illumos run_tests - MANY_SEEDS=16 TEST_TARGET=x86_64-pc-solaris run_tests ;; i686-pc-windows-msvc) # Host From 2159eaf5789c8c367e4c7f77c62d79262ea0252e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maja=20K=C4=85dzio=C5=82ka?= Date: Sun, 4 Jan 2026 23:37:32 +0100 Subject: [PATCH 058/265] Add a validity testcase for uninhabited variants --- .../tests/fail/validity/uninhabited_variant.rs | 17 +++++++++++++++++ .../fail/validity/uninhabited_variant.stderr | 13 +++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 src/tools/miri/tests/fail/validity/uninhabited_variant.rs create mode 100644 src/tools/miri/tests/fail/validity/uninhabited_variant.stderr diff --git a/src/tools/miri/tests/fail/validity/uninhabited_variant.rs b/src/tools/miri/tests/fail/validity/uninhabited_variant.rs new file mode 100644 index 000000000000..303584423fdc --- /dev/null +++ b/src/tools/miri/tests/fail/validity/uninhabited_variant.rs @@ -0,0 +1,17 @@ +// NOTE: this is essentially a smoke-test, with more comprehensive tests living in the rustc +// repository at tests/ui/consts/const-eval/ub-enum.rs +#![feature(never_type)] + +#[repr(C)] +#[allow(dead_code)] +enum E { + V1, // discriminant: 0 + V2(!), // 1 +} + +fn main() { + unsafe { + std::mem::transmute::(1); + //~^ ERROR: encountered an uninhabited enum variant + } +} diff --git a/src/tools/miri/tests/fail/validity/uninhabited_variant.stderr b/src/tools/miri/tests/fail/validity/uninhabited_variant.stderr new file mode 100644 index 000000000000..76ee25009b6e --- /dev/null +++ b/src/tools/miri/tests/fail/validity/uninhabited_variant.stderr @@ -0,0 +1,13 @@ +error: Undefined Behavior: constructing invalid value at .: encountered an uninhabited enum variant + --> tests/fail/validity/uninhabited_variant.rs:LL:CC + | +LL | std::mem::transmute::(1); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here + | + = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior + = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + +note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace + +error: aborting due to 1 previous error + From 510af14aa03cee1005f1e1c94103c84e72376d65 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Feb 2026 19:31:36 +0000 Subject: [PATCH 059/265] Bump bytes from 1.10.1 to 1.11.1 in /tests/deps Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.10.1 to 1.11.1. - [Release notes](https://github.com/tokio-rs/bytes/releases) - [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md) - [Commits](https://github.com/tokio-rs/bytes/compare/v1.10.1...v1.11.1) --- updated-dependencies: - dependency-name: bytes dependency-version: 1.11.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- src/tools/miri/tests/deps/Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/miri/tests/deps/Cargo.lock b/src/tools/miri/tests/deps/Cargo.lock index 254939625167..f54628e81042 100644 --- a/src/tools/miri/tests/deps/Cargo.lock +++ b/src/tools/miri/tests/deps/Cargo.lock @@ -46,9 +46,9 @@ checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "bytes" -version = "1.10.1" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "cfg-if" From 9a84e66021c1e206e7b1b64ff6de81447ab122c2 Mon Sep 17 00:00:00 2001 From: A4-Tacks Date: Wed, 4 Feb 2026 12:22:42 +0800 Subject: [PATCH 060/265] fix: Fix loses associated bounds for replace_derive_with_manual_impl Example --- ```rust #[derive(Clo$0ne)] struct Foo(T::Target); ``` **Before this PR** ```rust struct Foo(T::Target); impl Clone for Foo { $0fn clone(&self) -> Self { Self(self.0.clone()) } } ``` **After this PR** ```rust struct Foo(T::Target); impl Clone for Foo where T::Target: Clone { $0fn clone(&self) -> Self { Self(self.0.clone()) } } ``` --- .../replace_derive_with_manual_impl.rs | 23 ++++++++ .../crates/ide-assists/src/utils.rs | 53 ++++++++++++++++++- 2 files changed, 75 insertions(+), 1 deletion(-) diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_derive_with_manual_impl.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_derive_with_manual_impl.rs index 11b3fd22faa3..7c024263b4a8 100644 --- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_derive_with_manual_impl.rs +++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_derive_with_manual_impl.rs @@ -1307,6 +1307,29 @@ impl Clone for Foo { ) } + #[test] + fn add_custom_impl_clone_generic_tuple_struct_with_associated() { + check_assist( + replace_derive_with_manual_impl, + r#" +//- minicore: clone, derive, deref +#[derive(Clo$0ne)] +struct Foo(T::Target); +"#, + r#" +struct Foo(T::Target); + +impl Clone for Foo +where T::Target: Clone +{ + $0fn clone(&self) -> Self { + Self(self.0.clone()) + } +} +"#, + ) + } + #[test] fn test_ignore_derive_macro_without_input() { check_assist_not_applicable( diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/utils.rs b/src/tools/rust-analyzer/crates/ide-assists/src/utils.rs index 4b8c19305793..1732d8c2018e 100644 --- a/src/tools/rust-analyzer/crates/ide-assists/src/utils.rs +++ b/src/tools/rust-analyzer/crates/ide-assists/src/utils.rs @@ -15,6 +15,7 @@ use ide_db::{ path_transform::PathTransform, syntax_helpers::{node_ext::preorder_expr, prettify_macro_expansion}, }; +use itertools::Itertools; use stdx::format_to; use syntax::{ AstNode, AstToken, Direction, NodeOrToken, SourceFile, @@ -766,6 +767,11 @@ fn generate_impl_inner( }); let generic_args = generic_params.as_ref().map(|params| params.to_generic_args().clone_for_update()); + let trait_where_clause = trait_ + .as_ref() + .zip(generic_params.as_ref()) + .and_then(|(trait_, params)| generic_param_associated_bounds(adt, trait_, params)); + let ty = make::ty_path(make::ext::ident_path(&adt.name().unwrap().text())); let cfg_attrs = @@ -781,7 +787,7 @@ fn generate_impl_inner( false, trait_, ty, - None, + trait_where_clause, adt.where_clause(), body, ), @@ -790,6 +796,51 @@ fn generate_impl_inner( .clone_for_update() } +fn generic_param_associated_bounds( + adt: &ast::Adt, + trait_: &ast::Type, + generic_params: &ast::GenericParamList, +) -> Option { + let in_type_params = |name: &ast::NameRef| { + generic_params + .generic_params() + .filter_map(|param| match param { + ast::GenericParam::TypeParam(type_param) => type_param.name(), + _ => None, + }) + .any(|param| param.text() == name.text()) + }; + let adt_body = match adt { + ast::Adt::Enum(e) => e.variant_list().map(|it| it.syntax().clone()), + ast::Adt::Struct(s) => s.field_list().map(|it| it.syntax().clone()), + ast::Adt::Union(u) => u.record_field_list().map(|it| it.syntax().clone()), + }; + let mut trait_where_clause = adt_body + .into_iter() + .flat_map(|it| it.descendants()) + .filter_map(ast::Path::cast) + .filter_map(|path| { + let qualifier = path.qualifier()?.as_single_segment()?; + let qualifier = qualifier + .name_ref() + .or_else(|| match qualifier.type_anchor()?.ty()? { + ast::Type::PathType(path_type) => path_type.path()?.as_single_name_ref(), + _ => None, + }) + .filter(in_type_params)?; + Some((qualifier, path.segment()?.name_ref()?)) + }) + .map(|(qualifier, assoc_name)| { + let segments = [qualifier, assoc_name].map(make::path_segment); + let path = make::path_from_segments(segments, false); + let bounds = Some(make::type_bound(trait_.clone())); + make::where_pred(either::Either::Right(make::ty_path(path)), bounds) + }) + .unique_by(|it| it.syntax().to_string()) + .peekable(); + trait_where_clause.peek().is_some().then(|| make::where_clause(trait_where_clause)) +} + pub(crate) fn add_method_to_adt( builder: &mut SourceChangeBuilder, adt: &ast::Adt, From a3d848be47c49e841e5a5a88706970f646ce55d2 Mon Sep 17 00:00:00 2001 From: The Miri Cronjob Bot Date: Wed, 4 Feb 2026 05:13:19 +0000 Subject: [PATCH 061/265] Prepare for merging from rust-lang/rust This updates the rust-version file to 1d05e3c131d7181eb3df1a8c261f43135c99200d. --- src/tools/miri/rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/miri/rust-version b/src/tools/miri/rust-version index d7d94190c98b..4aad364eb6f6 100644 --- a/src/tools/miri/rust-version +++ b/src/tools/miri/rust-version @@ -1 +1 @@ -878374e07f3bf038c96e94e5bc917471878e4bf6 +1d05e3c131d7181eb3df1a8c261f43135c99200d From 58292e2a531a42bdf0ffe3ef594caa42baba5140 Mon Sep 17 00:00:00 2001 From: Alan Egerton Date: Wed, 4 Feb 2026 12:35:34 +0000 Subject: [PATCH 062/265] Consider captures to be used by closures that unwind Assignments to a captured variable within a diverging closure should not be considered unused if the divergence is caught. This patch considers such assignments/captures to be used by diverging closures irrespective of whether the divergence is caught, but better a false negative unused lint than a false positive one (the latter having caused a stable-to-stable regression). --- compiler/rustc_mir_transform/src/liveness.rs | 1 + tests/ui/lint/unused/diverging-path.rs | 21 ++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 tests/ui/lint/unused/diverging-path.rs diff --git a/compiler/rustc_mir_transform/src/liveness.rs b/compiler/rustc_mir_transform/src/liveness.rs index 9bafee9f31c3..9d951f087437 100644 --- a/compiler/rustc_mir_transform/src/liveness.rs +++ b/compiler/rustc_mir_transform/src/liveness.rs @@ -1291,6 +1291,7 @@ impl<'tcx> Visitor<'tcx> for TransferFunction<'_, 'tcx> { TerminatorKind::Return | TerminatorKind::Yield { .. } | TerminatorKind::Goto { target: START_BLOCK } // Inserted for the `FnMut` case. + | TerminatorKind::Call { target: None, .. } // unwinding could be caught if self.capture_kind != CaptureKind::None => { // All indirect captures have an effect on the environment, so we mark them as live. diff --git a/tests/ui/lint/unused/diverging-path.rs b/tests/ui/lint/unused/diverging-path.rs new file mode 100644 index 000000000000..7f364518fe97 --- /dev/null +++ b/tests/ui/lint/unused/diverging-path.rs @@ -0,0 +1,21 @@ +//! Assignments to a captured variable within a diverging closure should not be considered unused if +//! the divergence is caught. +//! +//! Regression test for https://github.com/rust-lang/rust/issues/152079 +//@ compile-flags: -Wunused +//@ check-pass + +fn main() { + let mut x = 1; + catch(|| { + x = 2; + panic!(); + }); + dbg!(x); +} + +fn catch(f: F) { + if let Ok(true) = std::fs::exists("may_or_may_not_call_f") { + _ = std::panic::catch_unwind(std::panic::AssertUnwindSafe(f)); + } +} From e4e725aec63cc773acf74b27e91dfc0630a8724f Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Wed, 4 Feb 2026 12:35:28 +0000 Subject: [PATCH 063/265] Convert to inline diagnostics in all codegen backends --- messages.ftl | 8 -------- src/errors.rs | 8 ++++---- src/lib.rs | 7 ------- 3 files changed, 4 insertions(+), 19 deletions(-) delete mode 100644 messages.ftl diff --git a/messages.ftl b/messages.ftl deleted file mode 100644 index b9b77b7d18c6..000000000000 --- a/messages.ftl +++ /dev/null @@ -1,8 +0,0 @@ -codegen_gcc_unwinding_inline_asm = - GCC backend does not support unwinding from inline asm - -codegen_gcc_copy_bitcode = failed to copy bitcode to object file: {$err} - -codegen_gcc_lto_bitcode_from_rlib = failed to get bitcode from object file for LTO ({$gcc_err}) - -codegen_gcc_explicit_tail_calls_unsupported = explicit tail calls with the 'become' keyword are not implemented in the GCC backend diff --git a/src/errors.rs b/src/errors.rs index b252c39c0c05..f5815e723392 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -2,24 +2,24 @@ use rustc_macros::Diagnostic; use rustc_span::Span; #[derive(Diagnostic)] -#[diag(codegen_gcc_unwinding_inline_asm)] +#[diag("GCC backend does not support unwinding from inline asm")] pub(crate) struct UnwindingInlineAsm { #[primary_span] pub span: Span, } #[derive(Diagnostic)] -#[diag(codegen_gcc_copy_bitcode)] +#[diag("failed to copy bitcode to object file: {$err}")] pub(crate) struct CopyBitcode { pub err: std::io::Error, } #[derive(Diagnostic)] -#[diag(codegen_gcc_lto_bitcode_from_rlib)] +#[diag("failed to get bitcode from object file for LTO ({$gcc_err})")] pub(crate) struct LtoBitcodeFromRlib { pub gcc_err: String, } #[derive(Diagnostic)] -#[diag(codegen_gcc_explicit_tail_calls_unsupported)] +#[diag("explicit tail calls with the 'become' keyword are not implemented in the GCC backend")] pub(crate) struct ExplicitTailCallsUnsupported; diff --git a/src/lib.rs b/src/lib.rs index 00bea0222622..cc88fd02435e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,7 +27,6 @@ extern crate rustc_ast; extern crate rustc_codegen_ssa; extern crate rustc_data_structures; extern crate rustc_errors; -extern crate rustc_fluent_macro; extern crate rustc_fs_util; extern crate rustc_hir; extern crate rustc_index; @@ -105,8 +104,6 @@ use tempfile::TempDir; use crate::back::lto::ModuleBuffer; use crate::gcc_util::{target_cpu, to_gcc_features}; -rustc_fluent_macro::fluent_messages! { "../messages.ftl" } - pub struct PrintOnPanic String>(pub F); impl String> Drop for PrintOnPanic { @@ -197,10 +194,6 @@ fn load_libgccjit_if_needed(libgccjit_target_lib_file: &Path) { } impl CodegenBackend for GccCodegenBackend { - fn locale_resource(&self) -> &'static str { - crate::DEFAULT_LOCALE_RESOURCE - } - fn name(&self) -> &'static str { "gcc" } From 5009ac30945e3a88acbafb3a692abade4fcf9f01 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 20:44:47 +0000 Subject: [PATCH 064/265] Bump git2 from 0.20.2 to 0.20.4 Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.20.2 to 0.20.4. - [Changelog](https://github.com/rust-lang/git2-rs/blob/git2-0.20.4/CHANGELOG.md) - [Commits](https://github.com/rust-lang/git2-rs/compare/git2-0.20.2...git2-0.20.4) --- updated-dependencies: - dependency-name: git2 dependency-version: 0.20.4 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- src/tools/miri/Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tools/miri/Cargo.lock b/src/tools/miri/Cargo.lock index b314aaafbdf0..2d332ae98dda 100644 --- a/src/tools/miri/Cargo.lock +++ b/src/tools/miri/Cargo.lock @@ -562,9 +562,9 @@ checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" [[package]] name = "git2" -version = "0.20.2" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2deb07a133b1520dc1a5690e9bd08950108873d7ed5de38dcc74d3b5ebffa110" +checksum = "7b88256088d75a56f8ecfa070513a775dd9107f6530ef14919dac831af9cfe2b" dependencies = [ "bitflags", "libc", @@ -804,9 +804,9 @@ dependencies = [ [[package]] name = "libgit2-sys" -version = "0.18.2+1.9.1" +version = "0.18.3+1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c42fe03df2bd3c53a3a9c7317ad91d80c81cd1fb0caec8d7cc4cd2bfa10c222" +checksum = "c9b3acc4b91781bb0b3386669d325163746af5f6e4f73e6d2d630e09a35f3487" dependencies = [ "cc", "libc", From 4b68f80a4e8330558cc3d0db1198cdb6b356287c Mon Sep 17 00:00:00 2001 From: A4-Tacks Date: Thu, 5 Feb 2026 14:01:35 +0800 Subject: [PATCH 065/265] feat: Improve hover too long parameter list Example --- ```rust fn fn_$0( attrs: impl IntoIterator, visibility: Option, fn_name: ast::Name, type_params: Option, where_clause: Option, params: ast::ParamList, body: ast::BlockExpr, ret_type: Option, is_async: bool, is_const: bool, is_unsafe: bool, is_gen: bool, ) -> ast::Fn {} ``` **Before this PR** ```rust fn fn_(attrs: impl IntoIterator, visibility: Option, fn_name: ast::Name, type_params: Option, where_clause: Option, params: ast::ParamList, body: ast::BlockExpr, ret_type: Option, is_async: bool, is_const: bool, is_unsafe: bool, is_gen: bool) -> ast::Fn ``` **After this PR** ```rust fn fn_( attrs: impl IntoIterator, visibility: Option, fn_name: ast::Name, type_params: Option, where_clause: Option, params: ast::ParamList, body: ast::BlockExpr, ret_type: Option, is_async: bool, is_const: bool, is_unsafe: bool, is_gen: bool ) -> ast::Fn ``` --- .../rust-analyzer/crates/hir/src/display.rs | 13 ++- .../crates/ide/src/hover/tests.rs | 93 +++++++++++++++++++ 2 files changed, 104 insertions(+), 2 deletions(-) diff --git a/src/tools/rust-analyzer/crates/hir/src/display.rs b/src/tools/rust-analyzer/crates/hir/src/display.rs index 1f9af564c359..30b7a51d59f6 100644 --- a/src/tools/rust-analyzer/crates/hir/src/display.rs +++ b/src/tools/rust-analyzer/crates/hir/src/display.rs @@ -172,8 +172,13 @@ fn write_function<'db>(f: &mut HirFormatter<'_, 'db>, func_id: FunctionId) -> Re write_generic_params(GenericDefId::FunctionId(func_id), f)?; + let too_long_param = data.params.len() > 4; f.write_char('(')?; + if too_long_param { + f.write_str("\n ")?; + } + let mut first = true; let mut skip_self = 0; if let Some(self_param) = func.self_param(db) { @@ -182,11 +187,12 @@ fn write_function<'db>(f: &mut HirFormatter<'_, 'db>, func_id: FunctionId) -> Re skip_self = 1; } + let comma = if too_long_param { ",\n " } else { ", " }; // FIXME: Use resolved `param.ty` once we no longer discard lifetimes let body = db.body(func_id.into()); for (type_ref, param) in data.params.iter().zip(func.assoc_fn_params(db)).skip(skip_self) { if !first { - f.write_str(", ")?; + f.write_str(comma)?; } else { first = false; } @@ -201,11 +207,14 @@ fn write_function<'db>(f: &mut HirFormatter<'_, 'db>, func_id: FunctionId) -> Re if data.is_varargs() { if !first { - f.write_str(", ")?; + f.write_str(comma)?; } f.write_str("...")?; } + if too_long_param { + f.write_char('\n')?; + } f.write_char(')')?; // `FunctionData::ret_type` will be `::core::future::Future` for async fns. diff --git a/src/tools/rust-analyzer/crates/ide/src/hover/tests.rs b/src/tools/rust-analyzer/crates/ide/src/hover/tests.rs index 7900a0dc9991..7fbbc576dd36 100644 --- a/src/tools/rust-analyzer/crates/ide/src/hover/tests.rs +++ b/src/tools/rust-analyzer/crates/ide/src/hover/tests.rs @@ -9719,6 +9719,99 @@ fn test_hover_function_with_pat_param() { ); } +#[test] +fn test_hover_function_with_too_long_param() { + check( + r#" +fn fn_$0( + attrs: impl IntoIterator, + visibility: Option, + fn_name: ast::Name, + type_params: Option, + where_clause: Option, + params: ast::ParamList, + body: ast::BlockExpr, + ret_type: Option, + is_async: bool, + is_const: bool, + is_unsafe: bool, + is_gen: bool, +) -> ast::Fn {} + "#, + expect![[r#" + *fn_* + + ```rust + ra_test_fixture + ``` + + ```rust + fn fn_( + attrs: impl IntoIterator, + visibility: Option, + fn_name: ast::Name, + type_params: Option, + where_clause: Option, + params: ast::ParamList, + body: ast::BlockExpr, + ret_type: Option, + is_async: bool, + is_const: bool, + is_unsafe: bool, + is_gen: bool + ) -> ast::Fn + ``` + "#]], + ); + + check( + r#" +fn fn_$0( + &self, + attrs: impl IntoIterator, + visibility: Option, + fn_name: ast::Name, + type_params: Option, + where_clause: Option, + params: ast::ParamList, + body: ast::BlockExpr, + ret_type: Option, + is_async: bool, + is_const: bool, + is_unsafe: bool, + is_gen: bool, + ... +) -> ast::Fn {} + "#, + expect![[r#" + *fn_* + + ```rust + ra_test_fixture + ``` + + ```rust + fn fn_( + &self, + attrs: impl IntoIterator, + visibility: Option, + fn_name: ast::Name, + type_params: Option, + where_clause: Option, + params: ast::ParamList, + body: ast::BlockExpr, + ret_type: Option, + is_async: bool, + is_const: bool, + is_unsafe: bool, + is_gen: bool, + ... + ) -> ast::Fn + ``` + "#]], + ); +} + #[test] fn hover_path_inside_block_scope() { check( From 94fa522956116707738df340136259005a325423 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 5 Feb 2026 08:52:39 +0100 Subject: [PATCH 066/265] Prepare for merging from rust-lang/rust This updates the rust-version file to 9f4b56a5aed81e8c36cc26b3c1b4666ead6b71fc. --- src/tools/miri/rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/miri/rust-version b/src/tools/miri/rust-version index 4aad364eb6f6..c122f58ec34a 100644 --- a/src/tools/miri/rust-version +++ b/src/tools/miri/rust-version @@ -1 +1 @@ -1d05e3c131d7181eb3df1a8c261f43135c99200d +9f4b56a5aed81e8c36cc26b3c1b4666ead6b71fc From 40857fcd00c7982cb7ca5f32674f42ce6e1e9688 Mon Sep 17 00:00:00 2001 From: hsqStephenZhang Date: Thu, 5 Feb 2026 12:48:55 +0100 Subject: [PATCH 067/265] chore: fix typos suggested by typos-cli --- src/tools/miri/src/alloc/isolated_alloc.rs | 4 ++-- src/tools/miri/src/bin/log/tracing_chrome_instant.rs | 4 ++-- .../miri/src/borrow_tracker/tree_borrows/perms.rs | 2 +- src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs | 2 +- .../miri/src/borrow_tracker/tree_borrows/tree/tests.rs | 2 +- .../src/borrow_tracker/tree_borrows/tree_visitor.rs | 2 +- src/tools/miri/src/concurrency/data_race.rs | 2 +- .../miri/src/concurrency/genmc/global_allocations.rs | 2 +- src/tools/miri/src/concurrency/genmc/mod.rs | 10 +++++----- src/tools/miri/src/concurrency/genmc/run.rs | 2 +- src/tools/miri/src/concurrency/weak_memory.rs | 2 +- src/tools/miri/src/eval.rs | 2 +- src/tools/miri/src/helpers.rs | 4 ++-- src/tools/miri/src/machine.rs | 4 ++-- src/tools/miri/src/shims/native_lib/trace/child.rs | 2 +- src/tools/miri/src/shims/os_str.rs | 2 +- src/tools/miri/src/shims/time.rs | 4 ++-- src/tools/miri/src/shims/unix/foreign_items.rs | 2 +- src/tools/miri/src/shims/unix/freebsd/sync.rs | 2 +- src/tools/miri/src/shims/unix/linux/foreign_items.rs | 4 ++-- src/tools/miri/src/shims/unix/linux_like/epoll.rs | 2 +- src/tools/miri/src/shims/unix/macos/sync.rs | 2 +- src/tools/miri/src/shims/windows/foreign_items.rs | 2 +- src/tools/miri/src/shims/windows/sync.rs | 2 +- src/tools/miri/src/shims/x86/avx2.rs | 2 +- src/tools/miri/src/shims/x86/bmi.rs | 2 +- src/tools/miri/src/shims/x86/sse.rs | 4 ++-- src/tools/miri/src/shims/x86/sse2.rs | 6 +++--- src/tools/miri/src/shims/x86/sse41.rs | 2 +- src/tools/miri/src/shims/x86/sse42.rs | 6 +++--- src/tools/miri/src/shims/x86/ssse3.rs | 2 +- 31 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/tools/miri/src/alloc/isolated_alloc.rs b/src/tools/miri/src/alloc/isolated_alloc.rs index 1745727b16b4..5c4a7230cf58 100644 --- a/src/tools/miri/src/alloc/isolated_alloc.rs +++ b/src/tools/miri/src/alloc/isolated_alloc.rs @@ -66,10 +66,10 @@ impl IsolatedAlloc { // And make sure the align is at least one page let align = std::cmp::max(layout.align(), self.page_size); // pg_count gives us the # of pages needed to satisfy the size. For - // align > page_size where align = n * page_size, a sufficently-aligned + // align > page_size where align = n * page_size, a sufficiently-aligned // address must exist somewhere in the range of // some_page_aligned_address..some_page_aligned_address + (n-1) * page_size - // (since if some_page_aligned_address + n * page_size is sufficently aligned, + // (since if some_page_aligned_address + n * page_size is sufficiently aligned, // then so is some_page_aligned_address itself per the definition of n, so we // can avoid using that 1 extra page). // Thus we allocate n-1 extra pages diff --git a/src/tools/miri/src/bin/log/tracing_chrome_instant.rs b/src/tools/miri/src/bin/log/tracing_chrome_instant.rs index b5f00852b82f..04705b8846d9 100644 --- a/src/tools/miri/src/bin/log/tracing_chrome_instant.rs +++ b/src/tools/miri/src/bin/log/tracing_chrome_instant.rs @@ -2,7 +2,7 @@ //! . //! A useful resource is also //! , -//! although this file does not implement TSC synchronization but insteads pins threads to CPUs, +//! although this file does not implement TSC synchronization but instead pins threads to CPUs, //! since the former is not reliable (i.e. it might lead to non-monotonic time measurements). //! Another useful resource for future improvements might be measureme's time measurement utils: //! . @@ -11,7 +11,7 @@ #![cfg(feature = "tracing")] /// This alternative `TracingChromeInstant` implementation was made entirely to suit the needs of -/// [crate::log::tracing_chrome], and shouldn't be used for anything else. It featues two functions: +/// [crate::log::tracing_chrome], and shouldn't be used for anything else. It features two functions: /// - [TracingChromeInstant::setup_for_thread_and_start], which sets up the current thread to do /// proper time tracking and returns a point in time to use as "t=0", and /// - [TracingChromeInstant::with_elapsed_micros_subtracting_tracing], which allows diff --git a/src/tools/miri/src/borrow_tracker/tree_borrows/perms.rs b/src/tools/miri/src/borrow_tracker/tree_borrows/perms.rs index 064c1cc5b95f..b62c5f242c37 100644 --- a/src/tools/miri/src/borrow_tracker/tree_borrows/perms.rs +++ b/src/tools/miri/src/borrow_tracker/tree_borrows/perms.rs @@ -578,7 +578,7 @@ pub mod diagnostics { // - created as Reserved { conflicted: false }, // then Unique -> Disabled is forbidden // A potential `Reserved { conflicted: false } - // -> Reserved { conflicted: true }` is inexistant or irrelevant, + // -> Reserved { conflicted: true }` is inexistent or irrelevant, // and so is the `Reserved { conflicted: false } -> Unique` (Unique, Frozen) => false, (ReservedFrz { conflicted: true }, _) => false, diff --git a/src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs b/src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs index 2c6be522837c..22e6389fefc4 100644 --- a/src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs +++ b/src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs @@ -226,7 +226,7 @@ impl LocationState { /// Records a new access, so that future access can potentially be skipped /// by `skip_if_known_noop`. This must be called on child accesses, and otherwise - /// shoud be called on foreign accesses for increased performance. It should not be called + /// should be called on foreign accesses for increased performance. It should not be called /// when `skip_if_known_noop` indicated skipping, since it then is a no-op. /// See `foreign_access_skipping.rs` fn record_new_access(&mut self, access_kind: AccessKind, rel_pos: AccessRelatedness) { diff --git a/src/tools/miri/src/borrow_tracker/tree_borrows/tree/tests.rs b/src/tools/miri/src/borrow_tracker/tree_borrows/tree/tests.rs index 0b83de2cedc0..52fe1c08a309 100644 --- a/src/tools/miri/src/borrow_tracker/tree_borrows/tree/tests.rs +++ b/src/tools/miri/src/borrow_tracker/tree_borrows/tree/tests.rs @@ -741,7 +741,7 @@ mod spurious_read { ); eprintln!(" (arbitrary code instanciated with '{opaque}')"); err += 1; - // We found an instanciation of the opaque code that makes this Pattern + // We found an instantiation of the opaque code that makes this Pattern // fail, we don't really need to check the rest. break; } diff --git a/src/tools/miri/src/borrow_tracker/tree_borrows/tree_visitor.rs b/src/tools/miri/src/borrow_tracker/tree_borrows/tree_visitor.rs index b1ceeecf577d..ab3a19ad9e17 100644 --- a/src/tools/miri/src/borrow_tracker/tree_borrows/tree_visitor.rs +++ b/src/tools/miri/src/borrow_tracker/tree_borrows/tree_visitor.rs @@ -99,7 +99,7 @@ where assert!(self.stack.is_empty()); // First, handle accessed node. A bunch of things need to // be handled differently here compared to the further parents - // of `accesssed_node`. + // of `accessesed_node`. { self.propagate_at(this, accessed_node, AccessRelatedness::LocalAccess)?; if matches!(visit_children, ChildrenVisitMode::VisitChildrenOfAccessed) { diff --git a/src/tools/miri/src/concurrency/data_race.rs b/src/tools/miri/src/concurrency/data_race.rs index c18b78099860..336abff6c52d 100644 --- a/src/tools/miri/src/concurrency/data_race.rs +++ b/src/tools/miri/src/concurrency/data_race.rs @@ -371,7 +371,7 @@ impl AccessType { if let Some(size) = size { if size == Size::ZERO { - // In this case there were multiple read accesss with different sizes and then a write. + // In this case there were multiple read accesses with different sizes and then a write. // We will be reporting *one* of the other reads, but we don't have enough information // to determine which one had which size. assert!(self == AccessType::AtomicLoad); diff --git a/src/tools/miri/src/concurrency/genmc/global_allocations.rs b/src/tools/miri/src/concurrency/genmc/global_allocations.rs index 7f34c60dcdaf..76be8c3a4c9a 100644 --- a/src/tools/miri/src/concurrency/genmc/global_allocations.rs +++ b/src/tools/miri/src/concurrency/genmc/global_allocations.rs @@ -62,7 +62,7 @@ impl GlobalStateInner { let entry = match self.base_addr.entry(alloc_id) { Entry::Occupied(occupied_entry) => { // Looks like some other thread allocated this for us - // between when we released the read lock and aquired the write lock, + // between when we released the read lock and acquired the write lock, // so we just return that value. return interp_ok(*occupied_entry.get()); } diff --git a/src/tools/miri/src/concurrency/genmc/mod.rs b/src/tools/miri/src/concurrency/genmc/mod.rs index 740553ab85d6..092fc7294d15 100644 --- a/src/tools/miri/src/concurrency/genmc/mod.rs +++ b/src/tools/miri/src/concurrency/genmc/mod.rs @@ -252,7 +252,7 @@ impl GenmcCtx { /// Inform GenMC about an atomic load. /// Returns that value that the load should read. /// - /// `old_value` is the value that a non-atomic load would read here, or `None` if the memory is uninitalized. + /// `old_value` is the value that a non-atomic load would read here, or `None` if the memory is uninitialized. pub(crate) fn atomic_load<'tcx>( &self, ecx: &InterpCx<'tcx, MiriMachine<'tcx>>, @@ -275,7 +275,7 @@ impl GenmcCtx { /// Inform GenMC about an atomic store. /// Returns `true` if the stored value should be reflected in Miri's memory. /// - /// `old_value` is the value that a non-atomic load would read here, or `None` if the memory is uninitalized. + /// `old_value` is the value that a non-atomic load would read here, or `None` if the memory is uninitialized. pub(crate) fn atomic_store<'tcx>( &self, ecx: &InterpCx<'tcx, MiriMachine<'tcx>>, @@ -320,7 +320,7 @@ impl GenmcCtx { /// /// Returns `(old_val, Option)`. `new_val` might not be the latest write in coherence order, which is indicated by `None`. /// - /// `old_value` is the value that a non-atomic load would read here, or `None` if the memory is uninitalized. + /// `old_value` is the value that a non-atomic load would read here, or `None` if the memory is uninitialized. pub(crate) fn atomic_rmw_op<'tcx>( &self, ecx: &InterpCx<'tcx, MiriMachine<'tcx>>, @@ -345,7 +345,7 @@ impl GenmcCtx { /// Returns `(old_val, Option)`. `new_val` might not be the latest write in coherence order, which is indicated by `None`. /// - /// `old_value` is the value that a non-atomic load would read here, or `None` if the memory is uninitalized. + /// `old_value` is the value that a non-atomic load would read here, or `None` if the memory is uninitialized. pub(crate) fn atomic_exchange<'tcx>( &self, ecx: &InterpCx<'tcx, MiriMachine<'tcx>>, @@ -370,7 +370,7 @@ impl GenmcCtx { /// /// Returns the old value read by the compare exchange, optionally the value that Miri should write back to its memory, and whether the compare-exchange was a success or not. /// - /// `old_value` is the value that a non-atomic load would read here, or `None` if the memory is uninitalized. + /// `old_value` is the value that a non-atomic load would read here, or `None` if the memory is uninitialized. pub(crate) fn atomic_compare_exchange<'tcx>( &self, ecx: &InterpCx<'tcx, MiriMachine<'tcx>>, diff --git a/src/tools/miri/src/concurrency/genmc/run.rs b/src/tools/miri/src/concurrency/genmc/run.rs index 6ff8e0656f36..de6d87373ec0 100644 --- a/src/tools/miri/src/concurrency/genmc/run.rs +++ b/src/tools/miri/src/concurrency/genmc/run.rs @@ -30,7 +30,7 @@ pub fn run_genmc_mode<'tcx>( config: &MiriConfig, eval_entry: impl Fn(Rc) -> Result<(), NonZeroI32>, ) -> Result<(), NonZeroI32> { - // Check for supported target: endianess and pointer size must match the host. + // Check for supported target: endianness and pointer size must match the host. if tcx.data_layout.endian != Endian::Little || tcx.data_layout.pointer_size().bits() != 64 { tcx.dcx().fatal("GenMC only supports 64bit little-endian targets"); } diff --git a/src/tools/miri/src/concurrency/weak_memory.rs b/src/tools/miri/src/concurrency/weak_memory.rs index 6fe73fec0f57..2869152bc39d 100644 --- a/src/tools/miri/src/concurrency/weak_memory.rs +++ b/src/tools/miri/src/concurrency/weak_memory.rs @@ -389,7 +389,7 @@ impl<'tcx> StoreBuffer { }) .filter(|&store_elem| { if is_seqcst && store_elem.is_seqcst { - // An SC load needs to ignore all but last store maked SC (stores not marked SC are not + // An SC load needs to ignore all but last store made SC (stores not marked SC are not // affected) let include = !found_sc; found_sc = true; diff --git a/src/tools/miri/src/eval.rs b/src/tools/miri/src/eval.rs index 0423b0ea5abd..1e75df7d278f 100644 --- a/src/tools/miri/src/eval.rs +++ b/src/tools/miri/src/eval.rs @@ -113,7 +113,7 @@ pub struct MiriConfig { pub float_nondet: bool, /// Whether floating-point operations can have a non-deterministic rounding error. pub float_rounding_error: FloatRoundingErrorMode, - /// Whether Miri artifically introduces short reads/writes on file descriptors. + /// Whether Miri artificially introduces short reads/writes on file descriptors. pub short_fd_operations: bool, /// A list of crates that are considered user-relevant. pub user_relevant_crates: Vec, diff --git a/src/tools/miri/src/helpers.rs b/src/tools/miri/src/helpers.rs index f4fc478481a7..5dcd2d9ec208 100644 --- a/src/tools/miri/src/helpers.rs +++ b/src/tools/miri/src/helpers.rs @@ -138,7 +138,7 @@ pub fn iter_exported_symbols<'tcx>( } // Next, all our dependencies. - // `dependency_formats` includes all the transitive informations needed to link a crate, + // `dependency_formats` includes all the transitive information needed to link a crate, // which is what we need here since we need to dig out `exported_symbols` from all transitive // dependencies. let dependency_formats = tcx.dependency_formats(()); @@ -1148,7 +1148,7 @@ impl ToUsize for u32 { } /// Similarly, a maximum address size of `u64` is assumed widely here, so let's have ergonomic -/// converion from `usize` to `u64`. +/// conversion from `usize` to `u64`. pub trait ToU64 { fn to_u64(self) -> u64; } diff --git a/src/tools/miri/src/machine.rs b/src/tools/miri/src/machine.rs index f17bd5ac4319..d50475c74874 100644 --- a/src/tools/miri/src/machine.rs +++ b/src/tools/miri/src/machine.rs @@ -654,7 +654,7 @@ pub struct MiriMachine<'tcx> { /// Whether floating-point operations can have a non-deterministic rounding error. pub float_rounding_error: FloatRoundingErrorMode, - /// Whether Miri artifically introduces short reads/writes on file descriptors. + /// Whether Miri artificially introduces short reads/writes on file descriptors. pub short_fd_operations: bool, } @@ -1802,7 +1802,7 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> { // We have to skip the frame that is just being popped. ecx.active_thread_mut().recompute_top_user_relevant_frame(/* skip */ 1); } - // tracing-tree can autoamtically annotate scope changes, but it gets very confused by our + // tracing-tree can automatically annotate scope changes, but it gets very confused by our // concurrency and what it prints is just plain wrong. So we print our own information // instead. (Cc https://github.com/rust-lang/miri/issues/2266) info!("Leaving {}", ecx.frame().instance()); 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 021ec2e9aeb3..d7d9a591911a 100644 --- a/src/tools/miri/src/shims/native_lib/trace/child.rs +++ b/src/tools/miri/src/shims/native_lib/trace/child.rs @@ -31,7 +31,7 @@ pub struct Supervisor { /// Used for synchronisation, allowing us to receive confirmation that the /// parent process has handled the request from `message_tx`. confirm_rx: ipc::IpcReceiver, - /// Receiver for memory acceses that ocurred during the FFI call. + /// Receiver for memory accesses that occurred during the FFI call. event_rx: ipc::IpcReceiver, } diff --git a/src/tools/miri/src/shims/os_str.rs b/src/tools/miri/src/shims/os_str.rs index 28b03ffb88c6..db9cb3a7a32b 100644 --- a/src/tools/miri/src/shims/os_str.rs +++ b/src/tools/miri/src/shims/os_str.rs @@ -316,7 +316,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // The new path is still absolute on Windows. path.remove(0); } - // If this starts withs a `\` but not a `\\`, then this was absolute on Unix but is + // If this starts with a `\` but not a `\\`, then this was absolute on Unix but is // relative on Windows (relative to "the root of the current directory", e.g. the // drive letter). else if path.first() == Some(&sep) && path.get(1) != Some(&sep) { diff --git a/src/tools/miri/src/shims/time.rs b/src/tools/miri/src/shims/time.rs index 865a80251e31..2c2b029a1232 100644 --- a/src/tools/miri/src/shims/time.rs +++ b/src/tools/miri/src/shims/time.rs @@ -401,11 +401,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { }; let timeout_anchor = if flags == 0 { - // No flags set, the timespec should be interperted as a duration + // No flags set, the timespec should be interpreted as a duration // to sleep for TimeoutAnchor::Relative } else if flags == this.eval_libc_i32("TIMER_ABSTIME") { - // Only flag TIMER_ABSTIME set, the timespec should be interperted as + // Only flag TIMER_ABSTIME set, the timespec should be interpreted as // an absolute time. TimeoutAnchor::Absolute } else { diff --git a/src/tools/miri/src/shims/unix/foreign_items.rs b/src/tools/miri/src/shims/unix/foreign_items.rs index 87a307c98948..48e2ebd0f13e 100644 --- a/src/tools/miri/src/shims/unix/foreign_items.rs +++ b/src/tools/miri/src/shims/unix/foreign_items.rs @@ -1045,7 +1045,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { &[Os::Linux, Os::FreeBsd, Os::Illumos, Os::Solaris, Os::Android, Os::MacOs], link_name, )?; - // This function looks and behaves excatly like miri_start_unwind. + // This function looks and behaves exactly like miri_start_unwind. let [payload] = this.check_shim_sig_lenient(abi, CanonAbi::C, link_name, args)?; this.handle_miri_start_unwind(payload)?; return interp_ok(EmulateItemResult::NeedsUnwind); diff --git a/src/tools/miri/src/shims/unix/freebsd/sync.rs b/src/tools/miri/src/shims/unix/freebsd/sync.rs index ae8a167080b9..8cf446438963 100644 --- a/src/tools/miri/src/shims/unix/freebsd/sync.rs +++ b/src/tools/miri/src/shims/unix/freebsd/sync.rs @@ -169,7 +169,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let Some(futex_ref) = this.get_sync_or_init(obj, |_| FreeBsdFutex { futex: Default::default() }) else { - // From Linux implemenation: + // From Linux implementation: // No AllocId, or no live allocation at that AllocId. // Return an error code. (That seems nicer than silently doing something non-intuitive.) // This means that if an address gets reused by a new allocation, diff --git a/src/tools/miri/src/shims/unix/linux/foreign_items.rs b/src/tools/miri/src/shims/unix/linux/foreign_items.rs index 12cee0d162a0..b92732de73ca 100644 --- a/src/tools/miri/src/shims/unix/linux/foreign_items.rs +++ b/src/tools/miri/src/shims/unix/linux/foreign_items.rs @@ -165,7 +165,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { )? { ThreadNameResult::Ok => Scalar::from_u32(0), ThreadNameResult::NameTooLong => this.eval_libc("ERANGE"), - // Act like we faild to open `/proc/self/task/$tid/comm`. + // Act like we failed to open `/proc/self/task/$tid/comm`. ThreadNameResult::ThreadNotFound => this.eval_libc("ENOENT"), }; this.write_scalar(res, dest)?; @@ -186,7 +186,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { )? { ThreadNameResult::Ok => Scalar::from_u32(0), ThreadNameResult::NameTooLong => unreachable!(), - // Act like we faild to open `/proc/self/task/$tid/comm`. + // Act like we failed to open `/proc/self/task/$tid/comm`. ThreadNameResult::ThreadNotFound => this.eval_libc("ENOENT"), } } else { diff --git a/src/tools/miri/src/shims/unix/linux_like/epoll.rs b/src/tools/miri/src/shims/unix/linux_like/epoll.rs index ff5367ea87ab..7480db00d6ed 100644 --- a/src/tools/miri/src/shims/unix/linux_like/epoll.rs +++ b/src/tools/miri/src/shims/unix/linux_like/epoll.rs @@ -176,7 +176,7 @@ impl EpollInterestTable { if let Some(epolls) = self.0.remove(&id) { for epoll in epolls.iter().filter_map(|(_id, epoll)| epoll.upgrade()) { // This is a still-live epoll with interest in this FD. Remove all - // relevent interests (including from the ready set). + // relevant interests (including from the ready set). epoll .interest_list .borrow_mut() diff --git a/src/tools/miri/src/shims/unix/macos/sync.rs b/src/tools/miri/src/shims/unix/macos/sync.rs index be32ca9abd59..6ee9ffaf3776 100644 --- a/src/tools/miri/src/shims/unix/macos/sync.rs +++ b/src/tools/miri/src/shims/unix/macos/sync.rs @@ -169,7 +169,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let is_shared = flags == shared; let timeout = clock_timeout.map(|(_, anchor, timeout)| { - // The only clock that is currenlty supported is the monotonic clock. + // The only clock that is currently supported is the monotonic clock. // While the deadline argument of `os_sync_wait_on_address_with_deadline` // is actually not in nanoseconds but in the units of `mach_current_time`, // the two are equivalent in miri. diff --git a/src/tools/miri/src/shims/windows/foreign_items.rs b/src/tools/miri/src/shims/windows/foreign_items.rs index 0bdf6bb78505..2d1a153d9262 100644 --- a/src/tools/miri/src/shims/windows/foreign_items.rs +++ b/src/tools/miri/src/shims/windows/foreign_items.rs @@ -1199,7 +1199,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { "`_Unwind_RaiseException` is not supported on non-MinGW Windows", ); } - // This function looks and behaves excatly like miri_start_unwind. + // This function looks and behaves exactly like miri_start_unwind. let [payload] = this.check_shim_sig( shim_sig!(extern "C" fn(*mut _) -> unwind::libunwind::_Unwind_Reason_Code), link_name, diff --git a/src/tools/miri/src/shims/windows/sync.rs b/src/tools/miri/src/shims/windows/sync.rs index db1860bdfd30..14562450e6e0 100644 --- a/src/tools/miri/src/shims/windows/sync.rs +++ b/src/tools/miri/src/shims/windows/sync.rs @@ -67,7 +67,7 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> { ) } - /// Returns `true` if we were succssful, `false` if we would block. + /// Returns `true` if we were successful, `false` if we would block. fn init_once_try_begin( &mut self, init_once_ref: &InitOnceRef, diff --git a/src/tools/miri/src/shims/x86/avx2.rs b/src/tools/miri/src/shims/x86/avx2.rs index 7d8e52db73d6..bddb9d47457c 100644 --- a/src/tools/miri/src/shims/x86/avx2.rs +++ b/src/tools/miri/src/shims/x86/avx2.rs @@ -194,7 +194,7 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Used to implement the _mm256_sign_epi{8,16,32} functions. // Negates elements from `left` when the corresponding element in // `right` is negative. If an element from `right` is zero, zero - // is writen to the corresponding output element. + // is written to the corresponding output element. // Basically, we multiply `left` with `right.signum()`. "psign.b" | "psign.w" | "psign.d" => { let [left, right] = diff --git a/src/tools/miri/src/shims/x86/bmi.rs b/src/tools/miri/src/shims/x86/bmi.rs index 814823d2acb1..877ecf319ca4 100644 --- a/src/tools/miri/src/shims/x86/bmi.rs +++ b/src/tools/miri/src/shims/x86/bmi.rs @@ -44,7 +44,7 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let right = if is_64_bit { right.to_u64()? } else { u64::from(right.to_u32()?) }; let result = match unprefixed_name { - // Extract a contigous range of bits from an unsigned integer. + // Extract a contiguous range of bits from an unsigned integer. // https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_bextr_u32 "bextr" => { let start = u32::try_from(right & 0xff).unwrap(); diff --git a/src/tools/miri/src/shims/x86/sse.rs b/src/tools/miri/src/shims/x86/sse.rs index 309fbb61de5a..7da7a0b57c90 100644 --- a/src/tools/miri/src/shims/x86/sse.rs +++ b/src/tools/miri/src/shims/x86/sse.rs @@ -24,8 +24,8 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Prefix should have already been checked. let unprefixed_name = link_name.as_str().strip_prefix("llvm.x86.sse.").unwrap(); // All these intrinsics operate on 128-bit (f32x4) SIMD vectors unless stated otherwise. - // Many intrinsic names are sufixed with "ps" (packed single) or "ss" (scalar single), - // where single means single precision floating point (f32). "ps" means thet the operation + // Many intrinsic names are suffixed with "ps" (packed single) or "ss" (scalar single), + // where single means single precision floating point (f32). "ps" means that the operation // is performed on each element of the vector, while "ss" means that the operation is // performed only on the first element, copying the remaining elements from the input // vector (for binary operations, from the left-hand side). diff --git a/src/tools/miri/src/shims/x86/sse2.rs b/src/tools/miri/src/shims/x86/sse2.rs index f712814a5eda..1a33f4c70fd2 100644 --- a/src/tools/miri/src/shims/x86/sse2.rs +++ b/src/tools/miri/src/shims/x86/sse2.rs @@ -26,14 +26,14 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // These intrinsics operate on 128-bit (f32x4, f64x2, i8x16, i16x8, i32x4, i64x2) SIMD // vectors unless stated otherwise. - // Many intrinsic names are sufixed with "ps" (packed single), "ss" (scalar signle), + // Many intrinsic names are suffixed with "ps" (packed single), "ss" (scalar single), // "pd" (packed double) or "sd" (scalar double), where single means single precision // floating point (f32) and double means double precision floating point (f64). "ps" - // and "pd" means thet the operation is performed on each element of the vector, while + // and "pd" means that the operation is performed on each element of the vector, while // "ss" and "sd" means that the operation is performed only on the first element, copying // the remaining elements from the input vector (for binary operations, from the left-hand // side). - // Intrinsincs sufixed with "epiX" or "epuX" operate with X-bit signed or unsigned + // Intrinsics suffixed with "epiX" or "epuX" operate with X-bit signed or unsigned // vectors. match unprefixed_name { // Used to implement the _mm_sad_epu8 function. diff --git a/src/tools/miri/src/shims/x86/sse41.rs b/src/tools/miri/src/shims/x86/sse41.rs index 1e8b0f34428d..c5a4a98ba881 100644 --- a/src/tools/miri/src/shims/x86/sse41.rs +++ b/src/tools/miri/src/shims/x86/sse41.rs @@ -115,7 +115,7 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { round_all::(this, op, rounding, dest)?; } // Used to implement the _mm_minpos_epu16 function. - // Find the minimum unsinged 16-bit integer in `op` and + // Find the minimum unsigned 16-bit integer in `op` and // returns its value and position. "phminposuw" => { let [op] = this.check_shim_sig_lenient(abi, CanonAbi::C, link_name, args)?; diff --git a/src/tools/miri/src/shims/x86/sse42.rs b/src/tools/miri/src/shims/x86/sse42.rs index aa8aea355883..7c0f9c570e2e 100644 --- a/src/tools/miri/src/shims/x86/sse42.rs +++ b/src/tools/miri/src/shims/x86/sse42.rs @@ -213,7 +213,7 @@ fn deconstruct_args<'tcx>( }; // The fourth letter of each string comparison intrinsic is either 'e' for "explicit" or 'i' for "implicit". - // The distinction will correspond to the intrinsics type signature. In this constext, "explicit" and "implicit" + // The distinction will correspond to the intrinsics type signature. In this context, "explicit" and "implicit" // refer to the way the string length is determined. The length is either passed explicitly in the "explicit" // case or determined by a null terminator in the "implicit" case. let is_explicit = match unprefixed_name.as_bytes().get(4) { @@ -297,7 +297,7 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { deconstruct_args(unprefixed_name, this, link_name, abi, args)?; let mask = compare_strings(this, &str1, &str2, len, imm)?; - // The sixth bit inside the immediate byte distiguishes + // The sixth bit inside the immediate byte distinguishes // between a bit mask or a byte mask when generating a mask. if imm & 0b100_0000 != 0 { let (array_layout, size) = if imm & USE_WORDS != 0 { @@ -347,7 +347,7 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let mask = compare_strings(this, &str1, &str2, len, imm)?; let len = default_len::(imm); - // The sixth bit inside the immediate byte distiguishes between the least + // The sixth bit inside the immediate byte distinguishes between the least // significant bit and the most significant bit when generating an index. let result = if imm & 0b100_0000 != 0 { // most significant bit diff --git a/src/tools/miri/src/shims/x86/ssse3.rs b/src/tools/miri/src/shims/x86/ssse3.rs index b01a8795b4d1..7c1d15ff1265 100644 --- a/src/tools/miri/src/shims/x86/ssse3.rs +++ b/src/tools/miri/src/shims/x86/ssse3.rs @@ -68,7 +68,7 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Used to implement the _mm_sign_epi{8,16,32} functions. // Negates elements from `left` when the corresponding element in // `right` is negative. If an element from `right` is zero, zero - // is writen to the corresponding output element. + // is written to the corresponding output element. // Basically, we multiply `left` with `right.signum()`. "psign.b.128" | "psign.w.128" | "psign.d.128" => { let [left, right] = From 689e8c20994b1fe8338f85fde7d43e4ccc74cdcf Mon Sep 17 00:00:00 2001 From: Nikolai Kuklin Date: Thu, 5 Feb 2026 16:34:54 +0100 Subject: [PATCH 068/265] Add documentation note about signed overflow direction --- library/core/src/num/int_macros.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs index b21865a9ae54..d1d5790c694d 100644 --- a/library/core/src/num/int_macros.rs +++ b/library/core/src/num/int_macros.rs @@ -2481,7 +2481,8 @@ macro_rules! int_impl { /// /// Returns a tuple of the addition along with a boolean indicating /// whether an arithmetic overflow would occur. If an overflow would have - /// occurred then the wrapped value is returned. + /// occurred then the wrapped value is returned (negative if overflowed + /// above [`MAX`](Self::MAX), non-negative if below [`MIN`](Self::MIN)). /// /// # Examples /// @@ -2516,6 +2517,9 @@ macro_rules! int_impl { /// The output boolean returned by this method is *not* a carry flag, /// and should *not* be added to a more significant word. /// + /// If overflow occurred, the wrapped value is returned (negative if overflowed + /// above [`MAX`](Self::MAX), non-negative if below [`MIN`](Self::MIN)). + /// /// If the input carry is false, this method is equivalent to /// [`overflowing_add`](Self::overflowing_add). /// @@ -2583,7 +2587,8 @@ macro_rules! int_impl { /// Calculates `self` - `rhs`. /// /// Returns a tuple of the subtraction along with a boolean indicating whether an arithmetic overflow - /// would occur. If an overflow would have occurred then the wrapped value is returned. + /// would occur. If an overflow would have occurred then the wrapped value is returned + /// (negative if overflowed above [`MAX`](Self::MAX), non-negative if below [`MIN`](Self::MIN)). /// /// # Examples /// @@ -2619,6 +2624,9 @@ macro_rules! int_impl { /// The output boolean returned by this method is *not* a borrow flag, /// and should *not* be subtracted from a more significant word. /// + /// If overflow occurred, the wrapped value is returned (negative if overflowed + /// above [`MAX`](Self::MAX), non-negative if below [`MIN`](Self::MIN)). + /// /// If the input borrow is false, this method is equivalent to /// [`overflowing_sub`](Self::overflowing_sub). /// From ba33e03f9cd684adad8966c79fd73f9aa6c475b5 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 5 Feb 2026 08:58:36 +0100 Subject: [PATCH 069/265] pass -Zunstable-options to tests --- src/tools/miri/cargo-miri/src/phases.rs | 1 + src/tools/miri/ci/ci.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tools/miri/cargo-miri/src/phases.rs b/src/tools/miri/cargo-miri/src/phases.rs index 0babccb40d33..567d51c0b31e 100644 --- a/src/tools/miri/cargo-miri/src/phases.rs +++ b/src/tools/miri/cargo-miri/src/phases.rs @@ -312,6 +312,7 @@ pub fn phase_rustc(args: impl Iterator, phase: RustcPhase) { // Ask rustc for the filename (since that is target-dependent). let mut rustc = miri_for_host(); // sysroot doesn't matter for this so we just use the host rustc.arg("--print").arg("file-names"); + rustc.arg("-Zunstable-options"); // needed for JSON targets for flag in ["--crate-name", "--crate-type", "--target"] { for val in get_arg_flag_values(flag) { rustc.arg(flag).arg(val); diff --git a/src/tools/miri/ci/ci.sh b/src/tools/miri/ci/ci.sh index 53a7b3c047fa..6c0bceac7731 100755 --- a/src/tools/miri/ci/ci.sh +++ b/src/tools/miri/ci/ci.sh @@ -173,7 +173,7 @@ case $HOST_TARGET in # Host MIR_OPT=1 MANY_SEEDS=64 TEST_BENCH=1 CARGO_MIRI_ENV=1 run_tests # Custom target JSON file - TEST_TARGET=tests/x86_64-unknown-kernel.json MIRI_NO_STD=1 run_tests_minimal no_std + TEST_TARGET=tests/x86_64-unknown-kernel.json MIRI_NO_STD=1 MIRIFLAGS="-Zunstable-options" run_tests_minimal no_std # Not officially supported tier 2 MANY_SEEDS=16 TEST_TARGET=x86_64-pc-solaris run_tests ;; From ec3de4bac51689656c904cfa66dee3593854a9e7 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 5 Feb 2026 11:30:41 -0800 Subject: [PATCH 070/265] Replace `stdarch` version placeholders with 1.94 (cherry picked from commit b90149755ad030e74bc3c198f8c4b90e08be8065) --- .../core_arch/src/aarch64/neon/generated.rs | 210 +- .../src/arm_shared/neon/generated.rs | 404 ++-- .../core_arch/src/arm_shared/neon/mod.rs | 14 +- .../crates/core_arch/src/x86/avx512fp16.rs | 1762 ++++++++--------- .../crates/core_arch/src/x86/avxneconvert.rs | 8 +- .../stdarch/crates/core_arch/src/x86/mod.rs | 4 +- .../crates/core_arch/src/x86_64/avx512fp16.rs | 24 +- .../crates/core_arch/src/x86_64/mod.rs | 2 +- .../spec/neon/aarch64.spec.yml | 4 +- .../spec/neon/arm_shared.spec.yml | 8 +- 10 files changed, 1220 insertions(+), 1220 deletions(-) diff --git a/library/stdarch/crates/core_arch/src/aarch64/neon/generated.rs b/library/stdarch/crates/core_arch/src/aarch64/neon/generated.rs index 9507b71106dd..ed50bff5ae31 100644 --- a/library/stdarch/crates/core_arch/src/aarch64/neon/generated.rs +++ b/library/stdarch/crates/core_arch/src/aarch64/neon/generated.rs @@ -1565,7 +1565,7 @@ pub fn vceqh_f16(a: f16, b: f16) -> u16 { #[inline(always)] #[cfg_attr(test, assert_instr(fcmeq))] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vceqz_f16(a: float16x4_t) -> uint16x4_t { let b: f16x4 = f16x4::new(0.0, 0.0, 0.0, 0.0); @@ -1576,7 +1576,7 @@ pub fn vceqz_f16(a: float16x4_t) -> uint16x4_t { #[inline(always)] #[cfg_attr(test, assert_instr(fcmeq))] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vceqzq_f16(a: float16x8_t) -> uint16x8_t { let b: f16x8 = f16x8::new(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); @@ -7283,7 +7283,7 @@ pub fn vcvtq_f64_u64(a: uint64x2_t) -> float64x2_t { #[inline(always)] #[target_feature(enable = "neon")] #[cfg_attr(test, assert_instr(fcvtn2))] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vcvt_high_f16_f32(a: float16x4_t, b: float32x4_t) -> float16x8_t { vcombine_f16(a, vcvt_f16_f32(b)) @@ -7293,7 +7293,7 @@ pub fn vcvt_high_f16_f32(a: float16x4_t, b: float32x4_t) -> float16x8_t { #[inline(always)] #[target_feature(enable = "neon")] #[cfg_attr(test, assert_instr(fcvtl2))] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vcvt_high_f32_f16(a: float16x8_t) -> float32x4_t { vcvt_f32_f16(vget_high_f16(a)) @@ -7532,7 +7532,7 @@ pub fn vcvtq_u64_f64(a: float64x2_t) -> uint64x2_t { #[inline(always)] #[cfg_attr(test, assert_instr(fcvtas))] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vcvta_s16_f16(a: float16x4_t) -> int16x4_t { unsafe extern "unadjusted" { @@ -7549,7 +7549,7 @@ pub fn vcvta_s16_f16(a: float16x4_t) -> int16x4_t { #[inline(always)] #[cfg_attr(test, assert_instr(fcvtas))] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vcvtaq_s16_f16(a: float16x8_t) -> int16x8_t { unsafe extern "unadjusted" { @@ -7630,7 +7630,7 @@ pub fn vcvtaq_s64_f64(a: float64x2_t) -> int64x2_t { #[inline(always)] #[cfg_attr(test, assert_instr(fcvtau))] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vcvta_u16_f16(a: float16x4_t) -> uint16x4_t { unsafe extern "unadjusted" { @@ -7647,7 +7647,7 @@ pub fn vcvta_u16_f16(a: float16x4_t) -> uint16x4_t { #[inline(always)] #[cfg_attr(test, assert_instr(fcvtau))] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vcvtaq_u16_f16(a: float16x8_t) -> uint16x8_t { unsafe extern "unadjusted" { @@ -8218,7 +8218,7 @@ pub fn vcvth_u64_f16(a: f16) -> u64 { #[inline(always)] #[cfg_attr(test, assert_instr(fcvtms))] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vcvtm_s16_f16(a: float16x4_t) -> int16x4_t { unsafe extern "unadjusted" { @@ -8235,7 +8235,7 @@ pub fn vcvtm_s16_f16(a: float16x4_t) -> int16x4_t { #[inline(always)] #[cfg_attr(test, assert_instr(fcvtms))] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vcvtmq_s16_f16(a: float16x8_t) -> int16x8_t { unsafe extern "unadjusted" { @@ -8316,7 +8316,7 @@ pub fn vcvtmq_s64_f64(a: float64x2_t) -> int64x2_t { #[inline(always)] #[cfg_attr(test, assert_instr(fcvtmu))] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vcvtm_u16_f16(a: float16x4_t) -> uint16x4_t { unsafe extern "unadjusted" { @@ -8333,7 +8333,7 @@ pub fn vcvtm_u16_f16(a: float16x4_t) -> uint16x4_t { #[inline(always)] #[cfg_attr(test, assert_instr(fcvtmu))] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vcvtmq_u16_f16(a: float16x8_t) -> uint16x8_t { unsafe extern "unadjusted" { @@ -8566,7 +8566,7 @@ pub fn vcvtmd_u64_f64(a: f64) -> u64 { #[inline(always)] #[cfg_attr(test, assert_instr(fcvtns))] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vcvtn_s16_f16(a: float16x4_t) -> int16x4_t { unsafe extern "unadjusted" { @@ -8583,7 +8583,7 @@ pub fn vcvtn_s16_f16(a: float16x4_t) -> int16x4_t { #[inline(always)] #[cfg_attr(test, assert_instr(fcvtns))] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vcvtnq_s16_f16(a: float16x8_t) -> int16x8_t { unsafe extern "unadjusted" { @@ -8664,7 +8664,7 @@ pub fn vcvtnq_s64_f64(a: float64x2_t) -> int64x2_t { #[inline(always)] #[cfg_attr(test, assert_instr(fcvtnu))] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vcvtn_u16_f16(a: float16x4_t) -> uint16x4_t { unsafe extern "unadjusted" { @@ -8681,7 +8681,7 @@ pub fn vcvtn_u16_f16(a: float16x4_t) -> uint16x4_t { #[inline(always)] #[cfg_attr(test, assert_instr(fcvtnu))] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vcvtnq_u16_f16(a: float16x8_t) -> uint16x8_t { unsafe extern "unadjusted" { @@ -8914,7 +8914,7 @@ pub fn vcvtnd_u64_f64(a: f64) -> u64 { #[inline(always)] #[cfg_attr(test, assert_instr(fcvtps))] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vcvtp_s16_f16(a: float16x4_t) -> int16x4_t { unsafe extern "unadjusted" { @@ -8931,7 +8931,7 @@ pub fn vcvtp_s16_f16(a: float16x4_t) -> int16x4_t { #[inline(always)] #[cfg_attr(test, assert_instr(fcvtps))] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vcvtpq_s16_f16(a: float16x8_t) -> int16x8_t { unsafe extern "unadjusted" { @@ -9012,7 +9012,7 @@ pub fn vcvtpq_s64_f64(a: float64x2_t) -> int64x2_t { #[inline(always)] #[cfg_attr(test, assert_instr(fcvtpu))] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vcvtp_u16_f16(a: float16x4_t) -> uint16x4_t { unsafe extern "unadjusted" { @@ -9029,7 +9029,7 @@ pub fn vcvtp_u16_f16(a: float16x4_t) -> uint16x4_t { #[inline(always)] #[cfg_attr(test, assert_instr(fcvtpu))] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vcvtpq_u16_f16(a: float16x8_t) -> uint16x8_t { unsafe extern "unadjusted" { @@ -9493,7 +9493,7 @@ pub fn vcvtxd_f32_f64(a: f64) -> f32 { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vdiv_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(fdiv))] pub fn vdiv_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { @@ -9503,7 +9503,7 @@ pub fn vdiv_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vdivq_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(fdiv))] pub fn vdivq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { @@ -10108,7 +10108,7 @@ pub fn vfma_f64(a: float64x1_t, b: float64x1_t, c: float64x1_t) -> float64x1_t { #[cfg_attr(test, assert_instr(fmla, LANE = 0))] #[rustc_legacy_const_generics(3)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfma_lane_f16( a: float16x4_t, @@ -10124,7 +10124,7 @@ pub fn vfma_lane_f16( #[cfg_attr(test, assert_instr(fmla, LANE = 0))] #[rustc_legacy_const_generics(3)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfma_laneq_f16( a: float16x4_t, @@ -10140,7 +10140,7 @@ pub fn vfma_laneq_f16( #[cfg_attr(test, assert_instr(fmla, LANE = 0))] #[rustc_legacy_const_generics(3)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfmaq_lane_f16( a: float16x8_t, @@ -10156,7 +10156,7 @@ pub fn vfmaq_lane_f16( #[cfg_attr(test, assert_instr(fmla, LANE = 0))] #[rustc_legacy_const_generics(3)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfmaq_laneq_f16( a: float16x8_t, @@ -10434,7 +10434,7 @@ pub fn vfmad_laneq_f64(a: f64, b: f64, c: float64x2_t) -> f64 { #[inline(always)] #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(fmlal2))] pub fn vfmlal_high_f16(r: float32x2_t, a: float16x4_t, b: float16x4_t) -> float32x2_t { @@ -10452,7 +10452,7 @@ pub fn vfmlal_high_f16(r: float32x2_t, a: float16x4_t, b: float16x4_t) -> float3 #[inline(always)] #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(fmlal2))] pub fn vfmlalq_high_f16(r: float32x4_t, a: float16x8_t, b: float16x8_t) -> float32x4_t { @@ -10472,7 +10472,7 @@ pub fn vfmlalq_high_f16(r: float32x4_t, a: float16x8_t, b: float16x8_t) -> float #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfmlal_lane_high_f16( r: float32x2_t, @@ -10489,7 +10489,7 @@ pub fn vfmlal_lane_high_f16( #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfmlal_laneq_high_f16( r: float32x2_t, @@ -10506,7 +10506,7 @@ pub fn vfmlal_laneq_high_f16( #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfmlalq_lane_high_f16( r: float32x4_t, @@ -10523,7 +10523,7 @@ pub fn vfmlalq_lane_high_f16( #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfmlalq_laneq_high_f16( r: float32x4_t, @@ -10540,7 +10540,7 @@ pub fn vfmlalq_laneq_high_f16( #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfmlal_lane_low_f16( r: float32x2_t, @@ -10557,7 +10557,7 @@ pub fn vfmlal_lane_low_f16( #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfmlal_laneq_low_f16( r: float32x2_t, @@ -10574,7 +10574,7 @@ pub fn vfmlal_laneq_low_f16( #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfmlalq_lane_low_f16( r: float32x4_t, @@ -10591,7 +10591,7 @@ pub fn vfmlalq_lane_low_f16( #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfmlalq_laneq_low_f16( r: float32x4_t, @@ -10606,7 +10606,7 @@ pub fn vfmlalq_laneq_low_f16( #[inline(always)] #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(fmlal))] pub fn vfmlal_low_f16(r: float32x2_t, a: float16x4_t, b: float16x4_t) -> float32x2_t { @@ -10624,7 +10624,7 @@ pub fn vfmlal_low_f16(r: float32x2_t, a: float16x4_t, b: float16x4_t) -> float32 #[inline(always)] #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(fmlal))] pub fn vfmlalq_low_f16(r: float32x4_t, a: float16x8_t, b: float16x8_t) -> float32x4_t { @@ -10642,7 +10642,7 @@ pub fn vfmlalq_low_f16(r: float32x4_t, a: float16x8_t, b: float16x8_t) -> float3 #[inline(always)] #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(fmlsl2))] pub fn vfmlsl_high_f16(r: float32x2_t, a: float16x4_t, b: float16x4_t) -> float32x2_t { @@ -10660,7 +10660,7 @@ pub fn vfmlsl_high_f16(r: float32x2_t, a: float16x4_t, b: float16x4_t) -> float3 #[inline(always)] #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(fmlsl2))] pub fn vfmlslq_high_f16(r: float32x4_t, a: float16x8_t, b: float16x8_t) -> float32x4_t { @@ -10680,7 +10680,7 @@ pub fn vfmlslq_high_f16(r: float32x4_t, a: float16x8_t, b: float16x8_t) -> float #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfmlsl_lane_high_f16( r: float32x2_t, @@ -10697,7 +10697,7 @@ pub fn vfmlsl_lane_high_f16( #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfmlsl_laneq_high_f16( r: float32x2_t, @@ -10714,7 +10714,7 @@ pub fn vfmlsl_laneq_high_f16( #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfmlslq_lane_high_f16( r: float32x4_t, @@ -10731,7 +10731,7 @@ pub fn vfmlslq_lane_high_f16( #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfmlslq_laneq_high_f16( r: float32x4_t, @@ -10748,7 +10748,7 @@ pub fn vfmlslq_laneq_high_f16( #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfmlsl_lane_low_f16( r: float32x2_t, @@ -10765,7 +10765,7 @@ pub fn vfmlsl_lane_low_f16( #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfmlsl_laneq_low_f16( r: float32x2_t, @@ -10782,7 +10782,7 @@ pub fn vfmlsl_laneq_low_f16( #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfmlslq_lane_low_f16( r: float32x4_t, @@ -10799,7 +10799,7 @@ pub fn vfmlslq_lane_low_f16( #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfmlslq_laneq_low_f16( r: float32x4_t, @@ -10814,7 +10814,7 @@ pub fn vfmlslq_laneq_low_f16( #[inline(always)] #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(fmlsl))] pub fn vfmlsl_low_f16(r: float32x2_t, a: float16x4_t, b: float16x4_t) -> float32x2_t { @@ -10832,7 +10832,7 @@ pub fn vfmlsl_low_f16(r: float32x2_t, a: float16x4_t, b: float16x4_t) -> float32 #[inline(always)] #[target_feature(enable = "neon,fp16")] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(fmlsl))] pub fn vfmlslq_low_f16(r: float32x4_t, a: float16x8_t, b: float16x8_t) -> float32x4_t { @@ -10863,7 +10863,7 @@ pub fn vfms_f64(a: float64x1_t, b: float64x1_t, c: float64x1_t) -> float64x1_t { #[cfg_attr(test, assert_instr(fmls, LANE = 0))] #[rustc_legacy_const_generics(3)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfms_lane_f16( a: float16x4_t, @@ -10879,7 +10879,7 @@ pub fn vfms_lane_f16( #[cfg_attr(test, assert_instr(fmls, LANE = 0))] #[rustc_legacy_const_generics(3)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfms_laneq_f16( a: float16x4_t, @@ -10895,7 +10895,7 @@ pub fn vfms_laneq_f16( #[cfg_attr(test, assert_instr(fmls, LANE = 0))] #[rustc_legacy_const_generics(3)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfmsq_lane_f16( a: float16x8_t, @@ -10911,7 +10911,7 @@ pub fn vfmsq_lane_f16( #[cfg_attr(test, assert_instr(fmls, LANE = 0))] #[rustc_legacy_const_generics(3)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vfmsq_laneq_f16( a: float16x8_t, @@ -15078,7 +15078,7 @@ pub fn vmul_lane_f64(a: float64x1_t, b: float64x1_t) -> float64 #[cfg_attr(test, assert_instr(fmul, LANE = 0))] #[rustc_legacy_const_generics(2)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vmul_laneq_f16(a: float16x4_t, b: float16x8_t) -> float16x4_t { static_assert_uimm_bits!(LANE, 3); @@ -15095,7 +15095,7 @@ pub fn vmul_laneq_f16(a: float16x4_t, b: float16x8_t) -> float1 #[cfg_attr(test, assert_instr(fmul, LANE = 0))] #[rustc_legacy_const_generics(2)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vmulq_laneq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { static_assert_uimm_bits!(LANE, 3); @@ -15602,7 +15602,7 @@ pub fn vmuld_laneq_f64(a: f64, b: float64x2_t) -> f64 { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vmulx_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(fmulx))] pub fn vmulx_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { @@ -15619,7 +15619,7 @@ pub fn vmulx_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vmulxq_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(fmulx))] pub fn vmulxq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { @@ -15702,7 +15702,7 @@ pub fn vmulxq_f64(a: float64x2_t, b: float64x2_t) -> float64x2_t { #[cfg_attr(test, assert_instr(fmulx, LANE = 0))] #[rustc_legacy_const_generics(2)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vmulx_lane_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { static_assert_uimm_bits!(LANE, 2); @@ -15719,7 +15719,7 @@ pub fn vmulx_lane_f16(a: float16x4_t, b: float16x4_t) -> float1 #[cfg_attr(test, assert_instr(fmulx, LANE = 0))] #[rustc_legacy_const_generics(2)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vmulx_laneq_f16(a: float16x4_t, b: float16x8_t) -> float16x4_t { static_assert_uimm_bits!(LANE, 3); @@ -15736,7 +15736,7 @@ pub fn vmulx_laneq_f16(a: float16x4_t, b: float16x8_t) -> float #[cfg_attr(test, assert_instr(fmulx, LANE = 0))] #[rustc_legacy_const_generics(2)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vmulxq_lane_f16(a: float16x8_t, b: float16x4_t) -> float16x8_t { static_assert_uimm_bits!(LANE, 2); @@ -15766,7 +15766,7 @@ pub fn vmulxq_lane_f16(a: float16x8_t, b: float16x4_t) -> float #[cfg_attr(test, assert_instr(fmulx, LANE = 0))] #[rustc_legacy_const_generics(2)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vmulxq_laneq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { static_assert_uimm_bits!(LANE, 3); @@ -16128,7 +16128,7 @@ pub fn vpaddd_u64(a: uint64x2_t) -> u64 { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpaddq_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(faddp))] pub fn vpaddq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { @@ -16347,7 +16347,7 @@ pub fn vpaddq_u64(a: uint64x2_t, b: uint64x2_t) -> uint64x2_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpmax_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(fmaxp))] pub fn vpmax_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { @@ -16364,7 +16364,7 @@ pub fn vpmax_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpmaxq_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(fmaxp))] pub fn vpmaxq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { @@ -16381,7 +16381,7 @@ pub fn vpmaxq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpmaxnm_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(fmaxnmp))] pub fn vpmaxnm_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { @@ -16398,7 +16398,7 @@ pub fn vpmaxnm_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpmaxnmq_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(fmaxnmp))] pub fn vpmaxnmq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { @@ -16655,7 +16655,7 @@ pub fn vpmaxs_f32(a: float32x2_t) -> f32 { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpmin_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(fminp))] pub fn vpmin_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { @@ -16672,7 +16672,7 @@ pub fn vpmin_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpminq_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(fminp))] pub fn vpminq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { @@ -16689,7 +16689,7 @@ pub fn vpminq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpminnm_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(fminnmp))] pub fn vpminnm_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { @@ -16706,7 +16706,7 @@ pub fn vpminnm_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpminnmq_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(fminnmp))] pub fn vpminnmq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { @@ -21832,7 +21832,7 @@ pub fn vrecpxh_f16(a: f16) -> f16 { #[inline(always)] #[cfg(target_endian = "little")] #[target_feature(enable = "neon")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(nop))] pub fn vreinterpret_f64_f16(a: float16x4_t) -> float64x1_t { @@ -21843,7 +21843,7 @@ pub fn vreinterpret_f64_f16(a: float16x4_t) -> float64x1_t { #[inline(always)] #[cfg(target_endian = "big")] #[target_feature(enable = "neon")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(nop))] pub fn vreinterpret_f64_f16(a: float16x4_t) -> float64x1_t { @@ -21855,7 +21855,7 @@ pub fn vreinterpret_f64_f16(a: float16x4_t) -> float64x1_t { #[inline(always)] #[cfg(target_endian = "little")] #[target_feature(enable = "neon")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(nop))] pub fn vreinterpretq_f64_f16(a: float16x8_t) -> float64x2_t { @@ -21866,7 +21866,7 @@ pub fn vreinterpretq_f64_f16(a: float16x8_t) -> float64x2_t { #[inline(always)] #[cfg(target_endian = "big")] #[target_feature(enable = "neon")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(nop))] pub fn vreinterpretq_f64_f16(a: float16x8_t) -> float64x2_t { @@ -21881,7 +21881,7 @@ pub fn vreinterpretq_f64_f16(a: float16x8_t) -> float64x2_t { #[inline(always)] #[cfg(target_endian = "little")] #[target_feature(enable = "neon")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(nop))] pub fn vreinterpret_f16_f64(a: float64x1_t) -> float16x4_t { @@ -21892,7 +21892,7 @@ pub fn vreinterpret_f16_f64(a: float64x1_t) -> float16x4_t { #[inline(always)] #[cfg(target_endian = "big")] #[target_feature(enable = "neon")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(nop))] pub fn vreinterpret_f16_f64(a: float64x1_t) -> float16x4_t { @@ -21906,7 +21906,7 @@ pub fn vreinterpret_f16_f64(a: float64x1_t) -> float16x4_t { #[inline(always)] #[cfg(target_endian = "little")] #[target_feature(enable = "neon")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(nop))] pub fn vreinterpretq_f16_f64(a: float64x2_t) -> float16x8_t { @@ -21917,7 +21917,7 @@ pub fn vreinterpretq_f16_f64(a: float64x2_t) -> float16x8_t { #[inline(always)] #[cfg(target_endian = "big")] #[target_feature(enable = "neon")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(nop))] pub fn vreinterpretq_f16_f64(a: float64x2_t) -> float16x8_t { @@ -23496,7 +23496,7 @@ pub fn vrnd64z_f64(a: float64x1_t) -> float64x1_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrnd_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(frintz))] pub fn vrnd_f16(a: float16x4_t) -> float16x4_t { @@ -23506,7 +23506,7 @@ pub fn vrnd_f16(a: float16x4_t) -> float16x4_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndq_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(frintz))] pub fn vrndq_f16(a: float16x8_t) -> float16x8_t { @@ -23552,7 +23552,7 @@ pub fn vrndq_f64(a: float64x2_t) -> float64x2_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrnda_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(frinta))] pub fn vrnda_f16(a: float16x4_t) -> float16x4_t { @@ -23562,7 +23562,7 @@ pub fn vrnda_f16(a: float16x4_t) -> float16x4_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndaq_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(frinta))] pub fn vrndaq_f16(a: float16x8_t) -> float16x8_t { @@ -23628,7 +23628,7 @@ pub fn vrndh_f16(a: f16) -> f16 { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndi_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(frinti))] pub fn vrndi_f16(a: float16x4_t) -> float16x4_t { @@ -23645,7 +23645,7 @@ pub fn vrndi_f16(a: float16x4_t) -> float16x4_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndiq_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(frinti))] pub fn vrndiq_f16(a: float16x8_t) -> float16x8_t { @@ -23743,7 +23743,7 @@ pub fn vrndih_f16(a: f16) -> f16 { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndm_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(frintm))] pub fn vrndm_f16(a: float16x4_t) -> float16x4_t { @@ -23753,7 +23753,7 @@ pub fn vrndm_f16(a: float16x4_t) -> float16x4_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndmq_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(frintm))] pub fn vrndmq_f16(a: float16x8_t) -> float16x8_t { @@ -23874,7 +23874,7 @@ pub fn vrndns_f32(a: f32) -> f32 { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndp_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(frintp))] pub fn vrndp_f16(a: float16x4_t) -> float16x4_t { @@ -23884,7 +23884,7 @@ pub fn vrndp_f16(a: float16x4_t) -> float16x4_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndpq_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(frintp))] pub fn vrndpq_f16(a: float16x8_t) -> float16x8_t { @@ -23940,7 +23940,7 @@ pub fn vrndph_f16(a: f16) -> f16 { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndx_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(frintx))] pub fn vrndx_f16(a: float16x4_t) -> float16x4_t { @@ -23950,7 +23950,7 @@ pub fn vrndx_f16(a: float16x4_t) -> float16x4_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndxq_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(test, assert_instr(frintx))] pub fn vrndxq_f16(a: float16x8_t) -> float16x8_t { @@ -25453,7 +25453,7 @@ pub fn vsqadds_u32(a: u32, b: i32) -> u32 { #[inline(always)] #[cfg_attr(test, assert_instr(fsqrt))] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vsqrt_f16(a: float16x4_t) -> float16x4_t { unsafe { simd_fsqrt(a) } @@ -25463,7 +25463,7 @@ pub fn vsqrt_f16(a: float16x4_t) -> float16x4_t { #[inline(always)] #[cfg_attr(test, assert_instr(fsqrt))] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] pub fn vsqrtq_f16(a: float16x8_t) -> float16x8_t { unsafe { simd_fsqrt(a) } @@ -28016,7 +28016,7 @@ pub fn vtbx4_p8(a: poly8x8_t, b: poly8x8x4_t, c: uint8x8_t) -> poly8x8_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vtrn1_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(trn1))] pub fn vtrn1_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { @@ -28026,7 +28026,7 @@ pub fn vtrn1_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vtrn1q_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(trn1))] pub fn vtrn1q_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { @@ -28252,7 +28252,7 @@ pub fn vtrn1q_p16(a: poly16x8_t, b: poly16x8_t) -> poly16x8_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vtrn2_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(trn2))] pub fn vtrn2_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { @@ -28262,7 +28262,7 @@ pub fn vtrn2_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vtrn2q_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(trn2))] pub fn vtrn2q_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { @@ -28762,7 +28762,7 @@ pub fn vuqadds_s32(a: i32, b: u32) -> i32 { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vuzp1_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(uzp1))] pub fn vuzp1_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { @@ -28772,7 +28772,7 @@ pub fn vuzp1_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vuzp1q_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(uzp1))] pub fn vuzp1q_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { @@ -28998,7 +28998,7 @@ pub fn vuzp1q_p16(a: poly16x8_t, b: poly16x8_t) -> poly16x8_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vuzp2_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(uzp2))] pub fn vuzp2_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { @@ -29008,7 +29008,7 @@ pub fn vuzp2_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vuzp2q_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(uzp2))] pub fn vuzp2q_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { @@ -29252,7 +29252,7 @@ pub fn vxarq_u64(a: uint64x2_t, b: uint64x2_t) -> uint64x2_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vzip1_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(zip1))] pub fn vzip1_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { @@ -29262,7 +29262,7 @@ pub fn vzip1_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vzip1q_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(zip1))] pub fn vzip1q_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { @@ -29488,7 +29488,7 @@ pub fn vzip1q_p64(a: poly64x2_t, b: poly64x2_t) -> poly64x2_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vzip2_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(zip2))] pub fn vzip2_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { @@ -29498,7 +29498,7 @@ pub fn vzip2_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vzip2q_f16)"] #[inline(always)] #[target_feature(enable = "neon,fp16")] -#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] #[cfg(not(target_arch = "arm64ec"))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(zip2))] pub fn vzip2q_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { diff --git a/library/stdarch/crates/core_arch/src/arm_shared/neon/generated.rs b/library/stdarch/crates/core_arch/src/arm_shared/neon/generated.rs index 3b67208182cb..c2faf44681b1 100644 --- a/library/stdarch/crates/core_arch/src/arm_shared/neon/generated.rs +++ b/library/stdarch/crates/core_arch/src/arm_shared/neon/generated.rs @@ -821,7 +821,7 @@ pub fn vabaq_u8(a: uint8x16_t, b: uint8x16_t, c: uint8x16_t) -> uint8x16_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -851,7 +851,7 @@ pub fn vabd_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -1422,7 +1422,7 @@ pub fn vabdl_u32(a: uint32x2_t, b: uint32x2_t) -> uint64x2_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -1444,7 +1444,7 @@ pub fn vabs_f16(a: float16x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -1673,7 +1673,7 @@ pub fn vabsh_f16(a: f16) -> f16 { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -1695,7 +1695,7 @@ pub fn vadd_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -3879,7 +3879,7 @@ pub fn vbicq_u8(a: uint8x16_t, b: uint8x16_t) -> uint8x16_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -3907,7 +3907,7 @@ pub fn vbsl_f16(a: uint16x4_t, b: float16x4_t, c: float16x4_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -4529,7 +4529,7 @@ pub fn vbslq_u8(a: uint8x16_t, b: uint8x16_t, c: uint8x16_t) -> uint8x16_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -4559,7 +4559,7 @@ pub fn vcage_f16(a: float16x4_t, b: float16x4_t) -> uint16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -4647,7 +4647,7 @@ pub fn vcageq_f32(a: float32x4_t, b: float32x4_t) -> uint32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -4677,7 +4677,7 @@ pub fn vcagt_f16(a: float16x4_t, b: float16x4_t) -> uint16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -4765,7 +4765,7 @@ pub fn vcagtq_f32(a: float32x4_t, b: float32x4_t) -> uint32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -4787,7 +4787,7 @@ pub fn vcale_f16(a: float16x4_t, b: float16x4_t) -> uint16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -4851,7 +4851,7 @@ pub fn vcaleq_f32(a: float32x4_t, b: float32x4_t) -> uint32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -4873,7 +4873,7 @@ pub fn vcalt_f16(a: float16x4_t, b: float16x4_t) -> uint16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -4937,7 +4937,7 @@ pub fn vcaltq_f32(a: float32x4_t, b: float32x4_t) -> uint32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -4959,7 +4959,7 @@ pub fn vceq_f16(a: float16x4_t, b: float16x4_t) -> uint16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -5317,7 +5317,7 @@ pub fn vceqq_p8(a: poly8x16_t, b: poly8x16_t) -> uint8x16_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -5339,7 +5339,7 @@ pub fn vcge_f16(a: float16x4_t, b: float16x4_t) -> uint16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -5655,7 +5655,7 @@ pub fn vcgeq_u32(a: uint32x4_t, b: uint32x4_t) -> uint32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -5678,7 +5678,7 @@ pub fn vcgez_f16(a: float16x4_t) -> uint16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -5701,7 +5701,7 @@ pub fn vcgezq_f16(a: float16x8_t) -> uint16x8_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -5723,7 +5723,7 @@ pub fn vcgt_f16(a: float16x4_t, b: float16x4_t) -> uint16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -6039,7 +6039,7 @@ pub fn vcgtq_u32(a: uint32x4_t, b: uint32x4_t) -> uint32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -6062,7 +6062,7 @@ pub fn vcgtz_f16(a: float16x4_t) -> uint16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -6085,7 +6085,7 @@ pub fn vcgtzq_f16(a: float16x8_t) -> uint16x8_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -6107,7 +6107,7 @@ pub fn vcle_f16(a: float16x4_t, b: float16x4_t) -> uint16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -6423,7 +6423,7 @@ pub fn vcleq_u32(a: uint32x4_t, b: uint32x4_t) -> uint32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -6446,7 +6446,7 @@ pub fn vclez_f16(a: float16x4_t) -> uint16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -6769,7 +6769,7 @@ pub fn vclsq_u32(a: uint32x4_t) -> int32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -6791,7 +6791,7 @@ pub fn vclt_f16(a: float16x4_t, b: float16x4_t) -> uint16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -7107,7 +7107,7 @@ pub fn vcltq_u32(a: uint32x4_t, b: uint32x4_t) -> uint32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -7130,7 +7130,7 @@ pub fn vcltz_f16(a: float16x4_t) -> uint16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -7812,7 +7812,7 @@ pub fn vcntq_p8(a: poly8x16_t) -> poly8x16_t { #[cfg_attr(target_arch = "arm", target_feature(enable = "fp16"))] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -8041,7 +8041,7 @@ pub fn vcombine_p64(a: poly64x1_t, b: poly64x1_t) -> poly64x2_t { #[cfg_attr(target_arch = "arm", target_feature(enable = "fp16"))] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -8065,7 +8065,7 @@ pub fn vcreate_f16(a: u64) -> float16x4_t { #[cfg_attr(target_arch = "arm", target_feature(enable = "fp16"))] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -8577,7 +8577,7 @@ pub fn vcreate_p64(a: u64) -> poly64x1_t { #[cfg_attr(target_arch = "arm", target_feature(enable = "fp16"))] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -8599,7 +8599,7 @@ pub fn vcvt_f16_f32(a: float32x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -8621,7 +8621,7 @@ pub fn vcvt_f16_s16(a: int16x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -8643,7 +8643,7 @@ pub fn vcvtq_f16_s16(a: int16x8_t) -> float16x8_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -8665,7 +8665,7 @@ pub fn vcvt_f16_u16(a: uint16x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -8688,7 +8688,7 @@ pub fn vcvtq_f16_u16(a: uint16x8_t) -> float16x8_t { #[cfg_attr(target_arch = "arm", target_feature(enable = "fp16"))] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -8795,7 +8795,7 @@ pub fn vcvtq_f32_u32(a: uint32x4_t) -> float32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -8830,7 +8830,7 @@ pub fn vcvt_n_f16_s16(a: int16x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -8865,7 +8865,7 @@ pub fn vcvtq_n_f16_s16(a: int16x8_t) -> float16x8_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -8900,7 +8900,7 @@ pub fn vcvt_n_f16_u16(a: uint16x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -9087,7 +9087,7 @@ pub fn vcvtq_n_f32_u32(a: uint32x4_t) -> float32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -9122,7 +9122,7 @@ pub fn vcvt_n_s16_f16(a: float16x4_t) -> int16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -9233,7 +9233,7 @@ pub fn vcvtq_n_s32_f32(a: float32x4_t) -> int32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -9268,7 +9268,7 @@ pub fn vcvt_n_u16_f16(a: float16x4_t) -> uint16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -9378,7 +9378,7 @@ pub fn vcvtq_n_u32_f32(a: float32x4_t) -> uint32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -9400,7 +9400,7 @@ pub fn vcvt_s16_f16(a: float16x4_t) -> int16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -9480,7 +9480,7 @@ pub fn vcvtq_s32_f32(a: float32x4_t) -> int32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -9502,7 +9502,7 @@ pub fn vcvt_u16_f16(a: float16x4_t) -> uint16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -10140,7 +10140,7 @@ pub fn vdotq_u32(a: uint32x4_t, b: uint8x16_t, c: uint8x16_t) -> uint32x4_t { #[cfg_attr(target_arch = "arm", target_feature(enable = "fp16"))] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -10165,7 +10165,7 @@ pub fn vdup_lane_f16(a: float16x4_t) -> float16x4_t { #[cfg_attr(target_arch = "arm", target_feature(enable = "fp16"))] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -10719,7 +10719,7 @@ pub fn vdup_lane_u64(a: uint64x1_t) -> uint64x1_t { #[cfg_attr(target_arch = "arm", target_feature(enable = "fp16"))] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -10744,7 +10744,7 @@ pub fn vdup_laneq_f16(a: float16x8_t) -> float16x4_t { #[cfg_attr(target_arch = "arm", target_feature(enable = "fp16"))] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -12261,7 +12261,7 @@ pub fn veorq_u64(a: uint64x2_t, b: uint64x2_t) -> uint64x2_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -12640,7 +12640,7 @@ pub fn vextq_p16(a: poly16x8_t, b: poly16x8_t) -> poly16x8_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -13228,7 +13228,7 @@ pub fn vextq_p8(a: poly8x16_t, b: poly8x16_t) -> poly8x16_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -13250,7 +13250,7 @@ pub fn vfma_f16(a: float16x4_t, b: float16x4_t, c: float16x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -13357,7 +13357,7 @@ pub fn vfmaq_n_f32(a: float32x4_t, b: float32x4_t, c: f32) -> float32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -13383,7 +13383,7 @@ pub fn vfms_f16(a: float16x4_t, b: float16x4_t, c: float16x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -13494,7 +13494,7 @@ pub fn vfmsq_n_f32(a: float32x4_t, b: float32x4_t, c: f32) -> float32x4_t { #[cfg_attr(target_arch = "arm", target_feature(enable = "fp16"))] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -13513,7 +13513,7 @@ pub fn vget_high_f16(a: float16x8_t) -> float16x4_t { #[cfg_attr(target_arch = "arm", target_feature(enable = "fp16"))] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -28187,7 +28187,7 @@ pub unsafe fn vldrq_p128(a: *const p128) -> p128 { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -28217,7 +28217,7 @@ pub fn vmax_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -28593,7 +28593,7 @@ pub fn vmaxq_u32(a: uint32x4_t, b: uint32x4_t) -> uint32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -28615,7 +28615,7 @@ pub fn vmaxnm_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -28679,7 +28679,7 @@ pub fn vmaxnmq_f32(a: float32x4_t, b: float32x4_t) -> float32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -28709,7 +28709,7 @@ pub fn vmin_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -29085,7 +29085,7 @@ pub fn vminq_u32(a: uint32x4_t, b: uint32x4_t) -> uint32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -29107,7 +29107,7 @@ pub fn vminnm_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -33043,7 +33043,7 @@ pub fn vmovn_u64(a: uint64x2_t) -> uint32x2_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -33065,7 +33065,7 @@ pub fn vmul_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -33130,7 +33130,7 @@ pub fn vmulq_f32(a: float32x4_t, b: float32x4_t) -> float32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -33159,7 +33159,7 @@ pub fn vmul_lane_f16(a: float16x4_t, v: float16x4_t) -> float16 #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -35131,7 +35131,7 @@ pub fn vmvnq_u8(a: uint8x16_t) -> uint8x16_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -35153,7 +35153,7 @@ pub fn vneg_f16(a: float16x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -36391,7 +36391,7 @@ pub fn vpadalq_u32(a: uint64x2_t, b: uint32x4_t) -> uint64x2_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -42473,7 +42473,7 @@ pub fn vraddhn_u64(a: uint64x2_t, b: uint64x2_t) -> uint32x2_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -42503,7 +42503,7 @@ pub fn vrecpe_f16(a: float16x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -42649,7 +42649,7 @@ pub fn vrecpeq_u32(a: uint32x4_t) -> uint32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -42679,7 +42679,7 @@ pub fn vrecps_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -42768,7 +42768,7 @@ pub fn vrecpsq_f32(a: float32x4_t, b: float32x4_t) -> float32x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -42791,7 +42791,7 @@ pub fn vreinterpret_f32_f16(a: float16x4_t) -> float32x2_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -42818,7 +42818,7 @@ pub fn vreinterpret_f32_f16(a: float16x4_t) -> float32x2_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -42841,7 +42841,7 @@ pub fn vreinterpret_s8_f16(a: float16x4_t) -> int8x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -42868,7 +42868,7 @@ pub fn vreinterpret_s8_f16(a: float16x4_t) -> int8x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -42891,7 +42891,7 @@ pub fn vreinterpret_s16_f16(a: float16x4_t) -> int16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -42918,7 +42918,7 @@ pub fn vreinterpret_s16_f16(a: float16x4_t) -> int16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -42941,7 +42941,7 @@ pub fn vreinterpret_s32_f16(a: float16x4_t) -> int32x2_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -42968,7 +42968,7 @@ pub fn vreinterpret_s32_f16(a: float16x4_t) -> int32x2_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -42991,7 +42991,7 @@ pub fn vreinterpret_s64_f16(a: float16x4_t) -> int64x1_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43015,7 +43015,7 @@ pub fn vreinterpret_s64_f16(a: float16x4_t) -> int64x1_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43038,7 +43038,7 @@ pub fn vreinterpret_u8_f16(a: float16x4_t) -> uint8x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43065,7 +43065,7 @@ pub fn vreinterpret_u8_f16(a: float16x4_t) -> uint8x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43088,7 +43088,7 @@ pub fn vreinterpret_u16_f16(a: float16x4_t) -> uint16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43115,7 +43115,7 @@ pub fn vreinterpret_u16_f16(a: float16x4_t) -> uint16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43138,7 +43138,7 @@ pub fn vreinterpret_u32_f16(a: float16x4_t) -> uint32x2_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43165,7 +43165,7 @@ pub fn vreinterpret_u32_f16(a: float16x4_t) -> uint32x2_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43188,7 +43188,7 @@ pub fn vreinterpret_u64_f16(a: float16x4_t) -> uint64x1_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43212,7 +43212,7 @@ pub fn vreinterpret_u64_f16(a: float16x4_t) -> uint64x1_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43235,7 +43235,7 @@ pub fn vreinterpret_p8_f16(a: float16x4_t) -> poly8x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43262,7 +43262,7 @@ pub fn vreinterpret_p8_f16(a: float16x4_t) -> poly8x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43285,7 +43285,7 @@ pub fn vreinterpret_p16_f16(a: float16x4_t) -> poly16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43312,7 +43312,7 @@ pub fn vreinterpret_p16_f16(a: float16x4_t) -> poly16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43335,7 +43335,7 @@ pub fn vreinterpretq_f32_f16(a: float16x8_t) -> float32x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43362,7 +43362,7 @@ pub fn vreinterpretq_f32_f16(a: float16x8_t) -> float32x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43385,7 +43385,7 @@ pub fn vreinterpretq_s8_f16(a: float16x8_t) -> int8x16_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43416,7 +43416,7 @@ pub fn vreinterpretq_s8_f16(a: float16x8_t) -> int8x16_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43439,7 +43439,7 @@ pub fn vreinterpretq_s16_f16(a: float16x8_t) -> int16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43466,7 +43466,7 @@ pub fn vreinterpretq_s16_f16(a: float16x8_t) -> int16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43489,7 +43489,7 @@ pub fn vreinterpretq_s32_f16(a: float16x8_t) -> int32x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43516,7 +43516,7 @@ pub fn vreinterpretq_s32_f16(a: float16x8_t) -> int32x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43539,7 +43539,7 @@ pub fn vreinterpretq_s64_f16(a: float16x8_t) -> int64x2_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43566,7 +43566,7 @@ pub fn vreinterpretq_s64_f16(a: float16x8_t) -> int64x2_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43589,7 +43589,7 @@ pub fn vreinterpretq_u8_f16(a: float16x8_t) -> uint8x16_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43620,7 +43620,7 @@ pub fn vreinterpretq_u8_f16(a: float16x8_t) -> uint8x16_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43643,7 +43643,7 @@ pub fn vreinterpretq_u16_f16(a: float16x8_t) -> uint16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43670,7 +43670,7 @@ pub fn vreinterpretq_u16_f16(a: float16x8_t) -> uint16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43693,7 +43693,7 @@ pub fn vreinterpretq_u32_f16(a: float16x8_t) -> uint32x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43720,7 +43720,7 @@ pub fn vreinterpretq_u32_f16(a: float16x8_t) -> uint32x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43743,7 +43743,7 @@ pub fn vreinterpretq_u64_f16(a: float16x8_t) -> uint64x2_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43770,7 +43770,7 @@ pub fn vreinterpretq_u64_f16(a: float16x8_t) -> uint64x2_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43793,7 +43793,7 @@ pub fn vreinterpretq_p8_f16(a: float16x8_t) -> poly8x16_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43824,7 +43824,7 @@ pub fn vreinterpretq_p8_f16(a: float16x8_t) -> poly8x16_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43847,7 +43847,7 @@ pub fn vreinterpretq_p16_f16(a: float16x8_t) -> poly16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43874,7 +43874,7 @@ pub fn vreinterpretq_p16_f16(a: float16x8_t) -> poly16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43897,7 +43897,7 @@ pub fn vreinterpret_f16_f32(a: float32x2_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43924,7 +43924,7 @@ pub fn vreinterpret_f16_f32(a: float32x2_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43947,7 +43947,7 @@ pub fn vreinterpretq_f16_f32(a: float32x4_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43974,7 +43974,7 @@ pub fn vreinterpretq_f16_f32(a: float32x4_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -43997,7 +43997,7 @@ pub fn vreinterpret_f16_s8(a: int8x8_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44024,7 +44024,7 @@ pub fn vreinterpret_f16_s8(a: int8x8_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44047,7 +44047,7 @@ pub fn vreinterpretq_f16_s8(a: int8x16_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44075,7 +44075,7 @@ pub fn vreinterpretq_f16_s8(a: int8x16_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44098,7 +44098,7 @@ pub fn vreinterpret_f16_s16(a: int16x4_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44125,7 +44125,7 @@ pub fn vreinterpret_f16_s16(a: int16x4_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44148,7 +44148,7 @@ pub fn vreinterpretq_f16_s16(a: int16x8_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44175,7 +44175,7 @@ pub fn vreinterpretq_f16_s16(a: int16x8_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44198,7 +44198,7 @@ pub fn vreinterpret_f16_s32(a: int32x2_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44225,7 +44225,7 @@ pub fn vreinterpret_f16_s32(a: int32x2_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44248,7 +44248,7 @@ pub fn vreinterpretq_f16_s32(a: int32x4_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44275,7 +44275,7 @@ pub fn vreinterpretq_f16_s32(a: int32x4_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44298,7 +44298,7 @@ pub fn vreinterpret_f16_s64(a: int64x1_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44324,7 +44324,7 @@ pub fn vreinterpret_f16_s64(a: int64x1_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44347,7 +44347,7 @@ pub fn vreinterpretq_f16_s64(a: int64x2_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44374,7 +44374,7 @@ pub fn vreinterpretq_f16_s64(a: int64x2_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44397,7 +44397,7 @@ pub fn vreinterpret_f16_u8(a: uint8x8_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44424,7 +44424,7 @@ pub fn vreinterpret_f16_u8(a: uint8x8_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44447,7 +44447,7 @@ pub fn vreinterpretq_f16_u8(a: uint8x16_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44475,7 +44475,7 @@ pub fn vreinterpretq_f16_u8(a: uint8x16_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44498,7 +44498,7 @@ pub fn vreinterpret_f16_u16(a: uint16x4_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44525,7 +44525,7 @@ pub fn vreinterpret_f16_u16(a: uint16x4_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44548,7 +44548,7 @@ pub fn vreinterpretq_f16_u16(a: uint16x8_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44575,7 +44575,7 @@ pub fn vreinterpretq_f16_u16(a: uint16x8_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44598,7 +44598,7 @@ pub fn vreinterpret_f16_u32(a: uint32x2_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44625,7 +44625,7 @@ pub fn vreinterpret_f16_u32(a: uint32x2_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44648,7 +44648,7 @@ pub fn vreinterpretq_f16_u32(a: uint32x4_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44675,7 +44675,7 @@ pub fn vreinterpretq_f16_u32(a: uint32x4_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44698,7 +44698,7 @@ pub fn vreinterpret_f16_u64(a: uint64x1_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44724,7 +44724,7 @@ pub fn vreinterpret_f16_u64(a: uint64x1_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44747,7 +44747,7 @@ pub fn vreinterpretq_f16_u64(a: uint64x2_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44774,7 +44774,7 @@ pub fn vreinterpretq_f16_u64(a: uint64x2_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44797,7 +44797,7 @@ pub fn vreinterpret_f16_p8(a: poly8x8_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44824,7 +44824,7 @@ pub fn vreinterpret_f16_p8(a: poly8x8_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44847,7 +44847,7 @@ pub fn vreinterpretq_f16_p8(a: poly8x16_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44875,7 +44875,7 @@ pub fn vreinterpretq_f16_p8(a: poly8x16_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44898,7 +44898,7 @@ pub fn vreinterpret_f16_p16(a: poly16x4_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44925,7 +44925,7 @@ pub fn vreinterpret_f16_p16(a: poly16x4_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44948,7 +44948,7 @@ pub fn vreinterpretq_f16_p16(a: poly16x8_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44975,7 +44975,7 @@ pub fn vreinterpretq_f16_p16(a: poly16x8_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -44998,7 +44998,7 @@ pub fn vreinterpretq_f16_p128(a: p128) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -45024,7 +45024,7 @@ pub fn vreinterpretq_f16_p128(a: p128) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -45047,7 +45047,7 @@ pub fn vreinterpret_p64_f16(a: float16x4_t) -> poly64x1_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -45071,7 +45071,7 @@ pub fn vreinterpret_p64_f16(a: float16x4_t) -> poly64x1_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -45094,7 +45094,7 @@ pub fn vreinterpretq_p128_f16(a: float16x8_t) -> p128 { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -45118,7 +45118,7 @@ pub fn vreinterpretq_p128_f16(a: float16x8_t) -> p128 { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -45141,7 +45141,7 @@ pub fn vreinterpretq_p64_f16(a: float16x8_t) -> poly64x2_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -45168,7 +45168,7 @@ pub fn vreinterpretq_p64_f16(a: float16x8_t) -> poly64x2_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -45191,7 +45191,7 @@ pub fn vreinterpret_f16_p64(a: poly64x1_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -45217,7 +45217,7 @@ pub fn vreinterpret_f16_p64(a: poly64x1_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -45240,7 +45240,7 @@ pub fn vreinterpretq_f16_p64(a: poly64x2_t) -> float16x8_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -59244,7 +59244,7 @@ pub fn vrev64q_u8(a: uint8x16_t) -> uint8x16_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -59266,7 +59266,7 @@ pub fn vrev64_f16(a: float16x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -59636,7 +59636,7 @@ pub fn vrhaddq_u32(a: uint32x4_t, b: uint32x4_t) -> uint32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -59665,7 +59665,7 @@ pub fn vrndn_f16(a: float16x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -60756,7 +60756,7 @@ pub fn vrshrn_n_u64(a: uint64x2_t) -> uint32x2_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -60786,7 +60786,7 @@ pub fn vrsqrte_f16(a: float16x4_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -60932,7 +60932,7 @@ pub fn vrsqrteq_u32(a: uint32x4_t) -> uint32x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -60962,7 +60962,7 @@ pub fn vrsqrts_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { )] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -72516,7 +72516,7 @@ pub unsafe fn vstrq_p128(a: *mut p128, b: p128) { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -72538,7 +72538,7 @@ pub fn vsub_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -74519,7 +74519,7 @@ pub fn vtbx4_p8(a: poly8x8_t, b: poly8x8x4_t, c: uint8x8_t) -> poly8x8_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -74549,7 +74549,7 @@ pub fn vtrn_f16(a: float16x4_t, b: float16x4_t) -> float16x4x2_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -75832,7 +75832,7 @@ pub fn vusmmlaq_s32(a: int32x4_t, b: uint8x16_t, c: int8x16_t) -> int32x4_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -75862,7 +75862,7 @@ pub fn vuzp_f16(a: float16x4_t, b: float16x4_t) -> float16x4x2_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -76438,7 +76438,7 @@ pub fn vuzpq_p16(a: poly16x8_t, b: poly16x8_t) -> poly16x8x2_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -76468,7 +76468,7 @@ pub fn vzip_f16(a: float16x4_t, b: float16x4_t) -> float16x4x2_t { #[target_feature(enable = "neon,fp16")] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", diff --git a/library/stdarch/crates/core_arch/src/arm_shared/neon/mod.rs b/library/stdarch/crates/core_arch/src/arm_shared/neon/mod.rs index 1ca8ce2b1395..8a4a6e922822 100644 --- a/library/stdarch/crates/core_arch/src/arm_shared/neon/mod.rs +++ b/library/stdarch/crates/core_arch/src/arm_shared/neon/mod.rs @@ -104,7 +104,7 @@ types! { } types! { - #![cfg_attr(not(target_arch = "arm"), stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION"))] + #![cfg_attr(not(target_arch = "arm"), stable(feature = "stdarch_neon_fp16", since = "1.94.0"))] #![cfg_attr(target_arch = "arm", unstable(feature = "stdarch_arm_neon_intrinsics", issue = "111800"))] /// Arm-specific 64-bit wide vector of four packed `f16`. @@ -750,7 +750,7 @@ pub struct uint32x4x4_t( #[derive(Copy, Clone, Debug)] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -763,7 +763,7 @@ pub struct float16x4x2_t(pub float16x4_t, pub float16x4_t); #[derive(Copy, Clone, Debug)] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -776,7 +776,7 @@ pub struct float16x4x3_t(pub float16x4_t, pub float16x4_t, pub float16x4_t); #[derive(Copy, Clone, Debug)] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -794,7 +794,7 @@ pub struct float16x4x4_t( #[derive(Copy, Clone, Debug)] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -807,7 +807,7 @@ pub struct float16x8x2_t(pub float16x8_t, pub float16x8_t); #[derive(Copy, Clone, Debug)] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", @@ -820,7 +820,7 @@ pub struct float16x8x3_t(pub float16x8_t, pub float16x8_t, pub float16x8_t); #[derive(Copy, Clone, Debug)] #[cfg_attr( not(target_arch = "arm"), - stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") + stable(feature = "stdarch_neon_fp16", since = "1.94.0") )] #[cfg_attr( target_arch = "arm", diff --git a/library/stdarch/crates/core_arch/src/x86/avx512fp16.rs b/library/stdarch/crates/core_arch/src/x86/avx512fp16.rs index 27f06691c550..8ddc3d29a3a1 100644 --- a/library/stdarch/crates/core_arch/src/x86/avx512fp16.rs +++ b/library/stdarch/crates/core_arch/src/x86/avx512fp16.rs @@ -247,7 +247,7 @@ pub const fn _mm512_setr_ph( /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_setzero_ph) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_setzero_ph() -> __m128h { unsafe { transmute(f16x8::ZERO) } @@ -258,7 +258,7 @@ pub const fn _mm_setzero_ph() -> __m128h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_setzero_ph) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_setzero_ph() -> __m256h { f16x16::ZERO.as_m256h() @@ -269,7 +269,7 @@ pub const fn _mm256_setzero_ph() -> __m256h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_setzero_ph) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_setzero_ph() -> __m512h { f16x32::ZERO.as_m512h() @@ -283,7 +283,7 @@ pub const fn _mm512_setzero_ph() -> __m512h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_undefined_ph) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_undefined_ph() -> __m128h { f16x8::ZERO.as_m128h() @@ -297,7 +297,7 @@ pub const fn _mm_undefined_ph() -> __m128h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_undefined_ph) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_undefined_ph() -> __m256h { f16x16::ZERO.as_m256h() @@ -311,7 +311,7 @@ pub const fn _mm256_undefined_ph() -> __m256h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_undefined_ph) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_undefined_ph() -> __m512h { f16x32::ZERO.as_m512h() @@ -323,7 +323,7 @@ pub const fn _mm512_undefined_ph() -> __m512h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_castpd_ph) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_castpd_ph(a: __m128d) -> __m128h { unsafe { transmute(a) } @@ -335,7 +335,7 @@ pub const fn _mm_castpd_ph(a: __m128d) -> __m128h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_castpd_ph) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_castpd_ph(a: __m256d) -> __m256h { unsafe { transmute(a) } @@ -347,7 +347,7 @@ pub const fn _mm256_castpd_ph(a: __m256d) -> __m256h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_castpd_ph) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_castpd_ph(a: __m512d) -> __m512h { unsafe { transmute(a) } @@ -359,7 +359,7 @@ pub const fn _mm512_castpd_ph(a: __m512d) -> __m512h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_castph_pd) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_castph_pd(a: __m128h) -> __m128d { unsafe { transmute(a) } @@ -371,7 +371,7 @@ pub const fn _mm_castph_pd(a: __m128h) -> __m128d { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_castph_pd) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_castph_pd(a: __m256h) -> __m256d { unsafe { transmute(a) } @@ -383,7 +383,7 @@ pub const fn _mm256_castph_pd(a: __m256h) -> __m256d { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_castph_pd) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_castph_pd(a: __m512h) -> __m512d { unsafe { transmute(a) } @@ -395,7 +395,7 @@ pub const fn _mm512_castph_pd(a: __m512h) -> __m512d { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_castps_ph) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_castps_ph(a: __m128) -> __m128h { unsafe { transmute(a) } @@ -407,7 +407,7 @@ pub const fn _mm_castps_ph(a: __m128) -> __m128h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_castps_ph) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_castps_ph(a: __m256) -> __m256h { unsafe { transmute(a) } @@ -419,7 +419,7 @@ pub const fn _mm256_castps_ph(a: __m256) -> __m256h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_castps_ph) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_castps_ph(a: __m512) -> __m512h { unsafe { transmute(a) } @@ -431,7 +431,7 @@ pub const fn _mm512_castps_ph(a: __m512) -> __m512h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_castph_ps) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_castph_ps(a: __m128h) -> __m128 { unsafe { transmute(a) } @@ -443,7 +443,7 @@ pub const fn _mm_castph_ps(a: __m128h) -> __m128 { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_castph_ps) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_castph_ps(a: __m256h) -> __m256 { unsafe { transmute(a) } @@ -455,7 +455,7 @@ pub const fn _mm256_castph_ps(a: __m256h) -> __m256 { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_castph_ps) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_castph_ps(a: __m512h) -> __m512 { unsafe { transmute(a) } @@ -467,7 +467,7 @@ pub const fn _mm512_castph_ps(a: __m512h) -> __m512 { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_castsi128_ph) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_castsi128_ph(a: __m128i) -> __m128h { unsafe { transmute(a) } @@ -479,7 +479,7 @@ pub const fn _mm_castsi128_ph(a: __m128i) -> __m128h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_castsi256_ph) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_castsi256_ph(a: __m256i) -> __m256h { unsafe { transmute(a) } @@ -491,7 +491,7 @@ pub const fn _mm256_castsi256_ph(a: __m256i) -> __m256h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_castsi512_ph) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_castsi512_ph(a: __m512i) -> __m512h { unsafe { transmute(a) } @@ -503,7 +503,7 @@ pub const fn _mm512_castsi512_ph(a: __m512i) -> __m512h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_castph_si128) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_castph_si128(a: __m128h) -> __m128i { unsafe { transmute(a) } @@ -515,7 +515,7 @@ pub const fn _mm_castph_si128(a: __m128h) -> __m128i { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_castph_si256) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_castph_si256(a: __m256h) -> __m256i { unsafe { transmute(a) } @@ -527,7 +527,7 @@ pub const fn _mm256_castph_si256(a: __m256h) -> __m256i { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_castph_si512) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_castph_si512(a: __m512h) -> __m512i { unsafe { transmute(a) } @@ -539,7 +539,7 @@ pub const fn _mm512_castph_si512(a: __m512h) -> __m512i { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_castph256_ph128) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_castph256_ph128(a: __m256h) -> __m128h { unsafe { simd_shuffle!(a, a, [0, 1, 2, 3, 4, 5, 6, 7]) } @@ -551,7 +551,7 @@ pub const fn _mm256_castph256_ph128(a: __m256h) -> __m128h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_castph512_ph128) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_castph512_ph128(a: __m512h) -> __m128h { unsafe { simd_shuffle!(a, a, [0, 1, 2, 3, 4, 5, 6, 7]) } @@ -563,7 +563,7 @@ pub const fn _mm512_castph512_ph128(a: __m512h) -> __m128h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_castph512_ph256) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_castph512_ph256(a: __m512h) -> __m256h { unsafe { simd_shuffle!(a, a, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) } @@ -576,7 +576,7 @@ pub const fn _mm512_castph512_ph256(a: __m512h) -> __m256h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_castph128_ph256) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_castph128_ph256(a: __m128h) -> __m256h { unsafe { @@ -595,7 +595,7 @@ pub const fn _mm256_castph128_ph256(a: __m128h) -> __m256h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_castph128_ph512) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_castph128_ph512(a: __m128h) -> __m512h { unsafe { @@ -617,7 +617,7 @@ pub const fn _mm512_castph128_ph512(a: __m128h) -> __m512h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_castph256_ph512) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_castph256_ph512(a: __m256h) -> __m512h { unsafe { @@ -639,7 +639,7 @@ pub const fn _mm512_castph256_ph512(a: __m256h) -> __m512h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_zextph128_ph256) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_zextph128_ph256(a: __m128h) -> __m256h { unsafe { @@ -658,7 +658,7 @@ pub const fn _mm256_zextph128_ph256(a: __m128h) -> __m256h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_zextph256_ph512) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_zextph256_ph512(a: __m256h) -> __m512h { unsafe { @@ -680,7 +680,7 @@ pub const fn _mm512_zextph256_ph512(a: __m256h) -> __m512h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_zextph128_ph512) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_zextph128_ph512(a: __m128h) -> __m512h { unsafe { @@ -730,7 +730,7 @@ macro_rules! cmp_asm { // FIXME: use LLVM intrinsics #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cmp_ph_mask(a: __m128h, b: __m128h) -> __mmask8 { unsafe { static_assert_uimm_bits!(IMM5, 5); @@ -746,7 +746,7 @@ pub fn _mm_cmp_ph_mask(a: __m128h, b: __m128h) -> __mmask8 { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cmp_ph_mask(k1: __mmask8, a: __m128h, b: __m128h) -> __mmask8 { unsafe { static_assert_uimm_bits!(IMM5, 5); @@ -761,7 +761,7 @@ pub fn _mm_mask_cmp_ph_mask(k1: __mmask8, a: __m128h, b: __m128 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cmp_ph_mask(a: __m256h, b: __m256h) -> __mmask16 { unsafe { static_assert_uimm_bits!(IMM5, 5); @@ -777,7 +777,7 @@ pub fn _mm256_cmp_ph_mask(a: __m256h, b: __m256h) -> __mmask16 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cmp_ph_mask( k1: __mmask16, a: __m256h, @@ -796,7 +796,7 @@ pub fn _mm256_mask_cmp_ph_mask( #[inline] #[target_feature(enable = "avx512fp16")] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cmp_ph_mask(a: __m512h, b: __m512h) -> __mmask32 { unsafe { static_assert_uimm_bits!(IMM5, 5); @@ -812,7 +812,7 @@ pub fn _mm512_cmp_ph_mask(a: __m512h, b: __m512h) -> __mmask32 #[inline] #[target_feature(enable = "avx512fp16")] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cmp_ph_mask( k1: __mmask32, a: __m512h, @@ -833,7 +833,7 @@ pub fn _mm512_mask_cmp_ph_mask( #[inline] #[target_feature(enable = "avx512fp16")] #[rustc_legacy_const_generics(2, 3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cmp_round_ph_mask( a: __m512h, b: __m512h, @@ -868,7 +868,7 @@ pub fn _mm512_cmp_round_ph_mask( #[inline] #[target_feature(enable = "avx512fp16")] #[rustc_legacy_const_generics(3, 4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cmp_round_ph_mask( k1: __mmask32, a: __m512h, @@ -903,7 +903,7 @@ pub fn _mm512_mask_cmp_round_ph_mask( #[inline] #[target_feature(enable = "avx512fp16")] #[rustc_legacy_const_generics(2, 3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cmp_round_sh_mask(a: __m128h, b: __m128h) -> __mmask8 { static_assert_uimm_bits!(IMM5, 5); static_assert_sae!(SAE); @@ -918,7 +918,7 @@ pub fn _mm_cmp_round_sh_mask(a: __m128h, b: __m #[inline] #[target_feature(enable = "avx512fp16")] #[rustc_legacy_const_generics(3, 4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cmp_round_sh_mask( k1: __mmask8, a: __m128h, @@ -938,7 +938,7 @@ pub fn _mm_mask_cmp_round_sh_mask( #[inline] #[target_feature(enable = "avx512fp16")] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cmp_sh_mask(a: __m128h, b: __m128h) -> __mmask8 { static_assert_uimm_bits!(IMM5, 5); _mm_cmp_round_sh_mask::(a, b) @@ -951,7 +951,7 @@ pub fn _mm_cmp_sh_mask(a: __m128h, b: __m128h) -> __mmask8 { #[inline] #[target_feature(enable = "avx512fp16")] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cmp_sh_mask(k1: __mmask8, a: __m128h, b: __m128h) -> __mmask8 { static_assert_uimm_bits!(IMM5, 5); _mm_mask_cmp_round_sh_mask::(k1, a, b) @@ -965,7 +965,7 @@ pub fn _mm_mask_cmp_sh_mask(k1: __mmask8, a: __m128h, b: __m128 #[inline] #[target_feature(enable = "avx512fp16")] #[rustc_legacy_const_generics(2, 3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_comi_round_sh(a: __m128h, b: __m128h) -> i32 { unsafe { static_assert_uimm_bits!(IMM5, 5); @@ -981,7 +981,7 @@ pub fn _mm_comi_round_sh(a: __m128h, b: __m128h #[inline] #[target_feature(enable = "avx512fp16")] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_comi_sh(a: __m128h, b: __m128h) -> i32 { static_assert_uimm_bits!(IMM5, 5); _mm_comi_round_sh::(a, b) @@ -993,7 +993,7 @@ pub fn _mm_comi_sh(a: __m128h, b: __m128h) -> i32 { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_comieq_sh) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_comieq_sh(a: __m128h, b: __m128h) -> i32 { _mm_comi_sh::<_CMP_EQ_OS>(a, b) } @@ -1004,7 +1004,7 @@ pub fn _mm_comieq_sh(a: __m128h, b: __m128h) -> i32 { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_comige_sh) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_comige_sh(a: __m128h, b: __m128h) -> i32 { _mm_comi_sh::<_CMP_GE_OS>(a, b) } @@ -1015,7 +1015,7 @@ pub fn _mm_comige_sh(a: __m128h, b: __m128h) -> i32 { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_comigt_sh) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_comigt_sh(a: __m128h, b: __m128h) -> i32 { _mm_comi_sh::<_CMP_GT_OS>(a, b) } @@ -1026,7 +1026,7 @@ pub fn _mm_comigt_sh(a: __m128h, b: __m128h) -> i32 { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_comile_sh) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_comile_sh(a: __m128h, b: __m128h) -> i32 { _mm_comi_sh::<_CMP_LE_OS>(a, b) } @@ -1037,7 +1037,7 @@ pub fn _mm_comile_sh(a: __m128h, b: __m128h) -> i32 { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_comilt_sh) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_comilt_sh(a: __m128h, b: __m128h) -> i32 { _mm_comi_sh::<_CMP_LT_OS>(a, b) } @@ -1048,7 +1048,7 @@ pub fn _mm_comilt_sh(a: __m128h, b: __m128h) -> i32 { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_comineq_sh) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_comineq_sh(a: __m128h, b: __m128h) -> i32 { _mm_comi_sh::<_CMP_NEQ_US>(a, b) } @@ -1059,7 +1059,7 @@ pub fn _mm_comineq_sh(a: __m128h, b: __m128h) -> i32 { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_ucomieq_sh) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_ucomieq_sh(a: __m128h, b: __m128h) -> i32 { _mm_comi_sh::<_CMP_EQ_OQ>(a, b) } @@ -1070,7 +1070,7 @@ pub fn _mm_ucomieq_sh(a: __m128h, b: __m128h) -> i32 { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_ucomige_sh) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_ucomige_sh(a: __m128h, b: __m128h) -> i32 { _mm_comi_sh::<_CMP_GE_OQ>(a, b) } @@ -1081,7 +1081,7 @@ pub fn _mm_ucomige_sh(a: __m128h, b: __m128h) -> i32 { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_ucomigt_sh) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_ucomigt_sh(a: __m128h, b: __m128h) -> i32 { _mm_comi_sh::<_CMP_GT_OQ>(a, b) } @@ -1092,7 +1092,7 @@ pub fn _mm_ucomigt_sh(a: __m128h, b: __m128h) -> i32 { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_ucomile_sh) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_ucomile_sh(a: __m128h, b: __m128h) -> i32 { _mm_comi_sh::<_CMP_LE_OQ>(a, b) } @@ -1103,7 +1103,7 @@ pub fn _mm_ucomile_sh(a: __m128h, b: __m128h) -> i32 { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_ucomilt_sh) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_ucomilt_sh(a: __m128h, b: __m128h) -> i32 { _mm_comi_sh::<_CMP_LT_OQ>(a, b) } @@ -1114,7 +1114,7 @@ pub fn _mm_ucomilt_sh(a: __m128h, b: __m128h) -> i32 { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_ucomineq_sh) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_ucomineq_sh(a: __m128h, b: __m128h) -> i32 { _mm_comi_sh::<_CMP_NEQ_UQ>(a, b) } @@ -1248,7 +1248,7 @@ pub const unsafe fn _mm512_loadu_ph(mem_addr: *const f16) -> __m512h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_mask_move_sh) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_move_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { @@ -1267,7 +1267,7 @@ pub const fn _mm_mask_move_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_maskz_move_sh) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_maskz_move_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { @@ -1285,7 +1285,7 @@ pub const fn _mm_maskz_move_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_move_sh) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_move_sh(a: __m128h, b: __m128h) -> __m128h { unsafe { @@ -1399,7 +1399,7 @@ pub const unsafe fn _mm512_storeu_ph(mem_addr: *mut f16, a: __m512h) { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vaddph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_add_ph(a: __m128h, b: __m128h) -> __m128h { unsafe { simd_add(a, b) } @@ -1412,7 +1412,7 @@ pub const fn _mm_add_ph(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vaddph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_add_ph(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { @@ -1428,7 +1428,7 @@ pub const fn _mm_mask_add_ph(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vaddph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_maskz_add_ph(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { @@ -1443,7 +1443,7 @@ pub const fn _mm_maskz_add_ph(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vaddph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_add_ph(a: __m256h, b: __m256h) -> __m256h { unsafe { simd_add(a, b) } @@ -1456,7 +1456,7 @@ pub const fn _mm256_add_ph(a: __m256h, b: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vaddph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_mask_add_ph(src: __m256h, k: __mmask16, a: __m256h, b: __m256h) -> __m256h { unsafe { @@ -1472,7 +1472,7 @@ pub const fn _mm256_mask_add_ph(src: __m256h, k: __mmask16, a: __m256h, b: __m25 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vaddph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_maskz_add_ph(k: __mmask16, a: __m256h, b: __m256h) -> __m256h { unsafe { @@ -1487,7 +1487,7 @@ pub const fn _mm256_maskz_add_ph(k: __mmask16, a: __m256h, b: __m256h) -> __m256 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vaddph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_add_ph(a: __m512h, b: __m512h) -> __m512h { unsafe { simd_add(a, b) } @@ -1500,7 +1500,7 @@ pub const fn _mm512_add_ph(a: __m512h, b: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vaddph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_mask_add_ph(src: __m512h, k: __mmask32, a: __m512h, b: __m512h) -> __m512h { unsafe { @@ -1516,7 +1516,7 @@ pub const fn _mm512_mask_add_ph(src: __m512h, k: __mmask32, a: __m512h, b: __m51 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vaddph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_maskz_add_ph(k: __mmask32, a: __m512h, b: __m512h) -> __m512h { unsafe { @@ -1539,7 +1539,7 @@ pub const fn _mm512_maskz_add_ph(k: __mmask32, a: __m512h, b: __m512h) -> __m512 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vaddph, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_add_round_ph(a: __m512h, b: __m512h) -> __m512h { unsafe { static_assert_rounding!(ROUNDING); @@ -1562,7 +1562,7 @@ pub fn _mm512_add_round_ph(a: __m512h, b: __m512h) -> __m51 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vaddph, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_add_round_ph( src: __m512h, k: __mmask32, @@ -1590,7 +1590,7 @@ pub fn _mm512_mask_add_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vaddph, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_add_round_ph( k: __mmask32, a: __m512h, @@ -1618,7 +1618,7 @@ pub fn _mm512_maskz_add_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vaddsh, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_add_round_sh(a: __m128h, b: __m128h) -> __m128h { static_assert_rounding!(ROUNDING); _mm_mask_add_round_sh::(f16x8::ZERO.as_m128h(), 0xff, a, b) @@ -1640,7 +1640,7 @@ pub fn _mm_add_round_sh(a: __m128h, b: __m128h) -> __m128h #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vaddsh, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_add_round_sh( src: __m128h, k: __mmask8, @@ -1669,7 +1669,7 @@ pub fn _mm_mask_add_round_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vaddsh, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_add_round_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { static_assert_rounding!(ROUNDING); _mm_mask_add_round_sh::(f16x8::ZERO.as_m128h(), k, a, b) @@ -1682,7 +1682,7 @@ pub fn _mm_maskz_add_round_sh(k: __mmask8, a: __m128h, b: _ #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vaddsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_add_sh(a: __m128h, b: __m128h) -> __m128h { unsafe { simd_insert!(a, 0, _mm_cvtsh_h(a) + _mm_cvtsh_h(b)) } @@ -1696,7 +1696,7 @@ pub const fn _mm_add_sh(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vaddsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_add_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { @@ -1719,7 +1719,7 @@ pub const fn _mm_mask_add_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vaddsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_maskz_add_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { @@ -1739,7 +1739,7 @@ pub const fn _mm_maskz_add_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vsubph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_sub_ph(a: __m128h, b: __m128h) -> __m128h { unsafe { simd_sub(a, b) } @@ -1752,7 +1752,7 @@ pub const fn _mm_sub_ph(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vsubph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_sub_ph(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { @@ -1768,7 +1768,7 @@ pub const fn _mm_mask_sub_ph(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vsubph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_maskz_sub_ph(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { @@ -1783,7 +1783,7 @@ pub const fn _mm_maskz_sub_ph(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vsubph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_sub_ph(a: __m256h, b: __m256h) -> __m256h { unsafe { simd_sub(a, b) } @@ -1796,7 +1796,7 @@ pub const fn _mm256_sub_ph(a: __m256h, b: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vsubph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_mask_sub_ph(src: __m256h, k: __mmask16, a: __m256h, b: __m256h) -> __m256h { unsafe { @@ -1812,7 +1812,7 @@ pub const fn _mm256_mask_sub_ph(src: __m256h, k: __mmask16, a: __m256h, b: __m25 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vsubph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_maskz_sub_ph(k: __mmask16, a: __m256h, b: __m256h) -> __m256h { unsafe { @@ -1827,7 +1827,7 @@ pub const fn _mm256_maskz_sub_ph(k: __mmask16, a: __m256h, b: __m256h) -> __m256 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsubph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_sub_ph(a: __m512h, b: __m512h) -> __m512h { unsafe { simd_sub(a, b) } @@ -1840,7 +1840,7 @@ pub const fn _mm512_sub_ph(a: __m512h, b: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsubph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_mask_sub_ph(src: __m512h, k: __mmask32, a: __m512h, b: __m512h) -> __m512h { unsafe { @@ -1856,7 +1856,7 @@ pub const fn _mm512_mask_sub_ph(src: __m512h, k: __mmask32, a: __m512h, b: __m51 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsubph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_maskz_sub_ph(k: __mmask32, a: __m512h, b: __m512h) -> __m512h { unsafe { @@ -1879,7 +1879,7 @@ pub const fn _mm512_maskz_sub_ph(k: __mmask32, a: __m512h, b: __m512h) -> __m512 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsubph, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_sub_round_ph(a: __m512h, b: __m512h) -> __m512h { unsafe { static_assert_rounding!(ROUNDING); @@ -1902,7 +1902,7 @@ pub fn _mm512_sub_round_ph(a: __m512h, b: __m512h) -> __m51 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsubph, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_sub_round_ph( src: __m512h, k: __mmask32, @@ -1931,7 +1931,7 @@ pub fn _mm512_mask_sub_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsubph, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_sub_round_ph( k: __mmask32, a: __m512h, @@ -1959,7 +1959,7 @@ pub fn _mm512_maskz_sub_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsubsh, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_sub_round_sh(a: __m128h, b: __m128h) -> __m128h { static_assert_rounding!(ROUNDING); _mm_mask_sub_round_sh::(f16x8::ZERO.as_m128h(), 0xff, a, b) @@ -1981,7 +1981,7 @@ pub fn _mm_sub_round_sh(a: __m128h, b: __m128h) -> __m128h #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsubsh, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_sub_round_sh( src: __m128h, k: __mmask8, @@ -2010,7 +2010,7 @@ pub fn _mm_mask_sub_round_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsubsh, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_sub_round_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { static_assert_rounding!(ROUNDING); _mm_mask_sub_round_sh::(f16x8::ZERO.as_m128h(), k, a, b) @@ -2023,7 +2023,7 @@ pub fn _mm_maskz_sub_round_sh(k: __mmask8, a: __m128h, b: _ #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsubsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_sub_sh(a: __m128h, b: __m128h) -> __m128h { unsafe { simd_insert!(a, 0, _mm_cvtsh_h(a) - _mm_cvtsh_h(b)) } @@ -2037,7 +2037,7 @@ pub const fn _mm_sub_sh(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsubsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_sub_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { @@ -2060,7 +2060,7 @@ pub const fn _mm_mask_sub_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsubsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_maskz_sub_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { @@ -2080,7 +2080,7 @@ pub const fn _mm_maskz_sub_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vmulph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mul_ph(a: __m128h, b: __m128h) -> __m128h { unsafe { simd_mul(a, b) } @@ -2093,7 +2093,7 @@ pub const fn _mm_mul_ph(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vmulph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_mul_ph(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { @@ -2109,7 +2109,7 @@ pub const fn _mm_mask_mul_ph(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vmulph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_maskz_mul_ph(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { @@ -2124,7 +2124,7 @@ pub const fn _mm_maskz_mul_ph(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vmulph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_mul_ph(a: __m256h, b: __m256h) -> __m256h { unsafe { simd_mul(a, b) } @@ -2137,7 +2137,7 @@ pub const fn _mm256_mul_ph(a: __m256h, b: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vmulph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_mask_mul_ph(src: __m256h, k: __mmask16, a: __m256h, b: __m256h) -> __m256h { unsafe { @@ -2153,7 +2153,7 @@ pub const fn _mm256_mask_mul_ph(src: __m256h, k: __mmask16, a: __m256h, b: __m25 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vmulph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_maskz_mul_ph(k: __mmask16, a: __m256h, b: __m256h) -> __m256h { unsafe { @@ -2168,7 +2168,7 @@ pub const fn _mm256_maskz_mul_ph(k: __mmask16, a: __m256h, b: __m256h) -> __m256 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vmulph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_mul_ph(a: __m512h, b: __m512h) -> __m512h { unsafe { simd_mul(a, b) } @@ -2181,7 +2181,7 @@ pub const fn _mm512_mul_ph(a: __m512h, b: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vmulph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_mask_mul_ph(src: __m512h, k: __mmask32, a: __m512h, b: __m512h) -> __m512h { unsafe { @@ -2197,7 +2197,7 @@ pub const fn _mm512_mask_mul_ph(src: __m512h, k: __mmask32, a: __m512h, b: __m51 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vmulph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_maskz_mul_ph(k: __mmask32, a: __m512h, b: __m512h) -> __m512h { unsafe { @@ -2220,7 +2220,7 @@ pub const fn _mm512_maskz_mul_ph(k: __mmask32, a: __m512h, b: __m512h) -> __m512 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vmulph, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mul_round_ph(a: __m512h, b: __m512h) -> __m512h { unsafe { static_assert_rounding!(ROUNDING); @@ -2243,7 +2243,7 @@ pub fn _mm512_mul_round_ph(a: __m512h, b: __m512h) -> __m51 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vmulph, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_mul_round_ph( src: __m512h, k: __mmask32, @@ -2272,7 +2272,7 @@ pub fn _mm512_mask_mul_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vmulph, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_mul_round_ph( k: __mmask32, a: __m512h, @@ -2300,7 +2300,7 @@ pub fn _mm512_maskz_mul_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vmulsh, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mul_round_sh(a: __m128h, b: __m128h) -> __m128h { static_assert_rounding!(ROUNDING); _mm_mask_mul_round_sh::(f16x8::ZERO.as_m128h(), 0xff, a, b) @@ -2322,7 +2322,7 @@ pub fn _mm_mul_round_sh(a: __m128h, b: __m128h) -> __m128h #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vmulsh, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_mul_round_sh( src: __m128h, k: __mmask8, @@ -2351,7 +2351,7 @@ pub fn _mm_mask_mul_round_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vmulsh, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_mul_round_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { static_assert_rounding!(ROUNDING); _mm_mask_mul_round_sh::(f16x8::ZERO.as_m128h(), k, a, b) @@ -2364,7 +2364,7 @@ pub fn _mm_maskz_mul_round_sh(k: __mmask8, a: __m128h, b: _ #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vmulsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mul_sh(a: __m128h, b: __m128h) -> __m128h { unsafe { simd_insert!(a, 0, _mm_cvtsh_h(a) * _mm_cvtsh_h(b)) } @@ -2378,7 +2378,7 @@ pub const fn _mm_mul_sh(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vmulsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_mul_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { @@ -2401,7 +2401,7 @@ pub const fn _mm_mask_mul_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vmulsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_maskz_mul_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { @@ -2421,7 +2421,7 @@ pub const fn _mm_maskz_mul_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vdivph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_div_ph(a: __m128h, b: __m128h) -> __m128h { unsafe { simd_div(a, b) } @@ -2434,7 +2434,7 @@ pub const fn _mm_div_ph(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vdivph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_div_ph(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { @@ -2450,7 +2450,7 @@ pub const fn _mm_mask_div_ph(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vdivph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_maskz_div_ph(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { @@ -2465,7 +2465,7 @@ pub const fn _mm_maskz_div_ph(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vdivph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_div_ph(a: __m256h, b: __m256h) -> __m256h { unsafe { simd_div(a, b) } @@ -2478,7 +2478,7 @@ pub const fn _mm256_div_ph(a: __m256h, b: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vdivph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_mask_div_ph(src: __m256h, k: __mmask16, a: __m256h, b: __m256h) -> __m256h { unsafe { @@ -2494,7 +2494,7 @@ pub const fn _mm256_mask_div_ph(src: __m256h, k: __mmask16, a: __m256h, b: __m25 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vdivph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_maskz_div_ph(k: __mmask16, a: __m256h, b: __m256h) -> __m256h { unsafe { @@ -2509,7 +2509,7 @@ pub const fn _mm256_maskz_div_ph(k: __mmask16, a: __m256h, b: __m256h) -> __m256 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vdivph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_div_ph(a: __m512h, b: __m512h) -> __m512h { unsafe { simd_div(a, b) } @@ -2522,7 +2522,7 @@ pub const fn _mm512_div_ph(a: __m512h, b: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vdivph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_mask_div_ph(src: __m512h, k: __mmask32, a: __m512h, b: __m512h) -> __m512h { unsafe { @@ -2538,7 +2538,7 @@ pub const fn _mm512_mask_div_ph(src: __m512h, k: __mmask32, a: __m512h, b: __m51 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vdivph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_maskz_div_ph(k: __mmask32, a: __m512h, b: __m512h) -> __m512h { unsafe { @@ -2561,7 +2561,7 @@ pub const fn _mm512_maskz_div_ph(k: __mmask32, a: __m512h, b: __m512h) -> __m512 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vdivph, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_div_round_ph(a: __m512h, b: __m512h) -> __m512h { unsafe { static_assert_rounding!(ROUNDING); @@ -2584,7 +2584,7 @@ pub fn _mm512_div_round_ph(a: __m512h, b: __m512h) -> __m51 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vdivph, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_div_round_ph( src: __m512h, k: __mmask32, @@ -2613,7 +2613,7 @@ pub fn _mm512_mask_div_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vdivph, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_div_round_ph( k: __mmask32, a: __m512h, @@ -2641,7 +2641,7 @@ pub fn _mm512_maskz_div_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vdivsh, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_div_round_sh(a: __m128h, b: __m128h) -> __m128h { static_assert_rounding!(ROUNDING); _mm_mask_div_round_sh::(f16x8::ZERO.as_m128h(), 0xff, a, b) @@ -2663,7 +2663,7 @@ pub fn _mm_div_round_sh(a: __m128h, b: __m128h) -> __m128h #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vdivsh, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_div_round_sh( src: __m128h, k: __mmask8, @@ -2692,7 +2692,7 @@ pub fn _mm_mask_div_round_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vdivsh, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_div_round_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { static_assert_rounding!(ROUNDING); _mm_mask_div_round_sh::(f16x8::ZERO.as_m128h(), k, a, b) @@ -2705,7 +2705,7 @@ pub fn _mm_maskz_div_round_sh(k: __mmask8, a: __m128h, b: _ #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vdivsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_div_sh(a: __m128h, b: __m128h) -> __m128h { unsafe { simd_insert!(a, 0, _mm_cvtsh_h(a) / _mm_cvtsh_h(b)) } @@ -2719,7 +2719,7 @@ pub const fn _mm_div_sh(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vdivsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_div_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { @@ -2742,7 +2742,7 @@ pub const fn _mm_mask_div_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vdivsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_maskz_div_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { @@ -2764,7 +2764,7 @@ pub const fn _mm_maskz_div_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mul_pch(a: __m128h, b: __m128h) -> __m128h { _mm_mask_mul_pch(_mm_undefined_ph(), 0xff, a, b) } @@ -2777,7 +2777,7 @@ pub fn _mm_mul_pch(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_mul_pch(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { transmute(vfmulcph_128(transmute(a), transmute(b), transmute(src), k)) } } @@ -2790,7 +2790,7 @@ pub fn _mm_mask_mul_pch(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __ #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_mul_pch(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_mul_pch(_mm_setzero_ph(), k, a, b) } @@ -2803,7 +2803,7 @@ pub fn _mm_maskz_mul_pch(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mul_pch(a: __m256h, b: __m256h) -> __m256h { _mm256_mask_mul_pch(_mm256_undefined_ph(), 0xff, a, b) } @@ -2816,7 +2816,7 @@ pub fn _mm256_mul_pch(a: __m256h, b: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_mul_pch(src: __m256h, k: __mmask8, a: __m256h, b: __m256h) -> __m256h { unsafe { transmute(vfmulcph_256(transmute(a), transmute(b), transmute(src), k)) } } @@ -2829,7 +2829,7 @@ pub fn _mm256_mask_mul_pch(src: __m256h, k: __mmask8, a: __m256h, b: __m256h) -> #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_mul_pch(k: __mmask8, a: __m256h, b: __m256h) -> __m256h { _mm256_mask_mul_pch(_mm256_setzero_ph(), k, a, b) } @@ -2842,7 +2842,7 @@ pub fn _mm256_maskz_mul_pch(k: __mmask8, a: __m256h, b: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mul_pch(a: __m512h, b: __m512h) -> __m512h { _mm512_mask_mul_pch(_mm512_undefined_ph(), 0xffff, a, b) } @@ -2855,7 +2855,7 @@ pub fn _mm512_mul_pch(a: __m512h, b: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_mul_pch(src: __m512h, k: __mmask16, a: __m512h, b: __m512h) -> __m512h { _mm512_mask_mul_round_pch::<_MM_FROUND_CUR_DIRECTION>(src, k, a, b) } @@ -2868,7 +2868,7 @@ pub fn _mm512_mask_mul_pch(src: __m512h, k: __mmask16, a: __m512h, b: __m512h) - #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_mul_pch(k: __mmask16, a: __m512h, b: __m512h) -> __m512h { _mm512_mask_mul_pch(_mm512_setzero_ph(), k, a, b) } @@ -2890,7 +2890,7 @@ pub fn _mm512_maskz_mul_pch(k: __mmask16, a: __m512h, b: __m512h) -> __m512h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcph, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mul_round_pch(a: __m512h, b: __m512h) -> __m512h { static_assert_rounding!(ROUNDING); _mm512_mask_mul_round_pch::(_mm512_undefined_ph(), 0xffff, a, b) @@ -2913,7 +2913,7 @@ pub fn _mm512_mul_round_pch(a: __m512h, b: __m512h) -> __m5 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcph, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_mul_round_pch( src: __m512h, k: __mmask16, @@ -2949,7 +2949,7 @@ pub fn _mm512_mask_mul_round_pch( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcph, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_mul_round_pch( k: __mmask16, a: __m512h, @@ -2968,7 +2968,7 @@ pub fn _mm512_maskz_mul_round_pch( #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mul_sch(a: __m128h, b: __m128h) -> __m128h { _mm_mask_mul_sch(f16x8::ZERO.as_m128h(), 0xff, a, b) } @@ -2982,7 +2982,7 @@ pub fn _mm_mul_sch(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_mul_sch(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_mul_round_sch::<_MM_FROUND_CUR_DIRECTION>(src, k, a, b) } @@ -2996,7 +2996,7 @@ pub fn _mm_mask_mul_sch(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __ #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_mul_sch(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_mul_sch(f16x8::ZERO.as_m128h(), k, a, b) } @@ -3019,7 +3019,7 @@ pub fn _mm_maskz_mul_sch(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcsh, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mul_round_sch(a: __m128h, b: __m128h) -> __m128h { static_assert_rounding!(ROUNDING); _mm_mask_mul_round_sch::(f16x8::ZERO.as_m128h(), 0xff, a, b) @@ -3043,7 +3043,7 @@ pub fn _mm_mul_round_sch(a: __m128h, b: __m128h) -> __m128h #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcsh, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_mul_round_sch( src: __m128h, k: __mmask8, @@ -3080,7 +3080,7 @@ pub fn _mm_mask_mul_round_sch( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcsh, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_mul_round_sch( k: __mmask8, a: __m128h, @@ -3098,7 +3098,7 @@ pub fn _mm_maskz_mul_round_sch( #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_fmul_pch(a: __m128h, b: __m128h) -> __m128h { _mm_mul_pch(a, b) } @@ -3111,7 +3111,7 @@ pub fn _mm_fmul_pch(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_fmul_pch(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_mul_pch(src, k, a, b) } @@ -3124,7 +3124,7 @@ pub fn _mm_mask_fmul_pch(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> _ #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_fmul_pch(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_maskz_mul_pch(k, a, b) } @@ -3137,7 +3137,7 @@ pub fn _mm_maskz_fmul_pch(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_fmul_pch(a: __m256h, b: __m256h) -> __m256h { _mm256_mul_pch(a, b) } @@ -3150,7 +3150,7 @@ pub fn _mm256_fmul_pch(a: __m256h, b: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_fmul_pch(src: __m256h, k: __mmask8, a: __m256h, b: __m256h) -> __m256h { _mm256_mask_mul_pch(src, k, a, b) } @@ -3163,7 +3163,7 @@ pub fn _mm256_mask_fmul_pch(src: __m256h, k: __mmask8, a: __m256h, b: __m256h) - #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_fmul_pch(k: __mmask8, a: __m256h, b: __m256h) -> __m256h { _mm256_maskz_mul_pch(k, a, b) } @@ -3175,7 +3175,7 @@ pub fn _mm256_maskz_fmul_pch(k: __mmask8, a: __m256h, b: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_fmul_pch(a: __m512h, b: __m512h) -> __m512h { _mm512_mul_pch(a, b) } @@ -3188,7 +3188,7 @@ pub fn _mm512_fmul_pch(a: __m512h, b: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_fmul_pch(src: __m512h, k: __mmask16, a: __m512h, b: __m512h) -> __m512h { _mm512_mask_mul_pch(src, k, a, b) } @@ -3201,7 +3201,7 @@ pub fn _mm512_mask_fmul_pch(src: __m512h, k: __mmask16, a: __m512h, b: __m512h) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_fmul_pch(k: __mmask16, a: __m512h, b: __m512h) -> __m512h { _mm512_maskz_mul_pch(k, a, b) } @@ -3221,7 +3221,7 @@ pub fn _mm512_maskz_fmul_pch(k: __mmask16, a: __m512h, b: __m512h) -> __m512h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcph, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_fmul_round_pch(a: __m512h, b: __m512h) -> __m512h { static_assert_rounding!(ROUNDING); _mm512_mul_round_pch::(a, b) @@ -3243,7 +3243,7 @@ pub fn _mm512_fmul_round_pch(a: __m512h, b: __m512h) -> __m #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcph, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_fmul_round_pch( src: __m512h, k: __mmask16, @@ -3270,7 +3270,7 @@ pub fn _mm512_mask_fmul_round_pch( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcph, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_fmul_round_pch( k: __mmask16, a: __m512h, @@ -3288,7 +3288,7 @@ pub fn _mm512_maskz_fmul_round_pch( #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_fmul_sch(a: __m128h, b: __m128h) -> __m128h { _mm_mul_sch(a, b) } @@ -3301,7 +3301,7 @@ pub fn _mm_fmul_sch(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_fmul_sch(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_mul_sch(src, k, a, b) } @@ -3314,7 +3314,7 @@ pub fn _mm_mask_fmul_sch(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> _ #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_fmul_sch(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_maskz_mul_sch(k, a, b) } @@ -3335,7 +3335,7 @@ pub fn _mm_maskz_fmul_sch(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcsh, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_fmul_round_sch(a: __m128h, b: __m128h) -> __m128h { static_assert_rounding!(ROUNDING); _mm_mul_round_sch::(a, b) @@ -3358,7 +3358,7 @@ pub fn _mm_fmul_round_sch(a: __m128h, b: __m128h) -> __m128 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcsh, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_fmul_round_sch( src: __m128h, k: __mmask8, @@ -3386,7 +3386,7 @@ pub fn _mm_mask_fmul_round_sch( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmulcsh, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_fmul_round_sch( k: __mmask8, a: __m128h, @@ -3405,7 +3405,7 @@ pub fn _mm_maskz_fmul_round_sch( #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfcmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cmul_pch(a: __m128h, b: __m128h) -> __m128h { _mm_mask_cmul_pch(_mm_undefined_ph(), 0xff, a, b) } @@ -3419,7 +3419,7 @@ pub fn _mm_cmul_pch(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfcmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cmul_pch(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { transmute(vfcmulcph_128(transmute(a), transmute(b), transmute(src), k)) } } @@ -3433,7 +3433,7 @@ pub fn _mm_mask_cmul_pch(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> _ #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfcmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cmul_pch(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_cmul_pch(_mm_setzero_ph(), k, a, b) } @@ -3447,7 +3447,7 @@ pub fn _mm_maskz_cmul_pch(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfcmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cmul_pch(a: __m256h, b: __m256h) -> __m256h { _mm256_mask_cmul_pch(_mm256_undefined_ph(), 0xff, a, b) } @@ -3461,7 +3461,7 @@ pub fn _mm256_cmul_pch(a: __m256h, b: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfcmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cmul_pch(src: __m256h, k: __mmask8, a: __m256h, b: __m256h) -> __m256h { unsafe { transmute(vfcmulcph_256(transmute(a), transmute(b), transmute(src), k)) } } @@ -3475,7 +3475,7 @@ pub fn _mm256_mask_cmul_pch(src: __m256h, k: __mmask8, a: __m256h, b: __m256h) - #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfcmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cmul_pch(k: __mmask8, a: __m256h, b: __m256h) -> __m256h { _mm256_mask_cmul_pch(_mm256_setzero_ph(), k, a, b) } @@ -3489,7 +3489,7 @@ pub fn _mm256_maskz_cmul_pch(k: __mmask8, a: __m256h, b: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cmul_pch(a: __m512h, b: __m512h) -> __m512h { _mm512_mask_cmul_pch(_mm512_undefined_ph(), 0xffff, a, b) } @@ -3503,7 +3503,7 @@ pub fn _mm512_cmul_pch(a: __m512h, b: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cmul_pch(src: __m512h, k: __mmask16, a: __m512h, b: __m512h) -> __m512h { _mm512_mask_cmul_round_pch::<_MM_FROUND_CUR_DIRECTION>(src, k, a, b) } @@ -3517,7 +3517,7 @@ pub fn _mm512_mask_cmul_pch(src: __m512h, k: __mmask16, a: __m512h, b: __m512h) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cmul_pch(k: __mmask16, a: __m512h, b: __m512h) -> __m512h { _mm512_mask_cmul_pch(_mm512_setzero_ph(), k, a, b) } @@ -3540,7 +3540,7 @@ pub fn _mm512_maskz_cmul_pch(k: __mmask16, a: __m512h, b: __m512h) -> __m512h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcph, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cmul_round_pch(a: __m512h, b: __m512h) -> __m512h { static_assert_rounding!(ROUNDING); _mm512_mask_cmul_round_pch::(_mm512_undefined_ph(), 0xffff, a, b) @@ -3564,7 +3564,7 @@ pub fn _mm512_cmul_round_pch(a: __m512h, b: __m512h) -> __m #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcph, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cmul_round_pch( src: __m512h, k: __mmask16, @@ -3601,7 +3601,7 @@ pub fn _mm512_mask_cmul_round_pch( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcph, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cmul_round_pch( k: __mmask16, a: __m512h, @@ -3619,7 +3619,7 @@ pub fn _mm512_maskz_cmul_round_pch( #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cmul_sch(a: __m128h, b: __m128h) -> __m128h { _mm_mask_cmul_sch(f16x8::ZERO.as_m128h(), 0xff, a, b) } @@ -3633,7 +3633,7 @@ pub fn _mm_cmul_sch(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cmul_sch(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_cmul_round_sch::<_MM_FROUND_CUR_DIRECTION>(src, k, a, b) } @@ -3647,7 +3647,7 @@ pub fn _mm_mask_cmul_sch(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> _ #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cmul_sch(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_cmul_sch(f16x8::ZERO.as_m128h(), k, a, b) } @@ -3669,7 +3669,7 @@ pub fn _mm_maskz_cmul_sch(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcsh, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cmul_round_sch(a: __m128h, b: __m128h) -> __m128h { static_assert_rounding!(ROUNDING); _mm_mask_cmul_round_sch::(f16x8::ZERO.as_m128h(), 0xff, a, b) @@ -3693,7 +3693,7 @@ pub fn _mm_cmul_round_sch(a: __m128h, b: __m128h) -> __m128 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcsh, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cmul_round_sch( src: __m128h, k: __mmask8, @@ -3730,7 +3730,7 @@ pub fn _mm_mask_cmul_round_sch( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcsh, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cmul_round_sch( k: __mmask8, a: __m128h, @@ -3749,7 +3749,7 @@ pub fn _mm_maskz_cmul_round_sch( #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfcmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_fcmul_pch(a: __m128h, b: __m128h) -> __m128h { _mm_cmul_pch(a, b) } @@ -3763,7 +3763,7 @@ pub fn _mm_fcmul_pch(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfcmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_fcmul_pch(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_cmul_pch(src, k, a, b) } @@ -3777,7 +3777,7 @@ pub fn _mm_mask_fcmul_pch(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfcmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_fcmul_pch(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_maskz_cmul_pch(k, a, b) } @@ -3791,7 +3791,7 @@ pub fn _mm_maskz_fcmul_pch(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfcmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_fcmul_pch(a: __m256h, b: __m256h) -> __m256h { _mm256_cmul_pch(a, b) } @@ -3805,7 +3805,7 @@ pub fn _mm256_fcmul_pch(a: __m256h, b: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfcmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_fcmul_pch(src: __m256h, k: __mmask8, a: __m256h, b: __m256h) -> __m256h { _mm256_mask_cmul_pch(src, k, a, b) } @@ -3819,7 +3819,7 @@ pub fn _mm256_mask_fcmul_pch(src: __m256h, k: __mmask8, a: __m256h, b: __m256h) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfcmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_fcmul_pch(k: __mmask8, a: __m256h, b: __m256h) -> __m256h { _mm256_maskz_cmul_pch(k, a, b) } @@ -3833,7 +3833,7 @@ pub fn _mm256_maskz_fcmul_pch(k: __mmask8, a: __m256h, b: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_fcmul_pch(a: __m512h, b: __m512h) -> __m512h { _mm512_cmul_pch(a, b) } @@ -3847,7 +3847,7 @@ pub fn _mm512_fcmul_pch(a: __m512h, b: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_fcmul_pch(src: __m512h, k: __mmask16, a: __m512h, b: __m512h) -> __m512h { _mm512_mask_cmul_pch(src, k, a, b) } @@ -3861,7 +3861,7 @@ pub fn _mm512_mask_fcmul_pch(src: __m512h, k: __mmask16, a: __m512h, b: __m512h) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_fcmul_pch(k: __mmask16, a: __m512h, b: __m512h) -> __m512h { _mm512_maskz_cmul_pch(k, a, b) } @@ -3883,7 +3883,7 @@ pub fn _mm512_maskz_fcmul_pch(k: __mmask16, a: __m512h, b: __m512h) -> __m512h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcph, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_fcmul_round_pch(a: __m512h, b: __m512h) -> __m512h { static_assert_rounding!(ROUNDING); _mm512_cmul_round_pch::(a, b) @@ -3907,7 +3907,7 @@ pub fn _mm512_fcmul_round_pch(a: __m512h, b: __m512h) -> __ #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcph, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_fcmul_round_pch( src: __m512h, k: __mmask16, @@ -3936,7 +3936,7 @@ pub fn _mm512_mask_fcmul_round_pch( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcph, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_fcmul_round_pch( k: __mmask16, a: __m512h, @@ -3955,7 +3955,7 @@ pub fn _mm512_maskz_fcmul_round_pch( #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_fcmul_sch(a: __m128h, b: __m128h) -> __m128h { _mm_cmul_sch(a, b) } @@ -3969,7 +3969,7 @@ pub fn _mm_fcmul_sch(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_fcmul_sch(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_cmul_sch(src, k, a, b) } @@ -3983,7 +3983,7 @@ pub fn _mm_mask_fcmul_sch(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_fcmul_sch(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_maskz_cmul_sch(k, a, b) } @@ -4005,7 +4005,7 @@ pub fn _mm_maskz_fcmul_sch(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcsh, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_fcmul_round_sch(a: __m128h, b: __m128h) -> __m128h { static_assert_rounding!(ROUNDING); _mm_cmul_round_sch::(a, b) @@ -4029,7 +4029,7 @@ pub fn _mm_fcmul_round_sch(a: __m128h, b: __m128h) -> __m12 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcsh, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_fcmul_round_sch( src: __m128h, k: __mmask8, @@ -4058,7 +4058,7 @@ pub fn _mm_mask_fcmul_round_sch( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmulcsh, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_fcmul_round_sch( k: __mmask8, a: __m128h, @@ -4074,7 +4074,7 @@ pub fn _mm_maskz_fcmul_round_sch( /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_abs_ph) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_abs_ph(v2: __m128h) -> __m128h { unsafe { transmute(_mm_and_si128(transmute(v2), _mm_set1_epi16(i16::MAX))) } @@ -4086,7 +4086,7 @@ pub const fn _mm_abs_ph(v2: __m128h) -> __m128h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_abs_ph) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_abs_ph(v2: __m256h) -> __m256h { unsafe { transmute(_mm256_and_si256(transmute(v2), _mm256_set1_epi16(i16::MAX))) } @@ -4098,7 +4098,7 @@ pub const fn _mm256_abs_ph(v2: __m256h) -> __m256h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_abs_ph) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_abs_ph(v2: __m512h) -> __m512h { unsafe { transmute(_mm512_and_si512(transmute(v2), _mm512_set1_epi16(i16::MAX))) } @@ -4112,7 +4112,7 @@ pub const fn _mm512_abs_ph(v2: __m512h) -> __m512h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_conj_pch) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_conj_pch(a: __m128h) -> __m128h { unsafe { transmute(_mm_xor_si128(transmute(a), _mm_set1_epi32(i32::MIN))) } @@ -4126,7 +4126,7 @@ pub const fn _mm_conj_pch(a: __m128h) -> __m128h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_mask_conj_pch) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_conj_pch(src: __m128h, k: __mmask8, a: __m128h) -> __m128h { unsafe { @@ -4143,7 +4143,7 @@ pub const fn _mm_mask_conj_pch(src: __m128h, k: __mmask8, a: __m128h) -> __m128h /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_maskz_conj_pch) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_maskz_conj_pch(k: __mmask8, a: __m128h) -> __m128h { _mm_mask_conj_pch(_mm_setzero_ph(), k, a) @@ -4156,7 +4156,7 @@ pub const fn _mm_maskz_conj_pch(k: __mmask8, a: __m128h) -> __m128h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_conj_pch) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_conj_pch(a: __m256h) -> __m256h { unsafe { transmute(_mm256_xor_si256(transmute(a), _mm256_set1_epi32(i32::MIN))) } @@ -4170,7 +4170,7 @@ pub const fn _mm256_conj_pch(a: __m256h) -> __m256h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_mask_conj_pch) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_mask_conj_pch(src: __m256h, k: __mmask8, a: __m256h) -> __m256h { unsafe { @@ -4187,7 +4187,7 @@ pub const fn _mm256_mask_conj_pch(src: __m256h, k: __mmask8, a: __m256h) -> __m2 /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_maskz_conj_pch) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_maskz_conj_pch(k: __mmask8, a: __m256h) -> __m256h { _mm256_mask_conj_pch(_mm256_setzero_ph(), k, a) @@ -4200,7 +4200,7 @@ pub const fn _mm256_maskz_conj_pch(k: __mmask8, a: __m256h) -> __m256h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_conj_pch) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_conj_pch(a: __m512h) -> __m512h { unsafe { transmute(_mm512_xor_si512(transmute(a), _mm512_set1_epi32(i32::MIN))) } @@ -4214,7 +4214,7 @@ pub const fn _mm512_conj_pch(a: __m512h) -> __m512h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_mask_conj_pch) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_mask_conj_pch(src: __m512h, k: __mmask16, a: __m512h) -> __m512h { unsafe { @@ -4231,7 +4231,7 @@ pub const fn _mm512_mask_conj_pch(src: __m512h, k: __mmask16, a: __m512h) -> __m /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_maskz_conj_pch) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_maskz_conj_pch(k: __mmask16, a: __m512h) -> __m512h { _mm512_mask_conj_pch(_mm512_setzero_ph(), k, a) @@ -4245,7 +4245,7 @@ pub const fn _mm512_maskz_conj_pch(k: __mmask16, a: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_fmadd_pch(a: __m128h, b: __m128h, c: __m128h) -> __m128h { _mm_mask3_fmadd_pch(a, b, c, 0xff) } @@ -4259,7 +4259,7 @@ pub fn _mm_fmadd_pch(a: __m128h, b: __m128h, c: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_fmadd_pch(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) -> __m128h { unsafe { let r: __m128 = transmute(_mm_mask3_fmadd_pch(a, b, c, k)); // using `0xff` would have been fine here, but this is what CLang does @@ -4276,7 +4276,7 @@ pub fn _mm_mask_fmadd_pch(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) -> __ #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask3_fmadd_pch(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) -> __m128h { unsafe { transmute(vfmaddcph_mask3_128( @@ -4297,7 +4297,7 @@ pub fn _mm_mask3_fmadd_pch(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) -> _ #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_fmadd_pch(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { transmute(vfmaddcph_maskz_128( @@ -4317,7 +4317,7 @@ pub fn _mm_maskz_fmadd_pch(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) -> _ #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_fmadd_pch(a: __m256h, b: __m256h, c: __m256h) -> __m256h { _mm256_mask3_fmadd_pch(a, b, c, 0xff) } @@ -4331,7 +4331,7 @@ pub fn _mm256_fmadd_pch(a: __m256h, b: __m256h, c: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_fmadd_pch(a: __m256h, k: __mmask8, b: __m256h, c: __m256h) -> __m256h { unsafe { let r: __m256 = transmute(_mm256_mask3_fmadd_pch(a, b, c, k)); // using `0xff` would have been fine here, but this is what CLang does @@ -4348,7 +4348,7 @@ pub fn _mm256_mask_fmadd_pch(a: __m256h, k: __mmask8, b: __m256h, c: __m256h) -> #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask3_fmadd_pch(a: __m256h, b: __m256h, c: __m256h, k: __mmask8) -> __m256h { unsafe { transmute(vfmaddcph_mask3_256( @@ -4369,7 +4369,7 @@ pub fn _mm256_mask3_fmadd_pch(a: __m256h, b: __m256h, c: __m256h, k: __mmask8) - #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_fmadd_pch(k: __mmask8, a: __m256h, b: __m256h, c: __m256h) -> __m256h { unsafe { transmute(vfmaddcph_maskz_256( @@ -4389,7 +4389,7 @@ pub fn _mm256_maskz_fmadd_pch(k: __mmask8, a: __m256h, b: __m256h, c: __m256h) - #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_fmadd_pch(a: __m512h, b: __m512h, c: __m512h) -> __m512h { _mm512_fmadd_round_pch::<_MM_FROUND_CUR_DIRECTION>(a, b, c) } @@ -4403,7 +4403,7 @@ pub fn _mm512_fmadd_pch(a: __m512h, b: __m512h, c: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_fmadd_pch(a: __m512h, k: __mmask16, b: __m512h, c: __m512h) -> __m512h { _mm512_mask_fmadd_round_pch::<_MM_FROUND_CUR_DIRECTION>(a, k, b, c) } @@ -4417,7 +4417,7 @@ pub fn _mm512_mask_fmadd_pch(a: __m512h, k: __mmask16, b: __m512h, c: __m512h) - #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask3_fmadd_pch(a: __m512h, b: __m512h, c: __m512h, k: __mmask16) -> __m512h { _mm512_mask3_fmadd_round_pch::<_MM_FROUND_CUR_DIRECTION>(a, b, c, k) } @@ -4431,7 +4431,7 @@ pub fn _mm512_mask3_fmadd_pch(a: __m512h, b: __m512h, c: __m512h, k: __mmask16) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_fmadd_pch(k: __mmask16, a: __m512h, b: __m512h, c: __m512h) -> __m512h { _mm512_maskz_fmadd_round_pch::<_MM_FROUND_CUR_DIRECTION>(k, a, b, c) } @@ -4453,7 +4453,7 @@ pub fn _mm512_maskz_fmadd_pch(k: __mmask16, a: __m512h, b: __m512h, c: __m512h) #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddcph, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_fmadd_round_pch(a: __m512h, b: __m512h, c: __m512h) -> __m512h { static_assert_rounding!(ROUNDING); _mm512_mask3_fmadd_round_pch::(a, b, c, 0xffff) @@ -4477,7 +4477,7 @@ pub fn _mm512_fmadd_round_pch(a: __m512h, b: __m512h, c: __ #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddcph, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_fmadd_round_pch( a: __m512h, k: __mmask16, @@ -4509,7 +4509,7 @@ pub fn _mm512_mask_fmadd_round_pch( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddcph, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask3_fmadd_round_pch( a: __m512h, b: __m512h, @@ -4546,7 +4546,7 @@ pub fn _mm512_mask3_fmadd_round_pch( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddcph, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_fmadd_round_pch( k: __mmask16, a: __m512h, @@ -4574,7 +4574,7 @@ pub fn _mm512_maskz_fmadd_round_pch( #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddcsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_fmadd_sch(a: __m128h, b: __m128h, c: __m128h) -> __m128h { _mm_fmadd_round_sch::<_MM_FROUND_CUR_DIRECTION>(a, b, c) } @@ -4589,7 +4589,7 @@ pub fn _mm_fmadd_sch(a: __m128h, b: __m128h, c: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddcsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_fmadd_sch(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) -> __m128h { _mm_mask_fmadd_round_sch::<_MM_FROUND_CUR_DIRECTION>(a, k, b, c) } @@ -4604,7 +4604,7 @@ pub fn _mm_mask_fmadd_sch(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) -> __ #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddcsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask3_fmadd_sch(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) -> __m128h { _mm_mask3_fmadd_round_sch::<_MM_FROUND_CUR_DIRECTION>(a, b, c, k) } @@ -4619,7 +4619,7 @@ pub fn _mm_mask3_fmadd_sch(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) -> _ #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddcsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_fmadd_sch(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) -> __m128h { _mm_maskz_fmadd_round_sch::<_MM_FROUND_CUR_DIRECTION>(k, a, b, c) } @@ -4641,7 +4641,7 @@ pub fn _mm_maskz_fmadd_sch(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) -> _ #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddcsh, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_fmadd_round_sch(a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { static_assert_rounding!(ROUNDING); @@ -4674,7 +4674,7 @@ pub fn _mm_fmadd_round_sch(a: __m128h, b: __m128h, c: __m12 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddcsh, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_fmadd_round_sch( a: __m128h, k: __mmask8, @@ -4708,7 +4708,7 @@ pub fn _mm_mask_fmadd_round_sch( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddcsh, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask3_fmadd_round_sch( a: __m128h, b: __m128h, @@ -4742,7 +4742,7 @@ pub fn _mm_mask3_fmadd_round_sch( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddcsh, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_fmadd_round_sch( k: __mmask8, a: __m128h, @@ -4770,7 +4770,7 @@ pub fn _mm_maskz_fmadd_round_sch( #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfcmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_fcmadd_pch(a: __m128h, b: __m128h, c: __m128h) -> __m128h { _mm_mask3_fcmadd_pch(a, b, c, 0xff) } @@ -4785,7 +4785,7 @@ pub fn _mm_fcmadd_pch(a: __m128h, b: __m128h, c: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfcmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_fcmadd_pch(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) -> __m128h { unsafe { let r: __m128 = transmute(_mm_mask3_fcmadd_pch(a, b, c, k)); // using `0xff` would have been fine here, but this is what CLang does @@ -4803,7 +4803,7 @@ pub fn _mm_mask_fcmadd_pch(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) -> _ #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfcmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask3_fcmadd_pch(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) -> __m128h { unsafe { transmute(vfcmaddcph_mask3_128( @@ -4825,7 +4825,7 @@ pub fn _mm_mask3_fcmadd_pch(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) -> #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfcmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_fcmadd_pch(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { transmute(vfcmaddcph_maskz_128( @@ -4846,7 +4846,7 @@ pub fn _mm_maskz_fcmadd_pch(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) -> #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfcmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_fcmadd_pch(a: __m256h, b: __m256h, c: __m256h) -> __m256h { _mm256_mask3_fcmadd_pch(a, b, c, 0xff) } @@ -4861,7 +4861,7 @@ pub fn _mm256_fcmadd_pch(a: __m256h, b: __m256h, c: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfcmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_fcmadd_pch(a: __m256h, k: __mmask8, b: __m256h, c: __m256h) -> __m256h { unsafe { let r: __m256 = transmute(_mm256_mask3_fcmadd_pch(a, b, c, k)); // using `0xff` would have been fine here, but this is what CLang does @@ -4879,7 +4879,7 @@ pub fn _mm256_mask_fcmadd_pch(a: __m256h, k: __mmask8, b: __m256h, c: __m256h) - #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfcmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask3_fcmadd_pch(a: __m256h, b: __m256h, c: __m256h, k: __mmask8) -> __m256h { unsafe { transmute(vfcmaddcph_mask3_256( @@ -4901,7 +4901,7 @@ pub fn _mm256_mask3_fcmadd_pch(a: __m256h, b: __m256h, c: __m256h, k: __mmask8) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfcmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_fcmadd_pch(k: __mmask8, a: __m256h, b: __m256h, c: __m256h) -> __m256h { unsafe { transmute(vfcmaddcph_maskz_256( @@ -4922,7 +4922,7 @@ pub fn _mm256_maskz_fcmadd_pch(k: __mmask8, a: __m256h, b: __m256h, c: __m256h) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_fcmadd_pch(a: __m512h, b: __m512h, c: __m512h) -> __m512h { _mm512_fcmadd_round_pch::<_MM_FROUND_CUR_DIRECTION>(a, b, c) } @@ -4937,7 +4937,7 @@ pub fn _mm512_fcmadd_pch(a: __m512h, b: __m512h, c: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_fcmadd_pch(a: __m512h, k: __mmask16, b: __m512h, c: __m512h) -> __m512h { _mm512_mask_fcmadd_round_pch::<_MM_FROUND_CUR_DIRECTION>(a, k, b, c) } @@ -4952,7 +4952,7 @@ pub fn _mm512_mask_fcmadd_pch(a: __m512h, k: __mmask16, b: __m512h, c: __m512h) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask3_fcmadd_pch(a: __m512h, b: __m512h, c: __m512h, k: __mmask16) -> __m512h { _mm512_mask3_fcmadd_round_pch::<_MM_FROUND_CUR_DIRECTION>(a, b, c, k) } @@ -4967,7 +4967,7 @@ pub fn _mm512_mask3_fcmadd_pch(a: __m512h, b: __m512h, c: __m512h, k: __mmask16) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmaddcph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_fcmadd_pch(k: __mmask16, a: __m512h, b: __m512h, c: __m512h) -> __m512h { _mm512_maskz_fcmadd_round_pch::<_MM_FROUND_CUR_DIRECTION>(k, a, b, c) } @@ -4990,7 +4990,7 @@ pub fn _mm512_maskz_fcmadd_pch(k: __mmask16, a: __m512h, b: __m512h, c: __m512h) #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmaddcph, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_fcmadd_round_pch(a: __m512h, b: __m512h, c: __m512h) -> __m512h { static_assert_rounding!(ROUNDING); _mm512_mask3_fcmadd_round_pch::(a, b, c, 0xffff) @@ -5015,7 +5015,7 @@ pub fn _mm512_fcmadd_round_pch(a: __m512h, b: __m512h, c: _ #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmaddcph, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_fcmadd_round_pch( a: __m512h, k: __mmask16, @@ -5048,7 +5048,7 @@ pub fn _mm512_mask_fcmadd_round_pch( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmaddcph, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask3_fcmadd_round_pch( a: __m512h, b: __m512h, @@ -5086,7 +5086,7 @@ pub fn _mm512_mask3_fcmadd_round_pch( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmaddcph, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_fcmadd_round_pch( k: __mmask16, a: __m512h, @@ -5115,7 +5115,7 @@ pub fn _mm512_maskz_fcmadd_round_pch( #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmaddcsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_fcmadd_sch(a: __m128h, b: __m128h, c: __m128h) -> __m128h { _mm_fcmadd_round_sch::<_MM_FROUND_CUR_DIRECTION>(a, b, c) } @@ -5131,7 +5131,7 @@ pub fn _mm_fcmadd_sch(a: __m128h, b: __m128h, c: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmaddcsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_fcmadd_sch(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) -> __m128h { _mm_mask_fcmadd_round_sch::<_MM_FROUND_CUR_DIRECTION>(a, k, b, c) } @@ -5147,7 +5147,7 @@ pub fn _mm_mask_fcmadd_sch(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) -> _ #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmaddcsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask3_fcmadd_sch(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) -> __m128h { _mm_mask3_fcmadd_round_sch::<_MM_FROUND_CUR_DIRECTION>(a, b, c, k) } @@ -5163,7 +5163,7 @@ pub fn _mm_mask3_fcmadd_sch(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) -> #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmaddcsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_fcmadd_sch(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) -> __m128h { _mm_maskz_fcmadd_round_sch::<_MM_FROUND_CUR_DIRECTION>(k, a, b, c) } @@ -5187,7 +5187,7 @@ pub fn _mm_maskz_fcmadd_sch(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) -> #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmaddcsh, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_fcmadd_round_sch(a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { static_assert_rounding!(ROUNDING); @@ -5221,7 +5221,7 @@ pub fn _mm_fcmadd_round_sch(a: __m128h, b: __m128h, c: __m1 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmaddcsh, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_fcmadd_round_sch( a: __m128h, k: __mmask8, @@ -5256,7 +5256,7 @@ pub fn _mm_mask_fcmadd_round_sch( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmaddcsh, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask3_fcmadd_round_sch( a: __m128h, b: __m128h, @@ -5291,7 +5291,7 @@ pub fn _mm_mask3_fcmadd_round_sch( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfcmaddcsh, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_fcmadd_round_sch( k: __mmask8, a: __m128h, @@ -5317,7 +5317,7 @@ pub fn _mm_maskz_fcmadd_round_sch( #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_fmadd_ph(a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { simd_fma(a, b, c) } @@ -5331,7 +5331,7 @@ pub const fn _mm_fmadd_ph(a: __m128h, b: __m128h, c: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_fmadd_ph(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) -> __m128h { unsafe { simd_select_bitmask(k, _mm_fmadd_ph(a, b, c), a) } @@ -5345,7 +5345,7 @@ pub const fn _mm_mask_fmadd_ph(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask3_fmadd_ph(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) -> __m128h { unsafe { simd_select_bitmask(k, _mm_fmadd_ph(a, b, c), c) } @@ -5359,7 +5359,7 @@ pub const fn _mm_mask3_fmadd_ph(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_maskz_fmadd_ph(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { simd_select_bitmask(k, _mm_fmadd_ph(a, b, c), _mm_setzero_ph()) } @@ -5372,7 +5372,7 @@ pub const fn _mm_maskz_fmadd_ph(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_fmadd_ph(a: __m256h, b: __m256h, c: __m256h) -> __m256h { unsafe { simd_fma(a, b, c) } @@ -5386,7 +5386,7 @@ pub const fn _mm256_fmadd_ph(a: __m256h, b: __m256h, c: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_mask_fmadd_ph(a: __m256h, k: __mmask16, b: __m256h, c: __m256h) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_fmadd_ph(a, b, c), a) } @@ -5400,7 +5400,7 @@ pub const fn _mm256_mask_fmadd_ph(a: __m256h, k: __mmask16, b: __m256h, c: __m25 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_mask3_fmadd_ph(a: __m256h, b: __m256h, c: __m256h, k: __mmask16) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_fmadd_ph(a, b, c), c) } @@ -5414,7 +5414,7 @@ pub const fn _mm256_mask3_fmadd_ph(a: __m256h, b: __m256h, c: __m256h, k: __mmas #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_maskz_fmadd_ph(k: __mmask16, a: __m256h, b: __m256h, c: __m256h) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_fmadd_ph(a, b, c), _mm256_setzero_ph()) } @@ -5427,7 +5427,7 @@ pub const fn _mm256_maskz_fmadd_ph(k: __mmask16, a: __m256h, b: __m256h, c: __m2 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_fmadd_ph(a: __m512h, b: __m512h, c: __m512h) -> __m512h { unsafe { simd_fma(a, b, c) } @@ -5441,7 +5441,7 @@ pub const fn _mm512_fmadd_ph(a: __m512h, b: __m512h, c: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_mask_fmadd_ph(a: __m512h, k: __mmask32, b: __m512h, c: __m512h) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_fmadd_ph(a, b, c), a) } @@ -5455,7 +5455,7 @@ pub const fn _mm512_mask_fmadd_ph(a: __m512h, k: __mmask32, b: __m512h, c: __m51 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_mask3_fmadd_ph(a: __m512h, b: __m512h, c: __m512h, k: __mmask32) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_fmadd_ph(a, b, c), c) } @@ -5469,7 +5469,7 @@ pub const fn _mm512_mask3_fmadd_ph(a: __m512h, b: __m512h, c: __m512h, k: __mmas #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_maskz_fmadd_ph(k: __mmask32, a: __m512h, b: __m512h, c: __m512h) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_fmadd_ph(a, b, c), _mm512_setzero_ph()) } @@ -5491,7 +5491,7 @@ pub const fn _mm512_maskz_fmadd_ph(k: __mmask32, a: __m512h, b: __m512h, c: __m5 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmadd, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_fmadd_round_ph(a: __m512h, b: __m512h, c: __m512h) -> __m512h { unsafe { static_assert_rounding!(ROUNDING); @@ -5516,7 +5516,7 @@ pub fn _mm512_fmadd_round_ph(a: __m512h, b: __m512h, c: __m #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmadd, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_fmadd_round_ph( a: __m512h, k: __mmask32, @@ -5546,7 +5546,7 @@ pub fn _mm512_mask_fmadd_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmadd, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask3_fmadd_round_ph( a: __m512h, b: __m512h, @@ -5576,7 +5576,7 @@ pub fn _mm512_mask3_fmadd_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmadd, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_fmadd_round_ph( k: __mmask32, a: __m512h, @@ -5601,7 +5601,7 @@ pub fn _mm512_maskz_fmadd_round_ph( #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_fmadd_sh(a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { @@ -5622,7 +5622,7 @@ pub const fn _mm_fmadd_sh(a: __m128h, b: __m128h, c: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_fmadd_sh(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) -> __m128h { unsafe { @@ -5645,7 +5645,7 @@ pub const fn _mm_mask_fmadd_sh(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask3_fmadd_sh(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) -> __m128h { unsafe { @@ -5668,7 +5668,7 @@ pub const fn _mm_mask3_fmadd_sh(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_maskz_fmadd_sh(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { @@ -5700,7 +5700,7 @@ pub const fn _mm_maskz_fmadd_sh(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmadd, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_fmadd_round_sh(a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { static_assert_rounding!(ROUNDING); @@ -5730,7 +5730,7 @@ pub fn _mm_fmadd_round_sh(a: __m128h, b: __m128h, c: __m128 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmadd, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_fmadd_round_sh( a: __m128h, k: __mmask8, @@ -5767,7 +5767,7 @@ pub fn _mm_mask_fmadd_round_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmadd, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask3_fmadd_round_sh( a: __m128h, b: __m128h, @@ -5804,7 +5804,7 @@ pub fn _mm_mask3_fmadd_round_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmadd, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_fmadd_round_sh( k: __mmask8, a: __m128h, @@ -5832,7 +5832,7 @@ pub fn _mm_maskz_fmadd_round_sh( #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_fmsub_ph(a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { simd_fma(a, b, simd_neg(c)) } @@ -5846,7 +5846,7 @@ pub const fn _mm_fmsub_ph(a: __m128h, b: __m128h, c: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_fmsub_ph(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) -> __m128h { unsafe { simd_select_bitmask(k, _mm_fmsub_ph(a, b, c), a) } @@ -5860,7 +5860,7 @@ pub const fn _mm_mask_fmsub_ph(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask3_fmsub_ph(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) -> __m128h { unsafe { simd_select_bitmask(k, _mm_fmsub_ph(a, b, c), c) } @@ -5874,7 +5874,7 @@ pub const fn _mm_mask3_fmsub_ph(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_maskz_fmsub_ph(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { simd_select_bitmask(k, _mm_fmsub_ph(a, b, c), _mm_setzero_ph()) } @@ -5887,7 +5887,7 @@ pub const fn _mm_maskz_fmsub_ph(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_fmsub_ph(a: __m256h, b: __m256h, c: __m256h) -> __m256h { unsafe { simd_fma(a, b, simd_neg(c)) } @@ -5901,7 +5901,7 @@ pub const fn _mm256_fmsub_ph(a: __m256h, b: __m256h, c: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_mask_fmsub_ph(a: __m256h, k: __mmask16, b: __m256h, c: __m256h) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_fmsub_ph(a, b, c), a) } @@ -5915,7 +5915,7 @@ pub const fn _mm256_mask_fmsub_ph(a: __m256h, k: __mmask16, b: __m256h, c: __m25 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_mask3_fmsub_ph(a: __m256h, b: __m256h, c: __m256h, k: __mmask16) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_fmsub_ph(a, b, c), c) } @@ -5929,7 +5929,7 @@ pub const fn _mm256_mask3_fmsub_ph(a: __m256h, b: __m256h, c: __m256h, k: __mmas #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_maskz_fmsub_ph(k: __mmask16, a: __m256h, b: __m256h, c: __m256h) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_fmsub_ph(a, b, c), _mm256_setzero_ph()) } @@ -5942,7 +5942,7 @@ pub const fn _mm256_maskz_fmsub_ph(k: __mmask16, a: __m256h, b: __m256h, c: __m2 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_fmsub_ph(a: __m512h, b: __m512h, c: __m512h) -> __m512h { unsafe { simd_fma(a, b, simd_neg(c)) } @@ -5956,7 +5956,7 @@ pub const fn _mm512_fmsub_ph(a: __m512h, b: __m512h, c: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_mask_fmsub_ph(a: __m512h, k: __mmask32, b: __m512h, c: __m512h) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_fmsub_ph(a, b, c), a) } @@ -5970,7 +5970,7 @@ pub const fn _mm512_mask_fmsub_ph(a: __m512h, k: __mmask32, b: __m512h, c: __m51 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_mask3_fmsub_ph(a: __m512h, b: __m512h, c: __m512h, k: __mmask32) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_fmsub_ph(a, b, c), c) } @@ -5984,7 +5984,7 @@ pub const fn _mm512_mask3_fmsub_ph(a: __m512h, b: __m512h, c: __m512h, k: __mmas #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_maskz_fmsub_ph(k: __mmask32, a: __m512h, b: __m512h, c: __m512h) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_fmsub_ph(a, b, c), _mm512_setzero_ph()) } @@ -6006,7 +6006,7 @@ pub const fn _mm512_maskz_fmsub_ph(k: __mmask32, a: __m512h, b: __m512h, c: __m5 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsub, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_fmsub_round_ph(a: __m512h, b: __m512h, c: __m512h) -> __m512h { unsafe { static_assert_rounding!(ROUNDING); @@ -6031,7 +6031,7 @@ pub fn _mm512_fmsub_round_ph(a: __m512h, b: __m512h, c: __m #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsub, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_fmsub_round_ph( a: __m512h, k: __mmask32, @@ -6061,7 +6061,7 @@ pub fn _mm512_mask_fmsub_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsub, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask3_fmsub_round_ph( a: __m512h, b: __m512h, @@ -6091,7 +6091,7 @@ pub fn _mm512_mask3_fmsub_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsub, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_fmsub_round_ph( k: __mmask32, a: __m512h, @@ -6116,7 +6116,7 @@ pub fn _mm512_maskz_fmsub_round_ph( #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_fmsub_sh(a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { @@ -6137,7 +6137,7 @@ pub const fn _mm_fmsub_sh(a: __m128h, b: __m128h, c: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_fmsub_sh(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) -> __m128h { unsafe { @@ -6160,7 +6160,7 @@ pub const fn _mm_mask_fmsub_sh(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask3_fmsub_sh(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) -> __m128h { unsafe { @@ -6183,7 +6183,7 @@ pub const fn _mm_mask3_fmsub_sh(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_maskz_fmsub_sh(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { @@ -6215,7 +6215,7 @@ pub const fn _mm_maskz_fmsub_sh(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsub, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_fmsub_round_sh(a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { static_assert_rounding!(ROUNDING); @@ -6245,7 +6245,7 @@ pub fn _mm_fmsub_round_sh(a: __m128h, b: __m128h, c: __m128 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsub, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_fmsub_round_sh( a: __m128h, k: __mmask8, @@ -6282,7 +6282,7 @@ pub fn _mm_mask_fmsub_round_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsub, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask3_fmsub_round_sh( a: __m128h, b: __m128h, @@ -6311,7 +6311,7 @@ pub fn _mm_mask3_fmsub_round_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsub, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_fmsub_round_sh( k: __mmask8, a: __m128h, @@ -6338,7 +6338,7 @@ pub fn _mm_maskz_fmsub_round_sh( #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfnmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_fnmadd_ph(a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { simd_fma(simd_neg(a), b, c) } @@ -6352,7 +6352,7 @@ pub const fn _mm_fnmadd_ph(a: __m128h, b: __m128h, c: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfnmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_fnmadd_ph(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) -> __m128h { unsafe { simd_select_bitmask(k, _mm_fnmadd_ph(a, b, c), a) } @@ -6366,7 +6366,7 @@ pub const fn _mm_mask_fnmadd_ph(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfnmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask3_fnmadd_ph(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) -> __m128h { unsafe { simd_select_bitmask(k, _mm_fnmadd_ph(a, b, c), c) } @@ -6380,7 +6380,7 @@ pub const fn _mm_mask3_fnmadd_ph(a: __m128h, b: __m128h, c: __m128h, k: __mmask8 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfnmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_maskz_fnmadd_ph(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { simd_select_bitmask(k, _mm_fnmadd_ph(a, b, c), _mm_setzero_ph()) } @@ -6393,7 +6393,7 @@ pub const fn _mm_maskz_fnmadd_ph(k: __mmask8, a: __m128h, b: __m128h, c: __m128h #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfnmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_fnmadd_ph(a: __m256h, b: __m256h, c: __m256h) -> __m256h { unsafe { simd_fma(simd_neg(a), b, c) } @@ -6407,7 +6407,7 @@ pub const fn _mm256_fnmadd_ph(a: __m256h, b: __m256h, c: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfnmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_mask_fnmadd_ph(a: __m256h, k: __mmask16, b: __m256h, c: __m256h) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_fnmadd_ph(a, b, c), a) } @@ -6421,7 +6421,7 @@ pub const fn _mm256_mask_fnmadd_ph(a: __m256h, k: __mmask16, b: __m256h, c: __m2 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfnmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_mask3_fnmadd_ph(a: __m256h, b: __m256h, c: __m256h, k: __mmask16) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_fnmadd_ph(a, b, c), c) } @@ -6435,7 +6435,7 @@ pub const fn _mm256_mask3_fnmadd_ph(a: __m256h, b: __m256h, c: __m256h, k: __mma #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfnmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_maskz_fnmadd_ph(k: __mmask16, a: __m256h, b: __m256h, c: __m256h) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_fnmadd_ph(a, b, c), _mm256_setzero_ph()) } @@ -6448,7 +6448,7 @@ pub const fn _mm256_maskz_fnmadd_ph(k: __mmask16, a: __m256h, b: __m256h, c: __m #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_fnmadd_ph(a: __m512h, b: __m512h, c: __m512h) -> __m512h { unsafe { simd_fma(simd_neg(a), b, c) } @@ -6462,7 +6462,7 @@ pub const fn _mm512_fnmadd_ph(a: __m512h, b: __m512h, c: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_mask_fnmadd_ph(a: __m512h, k: __mmask32, b: __m512h, c: __m512h) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_fnmadd_ph(a, b, c), a) } @@ -6476,7 +6476,7 @@ pub const fn _mm512_mask_fnmadd_ph(a: __m512h, k: __mmask32, b: __m512h, c: __m5 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_mask3_fnmadd_ph(a: __m512h, b: __m512h, c: __m512h, k: __mmask32) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_fnmadd_ph(a, b, c), c) } @@ -6490,7 +6490,7 @@ pub const fn _mm512_mask3_fnmadd_ph(a: __m512h, b: __m512h, c: __m512h, k: __mma #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_maskz_fnmadd_ph(k: __mmask32, a: __m512h, b: __m512h, c: __m512h) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_fnmadd_ph(a, b, c), _mm512_setzero_ph()) } @@ -6512,7 +6512,7 @@ pub const fn _mm512_maskz_fnmadd_ph(k: __mmask32, a: __m512h, b: __m512h, c: __m #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmadd, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_fnmadd_round_ph(a: __m512h, b: __m512h, c: __m512h) -> __m512h { unsafe { static_assert_rounding!(ROUNDING); @@ -6537,7 +6537,7 @@ pub fn _mm512_fnmadd_round_ph(a: __m512h, b: __m512h, c: __ #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmadd, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_fnmadd_round_ph( a: __m512h, k: __mmask32, @@ -6567,7 +6567,7 @@ pub fn _mm512_mask_fnmadd_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmadd, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask3_fnmadd_round_ph( a: __m512h, b: __m512h, @@ -6597,7 +6597,7 @@ pub fn _mm512_mask3_fnmadd_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmadd, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_fnmadd_round_ph( k: __mmask32, a: __m512h, @@ -6622,7 +6622,7 @@ pub fn _mm512_maskz_fnmadd_round_ph( #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_fnmadd_sh(a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { @@ -6643,7 +6643,7 @@ pub const fn _mm_fnmadd_sh(a: __m128h, b: __m128h, c: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_fnmadd_sh(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) -> __m128h { unsafe { @@ -6666,7 +6666,7 @@ pub const fn _mm_mask_fnmadd_sh(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask3_fnmadd_sh(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) -> __m128h { unsafe { @@ -6689,7 +6689,7 @@ pub const fn _mm_mask3_fnmadd_sh(a: __m128h, b: __m128h, c: __m128h, k: __mmask8 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_maskz_fnmadd_sh(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { @@ -6721,7 +6721,7 @@ pub const fn _mm_maskz_fnmadd_sh(k: __mmask8, a: __m128h, b: __m128h, c: __m128h #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmadd, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_fnmadd_round_sh(a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { static_assert_rounding!(ROUNDING); @@ -6751,7 +6751,7 @@ pub fn _mm_fnmadd_round_sh(a: __m128h, b: __m128h, c: __m12 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmadd, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_fnmadd_round_sh( a: __m128h, k: __mmask8, @@ -6788,7 +6788,7 @@ pub fn _mm_mask_fnmadd_round_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmadd, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask3_fnmadd_round_sh( a: __m128h, b: __m128h, @@ -6825,7 +6825,7 @@ pub fn _mm_mask3_fnmadd_round_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmadd, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_fnmadd_round_sh( k: __mmask8, a: __m128h, @@ -6852,7 +6852,7 @@ pub fn _mm_maskz_fnmadd_round_sh( #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfnmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_fnmsub_ph(a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { simd_fma(simd_neg(a), b, simd_neg(c)) } @@ -6866,7 +6866,7 @@ pub const fn _mm_fnmsub_ph(a: __m128h, b: __m128h, c: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfnmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_fnmsub_ph(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) -> __m128h { unsafe { simd_select_bitmask(k, _mm_fnmsub_ph(a, b, c), a) } @@ -6880,7 +6880,7 @@ pub const fn _mm_mask_fnmsub_ph(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfnmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask3_fnmsub_ph(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) -> __m128h { unsafe { simd_select_bitmask(k, _mm_fnmsub_ph(a, b, c), c) } @@ -6894,7 +6894,7 @@ pub const fn _mm_mask3_fnmsub_ph(a: __m128h, b: __m128h, c: __m128h, k: __mmask8 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfnmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_maskz_fnmsub_ph(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { simd_select_bitmask(k, _mm_fnmsub_ph(a, b, c), _mm_setzero_ph()) } @@ -6907,7 +6907,7 @@ pub const fn _mm_maskz_fnmsub_ph(k: __mmask8, a: __m128h, b: __m128h, c: __m128h #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfnmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_fnmsub_ph(a: __m256h, b: __m256h, c: __m256h) -> __m256h { unsafe { simd_fma(simd_neg(a), b, simd_neg(c)) } @@ -6921,7 +6921,7 @@ pub const fn _mm256_fnmsub_ph(a: __m256h, b: __m256h, c: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfnmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_mask_fnmsub_ph(a: __m256h, k: __mmask16, b: __m256h, c: __m256h) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_fnmsub_ph(a, b, c), a) } @@ -6935,7 +6935,7 @@ pub const fn _mm256_mask_fnmsub_ph(a: __m256h, k: __mmask16, b: __m256h, c: __m2 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfnmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_mask3_fnmsub_ph(a: __m256h, b: __m256h, c: __m256h, k: __mmask16) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_fnmsub_ph(a, b, c), c) } @@ -6949,7 +6949,7 @@ pub const fn _mm256_mask3_fnmsub_ph(a: __m256h, b: __m256h, c: __m256h, k: __mma #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfnmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_maskz_fnmsub_ph(k: __mmask16, a: __m256h, b: __m256h, c: __m256h) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_fnmsub_ph(a, b, c), _mm256_setzero_ph()) } @@ -6962,7 +6962,7 @@ pub const fn _mm256_maskz_fnmsub_ph(k: __mmask16, a: __m256h, b: __m256h, c: __m #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_fnmsub_ph(a: __m512h, b: __m512h, c: __m512h) -> __m512h { unsafe { simd_fma(simd_neg(a), b, simd_neg(c)) } @@ -6976,7 +6976,7 @@ pub const fn _mm512_fnmsub_ph(a: __m512h, b: __m512h, c: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_mask_fnmsub_ph(a: __m512h, k: __mmask32, b: __m512h, c: __m512h) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_fnmsub_ph(a, b, c), a) } @@ -6990,7 +6990,7 @@ pub const fn _mm512_mask_fnmsub_ph(a: __m512h, k: __mmask32, b: __m512h, c: __m5 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_mask3_fnmsub_ph(a: __m512h, b: __m512h, c: __m512h, k: __mmask32) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_fnmsub_ph(a, b, c), c) } @@ -7004,7 +7004,7 @@ pub const fn _mm512_mask3_fnmsub_ph(a: __m512h, b: __m512h, c: __m512h, k: __mma #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_maskz_fnmsub_ph(k: __mmask32, a: __m512h, b: __m512h, c: __m512h) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_fnmsub_ph(a, b, c), _mm512_setzero_ph()) } @@ -7026,7 +7026,7 @@ pub const fn _mm512_maskz_fnmsub_ph(k: __mmask32, a: __m512h, b: __m512h, c: __m #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmsub, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_fnmsub_round_ph(a: __m512h, b: __m512h, c: __m512h) -> __m512h { unsafe { static_assert_rounding!(ROUNDING); @@ -7051,7 +7051,7 @@ pub fn _mm512_fnmsub_round_ph(a: __m512h, b: __m512h, c: __ #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmsub, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_fnmsub_round_ph( a: __m512h, k: __mmask32, @@ -7081,7 +7081,7 @@ pub fn _mm512_mask_fnmsub_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmsub, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask3_fnmsub_round_ph( a: __m512h, b: __m512h, @@ -7111,7 +7111,7 @@ pub fn _mm512_mask3_fnmsub_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmsub, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_fnmsub_round_ph( k: __mmask32, a: __m512h, @@ -7136,7 +7136,7 @@ pub fn _mm512_maskz_fnmsub_round_ph( #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_fnmsub_sh(a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { @@ -7157,7 +7157,7 @@ pub const fn _mm_fnmsub_sh(a: __m128h, b: __m128h, c: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_fnmsub_sh(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) -> __m128h { unsafe { @@ -7180,7 +7180,7 @@ pub const fn _mm_mask_fnmsub_sh(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask3_fnmsub_sh(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) -> __m128h { unsafe { @@ -7203,7 +7203,7 @@ pub const fn _mm_mask3_fnmsub_sh(a: __m128h, b: __m128h, c: __m128h, k: __mmask8 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_maskz_fnmsub_sh(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { @@ -7235,7 +7235,7 @@ pub const fn _mm_maskz_fnmsub_sh(k: __mmask8, a: __m128h, b: __m128h, c: __m128h #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmsub, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_fnmsub_round_sh(a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { static_assert_rounding!(ROUNDING); @@ -7265,7 +7265,7 @@ pub fn _mm_fnmsub_round_sh(a: __m128h, b: __m128h, c: __m12 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmsub, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_fnmsub_round_sh( a: __m128h, k: __mmask8, @@ -7302,7 +7302,7 @@ pub fn _mm_mask_fnmsub_round_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmsub, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask3_fnmsub_round_sh( a: __m128h, b: __m128h, @@ -7339,7 +7339,7 @@ pub fn _mm_mask3_fnmsub_round_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfnmsub, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_fnmsub_round_sh( k: __mmask8, a: __m128h, @@ -7366,7 +7366,7 @@ pub fn _mm_maskz_fnmsub_round_sh( #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmaddsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_fmaddsub_ph(a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { @@ -7384,7 +7384,7 @@ pub const fn _mm_fmaddsub_ph(a: __m128h, b: __m128h, c: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmaddsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_fmaddsub_ph(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) -> __m128h { unsafe { simd_select_bitmask(k, _mm_fmaddsub_ph(a, b, c), a) } @@ -7398,7 +7398,7 @@ pub const fn _mm_mask_fmaddsub_ph(a: __m128h, k: __mmask8, b: __m128h, c: __m128 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmaddsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask3_fmaddsub_ph(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) -> __m128h { unsafe { simd_select_bitmask(k, _mm_fmaddsub_ph(a, b, c), c) } @@ -7412,7 +7412,7 @@ pub const fn _mm_mask3_fmaddsub_ph(a: __m128h, b: __m128h, c: __m128h, k: __mmas #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmaddsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_maskz_fmaddsub_ph(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { simd_select_bitmask(k, _mm_fmaddsub_ph(a, b, c), _mm_setzero_ph()) } @@ -7425,7 +7425,7 @@ pub const fn _mm_maskz_fmaddsub_ph(k: __mmask8, a: __m128h, b: __m128h, c: __m12 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmaddsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_fmaddsub_ph(a: __m256h, b: __m256h, c: __m256h) -> __m256h { unsafe { @@ -7447,7 +7447,7 @@ pub const fn _mm256_fmaddsub_ph(a: __m256h, b: __m256h, c: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmaddsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_mask_fmaddsub_ph(a: __m256h, k: __mmask16, b: __m256h, c: __m256h) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_fmaddsub_ph(a, b, c), a) } @@ -7461,7 +7461,7 @@ pub const fn _mm256_mask_fmaddsub_ph(a: __m256h, k: __mmask16, b: __m256h, c: __ #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmaddsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_mask3_fmaddsub_ph(a: __m256h, b: __m256h, c: __m256h, k: __mmask16) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_fmaddsub_ph(a, b, c), c) } @@ -7475,7 +7475,7 @@ pub const fn _mm256_mask3_fmaddsub_ph(a: __m256h, b: __m256h, c: __m256h, k: __m #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmaddsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_maskz_fmaddsub_ph(k: __mmask16, a: __m256h, b: __m256h, c: __m256h) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_fmaddsub_ph(a, b, c), _mm256_setzero_ph()) } @@ -7488,7 +7488,7 @@ pub const fn _mm256_maskz_fmaddsub_ph(k: __mmask16, a: __m256h, b: __m256h, c: _ #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_fmaddsub_ph(a: __m512h, b: __m512h, c: __m512h) -> __m512h { unsafe { @@ -7513,7 +7513,7 @@ pub const fn _mm512_fmaddsub_ph(a: __m512h, b: __m512h, c: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_mask_fmaddsub_ph(a: __m512h, k: __mmask32, b: __m512h, c: __m512h) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_fmaddsub_ph(a, b, c), a) } @@ -7527,7 +7527,7 @@ pub const fn _mm512_mask_fmaddsub_ph(a: __m512h, k: __mmask32, b: __m512h, c: __ #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_mask3_fmaddsub_ph(a: __m512h, b: __m512h, c: __m512h, k: __mmask32) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_fmaddsub_ph(a, b, c), c) } @@ -7541,7 +7541,7 @@ pub const fn _mm512_mask3_fmaddsub_ph(a: __m512h, b: __m512h, c: __m512h, k: __m #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddsub))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_maskz_fmaddsub_ph(k: __mmask32, a: __m512h, b: __m512h, c: __m512h) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_fmaddsub_ph(a, b, c), _mm512_setzero_ph()) } @@ -7563,7 +7563,7 @@ pub const fn _mm512_maskz_fmaddsub_ph(k: __mmask32, a: __m512h, b: __m512h, c: _ #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddsub, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_fmaddsub_round_ph( a: __m512h, b: __m512h, @@ -7592,7 +7592,7 @@ pub fn _mm512_fmaddsub_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddsub, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_fmaddsub_round_ph( a: __m512h, k: __mmask32, @@ -7622,7 +7622,7 @@ pub fn _mm512_mask_fmaddsub_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddsub, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask3_fmaddsub_round_ph( a: __m512h, b: __m512h, @@ -7652,7 +7652,7 @@ pub fn _mm512_mask3_fmaddsub_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmaddsub, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_fmaddsub_round_ph( k: __mmask32, a: __m512h, @@ -7676,7 +7676,7 @@ pub fn _mm512_maskz_fmaddsub_round_ph( #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmsubadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_fmsubadd_ph(a: __m128h, b: __m128h, c: __m128h) -> __m128h { _mm_fmaddsub_ph(a, b, unsafe { simd_neg(c) }) @@ -7690,7 +7690,7 @@ pub const fn _mm_fmsubadd_ph(a: __m128h, b: __m128h, c: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmsubadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_fmsubadd_ph(a: __m128h, k: __mmask8, b: __m128h, c: __m128h) -> __m128h { unsafe { simd_select_bitmask(k, _mm_fmsubadd_ph(a, b, c), a) } @@ -7704,7 +7704,7 @@ pub const fn _mm_mask_fmsubadd_ph(a: __m128h, k: __mmask8, b: __m128h, c: __m128 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmsubadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask3_fmsubadd_ph(a: __m128h, b: __m128h, c: __m128h, k: __mmask8) -> __m128h { unsafe { simd_select_bitmask(k, _mm_fmsubadd_ph(a, b, c), c) } @@ -7718,7 +7718,7 @@ pub const fn _mm_mask3_fmsubadd_ph(a: __m128h, b: __m128h, c: __m128h, k: __mmas #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmsubadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_maskz_fmsubadd_ph(k: __mmask8, a: __m128h, b: __m128h, c: __m128h) -> __m128h { unsafe { simd_select_bitmask(k, _mm_fmsubadd_ph(a, b, c), _mm_setzero_ph()) } @@ -7731,7 +7731,7 @@ pub const fn _mm_maskz_fmsubadd_ph(k: __mmask8, a: __m128h, b: __m128h, c: __m12 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmsubadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_fmsubadd_ph(a: __m256h, b: __m256h, c: __m256h) -> __m256h { _mm256_fmaddsub_ph(a, b, unsafe { simd_neg(c) }) @@ -7745,7 +7745,7 @@ pub const fn _mm256_fmsubadd_ph(a: __m256h, b: __m256h, c: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmsubadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_mask_fmsubadd_ph(a: __m256h, k: __mmask16, b: __m256h, c: __m256h) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_fmsubadd_ph(a, b, c), a) } @@ -7759,7 +7759,7 @@ pub const fn _mm256_mask_fmsubadd_ph(a: __m256h, k: __mmask16, b: __m256h, c: __ #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmsubadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_mask3_fmsubadd_ph(a: __m256h, b: __m256h, c: __m256h, k: __mmask16) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_fmsubadd_ph(a, b, c), c) } @@ -7773,7 +7773,7 @@ pub const fn _mm256_mask3_fmsubadd_ph(a: __m256h, b: __m256h, c: __m256h, k: __m #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfmsubadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_maskz_fmsubadd_ph(k: __mmask16, a: __m256h, b: __m256h, c: __m256h) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_fmsubadd_ph(a, b, c), _mm256_setzero_ph()) } @@ -7786,7 +7786,7 @@ pub const fn _mm256_maskz_fmsubadd_ph(k: __mmask16, a: __m256h, b: __m256h, c: _ #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsubadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_fmsubadd_ph(a: __m512h, b: __m512h, c: __m512h) -> __m512h { _mm512_fmaddsub_ph(a, b, unsafe { simd_neg(c) }) @@ -7800,7 +7800,7 @@ pub const fn _mm512_fmsubadd_ph(a: __m512h, b: __m512h, c: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsubadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_mask_fmsubadd_ph(a: __m512h, k: __mmask32, b: __m512h, c: __m512h) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_fmsubadd_ph(a, b, c), a) } @@ -7814,7 +7814,7 @@ pub const fn _mm512_mask_fmsubadd_ph(a: __m512h, k: __mmask32, b: __m512h, c: __ #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsubadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_mask3_fmsubadd_ph(a: __m512h, b: __m512h, c: __m512h, k: __mmask32) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_fmsubadd_ph(a, b, c), c) } @@ -7828,7 +7828,7 @@ pub const fn _mm512_mask3_fmsubadd_ph(a: __m512h, b: __m512h, c: __m512h, k: __m #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsubadd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_maskz_fmsubadd_ph(k: __mmask32, a: __m512h, b: __m512h, c: __m512h) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_fmsubadd_ph(a, b, c), _mm512_setzero_ph()) } @@ -7850,7 +7850,7 @@ pub const fn _mm512_maskz_fmsubadd_ph(k: __mmask32, a: __m512h, b: __m512h, c: _ #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsubadd, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_fmsubadd_round_ph( a: __m512h, b: __m512h, @@ -7879,7 +7879,7 @@ pub fn _mm512_fmsubadd_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsubadd, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_fmsubadd_round_ph( a: __m512h, k: __mmask32, @@ -7909,7 +7909,7 @@ pub fn _mm512_mask_fmsubadd_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsubadd, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask3_fmsubadd_round_ph( a: __m512h, b: __m512h, @@ -7939,7 +7939,7 @@ pub fn _mm512_mask3_fmsubadd_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfmsubadd, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_fmsubadd_round_ph( k: __mmask32, a: __m512h, @@ -7963,7 +7963,7 @@ pub fn _mm512_maskz_fmsubadd_round_ph( #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vrcpph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_rcp_ph(a: __m128h) -> __m128h { _mm_mask_rcp_ph(_mm_undefined_ph(), 0xff, a) } @@ -7976,7 +7976,7 @@ pub fn _mm_rcp_ph(a: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vrcpph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_rcp_ph(src: __m128h, k: __mmask8, a: __m128h) -> __m128h { unsafe { vrcpph_128(a, src, k) } } @@ -7989,7 +7989,7 @@ pub fn _mm_mask_rcp_ph(src: __m128h, k: __mmask8, a: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vrcpph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_rcp_ph(k: __mmask8, a: __m128h) -> __m128h { _mm_mask_rcp_ph(_mm_setzero_ph(), k, a) } @@ -8001,7 +8001,7 @@ pub fn _mm_maskz_rcp_ph(k: __mmask8, a: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vrcpph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_rcp_ph(a: __m256h) -> __m256h { _mm256_mask_rcp_ph(_mm256_undefined_ph(), 0xffff, a) } @@ -8014,7 +8014,7 @@ pub fn _mm256_rcp_ph(a: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vrcpph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_rcp_ph(src: __m256h, k: __mmask16, a: __m256h) -> __m256h { unsafe { vrcpph_256(a, src, k) } } @@ -8027,7 +8027,7 @@ pub fn _mm256_mask_rcp_ph(src: __m256h, k: __mmask16, a: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vrcpph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_rcp_ph(k: __mmask16, a: __m256h) -> __m256h { _mm256_mask_rcp_ph(_mm256_setzero_ph(), k, a) } @@ -8039,7 +8039,7 @@ pub fn _mm256_maskz_rcp_ph(k: __mmask16, a: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrcpph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_rcp_ph(a: __m512h) -> __m512h { _mm512_mask_rcp_ph(_mm512_undefined_ph(), 0xffffffff, a) } @@ -8052,7 +8052,7 @@ pub fn _mm512_rcp_ph(a: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrcpph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_rcp_ph(src: __m512h, k: __mmask32, a: __m512h) -> __m512h { unsafe { vrcpph_512(a, src, k) } } @@ -8065,7 +8065,7 @@ pub fn _mm512_mask_rcp_ph(src: __m512h, k: __mmask32, a: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrcpph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_rcp_ph(k: __mmask32, a: __m512h) -> __m512h { _mm512_mask_rcp_ph(_mm512_setzero_ph(), k, a) } @@ -8079,7 +8079,7 @@ pub fn _mm512_maskz_rcp_ph(k: __mmask32, a: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrcpsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_rcp_sh(a: __m128h, b: __m128h) -> __m128h { _mm_mask_rcp_sh(f16x8::ZERO.as_m128h(), 0xff, a, b) } @@ -8093,7 +8093,7 @@ pub fn _mm_rcp_sh(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrcpsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_rcp_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { vrcpsh(a, b, src, k) } } @@ -8107,7 +8107,7 @@ pub fn _mm_mask_rcp_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrcpsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_rcp_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_rcp_sh(f16x8::ZERO.as_m128h(), k, a, b) } @@ -8120,7 +8120,7 @@ pub fn _mm_maskz_rcp_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vrsqrtph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_rsqrt_ph(a: __m128h) -> __m128h { _mm_mask_rsqrt_ph(_mm_undefined_ph(), 0xff, a) } @@ -8134,7 +8134,7 @@ pub fn _mm_rsqrt_ph(a: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vrsqrtph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_rsqrt_ph(src: __m128h, k: __mmask8, a: __m128h) -> __m128h { unsafe { vrsqrtph_128(a, src, k) } } @@ -8148,7 +8148,7 @@ pub fn _mm_mask_rsqrt_ph(src: __m128h, k: __mmask8, a: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vrsqrtph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_rsqrt_ph(k: __mmask8, a: __m128h) -> __m128h { _mm_mask_rsqrt_ph(_mm_setzero_ph(), k, a) } @@ -8161,7 +8161,7 @@ pub fn _mm_maskz_rsqrt_ph(k: __mmask8, a: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vrsqrtph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_rsqrt_ph(a: __m256h) -> __m256h { _mm256_mask_rsqrt_ph(_mm256_undefined_ph(), 0xffff, a) } @@ -8175,7 +8175,7 @@ pub fn _mm256_rsqrt_ph(a: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vrsqrtph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_rsqrt_ph(src: __m256h, k: __mmask16, a: __m256h) -> __m256h { unsafe { vrsqrtph_256(a, src, k) } } @@ -8189,7 +8189,7 @@ pub fn _mm256_mask_rsqrt_ph(src: __m256h, k: __mmask16, a: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vrsqrtph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_rsqrt_ph(k: __mmask16, a: __m256h) -> __m256h { _mm256_mask_rsqrt_ph(_mm256_setzero_ph(), k, a) } @@ -8202,7 +8202,7 @@ pub fn _mm256_maskz_rsqrt_ph(k: __mmask16, a: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrsqrtph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_rsqrt_ph(a: __m512h) -> __m512h { _mm512_mask_rsqrt_ph(_mm512_undefined_ph(), 0xffffffff, a) } @@ -8216,7 +8216,7 @@ pub fn _mm512_rsqrt_ph(a: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrsqrtph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_rsqrt_ph(src: __m512h, k: __mmask32, a: __m512h) -> __m512h { unsafe { vrsqrtph_512(a, src, k) } } @@ -8230,7 +8230,7 @@ pub fn _mm512_mask_rsqrt_ph(src: __m512h, k: __mmask32, a: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrsqrtph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_rsqrt_ph(k: __mmask32, a: __m512h) -> __m512h { _mm512_mask_rsqrt_ph(_mm512_setzero_ph(), k, a) } @@ -8244,7 +8244,7 @@ pub fn _mm512_maskz_rsqrt_ph(k: __mmask32, a: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrsqrtsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_rsqrt_sh(a: __m128h, b: __m128h) -> __m128h { _mm_mask_rsqrt_sh(f16x8::ZERO.as_m128h(), 0xff, a, b) } @@ -8258,7 +8258,7 @@ pub fn _mm_rsqrt_sh(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrsqrtsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_rsqrt_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { vrsqrtsh(a, b, src, k) } } @@ -8272,7 +8272,7 @@ pub fn _mm_mask_rsqrt_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> _ #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrsqrtsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_rsqrt_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_rsqrt_sh(f16x8::ZERO.as_m128h(), k, a, b) } @@ -8284,7 +8284,7 @@ pub fn _mm_maskz_rsqrt_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vsqrtph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_sqrt_ph(a: __m128h) -> __m128h { unsafe { simd_fsqrt(a) } } @@ -8296,7 +8296,7 @@ pub fn _mm_sqrt_ph(a: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vsqrtph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_sqrt_ph(src: __m128h, k: __mmask8, a: __m128h) -> __m128h { unsafe { simd_select_bitmask(k, _mm_sqrt_ph(a), src) } } @@ -8308,7 +8308,7 @@ pub fn _mm_mask_sqrt_ph(src: __m128h, k: __mmask8, a: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vsqrtph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_sqrt_ph(k: __mmask8, a: __m128h) -> __m128h { unsafe { simd_select_bitmask(k, _mm_sqrt_ph(a), _mm_setzero_ph()) } } @@ -8320,7 +8320,7 @@ pub fn _mm_maskz_sqrt_ph(k: __mmask8, a: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vsqrtph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_sqrt_ph(a: __m256h) -> __m256h { unsafe { simd_fsqrt(a) } } @@ -8332,7 +8332,7 @@ pub fn _mm256_sqrt_ph(a: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vsqrtph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_sqrt_ph(src: __m256h, k: __mmask16, a: __m256h) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_sqrt_ph(a), src) } } @@ -8344,7 +8344,7 @@ pub fn _mm256_mask_sqrt_ph(src: __m256h, k: __mmask16, a: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vsqrtph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_sqrt_ph(k: __mmask16, a: __m256h) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_sqrt_ph(a), _mm256_setzero_ph()) } } @@ -8356,7 +8356,7 @@ pub fn _mm256_maskz_sqrt_ph(k: __mmask16, a: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsqrtph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_sqrt_ph(a: __m512h) -> __m512h { unsafe { simd_fsqrt(a) } } @@ -8368,7 +8368,7 @@ pub fn _mm512_sqrt_ph(a: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsqrtph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_sqrt_ph(src: __m512h, k: __mmask32, a: __m512h) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_sqrt_ph(a), src) } } @@ -8380,7 +8380,7 @@ pub fn _mm512_mask_sqrt_ph(src: __m512h, k: __mmask32, a: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsqrtph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_sqrt_ph(k: __mmask32, a: __m512h) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_sqrt_ph(a), _mm512_setzero_ph()) } } @@ -8400,7 +8400,7 @@ pub fn _mm512_maskz_sqrt_ph(k: __mmask32, a: __m512h) -> __m512h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsqrtph, ROUNDING = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_sqrt_round_ph(a: __m512h) -> __m512h { unsafe { static_assert_rounding!(ROUNDING); @@ -8423,7 +8423,7 @@ pub fn _mm512_sqrt_round_ph(a: __m512h) -> __m512h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsqrtph, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_sqrt_round_ph( src: __m512h, k: __mmask32, @@ -8450,7 +8450,7 @@ pub fn _mm512_mask_sqrt_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsqrtph, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_sqrt_round_ph(k: __mmask32, a: __m512h) -> __m512h { unsafe { static_assert_rounding!(ROUNDING); @@ -8466,7 +8466,7 @@ pub fn _mm512_maskz_sqrt_round_ph(k: __mmask32, a: __m512h) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsqrtsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_sqrt_sh(a: __m128h, b: __m128h) -> __m128h { _mm_mask_sqrt_sh(f16x8::ZERO.as_m128h(), 0xff, a, b) } @@ -8479,7 +8479,7 @@ pub fn _mm_sqrt_sh(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsqrtsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_sqrt_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_sqrt_round_sh::<_MM_FROUND_CUR_DIRECTION>(src, k, a, b) } @@ -8492,7 +8492,7 @@ pub fn _mm_mask_sqrt_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __ #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsqrtsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_sqrt_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_sqrt_sh(f16x8::ZERO.as_m128h(), k, a, b) } @@ -8513,7 +8513,7 @@ pub fn _mm_maskz_sqrt_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsqrtsh, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_sqrt_round_sh(a: __m128h, b: __m128h) -> __m128h { static_assert_rounding!(ROUNDING); _mm_mask_sqrt_round_sh::(f16x8::ZERO.as_m128h(), 0xff, a, b) @@ -8535,7 +8535,7 @@ pub fn _mm_sqrt_round_sh(a: __m128h, b: __m128h) -> __m128h #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsqrtsh, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_sqrt_round_sh( src: __m128h, k: __mmask8, @@ -8564,7 +8564,7 @@ pub fn _mm_mask_sqrt_round_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vsqrtsh, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_sqrt_round_sh( k: __mmask8, a: __m128h, @@ -8582,7 +8582,7 @@ pub fn _mm_maskz_sqrt_round_sh( #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vmaxph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_max_ph(a: __m128h, b: __m128h) -> __m128h { unsafe { vmaxph_128(a, b) } } @@ -8596,7 +8596,7 @@ pub fn _mm_max_ph(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vmaxph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_max_ph(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { simd_select_bitmask(k, _mm_max_ph(a, b), src) } } @@ -8610,7 +8610,7 @@ pub fn _mm_mask_max_ph(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vmaxph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_max_ph(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { simd_select_bitmask(k, _mm_max_ph(a, b), _mm_setzero_ph()) } } @@ -8623,7 +8623,7 @@ pub fn _mm_maskz_max_ph(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vmaxph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_max_ph(a: __m256h, b: __m256h) -> __m256h { unsafe { vmaxph_256(a, b) } } @@ -8637,7 +8637,7 @@ pub fn _mm256_max_ph(a: __m256h, b: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vmaxph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_max_ph(src: __m256h, k: __mmask16, a: __m256h, b: __m256h) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_max_ph(a, b), src) } } @@ -8651,7 +8651,7 @@ pub fn _mm256_mask_max_ph(src: __m256h, k: __mmask16, a: __m256h, b: __m256h) -> #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vmaxph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_max_ph(k: __mmask16, a: __m256h, b: __m256h) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_max_ph(a, b), _mm256_setzero_ph()) } } @@ -8664,7 +8664,7 @@ pub fn _mm256_maskz_max_ph(k: __mmask16, a: __m256h, b: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vmaxph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_max_ph(a: __m512h, b: __m512h) -> __m512h { _mm512_max_round_ph::<_MM_FROUND_CUR_DIRECTION>(a, b) } @@ -8678,7 +8678,7 @@ pub fn _mm512_max_ph(a: __m512h, b: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vmaxph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_max_ph(src: __m512h, k: __mmask32, a: __m512h, b: __m512h) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_max_ph(a, b), src) } } @@ -8692,7 +8692,7 @@ pub fn _mm512_mask_max_ph(src: __m512h, k: __mmask32, a: __m512h, b: __m512h) -> #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vmaxph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_max_ph(k: __mmask32, a: __m512h, b: __m512h) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_max_ph(a, b), _mm512_setzero_ph()) } } @@ -8707,7 +8707,7 @@ pub fn _mm512_maskz_max_ph(k: __mmask32, a: __m512h, b: __m512h) -> __m512h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vmaxph, SAE = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_max_round_ph(a: __m512h, b: __m512h) -> __m512h { unsafe { static_assert_sae!(SAE); @@ -8725,7 +8725,7 @@ pub fn _mm512_max_round_ph(a: __m512h, b: __m512h) -> __m512h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vmaxph, SAE = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_max_round_ph( src: __m512h, k: __mmask32, @@ -8748,7 +8748,7 @@ pub fn _mm512_mask_max_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vmaxph, SAE = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_max_round_ph(k: __mmask32, a: __m512h, b: __m512h) -> __m512h { unsafe { static_assert_sae!(SAE); @@ -8765,7 +8765,7 @@ pub fn _mm512_maskz_max_round_ph(k: __mmask32, a: __m512h, b: __ #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vmaxsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_max_sh(a: __m128h, b: __m128h) -> __m128h { _mm_mask_max_sh(_mm_undefined_ph(), 0xff, a, b) } @@ -8779,7 +8779,7 @@ pub fn _mm_max_sh(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vmaxsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_max_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_max_round_sh::<_MM_FROUND_CUR_DIRECTION>(src, k, a, b) } @@ -8793,7 +8793,7 @@ pub fn _mm_mask_max_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vmaxsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_max_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_max_sh(f16x8::ZERO.as_m128h(), k, a, b) } @@ -8808,7 +8808,7 @@ pub fn _mm_maskz_max_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vmaxsh, SAE = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_max_round_sh(a: __m128h, b: __m128h) -> __m128h { static_assert_sae!(SAE); _mm_mask_max_round_sh::(_mm_undefined_ph(), 0xff, a, b) @@ -8825,7 +8825,7 @@ pub fn _mm_max_round_sh(a: __m128h, b: __m128h) -> __m128h { #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vmaxsh, SAE = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_max_round_sh( src: __m128h, k: __mmask8, @@ -8849,7 +8849,7 @@ pub fn _mm_mask_max_round_sh( #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vmaxsh, SAE = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_max_round_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { static_assert_sae!(SAE); _mm_mask_max_round_sh::(f16x8::ZERO.as_m128h(), k, a, b) @@ -8863,7 +8863,7 @@ pub fn _mm_maskz_max_round_sh(k: __mmask8, a: __m128h, b: __m128 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vminph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_min_ph(a: __m128h, b: __m128h) -> __m128h { unsafe { vminph_128(a, b) } } @@ -8877,7 +8877,7 @@ pub fn _mm_min_ph(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vminph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_min_ph(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { simd_select_bitmask(k, _mm_min_ph(a, b), src) } } @@ -8891,7 +8891,7 @@ pub fn _mm_mask_min_ph(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vminph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_min_ph(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { simd_select_bitmask(k, _mm_min_ph(a, b), _mm_setzero_ph()) } } @@ -8904,7 +8904,7 @@ pub fn _mm_maskz_min_ph(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vminph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_min_ph(a: __m256h, b: __m256h) -> __m256h { unsafe { vminph_256(a, b) } } @@ -8918,7 +8918,7 @@ pub fn _mm256_min_ph(a: __m256h, b: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vminph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_min_ph(src: __m256h, k: __mmask16, a: __m256h, b: __m256h) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_min_ph(a, b), src) } } @@ -8932,7 +8932,7 @@ pub fn _mm256_mask_min_ph(src: __m256h, k: __mmask16, a: __m256h, b: __m256h) -> #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vminph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_min_ph(k: __mmask16, a: __m256h, b: __m256h) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_min_ph(a, b), _mm256_setzero_ph()) } } @@ -8945,7 +8945,7 @@ pub fn _mm256_maskz_min_ph(k: __mmask16, a: __m256h, b: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vminph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_min_ph(a: __m512h, b: __m512h) -> __m512h { _mm512_min_round_ph::<_MM_FROUND_CUR_DIRECTION>(a, b) } @@ -8959,7 +8959,7 @@ pub fn _mm512_min_ph(a: __m512h, b: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vminph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_min_ph(src: __m512h, k: __mmask32, a: __m512h, b: __m512h) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_min_ph(a, b), src) } } @@ -8973,7 +8973,7 @@ pub fn _mm512_mask_min_ph(src: __m512h, k: __mmask32, a: __m512h, b: __m512h) -> #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vminph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_min_ph(k: __mmask32, a: __m512h, b: __m512h) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_min_ph(a, b), _mm512_setzero_ph()) } } @@ -8987,7 +8987,7 @@ pub fn _mm512_maskz_min_ph(k: __mmask32, a: __m512h, b: __m512h) -> __m512h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vminph, SAE = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_min_round_ph(a: __m512h, b: __m512h) -> __m512h { unsafe { static_assert_sae!(SAE); @@ -9005,7 +9005,7 @@ pub fn _mm512_min_round_ph(a: __m512h, b: __m512h) -> __m512h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vminph, SAE = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_min_round_ph( src: __m512h, k: __mmask32, @@ -9028,7 +9028,7 @@ pub fn _mm512_mask_min_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vminph, SAE = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_min_round_ph(k: __mmask32, a: __m512h, b: __m512h) -> __m512h { unsafe { static_assert_sae!(SAE); @@ -9045,7 +9045,7 @@ pub fn _mm512_maskz_min_round_ph(k: __mmask32, a: __m512h, b: __ #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vminsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_min_sh(a: __m128h, b: __m128h) -> __m128h { _mm_mask_min_sh(_mm_undefined_ph(), 0xff, a, b) } @@ -9059,7 +9059,7 @@ pub fn _mm_min_sh(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vminsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_min_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_min_round_sh::<_MM_FROUND_CUR_DIRECTION>(src, k, a, b) } @@ -9073,7 +9073,7 @@ pub fn _mm_mask_min_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vminsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_min_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_min_sh(f16x8::ZERO.as_m128h(), k, a, b) } @@ -9088,7 +9088,7 @@ pub fn _mm_maskz_min_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vminsh, SAE = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_min_round_sh(a: __m128h, b: __m128h) -> __m128h { static_assert_sae!(SAE); _mm_mask_min_round_sh::(_mm_undefined_ph(), 0xff, a, b) @@ -9105,7 +9105,7 @@ pub fn _mm_min_round_sh(a: __m128h, b: __m128h) -> __m128h { #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vminsh, SAE = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_min_round_sh( src: __m128h, k: __mmask8, @@ -9129,7 +9129,7 @@ pub fn _mm_mask_min_round_sh( #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vminsh, SAE = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_min_round_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { static_assert_sae!(SAE); _mm_mask_min_round_sh::(f16x8::ZERO.as_m128h(), k, a, b) @@ -9143,7 +9143,7 @@ pub fn _mm_maskz_min_round_sh(k: __mmask8, a: __m128h, b: __m128 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vgetexpph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_getexp_ph(a: __m128h) -> __m128h { _mm_mask_getexp_ph(_mm_undefined_ph(), 0xff, a) } @@ -9157,7 +9157,7 @@ pub fn _mm_getexp_ph(a: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vgetexpph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_getexp_ph(src: __m128h, k: __mmask8, a: __m128h) -> __m128h { unsafe { vgetexpph_128(a, src, k) } } @@ -9171,7 +9171,7 @@ pub fn _mm_mask_getexp_ph(src: __m128h, k: __mmask8, a: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vgetexpph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_getexp_ph(k: __mmask8, a: __m128h) -> __m128h { _mm_mask_getexp_ph(_mm_setzero_ph(), k, a) } @@ -9184,7 +9184,7 @@ pub fn _mm_maskz_getexp_ph(k: __mmask8, a: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vgetexpph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_getexp_ph(a: __m256h) -> __m256h { _mm256_mask_getexp_ph(_mm256_undefined_ph(), 0xffff, a) } @@ -9198,7 +9198,7 @@ pub fn _mm256_getexp_ph(a: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vgetexpph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_getexp_ph(src: __m256h, k: __mmask16, a: __m256h) -> __m256h { unsafe { vgetexpph_256(a, src, k) } } @@ -9212,7 +9212,7 @@ pub fn _mm256_mask_getexp_ph(src: __m256h, k: __mmask16, a: __m256h) -> __m256h #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vgetexpph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_getexp_ph(k: __mmask16, a: __m256h) -> __m256h { _mm256_mask_getexp_ph(_mm256_setzero_ph(), k, a) } @@ -9225,7 +9225,7 @@ pub fn _mm256_maskz_getexp_ph(k: __mmask16, a: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vgetexpph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_getexp_ph(a: __m512h) -> __m512h { _mm512_mask_getexp_ph(_mm512_undefined_ph(), 0xffffffff, a) } @@ -9239,7 +9239,7 @@ pub fn _mm512_getexp_ph(a: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vgetexpph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_getexp_ph(src: __m512h, k: __mmask32, a: __m512h) -> __m512h { _mm512_mask_getexp_round_ph::<_MM_FROUND_CUR_DIRECTION>(src, k, a) } @@ -9253,7 +9253,7 @@ pub fn _mm512_mask_getexp_ph(src: __m512h, k: __mmask32, a: __m512h) -> __m512h #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vgetexpph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_getexp_ph(k: __mmask32, a: __m512h) -> __m512h { _mm512_mask_getexp_ph(_mm512_setzero_ph(), k, a) } @@ -9268,7 +9268,7 @@ pub fn _mm512_maskz_getexp_ph(k: __mmask32, a: __m512h) -> __m512h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vgetexpph, SAE = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_getexp_round_ph(a: __m512h) -> __m512h { static_assert_sae!(SAE); _mm512_mask_getexp_round_ph::(_mm512_undefined_ph(), 0xffffffff, a) @@ -9284,7 +9284,7 @@ pub fn _mm512_getexp_round_ph(a: __m512h) -> __m512h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vgetexpph, SAE = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_getexp_round_ph( src: __m512h, k: __mmask32, @@ -9306,7 +9306,7 @@ pub fn _mm512_mask_getexp_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vgetexpph, SAE = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_getexp_round_ph(k: __mmask32, a: __m512h) -> __m512h { static_assert_sae!(SAE); _mm512_mask_getexp_round_ph::(_mm512_setzero_ph(), k, a) @@ -9321,7 +9321,7 @@ pub fn _mm512_maskz_getexp_round_ph(k: __mmask32, a: __m512h) -> #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vgetexpsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_getexp_sh(a: __m128h, b: __m128h) -> __m128h { _mm_mask_getexp_sh(f16x8::ZERO.as_m128h(), 0xff, a, b) } @@ -9336,7 +9336,7 @@ pub fn _mm_getexp_sh(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vgetexpsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_getexp_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_getexp_round_sh::<_MM_FROUND_CUR_DIRECTION>(src, k, a, b) } @@ -9351,7 +9351,7 @@ pub fn _mm_mask_getexp_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vgetexpsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_getexp_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_getexp_sh(f16x8::ZERO.as_m128h(), k, a, b) } @@ -9367,7 +9367,7 @@ pub fn _mm_maskz_getexp_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vgetexpsh, SAE = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_getexp_round_sh(a: __m128h, b: __m128h) -> __m128h { static_assert_sae!(SAE); _mm_mask_getexp_round_sh::(f16x8::ZERO.as_m128h(), 0xff, a, b) @@ -9384,7 +9384,7 @@ pub fn _mm_getexp_round_sh(a: __m128h, b: __m128h) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vgetexpsh, SAE = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_getexp_round_sh( src: __m128h, k: __mmask8, @@ -9408,7 +9408,7 @@ pub fn _mm_mask_getexp_round_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vgetexpsh, SAE = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_getexp_round_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { static_assert_sae!(SAE); _mm_mask_getexp_round_sh::(f16x8::ZERO.as_m128h(), k, a, b) @@ -9436,7 +9436,7 @@ pub fn _mm_maskz_getexp_round_sh(k: __mmask8, a: __m128h, b: __m #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vgetmantph, NORM = 0, SIGN = 0))] #[rustc_legacy_const_generics(1, 2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_getmant_ph( a: __m128h, ) -> __m128h { @@ -9468,7 +9468,7 @@ pub fn _mm_getmant_ph( a: __m256h, ) -> __m256h { @@ -9574,7 +9574,7 @@ pub fn _mm256_getmant_ph( a: __m512h, ) -> __m512h { @@ -9680,7 +9680,7 @@ pub fn _mm512_getmant_ph( a: __m128h, b: __m128h, @@ -9911,7 +9911,7 @@ pub fn _mm_getmant_sh(a: __m128h) -> __m128h { static_assert_uimm_bits!(IMM8, 8); _mm_mask_roundscale_ph::(_mm_undefined_ph(), 0xff, a) @@ -10131,7 +10131,7 @@ pub fn _mm_roundscale_ph(a: __m128h) -> __m128h { #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vrndscaleph, IMM8 = 0))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_roundscale_ph(src: __m128h, k: __mmask8, a: __m128h) -> __m128h { unsafe { static_assert_uimm_bits!(IMM8, 8); @@ -10156,7 +10156,7 @@ pub fn _mm_mask_roundscale_ph(src: __m128h, k: __mmask8, a: __m #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vrndscaleph, IMM8 = 0))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_roundscale_ph(k: __mmask8, a: __m128h) -> __m128h { static_assert_uimm_bits!(IMM8, 8); _mm_mask_roundscale_ph::(_mm_setzero_ph(), k, a) @@ -10178,7 +10178,7 @@ pub fn _mm_maskz_roundscale_ph(k: __mmask8, a: __m128h) -> __m1 #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vrndscaleph, IMM8 = 0))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_roundscale_ph(a: __m256h) -> __m256h { static_assert_uimm_bits!(IMM8, 8); _mm256_mask_roundscale_ph::(_mm256_undefined_ph(), 0xffff, a) @@ -10201,7 +10201,7 @@ pub fn _mm256_roundscale_ph(a: __m256h) -> __m256h { #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vrndscaleph, IMM8 = 0))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_roundscale_ph( src: __m256h, k: __mmask16, @@ -10230,7 +10230,7 @@ pub fn _mm256_mask_roundscale_ph( #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vrndscaleph, IMM8 = 0))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_roundscale_ph(k: __mmask16, a: __m256h) -> __m256h { static_assert_uimm_bits!(IMM8, 8); _mm256_mask_roundscale_ph::(_mm256_setzero_ph(), k, a) @@ -10252,7 +10252,7 @@ pub fn _mm256_maskz_roundscale_ph(k: __mmask16, a: __m256h) -> #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrndscaleph, IMM8 = 0))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_roundscale_ph(a: __m512h) -> __m512h { static_assert_uimm_bits!(IMM8, 8); _mm512_mask_roundscale_ph::(_mm512_undefined_ph(), 0xffffffff, a) @@ -10275,7 +10275,7 @@ pub fn _mm512_roundscale_ph(a: __m512h) -> __m512h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrndscaleph, IMM8 = 0))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_roundscale_ph( src: __m512h, k: __mmask32, @@ -10302,7 +10302,7 @@ pub fn _mm512_mask_roundscale_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrndscaleph, IMM8 = 0))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_roundscale_ph(k: __mmask32, a: __m512h) -> __m512h { static_assert_uimm_bits!(IMM8, 8); _mm512_mask_roundscale_ph::(_mm512_setzero_ph(), k, a) @@ -10325,7 +10325,7 @@ pub fn _mm512_maskz_roundscale_ph(k: __mmask32, a: __m512h) -> #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrndscaleph, IMM8 = 0, SAE = 8))] #[rustc_legacy_const_generics(1, 2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_roundscale_round_ph(a: __m512h) -> __m512h { static_assert_uimm_bits!(IMM8, 8); static_assert_sae!(SAE); @@ -10350,7 +10350,7 @@ pub fn _mm512_roundscale_round_ph(a: __m512h) - #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrndscaleph, IMM8 = 0, SAE = 8))] #[rustc_legacy_const_generics(3, 4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_roundscale_round_ph( src: __m512h, k: __mmask32, @@ -10380,7 +10380,7 @@ pub fn _mm512_mask_roundscale_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrndscaleph, IMM8 = 0, SAE = 8))] #[rustc_legacy_const_generics(2, 3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_roundscale_round_ph( k: __mmask32, a: __m512h, @@ -10407,7 +10407,7 @@ pub fn _mm512_maskz_roundscale_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrndscalesh, IMM8 = 0))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_roundscale_sh(a: __m128h, b: __m128h) -> __m128h { static_assert_uimm_bits!(IMM8, 8); _mm_mask_roundscale_sh::(f16x8::ZERO.as_m128h(), 0xff, a, b) @@ -10430,7 +10430,7 @@ pub fn _mm_roundscale_sh(a: __m128h, b: __m128h) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrndscalesh, IMM8 = 0))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_roundscale_sh( src: __m128h, k: __mmask8, @@ -10458,7 +10458,7 @@ pub fn _mm_mask_roundscale_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrndscalesh, IMM8 = 0))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_roundscale_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { static_assert_uimm_bits!(IMM8, 8); _mm_mask_roundscale_sh::(f16x8::ZERO.as_m128h(), k, a, b) @@ -10483,7 +10483,7 @@ pub fn _mm_maskz_roundscale_sh(k: __mmask8, a: __m128h, b: __m1 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrndscalesh, IMM8 = 0, SAE = 8))] #[rustc_legacy_const_generics(2, 3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_roundscale_round_sh(a: __m128h, b: __m128h) -> __m128h { static_assert_uimm_bits!(IMM8, 8); static_assert_sae!(SAE); @@ -10509,7 +10509,7 @@ pub fn _mm_roundscale_round_sh(a: __m128h, b: _ #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrndscalesh, IMM8 = 0, SAE = 8))] #[rustc_legacy_const_generics(4, 5)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_roundscale_round_sh( src: __m128h, k: __mmask8, @@ -10542,7 +10542,7 @@ pub fn _mm_mask_roundscale_round_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vrndscalesh, IMM8 = 0, SAE = 8))] #[rustc_legacy_const_generics(3, 4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_roundscale_round_sh( k: __mmask8, a: __m128h, @@ -10560,7 +10560,7 @@ pub fn _mm_maskz_roundscale_round_sh( #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vscalefph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_scalef_ph(a: __m128h, b: __m128h) -> __m128h { _mm_mask_scalef_ph(_mm_undefined_ph(), 0xff, a, b) } @@ -10572,7 +10572,7 @@ pub fn _mm_scalef_ph(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vscalefph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_scalef_ph(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { vscalefph_128(a, b, src, k) } } @@ -10584,7 +10584,7 @@ pub fn _mm_mask_scalef_ph(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vscalefph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_scalef_ph(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_scalef_ph(_mm_setzero_ph(), k, a, b) } @@ -10596,7 +10596,7 @@ pub fn _mm_maskz_scalef_ph(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vscalefph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_scalef_ph(a: __m256h, b: __m256h) -> __m256h { _mm256_mask_scalef_ph(_mm256_undefined_ph(), 0xffff, a, b) } @@ -10608,7 +10608,7 @@ pub fn _mm256_scalef_ph(a: __m256h, b: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vscalefph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_scalef_ph(src: __m256h, k: __mmask16, a: __m256h, b: __m256h) -> __m256h { unsafe { vscalefph_256(a, b, src, k) } } @@ -10620,7 +10620,7 @@ pub fn _mm256_mask_scalef_ph(src: __m256h, k: __mmask16, a: __m256h, b: __m256h) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vscalefph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_scalef_ph(k: __mmask16, a: __m256h, b: __m256h) -> __m256h { _mm256_mask_scalef_ph(_mm256_setzero_ph(), k, a, b) } @@ -10632,7 +10632,7 @@ pub fn _mm256_maskz_scalef_ph(k: __mmask16, a: __m256h, b: __m256h) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vscalefph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_scalef_ph(a: __m512h, b: __m512h) -> __m512h { _mm512_mask_scalef_ph(_mm512_undefined_ph(), 0xffffffff, a, b) } @@ -10644,7 +10644,7 @@ pub fn _mm512_scalef_ph(a: __m512h, b: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vscalefph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_scalef_ph(src: __m512h, k: __mmask32, a: __m512h, b: __m512h) -> __m512h { _mm512_mask_scalef_round_ph::<_MM_FROUND_CUR_DIRECTION>(src, k, a, b) } @@ -10656,7 +10656,7 @@ pub fn _mm512_mask_scalef_ph(src: __m512h, k: __mmask32, a: __m512h, b: __m512h) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vscalefph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_scalef_ph(k: __mmask32, a: __m512h, b: __m512h) -> __m512h { _mm512_mask_scalef_ph(_mm512_setzero_ph(), k, a, b) } @@ -10677,7 +10677,7 @@ pub fn _mm512_maskz_scalef_ph(k: __mmask32, a: __m512h, b: __m512h) -> __m512h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vscalefph, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_scalef_round_ph(a: __m512h, b: __m512h) -> __m512h { static_assert_rounding!(ROUNDING); _mm512_mask_scalef_round_ph::(_mm512_undefined_ph(), 0xffffffff, a, b) @@ -10699,7 +10699,7 @@ pub fn _mm512_scalef_round_ph(a: __m512h, b: __m512h) -> __ #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vscalefph, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_scalef_round_ph( src: __m512h, k: __mmask32, @@ -10728,7 +10728,7 @@ pub fn _mm512_mask_scalef_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vscalefph, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_scalef_round_ph( k: __mmask32, a: __m512h, @@ -10746,7 +10746,7 @@ pub fn _mm512_maskz_scalef_round_ph( #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vscalefsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_scalef_sh(a: __m128h, b: __m128h) -> __m128h { _mm_mask_scalef_sh(f16x8::ZERO.as_m128h(), 0xff, a, b) } @@ -10759,7 +10759,7 @@ pub fn _mm_scalef_sh(a: __m128h, b: __m128h) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vscalefsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_scalef_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_scalef_round_sh::<_MM_FROUND_CUR_DIRECTION>(src, k, a, b) } @@ -10772,7 +10772,7 @@ pub fn _mm_mask_scalef_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128h) -> #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vscalefsh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_scalef_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { _mm_mask_scalef_sh(f16x8::ZERO.as_m128h(), k, a, b) } @@ -10794,7 +10794,7 @@ pub fn _mm_maskz_scalef_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vscalefsh, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_scalef_round_sh(a: __m128h, b: __m128h) -> __m128h { static_assert_rounding!(ROUNDING); _mm_mask_scalef_round_sh::(f16x8::ZERO.as_m128h(), 0xff, a, b) @@ -10817,7 +10817,7 @@ pub fn _mm_scalef_round_sh(a: __m128h, b: __m128h) -> __m12 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vscalefsh, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_scalef_round_sh( src: __m128h, k: __mmask8, @@ -10847,7 +10847,7 @@ pub fn _mm_mask_scalef_round_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vscalefsh, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_scalef_round_sh( k: __mmask8, a: __m128h, @@ -10873,7 +10873,7 @@ pub fn _mm_maskz_scalef_round_sh( #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vreduceph, IMM8 = 0))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_reduce_ph(a: __m128h) -> __m128h { static_assert_uimm_bits!(IMM8, 8); _mm_mask_reduce_ph::(_mm_undefined_ph(), 0xff, a) @@ -10896,7 +10896,7 @@ pub fn _mm_reduce_ph(a: __m128h) -> __m128h { #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vreduceph, IMM8 = 0))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_reduce_ph(src: __m128h, k: __mmask8, a: __m128h) -> __m128h { unsafe { static_assert_uimm_bits!(IMM8, 8); @@ -10921,7 +10921,7 @@ pub fn _mm_mask_reduce_ph(src: __m128h, k: __mmask8, a: __m128h #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vreduceph, IMM8 = 0))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_reduce_ph(k: __mmask8, a: __m128h) -> __m128h { static_assert_uimm_bits!(IMM8, 8); _mm_mask_reduce_ph::(_mm_setzero_ph(), k, a) @@ -10943,7 +10943,7 @@ pub fn _mm_maskz_reduce_ph(k: __mmask8, a: __m128h) -> __m128h #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vreduceph, IMM8 = 0))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_reduce_ph(a: __m256h) -> __m256h { static_assert_uimm_bits!(IMM8, 8); _mm256_mask_reduce_ph::(_mm256_undefined_ph(), 0xffff, a) @@ -10966,7 +10966,7 @@ pub fn _mm256_reduce_ph(a: __m256h) -> __m256h { #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vreduceph, IMM8 = 0))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_reduce_ph(src: __m256h, k: __mmask16, a: __m256h) -> __m256h { unsafe { static_assert_uimm_bits!(IMM8, 8); @@ -10991,7 +10991,7 @@ pub fn _mm256_mask_reduce_ph(src: __m256h, k: __mmask16, a: __m #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vreduceph, IMM8 = 0))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_reduce_ph(k: __mmask16, a: __m256h) -> __m256h { static_assert_uimm_bits!(IMM8, 8); _mm256_mask_reduce_ph::(_mm256_setzero_ph(), k, a) @@ -11013,7 +11013,7 @@ pub fn _mm256_maskz_reduce_ph(k: __mmask16, a: __m256h) -> __m2 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vreduceph, IMM8 = 0))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_reduce_ph(a: __m512h) -> __m512h { static_assert_uimm_bits!(IMM8, 8); _mm512_mask_reduce_ph::(_mm512_undefined_ph(), 0xffffffff, a) @@ -11036,7 +11036,7 @@ pub fn _mm512_reduce_ph(a: __m512h) -> __m512h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vreduceph, IMM8 = 0))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_reduce_ph(src: __m512h, k: __mmask32, a: __m512h) -> __m512h { static_assert_uimm_bits!(IMM8, 8); _mm512_mask_reduce_round_ph::(src, k, a) @@ -11059,7 +11059,7 @@ pub fn _mm512_mask_reduce_ph(src: __m512h, k: __mmask32, a: __m #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vreduceph, IMM8 = 0))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_reduce_ph(k: __mmask32, a: __m512h) -> __m512h { static_assert_uimm_bits!(IMM8, 8); _mm512_mask_reduce_ph::(_mm512_setzero_ph(), k, a) @@ -11083,7 +11083,7 @@ pub fn _mm512_maskz_reduce_ph(k: __mmask32, a: __m512h) -> __m5 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vreduceph, IMM8 = 0, SAE = 8))] #[rustc_legacy_const_generics(1, 2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_reduce_round_ph(a: __m512h) -> __m512h { static_assert_uimm_bits!(IMM8, 8); static_assert_sae!(SAE); @@ -11109,7 +11109,7 @@ pub fn _mm512_reduce_round_ph(a: __m512h) -> __ #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vreduceph, IMM8 = 0, SAE = 8))] #[rustc_legacy_const_generics(3, 4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_reduce_round_ph( src: __m512h, k: __mmask32, @@ -11141,7 +11141,7 @@ pub fn _mm512_mask_reduce_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vreduceph, IMM8 = 0, SAE = 8))] #[rustc_legacy_const_generics(2, 3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_reduce_round_ph( k: __mmask32, a: __m512h, @@ -11168,7 +11168,7 @@ pub fn _mm512_maskz_reduce_round_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vreducesh, IMM8 = 0))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_reduce_sh(a: __m128h, b: __m128h) -> __m128h { static_assert_uimm_bits!(IMM8, 8); _mm_mask_reduce_sh::(f16x8::ZERO.as_m128h(), 0xff, a, b) @@ -11192,7 +11192,7 @@ pub fn _mm_reduce_sh(a: __m128h, b: __m128h) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vreducesh, IMM8 = 0))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_reduce_sh( src: __m128h, k: __mmask8, @@ -11221,7 +11221,7 @@ pub fn _mm_mask_reduce_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vreducesh, IMM8 = 0))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_reduce_sh(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { static_assert_uimm_bits!(IMM8, 8); _mm_mask_reduce_sh::(f16x8::ZERO.as_m128h(), k, a, b) @@ -11246,7 +11246,7 @@ pub fn _mm_maskz_reduce_sh(k: __mmask8, a: __m128h, b: __m128h) #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vreducesh, IMM8 = 0, SAE = 8))] #[rustc_legacy_const_generics(2, 3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_reduce_round_sh(a: __m128h, b: __m128h) -> __m128h { static_assert_uimm_bits!(IMM8, 8); static_assert_sae!(SAE); @@ -11273,7 +11273,7 @@ pub fn _mm_reduce_round_sh(a: __m128h, b: __m12 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vreducesh, IMM8 = 0, SAE = 8))] #[rustc_legacy_const_generics(4, 5)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_reduce_round_sh( src: __m128h, k: __mmask8, @@ -11307,7 +11307,7 @@ pub fn _mm_mask_reduce_round_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vreducesh, IMM8 = 0, SAE = 8))] #[rustc_legacy_const_generics(3, 4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_reduce_round_sh( k: __mmask8, a: __m128h, @@ -11582,7 +11582,7 @@ macro_rules! fpclass_asm { // FIXME: use LLVM intrinsics #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfpclassph, IMM8 = 0))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_fpclass_ph_mask(a: __m128h) -> __mmask8 { unsafe { static_assert_uimm_bits!(IMM8, 8); @@ -11609,7 +11609,7 @@ pub fn _mm_fpclass_ph_mask(a: __m128h) -> __mmask8 { #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfpclassph, IMM8 = 0))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_fpclass_ph_mask(k1: __mmask8, a: __m128h) -> __mmask8 { unsafe { static_assert_uimm_bits!(IMM8, 8); @@ -11635,7 +11635,7 @@ pub fn _mm_mask_fpclass_ph_mask(k1: __mmask8, a: __m128h) -> __ #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfpclassph, IMM8 = 0))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_fpclass_ph_mask(a: __m256h) -> __mmask16 { unsafe { static_assert_uimm_bits!(IMM8, 8); @@ -11662,7 +11662,7 @@ pub fn _mm256_fpclass_ph_mask(a: __m256h) -> __mmask16 { #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vfpclassph, IMM8 = 0))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_fpclass_ph_mask(k1: __mmask16, a: __m256h) -> __mmask16 { unsafe { static_assert_uimm_bits!(IMM8, 8); @@ -11688,7 +11688,7 @@ pub fn _mm256_mask_fpclass_ph_mask(k1: __mmask16, a: __m256h) - #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfpclassph, IMM8 = 0))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_fpclass_ph_mask(a: __m512h) -> __mmask32 { unsafe { static_assert_uimm_bits!(IMM8, 8); @@ -11715,7 +11715,7 @@ pub fn _mm512_fpclass_ph_mask(a: __m512h) -> __mmask32 { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfpclassph, IMM8 = 0))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_fpclass_ph_mask(k1: __mmask32, a: __m512h) -> __mmask32 { unsafe { static_assert_uimm_bits!(IMM8, 8); @@ -11741,7 +11741,7 @@ pub fn _mm512_mask_fpclass_ph_mask(k1: __mmask32, a: __m512h) - #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfpclasssh, IMM8 = 0))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_fpclass_sh_mask(a: __m128h) -> __mmask8 { _mm_mask_fpclass_sh_mask::(0xff, a) } @@ -11765,7 +11765,7 @@ pub fn _mm_fpclass_sh_mask(a: __m128h) -> __mmask8 { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vfpclasssh, IMM8 = 0))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_fpclass_sh_mask(k1: __mmask8, a: __m128h) -> __mmask8 { unsafe { static_assert_uimm_bits!(IMM8, 8); @@ -11779,7 +11779,7 @@ pub fn _mm_mask_fpclass_sh_mask(k1: __mmask8, a: __m128h) -> __ /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_mask_blend_ph) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_mask_blend_ph(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { unsafe { simd_select_bitmask(k, b, a) } @@ -11791,7 +11791,7 @@ pub const fn _mm_mask_blend_ph(k: __mmask8, a: __m128h, b: __m128h) -> __m128h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_mask_blend_ph) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm256_mask_blend_ph(k: __mmask16, a: __m256h, b: __m256h) -> __m256h { unsafe { simd_select_bitmask(k, b, a) } @@ -11803,7 +11803,7 @@ pub const fn _mm256_mask_blend_ph(k: __mmask16, a: __m256h, b: __m256h) -> __m25 /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_mask_blend_ph) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm512_mask_blend_ph(k: __mmask32, a: __m512h, b: __m512h) -> __m512h { unsafe { simd_select_bitmask(k, b, a) } @@ -11815,7 +11815,7 @@ pub const fn _mm512_mask_blend_ph(k: __mmask32, a: __m512h, b: __m512h) -> __m51 /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_permutex2var_ph) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_permutex2var_ph(a: __m128h, idx: __m128i, b: __m128h) -> __m128h { _mm_castsi128_ph(_mm_permutex2var_epi16( _mm_castph_si128(a), @@ -11830,7 +11830,7 @@ pub fn _mm_permutex2var_ph(a: __m128h, idx: __m128i, b: __m128h) -> __m128h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_permutex2var_ph) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_permutex2var_ph(a: __m256h, idx: __m256i, b: __m256h) -> __m256h { _mm256_castsi256_ph(_mm256_permutex2var_epi16( _mm256_castph_si256(a), @@ -11845,7 +11845,7 @@ pub fn _mm256_permutex2var_ph(a: __m256h, idx: __m256i, b: __m256h) -> __m256h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_permutex2var_ph) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_permutex2var_ph(a: __m512h, idx: __m512i, b: __m512h) -> __m512h { _mm512_castsi512_ph(_mm512_permutex2var_epi16( _mm512_castph_si512(a), @@ -11860,7 +11860,7 @@ pub fn _mm512_permutex2var_ph(a: __m512h, idx: __m512i, b: __m512h) -> __m512h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_permutexvar_ph) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_permutexvar_ph(idx: __m128i, a: __m128h) -> __m128h { _mm_castsi128_ph(_mm_permutexvar_epi16(idx, _mm_castph_si128(a))) } @@ -11871,7 +11871,7 @@ pub fn _mm_permutexvar_ph(idx: __m128i, a: __m128h) -> __m128h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_permutexvar_ph) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_permutexvar_ph(idx: __m256i, a: __m256h) -> __m256h { _mm256_castsi256_ph(_mm256_permutexvar_epi16(idx, _mm256_castph_si256(a))) } @@ -11882,7 +11882,7 @@ pub fn _mm256_permutexvar_ph(idx: __m256i, a: __m256h) -> __m256h { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_permutexvar_ph) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_permutexvar_ph(idx: __m512i, a: __m512h) -> __m512h { _mm512_castsi512_ph(_mm512_permutexvar_epi16(idx, _mm512_castph_si512(a))) } @@ -11894,7 +11894,7 @@ pub fn _mm512_permutexvar_ph(idx: __m512i, a: __m512h) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtw2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtepi16_ph(a: __m128i) -> __m128h { unsafe { vcvtw2ph_128(a.as_i16x8(), _MM_FROUND_CUR_DIRECTION) } } @@ -11907,7 +11907,7 @@ pub fn _mm_cvtepi16_ph(a: __m128i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtw2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvtepi16_ph(src: __m128h, k: __mmask8, a: __m128i) -> __m128h { unsafe { simd_select_bitmask(k, _mm_cvtepi16_ph(a), src) } } @@ -11919,7 +11919,7 @@ pub fn _mm_mask_cvtepi16_ph(src: __m128h, k: __mmask8, a: __m128i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtw2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvtepi16_ph(k: __mmask8, a: __m128i) -> __m128h { _mm_mask_cvtepi16_ph(_mm_setzero_ph(), k, a) } @@ -11931,7 +11931,7 @@ pub fn _mm_maskz_cvtepi16_ph(k: __mmask8, a: __m128i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtw2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvtepi16_ph(a: __m256i) -> __m256h { unsafe { vcvtw2ph_256(a.as_i16x16(), _MM_FROUND_CUR_DIRECTION) } } @@ -11944,7 +11944,7 @@ pub fn _mm256_cvtepi16_ph(a: __m256i) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtw2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvtepi16_ph(src: __m256h, k: __mmask16, a: __m256i) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_cvtepi16_ph(a), src) } } @@ -11956,7 +11956,7 @@ pub fn _mm256_mask_cvtepi16_ph(src: __m256h, k: __mmask16, a: __m256i) -> __m256 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtw2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvtepi16_ph(k: __mmask16, a: __m256i) -> __m256h { _mm256_mask_cvtepi16_ph(_mm256_setzero_ph(), k, a) } @@ -11968,7 +11968,7 @@ pub fn _mm256_maskz_cvtepi16_ph(k: __mmask16, a: __m256i) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtw2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtepi16_ph(a: __m512i) -> __m512h { unsafe { vcvtw2ph_512(a.as_i16x32(), _MM_FROUND_CUR_DIRECTION) } } @@ -11981,7 +11981,7 @@ pub fn _mm512_cvtepi16_ph(a: __m512i) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtw2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtepi16_ph(src: __m512h, k: __mmask32, a: __m512i) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_cvtepi16_ph(a), src) } } @@ -11993,7 +11993,7 @@ pub fn _mm512_mask_cvtepi16_ph(src: __m512h, k: __mmask32, a: __m512i) -> __m512 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtw2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtepi16_ph(k: __mmask32, a: __m512i) -> __m512h { _mm512_mask_cvtepi16_ph(_mm512_setzero_ph(), k, a) } @@ -12014,7 +12014,7 @@ pub fn _mm512_maskz_cvtepi16_ph(k: __mmask32, a: __m512i) -> __m512h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtw2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvt_roundepi16_ph(a: __m512i) -> __m512h { unsafe { static_assert_rounding!(ROUNDING); @@ -12039,7 +12039,7 @@ pub fn _mm512_cvt_roundepi16_ph(a: __m512i) -> __m512h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtw2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvt_roundepi16_ph( src: __m512h, k: __mmask32, @@ -12067,7 +12067,7 @@ pub fn _mm512_mask_cvt_roundepi16_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtw2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvt_roundepi16_ph(k: __mmask32, a: __m512i) -> __m512h { static_assert_rounding!(ROUNDING); _mm512_mask_cvt_roundepi16_ph::(_mm512_setzero_ph(), k, a) @@ -12080,7 +12080,7 @@ pub fn _mm512_maskz_cvt_roundepi16_ph(k: __mmask32, a: __m5 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtuw2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtepu16_ph(a: __m128i) -> __m128h { unsafe { vcvtuw2ph_128(a.as_u16x8(), _MM_FROUND_CUR_DIRECTION) } } @@ -12093,7 +12093,7 @@ pub fn _mm_cvtepu16_ph(a: __m128i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtuw2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvtepu16_ph(src: __m128h, k: __mmask8, a: __m128i) -> __m128h { unsafe { simd_select_bitmask(k, _mm_cvtepu16_ph(a), src) } } @@ -12105,7 +12105,7 @@ pub fn _mm_mask_cvtepu16_ph(src: __m128h, k: __mmask8, a: __m128i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtuw2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvtepu16_ph(k: __mmask8, a: __m128i) -> __m128h { _mm_mask_cvtepu16_ph(_mm_setzero_ph(), k, a) } @@ -12117,7 +12117,7 @@ pub fn _mm_maskz_cvtepu16_ph(k: __mmask8, a: __m128i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtuw2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvtepu16_ph(a: __m256i) -> __m256h { unsafe { vcvtuw2ph_256(a.as_u16x16(), _MM_FROUND_CUR_DIRECTION) } } @@ -12130,7 +12130,7 @@ pub fn _mm256_cvtepu16_ph(a: __m256i) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtuw2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvtepu16_ph(src: __m256h, k: __mmask16, a: __m256i) -> __m256h { unsafe { simd_select_bitmask(k, _mm256_cvtepu16_ph(a), src) } } @@ -12142,7 +12142,7 @@ pub fn _mm256_mask_cvtepu16_ph(src: __m256h, k: __mmask16, a: __m256i) -> __m256 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtuw2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvtepu16_ph(k: __mmask16, a: __m256i) -> __m256h { _mm256_mask_cvtepu16_ph(_mm256_setzero_ph(), k, a) } @@ -12154,7 +12154,7 @@ pub fn _mm256_maskz_cvtepu16_ph(k: __mmask16, a: __m256i) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtuw2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtepu16_ph(a: __m512i) -> __m512h { unsafe { vcvtuw2ph_512(a.as_u16x32(), _MM_FROUND_CUR_DIRECTION) } } @@ -12167,7 +12167,7 @@ pub fn _mm512_cvtepu16_ph(a: __m512i) -> __m512h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtuw2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtepu16_ph(src: __m512h, k: __mmask32, a: __m512i) -> __m512h { unsafe { simd_select_bitmask(k, _mm512_cvtepu16_ph(a), src) } } @@ -12179,7 +12179,7 @@ pub fn _mm512_mask_cvtepu16_ph(src: __m512h, k: __mmask32, a: __m512i) -> __m512 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtuw2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtepu16_ph(k: __mmask32, a: __m512i) -> __m512h { _mm512_mask_cvtepu16_ph(_mm512_setzero_ph(), k, a) } @@ -12200,7 +12200,7 @@ pub fn _mm512_maskz_cvtepu16_ph(k: __mmask32, a: __m512i) -> __m512h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtuw2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvt_roundepu16_ph(a: __m512i) -> __m512h { unsafe { static_assert_rounding!(ROUNDING); @@ -12225,7 +12225,7 @@ pub fn _mm512_cvt_roundepu16_ph(a: __m512i) -> __m512h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtuw2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvt_roundepu16_ph( src: __m512h, k: __mmask32, @@ -12253,7 +12253,7 @@ pub fn _mm512_mask_cvt_roundepu16_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtuw2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvt_roundepu16_ph(k: __mmask32, a: __m512i) -> __m512h { static_assert_rounding!(ROUNDING); _mm512_mask_cvt_roundepu16_ph::(_mm512_setzero_ph(), k, a) @@ -12266,7 +12266,7 @@ pub fn _mm512_maskz_cvt_roundepu16_ph(k: __mmask32, a: __m5 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtdq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtepi32_ph(a: __m128i) -> __m128h { _mm_mask_cvtepi32_ph(_mm_setzero_ph(), 0xff, a) } @@ -12279,7 +12279,7 @@ pub fn _mm_cvtepi32_ph(a: __m128i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtdq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvtepi32_ph(src: __m128h, k: __mmask8, a: __m128i) -> __m128h { unsafe { vcvtdq2ph_128(a.as_i32x4(), src, k) } } @@ -12292,7 +12292,7 @@ pub fn _mm_mask_cvtepi32_ph(src: __m128h, k: __mmask8, a: __m128i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtdq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvtepi32_ph(k: __mmask8, a: __m128i) -> __m128h { _mm_mask_cvtepi32_ph(_mm_setzero_ph(), k, a) } @@ -12304,7 +12304,7 @@ pub fn _mm_maskz_cvtepi32_ph(k: __mmask8, a: __m128i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtdq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvtepi32_ph(a: __m256i) -> __m128h { unsafe { vcvtdq2ph_256(a.as_i32x8(), _MM_FROUND_CUR_DIRECTION) } } @@ -12317,7 +12317,7 @@ pub fn _mm256_cvtepi32_ph(a: __m256i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtdq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvtepi32_ph(src: __m128h, k: __mmask8, a: __m256i) -> __m128h { unsafe { simd_select_bitmask(k, _mm256_cvtepi32_ph(a), src) } } @@ -12329,7 +12329,7 @@ pub fn _mm256_mask_cvtepi32_ph(src: __m128h, k: __mmask8, a: __m256i) -> __m128h #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtdq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvtepi32_ph(k: __mmask8, a: __m256i) -> __m128h { _mm256_mask_cvtepi32_ph(_mm_setzero_ph(), k, a) } @@ -12341,7 +12341,7 @@ pub fn _mm256_maskz_cvtepi32_ph(k: __mmask8, a: __m256i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtdq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtepi32_ph(a: __m512i) -> __m256h { unsafe { vcvtdq2ph_512(a.as_i32x16(), _MM_FROUND_CUR_DIRECTION) } } @@ -12354,7 +12354,7 @@ pub fn _mm512_cvtepi32_ph(a: __m512i) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtdq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtepi32_ph(src: __m256h, k: __mmask16, a: __m512i) -> __m256h { unsafe { simd_select_bitmask(k, _mm512_cvtepi32_ph(a), src) } } @@ -12366,7 +12366,7 @@ pub fn _mm512_mask_cvtepi32_ph(src: __m256h, k: __mmask16, a: __m512i) -> __m256 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtdq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtepi32_ph(k: __mmask16, a: __m512i) -> __m256h { _mm512_mask_cvtepi32_ph(f16x16::ZERO.as_m256h(), k, a) } @@ -12387,7 +12387,7 @@ pub fn _mm512_maskz_cvtepi32_ph(k: __mmask16, a: __m512i) -> __m256h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtdq2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvt_roundepi32_ph(a: __m512i) -> __m256h { unsafe { static_assert_rounding!(ROUNDING); @@ -12412,7 +12412,7 @@ pub fn _mm512_cvt_roundepi32_ph(a: __m512i) -> __m256h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtdq2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvt_roundepi32_ph( src: __m256h, k: __mmask16, @@ -12440,7 +12440,7 @@ pub fn _mm512_mask_cvt_roundepi32_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtdq2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvt_roundepi32_ph(k: __mmask16, a: __m512i) -> __m256h { static_assert_rounding!(ROUNDING); _mm512_mask_cvt_roundepi32_ph::(f16x16::ZERO.as_m256h(), k, a) @@ -12454,7 +12454,7 @@ pub fn _mm512_maskz_cvt_roundepi32_ph(k: __mmask16, a: __m5 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsi2sh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvti32_sh(a: __m128h, b: i32) -> __m128h { unsafe { vcvtsi2sh(a, b, _MM_FROUND_CUR_DIRECTION) } } @@ -12476,7 +12476,7 @@ pub fn _mm_cvti32_sh(a: __m128h, b: i32) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsi2sh, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvt_roundi32_sh(a: __m128h, b: i32) -> __m128h { unsafe { static_assert_rounding!(ROUNDING); @@ -12491,7 +12491,7 @@ pub fn _mm_cvt_roundi32_sh(a: __m128h, b: i32) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtudq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtepu32_ph(a: __m128i) -> __m128h { _mm_mask_cvtepu32_ph(_mm_setzero_ph(), 0xff, a) } @@ -12504,7 +12504,7 @@ pub fn _mm_cvtepu32_ph(a: __m128i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtudq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvtepu32_ph(src: __m128h, k: __mmask8, a: __m128i) -> __m128h { unsafe { vcvtudq2ph_128(a.as_u32x4(), src, k) } } @@ -12517,7 +12517,7 @@ pub fn _mm_mask_cvtepu32_ph(src: __m128h, k: __mmask8, a: __m128i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtudq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvtepu32_ph(k: __mmask8, a: __m128i) -> __m128h { _mm_mask_cvtepu32_ph(_mm_setzero_ph(), k, a) } @@ -12529,7 +12529,7 @@ pub fn _mm_maskz_cvtepu32_ph(k: __mmask8, a: __m128i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtudq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvtepu32_ph(a: __m256i) -> __m128h { unsafe { vcvtudq2ph_256(a.as_u32x8(), _MM_FROUND_CUR_DIRECTION) } } @@ -12542,7 +12542,7 @@ pub fn _mm256_cvtepu32_ph(a: __m256i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtudq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvtepu32_ph(src: __m128h, k: __mmask8, a: __m256i) -> __m128h { unsafe { simd_select_bitmask(k, _mm256_cvtepu32_ph(a), src) } } @@ -12554,7 +12554,7 @@ pub fn _mm256_mask_cvtepu32_ph(src: __m128h, k: __mmask8, a: __m256i) -> __m128h #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtudq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvtepu32_ph(k: __mmask8, a: __m256i) -> __m128h { _mm256_mask_cvtepu32_ph(_mm_setzero_ph(), k, a) } @@ -12566,7 +12566,7 @@ pub fn _mm256_maskz_cvtepu32_ph(k: __mmask8, a: __m256i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtudq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtepu32_ph(a: __m512i) -> __m256h { unsafe { vcvtudq2ph_512(a.as_u32x16(), _MM_FROUND_CUR_DIRECTION) } } @@ -12579,7 +12579,7 @@ pub fn _mm512_cvtepu32_ph(a: __m512i) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtudq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtepu32_ph(src: __m256h, k: __mmask16, a: __m512i) -> __m256h { unsafe { simd_select_bitmask(k, _mm512_cvtepu32_ph(a), src) } } @@ -12591,7 +12591,7 @@ pub fn _mm512_mask_cvtepu32_ph(src: __m256h, k: __mmask16, a: __m512i) -> __m256 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtudq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtepu32_ph(k: __mmask16, a: __m512i) -> __m256h { _mm512_mask_cvtepu32_ph(f16x16::ZERO.as_m256h(), k, a) } @@ -12612,7 +12612,7 @@ pub fn _mm512_maskz_cvtepu32_ph(k: __mmask16, a: __m512i) -> __m256h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtudq2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvt_roundepu32_ph(a: __m512i) -> __m256h { unsafe { static_assert_rounding!(ROUNDING); @@ -12637,7 +12637,7 @@ pub fn _mm512_cvt_roundepu32_ph(a: __m512i) -> __m256h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtudq2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvt_roundepu32_ph( src: __m256h, k: __mmask16, @@ -12665,7 +12665,7 @@ pub fn _mm512_mask_cvt_roundepu32_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtudq2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvt_roundepu32_ph(k: __mmask16, a: __m512i) -> __m256h { static_assert_rounding!(ROUNDING); _mm512_mask_cvt_roundepu32_ph::(f16x16::ZERO.as_m256h(), k, a) @@ -12679,7 +12679,7 @@ pub fn _mm512_maskz_cvt_roundepu32_ph(k: __mmask16, a: __m5 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtusi2sh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtu32_sh(a: __m128h, b: u32) -> __m128h { unsafe { vcvtusi2sh(a, b, _MM_FROUND_CUR_DIRECTION) } } @@ -12701,7 +12701,7 @@ pub fn _mm_cvtu32_sh(a: __m128h, b: u32) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtusi2sh, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvt_roundu32_sh(a: __m128h, b: u32) -> __m128h { unsafe { static_assert_rounding!(ROUNDING); @@ -12716,7 +12716,7 @@ pub fn _mm_cvt_roundu32_sh(a: __m128h, b: u32) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtqq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtepi64_ph(a: __m128i) -> __m128h { _mm_mask_cvtepi64_ph(_mm_setzero_ph(), 0xff, a) } @@ -12729,7 +12729,7 @@ pub fn _mm_cvtepi64_ph(a: __m128i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtqq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvtepi64_ph(src: __m128h, k: __mmask8, a: __m128i) -> __m128h { unsafe { vcvtqq2ph_128(a.as_i64x2(), src, k) } } @@ -12742,7 +12742,7 @@ pub fn _mm_mask_cvtepi64_ph(src: __m128h, k: __mmask8, a: __m128i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtqq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvtepi64_ph(k: __mmask8, a: __m128i) -> __m128h { _mm_mask_cvtepi64_ph(_mm_setzero_ph(), k, a) } @@ -12754,7 +12754,7 @@ pub fn _mm_maskz_cvtepi64_ph(k: __mmask8, a: __m128i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtqq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvtepi64_ph(a: __m256i) -> __m128h { _mm256_mask_cvtepi64_ph(_mm_setzero_ph(), 0xff, a) } @@ -12767,7 +12767,7 @@ pub fn _mm256_cvtepi64_ph(a: __m256i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtqq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvtepi64_ph(src: __m128h, k: __mmask8, a: __m256i) -> __m128h { unsafe { vcvtqq2ph_256(a.as_i64x4(), src, k) } } @@ -12780,7 +12780,7 @@ pub fn _mm256_mask_cvtepi64_ph(src: __m128h, k: __mmask8, a: __m256i) -> __m128h #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtqq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvtepi64_ph(k: __mmask8, a: __m256i) -> __m128h { _mm256_mask_cvtepi64_ph(_mm_setzero_ph(), k, a) } @@ -12792,7 +12792,7 @@ pub fn _mm256_maskz_cvtepi64_ph(k: __mmask8, a: __m256i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtqq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtepi64_ph(a: __m512i) -> __m128h { unsafe { vcvtqq2ph_512(a.as_i64x8(), _MM_FROUND_CUR_DIRECTION) } } @@ -12805,7 +12805,7 @@ pub fn _mm512_cvtepi64_ph(a: __m512i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtqq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtepi64_ph(src: __m128h, k: __mmask8, a: __m512i) -> __m128h { unsafe { simd_select_bitmask(k, _mm512_cvtepi64_ph(a), src) } } @@ -12817,7 +12817,7 @@ pub fn _mm512_mask_cvtepi64_ph(src: __m128h, k: __mmask8, a: __m512i) -> __m128h #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtqq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtepi64_ph(k: __mmask8, a: __m512i) -> __m128h { _mm512_mask_cvtepi64_ph(f16x8::ZERO.as_m128h(), k, a) } @@ -12838,7 +12838,7 @@ pub fn _mm512_maskz_cvtepi64_ph(k: __mmask8, a: __m512i) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtqq2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvt_roundepi64_ph(a: __m512i) -> __m128h { unsafe { static_assert_rounding!(ROUNDING); @@ -12863,7 +12863,7 @@ pub fn _mm512_cvt_roundepi64_ph(a: __m512i) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtqq2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvt_roundepi64_ph( src: __m128h, k: __mmask8, @@ -12891,7 +12891,7 @@ pub fn _mm512_mask_cvt_roundepi64_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtqq2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvt_roundepi64_ph(k: __mmask8, a: __m512i) -> __m128h { static_assert_rounding!(ROUNDING); _mm512_mask_cvt_roundepi64_ph::(f16x8::ZERO.as_m128h(), k, a) @@ -12904,7 +12904,7 @@ pub fn _mm512_maskz_cvt_roundepi64_ph(k: __mmask8, a: __m51 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtuqq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtepu64_ph(a: __m128i) -> __m128h { _mm_mask_cvtepu64_ph(_mm_setzero_ph(), 0xff, a) } @@ -12917,7 +12917,7 @@ pub fn _mm_cvtepu64_ph(a: __m128i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtuqq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvtepu64_ph(src: __m128h, k: __mmask8, a: __m128i) -> __m128h { unsafe { vcvtuqq2ph_128(a.as_u64x2(), src, k) } } @@ -12930,7 +12930,7 @@ pub fn _mm_mask_cvtepu64_ph(src: __m128h, k: __mmask8, a: __m128i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtuqq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvtepu64_ph(k: __mmask8, a: __m128i) -> __m128h { _mm_mask_cvtepu64_ph(_mm_setzero_ph(), k, a) } @@ -12942,7 +12942,7 @@ pub fn _mm_maskz_cvtepu64_ph(k: __mmask8, a: __m128i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtuqq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvtepu64_ph(a: __m256i) -> __m128h { _mm256_mask_cvtepu64_ph(_mm_setzero_ph(), 0xff, a) } @@ -12955,7 +12955,7 @@ pub fn _mm256_cvtepu64_ph(a: __m256i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtuqq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvtepu64_ph(src: __m128h, k: __mmask8, a: __m256i) -> __m128h { unsafe { vcvtuqq2ph_256(a.as_u64x4(), src, k) } } @@ -12968,7 +12968,7 @@ pub fn _mm256_mask_cvtepu64_ph(src: __m128h, k: __mmask8, a: __m256i) -> __m128h #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtuqq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvtepu64_ph(k: __mmask8, a: __m256i) -> __m128h { _mm256_mask_cvtepu64_ph(_mm_setzero_ph(), k, a) } @@ -12980,7 +12980,7 @@ pub fn _mm256_maskz_cvtepu64_ph(k: __mmask8, a: __m256i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtuqq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtepu64_ph(a: __m512i) -> __m128h { unsafe { vcvtuqq2ph_512(a.as_u64x8(), _MM_FROUND_CUR_DIRECTION) } } @@ -12993,7 +12993,7 @@ pub fn _mm512_cvtepu64_ph(a: __m512i) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtuqq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtepu64_ph(src: __m128h, k: __mmask8, a: __m512i) -> __m128h { unsafe { simd_select_bitmask(k, _mm512_cvtepu64_ph(a), src) } } @@ -13005,7 +13005,7 @@ pub fn _mm512_mask_cvtepu64_ph(src: __m128h, k: __mmask8, a: __m512i) -> __m128h #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtuqq2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtepu64_ph(k: __mmask8, a: __m512i) -> __m128h { _mm512_mask_cvtepu64_ph(f16x8::ZERO.as_m128h(), k, a) } @@ -13026,7 +13026,7 @@ pub fn _mm512_maskz_cvtepu64_ph(k: __mmask8, a: __m512i) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtuqq2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvt_roundepu64_ph(a: __m512i) -> __m128h { unsafe { static_assert_rounding!(ROUNDING); @@ -13051,7 +13051,7 @@ pub fn _mm512_cvt_roundepu64_ph(a: __m512i) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtuqq2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvt_roundepu64_ph( src: __m128h, k: __mmask8, @@ -13079,7 +13079,7 @@ pub fn _mm512_mask_cvt_roundepu64_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtuqq2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvt_roundepu64_ph(k: __mmask8, a: __m512i) -> __m128h { static_assert_rounding!(ROUNDING); _mm512_mask_cvt_roundepu64_ph::(f16x8::ZERO.as_m128h(), k, a) @@ -13092,7 +13092,7 @@ pub fn _mm512_maskz_cvt_roundepu64_ph(k: __mmask8, a: __m51 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtps2phx))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtxps_ph(a: __m128) -> __m128h { _mm_mask_cvtxps_ph(_mm_setzero_ph(), 0xff, a) } @@ -13105,7 +13105,7 @@ pub fn _mm_cvtxps_ph(a: __m128) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtps2phx))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvtxps_ph(src: __m128h, k: __mmask8, a: __m128) -> __m128h { unsafe { vcvtps2phx_128(a, src, k) } } @@ -13118,7 +13118,7 @@ pub fn _mm_mask_cvtxps_ph(src: __m128h, k: __mmask8, a: __m128) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtps2phx))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvtxps_ph(k: __mmask8, a: __m128) -> __m128h { _mm_mask_cvtxps_ph(_mm_setzero_ph(), k, a) } @@ -13130,7 +13130,7 @@ pub fn _mm_maskz_cvtxps_ph(k: __mmask8, a: __m128) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtps2phx))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvtxps_ph(a: __m256) -> __m128h { _mm256_mask_cvtxps_ph(_mm_setzero_ph(), 0xff, a) } @@ -13143,7 +13143,7 @@ pub fn _mm256_cvtxps_ph(a: __m256) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtps2phx))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvtxps_ph(src: __m128h, k: __mmask8, a: __m256) -> __m128h { unsafe { vcvtps2phx_256(a, src, k) } } @@ -13156,7 +13156,7 @@ pub fn _mm256_mask_cvtxps_ph(src: __m128h, k: __mmask8, a: __m256) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtps2phx))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvtxps_ph(k: __mmask8, a: __m256) -> __m128h { _mm256_mask_cvtxps_ph(_mm_setzero_ph(), k, a) } @@ -13168,7 +13168,7 @@ pub fn _mm256_maskz_cvtxps_ph(k: __mmask8, a: __m256) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtps2phx))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtxps_ph(a: __m512) -> __m256h { _mm512_mask_cvtxps_ph(f16x16::ZERO.as_m256h(), 0xffff, a) } @@ -13181,7 +13181,7 @@ pub fn _mm512_cvtxps_ph(a: __m512) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtps2phx))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtxps_ph(src: __m256h, k: __mmask16, a: __m512) -> __m256h { unsafe { vcvtps2phx_512(a, src, k, _MM_FROUND_CUR_DIRECTION) } } @@ -13194,7 +13194,7 @@ pub fn _mm512_mask_cvtxps_ph(src: __m256h, k: __mmask16, a: __m512) -> __m256h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtps2phx))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtxps_ph(k: __mmask16, a: __m512) -> __m256h { _mm512_mask_cvtxps_ph(f16x16::ZERO.as_m256h(), k, a) } @@ -13215,7 +13215,7 @@ pub fn _mm512_maskz_cvtxps_ph(k: __mmask16, a: __m512) -> __m256h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtps2phx, ROUNDING = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtx_roundps_ph(a: __m512) -> __m256h { static_assert_rounding!(ROUNDING); _mm512_mask_cvtx_roundps_ph::(f16x16::ZERO.as_m256h(), 0xffff, a) @@ -13238,7 +13238,7 @@ pub fn _mm512_cvtx_roundps_ph(a: __m512) -> __m256h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtps2phx, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtx_roundps_ph( src: __m256h, k: __mmask16, @@ -13267,7 +13267,7 @@ pub fn _mm512_mask_cvtx_roundps_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtps2phx, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtx_roundps_ph(k: __mmask16, a: __m512) -> __m256h { static_assert_rounding!(ROUNDING); _mm512_mask_cvtx_roundps_ph::(f16x16::ZERO.as_m256h(), k, a) @@ -13281,7 +13281,7 @@ pub fn _mm512_maskz_cvtx_roundps_ph(k: __mmask16, a: __m512 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtss2sh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtss_sh(a: __m128h, b: __m128) -> __m128h { _mm_mask_cvtss_sh(f16x8::ZERO.as_m128h(), 0xff, a, b) } @@ -13295,7 +13295,7 @@ pub fn _mm_cvtss_sh(a: __m128h, b: __m128) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtss2sh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvtss_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128) -> __m128h { unsafe { vcvtss2sh(a, b, src, k, _MM_FROUND_CUR_DIRECTION) } } @@ -13309,7 +13309,7 @@ pub fn _mm_mask_cvtss_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128) -> __ #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtss2sh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvtss_sh(k: __mmask8, a: __m128h, b: __m128) -> __m128h { _mm_mask_cvtss_sh(f16x8::ZERO.as_m128h(), k, a, b) } @@ -13331,7 +13331,7 @@ pub fn _mm_maskz_cvtss_sh(k: __mmask8, a: __m128h, b: __m128) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtss2sh, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvt_roundss_sh(a: __m128h, b: __m128) -> __m128h { static_assert_rounding!(ROUNDING); _mm_mask_cvt_roundss_sh::(f16x8::ZERO.as_m128h(), 0xff, a, b) @@ -13355,7 +13355,7 @@ pub fn _mm_cvt_roundss_sh(a: __m128h, b: __m128) -> __m128h #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtss2sh, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvt_roundss_sh( src: __m128h, k: __mmask8, @@ -13386,7 +13386,7 @@ pub fn _mm_mask_cvt_roundss_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtss2sh, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvt_roundss_sh( k: __mmask8, a: __m128h, @@ -13403,7 +13403,7 @@ pub fn _mm_maskz_cvt_roundss_sh( #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtpd2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtpd_ph(a: __m128d) -> __m128h { _mm_mask_cvtpd_ph(_mm_setzero_ph(), 0xff, a) } @@ -13416,7 +13416,7 @@ pub fn _mm_cvtpd_ph(a: __m128d) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtpd2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvtpd_ph(src: __m128h, k: __mmask8, a: __m128d) -> __m128h { unsafe { vcvtpd2ph_128(a, src, k) } } @@ -13429,7 +13429,7 @@ pub fn _mm_mask_cvtpd_ph(src: __m128h, k: __mmask8, a: __m128d) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtpd2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvtpd_ph(k: __mmask8, a: __m128d) -> __m128h { _mm_mask_cvtpd_ph(_mm_setzero_ph(), k, a) } @@ -13441,7 +13441,7 @@ pub fn _mm_maskz_cvtpd_ph(k: __mmask8, a: __m128d) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtpd2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvtpd_ph(a: __m256d) -> __m128h { _mm256_mask_cvtpd_ph(_mm_setzero_ph(), 0xff, a) } @@ -13454,7 +13454,7 @@ pub fn _mm256_cvtpd_ph(a: __m256d) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtpd2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvtpd_ph(src: __m128h, k: __mmask8, a: __m256d) -> __m128h { unsafe { vcvtpd2ph_256(a, src, k) } } @@ -13467,7 +13467,7 @@ pub fn _mm256_mask_cvtpd_ph(src: __m128h, k: __mmask8, a: __m256d) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtpd2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvtpd_ph(k: __mmask8, a: __m256d) -> __m128h { _mm256_mask_cvtpd_ph(_mm_setzero_ph(), k, a) } @@ -13479,7 +13479,7 @@ pub fn _mm256_maskz_cvtpd_ph(k: __mmask8, a: __m256d) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtpd2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtpd_ph(a: __m512d) -> __m128h { _mm512_mask_cvtpd_ph(f16x8::ZERO.as_m128h(), 0xff, a) } @@ -13492,7 +13492,7 @@ pub fn _mm512_cvtpd_ph(a: __m512d) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtpd2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtpd_ph(src: __m128h, k: __mmask8, a: __m512d) -> __m128h { unsafe { vcvtpd2ph_512(a, src, k, _MM_FROUND_CUR_DIRECTION) } } @@ -13505,7 +13505,7 @@ pub fn _mm512_mask_cvtpd_ph(src: __m128h, k: __mmask8, a: __m512d) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtpd2ph))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtpd_ph(k: __mmask8, a: __m512d) -> __m128h { _mm512_mask_cvtpd_ph(f16x8::ZERO.as_m128h(), k, a) } @@ -13526,7 +13526,7 @@ pub fn _mm512_maskz_cvtpd_ph(k: __mmask8, a: __m512d) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtpd2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvt_roundpd_ph(a: __m512d) -> __m128h { static_assert_rounding!(ROUNDING); _mm512_mask_cvt_roundpd_ph::(f16x8::ZERO.as_m128h(), 0xff, a) @@ -13549,7 +13549,7 @@ pub fn _mm512_cvt_roundpd_ph(a: __m512d) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtpd2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvt_roundpd_ph( src: __m128h, k: __mmask8, @@ -13578,7 +13578,7 @@ pub fn _mm512_mask_cvt_roundpd_ph( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtpd2ph, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvt_roundpd_ph(k: __mmask8, a: __m512d) -> __m128h { static_assert_rounding!(ROUNDING); _mm512_mask_cvt_roundpd_ph::(f16x8::ZERO.as_m128h(), k, a) @@ -13592,7 +13592,7 @@ pub fn _mm512_maskz_cvt_roundpd_ph(k: __mmask8, a: __m512d) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsd2sh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtsd_sh(a: __m128h, b: __m128d) -> __m128h { _mm_mask_cvtsd_sh(f16x8::ZERO.as_m128h(), 0xff, a, b) } @@ -13606,7 +13606,7 @@ pub fn _mm_cvtsd_sh(a: __m128h, b: __m128d) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsd2sh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvtsd_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128d) -> __m128h { unsafe { vcvtsd2sh(a, b, src, k, _MM_FROUND_CUR_DIRECTION) } } @@ -13620,7 +13620,7 @@ pub fn _mm_mask_cvtsd_sh(src: __m128h, k: __mmask8, a: __m128h, b: __m128d) -> _ #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsd2sh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvtsd_sh(k: __mmask8, a: __m128h, b: __m128d) -> __m128h { _mm_mask_cvtsd_sh(f16x8::ZERO.as_m128h(), k, a, b) } @@ -13642,7 +13642,7 @@ pub fn _mm_maskz_cvtsd_sh(k: __mmask8, a: __m128h, b: __m128d) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsd2sh, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvt_roundsd_sh(a: __m128h, b: __m128d) -> __m128h { static_assert_rounding!(ROUNDING); _mm_mask_cvt_roundsd_sh::(f16x8::ZERO.as_m128h(), 0xff, a, b) @@ -13666,7 +13666,7 @@ pub fn _mm_cvt_roundsd_sh(a: __m128h, b: __m128d) -> __m128 #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsd2sh, ROUNDING = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvt_roundsd_sh( src: __m128h, k: __mmask8, @@ -13697,7 +13697,7 @@ pub fn _mm_mask_cvt_roundsd_sh( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsd2sh, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvt_roundsd_sh( k: __mmask8, a: __m128h, @@ -13714,7 +13714,7 @@ pub fn _mm_maskz_cvt_roundsd_sh( #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2w))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtph_epi16(a: __m128h) -> __m128i { _mm_mask_cvtph_epi16(_mm_undefined_si128(), 0xff, a) } @@ -13727,7 +13727,7 @@ pub fn _mm_cvtph_epi16(a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2w))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvtph_epi16(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { unsafe { transmute(vcvtph2w_128(a, src.as_i16x8(), k)) } } @@ -13739,7 +13739,7 @@ pub fn _mm_mask_cvtph_epi16(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2w))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvtph_epi16(k: __mmask8, a: __m128h) -> __m128i { _mm_mask_cvtph_epi16(_mm_setzero_si128(), k, a) } @@ -13751,7 +13751,7 @@ pub fn _mm_maskz_cvtph_epi16(k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2w))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvtph_epi16(a: __m256h) -> __m256i { _mm256_mask_cvtph_epi16(_mm256_undefined_si256(), 0xffff, a) } @@ -13764,7 +13764,7 @@ pub fn _mm256_cvtph_epi16(a: __m256h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2w))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvtph_epi16(src: __m256i, k: __mmask16, a: __m256h) -> __m256i { unsafe { transmute(vcvtph2w_256(a, src.as_i16x16(), k)) } } @@ -13776,7 +13776,7 @@ pub fn _mm256_mask_cvtph_epi16(src: __m256i, k: __mmask16, a: __m256h) -> __m256 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2w))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvtph_epi16(k: __mmask16, a: __m256h) -> __m256i { _mm256_mask_cvtph_epi16(_mm256_setzero_si256(), k, a) } @@ -13788,7 +13788,7 @@ pub fn _mm256_maskz_cvtph_epi16(k: __mmask16, a: __m256h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2w))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtph_epi16(a: __m512h) -> __m512i { _mm512_mask_cvtph_epi16(_mm512_undefined_epi32(), 0xffffffff, a) } @@ -13801,7 +13801,7 @@ pub fn _mm512_cvtph_epi16(a: __m512h) -> __m512i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2w))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtph_epi16(src: __m512i, k: __mmask32, a: __m512h) -> __m512i { unsafe { transmute(vcvtph2w_512( @@ -13820,7 +13820,7 @@ pub fn _mm512_mask_cvtph_epi16(src: __m512i, k: __mmask32, a: __m512h) -> __m512 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2w))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtph_epi16(k: __mmask32, a: __m512h) -> __m512i { _mm512_mask_cvtph_epi16(_mm512_setzero_si512(), k, a) } @@ -13841,7 +13841,7 @@ pub fn _mm512_maskz_cvtph_epi16(k: __mmask32, a: __m512h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2w, ROUNDING = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvt_roundph_epi16(a: __m512h) -> __m512i { static_assert_rounding!(ROUNDING); _mm512_mask_cvt_roundph_epi16::(_mm512_undefined_epi32(), 0xffffffff, a) @@ -13864,7 +13864,7 @@ pub fn _mm512_cvt_roundph_epi16(a: __m512h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2w, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvt_roundph_epi16( src: __m512i, k: __mmask32, @@ -13892,7 +13892,7 @@ pub fn _mm512_mask_cvt_roundph_epi16( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2w, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvt_roundph_epi16(k: __mmask32, a: __m512h) -> __m512i { static_assert_rounding!(ROUNDING); _mm512_mask_cvt_roundph_epi16::(_mm512_setzero_si512(), k, a) @@ -13905,7 +13905,7 @@ pub fn _mm512_maskz_cvt_roundph_epi16(k: __mmask32, a: __m5 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2uw))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtph_epu16(a: __m128h) -> __m128i { _mm_mask_cvtph_epu16(_mm_undefined_si128(), 0xff, a) } @@ -13918,7 +13918,7 @@ pub fn _mm_cvtph_epu16(a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2uw))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvtph_epu16(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { unsafe { transmute(vcvtph2uw_128(a, src.as_u16x8(), k)) } } @@ -13930,7 +13930,7 @@ pub fn _mm_mask_cvtph_epu16(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2uw))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvtph_epu16(k: __mmask8, a: __m128h) -> __m128i { _mm_mask_cvtph_epu16(_mm_setzero_si128(), k, a) } @@ -13942,7 +13942,7 @@ pub fn _mm_maskz_cvtph_epu16(k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2uw))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvtph_epu16(a: __m256h) -> __m256i { _mm256_mask_cvtph_epu16(_mm256_undefined_si256(), 0xffff, a) } @@ -13955,7 +13955,7 @@ pub fn _mm256_cvtph_epu16(a: __m256h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2uw))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvtph_epu16(src: __m256i, k: __mmask16, a: __m256h) -> __m256i { unsafe { transmute(vcvtph2uw_256(a, src.as_u16x16(), k)) } } @@ -13967,7 +13967,7 @@ pub fn _mm256_mask_cvtph_epu16(src: __m256i, k: __mmask16, a: __m256h) -> __m256 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2uw))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvtph_epu16(k: __mmask16, a: __m256h) -> __m256i { _mm256_mask_cvtph_epu16(_mm256_setzero_si256(), k, a) } @@ -13979,7 +13979,7 @@ pub fn _mm256_maskz_cvtph_epu16(k: __mmask16, a: __m256h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2uw))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtph_epu16(a: __m512h) -> __m512i { _mm512_mask_cvtph_epu16(_mm512_undefined_epi32(), 0xffffffff, a) } @@ -13992,7 +13992,7 @@ pub fn _mm512_cvtph_epu16(a: __m512h) -> __m512i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2uw))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtph_epu16(src: __m512i, k: __mmask32, a: __m512h) -> __m512i { unsafe { transmute(vcvtph2uw_512( @@ -14011,7 +14011,7 @@ pub fn _mm512_mask_cvtph_epu16(src: __m512i, k: __mmask32, a: __m512h) -> __m512 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2uw))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtph_epu16(k: __mmask32, a: __m512h) -> __m512i { _mm512_mask_cvtph_epu16(_mm512_setzero_si512(), k, a) } @@ -14026,7 +14026,7 @@ pub fn _mm512_maskz_cvtph_epu16(k: __mmask32, a: __m512h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2uw, SAE = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvt_roundph_epu16(a: __m512h) -> __m512i { static_assert_sae!(SAE); _mm512_mask_cvt_roundph_epu16::(_mm512_undefined_epi32(), 0xffffffff, a) @@ -14043,7 +14043,7 @@ pub fn _mm512_cvt_roundph_epu16(a: __m512h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2uw, SAE = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvt_roundph_epu16( src: __m512i, k: __mmask32, @@ -14065,7 +14065,7 @@ pub fn _mm512_mask_cvt_roundph_epu16( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2uw, SAE = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvt_roundph_epu16(k: __mmask32, a: __m512h) -> __m512i { static_assert_sae!(SAE); _mm512_mask_cvt_roundph_epu16::(_mm512_setzero_si512(), k, a) @@ -14078,7 +14078,7 @@ pub fn _mm512_maskz_cvt_roundph_epu16(k: __mmask32, a: __m512h) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2w))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvttph_epi16(a: __m128h) -> __m128i { _mm_mask_cvttph_epi16(_mm_undefined_si128(), 0xff, a) } @@ -14091,7 +14091,7 @@ pub fn _mm_cvttph_epi16(a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2w))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvttph_epi16(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { unsafe { transmute(vcvttph2w_128(a, src.as_i16x8(), k)) } } @@ -14104,7 +14104,7 @@ pub fn _mm_mask_cvttph_epi16(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2w))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvttph_epi16(k: __mmask8, a: __m128h) -> __m128i { _mm_mask_cvttph_epi16(_mm_setzero_si128(), k, a) } @@ -14116,7 +14116,7 @@ pub fn _mm_maskz_cvttph_epi16(k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2w))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvttph_epi16(a: __m256h) -> __m256i { _mm256_mask_cvttph_epi16(_mm256_undefined_si256(), 0xffff, a) } @@ -14129,7 +14129,7 @@ pub fn _mm256_cvttph_epi16(a: __m256h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2w))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvttph_epi16(src: __m256i, k: __mmask16, a: __m256h) -> __m256i { unsafe { transmute(vcvttph2w_256(a, src.as_i16x16(), k)) } } @@ -14142,7 +14142,7 @@ pub fn _mm256_mask_cvttph_epi16(src: __m256i, k: __mmask16, a: __m256h) -> __m25 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2w))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvttph_epi16(k: __mmask16, a: __m256h) -> __m256i { _mm256_mask_cvttph_epi16(_mm256_setzero_si256(), k, a) } @@ -14154,7 +14154,7 @@ pub fn _mm256_maskz_cvttph_epi16(k: __mmask16, a: __m256h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2w))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvttph_epi16(a: __m512h) -> __m512i { _mm512_mask_cvttph_epi16(_mm512_undefined_epi32(), 0xffffffff, a) } @@ -14167,7 +14167,7 @@ pub fn _mm512_cvttph_epi16(a: __m512h) -> __m512i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2w))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvttph_epi16(src: __m512i, k: __mmask32, a: __m512h) -> __m512i { unsafe { transmute(vcvttph2w_512( @@ -14187,7 +14187,7 @@ pub fn _mm512_mask_cvttph_epi16(src: __m512i, k: __mmask32, a: __m512h) -> __m51 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2w))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvttph_epi16(k: __mmask32, a: __m512h) -> __m512i { _mm512_mask_cvttph_epi16(_mm512_setzero_si512(), k, a) } @@ -14202,7 +14202,7 @@ pub fn _mm512_maskz_cvttph_epi16(k: __mmask32, a: __m512h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2w, SAE = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtt_roundph_epi16(a: __m512h) -> __m512i { static_assert_sae!(SAE); _mm512_mask_cvtt_roundph_epi16::(_mm512_undefined_epi32(), 0xffffffff, a) @@ -14219,7 +14219,7 @@ pub fn _mm512_cvtt_roundph_epi16(a: __m512h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2w, SAE = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtt_roundph_epi16( src: __m512i, k: __mmask32, @@ -14242,7 +14242,7 @@ pub fn _mm512_mask_cvtt_roundph_epi16( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2w, SAE = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtt_roundph_epi16(k: __mmask32, a: __m512h) -> __m512i { static_assert_sae!(SAE); _mm512_mask_cvtt_roundph_epi16::(_mm512_setzero_si512(), k, a) @@ -14255,7 +14255,7 @@ pub fn _mm512_maskz_cvtt_roundph_epi16(k: __mmask32, a: __m512h) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2uw))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvttph_epu16(a: __m128h) -> __m128i { _mm_mask_cvttph_epu16(_mm_undefined_si128(), 0xff, a) } @@ -14268,7 +14268,7 @@ pub fn _mm_cvttph_epu16(a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2uw))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvttph_epu16(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { unsafe { transmute(vcvttph2uw_128(a, src.as_u16x8(), k)) } } @@ -14281,7 +14281,7 @@ pub fn _mm_mask_cvttph_epu16(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2uw))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvttph_epu16(k: __mmask8, a: __m128h) -> __m128i { _mm_mask_cvttph_epu16(_mm_setzero_si128(), k, a) } @@ -14293,7 +14293,7 @@ pub fn _mm_maskz_cvttph_epu16(k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2uw))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvttph_epu16(a: __m256h) -> __m256i { _mm256_mask_cvttph_epu16(_mm256_undefined_si256(), 0xffff, a) } @@ -14306,7 +14306,7 @@ pub fn _mm256_cvttph_epu16(a: __m256h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2uw))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvttph_epu16(src: __m256i, k: __mmask16, a: __m256h) -> __m256i { unsafe { transmute(vcvttph2uw_256(a, src.as_u16x16(), k)) } } @@ -14319,7 +14319,7 @@ pub fn _mm256_mask_cvttph_epu16(src: __m256i, k: __mmask16, a: __m256h) -> __m25 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2uw))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvttph_epu16(k: __mmask16, a: __m256h) -> __m256i { _mm256_mask_cvttph_epu16(_mm256_setzero_si256(), k, a) } @@ -14331,7 +14331,7 @@ pub fn _mm256_maskz_cvttph_epu16(k: __mmask16, a: __m256h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2uw))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvttph_epu16(a: __m512h) -> __m512i { _mm512_mask_cvttph_epu16(_mm512_undefined_epi32(), 0xffffffff, a) } @@ -14344,7 +14344,7 @@ pub fn _mm512_cvttph_epu16(a: __m512h) -> __m512i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2uw))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvttph_epu16(src: __m512i, k: __mmask32, a: __m512h) -> __m512i { unsafe { transmute(vcvttph2uw_512( @@ -14364,7 +14364,7 @@ pub fn _mm512_mask_cvttph_epu16(src: __m512i, k: __mmask32, a: __m512h) -> __m51 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2uw))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvttph_epu16(k: __mmask32, a: __m512h) -> __m512i { _mm512_mask_cvttph_epu16(_mm512_setzero_si512(), k, a) } @@ -14379,7 +14379,7 @@ pub fn _mm512_maskz_cvttph_epu16(k: __mmask32, a: __m512h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2uw, SAE = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtt_roundph_epu16(a: __m512h) -> __m512i { static_assert_sae!(SAE); _mm512_mask_cvtt_roundph_epu16::(_mm512_undefined_epi32(), 0xffffffff, a) @@ -14396,7 +14396,7 @@ pub fn _mm512_cvtt_roundph_epu16(a: __m512h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2uw, SAE = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtt_roundph_epu16( src: __m512i, k: __mmask32, @@ -14419,7 +14419,7 @@ pub fn _mm512_mask_cvtt_roundph_epu16( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2uw, SAE = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtt_roundph_epu16(k: __mmask32, a: __m512h) -> __m512i { static_assert_sae!(SAE); _mm512_mask_cvtt_roundph_epu16::(_mm512_setzero_si512(), k, a) @@ -14432,7 +14432,7 @@ pub fn _mm512_maskz_cvtt_roundph_epu16(k: __mmask32, a: __m512h) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2dq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtph_epi32(a: __m128h) -> __m128i { _mm_mask_cvtph_epi32(_mm_undefined_si128(), 0xff, a) } @@ -14444,7 +14444,7 @@ pub fn _mm_cvtph_epi32(a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2dq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvtph_epi32(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { unsafe { transmute(vcvtph2dq_128(a, src.as_i32x4(), k)) } } @@ -14456,7 +14456,7 @@ pub fn _mm_mask_cvtph_epi32(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2dq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvtph_epi32(k: __mmask8, a: __m128h) -> __m128i { _mm_mask_cvtph_epi32(_mm_setzero_si128(), k, a) } @@ -14468,7 +14468,7 @@ pub fn _mm_maskz_cvtph_epi32(k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2dq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvtph_epi32(a: __m128h) -> __m256i { _mm256_mask_cvtph_epi32(_mm256_undefined_si256(), 0xff, a) } @@ -14480,7 +14480,7 @@ pub fn _mm256_cvtph_epi32(a: __m128h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2dq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvtph_epi32(src: __m256i, k: __mmask8, a: __m128h) -> __m256i { unsafe { transmute(vcvtph2dq_256(a, src.as_i32x8(), k)) } } @@ -14492,7 +14492,7 @@ pub fn _mm256_mask_cvtph_epi32(src: __m256i, k: __mmask8, a: __m128h) -> __m256i #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2dq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvtph_epi32(k: __mmask8, a: __m128h) -> __m256i { _mm256_mask_cvtph_epi32(_mm256_setzero_si256(), k, a) } @@ -14504,7 +14504,7 @@ pub fn _mm256_maskz_cvtph_epi32(k: __mmask8, a: __m128h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2dq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtph_epi32(a: __m256h) -> __m512i { _mm512_mask_cvtph_epi32(_mm512_undefined_epi32(), 0xffff, a) } @@ -14516,7 +14516,7 @@ pub fn _mm512_cvtph_epi32(a: __m256h) -> __m512i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2dq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtph_epi32(src: __m512i, k: __mmask16, a: __m256h) -> __m512i { unsafe { transmute(vcvtph2dq_512( @@ -14535,7 +14535,7 @@ pub fn _mm512_mask_cvtph_epi32(src: __m512i, k: __mmask16, a: __m256h) -> __m512 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2dq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtph_epi32(k: __mmask16, a: __m256h) -> __m512i { _mm512_mask_cvtph_epi32(_mm512_setzero_si512(), k, a) } @@ -14556,7 +14556,7 @@ pub fn _mm512_maskz_cvtph_epi32(k: __mmask16, a: __m256h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2dq, ROUNDING = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvt_roundph_epi32(a: __m256h) -> __m512i { static_assert_rounding!(ROUNDING); _mm512_mask_cvt_roundph_epi32::(_mm512_undefined_epi32(), 0xffff, a) @@ -14578,7 +14578,7 @@ pub fn _mm512_cvt_roundph_epi32(a: __m256h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2dq, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvt_roundph_epi32( src: __m512i, k: __mmask16, @@ -14606,7 +14606,7 @@ pub fn _mm512_mask_cvt_roundph_epi32( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2dq, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvt_roundph_epi32(k: __mmask16, a: __m256h) -> __m512i { static_assert_rounding!(ROUNDING); _mm512_mask_cvt_roundph_epi32::(_mm512_setzero_si512(), k, a) @@ -14619,7 +14619,7 @@ pub fn _mm512_maskz_cvt_roundph_epi32(k: __mmask16, a: __m2 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsh2si))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtsh_i32(a: __m128h) -> i32 { unsafe { vcvtsh2si32(a, _MM_FROUND_CUR_DIRECTION) } } @@ -14640,7 +14640,7 @@ pub fn _mm_cvtsh_i32(a: __m128h) -> i32 { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsh2si, ROUNDING = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvt_roundsh_i32(a: __m128h) -> i32 { unsafe { static_assert_rounding!(ROUNDING); @@ -14655,7 +14655,7 @@ pub fn _mm_cvt_roundsh_i32(a: __m128h) -> i32 { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2udq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtph_epu32(a: __m128h) -> __m128i { _mm_mask_cvtph_epu32(_mm_undefined_si128(), 0xff, a) } @@ -14667,7 +14667,7 @@ pub fn _mm_cvtph_epu32(a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2udq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvtph_epu32(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { unsafe { transmute(vcvtph2udq_128(a, src.as_u32x4(), k)) } } @@ -14679,7 +14679,7 @@ pub fn _mm_mask_cvtph_epu32(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2udq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvtph_epu32(k: __mmask8, a: __m128h) -> __m128i { _mm_mask_cvtph_epu32(_mm_setzero_si128(), k, a) } @@ -14691,7 +14691,7 @@ pub fn _mm_maskz_cvtph_epu32(k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2udq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvtph_epu32(a: __m128h) -> __m256i { _mm256_mask_cvtph_epu32(_mm256_undefined_si256(), 0xff, a) } @@ -14703,7 +14703,7 @@ pub fn _mm256_cvtph_epu32(a: __m128h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2udq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvtph_epu32(src: __m256i, k: __mmask8, a: __m128h) -> __m256i { unsafe { transmute(vcvtph2udq_256(a, src.as_u32x8(), k)) } } @@ -14715,7 +14715,7 @@ pub fn _mm256_mask_cvtph_epu32(src: __m256i, k: __mmask8, a: __m128h) -> __m256i #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2udq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvtph_epu32(k: __mmask8, a: __m128h) -> __m256i { _mm256_mask_cvtph_epu32(_mm256_setzero_si256(), k, a) } @@ -14727,7 +14727,7 @@ pub fn _mm256_maskz_cvtph_epu32(k: __mmask8, a: __m128h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2udq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtph_epu32(a: __m256h) -> __m512i { _mm512_mask_cvtph_epu32(_mm512_undefined_epi32(), 0xffff, a) } @@ -14739,7 +14739,7 @@ pub fn _mm512_cvtph_epu32(a: __m256h) -> __m512i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2udq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtph_epu32(src: __m512i, k: __mmask16, a: __m256h) -> __m512i { unsafe { transmute(vcvtph2udq_512( @@ -14758,7 +14758,7 @@ pub fn _mm512_mask_cvtph_epu32(src: __m512i, k: __mmask16, a: __m256h) -> __m512 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2udq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtph_epu32(k: __mmask16, a: __m256h) -> __m512i { _mm512_mask_cvtph_epu32(_mm512_setzero_si512(), k, a) } @@ -14779,7 +14779,7 @@ pub fn _mm512_maskz_cvtph_epu32(k: __mmask16, a: __m256h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2udq, ROUNDING = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvt_roundph_epu32(a: __m256h) -> __m512i { static_assert_rounding!(ROUNDING); _mm512_mask_cvt_roundph_epu32::(_mm512_undefined_epi32(), 0xffff, a) @@ -14801,7 +14801,7 @@ pub fn _mm512_cvt_roundph_epu32(a: __m256h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2udq, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvt_roundph_epu32( src: __m512i, k: __mmask16, @@ -14829,7 +14829,7 @@ pub fn _mm512_mask_cvt_roundph_epu32( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2udq, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvt_roundph_epu32(k: __mmask16, a: __m256h) -> __m512i { static_assert_rounding!(ROUNDING); _mm512_mask_cvt_roundph_epu32::(_mm512_setzero_si512(), k, a) @@ -14842,7 +14842,7 @@ pub fn _mm512_maskz_cvt_roundph_epu32(k: __mmask16, a: __m2 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsh2usi))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtsh_u32(a: __m128h) -> u32 { unsafe { vcvtsh2usi32(a, _MM_FROUND_CUR_DIRECTION) } } @@ -14857,7 +14857,7 @@ pub fn _mm_cvtsh_u32(a: __m128h) -> u32 { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsh2usi, SAE = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvt_roundsh_u32(a: __m128h) -> u32 { unsafe { static_assert_rounding!(SAE); @@ -14872,7 +14872,7 @@ pub fn _mm_cvt_roundsh_u32(a: __m128h) -> u32 { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2dq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvttph_epi32(a: __m128h) -> __m128i { _mm_mask_cvttph_epi32(_mm_undefined_si128(), 0xff, a) } @@ -14884,7 +14884,7 @@ pub fn _mm_cvttph_epi32(a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2dq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvttph_epi32(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { unsafe { transmute(vcvttph2dq_128(a, src.as_i32x4(), k)) } } @@ -14896,7 +14896,7 @@ pub fn _mm_mask_cvttph_epi32(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2dq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvttph_epi32(k: __mmask8, a: __m128h) -> __m128i { _mm_mask_cvttph_epi32(_mm_setzero_si128(), k, a) } @@ -14908,7 +14908,7 @@ pub fn _mm_maskz_cvttph_epi32(k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2dq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvttph_epi32(a: __m128h) -> __m256i { _mm256_mask_cvttph_epi32(_mm256_undefined_si256(), 0xff, a) } @@ -14920,7 +14920,7 @@ pub fn _mm256_cvttph_epi32(a: __m128h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2dq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvttph_epi32(src: __m256i, k: __mmask8, a: __m128h) -> __m256i { unsafe { transmute(vcvttph2dq_256(a, src.as_i32x8(), k)) } } @@ -14932,7 +14932,7 @@ pub fn _mm256_mask_cvttph_epi32(src: __m256i, k: __mmask8, a: __m128h) -> __m256 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2dq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvttph_epi32(k: __mmask8, a: __m128h) -> __m256i { _mm256_mask_cvttph_epi32(_mm256_setzero_si256(), k, a) } @@ -14944,7 +14944,7 @@ pub fn _mm256_maskz_cvttph_epi32(k: __mmask8, a: __m128h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2dq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvttph_epi32(a: __m256h) -> __m512i { _mm512_mask_cvttph_epi32(_mm512_undefined_epi32(), 0xffff, a) } @@ -14956,7 +14956,7 @@ pub fn _mm512_cvttph_epi32(a: __m256h) -> __m512i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2dq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvttph_epi32(src: __m512i, k: __mmask16, a: __m256h) -> __m512i { unsafe { transmute(vcvttph2dq_512( @@ -14975,7 +14975,7 @@ pub fn _mm512_mask_cvttph_epi32(src: __m512i, k: __mmask16, a: __m256h) -> __m51 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2dq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvttph_epi32(k: __mmask16, a: __m256h) -> __m512i { _mm512_mask_cvttph_epi32(_mm512_setzero_si512(), k, a) } @@ -14990,7 +14990,7 @@ pub fn _mm512_maskz_cvttph_epi32(k: __mmask16, a: __m256h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2dq, SAE = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtt_roundph_epi32(a: __m256h) -> __m512i { static_assert_sae!(SAE); _mm512_mask_cvtt_roundph_epi32::(_mm512_undefined_epi32(), 0xffff, a) @@ -15006,7 +15006,7 @@ pub fn _mm512_cvtt_roundph_epi32(a: __m256h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2dq, SAE = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtt_roundph_epi32( src: __m512i, k: __mmask16, @@ -15028,7 +15028,7 @@ pub fn _mm512_mask_cvtt_roundph_epi32( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2dq, SAE = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtt_roundph_epi32(k: __mmask16, a: __m256h) -> __m512i { static_assert_sae!(SAE); _mm512_mask_cvtt_roundph_epi32::(_mm512_setzero_si512(), k, a) @@ -15041,7 +15041,7 @@ pub fn _mm512_maskz_cvtt_roundph_epi32(k: __mmask16, a: __m256h) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttsh2si))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvttsh_i32(a: __m128h) -> i32 { unsafe { vcvttsh2si32(a, _MM_FROUND_CUR_DIRECTION) } } @@ -15056,7 +15056,7 @@ pub fn _mm_cvttsh_i32(a: __m128h) -> i32 { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttsh2si, SAE = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtt_roundsh_i32(a: __m128h) -> i32 { unsafe { static_assert_sae!(SAE); @@ -15071,7 +15071,7 @@ pub fn _mm_cvtt_roundsh_i32(a: __m128h) -> i32 { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2udq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvttph_epu32(a: __m128h) -> __m128i { _mm_mask_cvttph_epu32(_mm_undefined_si128(), 0xff, a) } @@ -15083,7 +15083,7 @@ pub fn _mm_cvttph_epu32(a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2udq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvttph_epu32(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { unsafe { transmute(vcvttph2udq_128(a, src.as_u32x4(), k)) } } @@ -15095,7 +15095,7 @@ pub fn _mm_mask_cvttph_epu32(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2udq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvttph_epu32(k: __mmask8, a: __m128h) -> __m128i { _mm_mask_cvttph_epu32(_mm_setzero_si128(), k, a) } @@ -15107,7 +15107,7 @@ pub fn _mm_maskz_cvttph_epu32(k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2udq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvttph_epu32(a: __m128h) -> __m256i { _mm256_mask_cvttph_epu32(_mm256_undefined_si256(), 0xff, a) } @@ -15119,7 +15119,7 @@ pub fn _mm256_cvttph_epu32(a: __m128h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2udq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvttph_epu32(src: __m256i, k: __mmask8, a: __m128h) -> __m256i { unsafe { transmute(vcvttph2udq_256(a, src.as_u32x8(), k)) } } @@ -15131,7 +15131,7 @@ pub fn _mm256_mask_cvttph_epu32(src: __m256i, k: __mmask8, a: __m128h) -> __m256 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2udq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvttph_epu32(k: __mmask8, a: __m128h) -> __m256i { _mm256_mask_cvttph_epu32(_mm256_setzero_si256(), k, a) } @@ -15143,7 +15143,7 @@ pub fn _mm256_maskz_cvttph_epu32(k: __mmask8, a: __m128h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2udq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvttph_epu32(a: __m256h) -> __m512i { _mm512_mask_cvttph_epu32(_mm512_undefined_epi32(), 0xffff, a) } @@ -15155,7 +15155,7 @@ pub fn _mm512_cvttph_epu32(a: __m256h) -> __m512i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2udq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvttph_epu32(src: __m512i, k: __mmask16, a: __m256h) -> __m512i { unsafe { transmute(vcvttph2udq_512( @@ -15174,7 +15174,7 @@ pub fn _mm512_mask_cvttph_epu32(src: __m512i, k: __mmask16, a: __m256h) -> __m51 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2udq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvttph_epu32(k: __mmask16, a: __m256h) -> __m512i { _mm512_mask_cvttph_epu32(_mm512_setzero_si512(), k, a) } @@ -15189,7 +15189,7 @@ pub fn _mm512_maskz_cvttph_epu32(k: __mmask16, a: __m256h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2udq, SAE = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtt_roundph_epu32(a: __m256h) -> __m512i { static_assert_sae!(SAE); _mm512_mask_cvtt_roundph_epu32::(_mm512_undefined_epi32(), 0xffff, a) @@ -15205,7 +15205,7 @@ pub fn _mm512_cvtt_roundph_epu32(a: __m256h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2udq, SAE = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtt_roundph_epu32( src: __m512i, k: __mmask16, @@ -15227,7 +15227,7 @@ pub fn _mm512_mask_cvtt_roundph_epu32( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2udq, SAE = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtt_roundph_epu32(k: __mmask16, a: __m256h) -> __m512i { static_assert_sae!(SAE); _mm512_mask_cvtt_roundph_epu32::(_mm512_setzero_si512(), k, a) @@ -15240,7 +15240,7 @@ pub fn _mm512_maskz_cvtt_roundph_epu32(k: __mmask16, a: __m256h) #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttsh2usi))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvttsh_u32(a: __m128h) -> u32 { unsafe { vcvttsh2usi32(a, _MM_FROUND_CUR_DIRECTION) } } @@ -15255,7 +15255,7 @@ pub fn _mm_cvttsh_u32(a: __m128h) -> u32 { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttsh2usi, SAE = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtt_roundsh_u32(a: __m128h) -> u32 { unsafe { static_assert_sae!(SAE); @@ -15270,7 +15270,7 @@ pub fn _mm_cvtt_roundsh_u32(a: __m128h) -> u32 { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2qq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtph_epi64(a: __m128h) -> __m128i { _mm_mask_cvtph_epi64(_mm_undefined_si128(), 0xff, a) } @@ -15282,7 +15282,7 @@ pub fn _mm_cvtph_epi64(a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2qq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvtph_epi64(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { unsafe { transmute(vcvtph2qq_128(a, src.as_i64x2(), k)) } } @@ -15294,7 +15294,7 @@ pub fn _mm_mask_cvtph_epi64(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2qq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvtph_epi64(k: __mmask8, a: __m128h) -> __m128i { _mm_mask_cvtph_epi64(_mm_setzero_si128(), k, a) } @@ -15306,7 +15306,7 @@ pub fn _mm_maskz_cvtph_epi64(k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2qq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvtph_epi64(a: __m128h) -> __m256i { _mm256_mask_cvtph_epi64(_mm256_undefined_si256(), 0xff, a) } @@ -15318,7 +15318,7 @@ pub fn _mm256_cvtph_epi64(a: __m128h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2qq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvtph_epi64(src: __m256i, k: __mmask8, a: __m128h) -> __m256i { unsafe { transmute(vcvtph2qq_256(a, src.as_i64x4(), k)) } } @@ -15330,7 +15330,7 @@ pub fn _mm256_mask_cvtph_epi64(src: __m256i, k: __mmask8, a: __m128h) -> __m256i #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2qq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvtph_epi64(k: __mmask8, a: __m128h) -> __m256i { _mm256_mask_cvtph_epi64(_mm256_setzero_si256(), k, a) } @@ -15342,7 +15342,7 @@ pub fn _mm256_maskz_cvtph_epi64(k: __mmask8, a: __m128h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2qq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtph_epi64(a: __m128h) -> __m512i { _mm512_mask_cvtph_epi64(_mm512_undefined_epi32(), 0xff, a) } @@ -15354,7 +15354,7 @@ pub fn _mm512_cvtph_epi64(a: __m128h) -> __m512i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2qq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtph_epi64(src: __m512i, k: __mmask8, a: __m128h) -> __m512i { unsafe { transmute(vcvtph2qq_512( @@ -15373,7 +15373,7 @@ pub fn _mm512_mask_cvtph_epi64(src: __m512i, k: __mmask8, a: __m128h) -> __m512i #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2qq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtph_epi64(k: __mmask8, a: __m128h) -> __m512i { _mm512_mask_cvtph_epi64(_mm512_setzero_si512(), k, a) } @@ -15394,7 +15394,7 @@ pub fn _mm512_maskz_cvtph_epi64(k: __mmask8, a: __m128h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2qq, ROUNDING = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvt_roundph_epi64(a: __m128h) -> __m512i { static_assert_rounding!(ROUNDING); _mm512_mask_cvt_roundph_epi64::(_mm512_undefined_epi32(), 0xff, a) @@ -15416,7 +15416,7 @@ pub fn _mm512_cvt_roundph_epi64(a: __m128h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2qq, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvt_roundph_epi64( src: __m512i, k: __mmask8, @@ -15444,7 +15444,7 @@ pub fn _mm512_mask_cvt_roundph_epi64( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2qq, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvt_roundph_epi64(k: __mmask8, a: __m128h) -> __m512i { static_assert_rounding!(ROUNDING); _mm512_mask_cvt_roundph_epi64::(_mm512_setzero_si512(), k, a) @@ -15457,7 +15457,7 @@ pub fn _mm512_maskz_cvt_roundph_epi64(k: __mmask8, a: __m12 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2uqq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtph_epu64(a: __m128h) -> __m128i { _mm_mask_cvtph_epu64(_mm_undefined_si128(), 0xff, a) } @@ -15469,7 +15469,7 @@ pub fn _mm_cvtph_epu64(a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2uqq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvtph_epu64(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { unsafe { transmute(vcvtph2uqq_128(a, src.as_u64x2(), k)) } } @@ -15481,7 +15481,7 @@ pub fn _mm_mask_cvtph_epu64(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2uqq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvtph_epu64(k: __mmask8, a: __m128h) -> __m128i { _mm_mask_cvtph_epu64(_mm_setzero_si128(), k, a) } @@ -15493,7 +15493,7 @@ pub fn _mm_maskz_cvtph_epu64(k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2uqq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvtph_epu64(a: __m128h) -> __m256i { _mm256_mask_cvtph_epu64(_mm256_undefined_si256(), 0xff, a) } @@ -15505,7 +15505,7 @@ pub fn _mm256_cvtph_epu64(a: __m128h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2uqq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvtph_epu64(src: __m256i, k: __mmask8, a: __m128h) -> __m256i { unsafe { transmute(vcvtph2uqq_256(a, src.as_u64x4(), k)) } } @@ -15517,7 +15517,7 @@ pub fn _mm256_mask_cvtph_epu64(src: __m256i, k: __mmask8, a: __m128h) -> __m256i #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2uqq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvtph_epu64(k: __mmask8, a: __m128h) -> __m256i { _mm256_mask_cvtph_epu64(_mm256_setzero_si256(), k, a) } @@ -15529,7 +15529,7 @@ pub fn _mm256_maskz_cvtph_epu64(k: __mmask8, a: __m128h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2uqq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtph_epu64(a: __m128h) -> __m512i { _mm512_mask_cvtph_epu64(_mm512_undefined_epi32(), 0xff, a) } @@ -15541,7 +15541,7 @@ pub fn _mm512_cvtph_epu64(a: __m128h) -> __m512i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2uqq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtph_epu64(src: __m512i, k: __mmask8, a: __m128h) -> __m512i { unsafe { transmute(vcvtph2uqq_512( @@ -15560,7 +15560,7 @@ pub fn _mm512_mask_cvtph_epu64(src: __m512i, k: __mmask8, a: __m128h) -> __m512i #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2uqq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtph_epu64(k: __mmask8, a: __m128h) -> __m512i { _mm512_mask_cvtph_epu64(_mm512_setzero_si512(), k, a) } @@ -15581,7 +15581,7 @@ pub fn _mm512_maskz_cvtph_epu64(k: __mmask8, a: __m128h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2uqq, ROUNDING = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvt_roundph_epu64(a: __m128h) -> __m512i { static_assert_rounding!(ROUNDING); _mm512_mask_cvt_roundph_epu64::(_mm512_undefined_epi32(), 0xff, a) @@ -15603,7 +15603,7 @@ pub fn _mm512_cvt_roundph_epu64(a: __m128h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2uqq, ROUNDING = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvt_roundph_epu64( src: __m512i, k: __mmask8, @@ -15631,7 +15631,7 @@ pub fn _mm512_mask_cvt_roundph_epu64( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2uqq, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvt_roundph_epu64(k: __mmask8, a: __m128h) -> __m512i { static_assert_rounding!(ROUNDING); _mm512_mask_cvt_roundph_epu64::(_mm512_setzero_si512(), k, a) @@ -15644,7 +15644,7 @@ pub fn _mm512_maskz_cvt_roundph_epu64(k: __mmask8, a: __m12 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2qq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvttph_epi64(a: __m128h) -> __m128i { _mm_mask_cvttph_epi64(_mm_undefined_si128(), 0xff, a) } @@ -15656,7 +15656,7 @@ pub fn _mm_cvttph_epi64(a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2qq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvttph_epi64(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { unsafe { transmute(vcvttph2qq_128(a, src.as_i64x2(), k)) } } @@ -15668,7 +15668,7 @@ pub fn _mm_mask_cvttph_epi64(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2qq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvttph_epi64(k: __mmask8, a: __m128h) -> __m128i { _mm_mask_cvttph_epi64(_mm_setzero_si128(), k, a) } @@ -15680,7 +15680,7 @@ pub fn _mm_maskz_cvttph_epi64(k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2qq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvttph_epi64(a: __m128h) -> __m256i { _mm256_mask_cvttph_epi64(_mm256_undefined_si256(), 0xff, a) } @@ -15692,7 +15692,7 @@ pub fn _mm256_cvttph_epi64(a: __m128h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2qq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvttph_epi64(src: __m256i, k: __mmask8, a: __m128h) -> __m256i { unsafe { transmute(vcvttph2qq_256(a, src.as_i64x4(), k)) } } @@ -15704,7 +15704,7 @@ pub fn _mm256_mask_cvttph_epi64(src: __m256i, k: __mmask8, a: __m128h) -> __m256 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2qq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvttph_epi64(k: __mmask8, a: __m128h) -> __m256i { _mm256_mask_cvttph_epi64(_mm256_setzero_si256(), k, a) } @@ -15716,7 +15716,7 @@ pub fn _mm256_maskz_cvttph_epi64(k: __mmask8, a: __m128h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2qq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvttph_epi64(a: __m128h) -> __m512i { _mm512_mask_cvttph_epi64(_mm512_undefined_epi32(), 0xff, a) } @@ -15728,7 +15728,7 @@ pub fn _mm512_cvttph_epi64(a: __m128h) -> __m512i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2qq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvttph_epi64(src: __m512i, k: __mmask8, a: __m128h) -> __m512i { unsafe { transmute(vcvttph2qq_512( @@ -15747,7 +15747,7 @@ pub fn _mm512_mask_cvttph_epi64(src: __m512i, k: __mmask8, a: __m128h) -> __m512 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2qq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvttph_epi64(k: __mmask8, a: __m128h) -> __m512i { _mm512_mask_cvttph_epi64(_mm512_setzero_si512(), k, a) } @@ -15762,7 +15762,7 @@ pub fn _mm512_maskz_cvttph_epi64(k: __mmask8, a: __m128h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2qq, SAE = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtt_roundph_epi64(a: __m128h) -> __m512i { static_assert_sae!(SAE); _mm512_mask_cvtt_roundph_epi64::(_mm512_undefined_epi32(), 0xff, a) @@ -15778,7 +15778,7 @@ pub fn _mm512_cvtt_roundph_epi64(a: __m128h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2qq, SAE = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtt_roundph_epi64( src: __m512i, k: __mmask8, @@ -15800,7 +15800,7 @@ pub fn _mm512_mask_cvtt_roundph_epi64( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2qq, SAE = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtt_roundph_epi64(k: __mmask8, a: __m128h) -> __m512i { static_assert_sae!(SAE); _mm512_mask_cvtt_roundph_epi64::(_mm512_setzero_si512(), k, a) @@ -15813,7 +15813,7 @@ pub fn _mm512_maskz_cvtt_roundph_epi64(k: __mmask8, a: __m128h) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2uqq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvttph_epu64(a: __m128h) -> __m128i { _mm_mask_cvttph_epu64(_mm_undefined_si128(), 0xff, a) } @@ -15825,7 +15825,7 @@ pub fn _mm_cvttph_epu64(a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2uqq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvttph_epu64(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { unsafe { transmute(vcvttph2uqq_128(a, src.as_u64x2(), k)) } } @@ -15837,7 +15837,7 @@ pub fn _mm_mask_cvttph_epu64(src: __m128i, k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2uqq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvttph_epu64(k: __mmask8, a: __m128h) -> __m128i { _mm_mask_cvttph_epu64(_mm_setzero_si128(), k, a) } @@ -15849,7 +15849,7 @@ pub fn _mm_maskz_cvttph_epu64(k: __mmask8, a: __m128h) -> __m128i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2uqq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvttph_epu64(a: __m128h) -> __m256i { _mm256_mask_cvttph_epu64(_mm256_undefined_si256(), 0xff, a) } @@ -15861,7 +15861,7 @@ pub fn _mm256_cvttph_epu64(a: __m128h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2uqq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvttph_epu64(src: __m256i, k: __mmask8, a: __m128h) -> __m256i { unsafe { transmute(vcvttph2uqq_256(a, src.as_u64x4(), k)) } } @@ -15873,7 +15873,7 @@ pub fn _mm256_mask_cvttph_epu64(src: __m256i, k: __mmask8, a: __m128h) -> __m256 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvttph2uqq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvttph_epu64(k: __mmask8, a: __m128h) -> __m256i { _mm256_mask_cvttph_epu64(_mm256_setzero_si256(), k, a) } @@ -15885,7 +15885,7 @@ pub fn _mm256_maskz_cvttph_epu64(k: __mmask8, a: __m128h) -> __m256i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2uqq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvttph_epu64(a: __m128h) -> __m512i { _mm512_mask_cvttph_epu64(_mm512_undefined_epi32(), 0xff, a) } @@ -15897,7 +15897,7 @@ pub fn _mm512_cvttph_epu64(a: __m128h) -> __m512i { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2uqq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvttph_epu64(src: __m512i, k: __mmask8, a: __m128h) -> __m512i { unsafe { transmute(vcvttph2uqq_512( @@ -15916,7 +15916,7 @@ pub fn _mm512_mask_cvttph_epu64(src: __m512i, k: __mmask8, a: __m128h) -> __m512 #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2uqq))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvttph_epu64(k: __mmask8, a: __m128h) -> __m512i { _mm512_mask_cvttph_epu64(_mm512_setzero_si512(), k, a) } @@ -15931,7 +15931,7 @@ pub fn _mm512_maskz_cvttph_epu64(k: __mmask8, a: __m128h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2uqq, SAE = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtt_roundph_epu64(a: __m128h) -> __m512i { static_assert_sae!(SAE); _mm512_mask_cvtt_roundph_epu64::(_mm512_undefined_epi32(), 0xff, a) @@ -15947,7 +15947,7 @@ pub fn _mm512_cvtt_roundph_epu64(a: __m128h) -> __m512i { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2uqq, SAE = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtt_roundph_epu64( src: __m512i, k: __mmask8, @@ -15969,7 +15969,7 @@ pub fn _mm512_mask_cvtt_roundph_epu64( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttph2uqq, SAE = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtt_roundph_epu64(k: __mmask8, a: __m128h) -> __m512i { static_assert_sae!(SAE); _mm512_mask_cvtt_roundph_epu64::(_mm512_setzero_si512(), k, a) @@ -15982,7 +15982,7 @@ pub fn _mm512_maskz_cvtt_roundph_epu64(k: __mmask8, a: __m128h) #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2psx))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtxph_ps(a: __m128h) -> __m128 { _mm_mask_cvtxph_ps(_mm_setzero_ps(), 0xff, a) } @@ -15995,7 +15995,7 @@ pub fn _mm_cvtxph_ps(a: __m128h) -> __m128 { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2psx))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvtxph_ps(src: __m128, k: __mmask8, a: __m128h) -> __m128 { unsafe { vcvtph2psx_128(a, src, k) } } @@ -16008,7 +16008,7 @@ pub fn _mm_mask_cvtxph_ps(src: __m128, k: __mmask8, a: __m128h) -> __m128 { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2psx))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvtxph_ps(k: __mmask8, a: __m128h) -> __m128 { _mm_mask_cvtxph_ps(_mm_setzero_ps(), k, a) } @@ -16020,7 +16020,7 @@ pub fn _mm_maskz_cvtxph_ps(k: __mmask8, a: __m128h) -> __m128 { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2psx))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvtxph_ps(a: __m128h) -> __m256 { _mm256_mask_cvtxph_ps(_mm256_setzero_ps(), 0xff, a) } @@ -16033,7 +16033,7 @@ pub fn _mm256_cvtxph_ps(a: __m128h) -> __m256 { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2psx))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvtxph_ps(src: __m256, k: __mmask8, a: __m128h) -> __m256 { unsafe { vcvtph2psx_256(a, src, k) } } @@ -16046,7 +16046,7 @@ pub fn _mm256_mask_cvtxph_ps(src: __m256, k: __mmask8, a: __m128h) -> __m256 { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2psx))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvtxph_ps(k: __mmask8, a: __m128h) -> __m256 { _mm256_mask_cvtxph_ps(_mm256_setzero_ps(), k, a) } @@ -16058,7 +16058,7 @@ pub fn _mm256_maskz_cvtxph_ps(k: __mmask8, a: __m128h) -> __m256 { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2psx))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtxph_ps(a: __m256h) -> __m512 { _mm512_mask_cvtxph_ps(_mm512_setzero_ps(), 0xffff, a) } @@ -16071,7 +16071,7 @@ pub fn _mm512_cvtxph_ps(a: __m256h) -> __m512 { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2psx))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtxph_ps(src: __m512, k: __mmask16, a: __m256h) -> __m512 { unsafe { vcvtph2psx_512(a, src, k, _MM_FROUND_CUR_DIRECTION) } } @@ -16084,7 +16084,7 @@ pub fn _mm512_mask_cvtxph_ps(src: __m512, k: __mmask16, a: __m256h) -> __m512 { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2psx))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtxph_ps(k: __mmask16, a: __m256h) -> __m512 { _mm512_mask_cvtxph_ps(_mm512_setzero_ps(), k, a) } @@ -16099,7 +16099,7 @@ pub fn _mm512_maskz_cvtxph_ps(k: __mmask16, a: __m256h) -> __m512 { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2psx, SAE = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtx_roundph_ps(a: __m256h) -> __m512 { static_assert_sae!(SAE); _mm512_mask_cvtx_roundph_ps::(_mm512_setzero_ps(), 0xffff, a) @@ -16116,7 +16116,7 @@ pub fn _mm512_cvtx_roundph_ps(a: __m256h) -> __m512 { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2psx, SAE = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtx_roundph_ps( src: __m512, k: __mmask16, @@ -16139,7 +16139,7 @@ pub fn _mm512_mask_cvtx_roundph_ps( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2psx, SAE = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtx_roundph_ps(k: __mmask16, a: __m256h) -> __m512 { static_assert_sae!(SAE); _mm512_mask_cvtx_roundph_ps::(_mm512_setzero_ps(), k, a) @@ -16153,7 +16153,7 @@ pub fn _mm512_maskz_cvtx_roundph_ps(k: __mmask16, a: __m256h) -> #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsh2ss))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtsh_ss(a: __m128, b: __m128h) -> __m128 { _mm_mask_cvtsh_ss(a, 0xff, a, b) } @@ -16167,7 +16167,7 @@ pub fn _mm_cvtsh_ss(a: __m128, b: __m128h) -> __m128 { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsh2ss))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvtsh_ss(src: __m128, k: __mmask8, a: __m128, b: __m128h) -> __m128 { unsafe { vcvtsh2ss(a, b, src, k, _MM_FROUND_CUR_DIRECTION) } } @@ -16181,7 +16181,7 @@ pub fn _mm_mask_cvtsh_ss(src: __m128, k: __mmask8, a: __m128, b: __m128h) -> __m #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsh2ss))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvtsh_ss(k: __mmask8, a: __m128, b: __m128h) -> __m128 { _mm_mask_cvtsh_ss(_mm_set_ss(0.0), k, a, b) } @@ -16197,7 +16197,7 @@ pub fn _mm_maskz_cvtsh_ss(k: __mmask8, a: __m128, b: __m128h) -> __m128 { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsh2ss, SAE = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvt_roundsh_ss(a: __m128, b: __m128h) -> __m128 { static_assert_sae!(SAE); _mm_mask_cvt_roundsh_ss::(_mm_undefined_ps(), 0xff, a, b) @@ -16215,7 +16215,7 @@ pub fn _mm_cvt_roundsh_ss(a: __m128, b: __m128h) -> __m128 { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsh2ss, SAE = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvt_roundsh_ss( src: __m128, k: __mmask8, @@ -16240,7 +16240,7 @@ pub fn _mm_mask_cvt_roundsh_ss( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsh2ss, SAE = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvt_roundsh_ss(k: __mmask8, a: __m128, b: __m128h) -> __m128 { static_assert_sae!(SAE); _mm_mask_cvt_roundsh_ss::(_mm_set_ss(0.0), k, a, b) @@ -16253,7 +16253,7 @@ pub fn _mm_maskz_cvt_roundsh_ss(k: __mmask8, a: __m128, b: __m12 #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2pd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtph_pd(a: __m128h) -> __m128d { _mm_mask_cvtph_pd(_mm_setzero_pd(), 0xff, a) } @@ -16266,7 +16266,7 @@ pub fn _mm_cvtph_pd(a: __m128h) -> __m128d { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2pd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvtph_pd(src: __m128d, k: __mmask8, a: __m128h) -> __m128d { unsafe { vcvtph2pd_128(a, src, k) } } @@ -16279,7 +16279,7 @@ pub fn _mm_mask_cvtph_pd(src: __m128d, k: __mmask8, a: __m128h) -> __m128d { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2pd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvtph_pd(k: __mmask8, a: __m128h) -> __m128d { _mm_mask_cvtph_pd(_mm_setzero_pd(), k, a) } @@ -16291,7 +16291,7 @@ pub fn _mm_maskz_cvtph_pd(k: __mmask8, a: __m128h) -> __m128d { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2pd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_cvtph_pd(a: __m128h) -> __m256d { _mm256_mask_cvtph_pd(_mm256_setzero_pd(), 0xff, a) } @@ -16304,7 +16304,7 @@ pub fn _mm256_cvtph_pd(a: __m128h) -> __m256d { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2pd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_mask_cvtph_pd(src: __m256d, k: __mmask8, a: __m128h) -> __m256d { unsafe { vcvtph2pd_256(a, src, k) } } @@ -16317,7 +16317,7 @@ pub fn _mm256_mask_cvtph_pd(src: __m256d, k: __mmask8, a: __m128h) -> __m256d { #[inline] #[target_feature(enable = "avx512fp16,avx512vl")] #[cfg_attr(test, assert_instr(vcvtph2pd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm256_maskz_cvtph_pd(k: __mmask8, a: __m128h) -> __m256d { _mm256_mask_cvtph_pd(_mm256_setzero_pd(), k, a) } @@ -16329,7 +16329,7 @@ pub fn _mm256_maskz_cvtph_pd(k: __mmask8, a: __m128h) -> __m256d { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2pd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvtph_pd(a: __m128h) -> __m512d { _mm512_mask_cvtph_pd(_mm512_setzero_pd(), 0xff, a) } @@ -16342,7 +16342,7 @@ pub fn _mm512_cvtph_pd(a: __m128h) -> __m512d { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2pd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvtph_pd(src: __m512d, k: __mmask8, a: __m128h) -> __m512d { unsafe { vcvtph2pd_512(a, src, k, _MM_FROUND_CUR_DIRECTION) } } @@ -16355,7 +16355,7 @@ pub fn _mm512_mask_cvtph_pd(src: __m512d, k: __mmask8, a: __m128h) -> __m512d { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2pd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvtph_pd(k: __mmask8, a: __m128h) -> __m512d { _mm512_mask_cvtph_pd(_mm512_setzero_pd(), k, a) } @@ -16370,7 +16370,7 @@ pub fn _mm512_maskz_cvtph_pd(k: __mmask8, a: __m128h) -> __m512d { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2pd, SAE = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_cvt_roundph_pd(a: __m128h) -> __m512d { static_assert_sae!(SAE); _mm512_mask_cvt_roundph_pd::(_mm512_setzero_pd(), 0xff, a) @@ -16387,7 +16387,7 @@ pub fn _mm512_cvt_roundph_pd(a: __m128h) -> __m512d { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2pd, SAE = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_mask_cvt_roundph_pd( src: __m512d, k: __mmask8, @@ -16410,7 +16410,7 @@ pub fn _mm512_mask_cvt_roundph_pd( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtph2pd, SAE = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm512_maskz_cvt_roundph_pd(k: __mmask8, a: __m128h) -> __m512d { static_assert_sae!(SAE); _mm512_mask_cvt_roundph_pd::(_mm512_setzero_pd(), k, a) @@ -16424,7 +16424,7 @@ pub fn _mm512_maskz_cvt_roundph_pd(k: __mmask8, a: __m128h) -> _ #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsh2sd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtsh_sd(a: __m128d, b: __m128h) -> __m128d { _mm_mask_cvtsh_sd(a, 0xff, a, b) } @@ -16438,7 +16438,7 @@ pub fn _mm_cvtsh_sd(a: __m128d, b: __m128h) -> __m128d { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsh2sd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvtsh_sd(src: __m128d, k: __mmask8, a: __m128d, b: __m128h) -> __m128d { unsafe { vcvtsh2sd(a, b, src, k, _MM_FROUND_CUR_DIRECTION) } } @@ -16451,7 +16451,7 @@ pub fn _mm_mask_cvtsh_sd(src: __m128d, k: __mmask8, a: __m128d, b: __m128h) -> _ #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsh2sd))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvtsh_sd(k: __mmask8, a: __m128d, b: __m128h) -> __m128d { _mm_mask_cvtsh_sd(_mm_set_sd(0.0), k, a, b) } @@ -16467,7 +16467,7 @@ pub fn _mm_maskz_cvtsh_sd(k: __mmask8, a: __m128d, b: __m128h) -> __m128d { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsh2sd, SAE = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvt_roundsh_sd(a: __m128d, b: __m128h) -> __m128d { static_assert_sae!(SAE); _mm_mask_cvt_roundsh_sd::(a, 0xff, a, b) @@ -16485,7 +16485,7 @@ pub fn _mm_cvt_roundsh_sd(a: __m128d, b: __m128h) -> __m128d { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsh2sd, SAE = 8))] #[rustc_legacy_const_generics(4)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_mask_cvt_roundsh_sd( src: __m128d, k: __mmask8, @@ -16509,7 +16509,7 @@ pub fn _mm_mask_cvt_roundsh_sd( #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsh2sd, SAE = 8))] #[rustc_legacy_const_generics(3)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_maskz_cvt_roundsh_sd(k: __mmask8, a: __m128d, b: __m128h) -> __m128d { static_assert_sae!(SAE); _mm_mask_cvt_roundsh_sd::(_mm_set_sd(0.0), k, a, b) @@ -16553,7 +16553,7 @@ pub const fn _mm512_cvtsh_h(a: __m512h) -> f16 { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtsi128_si16) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_cvtsi128_si16(a: __m128i) -> i16 { unsafe { simd_extract!(a.as_i16x8(), 0) } @@ -16564,7 +16564,7 @@ pub const fn _mm_cvtsi128_si16(a: __m128i) -> i16 { /// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_cvtsi16_si128) #[inline] #[target_feature(enable = "avx512fp16")] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _mm_cvtsi16_si128(a: i16) -> __m128i { unsafe { transmute(simd_insert!(i16x8::ZERO, 0, a)) } diff --git a/library/stdarch/crates/core_arch/src/x86/avxneconvert.rs b/library/stdarch/crates/core_arch/src/x86/avxneconvert.rs index 91b6be2b09d7..b8a3b9473af9 100644 --- a/library/stdarch/crates/core_arch/src/x86/avxneconvert.rs +++ b/library/stdarch/crates/core_arch/src/x86/avxneconvert.rs @@ -87,7 +87,7 @@ pub unsafe fn _mm256_cvtneebf16_ps(a: *const __m256bh) -> __m256 { #[inline] #[target_feature(enable = "avxneconvert")] #[cfg_attr(test, assert_instr(vcvtneeph2ps))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub unsafe fn _mm_cvtneeph_ps(a: *const __m128h) -> __m128 { transmute(cvtneeph2ps_128(a)) } @@ -99,7 +99,7 @@ pub unsafe fn _mm_cvtneeph_ps(a: *const __m128h) -> __m128 { #[inline] #[target_feature(enable = "avxneconvert")] #[cfg_attr(test, assert_instr(vcvtneeph2ps))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub unsafe fn _mm256_cvtneeph_ps(a: *const __m256h) -> __m256 { transmute(cvtneeph2ps_256(a)) } @@ -135,7 +135,7 @@ pub unsafe fn _mm256_cvtneobf16_ps(a: *const __m256bh) -> __m256 { #[inline] #[target_feature(enable = "avxneconvert")] #[cfg_attr(test, assert_instr(vcvtneoph2ps))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub unsafe fn _mm_cvtneoph_ps(a: *const __m128h) -> __m128 { transmute(cvtneoph2ps_128(a)) } @@ -147,7 +147,7 @@ pub unsafe fn _mm_cvtneoph_ps(a: *const __m128h) -> __m128 { #[inline] #[target_feature(enable = "avxneconvert")] #[cfg_attr(test, assert_instr(vcvtneoph2ps))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub unsafe fn _mm256_cvtneoph_ps(a: *const __m256h) -> __m256 { transmute(cvtneoph2ps_256(a)) } diff --git a/library/stdarch/crates/core_arch/src/x86/mod.rs b/library/stdarch/crates/core_arch/src/x86/mod.rs index c40fbd3ca317..9396507f0804 100644 --- a/library/stdarch/crates/core_arch/src/x86/mod.rs +++ b/library/stdarch/crates/core_arch/src/x86/mod.rs @@ -401,7 +401,7 @@ types! { } types! { - #![stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] + #![stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] /// 128-bit wide set of 8 `f16` types, x86-specific /// @@ -768,7 +768,7 @@ mod avxneconvert; pub use self::avxneconvert::*; mod avx512fp16; -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub use self::avx512fp16::*; mod kl; diff --git a/library/stdarch/crates/core_arch/src/x86_64/avx512fp16.rs b/library/stdarch/crates/core_arch/src/x86_64/avx512fp16.rs index 87e3651ba744..2a511328bb38 100644 --- a/library/stdarch/crates/core_arch/src/x86_64/avx512fp16.rs +++ b/library/stdarch/crates/core_arch/src/x86_64/avx512fp16.rs @@ -10,7 +10,7 @@ use stdarch_test::assert_instr; #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsi2sh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvti64_sh(a: __m128h, b: i64) -> __m128h { unsafe { vcvtsi642sh(a, b, _MM_FROUND_CUR_DIRECTION) } } @@ -32,7 +32,7 @@ pub fn _mm_cvti64_sh(a: __m128h, b: i64) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsi2sh, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvt_roundi64_sh(a: __m128h, b: i64) -> __m128h { unsafe { static_assert_rounding!(ROUNDING); @@ -48,7 +48,7 @@ pub fn _mm_cvt_roundi64_sh(a: __m128h, b: i64) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtusi2sh))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtu64_sh(a: __m128h, b: u64) -> __m128h { unsafe { vcvtusi642sh(a, b, _MM_FROUND_CUR_DIRECTION) } } @@ -70,7 +70,7 @@ pub fn _mm_cvtu64_sh(a: __m128h, b: u64) -> __m128h { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtusi2sh, ROUNDING = 8))] #[rustc_legacy_const_generics(2)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvt_roundu64_sh(a: __m128h, b: u64) -> __m128h { unsafe { static_assert_rounding!(ROUNDING); @@ -85,7 +85,7 @@ pub fn _mm_cvt_roundu64_sh(a: __m128h, b: u64) -> __m128h { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsh2si))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtsh_i64(a: __m128h) -> i64 { unsafe { vcvtsh2si64(a, _MM_FROUND_CUR_DIRECTION) } } @@ -106,7 +106,7 @@ pub fn _mm_cvtsh_i64(a: __m128h) -> i64 { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsh2si, ROUNDING = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvt_roundsh_i64(a: __m128h) -> i64 { unsafe { static_assert_rounding!(ROUNDING); @@ -121,7 +121,7 @@ pub fn _mm_cvt_roundsh_i64(a: __m128h) -> i64 { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsh2usi))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtsh_u64(a: __m128h) -> u64 { unsafe { vcvtsh2usi64(a, _MM_FROUND_CUR_DIRECTION) } } @@ -142,7 +142,7 @@ pub fn _mm_cvtsh_u64(a: __m128h) -> u64 { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvtsh2usi, ROUNDING = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvt_roundsh_u64(a: __m128h) -> u64 { unsafe { static_assert_rounding!(ROUNDING); @@ -157,7 +157,7 @@ pub fn _mm_cvt_roundsh_u64(a: __m128h) -> u64 { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttsh2si))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvttsh_i64(a: __m128h) -> i64 { unsafe { vcvttsh2si64(a, _MM_FROUND_CUR_DIRECTION) } } @@ -172,7 +172,7 @@ pub fn _mm_cvttsh_i64(a: __m128h) -> i64 { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttsh2si, SAE = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtt_roundsh_i64(a: __m128h) -> i64 { unsafe { static_assert_sae!(SAE); @@ -187,7 +187,7 @@ pub fn _mm_cvtt_roundsh_i64(a: __m128h) -> i64 { #[inline] #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttsh2usi))] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvttsh_u64(a: __m128h) -> u64 { unsafe { vcvttsh2usi64(a, _MM_FROUND_CUR_DIRECTION) } } @@ -202,7 +202,7 @@ pub fn _mm_cvttsh_u64(a: __m128h) -> u64 { #[target_feature(enable = "avx512fp16")] #[cfg_attr(test, assert_instr(vcvttsh2usi, SAE = 8))] #[rustc_legacy_const_generics(1)] -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub fn _mm_cvtt_roundsh_u64(a: __m128h) -> u64 { unsafe { static_assert_sae!(SAE); diff --git a/library/stdarch/crates/core_arch/src/x86_64/mod.rs b/library/stdarch/crates/core_arch/src/x86_64/mod.rs index c6dc7a85e785..9caab44e46cd 100644 --- a/library/stdarch/crates/core_arch/src/x86_64/mod.rs +++ b/library/stdarch/crates/core_arch/src/x86_64/mod.rs @@ -75,7 +75,7 @@ mod bt; pub use self::bt::*; mod avx512fp16; -#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")] pub use self::avx512fp16::*; mod amx; diff --git a/library/stdarch/crates/stdarch-gen-arm/spec/neon/aarch64.spec.yml b/library/stdarch/crates/stdarch-gen-arm/spec/neon/aarch64.spec.yml index a9bc377924dd..be19d34f9167 100644 --- a/library/stdarch/crates/stdarch-gen-arm/spec/neon/aarch64.spec.yml +++ b/library/stdarch/crates/stdarch-gen-arm/spec/neon/aarch64.spec.yml @@ -13,9 +13,9 @@ auto_llvm_sign_conversion: false neon-stable: &neon-stable FnCall: [stable, ['feature = "neon_intrinsics"', 'since = "1.59.0"']] -# #[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +# #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] neon-stable-fp16: &neon-stable-fp16 - FnCall: [stable, ['feature = "stdarch_neon_fp16"', 'since = "CURRENT_RUSTC_VERSION"']] + FnCall: [stable, ['feature = "stdarch_neon_fp16"', 'since = "1.94.0"']] # #[cfg(not(target_arch = "arm64ec"))] target-not-arm64ec: &target-not-arm64ec diff --git a/library/stdarch/crates/stdarch-gen-arm/spec/neon/arm_shared.spec.yml b/library/stdarch/crates/stdarch-gen-arm/spec/neon/arm_shared.spec.yml index 52748a4cc056..9c922d1a6501 100644 --- a/library/stdarch/crates/stdarch-gen-arm/spec/neon/arm_shared.spec.yml +++ b/library/stdarch/crates/stdarch-gen-arm/spec/neon/arm_shared.spec.yml @@ -10,9 +10,9 @@ auto_big_endian: true neon-stable: &neon-stable FnCall: [stable, ['feature = "neon_intrinsics"', 'since = "1.59.0"']] -# #[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] +# #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")] neon-stable-fp16: &neon-stable-fp16 - FnCall: [stable, ['feature = "stdarch_neon_fp16"', 'since = "CURRENT_RUSTC_VERSION"']] + FnCall: [stable, ['feature = "stdarch_neon_fp16"', 'since = "1.94.0"']] # #[cfg_attr(target_arch = "arm", unstable(feature = "stdarch_arm_neon_intrinsics", issue = "111800"))] neon-cfg-arm-unstable: &neon-cfg-arm-unstable @@ -55,9 +55,9 @@ neon-target-aarch64-arm64ec: &neon-target-aarch64-arm64ec neon-not-arm-stable: &neon-not-arm-stable FnCall: [cfg_attr, [{ FnCall: [not, ['target_arch = "arm"']]}, {FnCall: [stable, ['feature = "neon_intrinsics"', 'since = "1.59.0"']]}]] -# #[cfg_attr(not(target_arch = "arm"), stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION"))] +# #[cfg_attr(not(target_arch = "arm"), stable(feature = "stdarch_neon_fp16", since = "1.94.0"))] neon-not-arm-stable-fp16: &neon-not-arm-stable-fp16 - FnCall: [cfg_attr, [{ FnCall: [not, ['target_arch = "arm"']]}, {FnCall: [stable, ['feature = "stdarch_neon_fp16"', 'since = "CURRENT_RUSTC_VERSION"']]}]] + FnCall: [cfg_attr, [{ FnCall: [not, ['target_arch = "arm"']]}, {FnCall: [stable, ['feature = "stdarch_neon_fp16"', 'since = "1.94.0"']]}]] # #[cfg_attr(all(test, not(target_env = "msvc"))] msvc-disabled: &msvc-disabled From dd322a04257d48da8bea668f93f4668a26a8bc51 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 5 Feb 2026 13:42:06 -0800 Subject: [PATCH 071/265] Include library/stdarch for CURRENT_RUSTC_VERSION updates --- src/tools/replace-version-placeholder/src/main.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/tools/replace-version-placeholder/src/main.rs b/src/tools/replace-version-placeholder/src/main.rs index fb2838a4ea03..c2a7c4be64ae 100644 --- a/src/tools/replace-version-placeholder/src/main.rs +++ b/src/tools/replace-version-placeholder/src/main.rs @@ -16,7 +16,7 @@ fn main() { &root_path.join("src/doc/rustc"), &root_path.join("src/doc/rustdoc"), ], - |path, _is_dir| walk::filter_dirs(path), + |path, _is_dir| filter_dirs(path), &mut |entry, contents| { if !contents.contains(VERSION_PLACEHOLDER) { return; @@ -27,3 +27,9 @@ fn main() { }, ); } + +fn filter_dirs(path: &std::path::Path) -> bool { + // tidy would skip some paths that we do want to process + let allow = ["library/stdarch"]; + walk::filter_dirs(path) && !allow.iter().any(|p| path.ends_with(p)) +} From 2a6b9e6befac091246ae2a73d0d5f775f8cb04ca Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Tue, 3 Feb 2026 23:28:15 +0200 Subject: [PATCH 072/265] inline the binding --- compiler/rustc_expand/src/config.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/rustc_expand/src/config.rs b/compiler/rustc_expand/src/config.rs index c9d0319a97c5..c94a45ec9248 100644 --- a/compiler/rustc_expand/src/config.rs +++ b/compiler/rustc_expand/src/config.rs @@ -86,8 +86,7 @@ pub fn features(sess: &Session, krate_attrs: &[Attribute], crate_name: Symbol) - if let Some(f) = REMOVED_LANG_FEATURES.iter().find(|f| name == f.feature.name) { let pull_note = if let Some(pull) = f.pull { format!( - "; see for more information", - pull + "; see for more information", ) } else { "".to_owned() From 193bc70101fc8c34e81bfdb5711c6a6aa1c35729 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Tue, 3 Feb 2026 23:28:59 +0200 Subject: [PATCH 073/265] missing word --- compiler/rustc_expand/src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_expand/src/config.rs b/compiler/rustc_expand/src/config.rs index c94a45ec9248..e4d734086a54 100644 --- a/compiler/rustc_expand/src/config.rs +++ b/compiler/rustc_expand/src/config.rs @@ -122,7 +122,7 @@ pub fn features(sess: &Session, krate_attrs: &[Attribute], crate_name: Symbol) - // If the enabled feature is unstable, record it. if UNSTABLE_LANG_FEATURES.iter().find(|f| name == f.name).is_some() { - // When the ICE comes a standard library crate, there's a chance that the person + // When the ICE comes from a standard library crate, there's a chance that the person // hitting the ICE may be using -Zbuild-std or similar with an untested target. // The bug is probably in the standard library and not the compiler in that case, // but that doesn't really matter - we want a bug report. From 85f4694b7d2497fb944bb993fdb7aa5a922a0e6e Mon Sep 17 00:00:00 2001 From: The Miri Cronjob Bot Date: Fri, 6 Feb 2026 05:15:37 +0000 Subject: [PATCH 074/265] Prepare for merging from rust-lang/rust This updates the rust-version file to f889772d6500faebcac5bb70fa44b5e6581c38cd. --- src/tools/miri/rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/miri/rust-version b/src/tools/miri/rust-version index c122f58ec34a..e51d39de3c1b 100644 --- a/src/tools/miri/rust-version +++ b/src/tools/miri/rust-version @@ -1 +1 @@ -9f4b56a5aed81e8c36cc26b3c1b4666ead6b71fc +f889772d6500faebcac5bb70fa44b5e6581c38cd From 001d710747478b57b11abaa1bac23657b0c1dec1 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 6 Feb 2026 09:03:59 -0800 Subject: [PATCH 075/265] Replace a stale clippy `CURRENT_RUSTC_VERSION` --- src/tools/clippy/clippy_lints/src/deprecated_lints.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/clippy/clippy_lints/src/deprecated_lints.rs b/src/tools/clippy/clippy_lints/src/deprecated_lints.rs index 6e62e983d2f3..ff92cd059839 100644 --- a/src/tools/clippy/clippy_lints/src/deprecated_lints.rs +++ b/src/tools/clippy/clippy_lints/src/deprecated_lints.rs @@ -123,7 +123,7 @@ declare_with_version! { RENAMED(RENAMED_VERSION) = [ ("clippy::into_iter_on_array", "array_into_iter"), #[clippy::version = ""] ("clippy::invalid_atomic_ordering", "invalid_atomic_ordering"), - #[clippy::version = "CURRENT_RUSTC_VERSION"] + #[clippy::version = "1.88.0"] ("clippy::invalid_null_ptr_usage", "invalid_null_arguments"), #[clippy::version = ""] ("clippy::invalid_ref", "invalid_value"), From 5b6813879702bedea495119c4b132671f0790aca Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Tue, 3 Feb 2026 23:31:43 +0200 Subject: [PATCH 076/265] add trailing commas --- rust-bors.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rust-bors.toml b/rust-bors.toml index 9b632481c7c3..0efbb5e8fc61 100644 --- a/rust-bors.toml +++ b/rust-bors.toml @@ -25,7 +25,7 @@ labels_blocking_approval = [ "S-waiting-on-t-rustdoc-frontend", "S-waiting-on-t-clippy", # PR manually set to blocked - "S-blocked" + "S-blocked", ] # If CI runs quicker than this duration, consider it to be a failure @@ -41,7 +41,7 @@ approved = [ "-S-waiting-on-author", "-S-waiting-on-crater", "-S-waiting-on-review", - "-S-waiting-on-team" + "-S-waiting-on-team", ] unapproved = [ "+S-waiting-on-author", @@ -49,16 +49,16 @@ unapproved = [ "-S-waiting-on-bors", "-S-waiting-on-crater", "-S-waiting-on-review", - "-S-waiting-on-team" + "-S-waiting-on-team", ] try_failed = [ "+S-waiting-on-author", "-S-waiting-on-review", - "-S-waiting-on-crater" + "-S-waiting-on-crater", ] auto_build_succeeded = [ "+merged-by-bors", - "-S-waiting-on-bors" + "-S-waiting-on-bors", ] auto_build_failed = [ "+S-waiting-on-review", @@ -66,5 +66,5 @@ auto_build_failed = [ "-S-waiting-on-bors", "-S-waiting-on-author", "-S-waiting-on-crater", - "-S-waiting-on-team" + "-S-waiting-on-team", ] From 6bb8cc619e908f32f451f685d8ee928840eaa6a8 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Tue, 3 Feb 2026 23:33:56 +0200 Subject: [PATCH 077/265] obsolete comment `since` is now a field of one of the parameters --- compiler/rustc_feature/src/unstable.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index c99af9658cde..a0cb99f9ea4a 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -64,8 +64,6 @@ pub struct EnabledLibFeature { } impl Features { - /// `since` should be set for stable features that are nevertheless enabled with a `#[feature]` - /// attribute, indicating since when they are stable. pub fn set_enabled_lang_feature(&mut self, lang_feat: EnabledLangFeature) { self.enabled_lang_features.push(lang_feat); self.enabled_features.insert(lang_feat.gate_name); From 638d23ce4203c0064c8849ce6f265a74cb68bc7d Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Thu, 5 Feb 2026 14:03:10 +0200 Subject: [PATCH 078/265] E0570: improve text --- compiler/rustc_error_codes/src/error_codes/E0570.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_error_codes/src/error_codes/E0570.md b/compiler/rustc_error_codes/src/error_codes/E0570.md index 355e71ffb432..e8a7200c1d05 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0570.md +++ b/compiler/rustc_error_codes/src/error_codes/E0570.md @@ -1,7 +1,7 @@ The requested ABI is unsupported by the current target. -The rust compiler maintains for each target a list of unsupported ABIs on -that target. If an ABI is present in such a list this usually means that the +The Rust compiler maintains a list of unsupported ABIs for each target. +If an ABI is present in such a list, this usually means that the target / ABI combination is currently unsupported by llvm. If necessary, you can circumvent this check using custom target specifications. From 84741ed8ce900c5fab9984fe8d152cbff2af1809 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Thu, 5 Feb 2026 14:03:49 +0200 Subject: [PATCH 079/265] add reading pauses in doc comment --- compiler/rustc_lint_defs/src/builtin.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs index f4e6e93356c7..d792e936ef34 100644 --- a/compiler/rustc_lint_defs/src/builtin.rs +++ b/compiler/rustc_lint_defs/src/builtin.rs @@ -3629,10 +3629,10 @@ declare_lint! { /// `stdcall`, `fastcall`, and `cdecl` calling conventions (or their unwind /// variants) on targets that cannot meaningfully be supported for the requested target. /// - /// For example `stdcall` does not make much sense for a x86_64 or, more apparently, powerpc + /// For example, `stdcall` does not make much sense for a x86_64 or, more apparently, powerpc /// code, because this calling convention was never specified for those targets. /// - /// Historically MSVC toolchains have fallen back to the regular C calling convention for + /// Historically, MSVC toolchains have fallen back to the regular C calling convention for /// targets other than x86, but Rust doesn't really see a similar need to introduce a similar /// hack across many more targets. /// @@ -3659,7 +3659,7 @@ declare_lint! { /// /// ### Explanation /// - /// On most of the targets the behaviour of `stdcall` and similar calling conventions is not + /// On most of the targets, the behaviour of `stdcall` and similar calling conventions is not /// defined at all, but was previously accepted due to a bug in the implementation of the /// compiler. pub UNSUPPORTED_CALLING_CONVENTIONS, From 3be2843107838f3198820cf0c33f9c1d2216196d Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Fri, 6 Feb 2026 05:26:43 +0200 Subject: [PATCH 080/265] make docs render better by separating intro from rest of paragraph --- compiler/rustc_feature/src/unstable.rs | 5 ++-- compiler/rustc_type_ir/src/predicate.rs | 13 ++++++++-- compiler/rustc_type_ir/src/ty_kind.rs | 34 ++++++++++++++++++------- 3 files changed, 39 insertions(+), 13 deletions(-) diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index a0cb99f9ea4a..2c7c6dbdb9e8 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -769,8 +769,9 @@ impl Features { } } -/// Some features are not allowed to be used together at the same time, if -/// the two are present, produce an error. +/// Some features are not allowed to be used together at the same time. +/// +/// If the two are present, produce an error. pub const INCOMPATIBLE_FEATURES: &[(Symbol, Symbol)] = &[ // Experimental match ergonomics rulesets are incompatible with each other, to simplify the // boolean logic required to tell which typing rules to use. diff --git a/compiler/rustc_type_ir/src/predicate.rs b/compiler/rustc_type_ir/src/predicate.rs index 42d204a8b094..ab4677fa0a5f 100644 --- a/compiler/rustc_type_ir/src/predicate.rs +++ b/compiler/rustc_type_ir/src/predicate.rs @@ -42,7 +42,9 @@ where } } -/// A complete reference to a trait. These take numerous guises in syntax, +/// A complete reference to a trait. +/// +/// These take numerous guises in syntax, /// but perhaps the most recognizable form is in a where-clause: /// ```ignore (illustrative) /// T: Foo @@ -241,7 +243,9 @@ impl ImplPolarity { } } -/// Polarity for a trait predicate. May either be negative or positive. +/// Polarity for a trait predicate. +/// +/// 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)] @@ -327,6 +331,7 @@ impl ty::Binder> { } /// An existential reference to a trait, where `Self` is erased. +/// /// For example, the trait object `Trait<'a, 'b, X, Y>` is: /// ```ignore (illustrative) /// exists T. T: Trait<'a, 'b, X, Y> @@ -442,6 +447,7 @@ impl ExistentialProjection { } /// Extracts the underlying existential trait reference from this projection. + /// /// For example, if this is a projection of `exists T. ::Item == X`, /// then this function would return an `exists T. T: Iterator` existential trait /// reference. @@ -493,14 +499,17 @@ impl ty::Binder> { #[cfg_attr(feature = "nightly", derive(Encodable, Decodable, HashStable_NoContext))] pub enum AliasTermKind { /// A projection `::AssocType`. + /// /// Can get normalized away if monomorphic enough. ProjectionTy, /// An associated type in an inherent `impl` InherentTy, /// An opaque type (usually from `impl Trait` in type aliases or function return types) + /// /// Can only be normalized away in PostAnalysis mode or its defining scope. OpaqueTy, /// A free type alias that actually checks its trait bounds. + /// /// Currently only used if the type alias references opaque types. /// Can always be normalized away. FreeTy, diff --git a/compiler/rustc_type_ir/src/ty_kind.rs b/compiler/rustc_type_ir/src/ty_kind.rs index 7cb71387e868..983d8f0820b6 100644 --- a/compiler/rustc_type_ir/src/ty_kind.rs +++ b/compiler/rustc_type_ir/src/ty_kind.rs @@ -29,14 +29,17 @@ mod closure; )] pub enum AliasTyKind { /// A projection `::AssocType`. + /// /// Can get normalized away if monomorphic enough. Projection, /// An associated type in an inherent `impl` Inherent, /// An opaque type (usually from `impl Trait` in type aliases or function return types) + /// /// Can only be normalized away in PostAnalysis mode or its defining scope. Opaque, /// A type alias that actually checks its trait bounds. + /// /// Currently only used if the type alias references opaque types. /// Can always be normalized away. Free, @@ -99,7 +102,9 @@ pub enum TyKind { /// An array with the given length. Written as `[T; N]`. Array(I::Ty, I::Const), - /// A pattern newtype. Takes any type and restricts its valid values to its pattern. + /// A pattern newtype. + /// + /// Takes any type and restricts its valid values to its pattern. /// This will also change the layout to take advantage of this restriction. /// Only `Copy` and `Clone` will automatically get implemented for pattern types. /// Auto-traits treat this as if it were an aggregate with a single nested type. @@ -116,8 +121,9 @@ pub enum TyKind { /// `&'a mut T` or `&'a T`. Ref(I::Region, I::Ty, Mutability), - /// The anonymous type of a function declaration/definition. Each - /// function has a unique type. + /// The anonymous type of a function declaration/definition. + /// + /// Each function has a unique type. /// /// For the function `fn foo() -> i32 { 3 }` this type would be /// shown to the user as `fn() -> i32 {foo}`. @@ -129,7 +135,9 @@ pub enum TyKind { /// ``` FnDef(I::FunctionId, I::GenericArgs), - /// A pointer to a function. Written as `fn() -> i32`. + /// A pointer to a function. + /// + /// Written as `fn() -> i32`. /// /// Note that both functions and closures start out as either /// [FnDef] or [Closure] which can be then be coerced to this variant. @@ -179,6 +187,7 @@ pub enum TyKind { Coroutine(I::CoroutineId, I::GenericArgs), /// A type representing the types stored inside a coroutine. + /// /// This should only appear as part of the `CoroutineArgs`. /// /// Unlike upvars, the witness can reference lifetimes from @@ -210,6 +219,7 @@ pub enum TyKind { Tuple(I::Tys), /// A projection, opaque type, free type alias, or inherent associated type. + /// /// All of these types are represented as pairs of def-id and args, and can /// be normalized, so they are grouped conceptually. Alias(AliasTyKind, AliasTy), @@ -253,8 +263,9 @@ pub enum TyKind { /// inside of the type. Infer(InferTy), - /// A placeholder for a type which could not be computed; this is - /// propagated to avoid useless error messages. + /// A placeholder for a type which could not be computed. + /// + /// This is propagated to avoid useless error messages. Error(I::ErrorGuaranteed), } @@ -282,7 +293,9 @@ impl TyKind { } /// Returns `true` when the outermost type cannot be further normalized, - /// resolved, or instantiated. This includes all primitive types, but also + /// resolved, or instantiated. + /// + /// This includes all primitive types, but also /// things like ADTs and trait objects, since even if their arguments or /// nested types may be further simplified, the outermost [`ty::TyKind`] or /// type constructor remains the same. @@ -481,6 +494,7 @@ impl AliasTy { } /// Extracts the underlying trait reference and own args from this projection. + /// /// For example, if this is a projection of `::Item<'a>`, /// then this function would return a `T: StreamingIterator` trait reference and /// `['a]` as the own args. @@ -490,6 +504,7 @@ impl AliasTy { } /// Extracts the underlying trait reference from this projection. + /// /// For example, if this is a projection of `::Item`, /// then this function would return a `T: Iterator` trait reference. /// @@ -593,8 +608,9 @@ pub enum InferTy { FloatVar(FloatVid), /// A [`FreshTy`][Self::FreshTy] is one that is generated as a replacement - /// for an unbound type variable. This is convenient for caching etc. See - /// `TypeFreshener` for more details. + /// for an unbound type variable. + /// + /// This is convenient for caching etc. See `TypeFreshener` for more details. /// /// Compare with [`TyVar`][Self::TyVar]. FreshTy(u32), From f605c0ab7c66506172600ad37a05be3603a20dd2 Mon Sep 17 00:00:00 2001 From: bit-aloo Date: Sun, 8 Feb 2026 22:14:06 +0530 Subject: [PATCH 081/265] self_param and impl_ implementation in syntax_factory --- .../src/ast/syntax_factory/constructors.rs | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/src/tools/rust-analyzer/crates/syntax/src/ast/syntax_factory/constructors.rs b/src/tools/rust-analyzer/crates/syntax/src/ast/syntax_factory/constructors.rs index 5fe419ad4eb7..ad9b9054a8f5 100644 --- a/src/tools/rust-analyzer/crates/syntax/src/ast/syntax_factory/constructors.rs +++ b/src/tools/rust-analyzer/crates/syntax/src/ast/syntax_factory/constructors.rs @@ -1590,6 +1590,65 @@ impl SyntaxFactory { ast } + pub fn self_param(&self) -> ast::SelfParam { + let ast = make::self_param().clone_for_update(); + + if let Some(mut mapping) = self.mappings() { + let builder = SyntaxMappingBuilder::new(ast.syntax().clone()); + builder.finish(&mut mapping); + } + + ast + } + + pub fn impl_( + &self, + attrs: impl IntoIterator, + generic_params: Option, + generic_args: Option, + path_type: ast::Type, + where_clause: Option, + body: Option, + ) -> ast::Impl { + let (attrs, attrs_input) = iterator_input(attrs); + let ast = make::impl_( + attrs, + generic_params.clone(), + generic_args.clone(), + path_type.clone(), + where_clause.clone(), + body.clone(), + ) + .clone_for_update(); + + if let Some(mut mapping) = self.mappings() { + let mut builder = SyntaxMappingBuilder::new(ast.syntax().clone()); + builder.map_children(attrs_input, ast.attrs().map(|attr| attr.syntax().clone())); + if let Some(generic_params) = generic_params { + builder.map_node( + generic_params.syntax().clone(), + ast.generic_param_list().unwrap().syntax().clone(), + ); + } + builder.map_node(path_type.syntax().clone(), ast.self_ty().unwrap().syntax().clone()); + if let Some(where_clause) = where_clause { + builder.map_node( + where_clause.syntax().clone(), + ast.where_clause().unwrap().syntax().clone(), + ); + } + if let Some(body) = body { + builder.map_node( + body.syntax().clone(), + ast.assoc_item_list().unwrap().syntax().clone(), + ); + } + builder.finish(&mut mapping); + } + + ast + } + pub fn ret_type(&self, ty: ast::Type) -> ast::RetType { let ast = make::ret_type(ty.clone()).clone_for_update(); From fa31e1759a65a3689a6a9ed23eff65da9cc8ce76 Mon Sep 17 00:00:00 2001 From: bit-aloo Date: Sun, 8 Feb 2026 22:14:30 +0530 Subject: [PATCH 082/265] migrate generate_getter_or_setter to syntaxeditor api --- .../src/handlers/generate_getter_or_setter.rs | 161 +++++++++++------- 1 file changed, 100 insertions(+), 61 deletions(-) diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_getter_or_setter.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_getter_or_setter.rs index 73e93a3fbf52..2db5e46bb093 100644 --- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_getter_or_setter.rs +++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_getter_or_setter.rs @@ -2,13 +2,16 @@ use ide_db::{famous_defs::FamousDefs, source_change::SourceChangeBuilder}; use stdx::{format_to, to_lower_snake_case}; use syntax::{ TextRange, - ast::{self, AstNode, HasName, HasVisibility, edit_in_place::Indent, make}, - ted, + ast::{ + self, AstNode, HasGenericParams, HasName, HasVisibility, edit_in_place::Indent, + syntax_factory::SyntaxFactory, + }, + syntax_editor::Position, }; use crate::{ AssistContext, AssistId, Assists, GroupLabel, - utils::{convert_reference_type, find_struct_impl, generate_impl}, + utils::{convert_reference_type, find_struct_impl}, }; // Assist: generate_setter @@ -215,12 +218,14 @@ fn generate_getter_from_info( ctx: &AssistContext<'_>, info: &AssistInfo, record_field_info: &RecordFieldInfo, + syntax_factory: &SyntaxFactory, ) -> ast::Fn { let (ty, body) = if matches!(info.assist_type, AssistType::MutGet) { + let self_expr = syntax_factory.expr_path(syntax_factory.ident_path("self")); ( - make::ty_ref(record_field_info.field_ty.clone(), true), - make::expr_ref( - make::expr_field(make::ext::expr_self(), &record_field_info.field_name.text()), + syntax_factory.ty_ref(record_field_info.field_ty.clone(), true), + syntax_factory.expr_ref( + syntax_factory.expr_field(self_expr, &record_field_info.field_name.text()).into(), true, ), ) @@ -241,9 +246,14 @@ fn generate_getter_from_info( })() .unwrap_or_else(|| { ( - make::ty_ref(record_field_info.field_ty.clone(), false), - make::expr_ref( - make::expr_field(make::ext::expr_self(), &record_field_info.field_name.text()), + syntax_factory.ty_ref(record_field_info.field_ty.clone(), false), + syntax_factory.expr_ref( + syntax_factory + .expr_field( + syntax_factory.expr_path(syntax_factory.ident_path("self")), + &record_field_info.field_name.text(), + ) + .into(), false, ), ) @@ -251,18 +261,18 @@ fn generate_getter_from_info( }; let self_param = if matches!(info.assist_type, AssistType::MutGet) { - make::mut_self_param() + syntax_factory.mut_self_param() } else { - make::self_param() + syntax_factory.self_param() }; let strukt = &info.strukt; - let fn_name = make::name(&record_field_info.fn_name); - let params = make::param_list(Some(self_param), []); - let ret_type = Some(make::ret_type(ty)); - let body = make::block_expr([], Some(body)); + let fn_name = syntax_factory.name(&record_field_info.fn_name); + let params = syntax_factory.param_list(Some(self_param), []); + let ret_type = Some(syntax_factory.ret_type(ty)); + let body = syntax_factory.block_expr([], Some(body)); - make::fn_( + syntax_factory.fn_( None, strukt.visibility(), fn_name, @@ -278,28 +288,35 @@ fn generate_getter_from_info( ) } -fn generate_setter_from_info(info: &AssistInfo, record_field_info: &RecordFieldInfo) -> ast::Fn { +fn generate_setter_from_info( + info: &AssistInfo, + record_field_info: &RecordFieldInfo, + syntax_factory: &SyntaxFactory, +) -> ast::Fn { let strukt = &info.strukt; let field_name = &record_field_info.fn_name; - let fn_name = make::name(&format!("set_{field_name}")); + let fn_name = syntax_factory.name(&format!("set_{field_name}")); let field_ty = &record_field_info.field_ty; // Make the param list // `(&mut self, $field_name: $field_ty)` - let field_param = - make::param(make::ident_pat(false, false, make::name(field_name)).into(), field_ty.clone()); - let params = make::param_list(Some(make::mut_self_param()), [field_param]); + let field_param = syntax_factory.param( + syntax_factory.ident_pat(false, false, syntax_factory.name(field_name)).into(), + field_ty.clone(), + ); + let params = syntax_factory.param_list(Some(syntax_factory.mut_self_param()), [field_param]); // Make the assignment body // `self.$field_name = $field_name` - let self_expr = make::ext::expr_self(); - let lhs = make::expr_field(self_expr, field_name); - let rhs = make::expr_path(make::ext::ident_path(field_name)); - let assign_stmt = make::expr_stmt(make::expr_assignment(lhs, rhs).into()); - let body = make::block_expr([assign_stmt.into()], None); + let self_expr = syntax_factory.expr_path(syntax_factory.ident_path("self")); + let lhs = syntax_factory.expr_field(self_expr, field_name); + let rhs = syntax_factory.expr_path(syntax_factory.ident_path(field_name)); + let assign_stmt = + syntax_factory.expr_stmt(syntax_factory.expr_assignment(lhs.into(), rhs).into()); + let body = syntax_factory.block_expr([assign_stmt.into()], None); // Make the setter fn - make::fn_( + syntax_factory.fn_( None, strukt.visibility(), fn_name, @@ -403,47 +420,69 @@ fn build_source_change( info_of_record_fields: Vec, assist_info: AssistInfo, ) { - let record_fields_count = info_of_record_fields.len(); + let syntax_factory = SyntaxFactory::without_mappings(); - let impl_def = if let Some(impl_def) = &assist_info.impl_def { + let items: Vec = info_of_record_fields + .iter() + .map(|record_field_info| { + let method = match assist_info.assist_type { + AssistType::Set => { + generate_setter_from_info(&assist_info, record_field_info, &syntax_factory) + } + _ => { + generate_getter_from_info(ctx, &assist_info, record_field_info, &syntax_factory) + } + }; + let new_fn = method.clone_for_update(); + new_fn.indent(1.into()); + new_fn.into() + }) + .collect(); + + if let Some(impl_def) = &assist_info.impl_def { // We have an existing impl to add to - builder.make_mut(impl_def.clone()) - } else { - // Generate a new impl to add the methods to - let impl_def = generate_impl(&ast::Adt::Struct(assist_info.strukt.clone())); + let mut editor = builder.make_editor(impl_def.syntax()); + impl_def.assoc_item_list().unwrap().add_items(&mut editor, items.clone()); - // Insert it after the adt - let strukt = builder.make_mut(assist_info.strukt.clone()); - - ted::insert_all_raw( - ted::Position::after(strukt.syntax()), - vec![make::tokens::blank_line().into(), impl_def.syntax().clone().into()], - ); - - impl_def - }; - - let assoc_item_list = impl_def.get_or_create_assoc_item_list(); - - for (i, record_field_info) in info_of_record_fields.iter().enumerate() { - // Make the new getter or setter fn - let new_fn = match assist_info.assist_type { - AssistType::Set => generate_setter_from_info(&assist_info, record_field_info), - _ => generate_getter_from_info(ctx, &assist_info, record_field_info), - } - .clone_for_update(); - new_fn.indent(1.into()); - - // Insert a tabstop only for last method we generate - if i == record_fields_count - 1 - && let Some(cap) = ctx.config.snippet_cap - && let Some(name) = new_fn.name() + if let Some(cap) = ctx.config.snippet_cap + && let Some(ast::AssocItem::Fn(fn_)) = items.last() + && let Some(name) = fn_.name() { - builder.add_tabstop_before(cap, name); + let tabstop = builder.make_tabstop_before(cap); + editor.add_annotation(name.syntax(), tabstop); } - assoc_item_list.add_item(new_fn.clone().into()); + builder.add_file_edits(ctx.vfs_file_id(), editor); + return; } + let ty_params = assist_info.strukt.generic_param_list(); + let ty_args = ty_params.as_ref().map(|it| it.to_generic_args()); + let impl_def = syntax_factory.impl_( + None, + ty_params, + ty_args, + syntax_factory + .ty_path(syntax_factory.ident_path(&assist_info.strukt.name().unwrap().to_string())) + .into(), + None, + Some(syntax_factory.assoc_item_list(items)), + ); + let mut editor = builder.make_editor(assist_info.strukt.syntax()); + editor.insert_all( + Position::after(assist_info.strukt.syntax()), + vec![syntax_factory.whitespace("\n\n").into(), impl_def.syntax().clone().into()], + ); + + if let Some(cap) = ctx.config.snippet_cap + && let Some(assoc_list) = impl_def.assoc_item_list() + && let Some(ast::AssocItem::Fn(fn_)) = assoc_list.assoc_items().last() + && let Some(name) = fn_.name() + { + let tabstop = builder.make_tabstop_before(cap); + editor.add_annotation(name.syntax().clone(), tabstop); + } + + builder.add_file_edits(ctx.vfs_file_id(), editor); } #[cfg(test)] From 59111f7a73fda12e0401cb35ccab7fbcd80ad272 Mon Sep 17 00:00:00 2001 From: Vincent Esche Date: Wed, 4 Feb 2026 09:01:24 +0100 Subject: [PATCH 083/265] Add `expression_types()`, `pattern_types()`, `binding_types()` to `DefWithBody` --- src/tools/rust-analyzer/crates/hir/src/lib.rs | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/tools/rust-analyzer/crates/hir/src/lib.rs b/src/tools/rust-analyzer/crates/hir/src/lib.rs index 4b615665167c..0167ccaa1002 100644 --- a/src/tools/rust-analyzer/crates/hir/src/lib.rs +++ b/src/tools/rust-analyzer/crates/hir/src/lib.rs @@ -2244,6 +2244,39 @@ impl DefWithBody { acc.push(diag.into()) } } + + /// Returns an iterator over the inferred types of all expressions in this body. + pub fn expression_types<'db>( + self, + db: &'db dyn HirDatabase, + ) -> impl Iterator> { + self.id().into_iter().flat_map(move |def_id| { + let infer = InferenceResult::for_body(db, def_id); + let resolver = def_id.resolver(db); + + infer.expression_types().map(move |(_, ty)| Type::new_with_resolver(db, &resolver, ty)) + }) + } + + /// Returns an iterator over the inferred types of all patterns in this body. + pub fn pattern_types<'db>(self, db: &'db dyn HirDatabase) -> impl Iterator> { + self.id().into_iter().flat_map(move |def_id| { + let infer = InferenceResult::for_body(db, def_id); + let resolver = def_id.resolver(db); + + infer.pattern_types().map(move |(_, ty)| Type::new_with_resolver(db, &resolver, ty)) + }) + } + + /// Returns an iterator over the inferred types of all bindings in this body. + pub fn binding_types<'db>(self, db: &'db dyn HirDatabase) -> impl Iterator> { + self.id().into_iter().flat_map(move |def_id| { + let infer = InferenceResult::for_body(db, def_id); + let resolver = def_id.resolver(db); + + infer.binding_types().map(move |(_, ty)| Type::new_with_resolver(db, &resolver, ty)) + }) + } } fn expr_store_diagnostics<'db>( From 91a612620822993435a49c288256c1028351a236 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20K=C3=A5re=20Alsaker?= Date: Mon, 9 Feb 2026 07:36:48 +0100 Subject: [PATCH 084/265] Use `scope` for `par_slice` instead of `join` --- .../src/sync/parallel.rs | 41 +++++++------------ 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/compiler/rustc_data_structures/src/sync/parallel.rs b/compiler/rustc_data_structures/src/sync/parallel.rs index b515c0bee8a6..552d02b8b91d 100644 --- a/compiler/rustc_data_structures/src/sync/parallel.rs +++ b/compiler/rustc_data_structures/src/sync/parallel.rs @@ -138,34 +138,21 @@ fn par_slice( guard: &ParallelGuard, for_each: impl Fn(&mut I) + DynSync + DynSend, ) { - struct State<'a, F> { - for_each: FromDyn, - guard: &'a ParallelGuard, - group: usize, - } - - fn par_rec( - items: &mut [I], - state: &State<'_, F>, - ) { - if items.len() <= state.group { - for item in items { - state.guard.run(|| (state.for_each)(item)); - } - } else { - let (left, right) = items.split_at_mut(items.len() / 2); - let mut left = state.for_each.derive(left); - let mut right = state.for_each.derive(right); - rustc_thread_pool::join(move || par_rec(*left, state), move || par_rec(*right, state)); + let for_each = FromDyn::from(for_each); + let mut items = for_each.derive(items); + rustc_thread_pool::scope(|s| { + let proof = items.derive(()); + let group_size = std::cmp::max(items.len() / 128, 1); + for group in items.chunks_exact_mut(group_size) { + let group = proof.derive(group); + s.spawn(|_| { + let mut group = group; + for i in group.iter_mut() { + guard.run(|| for_each(i)); + } + }); } - } - - let state = State { - for_each: FromDyn::from(for_each), - guard, - group: std::cmp::max(items.len() / 128, 1), - }; - par_rec(items, &state) + }); } pub fn par_for_each_in>( From 3339b061af6a9c37ae326f60895048ddbbf3cd6d Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Sat, 7 Feb 2026 19:24:59 +0000 Subject: [PATCH 085/265] Do not require `'static` for obtaining reflection information. --- library/core/src/intrinsics/mod.rs | 2 +- library/core/src/mem/type_info.rs | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/library/core/src/intrinsics/mod.rs b/library/core/src/intrinsics/mod.rs index 051dda731881..094def9796db 100644 --- a/library/core/src/intrinsics/mod.rs +++ b/library/core/src/intrinsics/mod.rs @@ -2887,7 +2887,7 @@ pub const fn type_name() -> &'static str; #[rustc_nounwind] #[unstable(feature = "core_intrinsics", issue = "none")] #[rustc_intrinsic] -pub const fn type_id() -> crate::any::TypeId; +pub const fn type_id() -> crate::any::TypeId; /// Tests (at compile-time) if two [`crate::any::TypeId`] instances identify the /// same type. This is necessary because at const-eval time the actual discriminating diff --git a/library/core/src/mem/type_info.rs b/library/core/src/mem/type_info.rs index 8b30803c97c9..d3a7421ff2ee 100644 --- a/library/core/src/mem/type_info.rs +++ b/library/core/src/mem/type_info.rs @@ -2,7 +2,7 @@ //! runtime or const-eval processable way. use crate::any::TypeId; -use crate::intrinsics::type_of; +use crate::intrinsics::{type_id, type_of}; /// Compile-time type information. #[derive(Debug)] @@ -28,11 +28,17 @@ impl TypeId { impl Type { /// Returns the type information of the generic type parameter. + /// + /// Note: Unlike `TypeId`s obtained via `TypeId::of`, the `Type` + /// struct and its fields contain `TypeId`s that are not necessarily + /// derived from types that outlive `'static`. This means that using + /// the `TypeId`s (transitively) obtained from this function will + /// be able to break invariants that other `TypeId` consuming crates + /// may have assumed to hold. #[unstable(feature = "type_info", issue = "146922")] #[rustc_const_unstable(feature = "type_info", issue = "146922")] - // FIXME(reflection): don't require the 'static bound - pub const fn of() -> Self { - const { TypeId::of::().info() } + pub const fn of() -> Self { + const { type_id::().info() } } } From ae24fdaccc71600ec540ff018208c5d592ad016a Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 9 Feb 2026 12:45:01 +0100 Subject: [PATCH 086/265] fix: Fix `set_top_subtree_delimiter_span` using wrong index for close span --- src/tools/rust-analyzer/crates/tt/src/storage.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/rust-analyzer/crates/tt/src/storage.rs b/src/tools/rust-analyzer/crates/tt/src/storage.rs index 4dd02d875a29..50a1106175ab 100644 --- a/src/tools/rust-analyzer/crates/tt/src/storage.rs +++ b/src/tools/rust-analyzer/crates/tt/src/storage.rs @@ -488,7 +488,7 @@ impl TopSubtree { unreachable!() }; *open_span = S::new(span.open.range, 0); - *close_span = S::new(span.close.range, 0); + *close_span = S::new(span.close.range, 1); } dispatch! { match &mut self.repr => tt => do_it(tt, span) From e7855f5bfaf5d0d568f1fe4d9c07aec1144f405d Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Tue, 3 Feb 2026 15:59:46 +0000 Subject: [PATCH 087/265] internal: Run clippy as a separate CI step Currently clippy is run in CI as part of the macOS build. This is a little confusing, because clippy failures just show as "Rust (macos-latest)" which make it look like a macOS build failure. Instead, treat clippy as a separate build step, like miri and rustfmt. This should also make CI a little faster, because it reduces macOS runner usage (which tend to be slower than Linux on GitHub actions), and it reduces the number of steps where we need to install clippy. --- .../rust-analyzer/.github/workflows/ci.yaml | 30 +++++++++++++++---- .../crates/hir-ty/src/mir/eval.rs | 2 +- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/tools/rust-analyzer/.github/workflows/ci.yaml b/src/tools/rust-analyzer/.github/workflows/ci.yaml index 1a0deee564ae..c3a5017d72d7 100644 --- a/src/tools/rust-analyzer/.github/workflows/ci.yaml +++ b/src/tools/rust-analyzer/.github/workflows/ci.yaml @@ -96,7 +96,7 @@ jobs: run: | rustup update --no-self-update stable rustup default stable - rustup component add --toolchain stable rust-src clippy rustfmt + rustup component add --toolchain stable rust-src rustfmt # We also install a nightly rustfmt, because we use `--file-lines` in # a test. rustup toolchain install nightly --profile minimal --component rustfmt @@ -128,10 +128,6 @@ jobs: - name: Run cargo-machete run: cargo machete - - name: Run Clippy - if: matrix.os == 'macos-latest' - run: cargo clippy --all-targets -- -D clippy::disallowed_macros -D clippy::dbg_macro -D clippy::todo -D clippy::print_stdout -D clippy::print_stderr - analysis-stats: if: github.repository == 'rust-lang/rust-analyzer' runs-on: ubuntu-latest @@ -178,6 +174,28 @@ jobs: - run: cargo fmt -- --check + clippy: + if: github.repository == 'rust-lang/rust-analyzer' + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Note that clippy output is currently dependent on whether rust-src is installed, + # https://github.com/rust-lang/rust-clippy/issues/14625 + - name: Install Rust toolchain + run: | + rustup update --no-self-update stable + rustup default stable + rustup component add --toolchain stable rust-src clippy + + # https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/rust.json + - name: Install Rust Problem Matcher + run: echo "::add-matcher::.github/rust.json" + + - run: cargo clippy --all-targets -- -D clippy::disallowed_macros -D clippy::dbg_macro -D clippy::todo -D clippy::print_stdout -D clippy::print_stderr + miri: if: github.repository == 'rust-lang/rust-analyzer' runs-on: ubuntu-latest @@ -309,7 +327,7 @@ jobs: run: typos conclusion: - needs: [rust, rust-cross, typescript, typo-check, proc-macro-srv, miri, rustfmt, analysis-stats] + needs: [rust, rust-cross, typescript, typo-check, proc-macro-srv, miri, rustfmt, clippy, analysis-stats] # We need to ensure this job does *not* get skipped if its dependencies fail, # because a skipped job is considered a success by GitHub. So we have to # overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/mir/eval.rs b/src/tools/rust-analyzer/crates/hir-ty/src/mir/eval.rs index 5de08313f418..ec0723c3f8c3 100644 --- a/src/tools/rust-analyzer/crates/hir-ty/src/mir/eval.rs +++ b/src/tools/rust-analyzer/crates/hir-ty/src/mir/eval.rs @@ -1625,7 +1625,7 @@ impl<'db> Evaluator<'db> { }; match target_ty { rustc_type_ir::FloatTy::F32 => Owned((value as f32).to_le_bytes().to_vec()), - rustc_type_ir::FloatTy::F64 => Owned((value as f64).to_le_bytes().to_vec()), + rustc_type_ir::FloatTy::F64 => Owned(value.to_le_bytes().to_vec()), rustc_type_ir::FloatTy::F16 | rustc_type_ir::FloatTy::F128 => { not_supported!("unstable floating point type f16 and f128"); } From 6494dabc33a27dafd61b98dca55915b5cb7f60de Mon Sep 17 00:00:00 2001 From: Shoyu Vanilla Date: Tue, 10 Feb 2026 00:57:41 +0900 Subject: [PATCH 088/265] fix: Sync `allow_normalize` to rustc --- .../hir-ty/src/next_solver/predicate.rs | 7 +- .../crates/hir-ty/src/tests/regression.rs | 70 +++++++++++++++++++ .../crates/test-utils/src/minicore.rs | 24 ++++++- 3 files changed, 97 insertions(+), 4 deletions(-) diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/next_solver/predicate.rs b/src/tools/rust-analyzer/crates/hir-ty/src/next_solver/predicate.rs index 6f4fae707317..8658d03a9e3e 100644 --- a/src/tools/rust-analyzer/crates/hir-ty/src/next_solver/predicate.rs +++ b/src/tools/rust-analyzer/crates/hir-ty/src/next_solver/predicate.rs @@ -714,9 +714,9 @@ impl<'db> rustc_type_ir::inherent::Predicate> for Predicate<'db> fn allow_normalization(self) -> bool { // TODO: this should probably live in rustc_type_ir match self.inner().as_ref().skip_binder() { - PredicateKind::Clause(ClauseKind::WellFormed(_)) - | PredicateKind::AliasRelate(..) - | PredicateKind::NormalizesTo(..) => false, + PredicateKind::Clause(ClauseKind::WellFormed(_)) | PredicateKind::AliasRelate(..) => { + false + } PredicateKind::Clause(ClauseKind::Trait(_)) | PredicateKind::Clause(ClauseKind::RegionOutlives(_)) | PredicateKind::Clause(ClauseKind::TypeOutlives(_)) @@ -729,6 +729,7 @@ impl<'db> rustc_type_ir::inherent::Predicate> for Predicate<'db> | PredicateKind::Coerce(_) | PredicateKind::Clause(ClauseKind::ConstEvaluatable(_)) | PredicateKind::ConstEquate(_, _) + | PredicateKind::NormalizesTo(..) | PredicateKind::Ambiguous => true, } } diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/tests/regression.rs b/src/tools/rust-analyzer/crates/hir-ty/src/tests/regression.rs index 3b5b4e4fa540..fba582f880fd 100644 --- a/src/tools/rust-analyzer/crates/hir-ty/src/tests/regression.rs +++ b/src/tools/rust-analyzer/crates/hir-ty/src/tests/regression.rs @@ -2688,3 +2688,73 @@ pub trait FilterT = Self> { "#, ); } + +#[test] +fn regression_21605() { + check_infer( + r#" +//- minicore: fn, coerce_unsized, dispatch_from_dyn, iterator, iterators +pub struct Filter<'a, 'b, T> +where + T: 'b, + 'a: 'b, +{ + filter_fn: dyn Fn(&'a T) -> bool, + t: Option, + b: &'b (), +} + +impl<'a, 'b, T> Filter<'a, 'b, T> +where + T: 'b, + 'a: 'b, +{ + pub fn new(filter_fn: dyn Fn(&T) -> bool) -> Self { + Self { + filter_fn: filter_fn, + t: None, + b: &(), + } + } +} + +pub trait FilterExt { + type Output; + fn filter(&self, filter: &Filter) -> Self::Output; +} + +impl FilterExt for [T; N] +where + T: IntoIterator, +{ + type Output = T; + fn filter(&self, filter: &Filter) -> Self::Output { + let _ = self.into_iter().filter(filter.filter_fn); + loop {} + } +} +"#, + expect![[r#" + 214..223 'filter_fn': dyn Fn(&'? T) -> bool + 'static + 253..360 '{ ... }': Filter<'a, 'b, T> + 263..354 'Self {... }': Filter<'a, 'b, T> + 293..302 'filter_fn': dyn Fn(&'? T) -> bool + 'static + 319..323 'None': Option + 340..343 '&()': &'? () + 341..343 '()': () + 421..425 'self': &'? Self + 427..433 'filter': &'? Filter<'?, '?, T> + 580..584 'self': &'? [T; N] + 586..592 'filter': &'? Filter<'?, '?, T> + 622..704 '{ ... }': T + 636..637 '_': Filter, dyn Fn(&'? T) -> bool + '?> + 640..644 'self': &'? [T; N] + 640..656 'self.i...iter()': Iter<'?, T> + 640..681 'self.i...er_fn)': Filter, dyn Fn(&'? T) -> bool + '?> + 664..670 'filter': &'? Filter<'?, '?, T> + 664..680 'filter...ter_fn': dyn Fn(&'? T) -> bool + 'static + 691..698 'loop {}': ! + 696..698 '{}': () + "#]], + ); +} diff --git a/src/tools/rust-analyzer/crates/test-utils/src/minicore.rs b/src/tools/rust-analyzer/crates/test-utils/src/minicore.rs index 7d95043867ee..c34475bbdf01 100644 --- a/src/tools/rust-analyzer/crates/test-utils/src/minicore.rs +++ b/src/tools/rust-analyzer/crates/test-utils/src/minicore.rs @@ -1689,6 +1689,21 @@ pub mod iter { } } + pub struct Filter { + iter: I, + predicate: P, + } + impl Iterator for Filter + where + P: FnMut(&I::Item) -> bool, + { + type Item = I::Item; + + fn next(&mut self) -> Option { + loop {} + } + } + pub struct FilterMap { iter: I, f: F, @@ -1705,7 +1720,7 @@ pub mod iter { } } } - pub use self::adapters::{FilterMap, Take}; + pub use self::adapters::{Filter, FilterMap, Take}; mod sources { mod repeat { @@ -1756,6 +1771,13 @@ pub mod iter { { loop {} } + fn filter

(self, predicate: P) -> crate::iter::Filter + where + Self: Sized, + P: FnMut(&Self::Item) -> bool, + { + loop {} + } fn filter_map(self, _f: F) -> crate::iter::FilterMap where Self: Sized, From 5a721a117ff8c94dd5083b28027dfa6b83a3aa72 Mon Sep 17 00:00:00 2001 From: A4-Tacks Date: Tue, 10 Feb 2026 04:13:05 +0800 Subject: [PATCH 089/265] Improve variable name --- src/tools/rust-analyzer/crates/ide-assists/src/utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/utils.rs b/src/tools/rust-analyzer/crates/ide-assists/src/utils.rs index 1732d8c2018e..dd4bbd145537 100644 --- a/src/tools/rust-analyzer/crates/ide-assists/src/utils.rs +++ b/src/tools/rust-analyzer/crates/ide-assists/src/utils.rs @@ -767,7 +767,7 @@ fn generate_impl_inner( }); let generic_args = generic_params.as_ref().map(|params| params.to_generic_args().clone_for_update()); - let trait_where_clause = trait_ + let adt_assoc_bounds = trait_ .as_ref() .zip(generic_params.as_ref()) .and_then(|(trait_, params)| generic_param_associated_bounds(adt, trait_, params)); @@ -787,7 +787,7 @@ fn generate_impl_inner( false, trait_, ty, - trait_where_clause, + adt_assoc_bounds, adt.where_clause(), body, ), From aefb9a9ae261dae8d84b801c9396dd571a75339a Mon Sep 17 00:00:00 2001 From: Augie Fackler Date: Mon, 9 Feb 2026 14:07:30 -0500 Subject: [PATCH 090/265] tests: adapt align-offset.rs for InstCombine improvements in LLVM 23 Upstream has improved InstCombine so that it can shrink added constants using known zeroes, which caused a little bit of change in this test. As far as I can tell either output is fine, so we just accept both. --- tests/assembly-llvm/align_offset.rs | 8 ++++---- tests/codegen-llvm/align-offset.rs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/assembly-llvm/align_offset.rs b/tests/assembly-llvm/align_offset.rs index d9902ce336b0..5663dca30b25 100644 --- a/tests/assembly-llvm/align_offset.rs +++ b/tests/assembly-llvm/align_offset.rs @@ -4,7 +4,7 @@ #![crate_type = "rlib"] // CHECK-LABEL: align_offset_byte_ptr -// CHECK: leaq 31 +// CHECK: leaq {{31|28}} // CHECK: andq $-32 // CHECK: subq #[no_mangle] @@ -13,7 +13,7 @@ pub fn align_offset_byte_ptr(ptr: *const u8) -> usize { } // CHECK-LABEL: align_offset_byte_slice -// CHECK: leaq 31 +// CHECK: leaq {{31|28}} // CHECK: andq $-32 // CHECK: subq #[no_mangle] @@ -22,7 +22,7 @@ pub fn align_offset_byte_slice(slice: &[u8]) -> usize { } // CHECK-LABEL: align_offset_word_ptr -// CHECK: leaq 31 +// CHECK: leaq {{31|28}} // CHECK: andq $-32 // CHECK: subq // CHECK: shrq @@ -35,7 +35,7 @@ pub fn align_offset_word_ptr(ptr: *const u32) -> usize { } // CHECK-LABEL: align_offset_word_slice -// CHECK: leaq 31 +// CHECK: leaq {{31|28}} // CHECK: andq $-32 // CHECK: subq // CHECK: shrq diff --git a/tests/codegen-llvm/align-offset.rs b/tests/codegen-llvm/align-offset.rs index 21062cc0a914..383e9dd45dab 100644 --- a/tests/codegen-llvm/align-offset.rs +++ b/tests/codegen-llvm/align-offset.rs @@ -24,7 +24,7 @@ pub fn align_to4(x: &[u8]) -> bool { #[no_mangle] pub fn align_offset_byte_ptr(ptr: *const u8) -> usize { // CHECK: %[[ADDR:.+]] = ptrtoint ptr %ptr to [[USIZE:i[0-9]+]] - // CHECK: %[[UP:.+]] = add [[USIZE]] %[[ADDR]], 31 + // CHECK: %[[UP:.+]] = add [[USIZE]] %[[ADDR]], {{31|28}} // CHECK: %[[ALIGNED:.+]] = and [[USIZE]] %[[UP]], -32 // CHECK: %[[OFFSET:.+]] = sub [[USIZE]] %[[ALIGNED]], %[[ADDR]] @@ -41,7 +41,7 @@ pub fn align_offset_byte_ptr(ptr: *const u8) -> usize { #[no_mangle] pub fn align_offset_word_slice(slice: &[Align4]) -> usize { // CHECK: %[[ADDR:.+]] = ptrtoint ptr %slice.0 to [[USIZE]] - // CHECK: %[[UP:.+]] = add [[USIZE]] %[[ADDR]], 31 + // CHECK: %[[UP:.+]] = add [[USIZE]] %[[ADDR]], {{31|28}} // CHECK: %[[ALIGNED:.+]] = and [[USIZE]] %[[UP]], -32 // CHECK: %[[BOFFSET:.+]] = sub [[USIZE]] %[[ALIGNED]], %[[ADDR]] // CHECK: %[[OFFSET:.+]] = lshr exact [[USIZE]] %[[BOFFSET]], 2 @@ -57,7 +57,7 @@ pub fn align_offset_word_slice(slice: &[Align4]) -> usize { #[no_mangle] pub fn align_offset_word_ptr(ptr: *const Align4) -> usize { // CHECK: %[[ADDR:.+]] = ptrtoint ptr %ptr to [[USIZE]] - // CHECK: %[[UP:.+]] = add [[USIZE]] %[[ADDR]], 31 + // CHECK: %[[UP:.+]] = add [[USIZE]] %[[ADDR]], {{31|28}} // CHECK: %[[ALIGNED:.+]] = and [[USIZE]] %[[UP]], -32 // CHECK: %[[BOFFSET:.+]] = sub [[USIZE]] %[[ALIGNED]], %[[ADDR]] From 78dc744e93028188c66d92dc2064b2107dd9992c Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Tue, 10 Feb 2026 22:20:02 +0900 Subject: [PATCH 091/265] unwind/wasm: fix compile error by wrapping wasm_throw in unsafe block --- library/unwind/src/wasm.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/unwind/src/wasm.rs b/library/unwind/src/wasm.rs index 2bff306af293..cb6e90ba180b 100644 --- a/library/unwind/src/wasm.rs +++ b/library/unwind/src/wasm.rs @@ -73,7 +73,7 @@ pub unsafe fn _Unwind_RaiseException(exception: *mut _Unwind_Exception) -> _Unwi // corresponds with llvm::WebAssembly::Tag::CPP_EXCEPTION // in llvm-project/llvm/include/llvm/CodeGen/WasmEHFuncInfo.h const CPP_EXCEPTION_TAG: i32 = 0; - wasm_throw(CPP_EXCEPTION_TAG, exception.cast()) + unsafe { wasm_throw(CPP_EXCEPTION_TAG, exception.cast()) } } _ => { let _ = exception; From 5b1070b040080af3b8d6d916ca34c598b435fd7e Mon Sep 17 00:00:00 2001 From: xonx4l Date: Sat, 27 Dec 2025 14:41:19 +0530 Subject: [PATCH 092/265] Add note for param-env shadowing --- .../src/error_reporting/infer/mod.rs | 65 ++++++++++++++++++- .../param-env-shadowing-issue-149910.rs | 14 ++++ .../param-env-shadowing-issue-149910.stderr | 21 ++++++ 3 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 tests/ui/associated-types/param-env-shadowing-issue-149910.rs create mode 100644 tests/ui/associated-types/param-env-shadowing-issue-149910.stderr diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs index 47810e2578df..cfe5b1f42556 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs @@ -149,11 +149,15 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { actual: Ty<'tcx>, err: TypeError<'tcx>, ) -> Diag<'a> { - self.report_and_explain_type_error( + let mut diag = self.report_and_explain_type_error( TypeTrace::types(cause, expected, actual), param_env, err, - ) + ); + + self.suggest_param_env_shadowing(&mut diag, expected, actual); + + diag } pub fn report_mismatched_consts( @@ -240,6 +244,63 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { false } + fn suggest_param_env_shadowing( + &self, + diag: &mut Diag<'_>, + expected: Ty<'tcx>, + found: Ty<'tcx>, + ) { + let (alias, concrete) = match (expected.kind(), found.kind()) { + (ty::Alias(ty::Projection, proj), _) => (proj, found), + (_, ty::Alias(ty::Projection, proj)) => (proj, expected), + _ => return, + }; + + let tcx = self.tcx; + let trait_def_id = alias.trait_def_id(tcx); + let impls = tcx.trait_impls_of(trait_def_id); + + let all_impls = + impls.blanket_impls().iter().chain(impls.non_blanket_impls().values().flatten()); + + for &impl_def_id in all_impls { + let is_shadowed = self.infcx.probe(|_| { + let impl_substs = self.infcx.fresh_args_for_item(DUMMY_SP, impl_def_id); + + let impl_trait_ref = tcx.impl_trait_ref(impl_def_id).instantiate(tcx, impl_substs); + + let expected_trait_ref = alias.trait_ref(tcx); + + if self.infcx.can_eq(ty::ParamEnv::empty(), expected_trait_ref, impl_trait_ref) { + let name = tcx.item_name(alias.def_id); + let assoc_item = tcx + .associated_items(impl_def_id) + .filter_by_name_unhygienic(name) + .find(|item| matches!(item.kind, ty::AssocKind::Type { .. })); + + if let Some(item) = assoc_item { + let impl_assoc_ty = tcx.type_of(item.def_id).instantiate(tcx, impl_substs); + if self.infcx.can_eq(ty::ParamEnv::empty(), impl_assoc_ty, concrete) { + return true; + } + } + } + false + }); + + if is_shadowed { + diag.note(format!( + "the associated type `{}` is defined as `{}` in the implementation, \ + but the generic bound `{}` hides this definition", + self.ty_to_string(tcx.mk_ty_from_kind(ty::Alias(ty::Projection, *alias))), + self.ty_to_string(concrete), + self.ty_to_string(alias.self_ty()) + )); + return; + } + } + } + fn note_error_origin( &self, err: &mut Diag<'_>, diff --git a/tests/ui/associated-types/param-env-shadowing-issue-149910.rs b/tests/ui/associated-types/param-env-shadowing-issue-149910.rs new file mode 100644 index 000000000000..bd4df859dc07 --- /dev/null +++ b/tests/ui/associated-types/param-env-shadowing-issue-149910.rs @@ -0,0 +1,14 @@ +trait Trait { + type Assoc; +} + +impl Trait for T { + type Assoc = T; +} + +fn foo(x: T) -> T::Assoc { + x + //~^ ERROR mismatched types +} + +fn main() {} diff --git a/tests/ui/associated-types/param-env-shadowing-issue-149910.stderr b/tests/ui/associated-types/param-env-shadowing-issue-149910.stderr new file mode 100644 index 000000000000..57eaaee9906b --- /dev/null +++ b/tests/ui/associated-types/param-env-shadowing-issue-149910.stderr @@ -0,0 +1,21 @@ +error[E0308]: mismatched types + --> $DIR/issue-149910.rs:10:5 + | +LL | fn foo(x: T) -> T::Assoc { + | - -------- expected `::Assoc` because of return type + | | + | found this type parameter +LL | x + | ^ expected associated type, found type parameter `T` + | + = note: expected associated type `::Assoc` + found type parameter `T` + = note: the associated type `::Assoc` is defined as `T` in the implementation, but the generic bound `T` hides this definition +help: consider further restricting this bound + | +LL | fn foo>(x: T) -> T::Assoc { + | +++++++++++ + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0308`. From a873a3fe778950dfae31220525063174b0358889 Mon Sep 17 00:00:00 2001 From: xonx <119700621+xonx4l@users.noreply.github.com> Date: Sun, 11 Jan 2026 18:42:52 +0000 Subject: [PATCH 093/265] add suggested changes --- .../src/error_reporting/infer/mod.rs | 54 +++++++++++-------- .../rustc_trait_selection/src/traits/mod.rs | 2 +- ...g-assoc-type-because-of-assoc-const.stderr | 1 + .../defaults-specialization.stderr | 4 ++ .../param-env-shadowing-issue-149910.stderr | 4 +- ...lization-default-projection.current.stderr | 2 + ...cialization-default-projection.next.stderr | 2 + ...pecialization-default-types.current.stderr | 2 + .../specialization-default-types.next.stderr | 2 + 9 files changed, 48 insertions(+), 25 deletions(-) diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs index cfe5b1f42556..86cec9f647b7 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs @@ -72,12 +72,17 @@ use rustc_span::{BytePos, DUMMY_SP, DesugaringKind, Pos, Span, sym}; use tracing::{debug, instrument}; use crate::error_reporting::TypeErrCtxt; +use crate::error_reporting::traits::ambiguity::{ + CandidateSource, compute_applicable_impls_for_diagnostics, +}; use crate::errors::{ObligationCauseFailureCode, TypeErrorAdditionalDiags}; use crate::infer; use crate::infer::relate::{self, RelateResult, TypeRelation}; use crate::infer::{InferCtxt, InferCtxtExt as _, TypeTrace, ValuePairs}; use crate::solve::deeply_normalize_for_diagnostics; -use crate::traits::{MatchExpressionArmCause, ObligationCause, ObligationCauseCode}; +use crate::traits::{ + MatchExpressionArmCause, Obligation, ObligationCause, ObligationCauseCode, specialization_graph, +}; mod note_and_explain; mod suggest; @@ -155,7 +160,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { err, ); - self.suggest_param_env_shadowing(&mut diag, expected, actual); + self.suggest_param_env_shadowing(&mut diag, expected, actual, param_env); diag } @@ -249,6 +254,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { diag: &mut Diag<'_>, expected: Ty<'tcx>, found: Ty<'tcx>, + param_env: ty::ParamEnv<'tcx>, ) { let (alias, concrete) = match (expected.kind(), found.kind()) { (ty::Alias(ty::Projection, proj), _) => (proj, found), @@ -257,35 +263,39 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { }; let tcx = self.tcx; - let trait_def_id = alias.trait_def_id(tcx); - let impls = tcx.trait_impls_of(trait_def_id); - let all_impls = - impls.blanket_impls().iter().chain(impls.non_blanket_impls().values().flatten()); + let trait_ref = alias.trait_ref(tcx); + let obligation = + Obligation::new(tcx, ObligationCause::dummy(), param_env, ty::Binder::dummy(trait_ref)); + + let applicable_impls = compute_applicable_impls_for_diagnostics(self.infcx, &obligation); + + for candidate in applicable_impls { + let impl_def_id = match candidate { + CandidateSource::DefId(did) => did, + CandidateSource::ParamEnv(_) => continue, + }; - for &impl_def_id in all_impls { let is_shadowed = self.infcx.probe(|_| { let impl_substs = self.infcx.fresh_args_for_item(DUMMY_SP, impl_def_id); - let impl_trait_ref = tcx.impl_trait_ref(impl_def_id).instantiate(tcx, impl_substs); let expected_trait_ref = alias.trait_ref(tcx); - if self.infcx.can_eq(ty::ParamEnv::empty(), expected_trait_ref, impl_trait_ref) { - let name = tcx.item_name(alias.def_id); - let assoc_item = tcx - .associated_items(impl_def_id) - .filter_by_name_unhygienic(name) - .find(|item| matches!(item.kind, ty::AssocKind::Type { .. })); - - if let Some(item) = assoc_item { - let impl_assoc_ty = tcx.type_of(item.def_id).instantiate(tcx, impl_substs); - if self.infcx.can_eq(ty::ParamEnv::empty(), impl_assoc_ty, concrete) { - return true; - } - } + if !self.infcx.can_eq(param_env, expected_trait_ref, impl_trait_ref) { + return false; } - false + + let leaf_def = match specialization_graph::assoc_def(tcx, impl_def_id, alias.def_id) + { + Ok(leaf) => leaf, + Err(_) => return false, + }; + + let impl_item_def_id = leaf_def.item.def_id; + let impl_assoc_ty = tcx.type_of(impl_item_def_id).instantiate(tcx, impl_substs); + + self.infcx.can_eq(param_env, impl_assoc_ty, concrete) }); if is_shadowed { diff --git a/compiler/rustc_trait_selection/src/traits/mod.rs b/compiler/rustc_trait_selection/src/traits/mod.rs index 08f1d947dfb5..1fde7e5d43b7 100644 --- a/compiler/rustc_trait_selection/src/traits/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/mod.rs @@ -16,7 +16,7 @@ pub mod project; pub mod query; #[allow(hidden_glob_reexports)] mod select; -mod specialize; +pub mod specialize; mod structural_normalize; #[allow(hidden_glob_reexports)] mod util; diff --git a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr index 21bc37bb3ea2..af0db3a95993 100644 --- a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr +++ b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr @@ -6,6 +6,7 @@ LL | const N: C::M = 4u8; | = note: expected associated type `::M` found type `u8` + = note: the associated type `::M` is defined as `u8` in the implementation, but the generic bound `C` hides this definition help: consider constraining the associated type `::M` to `u8` | LL | impl> U for u16 { diff --git a/tests/ui/associated-types/defaults-specialization.stderr b/tests/ui/associated-types/defaults-specialization.stderr index 7d19ac85982a..be0e178e4031 100644 --- a/tests/ui/associated-types/defaults-specialization.stderr +++ b/tests/ui/associated-types/defaults-specialization.stderr @@ -75,6 +75,7 @@ LL | fn make() -> Self::Ty { 0u8 } found type `u8` = help: consider constraining the associated type ` as Tr>::Ty` to `u8` or calling a method that returns ` as Tr>::Ty` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html + = note: the associated type ` as Tr>::Ty` is defined as `u8` in the implementation, but the generic bound `A2` hides this definition error[E0308]: mismatched types --> $DIR/defaults-specialization.rs:44:29 @@ -89,6 +90,7 @@ LL | fn make() -> Self::Ty { true } | = note: expected associated type ` as Tr>::Ty` found type `bool` + = note: the associated type ` as Tr>::Ty` is defined as `bool` in the implementation, but the generic bound `B2` hides this definition error[E0308]: mismatched types --> $DIR/defaults-specialization.rs:87:32 @@ -121,6 +123,7 @@ help: a method is available that returns ` as Tr>::Ty` | LL | fn make() -> Self::Ty { | ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make` + = note: the associated type ` as Tr>::Ty` is defined as `bool` in the implementation, but the generic bound `B<()>` hides this definition error[E0308]: mismatched types --> $DIR/defaults-specialization.rs:89:33 @@ -153,6 +156,7 @@ help: a method is available that returns ` as Tr>::Ty` | LL | fn make() -> Self::Ty { | ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make` + = note: the associated type ` as Tr>::Ty` is defined as `bool` in the implementation, but the generic bound `B2<()>` hides this definition error: aborting due to 9 previous errors; 1 warning emitted diff --git a/tests/ui/associated-types/param-env-shadowing-issue-149910.stderr b/tests/ui/associated-types/param-env-shadowing-issue-149910.stderr index 57eaaee9906b..fb05f0add349 100644 --- a/tests/ui/associated-types/param-env-shadowing-issue-149910.stderr +++ b/tests/ui/associated-types/param-env-shadowing-issue-149910.stderr @@ -1,11 +1,11 @@ error[E0308]: mismatched types - --> $DIR/issue-149910.rs:10:5 + --> $DIR/param-env-shadowing-issue-149910.rs:10:5 | LL | fn foo(x: T) -> T::Assoc { | - -------- expected `::Assoc` because of return type | | | found this type parameter -LL | x +LL | x | ^ expected associated type, found type parameter `T` | = note: expected associated type `::Assoc` diff --git a/tests/ui/specialization/specialization-default-projection.current.stderr b/tests/ui/specialization/specialization-default-projection.current.stderr index 038c379c43e1..c50b053cf2dc 100644 --- a/tests/ui/specialization/specialization-default-projection.current.stderr +++ b/tests/ui/specialization/specialization-default-projection.current.stderr @@ -21,6 +21,7 @@ LL | () found unit type `()` = help: consider constraining the associated type `::Assoc` to `()` or calling a method that returns `::Assoc` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html + = note: the associated type `::Assoc` is defined as `()` in the implementation, but the generic bound `T` hides this definition error[E0308]: mismatched types --> $DIR/specialization-default-projection.rs:32:5 @@ -37,6 +38,7 @@ LL | generic::<()>() found associated type `<() as Foo>::Assoc` = help: consider constraining the associated type `<() as Foo>::Assoc` to `()` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html + = note: the associated type `<() as Foo>::Assoc` is defined as `()` in the implementation, but the generic bound `()` hides this definition error: aborting due to 2 previous errors; 1 warning emitted diff --git a/tests/ui/specialization/specialization-default-projection.next.stderr b/tests/ui/specialization/specialization-default-projection.next.stderr index 9111f173a9c8..dac1069e189f 100644 --- a/tests/ui/specialization/specialization-default-projection.next.stderr +++ b/tests/ui/specialization/specialization-default-projection.next.stderr @@ -21,6 +21,7 @@ LL | () found unit type `()` = help: consider constraining the associated type `::Assoc` to `()` or calling a method that returns `::Assoc` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html + = note: the associated type `::Assoc` is defined as `()` in the implementation, but the generic bound `T` hides this definition error[E0308]: mismatched types --> $DIR/specialization-default-projection.rs:32:5 @@ -37,6 +38,7 @@ LL | generic::<()>() found associated type `<() as Foo>::Assoc` = help: consider constraining the associated type `<() as Foo>::Assoc` to `()` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html + = note: the associated type `<() as Foo>::Assoc` is defined as `()` in the implementation, but the generic bound `()` hides this definition error: aborting due to 2 previous errors; 1 warning emitted diff --git a/tests/ui/specialization/specialization-default-types.current.stderr b/tests/ui/specialization/specialization-default-types.current.stderr index 09689681740f..503e7ebbc433 100644 --- a/tests/ui/specialization/specialization-default-types.current.stderr +++ b/tests/ui/specialization/specialization-default-types.current.stderr @@ -20,6 +20,7 @@ LL | Box::new(self) | = note: expected associated type `::Output` found struct `Box` + = note: the associated type `::Output` is defined as `Box` in the implementation, but the generic bound `T` hides this definition error[E0308]: mismatched types --> $DIR/specialization-default-types.rs:29:5 @@ -33,6 +34,7 @@ LL | Example::generate(t) found associated type `::Output` = help: consider constraining the associated type `::Output` to `Box` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html + = note: the associated type `::Output` is defined as `Box` in the implementation, but the generic bound `T` hides this definition error: aborting due to 2 previous errors; 1 warning emitted diff --git a/tests/ui/specialization/specialization-default-types.next.stderr b/tests/ui/specialization/specialization-default-types.next.stderr index 1535c6473bdd..1774315eb822 100644 --- a/tests/ui/specialization/specialization-default-types.next.stderr +++ b/tests/ui/specialization/specialization-default-types.next.stderr @@ -20,6 +20,7 @@ LL | Box::new(self) | = note: expected associated type `::Output` found struct `Box` + = note: the associated type `::Output` is defined as `Box` in the implementation, but the generic bound `T` hides this definition error[E0308]: mismatched types --> $DIR/specialization-default-types.rs:29:5 @@ -33,6 +34,7 @@ LL | Example::generate(t) found associated type `::Output` = help: consider constraining the associated type `::Output` to `Box` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html + = note: the associated type `::Output` is defined as `Box` in the implementation, but the generic bound `T` hides this definition error: aborting due to 2 previous errors; 1 warning emitted From c576dc55b8b485a31deb3c7f58bdc643027d7c9a Mon Sep 17 00:00:00 2001 From: xonx <119700621+xonx4l@users.noreply.github.com> Date: Fri, 16 Jan 2026 11:41:15 +0530 Subject: [PATCH 094/265] delete middle check. Co-authored-by: lcnr --- .../rustc_trait_selection/src/error_reporting/infer/mod.rs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs index 86cec9f647b7..7a14901b32d9 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs @@ -278,13 +278,6 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { let is_shadowed = self.infcx.probe(|_| { let impl_substs = self.infcx.fresh_args_for_item(DUMMY_SP, impl_def_id); - let impl_trait_ref = tcx.impl_trait_ref(impl_def_id).instantiate(tcx, impl_substs); - - let expected_trait_ref = alias.trait_ref(tcx); - - if !self.infcx.can_eq(param_env, expected_trait_ref, impl_trait_ref) { - return false; - } let leaf_def = match specialization_graph::assoc_def(tcx, impl_def_id, alias.def_id) { From 071d0cd9f28d082e1cccd2c034b0e95d0b9c789b Mon Sep 17 00:00:00 2001 From: xonx <119700621+xonx4l@users.noreply.github.com> Date: Tue, 10 Feb 2026 18:37:36 +0000 Subject: [PATCH 095/265] rewording note and refer issue --- .../rustc_trait_selection/src/error_reporting/infer/mod.rs | 3 ++- .../associated-types/param-env-shadowing-issue-149910.stderr | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs index 7a14901b32d9..5597fe488c1a 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs @@ -294,7 +294,8 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { if is_shadowed { diag.note(format!( "the associated type `{}` is defined as `{}` in the implementation, \ - but the generic bound `{}` hides this definition", + but the where-bound `{}` shadows this definition\n\ + see issue #152409 for more information", self.ty_to_string(tcx.mk_ty_from_kind(ty::Alias(ty::Projection, *alias))), self.ty_to_string(concrete), self.ty_to_string(alias.self_ty()) diff --git a/tests/ui/associated-types/param-env-shadowing-issue-149910.stderr b/tests/ui/associated-types/param-env-shadowing-issue-149910.stderr index fb05f0add349..b06770e52635 100644 --- a/tests/ui/associated-types/param-env-shadowing-issue-149910.stderr +++ b/tests/ui/associated-types/param-env-shadowing-issue-149910.stderr @@ -10,7 +10,8 @@ LL | x | = note: expected associated type `::Assoc` found type parameter `T` - = note: the associated type `::Assoc` is defined as `T` in the implementation, but the generic bound `T` hides this definition + = note: the associated type `::Assoc` is defined as `T` in the implementation, but the where-bound `T` shadows this definition + see issue #152409 for more information help: consider further restricting this bound | LL | fn foo>(x: T) -> T::Assoc { From 6b3c42592e0aa3dd748d40b5268b772b24b0e27a Mon Sep 17 00:00:00 2001 From: xonx <119700621+xonx4l@users.noreply.github.com> Date: Tue, 10 Feb 2026 19:23:10 +0000 Subject: [PATCH 096/265] update tests --- ...training-assoc-type-because-of-assoc-const.stderr | 3 ++- .../associated-types/defaults-specialization.stderr | 12 ++++++++---- .../specialization-default-projection.current.stderr | 6 ++++-- .../specialization-default-projection.next.stderr | 6 ++++-- .../specialization-default-types.current.stderr | 6 ++++-- .../specialization-default-types.next.stderr | 6 ++++-- 6 files changed, 26 insertions(+), 13 deletions(-) diff --git a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr index af0db3a95993..3b89ed66b355 100644 --- a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr +++ b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr @@ -6,7 +6,8 @@ LL | const N: C::M = 4u8; | = note: expected associated type `::M` found type `u8` - = note: the associated type `::M` is defined as `u8` in the implementation, but the generic bound `C` hides this definition + = note: the associated type `::M` is defined as `u8` in the implementation, but the where-bound `C` shadows this definition + see issue #152409 for more information help: consider constraining the associated type `::M` to `u8` | LL | impl> U for u16 { diff --git a/tests/ui/associated-types/defaults-specialization.stderr b/tests/ui/associated-types/defaults-specialization.stderr index be0e178e4031..d22d9ce659a7 100644 --- a/tests/ui/associated-types/defaults-specialization.stderr +++ b/tests/ui/associated-types/defaults-specialization.stderr @@ -75,7 +75,8 @@ LL | fn make() -> Self::Ty { 0u8 } found type `u8` = help: consider constraining the associated type ` as Tr>::Ty` to `u8` or calling a method that returns ` as Tr>::Ty` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html - = note: the associated type ` as Tr>::Ty` is defined as `u8` in the implementation, but the generic bound `A2` hides this definition + = note: the associated type ` as Tr>::Ty` is defined as `u8` in the implementation, but the where-bound `A2` shadows this definition + see issue #152409 for more information error[E0308]: mismatched types --> $DIR/defaults-specialization.rs:44:29 @@ -90,7 +91,8 @@ LL | fn make() -> Self::Ty { true } | = note: expected associated type ` as Tr>::Ty` found type `bool` - = note: the associated type ` as Tr>::Ty` is defined as `bool` in the implementation, but the generic bound `B2` hides this definition + = note: the associated type ` as Tr>::Ty` is defined as `bool` in the implementation, but the where-bound `B2` shadows this definition + see issue #152409 for more information error[E0308]: mismatched types --> $DIR/defaults-specialization.rs:87:32 @@ -123,7 +125,8 @@ help: a method is available that returns ` as Tr>::Ty` | LL | fn make() -> Self::Ty { | ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make` - = note: the associated type ` as Tr>::Ty` is defined as `bool` in the implementation, but the generic bound `B<()>` hides this definition + = note: the associated type ` as Tr>::Ty` is defined as `bool` in the implementation, but the where-bound `B<()>` shadows this definition + see issue #152409 for more information error[E0308]: mismatched types --> $DIR/defaults-specialization.rs:89:33 @@ -156,7 +159,8 @@ help: a method is available that returns ` as Tr>::Ty` | LL | fn make() -> Self::Ty { | ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make` - = note: the associated type ` as Tr>::Ty` is defined as `bool` in the implementation, but the generic bound `B2<()>` hides this definition + = note: the associated type ` as Tr>::Ty` is defined as `bool` in the implementation, but the where-bound `B2<()>` shadows this definition + see issue #152409 for more information error: aborting due to 9 previous errors; 1 warning emitted diff --git a/tests/ui/specialization/specialization-default-projection.current.stderr b/tests/ui/specialization/specialization-default-projection.current.stderr index c50b053cf2dc..b88c1a94baf9 100644 --- a/tests/ui/specialization/specialization-default-projection.current.stderr +++ b/tests/ui/specialization/specialization-default-projection.current.stderr @@ -21,7 +21,8 @@ LL | () found unit type `()` = help: consider constraining the associated type `::Assoc` to `()` or calling a method that returns `::Assoc` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html - = note: the associated type `::Assoc` is defined as `()` in the implementation, but the generic bound `T` hides this definition + = note: the associated type `::Assoc` is defined as `()` in the implementation, but the where-bound `T` shadows this definition + see issue #152409 for more information error[E0308]: mismatched types --> $DIR/specialization-default-projection.rs:32:5 @@ -38,7 +39,8 @@ LL | generic::<()>() found associated type `<() as Foo>::Assoc` = help: consider constraining the associated type `<() as Foo>::Assoc` to `()` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html - = note: the associated type `<() as Foo>::Assoc` is defined as `()` in the implementation, but the generic bound `()` hides this definition + = note: the associated type `<() as Foo>::Assoc` is defined as `()` in the implementation, but the where-bound `()` shadows this definition + see issue #152409 for more information error: aborting due to 2 previous errors; 1 warning emitted diff --git a/tests/ui/specialization/specialization-default-projection.next.stderr b/tests/ui/specialization/specialization-default-projection.next.stderr index dac1069e189f..a385b16a2d8b 100644 --- a/tests/ui/specialization/specialization-default-projection.next.stderr +++ b/tests/ui/specialization/specialization-default-projection.next.stderr @@ -21,7 +21,8 @@ LL | () found unit type `()` = help: consider constraining the associated type `::Assoc` to `()` or calling a method that returns `::Assoc` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html - = note: the associated type `::Assoc` is defined as `()` in the implementation, but the generic bound `T` hides this definition + = note: the associated type `::Assoc` is defined as `()` in the implementation, but the where-bound `T` shadows this definition + see issue #152409 for more information error[E0308]: mismatched types --> $DIR/specialization-default-projection.rs:32:5 @@ -38,7 +39,8 @@ LL | generic::<()>() found associated type `<() as Foo>::Assoc` = help: consider constraining the associated type `<() as Foo>::Assoc` to `()` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html - = note: the associated type `<() as Foo>::Assoc` is defined as `()` in the implementation, but the generic bound `()` hides this definition + = note: the associated type `<() as Foo>::Assoc` is defined as `()` in the implementation, but the where-bound `()` shadows this definition + see issue #152409 for more information error: aborting due to 2 previous errors; 1 warning emitted diff --git a/tests/ui/specialization/specialization-default-types.current.stderr b/tests/ui/specialization/specialization-default-types.current.stderr index 503e7ebbc433..8df170cbb767 100644 --- a/tests/ui/specialization/specialization-default-types.current.stderr +++ b/tests/ui/specialization/specialization-default-types.current.stderr @@ -20,7 +20,8 @@ LL | Box::new(self) | = note: expected associated type `::Output` found struct `Box` - = note: the associated type `::Output` is defined as `Box` in the implementation, but the generic bound `T` hides this definition + = note: the associated type `::Output` is defined as `Box` in the implementation, but the where-bound `T` shadows this definition + see issue #152409 for more information error[E0308]: mismatched types --> $DIR/specialization-default-types.rs:29:5 @@ -34,7 +35,8 @@ LL | Example::generate(t) found associated type `::Output` = help: consider constraining the associated type `::Output` to `Box` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html - = note: the associated type `::Output` is defined as `Box` in the implementation, but the generic bound `T` hides this definition + = note: the associated type `::Output` is defined as `Box` in the implementation, but the where-bound `T` shadows this definition + see issue #152409 for more information error: aborting due to 2 previous errors; 1 warning emitted diff --git a/tests/ui/specialization/specialization-default-types.next.stderr b/tests/ui/specialization/specialization-default-types.next.stderr index 1774315eb822..4ea9b996c86a 100644 --- a/tests/ui/specialization/specialization-default-types.next.stderr +++ b/tests/ui/specialization/specialization-default-types.next.stderr @@ -20,7 +20,8 @@ LL | Box::new(self) | = note: expected associated type `::Output` found struct `Box` - = note: the associated type `::Output` is defined as `Box` in the implementation, but the generic bound `T` hides this definition + = note: the associated type `::Output` is defined as `Box` in the implementation, but the where-bound `T` shadows this definition + see issue #152409 for more information error[E0308]: mismatched types --> $DIR/specialization-default-types.rs:29:5 @@ -34,7 +35,8 @@ LL | Example::generate(t) found associated type `::Output` = help: consider constraining the associated type `::Output` to `Box` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html - = note: the associated type `::Output` is defined as `Box` in the implementation, but the generic bound `T` hides this definition + = note: the associated type `::Output` is defined as `Box` in the implementation, but the where-bound `T` shadows this definition + see issue #152409 for more information error: aborting due to 2 previous errors; 1 warning emitted From d74b276d1d0f79b90a92084a0fc20bcaacdcc417 Mon Sep 17 00:00:00 2001 From: Karl Meakin Date: Sat, 18 Oct 2025 01:21:47 +0100 Subject: [PATCH 097/265] Precommit tests for `SliceIndex` method codegen Add a `codegen-llvm` test to check the number of `icmp` instrucitons generated for each `SliceIndex` method on the various range types. This will be updated in the next commit when `SliceIndex::get` is optimized for `RangeInclusive`. --- tests/codegen-llvm/slice-range-indexing.rs | 96 ++++++++++++++++++++++ tests/codegen-llvm/str-range-indexing.rs | 94 +++++++++++++++++++++ 2 files changed, 190 insertions(+) create mode 100644 tests/codegen-llvm/slice-range-indexing.rs create mode 100644 tests/codegen-llvm/str-range-indexing.rs diff --git a/tests/codegen-llvm/slice-range-indexing.rs b/tests/codegen-llvm/slice-range-indexing.rs new file mode 100644 index 000000000000..5c47cab6234e --- /dev/null +++ b/tests/codegen-llvm/slice-range-indexing.rs @@ -0,0 +1,96 @@ +//@ compile-flags: -Copt-level=3 +//@ min-llvm-version: 21 + +#![crate_type = "lib"] + +use std::ops::{Range, RangeFrom, RangeInclusive, RangeTo, RangeToInclusive}; + +macro_rules! tests { + ($range_ty:ty, $get_func_name:ident, $index_func_name:ident) => { + #[no_mangle] + pub fn $get_func_name(slice: &[u32], range: $range_ty) -> Option<&[u32]> { + slice.get(range) + } + + #[no_mangle] + pub fn $index_func_name(slice: &[u32], range: $range_ty) -> &[u32] { + &slice[range] + } + }; +} + +// 2 comparisons required: +// end <= len && start <= end + +// CHECK-LABEL: @get_range +// CHECK-COUNT-2: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret + +// CHECK-LABEL: @index_range +// CHECK-COUNT-2: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret +tests!(Range, get_range, index_range); + +// 3 comparisons required: +// end != usize::MAX && end + 1 <= len && start <= end + 1 + +// CHECK-LABEL: @get_range_inclusive +// CHECK-COUNT-3: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret + +// 2 comparisons required: +// end < len && start <= end + 1 + +// CHECK-LABEL: @index_range_inclusive +// CHECK-COUNT-2: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret +tests!(RangeInclusive, get_range_inclusive, index_range_inclusive); + +// 1 comparison required: +// end <= len + +// CHECK-LABEL: @get_range_to +// CHECK-COUNT-1: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret + +// CHECK-LABEL: @index_range_to +// CHECK-COUNT-1: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret +tests!(RangeTo, get_range_to, index_range_to); + +// 2 comparisons required: +// end != usize::MAX && end + 1 <= len + +// CHECK-LABEL: @get_range_to_inclusive +// CHECK-COUNT-2: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret + +// 1 comparison required: +// end < len + +// CHECK-LABEL: @index_range_to_inclusive +// CHECK-COUNT-1: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret +tests!(RangeToInclusive, get_range_to_inclusive, index_range_to_inclusive); + +// 1 comparison required: +// start <= len + +// CHECK-LABEL: @get_range_from +// CHECK-COUNT-1: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret + +// CHECK-LABEL: @index_range_from +// CHECK-COUNT-1: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret +tests!(RangeFrom, get_range_from, index_range_from); diff --git a/tests/codegen-llvm/str-range-indexing.rs b/tests/codegen-llvm/str-range-indexing.rs new file mode 100644 index 000000000000..3c35b26773cb --- /dev/null +++ b/tests/codegen-llvm/str-range-indexing.rs @@ -0,0 +1,94 @@ +//@ compile-flags: -Copt-level=3 +//@ min-llvm-version: 21 + +#![crate_type = "lib"] + +use std::ops::{Range, RangeFrom, RangeInclusive, RangeTo, RangeToInclusive}; + +macro_rules! tests { + ($range_ty:ty, $get_func_name:ident, $index_func_name:ident) => { + #[no_mangle] + pub fn $get_func_name(slice: &str, range: $range_ty) -> Option<&str> { + slice.get(range) + } + + #[no_mangle] + pub fn $index_func_name(slice: &str, range: $range_ty) -> &str { + &slice[range] + } + }; +} + +// 9 comparisons required: +// start <= end +// && (start == 0 || (start >= len && start == len) || bytes[start] >= -0x40) +// && (end == 0 || (end >= len && end == len) || bytes[end] >= -0x40) + +// CHECK-LABEL: @get_range +// CHECK-COUNT-9: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret + +// CHECK-LABEL: @index_range +// CHECK-COUNT-9: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret +tests!(Range, get_range, index_range); + +// 9 comparisons required: +// end != usize::MAX && start <= end + 1 +// && (start == 0 || (start >= len && start == len) || bytes[start] >= -0x40) +// && ( (end + 1 >= len && end + 1 == len) || bytes[end + 1] >= -0x40) + +// CHECK-LABEL: @get_range_inclusive +// CHECK-COUNT-9: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret + +// CHECK-LABEL: @index_range_inclusive +// CHECK-COUNT-9: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret +tests!(RangeInclusive, get_range_inclusive, index_range_inclusive); + +// 4 comparisons required: +// end == 0 || (end >= len && end == len) || bytes[end] >= -0x40 + +// CHECK-LABEL: @get_range_to +// CHECK-COUNT-4: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret + +// CHECK-LABEL: @index_range_to +// CHECK-COUNT-4: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret +tests!(RangeTo, get_range_to, index_range_to); + +// 4 comparisons required: +// end != usize::MAX && (end + 1 >= len && end + 1 == len) || bytes[end + 1] >= -0x40) + +// CHECK-LABEL: @get_range_to_inclusive +// CHECK-COUNT-4: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret + +// CHECK-LABEL: @index_range_to_inclusive +// CHECK-COUNT-4: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret +tests!(RangeToInclusive, get_range_to_inclusive, index_range_to_inclusive); + +// 4 comparisons required: +// start == 0 || (start >= len && start == len) || bytes[start] >= -0x40) + +// CHECK-LABEL: @get_range_from +// CHECK-COUNT-4: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret + +// CHECK-LABEL: @index_range_from +// CHECK-COUNT-4: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret +tests!(RangeFrom, get_range_from, index_range_from); From 625b18027d4d8d9b2092cf3706b29a5812f76357 Mon Sep 17 00:00:00 2001 From: Karl Meakin Date: Fri, 25 Jul 2025 19:51:21 +0100 Subject: [PATCH 098/265] Optimize `SliceIndex::get` impl for `RangeInclusive` The checks for `self.end() == usize::MAX` and `self.end() + 1 > slice.len()` can be replaced with `self.end() >= slice.len()`, since `self.end() < slice.len()` implies both `self.end() <= slice.len()` and `self.end() < usize::MAX`. --- library/core/src/slice/index.rs | 38 ++++++++++++---------- tests/codegen-llvm/slice-range-indexing.rs | 26 ++++++--------- 2 files changed, 31 insertions(+), 33 deletions(-) diff --git a/library/core/src/slice/index.rs b/library/core/src/slice/index.rs index 31d9931e474a..3d769010ea1c 100644 --- a/library/core/src/slice/index.rs +++ b/library/core/src/slice/index.rs @@ -663,7 +663,6 @@ unsafe impl const SliceIndex<[T]> for ops::RangeFull { } /// The methods `index` and `index_mut` panic if: -/// - the end of the range is `usize::MAX` or /// - the start of the range is greater than the end of the range or /// - the end of the range is out of bounds. #[stable(feature = "inclusive_range", since = "1.26.0")] @@ -673,12 +672,12 @@ unsafe impl const SliceIndex<[T]> for ops::RangeInclusive { #[inline] fn get(self, slice: &[T]) -> Option<&[T]> { - if *self.end() == usize::MAX { None } else { self.into_slice_range().get(slice) } + if *self.end() >= slice.len() { None } else { self.into_slice_range().get(slice) } } #[inline] fn get_mut(self, slice: &mut [T]) -> Option<&mut [T]> { - if *self.end() == usize::MAX { None } else { self.into_slice_range().get_mut(slice) } + if *self.end() >= slice.len() { None } else { self.into_slice_range().get_mut(slice) } } #[inline] @@ -950,8 +949,7 @@ where R: ops::RangeBounds, { let len = bounds.end; - let r = into_range(len, (range.start_bound().copied(), range.end_bound().copied()))?; - if r.start > r.end || r.end > len { None } else { Some(r) } + into_range(len, (range.start_bound().copied(), range.end_bound().copied())) } /// Converts a pair of `ops::Bound`s into `ops::Range` without performing any @@ -982,21 +980,27 @@ pub(crate) const fn into_range( len: usize, (start, end): (ops::Bound, ops::Bound), ) -> Option> { - use ops::Bound; - let start = match start { - Bound::Included(start) => start, - Bound::Excluded(start) => start.checked_add(1)?, - Bound::Unbounded => 0, - }; - let end = match end { - Bound::Included(end) => end.checked_add(1)?, - Bound::Excluded(end) => end, - Bound::Unbounded => len, + ops::Bound::Included(end) if end >= len => return None, + // Cannot overflow because `end < len` implies `end < usize::MAX`. + ops::Bound::Included(end) => end + 1, + + ops::Bound::Excluded(end) if end > len => return None, + ops::Bound::Excluded(end) => end, + + ops::Bound::Unbounded => len, }; - // Don't bother with checking `start < end` and `end <= len` - // since these checks are handled by `Range` impls + let start = match start { + ops::Bound::Excluded(start) if start >= end => return None, + // Cannot overflow because `start < end` implies `start < usize::MAX`. + ops::Bound::Excluded(start) => start + 1, + + ops::Bound::Included(start) if start > end => return None, + ops::Bound::Included(start) => start, + + ops::Bound::Unbounded => 0, + }; Some(start..end) } diff --git a/tests/codegen-llvm/slice-range-indexing.rs b/tests/codegen-llvm/slice-range-indexing.rs index 5c47cab6234e..c4b3492dc4dc 100644 --- a/tests/codegen-llvm/slice-range-indexing.rs +++ b/tests/codegen-llvm/slice-range-indexing.rs @@ -33,17 +33,14 @@ macro_rules! tests { // CHECK: ret tests!(Range, get_range, index_range); -// 3 comparisons required: -// end != usize::MAX && end + 1 <= len && start <= end + 1 - -// CHECK-LABEL: @get_range_inclusive -// CHECK-COUNT-3: %{{.+}} = icmp -// CHECK-NOT: %{{.+}} = icmp -// CHECK: ret - // 2 comparisons required: // end < len && start <= end + 1 +// CHECK-LABEL: @get_range_inclusive +// CHECK-COUNT-2: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret + // CHECK-LABEL: @index_range_inclusive // CHECK-COUNT-2: %{{.+}} = icmp // CHECK-NOT: %{{.+}} = icmp @@ -64,17 +61,14 @@ tests!(RangeInclusive, get_range_inclusive, index_range_inclusive); // CHECK: ret tests!(RangeTo, get_range_to, index_range_to); -// 2 comparisons required: -// end != usize::MAX && end + 1 <= len - -// CHECK-LABEL: @get_range_to_inclusive -// CHECK-COUNT-2: %{{.+}} = icmp -// CHECK-NOT: %{{.+}} = icmp -// CHECK: ret - // 1 comparison required: // end < len +// CHECK-LABEL: @get_range_to_inclusive +// CHECK-COUNT-1: %{{.+}} = icmp +// CHECK-NOT: %{{.+}} = icmp +// CHECK: ret + // CHECK-LABEL: @index_range_to_inclusive // CHECK-COUNT-1: %{{.+}} = icmp // CHECK-NOT: %{{.+}} = icmp From 262cd76333b79fb85bb87f2846b3db79c82d2402 Mon Sep 17 00:00:00 2001 From: Karl Meakin Date: Fri, 25 Jul 2025 21:57:44 +0100 Subject: [PATCH 099/265] Optimize `SliceIndex` for `RangeInclusive` Replace `self.end() == usize::MAX` and `self.end() + 1 > slice.len()` with `self.end() >= slice.len()`. Same reasoning as previous commit. Also consolidate the str panicking functions into function. --- library/alloctests/tests/str.rs | 22 ++++--- library/core/src/range.rs | 9 --- library/core/src/str/mod.rs | 64 ++++++++++++------- library/core/src/str/traits.rs | 61 ++++++++++-------- tests/codegen-llvm/str-range-indexing.rs | 20 +++--- ...const-eval-select-backtrace-std.run.stderr | 2 +- 6 files changed, 97 insertions(+), 81 deletions(-) diff --git a/library/alloctests/tests/str.rs b/library/alloctests/tests/str.rs index fcc4aaaa1dcd..096df0007b65 100644 --- a/library/alloctests/tests/str.rs +++ b/library/alloctests/tests/str.rs @@ -630,13 +630,13 @@ mod slice_index { // note: using 0 specifically ensures that the result of overflowing is 0..0, // so that `get` doesn't simply return None for the wrong reason. bad: data[0..=usize::MAX]; - message: "maximum usize"; + message: "out of bounds"; } in mod rangetoinclusive { data: "hello"; bad: data[..=usize::MAX]; - message: "maximum usize"; + message: "out of bounds"; } } } @@ -659,49 +659,49 @@ mod slice_index { data: super::DATA; bad: data[super::BAD_START..super::GOOD_END]; message: - "byte index 4 is not a char boundary; it is inside 'α' (bytes 3..5) of"; + "start byte index 4 is not a char boundary; it is inside 'α' (bytes 3..5) of"; } in mod range_2 { data: super::DATA; bad: data[super::GOOD_START..super::BAD_END]; message: - "byte index 6 is not a char boundary; it is inside 'β' (bytes 5..7) of"; + "end byte index 6 is not a char boundary; it is inside 'β' (bytes 5..7) of"; } in mod rangefrom { data: super::DATA; bad: data[super::BAD_START..]; message: - "byte index 4 is not a char boundary; it is inside 'α' (bytes 3..5) of"; + "start byte index 4 is not a char boundary; it is inside 'α' (bytes 3..5) of"; } in mod rangeto { data: super::DATA; bad: data[..super::BAD_END]; message: - "byte index 6 is not a char boundary; it is inside 'β' (bytes 5..7) of"; + "end byte index 6 is not a char boundary; it is inside 'β' (bytes 5..7) of"; } in mod rangeinclusive_1 { data: super::DATA; bad: data[super::BAD_START..=super::GOOD_END_INCL]; message: - "byte index 4 is not a char boundary; it is inside 'α' (bytes 3..5) of"; + "start byte index 4 is not a char boundary; it is inside 'α' (bytes 3..5) of"; } in mod rangeinclusive_2 { data: super::DATA; bad: data[super::GOOD_START..=super::BAD_END_INCL]; message: - "byte index 6 is not a char boundary; it is inside 'β' (bytes 5..7) of"; + "end byte index 6 is not a char boundary; it is inside 'β' (bytes 5..7) of"; } in mod rangetoinclusive { data: super::DATA; bad: data[..=super::BAD_END_INCL]; message: - "byte index 6 is not a char boundary; it is inside 'β' (bytes 5..7) of"; + "end byte index 6 is not a char boundary; it is inside 'β' (bytes 5..7) of"; } } } @@ -716,7 +716,9 @@ mod slice_index { // check the panic includes the prefix of the sliced string #[test] - #[should_panic(expected = "byte index 1024 is out of bounds of `Lorem ipsum dolor sit amet")] + #[should_panic( + expected = "end byte index 1024 is out of bounds of `Lorem ipsum dolor sit amet" + )] fn test_slice_fail_truncated_1() { let _ = &LOREM_PARAGRAPH[..1024]; } diff --git a/library/core/src/range.rs b/library/core/src/range.rs index fe488355ad15..0ef0d192a868 100644 --- a/library/core/src/range.rs +++ b/library/core/src/range.rs @@ -352,15 +352,6 @@ impl RangeInclusive { } } -impl RangeInclusive { - /// Converts to an exclusive `Range` for `SliceIndex` implementations. - /// The caller is responsible for dealing with `last == usize::MAX`. - #[inline] - pub(crate) const fn into_slice_range(self) -> Range { - Range { start: self.start, end: self.last + 1 } - } -} - #[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_unstable(feature = "const_range", issue = "none")] impl const RangeBounds for RangeInclusive { diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs index ab7389a1300c..5483b8e17bc3 100644 --- a/library/core/src/str/mod.rs +++ b/library/core/src/str/mod.rs @@ -85,34 +85,50 @@ fn slice_error_fail_rt(s: &str, begin: usize, end: usize) -> ! { let trunc_len = s.floor_char_boundary(MAX_DISPLAY_LENGTH); let s_trunc = &s[..trunc_len]; let ellipsis = if trunc_len < s.len() { "[...]" } else { "" }; + let len = s.len(); - // 1. out of bounds - if begin > s.len() || end > s.len() { - let oob_index = if begin > s.len() { begin } else { end }; - panic!("byte index {oob_index} is out of bounds of `{s_trunc}`{ellipsis}"); + // 1. begin is OOB. + if begin > len { + panic!("start byte index {begin} is out of bounds of `{s_trunc}`{ellipsis}"); } - // 2. begin <= end - assert!( - begin <= end, - "begin <= end ({} <= {}) when slicing `{}`{}", - begin, - end, - s_trunc, - ellipsis - ); + // 2. end is OOB. + if end > len { + panic!("end byte index {end} is out of bounds of `{s_trunc}`{ellipsis}"); + } - // 3. character boundary - let index = if !s.is_char_boundary(begin) { begin } else { end }; - // find the character - let char_start = s.floor_char_boundary(index); - // `char_start` must be less than len and a char boundary - let ch = s[char_start..].chars().next().unwrap(); - let char_range = char_start..char_start + ch.len_utf8(); - panic!( - "byte index {} is not a char boundary; it is inside {:?} (bytes {:?}) of `{}`{}", - index, ch, char_range, s_trunc, ellipsis - ); + // 3. range is backwards. + if begin > end { + panic!("begin <= end ({begin} <= {end}) when slicing `{s_trunc}`{ellipsis}") + } + + // 4. begin is inside a character. + if !s.is_char_boundary(begin) { + let floor = s.floor_char_boundary(begin); + let ceil = s.ceil_char_boundary(begin); + let range = floor..ceil; + let ch = s[floor..ceil].chars().next().unwrap(); + panic!( + "start byte index {begin} is not a char boundary; it is inside {ch:?} (bytes {range:?}) of `{s_trunc}`{ellipsis}" + ) + } + + // 5. end is inside a character. + if !s.is_char_boundary(end) { + let floor = s.floor_char_boundary(end); + let ceil = s.ceil_char_boundary(end); + let range = floor..ceil; + let ch = s[floor..ceil].chars().next().unwrap(); + panic!( + "end byte index {end} is not a char boundary; it is inside {ch:?} (bytes {range:?}) of `{s_trunc}`{ellipsis}" + ) + } + + // 6. end is OOB and range is inclusive (end == len). + // This test cannot be combined with 2. above because for cases like + // `"abcαβγ"[4..9]` the error is that 4 is inside 'α', not that 9 is OOB. + debug_assert_eq!(end, len); + panic!("end byte index {end} is out of bounds of `{s_trunc}`{ellipsis}"); } impl str { diff --git a/library/core/src/str/traits.rs b/library/core/src/str/traits.rs index b63fe96ea99d..6cac9418f9d7 100644 --- a/library/core/src/str/traits.rs +++ b/library/core/src/str/traits.rs @@ -76,13 +76,6 @@ where } } -#[inline(never)] -#[cold] -#[track_caller] -const fn str_index_overflow_fail() -> ! { - panic!("attempted to index str up to maximum usize"); -} - /// Implements substring slicing with syntax `&self[..]` or `&mut self[..]`. /// /// Returns a slice of the whole string, i.e., returns `&self` or `&mut @@ -640,11 +633,11 @@ unsafe impl const SliceIndex for ops::RangeInclusive { type Output = str; #[inline] fn get(self, slice: &str) -> Option<&Self::Output> { - if *self.end() == usize::MAX { None } else { self.into_slice_range().get(slice) } + if *self.end() >= slice.len() { None } else { self.into_slice_range().get(slice) } } #[inline] fn get_mut(self, slice: &mut str) -> Option<&mut Self::Output> { - if *self.end() == usize::MAX { None } else { self.into_slice_range().get_mut(slice) } + if *self.end() >= slice.len() { None } else { self.into_slice_range().get_mut(slice) } } #[inline] unsafe fn get_unchecked(self, slice: *const str) -> *const Self::Output { @@ -658,17 +651,37 @@ unsafe impl const SliceIndex for ops::RangeInclusive { } #[inline] fn index(self, slice: &str) -> &Self::Output { - if *self.end() == usize::MAX { - str_index_overflow_fail(); + let Self { mut start, mut end, exhausted } = self; + let len = slice.len(); + if end < len { + end = end + 1; + start = if exhausted { end } else { start }; + if start <= end && slice.is_char_boundary(start) && slice.is_char_boundary(end) { + // SAFETY: just checked that `start` and `end` are on a char boundary, + // and we are passing in a safe reference, so the return value will also be one. + // We also checked char boundaries, so this is valid UTF-8. + unsafe { return &*(start..end).get_unchecked(slice) } + } } - self.into_slice_range().index(slice) + + super::slice_error_fail(slice, start, end) } #[inline] fn index_mut(self, slice: &mut str) -> &mut Self::Output { - if *self.end() == usize::MAX { - str_index_overflow_fail(); + let Self { mut start, mut end, exhausted } = self; + let len = slice.len(); + if end < len { + end = end + 1; + start = if exhausted { end } else { start }; + if start <= end && slice.is_char_boundary(start) && slice.is_char_boundary(end) { + // SAFETY: just checked that `start` and `end` are on a char boundary, + // and we are passing in a safe reference, so the return value will also be one. + // We also checked char boundaries, so this is valid UTF-8. + unsafe { return &mut *(start..end).get_unchecked_mut(slice) } + } } - self.into_slice_range().index_mut(slice) + + super::slice_error_fail(slice, start, end) } } @@ -678,35 +691,29 @@ unsafe impl const SliceIndex for range::RangeInclusive { type Output = str; #[inline] fn get(self, slice: &str) -> Option<&Self::Output> { - if self.last == usize::MAX { None } else { self.into_slice_range().get(slice) } + ops::RangeInclusive::from(self).get(slice) } #[inline] fn get_mut(self, slice: &mut str) -> Option<&mut Self::Output> { - if self.last == usize::MAX { None } else { self.into_slice_range().get_mut(slice) } + ops::RangeInclusive::from(self).get_mut(slice) } #[inline] unsafe fn get_unchecked(self, slice: *const str) -> *const Self::Output { // SAFETY: the caller must uphold the safety contract for `get_unchecked`. - unsafe { self.into_slice_range().get_unchecked(slice) } + unsafe { ops::RangeInclusive::from(self).get_unchecked(slice) } } #[inline] unsafe fn get_unchecked_mut(self, slice: *mut str) -> *mut Self::Output { // SAFETY: the caller must uphold the safety contract for `get_unchecked_mut`. - unsafe { self.into_slice_range().get_unchecked_mut(slice) } + unsafe { ops::RangeInclusive::from(self).get_unchecked_mut(slice) } } #[inline] fn index(self, slice: &str) -> &Self::Output { - if self.last == usize::MAX { - str_index_overflow_fail(); - } - self.into_slice_range().index(slice) + ops::RangeInclusive::from(self).index(slice) } #[inline] fn index_mut(self, slice: &mut str) -> &mut Self::Output { - if self.last == usize::MAX { - str_index_overflow_fail(); - } - self.into_slice_range().index_mut(slice) + ops::RangeInclusive::from(self).index_mut(slice) } } diff --git a/tests/codegen-llvm/str-range-indexing.rs b/tests/codegen-llvm/str-range-indexing.rs index 3c35b26773cb..dee1a3a41c46 100644 --- a/tests/codegen-llvm/str-range-indexing.rs +++ b/tests/codegen-llvm/str-range-indexing.rs @@ -35,18 +35,18 @@ macro_rules! tests { // CHECK: ret tests!(Range, get_range, index_range); -// 9 comparisons required: -// end != usize::MAX && start <= end + 1 -// && (start == 0 || (start >= len && start == len) || bytes[start] >= -0x40) -// && ( (end + 1 >= len && end + 1 == len) || bytes[end + 1] >= -0x40) +// 7 comparisons required: +// end < len && start <= end + 1 +// && (start == 0 || start >= len || bytes[start] >= -0x40) +// && ( end + 1 >= len || bytes[end + 1] >= -0x40) // CHECK-LABEL: @get_range_inclusive -// CHECK-COUNT-9: %{{.+}} = icmp +// CHECK-COUNT-7: %{{.+}} = icmp // CHECK-NOT: %{{.+}} = icmp // CHECK: ret // CHECK-LABEL: @index_range_inclusive -// CHECK-COUNT-9: %{{.+}} = icmp +// CHECK-COUNT-7: %{{.+}} = icmp // CHECK-NOT: %{{.+}} = icmp // CHECK: ret tests!(RangeInclusive, get_range_inclusive, index_range_inclusive); @@ -65,16 +65,16 @@ tests!(RangeInclusive, get_range_inclusive, index_range_inclusive); // CHECK: ret tests!(RangeTo, get_range_to, index_range_to); -// 4 comparisons required: -// end != usize::MAX && (end + 1 >= len && end + 1 == len) || bytes[end + 1] >= -0x40) +// 3 comparisons required: +// end < len && (end + 1 >= len || bytes[end + 1] >= -0x40) // CHECK-LABEL: @get_range_to_inclusive -// CHECK-COUNT-4: %{{.+}} = icmp +// CHECK-COUNT-3: %{{.+}} = icmp // CHECK-NOT: %{{.+}} = icmp // CHECK: ret // CHECK-LABEL: @index_range_to_inclusive -// CHECK-COUNT-4: %{{.+}} = icmp +// CHECK-COUNT-3: %{{.+}} = icmp // CHECK-NOT: %{{.+}} = icmp // CHECK: ret tests!(RangeToInclusive, get_range_to_inclusive, index_range_to_inclusive); diff --git a/tests/ui/intrinsics/const-eval-select-backtrace-std.run.stderr b/tests/ui/intrinsics/const-eval-select-backtrace-std.run.stderr index 397eeaf600ad..aee60c94f106 100644 --- a/tests/ui/intrinsics/const-eval-select-backtrace-std.run.stderr +++ b/tests/ui/intrinsics/const-eval-select-backtrace-std.run.stderr @@ -1,4 +1,4 @@ thread 'main' ($TID) panicked at $DIR/const-eval-select-backtrace-std.rs:6:8: -byte index 1 is out of bounds of `` +start byte index 1 is out of bounds of `` note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace From 94ff542ff5c89e33d91a6a2f5e8bf17250c8d08c Mon Sep 17 00:00:00 2001 From: Karl Meakin Date: Mon, 2 Feb 2026 20:56:46 +0000 Subject: [PATCH 100/265] Make panic message less confusing The panic message when slicing a string with a negative length range (eg `"abcdef"[4..3]`) is confusing: it gives the condition that failed to hold, whilst all the other panic messages give the condition that did hold. Before: begin <= end (4 <= 3) when slicing `abcdef` After: begin > end (4 > 3) when slicing `abcdef` --- library/alloctests/tests/str.rs | 4 ++-- library/core/src/str/mod.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/alloctests/tests/str.rs b/library/alloctests/tests/str.rs index 096df0007b65..52cc8afeee90 100644 --- a/library/alloctests/tests/str.rs +++ b/library/alloctests/tests/str.rs @@ -612,14 +612,14 @@ mod slice_index { data: "abcdef"; good: data[4..4] == ""; bad: data[4..3]; - message: "begin <= end (4 <= 3)"; + message: "begin > end (4 > 3)"; } in mod rangeinclusive_neg_width { data: "abcdef"; good: data[4..=3] == ""; bad: data[4..=2]; - message: "begin <= end (4 <= 3)"; + message: "begin > end (4 > 3)"; } } diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs index 5483b8e17bc3..98354643aa40 100644 --- a/library/core/src/str/mod.rs +++ b/library/core/src/str/mod.rs @@ -99,7 +99,7 @@ fn slice_error_fail_rt(s: &str, begin: usize, end: usize) -> ! { // 3. range is backwards. if begin > end { - panic!("begin <= end ({begin} <= {end}) when slicing `{s_trunc}`{ellipsis}") + panic!("begin > end ({begin} > {end}) when slicing `{s_trunc}`{ellipsis}") } // 4. begin is inside a character. From f8cf68f35ab8a37df77f658b8b575a4902bd813b Mon Sep 17 00:00:00 2001 From: Karl Meakin Date: Mon, 2 Feb 2026 21:12:49 +0000 Subject: [PATCH 101/265] Give `into_range` more consistent name Rename `into_range` to `try_into_slice_range`: - Prepend `try_` to show that it returns `None` on error, like `try_range` - add `_slice` to make it consistent with `into_slice_range` --- library/core/src/slice/index.rs | 8 ++++---- library/core/src/str/traits.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/library/core/src/slice/index.rs b/library/core/src/slice/index.rs index 3d769010ea1c..3a76c098bb53 100644 --- a/library/core/src/slice/index.rs +++ b/library/core/src/slice/index.rs @@ -949,7 +949,7 @@ where R: ops::RangeBounds, { let len = bounds.end; - into_range(len, (range.start_bound().copied(), range.end_bound().copied())) + try_into_slice_range(len, (range.start_bound().copied(), range.end_bound().copied())) } /// Converts a pair of `ops::Bound`s into `ops::Range` without performing any @@ -976,7 +976,7 @@ pub(crate) const fn into_range_unchecked( /// Returns `None` on overflowing indices. #[rustc_const_unstable(feature = "const_range", issue = "none")] #[inline] -pub(crate) const fn into_range( +pub(crate) const fn try_into_slice_range( len: usize, (start, end): (ops::Bound, ops::Bound), ) -> Option> { @@ -1043,12 +1043,12 @@ unsafe impl SliceIndex<[T]> for (ops::Bound, ops::Bound) { #[inline] fn get(self, slice: &[T]) -> Option<&Self::Output> { - into_range(slice.len(), self)?.get(slice) + try_into_slice_range(slice.len(), self)?.get(slice) } #[inline] fn get_mut(self, slice: &mut [T]) -> Option<&mut Self::Output> { - into_range(slice.len(), self)?.get_mut(slice) + try_into_slice_range(slice.len(), self)?.get_mut(slice) } #[inline] diff --git a/library/core/src/str/traits.rs b/library/core/src/str/traits.rs index 6cac9418f9d7..edf07c0c16f4 100644 --- a/library/core/src/str/traits.rs +++ b/library/core/src/str/traits.rs @@ -382,12 +382,12 @@ unsafe impl SliceIndex for (ops::Bound, ops::Bound) { #[inline] fn get(self, slice: &str) -> Option<&str> { - crate::slice::index::into_range(slice.len(), self)?.get(slice) + crate::slice::index::try_into_slice_range(slice.len(), self)?.get(slice) } #[inline] fn get_mut(self, slice: &mut str) -> Option<&mut str> { - crate::slice::index::into_range(slice.len(), self)?.get_mut(slice) + crate::slice::index::try_into_slice_range(slice.len(), self)?.get_mut(slice) } #[inline] From 1f5325866088b9b58a004734e67777d2ff3ef7b4 Mon Sep 17 00:00:00 2001 From: Shoyu Vanilla Date: Wed, 11 Feb 2026 17:05:50 +0900 Subject: [PATCH 102/265] Bump `ena` --- Cargo.lock | 4 ++-- compiler/rustc_data_structures/Cargo.toml | 2 +- compiler/rustc_type_ir/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1a930b64f458..ba42ec20331e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1298,9 +1298,9 @@ dependencies = [ [[package]] name = "ena" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" +checksum = "eabffdaee24bd1bf95c5ef7cec31260444317e72ea56c4c91750e8b7ee58d5f1" dependencies = [ "log", ] diff --git a/compiler/rustc_data_structures/Cargo.toml b/compiler/rustc_data_structures/Cargo.toml index f358ffffb47d..0332ff681082 100644 --- a/compiler/rustc_data_structures/Cargo.toml +++ b/compiler/rustc_data_structures/Cargo.toml @@ -9,7 +9,7 @@ arrayvec = { version = "0.7", default-features = false } bitflags = "2.4.1" either = "1.0" elsa = "1.11.0" -ena = "0.14.3" +ena = "0.14.4" indexmap = "2.12.1" jobserver_crate = { version = "0.1.28", package = "jobserver" } measureme = "12.0.1" diff --git a/compiler/rustc_type_ir/Cargo.toml b/compiler/rustc_type_ir/Cargo.toml index 315ab8b97e9b..fbe382712893 100644 --- a/compiler/rustc_type_ir/Cargo.toml +++ b/compiler/rustc_type_ir/Cargo.toml @@ -8,7 +8,7 @@ edition = "2024" arrayvec = { version = "0.7", default-features = false } bitflags = "2.4.1" derive-where = "1.2.7" -ena = "0.14.3" +ena = "0.14.4" indexmap = "2.0.0" rustc-hash = "2.0.0" rustc_ast_ir = { path = "../rustc_ast_ir", default-features = false } From 78c8ab35e8713f77191c0af3d3e6c12b0a304b2c Mon Sep 17 00:00:00 2001 From: bit-aloo Date: Wed, 11 Feb 2026 13:39:13 +0530 Subject: [PATCH 103/265] migrate destructure tuple binding to new syntaxEditor --- .../src/handlers/destructure_tuple_binding.rs | 85 +++++---- .../ide-assists/src/utils/ref_field_expr.rs | 18 +- .../crates/syntax/src/ast/edit_in_place.rs | 173 ++++++++++++------ 3 files changed, 181 insertions(+), 95 deletions(-) diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/destructure_tuple_binding.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/destructure_tuple_binding.rs index e2afc0bf130e..b8dc59f87dee 100644 --- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/destructure_tuple_binding.rs +++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/destructure_tuple_binding.rs @@ -8,8 +8,8 @@ use ide_db::{ use itertools::Itertools; use syntax::{ T, - ast::{self, AstNode, FieldExpr, HasName, IdentPat, make}, - ted, + ast::{self, AstNode, FieldExpr, HasName, IdentPat, syntax_factory::SyntaxFactory}, + syntax_editor::{Position, SyntaxEditor}, }; use crate::{ @@ -89,13 +89,20 @@ fn destructure_tuple_edit_impl( data: &TupleData, in_sub_pattern: bool, ) { - let assignment_edit = edit_tuple_assignment(ctx, edit, data, in_sub_pattern); - let current_file_usages_edit = edit_tuple_usages(data, edit, ctx, in_sub_pattern); + let mut syntax_editor = edit.make_editor(data.ident_pat.syntax()); + let syntax_factory = SyntaxFactory::with_mappings(); - assignment_edit.apply(); + let assignment_edit = + edit_tuple_assignment(ctx, edit, &mut syntax_editor, &syntax_factory, data, in_sub_pattern); + let current_file_usages_edit = edit_tuple_usages(data, ctx, &syntax_factory, in_sub_pattern); + + assignment_edit.apply(&mut syntax_editor, &syntax_factory); if let Some(usages_edit) = current_file_usages_edit { - usages_edit.into_iter().for_each(|usage_edit| usage_edit.apply(edit)) + usages_edit.into_iter().for_each(|usage_edit| usage_edit.apply(edit, &mut syntax_editor)) } + + syntax_editor.add_mappings(syntax_factory.finish_with_mappings()); + edit.add_file_edits(ctx.vfs_file_id(), syntax_editor); } fn collect_data(ident_pat: IdentPat, ctx: &AssistContext<'_>) -> Option { @@ -165,11 +172,11 @@ struct TupleData { fn edit_tuple_assignment( ctx: &AssistContext<'_>, edit: &mut SourceChangeBuilder, + editor: &mut SyntaxEditor, + make: &SyntaxFactory, data: &TupleData, in_sub_pattern: bool, ) -> AssignmentEdit { - let ident_pat = edit.make_mut(data.ident_pat.clone()); - let tuple_pat = { let original = &data.ident_pat; let is_ref = original.ref_token().is_some(); @@ -177,10 +184,11 @@ fn edit_tuple_assignment( let fields = data .field_names .iter() - .map(|name| ast::Pat::from(make::ident_pat(is_ref, is_mut, make::name(name)))); - make::tuple_pat(fields).clone_for_update() + .map(|name| ast::Pat::from(make.ident_pat(is_ref, is_mut, make.name(name)))); + make.tuple_pat(fields) }; - let is_shorthand_field = ident_pat + let is_shorthand_field = data + .ident_pat .name() .as_ref() .and_then(ast::RecordPatField::for_field_name) @@ -189,14 +197,20 @@ fn edit_tuple_assignment( if let Some(cap) = ctx.config.snippet_cap { // place cursor on first tuple name if let Some(ast::Pat::IdentPat(first_pat)) = tuple_pat.fields().next() { - edit.add_tabstop_before( - cap, - first_pat.name().expect("first ident pattern should have a name"), - ) + let annotation = edit.make_tabstop_before(cap); + editor.add_annotation( + first_pat.name().expect("first ident pattern should have a name").syntax(), + annotation, + ); } } - AssignmentEdit { ident_pat, tuple_pat, in_sub_pattern, is_shorthand_field } + AssignmentEdit { + ident_pat: data.ident_pat.clone(), + tuple_pat, + in_sub_pattern, + is_shorthand_field, + } } struct AssignmentEdit { ident_pat: ast::IdentPat, @@ -206,23 +220,30 @@ struct AssignmentEdit { } impl AssignmentEdit { - fn apply(self) { + fn apply(self, syntax_editor: &mut SyntaxEditor, syntax_mapping: &SyntaxFactory) { // with sub_pattern: keep original tuple and add subpattern: `tup @ (_0, _1)` if self.in_sub_pattern { - self.ident_pat.set_pat(Some(self.tuple_pat.into())) + self.ident_pat.set_pat_with_editor( + Some(self.tuple_pat.into()), + syntax_editor, + syntax_mapping, + ) } else if self.is_shorthand_field { - ted::insert(ted::Position::after(self.ident_pat.syntax()), self.tuple_pat.syntax()); - ted::insert_raw(ted::Position::after(self.ident_pat.syntax()), make::token(T![:])); + syntax_editor.insert(Position::after(self.ident_pat.syntax()), self.tuple_pat.syntax()); + syntax_editor + .insert(Position::after(self.ident_pat.syntax()), syntax_mapping.whitespace(" ")); + syntax_editor + .insert(Position::after(self.ident_pat.syntax()), syntax_mapping.token(T![:])); } else { - ted::replace(self.ident_pat.syntax(), self.tuple_pat.syntax()) + syntax_editor.replace(self.ident_pat.syntax(), self.tuple_pat.syntax()) } } } fn edit_tuple_usages( data: &TupleData, - edit: &mut SourceChangeBuilder, ctx: &AssistContext<'_>, + make: &SyntaxFactory, in_sub_pattern: bool, ) -> Option> { // We need to collect edits first before actually applying them @@ -238,20 +259,20 @@ fn edit_tuple_usages( .as_ref()? .as_slice() .iter() - .filter_map(|r| edit_tuple_usage(ctx, edit, r, data, in_sub_pattern)) + .filter_map(|r| edit_tuple_usage(ctx, make, r, data, in_sub_pattern)) .collect_vec(); Some(edits) } fn edit_tuple_usage( ctx: &AssistContext<'_>, - builder: &mut SourceChangeBuilder, + make: &SyntaxFactory, usage: &FileReference, data: &TupleData, in_sub_pattern: bool, ) -> Option { match detect_tuple_index(usage, data) { - Some(index) => Some(edit_tuple_field_usage(ctx, builder, data, index)), + Some(index) => Some(edit_tuple_field_usage(ctx, make, data, index)), None if in_sub_pattern => { cov_mark::hit!(destructure_tuple_call_with_subpattern); None @@ -262,20 +283,18 @@ fn edit_tuple_usage( fn edit_tuple_field_usage( ctx: &AssistContext<'_>, - builder: &mut SourceChangeBuilder, + make: &SyntaxFactory, data: &TupleData, index: TupleIndex, ) -> EditTupleUsage { let field_name = &data.field_names[index.index]; - let field_name = make::expr_path(make::ext::ident_path(field_name)); + let field_name = make.expr_path(make.ident_path(field_name)); if data.ref_type.is_some() { let (replace_expr, ref_data) = determine_ref_and_parens(ctx, &index.field_expr); - let replace_expr = builder.make_mut(replace_expr); - EditTupleUsage::ReplaceExpr(replace_expr, ref_data.wrap_expr(field_name)) + EditTupleUsage::ReplaceExpr(replace_expr, ref_data.wrap_expr_with_factory(field_name, make)) } else { - let field_expr = builder.make_mut(index.field_expr); - EditTupleUsage::ReplaceExpr(field_expr.into(), field_name) + EditTupleUsage::ReplaceExpr(index.field_expr.into(), field_name) } } enum EditTupleUsage { @@ -291,14 +310,14 @@ enum EditTupleUsage { } impl EditTupleUsage { - fn apply(self, edit: &mut SourceChangeBuilder) { + fn apply(self, edit: &mut SourceChangeBuilder, syntax_editor: &mut SyntaxEditor) { match self { EditTupleUsage::NoIndex(range) => { edit.insert(range.start(), "/*"); edit.insert(range.end(), "*/"); } EditTupleUsage::ReplaceExpr(target_expr, replace_with) => { - ted::replace(target_expr.syntax(), replace_with.clone_for_update().syntax()) + syntax_editor.replace(target_expr.syntax(), replace_with.syntax()) } } } diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/utils/ref_field_expr.rs b/src/tools/rust-analyzer/crates/ide-assists/src/utils/ref_field_expr.rs index 840b26a7ad58..df8ad4111234 100644 --- a/src/tools/rust-analyzer/crates/ide-assists/src/utils/ref_field_expr.rs +++ b/src/tools/rust-analyzer/crates/ide-assists/src/utils/ref_field_expr.rs @@ -5,7 +5,7 @@ //! based on the parent of the existing expression. use syntax::{ AstNode, T, - ast::{self, FieldExpr, MethodCallExpr, make}, + ast::{self, FieldExpr, MethodCallExpr, make, syntax_factory::SyntaxFactory}, }; use crate::AssistContext; @@ -130,4 +130,20 @@ impl RefData { expr } + + pub(crate) fn wrap_expr_with_factory( + &self, + mut expr: ast::Expr, + syntax_factory: &SyntaxFactory, + ) -> ast::Expr { + if self.needs_deref { + expr = syntax_factory.expr_prefix(T![*], expr).into(); + } + + if self.needs_parentheses { + expr = syntax_factory.expr_paren(expr).into(); + } + + expr + } } diff --git a/src/tools/rust-analyzer/crates/syntax/src/ast/edit_in_place.rs b/src/tools/rust-analyzer/crates/syntax/src/ast/edit_in_place.rs index 1cd8146f6863..2b7dc5cd76ab 100644 --- a/src/tools/rust-analyzer/crates/syntax/src/ast/edit_in_place.rs +++ b/src/tools/rust-analyzer/crates/syntax/src/ast/edit_in_place.rs @@ -9,8 +9,9 @@ use crate::{ SyntaxKind::{ATTR, COMMENT, WHITESPACE}, SyntaxNode, SyntaxToken, algo::{self, neighbor}, - ast::{self, HasGenericParams, edit::IndentLevel, make}, - ted::{self, Position}, + ast::{self, HasGenericParams, edit::IndentLevel, make, syntax_factory::SyntaxFactory}, + syntax_editor::{Position, SyntaxEditor}, + ted, }; use super::{GenericParam, HasName}; @@ -26,13 +27,13 @@ impl GenericParamsOwnerEdit for ast::Fn { Some(it) => it, None => { let position = if let Some(name) = self.name() { - Position::after(name.syntax) + ted::Position::after(name.syntax) } else if let Some(fn_token) = self.fn_token() { - Position::after(fn_token) + ted::Position::after(fn_token) } else if let Some(param_list) = self.param_list() { - Position::before(param_list.syntax) + ted::Position::before(param_list.syntax) } else { - Position::last_child_of(self.syntax()) + ted::Position::last_child_of(self.syntax()) }; create_generic_param_list(position) } @@ -42,11 +43,11 @@ impl GenericParamsOwnerEdit for ast::Fn { fn get_or_create_where_clause(&self) -> ast::WhereClause { if self.where_clause().is_none() { let position = if let Some(ty) = self.ret_type() { - Position::after(ty.syntax()) + ted::Position::after(ty.syntax()) } else if let Some(param_list) = self.param_list() { - Position::after(param_list.syntax()) + ted::Position::after(param_list.syntax()) } else { - Position::last_child_of(self.syntax()) + ted::Position::last_child_of(self.syntax()) }; create_where_clause(position); } @@ -60,8 +61,8 @@ impl GenericParamsOwnerEdit for ast::Impl { Some(it) => it, None => { let position = match self.impl_token() { - Some(imp_token) => Position::after(imp_token), - None => Position::last_child_of(self.syntax()), + Some(imp_token) => ted::Position::after(imp_token), + None => ted::Position::last_child_of(self.syntax()), }; create_generic_param_list(position) } @@ -71,8 +72,8 @@ impl GenericParamsOwnerEdit for ast::Impl { fn get_or_create_where_clause(&self) -> ast::WhereClause { if self.where_clause().is_none() { let position = match self.assoc_item_list() { - Some(items) => Position::before(items.syntax()), - None => Position::last_child_of(self.syntax()), + Some(items) => ted::Position::before(items.syntax()), + None => ted::Position::last_child_of(self.syntax()), }; create_where_clause(position); } @@ -86,11 +87,11 @@ impl GenericParamsOwnerEdit for ast::Trait { Some(it) => it, None => { let position = if let Some(name) = self.name() { - Position::after(name.syntax) + ted::Position::after(name.syntax) } else if let Some(trait_token) = self.trait_token() { - Position::after(trait_token) + ted::Position::after(trait_token) } else { - Position::last_child_of(self.syntax()) + ted::Position::last_child_of(self.syntax()) }; create_generic_param_list(position) } @@ -100,9 +101,9 @@ impl GenericParamsOwnerEdit for ast::Trait { fn get_or_create_where_clause(&self) -> ast::WhereClause { if self.where_clause().is_none() { let position = match (self.assoc_item_list(), self.semicolon_token()) { - (Some(items), _) => Position::before(items.syntax()), - (_, Some(tok)) => Position::before(tok), - (None, None) => Position::last_child_of(self.syntax()), + (Some(items), _) => ted::Position::before(items.syntax()), + (_, Some(tok)) => ted::Position::before(tok), + (None, None) => ted::Position::last_child_of(self.syntax()), }; create_where_clause(position); } @@ -116,11 +117,11 @@ impl GenericParamsOwnerEdit for ast::TypeAlias { Some(it) => it, None => { let position = if let Some(name) = self.name() { - Position::after(name.syntax) + ted::Position::after(name.syntax) } else if let Some(trait_token) = self.type_token() { - Position::after(trait_token) + ted::Position::after(trait_token) } else { - Position::last_child_of(self.syntax()) + ted::Position::last_child_of(self.syntax()) }; create_generic_param_list(position) } @@ -130,10 +131,10 @@ impl GenericParamsOwnerEdit for ast::TypeAlias { fn get_or_create_where_clause(&self) -> ast::WhereClause { if self.where_clause().is_none() { let position = match self.eq_token() { - Some(tok) => Position::before(tok), + Some(tok) => ted::Position::before(tok), None => match self.semicolon_token() { - Some(tok) => Position::before(tok), - None => Position::last_child_of(self.syntax()), + Some(tok) => ted::Position::before(tok), + None => ted::Position::last_child_of(self.syntax()), }, }; create_where_clause(position); @@ -148,11 +149,11 @@ impl GenericParamsOwnerEdit for ast::Struct { Some(it) => it, None => { let position = if let Some(name) = self.name() { - Position::after(name.syntax) + ted::Position::after(name.syntax) } else if let Some(struct_token) = self.struct_token() { - Position::after(struct_token) + ted::Position::after(struct_token) } else { - Position::last_child_of(self.syntax()) + ted::Position::last_child_of(self.syntax()) }; create_generic_param_list(position) } @@ -166,13 +167,13 @@ impl GenericParamsOwnerEdit for ast::Struct { ast::FieldList::TupleFieldList(it) => Some(it), }); let position = if let Some(tfl) = tfl { - Position::after(tfl.syntax()) + ted::Position::after(tfl.syntax()) } else if let Some(gpl) = self.generic_param_list() { - Position::after(gpl.syntax()) + ted::Position::after(gpl.syntax()) } else if let Some(name) = self.name() { - Position::after(name.syntax()) + ted::Position::after(name.syntax()) } else { - Position::last_child_of(self.syntax()) + ted::Position::last_child_of(self.syntax()) }; create_where_clause(position); } @@ -186,11 +187,11 @@ impl GenericParamsOwnerEdit for ast::Enum { Some(it) => it, None => { let position = if let Some(name) = self.name() { - Position::after(name.syntax) + ted::Position::after(name.syntax) } else if let Some(enum_token) = self.enum_token() { - Position::after(enum_token) + ted::Position::after(enum_token) } else { - Position::last_child_of(self.syntax()) + ted::Position::last_child_of(self.syntax()) }; create_generic_param_list(position) } @@ -200,11 +201,11 @@ impl GenericParamsOwnerEdit for ast::Enum { fn get_or_create_where_clause(&self) -> ast::WhereClause { if self.where_clause().is_none() { let position = if let Some(gpl) = self.generic_param_list() { - Position::after(gpl.syntax()) + ted::Position::after(gpl.syntax()) } else if let Some(name) = self.name() { - Position::after(name.syntax()) + ted::Position::after(name.syntax()) } else { - Position::last_child_of(self.syntax()) + ted::Position::last_child_of(self.syntax()) }; create_where_clause(position); } @@ -212,12 +213,12 @@ impl GenericParamsOwnerEdit for ast::Enum { } } -fn create_where_clause(position: Position) { +fn create_where_clause(position: ted::Position) { let where_clause = make::where_clause(empty()).clone_for_update(); ted::insert(position, where_clause.syntax()); } -fn create_generic_param_list(position: Position) -> ast::GenericParamList { +fn create_generic_param_list(position: ted::Position) -> ast::GenericParamList { let gpl = make::generic_param_list(empty()).clone_for_update(); ted::insert_raw(position, gpl.syntax()); gpl @@ -253,7 +254,7 @@ impl ast::GenericParamList { pub fn add_generic_param(&self, generic_param: ast::GenericParam) { match self.generic_params().last() { Some(last_param) => { - let position = Position::after(last_param.syntax()); + let position = ted::Position::after(last_param.syntax()); let elements = vec![ make::token(T![,]).into(), make::tokens::single_space().into(), @@ -262,7 +263,7 @@ impl ast::GenericParamList { ted::insert_all(position, elements); } None => { - let after_l_angle = Position::after(self.l_angle_token().unwrap()); + let after_l_angle = ted::Position::after(self.l_angle_token().unwrap()); ted::insert(after_l_angle, generic_param.syntax()); } } @@ -412,7 +413,7 @@ impl ast::UseTree { match self.use_tree_list() { Some(it) => it, None => { - let position = Position::last_child_of(self.syntax()); + let position = ted::Position::last_child_of(self.syntax()); let use_tree_list = make::use_tree_list(empty()).clone_for_update(); let mut elements = Vec::with_capacity(2); if self.coloncolon_token().is_none() { @@ -458,7 +459,7 @@ impl ast::UseTree { // Next, transform 'suffix' use tree into 'prefix::{suffix}' let subtree = self.clone_subtree().clone_for_update(); ted::remove_all_iter(self.syntax().children_with_tokens()); - ted::insert(Position::first_child_of(self.syntax()), prefix.syntax()); + ted::insert(ted::Position::first_child_of(self.syntax()), prefix.syntax()); self.get_or_create_use_tree_list().add_use_tree(subtree); fn split_path_prefix(prefix: &ast::Path) -> Option<()> { @@ -507,7 +508,7 @@ impl ast::UseTreeList { pub fn add_use_tree(&self, use_tree: ast::UseTree) { let (position, elements) = match self.use_trees().last() { Some(last_tree) => ( - Position::after(last_tree.syntax()), + ted::Position::after(last_tree.syntax()), vec![ make::token(T![,]).into(), make::tokens::single_space().into(), @@ -516,8 +517,8 @@ impl ast::UseTreeList { ), None => { let position = match self.l_curly_token() { - Some(l_curly) => Position::after(l_curly), - None => Position::last_child_of(self.syntax()), + Some(l_curly) => ted::Position::after(l_curly), + None => ted::Position::last_child_of(self.syntax()), }; (position, vec![use_tree.syntax.into()]) } @@ -582,15 +583,15 @@ impl ast::AssocItemList { let (indent, position, whitespace) = match self.assoc_items().last() { Some(last_item) => ( IndentLevel::from_node(last_item.syntax()), - Position::after(last_item.syntax()), + ted::Position::after(last_item.syntax()), "\n\n", ), None => match self.l_curly_token() { Some(l_curly) => { normalize_ws_between_braces(self.syntax()); - (IndentLevel::from_token(&l_curly) + 1, Position::after(&l_curly), "\n") + (IndentLevel::from_token(&l_curly) + 1, ted::Position::after(&l_curly), "\n") } - None => (IndentLevel::single(), Position::last_child_of(self.syntax()), "\n"), + None => (IndentLevel::single(), ted::Position::last_child_of(self.syntax()), "\n"), }, }; let elements: Vec = vec![ @@ -618,17 +619,17 @@ impl ast::RecordExprFieldList { let position = match self.fields().last() { Some(last_field) => { let comma = get_or_insert_comma_after(last_field.syntax()); - Position::after(comma) + ted::Position::after(comma) } None => match self.l_curly_token() { - Some(it) => Position::after(it), - None => Position::last_child_of(self.syntax()), + Some(it) => ted::Position::after(it), + None => ted::Position::last_child_of(self.syntax()), }, }; ted::insert_all(position, vec![whitespace.into(), field.syntax().clone().into()]); if is_multiline { - ted::insert(Position::after(field.syntax()), ast::make::token(T![,])); + ted::insert(ted::Position::after(field.syntax()), ast::make::token(T![,])); } } } @@ -656,7 +657,7 @@ impl ast::RecordExprField { ast::make::tokens::single_space().into(), expr.syntax().clone().into(), ]; - ted::insert_all_raw(Position::last_child_of(self.syntax()), children); + ted::insert_all_raw(ted::Position::last_child_of(self.syntax()), children); } } } @@ -679,17 +680,17 @@ impl ast::RecordPatFieldList { Some(last_field) => { let syntax = last_field.syntax(); let comma = get_or_insert_comma_after(syntax); - Position::after(comma) + ted::Position::after(comma) } None => match self.l_curly_token() { - Some(it) => Position::after(it), - None => Position::last_child_of(self.syntax()), + Some(it) => ted::Position::after(it), + None => ted::Position::last_child_of(self.syntax()), }, }; ted::insert_all(position, vec![whitespace.into(), field.syntax().clone().into()]); if is_multiline { - ted::insert(Position::after(field.syntax()), ast::make::token(T![,])); + ted::insert(ted::Position::after(field.syntax()), ast::make::token(T![,])); } } } @@ -703,7 +704,7 @@ fn get_or_insert_comma_after(syntax: &SyntaxNode) -> SyntaxToken { Some(it) => it, None => { let comma = ast::make::token(T![,]); - ted::insert(Position::after(syntax), &comma); + ted::insert(ted::Position::after(syntax), &comma); comma } } @@ -728,7 +729,7 @@ fn normalize_ws_between_braces(node: &SyntaxNode) -> Option<()> { } } Some(ws) if ws.kind() == T!['}'] => { - ted::insert(Position::after(l), make::tokens::whitespace(&format!("\n{indent}"))); + ted::insert(ted::Position::after(l), make::tokens::whitespace(&format!("\n{indent}"))); } _ => (), } @@ -780,6 +781,56 @@ impl ast::IdentPat { } } } + + pub fn set_pat_with_editor( + &self, + pat: Option, + syntax_editor: &mut SyntaxEditor, + syntax_factory: &SyntaxFactory, + ) { + match pat { + None => { + if let Some(at_token) = self.at_token() { + // Remove `@ Pat` + let start = at_token.clone().into(); + let end = self + .pat() + .map(|it| it.syntax().clone().into()) + .unwrap_or_else(|| at_token.into()); + syntax_editor.delete_all(start..=end); + + // Remove any trailing ws + if let Some(last) = + self.syntax().last_token().filter(|it| it.kind() == WHITESPACE) + { + last.detach(); + } + } + } + Some(pat) => { + if let Some(old_pat) = self.pat() { + // Replace existing pattern + syntax_editor.replace(old_pat.syntax(), pat.syntax()) + } else if let Some(at_token) = self.at_token() { + // Have an `@` token but not a pattern yet + syntax_editor.insert(Position::after(at_token), pat.syntax()); + } else { + // Don't have an `@`, should have a name + let name = self.name().unwrap(); + + syntax_editor.insert_all( + Position::after(name.syntax()), + vec![ + syntax_factory.whitespace(" ").into(), + syntax_factory.token(T![@]).into(), + syntax_factory.whitespace(" ").into(), + pat.syntax().clone().into(), + ], + ) + } + } + } + } } pub trait HasVisibilityEdit: ast::HasVisibility { From 13a83cb6397e19088ff7d5946f901c6e35f12374 Mon Sep 17 00:00:00 2001 From: Shoyu Vanilla Date: Wed, 11 Feb 2026 17:38:34 +0900 Subject: [PATCH 104/265] Shallow resolve ty and const vars to their root vars --- compiler/rustc_infer/src/infer/mod.rs | 52 ++++++++++++++----- .../rustc_infer/src/infer/type_variable.rs | 19 +++++++ 2 files changed, 58 insertions(+), 13 deletions(-) diff --git a/compiler/rustc_infer/src/infer/mod.rs b/compiler/rustc_infer/src/infer/mod.rs index e15b25500bb5..21f486a228da 100644 --- a/compiler/rustc_infer/src/infer/mod.rs +++ b/compiler/rustc_infer/src/infer/mod.rs @@ -1099,22 +1099,45 @@ impl<'tcx> InferCtxt<'tcx> { // // Note: if these two lines are combined into one we get // dynamic borrow errors on `self.inner`. - let known = self.inner.borrow_mut().type_variables().probe(v).known(); - known.map_or(ty, |t| self.shallow_resolve(t)) + let (root_vid, value) = + self.inner.borrow_mut().type_variables().probe_with_root_vid(v); + value.known().map_or_else( + || if root_vid == v { ty } else { Ty::new_var(self.tcx, root_vid) }, + |t| self.shallow_resolve(t), + ) } ty::IntVar(v) => { - match self.inner.borrow_mut().int_unification_table().probe_value(v) { + let (root, value) = + self.inner.borrow_mut().int_unification_table().inlined_probe_key_value(v); + match value { ty::IntVarValue::IntType(ty) => Ty::new_int(self.tcx, ty), ty::IntVarValue::UintType(ty) => Ty::new_uint(self.tcx, ty), - ty::IntVarValue::Unknown => ty, + ty::IntVarValue::Unknown => { + if root == v { + ty + } else { + Ty::new_int_var(self.tcx, root) + } + } } } ty::FloatVar(v) => { - match self.inner.borrow_mut().float_unification_table().probe_value(v) { + let (root, value) = self + .inner + .borrow_mut() + .float_unification_table() + .inlined_probe_key_value(v); + match value { ty::FloatVarValue::Known(ty) => Ty::new_float(self.tcx, ty), - ty::FloatVarValue::Unknown => ty, + ty::FloatVarValue::Unknown => { + if root == v { + ty + } else { + Ty::new_float_var(self.tcx, root) + } + } } } @@ -1128,13 +1151,16 @@ impl<'tcx> InferCtxt<'tcx> { pub fn shallow_resolve_const(&self, ct: ty::Const<'tcx>) -> ty::Const<'tcx> { match ct.kind() { ty::ConstKind::Infer(infer_ct) => match infer_ct { - InferConst::Var(vid) => self - .inner - .borrow_mut() - .const_unification_table() - .probe_value(vid) - .known() - .unwrap_or(ct), + InferConst::Var(vid) => { + let (root, value) = self + .inner + .borrow_mut() + .const_unification_table() + .inlined_probe_key_value(vid); + value.known().unwrap_or_else(|| { + if root.vid == vid { ct } else { ty::Const::new_var(self.tcx, root.vid) } + }) + } InferConst::Fresh(_) => ct, }, ty::ConstKind::Param(_) diff --git a/compiler/rustc_infer/src/infer/type_variable.rs b/compiler/rustc_infer/src/infer/type_variable.rs index 65f77fe8e25f..9b928cc5cc8c 100644 --- a/compiler/rustc_infer/src/infer/type_variable.rs +++ b/compiler/rustc_infer/src/infer/type_variable.rs @@ -258,6 +258,25 @@ impl<'tcx> TypeVariableTable<'_, 'tcx> { self.eq_relations().inlined_probe_value(vid) } + /// Retrieves the type to which `vid` has been instantiated, if + /// any, along with the root `vid`. + pub(crate) fn probe_with_root_vid( + &mut self, + vid: ty::TyVid, + ) -> (ty::TyVid, TypeVariableValue<'tcx>) { + self.inlined_probe_with_vid(vid) + } + + /// An always-inlined variant of `probe_with_root_vid`, for very hot call sites. + #[inline(always)] + pub(crate) fn inlined_probe_with_vid( + &mut self, + vid: ty::TyVid, + ) -> (ty::TyVid, TypeVariableValue<'tcx>) { + let (id, value) = self.eq_relations().inlined_probe_key_value(vid); + (id.vid, value) + } + #[inline] fn eq_relations(&mut self) -> super::UnificationTable<'_, 'tcx, TyVidEqKey<'tcx>> { self.storage.eq_relations.with_log(self.undo_log) From 955f7750c1538060d7093a0c17bb8533f2665465 Mon Sep 17 00:00:00 2001 From: Shoyu Vanilla Date: Wed, 11 Feb 2026 17:50:50 +0900 Subject: [PATCH 105/265] Remove redundant `shallow_resolve` call --- compiler/rustc_hir_typeck/src/fallback.rs | 5 ----- compiler/rustc_infer/src/infer/mod.rs | 7 +++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/compiler/rustc_hir_typeck/src/fallback.rs b/compiler/rustc_hir_typeck/src/fallback.rs index 2e421c610e7a..c10e7f3bfb8b 100644 --- a/compiler/rustc_hir_typeck/src/fallback.rs +++ b/compiler/rustc_hir_typeck/src/fallback.rs @@ -357,11 +357,6 @@ impl<'tcx> FnCtxt<'_, 'tcx> { VecGraph::new(num_ty_vars, coercion_edges) } - /// If `ty` is an unresolved type variable, returns its root vid. - fn root_vid(&self, ty: Ty<'tcx>) -> Option { - Some(self.root_var(self.shallow_resolve(ty).ty_vid()?)) - } - /// Given a set of diverging vids and coercions, walk the HIR to gather a /// set of suggestions which can be applied to preserve fallback to unit. fn try_to_suggest_annotations( diff --git a/compiler/rustc_infer/src/infer/mod.rs b/compiler/rustc_infer/src/infer/mod.rs index 21f486a228da..b57306536260 100644 --- a/compiler/rustc_infer/src/infer/mod.rs +++ b/compiler/rustc_infer/src/infer/mod.rs @@ -1184,6 +1184,13 @@ impl<'tcx> InferCtxt<'tcx> { self.inner.borrow_mut().type_variables().root_var(var) } + /// If `ty` is an unresolved type variable, returns its root vid. + pub fn root_vid(&self, ty: Ty<'tcx>) -> Option { + let (root, value) = + self.inner.borrow_mut().type_variables().inlined_probe_with_vid(ty.ty_vid()?); + value.is_unknown().then_some(root) + } + pub fn sub_unify_ty_vids_raw(&self, a: ty::TyVid, b: ty::TyVid) { self.inner.borrow_mut().type_variables().sub_unify(a, b); } From 8062bee9e3825374539906bf502ff1f0c1a06e61 Mon Sep 17 00:00:00 2001 From: Shoyu Vanilla Date: Wed, 11 Feb 2026 18:00:36 +0900 Subject: [PATCH 106/265] Bless tests --- .../incremental/const-generics/issue-64087.rs | 2 - .../inference-fail.stderr | 2 +- .../warn-when-cycle-is-error-in-coherence.rs | 2 +- ...rn-when-cycle-is-error-in-coherence.stderr | 2 +- .../dyn-compatibility-ok-infer-err.rs | 1 - .../dyn-compatibility-ok-infer-err.stderr | 23 +- tests/ui/const-generics/infer/issue-77092.rs | 1 - .../const-generics/infer/issue-77092.stderr | 20 +- .../try-from-with-const-genericsrs-98299.rs | 2 - ...ry-from-with-const-genericsrs-98299.stderr | 44 +-- .../multiline-removal-suggestion.svg | 364 ++++++++++-------- .../indexing/indexing-requires-a-uint.stderr | 2 - .../point-at-index-for-obligation-failure.rs | 4 +- ...int-at-index-for-obligation-failure.stderr | 9 +- tests/ui/parser/issue-12187-1.stderr | 2 +- tests/ui/parser/issue-12187-2.stderr | 2 +- ...opy-inference-side-effects-are-lazy.stderr | 2 +- .../suggest-dereferencing-index.stderr | 2 - ...oxed-closures-failed-recursive-fn-2.stderr | 2 +- 19 files changed, 225 insertions(+), 263 deletions(-) diff --git a/tests/incremental/const-generics/issue-64087.rs b/tests/incremental/const-generics/issue-64087.rs index 787f2af8aa39..97f212b3fbba 100644 --- a/tests/incremental/const-generics/issue-64087.rs +++ b/tests/incremental/const-generics/issue-64087.rs @@ -6,6 +6,4 @@ fn combinator() -> [T; S] {} fn main() { combinator().into_iter(); //[cfail1]~^ ERROR type annotations needed - //[cfail1]~| ERROR type annotations needed - //[cfail1]~| ERROR type annotations needed } diff --git a/tests/ui/associated-inherent-types/inference-fail.stderr b/tests/ui/associated-inherent-types/inference-fail.stderr index bf329c69e99c..12cc3ae7960c 100644 --- a/tests/ui/associated-inherent-types/inference-fail.stderr +++ b/tests/ui/associated-inherent-types/inference-fail.stderr @@ -2,7 +2,7 @@ error[E0282]: type annotations needed --> $DIR/inference-fail.rs:10:12 | LL | let _: S<_>::P = (); - | ^^^^^^^ cannot infer type for type parameter `T` + | ^^^^^^^ cannot infer type error: aborting due to 1 previous error diff --git a/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.rs b/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.rs index c50bbcec5215..b754b1cb5472 100644 --- a/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.rs +++ b/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.rs @@ -3,7 +3,7 @@ use std::cmp::Ordering; use std::marker::PhantomData; #[derive(PartialEq, Default)] -//~^ ERROR conflicting implementations of trait `PartialEq>` for type `Interval<_>` +//~^ ERROR conflicting implementations of trait `PartialEq` for type `Interval<_>` pub(crate) struct Interval(PhantomData); // This impl overlaps with the `derive` unless we reject the nested diff --git a/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr b/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr index a9a99fb28d84..620694aacf83 100644 --- a/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr +++ b/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr @@ -1,4 +1,4 @@ -error[E0119]: conflicting implementations of trait `PartialEq>` for type `Interval<_>` +error[E0119]: conflicting implementations of trait `PartialEq` for type `Interval<_>` --> $DIR/warn-when-cycle-is-error-in-coherence.rs:5:10 | LL | #[derive(PartialEq, Default)] diff --git a/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.rs b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.rs index 298cfb512e41..79e9834b54ed 100644 --- a/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.rs +++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.rs @@ -18,5 +18,4 @@ fn use_dyn(v: &dyn Foo) where [u8; N + 1]: Sized { fn main() { use_dyn(&()); //~^ ERROR type annotations needed - //~| ERROR type annotations needed } diff --git a/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.stderr b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.stderr index a124fbc60920..f9904c9d2e48 100644 --- a/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.stderr +++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.stderr @@ -14,27 +14,6 @@ help: consider specifying the generic argument LL | use_dyn::(&()); | +++++ -error[E0284]: type annotations needed - --> $DIR/dyn-compatibility-ok-infer-err.rs:19:5 - | -LL | use_dyn(&()); - | ^^^^^^^ --- type must be known at this point - | | - | cannot infer the value of the const parameter `N` declared on the function `use_dyn` - | -note: required for `()` to implement `Foo<_>` - --> $DIR/dyn-compatibility-ok-infer-err.rs:8:22 - | -LL | impl Foo for () { - | -------------- ^^^^^^ ^^ - | | - | unsatisfied trait bound introduced here - = note: required for the cast from `&()` to `&dyn Foo<_>` -help: consider specifying the generic argument - | -LL | use_dyn::(&()); - | +++++ - -error: aborting due to 2 previous errors +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0284`. diff --git a/tests/ui/const-generics/infer/issue-77092.rs b/tests/ui/const-generics/infer/issue-77092.rs index 47c594e5b11e..77d1fe187795 100644 --- a/tests/ui/const-generics/infer/issue-77092.rs +++ b/tests/ui/const-generics/infer/issue-77092.rs @@ -10,6 +10,5 @@ fn main() { for i in 1..4 { println!("{:?}", take_array_from_mut(&mut arr, i)); //~^ ERROR type annotations needed - //~| ERROR type annotations needed } } diff --git a/tests/ui/const-generics/infer/issue-77092.stderr b/tests/ui/const-generics/infer/issue-77092.stderr index 3763cd738a86..96f6496eca53 100644 --- a/tests/ui/const-generics/infer/issue-77092.stderr +++ b/tests/ui/const-generics/infer/issue-77092.stderr @@ -14,24 +14,6 @@ help: consider specifying the generic arguments LL | println!("{:?}", take_array_from_mut::(&mut arr, i)); | ++++++++++ -error[E0284]: type annotations needed - --> $DIR/issue-77092.rs:11:26 - | -LL | println!("{:?}", take_array_from_mut(&mut arr, i)); - | ---- ^^^^^^^^^^^^^^^^^^^ cannot infer the value of the const parameter `N` declared on the function `take_array_from_mut` - | | - | required by this formatting parameter - | - = note: required for `[i32; _]` to implement `Debug` - = note: 1 redundant requirement hidden - = note: required for `&mut [i32; _]` to implement `Debug` -note: required by a bound in `core::fmt::rt::Argument::<'_>::new_debug` - --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL -help: consider specifying the generic arguments - | -LL | println!("{:?}", take_array_from_mut::(&mut arr, i)); - | ++++++++++ - -error: aborting due to 2 previous errors +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0284`. diff --git a/tests/ui/const-generics/try-from-with-const-genericsrs-98299.rs b/tests/ui/const-generics/try-from-with-const-genericsrs-98299.rs index 49c88856bc96..808d960da68b 100644 --- a/tests/ui/const-generics/try-from-with-const-genericsrs-98299.rs +++ b/tests/ui/const-generics/try-from-with-const-genericsrs-98299.rs @@ -4,8 +4,6 @@ use std::convert::TryFrom; pub fn test_usage(p: ()) { SmallCString::try_from(p).map(|cstr| cstr); //~^ ERROR: type annotations needed - //~| ERROR: type annotations needed - //~| ERROR: type annotations needed } pub struct SmallCString {} diff --git a/tests/ui/const-generics/try-from-with-const-genericsrs-98299.stderr b/tests/ui/const-generics/try-from-with-const-genericsrs-98299.stderr index 1557b83b00ec..c80efd6df8a8 100644 --- a/tests/ui/const-generics/try-from-with-const-genericsrs-98299.stderr +++ b/tests/ui/const-generics/try-from-with-const-genericsrs-98299.stderr @@ -7,7 +7,7 @@ LL | SmallCString::try_from(p).map(|cstr| cstr); | type must be known at this point | note: required by a const generic parameter in `SmallCString` - --> $DIR/try-from-with-const-genericsrs-98299.rs:11:25 + --> $DIR/try-from-with-const-genericsrs-98299.rs:9:25 | LL | pub struct SmallCString {} | ^^^^^^^^^^^^^^ required by this const generic parameter in `SmallCString` @@ -16,46 +16,6 @@ help: consider giving this closure parameter an explicit type, where the value o LL | SmallCString::try_from(p).map(|cstr: SmallCString| cstr); | +++++++++++++++++ -error[E0284]: type annotations needed for `SmallCString<_>` - --> $DIR/try-from-with-const-genericsrs-98299.rs:5:36 - | -LL | SmallCString::try_from(p).map(|cstr| cstr); - | ------------ ^^^^ - | | - | type must be known at this point - | -note: required for `SmallCString<_>` to implement `TryFrom<()>` - --> $DIR/try-from-with-const-genericsrs-98299.rs:13:22 - | -LL | impl TryFrom<()> for SmallCString { - | -------------- ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ - | | - | unsatisfied trait bound introduced here -help: consider giving this closure parameter an explicit type, where the value of const parameter `N` is specified - | -LL | SmallCString::try_from(p).map(|cstr: SmallCString| cstr); - | +++++++++++++++++ - -error[E0284]: type annotations needed for `SmallCString<_>` - --> $DIR/try-from-with-const-genericsrs-98299.rs:5:36 - | -LL | SmallCString::try_from(p).map(|cstr| cstr); - | ------------------------- ^^^^ - | | - | type must be known at this point - | -note: required for `SmallCString<_>` to implement `TryFrom<()>` - --> $DIR/try-from-with-const-genericsrs-98299.rs:13:22 - | -LL | impl TryFrom<()> for SmallCString { - | -------------- ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ - | | - | unsatisfied trait bound introduced here -help: consider giving this closure parameter an explicit type, where the value of const parameter `N` is specified - | -LL | SmallCString::try_from(p).map(|cstr: SmallCString| cstr); - | +++++++++++++++++ - -error: aborting due to 3 previous errors +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0284`. diff --git a/tests/ui/error-emitter/multiline-removal-suggestion.svg b/tests/ui/error-emitter/multiline-removal-suggestion.svg index 1e8621388510..39631e0e306d 100644 --- a/tests/ui/error-emitter/multiline-removal-suggestion.svg +++ b/tests/ui/error-emitter/multiline-removal-suggestion.svg @@ -1,4 +1,4 @@ - + ) { match d { + Defaultness::Implicit => (implicit(), None), Defaultness::Default(sp) => { (hir::Defaultness::Default { has_value }, Some(self.lower_span(sp))) } - Defaultness::Final => { - assert!(has_value); - (hir::Defaultness::Final, None) - } + Defaultness::Final(sp) => (hir::Defaultness::Final, Some(self.lower_span(sp))), } } diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs index eac7f03d8450..c902550ae1a6 100644 --- a/compiler/rustc_ast_passes/src/feature_gate.rs +++ b/compiler/rustc_ast_passes/src/feature_gate.rs @@ -583,6 +583,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) { gate_all!(frontmatter, "frontmatters are experimental"); gate_all!(coroutines, "coroutine syntax is experimental"); gate_all!(const_block_items, "const block items are experimental"); + gate_all!(final_associated_functions, "`final` on trait functions is experimental"); if !visitor.features.never_patterns() { if let Some(spans) = spans.get(&sym::never_patterns) { diff --git a/compiler/rustc_ast_pretty/src/pprust/state/item.rs b/compiler/rustc_ast_pretty/src/pprust/state/item.rs index c7f110a2e003..57e105010343 100644 --- a/compiler/rustc_ast_pretty/src/pprust/state/item.rs +++ b/compiler/rustc_ast_pretty/src/pprust/state/item.rs @@ -51,7 +51,7 @@ impl<'a> State<'a> { expr.as_deref(), vis, *safety, - ast::Defaultness::Final, + ast::Defaultness::Implicit, define_opaque.as_deref(), ), ast::ForeignItemKind::TyAlias(box ast::TyAlias { @@ -201,7 +201,7 @@ impl<'a> State<'a> { body.as_deref(), &item.vis, ast::Safety::Default, - ast::Defaultness::Final, + ast::Defaultness::Implicit, define_opaque.as_deref(), ); } diff --git a/compiler/rustc_builtin_macros/src/alloc_error_handler.rs b/compiler/rustc_builtin_macros/src/alloc_error_handler.rs index c87f1e41043d..5f78758513e1 100644 --- a/compiler/rustc_builtin_macros/src/alloc_error_handler.rs +++ b/compiler/rustc_builtin_macros/src/alloc_error_handler.rs @@ -83,7 +83,7 @@ fn generate_handler(cx: &ExtCtxt<'_>, handler: Ident, span: Span, sig_span: Span let body = Some(cx.block_expr(call)); let kind = ItemKind::Fn(Box::new(Fn { - defaultness: ast::Defaultness::Final, + defaultness: ast::Defaultness::Implicit, sig, ident: Ident::from_str_and_span(&global_fn_name(ALLOC_ERROR_HANDLER), span), generics: Generics::default(), diff --git a/compiler/rustc_builtin_macros/src/autodiff.rs b/compiler/rustc_builtin_macros/src/autodiff.rs index 95191b82ff3f..264f797a7825 100644 --- a/compiler/rustc_builtin_macros/src/autodiff.rs +++ b/compiler/rustc_builtin_macros/src/autodiff.rs @@ -334,7 +334,7 @@ mod llvm_enzyme { // The first element of it is the name of the function to be generated let d_fn = Box::new(ast::Fn { - defaultness: ast::Defaultness::Final, + defaultness: ast::Defaultness::Implicit, sig: d_sig, ident: first_ident(&meta_item_vec[0]), generics, diff --git a/compiler/rustc_builtin_macros/src/deriving/coerce_pointee.rs b/compiler/rustc_builtin_macros/src/deriving/coerce_pointee.rs index 8984e51c0844..1d9551f93a14 100644 --- a/compiler/rustc_builtin_macros/src/deriving/coerce_pointee.rs +++ b/compiler/rustc_builtin_macros/src/deriving/coerce_pointee.rs @@ -136,7 +136,7 @@ pub(crate) fn expand_deriving_coerce_pointee( of_trait: Some(Box::new(ast::TraitImplHeader { safety: ast::Safety::Default, polarity: ast::ImplPolarity::Positive, - defaultness: ast::Defaultness::Final, + defaultness: ast::Defaultness::Implicit, trait_ref, })), constness: ast::Const::No, @@ -159,7 +159,7 @@ pub(crate) fn expand_deriving_coerce_pointee( of_trait: Some(Box::new(ast::TraitImplHeader { safety: ast::Safety::Default, polarity: ast::ImplPolarity::Positive, - defaultness: ast::Defaultness::Final, + defaultness: ast::Defaultness::Implicit, trait_ref, })), constness: ast::Const::No, diff --git a/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs b/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs index 3fe5e89ef06d..5362bcde1aad 100644 --- a/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs +++ b/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs @@ -614,7 +614,7 @@ impl<'a> TraitDef<'a> { }, attrs: ast::AttrVec::new(), kind: ast::AssocItemKind::Type(Box::new(ast::TyAlias { - defaultness: ast::Defaultness::Final, + defaultness: ast::Defaultness::Implicit, ident, generics: Generics::default(), after_where_clause: ast::WhereClause::default(), @@ -851,7 +851,7 @@ impl<'a> TraitDef<'a> { of_trait: Some(Box::new(ast::TraitImplHeader { safety: self.safety, polarity: ast::ImplPolarity::Positive, - defaultness: ast::Defaultness::Final, + defaultness: ast::Defaultness::Implicit, trait_ref, })), constness: if self.is_const { ast::Const::Yes(DUMMY_SP) } else { ast::Const::No }, @@ -1073,7 +1073,7 @@ impl<'a> MethodDef<'a> { let trait_lo_sp = span.shrink_to_lo(); let sig = ast::FnSig { header: ast::FnHeader::default(), decl: fn_decl, span }; - let defaultness = ast::Defaultness::Final; + let defaultness = ast::Defaultness::Implicit; // Create the method. Box::new(ast::AssocItem { diff --git a/compiler/rustc_builtin_macros/src/global_allocator.rs b/compiler/rustc_builtin_macros/src/global_allocator.rs index 9e22d408c125..74c13f0fc2fb 100644 --- a/compiler/rustc_builtin_macros/src/global_allocator.rs +++ b/compiler/rustc_builtin_macros/src/global_allocator.rs @@ -77,7 +77,7 @@ impl AllocFnFactory<'_, '_> { let sig = FnSig { decl, header, span: self.span }; let body = Some(self.cx.block_expr(result)); let kind = ItemKind::Fn(Box::new(Fn { - defaultness: ast::Defaultness::Final, + defaultness: ast::Defaultness::Implicit, sig, ident: Ident::from_str_and_span(&global_fn_name(method.name), self.span), generics: Generics::default(), diff --git a/compiler/rustc_builtin_macros/src/test.rs b/compiler/rustc_builtin_macros/src/test.rs index a9718d53ac49..45d5daf91327 100644 --- a/compiler/rustc_builtin_macros/src/test.rs +++ b/compiler/rustc_builtin_macros/src/test.rs @@ -283,7 +283,7 @@ pub(crate) fn expand_test_or_bench( // const $ident: test::TestDescAndFn = ast::ItemKind::Const( ast::ConstItem { - defaultness: ast::Defaultness::Final, + defaultness: ast::Defaultness::Implicit, ident: Ident::new(fn_.ident.name, sp), generics: ast::Generics::default(), ty: cx.ty(sp, ast::TyKind::Path(None, test_path("TestDescAndFn"))), diff --git a/compiler/rustc_builtin_macros/src/test_harness.rs b/compiler/rustc_builtin_macros/src/test_harness.rs index 8d6969b0ca12..8b89d06c9ec6 100644 --- a/compiler/rustc_builtin_macros/src/test_harness.rs +++ b/compiler/rustc_builtin_macros/src/test_harness.rs @@ -329,7 +329,7 @@ fn mk_main(cx: &mut TestCtxt<'_>) -> Box { let decl = ecx.fn_decl(ThinVec::new(), ast::FnRetTy::Ty(main_ret_ty)); let sig = ast::FnSig { decl, header: ast::FnHeader::default(), span: sp }; - let defaultness = ast::Defaultness::Final; + let defaultness = ast::Defaultness::Implicit; // Honor the reexport_test_harness_main attribute let main_ident = match cx.reexport_test_harness_main { diff --git a/compiler/rustc_expand/src/build.rs b/compiler/rustc_expand/src/build.rs index 7320ee12abe3..19a2d65762e8 100644 --- a/compiler/rustc_expand/src/build.rs +++ b/compiler/rustc_expand/src/build.rs @@ -729,7 +729,7 @@ impl<'a> ExtCtxt<'a> { ty: Box, rhs_kind: ast::ConstItemRhsKind, ) -> Box { - let defaultness = ast::Defaultness::Final; + let defaultness = ast::Defaultness::Implicit; self.item( span, AttrVec::new(), diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index add09c3ea58b..9262b08f05e0 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -494,6 +494,8 @@ declare_features! ( (unstable, ffi_const, "1.45.0", Some(58328)), /// Allows the use of `#[ffi_pure]` on foreign functions. (unstable, ffi_pure, "1.45.0", Some(58329)), + /// Allows marking trait functions as `final` to prevent overriding impls + (unstable, final_associated_functions, "CURRENT_RUSTC_VERSION", Some(1)), /// Controlling the behavior of fmt::Debug (unstable, fmt_debug, "1.82.0", Some(129709)), /// Allows using `#[align(...)]` on function items diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index 6499f31bb935..05f6f7ba833f 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -3795,6 +3795,17 @@ pub(crate) struct RecoverImportAsUse { pub token_name: String, } +#[derive(Diagnostic)] +#[diag("{$article} {$descr} cannot be `final`")] +#[note("only associated functions in traits can be `final`")] +pub(crate) struct InappropriateFinal { + #[primary_span] + #[label("`final` because of this")] + pub span: Span, + pub article: &'static str, + pub descr: &'static str, +} + #[derive(Diagnostic)] #[diag("expected `::`, found `:`")] #[note("import paths are delimited using `::`")] diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index 5b81acb0f91f..ae25b82db761 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -206,14 +206,24 @@ impl<'a> Parser<'a> { }) } - /// Error in-case `default` was parsed in an in-appropriate context. + /// Error in-case `default`/`final` was parsed in an in-appropriate context. fn error_on_unconsumed_default(&self, def: Defaultness, kind: &ItemKind) { - if let Defaultness::Default(span) = def { - self.dcx().emit_err(errors::InappropriateDefault { - span, - article: kind.article(), - descr: kind.descr(), - }); + match def { + Defaultness::Default(span) => { + self.dcx().emit_err(errors::InappropriateDefault { + span, + article: kind.article(), + descr: kind.descr(), + }); + } + Defaultness::Final(span) => { + self.dcx().emit_err(errors::InappropriateFinal { + span, + article: kind.article(), + descr: kind.descr(), + }); + } + Defaultness::Implicit => (), } } @@ -229,8 +239,8 @@ impl<'a> Parser<'a> { fn_parse_mode: FnParseMode, case: Case, ) -> PResult<'a, Option> { - let check_pub = def == &Defaultness::Final; - let mut def_ = || mem::replace(def, Defaultness::Final); + let check_pub = def == &Defaultness::Implicit; + let mut def_ = || mem::replace(def, Defaultness::Implicit); let info = if !self.is_use_closure() && self.eat_keyword_case(exp!(Use), case) { self.parse_use_item()? @@ -1005,8 +1015,11 @@ impl<'a> Parser<'a> { { self.bump(); // `default` Defaultness::Default(self.prev_token_uninterpolated_span()) + } else if self.eat_keyword(exp!(Final)) { + self.psess.gated_spans.gate(sym::final_associated_functions, self.prev_token.span); + Defaultness::Final(self.prev_token_uninterpolated_span()) } else { - Defaultness::Final + Defaultness::Implicit } } @@ -1130,7 +1143,7 @@ impl<'a> Parser<'a> { }) => { self.dcx().emit_err(errors::AssociatedStaticItemNotAllowed { span }); AssocItemKind::Const(Box::new(ConstItem { - defaultness: Defaultness::Final, + defaultness: Defaultness::Implicit, ident, generics: Generics::default(), ty, diff --git a/compiler/rustc_parse/src/parser/token_type.rs b/compiler/rustc_parse/src/parser/token_type.rs index 567b1be5e5d9..2d1db430ac27 100644 --- a/compiler/rustc_parse/src/parser/token_type.rs +++ b/compiler/rustc_parse/src/parser/token_type.rs @@ -91,6 +91,7 @@ pub enum TokenType { KwElse, KwEnum, KwExtern, + KwFinal, KwFn, KwFor, KwGen, @@ -233,6 +234,7 @@ impl TokenType { KwExtern, KwFn, KwFor, + KwFinal, KwGen, KwIf, KwImpl, @@ -309,6 +311,7 @@ impl TokenType { TokenType::KwExtern => Some(kw::Extern), TokenType::KwFn => Some(kw::Fn), TokenType::KwFor => Some(kw::For), + TokenType::KwFinal => Some(kw::Final), TokenType::KwGen => Some(kw::Gen), TokenType::KwIf => Some(kw::If), TokenType::KwImpl => Some(kw::Impl), @@ -524,6 +527,7 @@ macro_rules! exp { (Extern) => { exp!(@kw, Extern, KwExtern) }; (Fn) => { exp!(@kw, Fn, KwFn) }; (For) => { exp!(@kw, For, KwFor) }; + (Final) => { exp!(@kw, Final, KwFinal) }; (Gen) => { exp!(@kw, Gen, KwGen) }; (If) => { exp!(@kw, If, KwIf) }; (Impl) => { exp!(@kw, Impl, KwImpl) }; diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index b9a9d8029d28..2cbaf64ff90b 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -1094,6 +1094,7 @@ symbols! { fields, file, file_options, + final_associated_functions, flags, float, float_to_int_unchecked, diff --git a/tests/ui/coroutine/gen_fn.none.stderr b/tests/ui/coroutine/gen_fn.none.stderr index 590210641aed..8a5f86541316 100644 --- a/tests/ui/coroutine/gen_fn.none.stderr +++ b/tests/ui/coroutine/gen_fn.none.stderr @@ -1,8 +1,8 @@ -error: expected one of `#`, `async`, `const`, `default`, `extern`, `fn`, `pub`, `safe`, `unsafe`, or `use`, found `gen` +error: expected one of `#`, `async`, `const`, `default`, `extern`, `final`, `fn`, `pub`, `safe`, `unsafe`, or `use`, found `gen` --> $DIR/gen_fn.rs:4:1 | LL | gen fn foo() {} - | ^^^ expected one of 10 possible tokens + | ^^^ expected one of 11 possible tokens error: aborting due to 1 previous error diff --git a/tests/ui/coroutine/gen_fn.rs b/tests/ui/coroutine/gen_fn.rs index 2f50d5db9acf..78301cd2832c 100644 --- a/tests/ui/coroutine/gen_fn.rs +++ b/tests/ui/coroutine/gen_fn.rs @@ -2,7 +2,7 @@ //@[e2024] edition: 2024 gen fn foo() {} -//[none]~^ ERROR: expected one of `#`, `async`, `const`, `default`, `extern`, `fn`, `pub`, `safe`, `unsafe`, or `use`, found `gen` +//[none]~^ ERROR: expected one of `#`, `async`, `const`, `default`, `extern`, `final`, `fn`, `pub`, `safe`, `unsafe`, or `use`, found `gen` //[e2024]~^^ ERROR: gen blocks are experimental fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-final-associated-functions.rs b/tests/ui/feature-gates/feature-gate-final-associated-functions.rs new file mode 100644 index 000000000000..bdac2710d58e --- /dev/null +++ b/tests/ui/feature-gates/feature-gate-final-associated-functions.rs @@ -0,0 +1,6 @@ +trait Foo { + final fn bar() {} + //~^ ERROR `final` on trait functions is experimental +} + +fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-final-associated-functions.stderr b/tests/ui/feature-gates/feature-gate-final-associated-functions.stderr new file mode 100644 index 000000000000..b3731acd1d90 --- /dev/null +++ b/tests/ui/feature-gates/feature-gate-final-associated-functions.stderr @@ -0,0 +1,13 @@ +error[E0658]: `final` on trait functions is experimental + --> $DIR/feature-gate-final-associated-functions.rs:2:5 + | +LL | final fn bar() {} + | ^^^^^ + | + = note: see issue #1 for more information + = help: add `#![feature(final_associated_functions)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/parser/duplicate-visibility.rs b/tests/ui/parser/duplicate-visibility.rs index f0ee60873da0..d35624981c74 100644 --- a/tests/ui/parser/duplicate-visibility.rs +++ b/tests/ui/parser/duplicate-visibility.rs @@ -2,8 +2,8 @@ fn main() {} extern "C" { //~ NOTE while parsing this item list starting here pub pub fn foo(); - //~^ ERROR expected one of `(`, `async`, `const`, `default`, `extern`, `fn`, `safe`, `unsafe`, or `use`, found keyword `pub` - //~| NOTE expected one of 9 possible tokens + //~^ ERROR expected one of `(`, `async`, `const`, `default`, `extern`, `final`, `fn`, `safe`, `unsafe`, or `use`, found keyword `pub` + //~| NOTE expected one of 10 possible tokens //~| HELP there is already a visibility modifier, remove one //~| NOTE explicit visibility first seen here } //~ NOTE the item list ends here diff --git a/tests/ui/parser/duplicate-visibility.stderr b/tests/ui/parser/duplicate-visibility.stderr index 0d1421ee7f4e..e00ebe6a8cf6 100644 --- a/tests/ui/parser/duplicate-visibility.stderr +++ b/tests/ui/parser/duplicate-visibility.stderr @@ -1,4 +1,4 @@ -error: expected one of `(`, `async`, `const`, `default`, `extern`, `fn`, `safe`, `unsafe`, or `use`, found keyword `pub` +error: expected one of `(`, `async`, `const`, `default`, `extern`, `final`, `fn`, `safe`, `unsafe`, or `use`, found keyword `pub` --> $DIR/duplicate-visibility.rs:4:9 | LL | extern "C" { @@ -6,7 +6,7 @@ LL | extern "C" { LL | pub pub fn foo(); | ^^^ | | - | expected one of 9 possible tokens + | expected one of 10 possible tokens | help: there is already a visibility modifier, remove one ... LL | } diff --git a/tests/ui/parser/misspelled-keywords/pub-fn.stderr b/tests/ui/parser/misspelled-keywords/pub-fn.stderr index 1123c652c0ee..9b895f32c91e 100644 --- a/tests/ui/parser/misspelled-keywords/pub-fn.stderr +++ b/tests/ui/parser/misspelled-keywords/pub-fn.stderr @@ -1,8 +1,8 @@ -error: expected one of `#`, `async`, `auto`, `const`, `default`, `enum`, `extern`, `fn`, `gen`, `impl`, `macro_rules`, `macro`, `mod`, `pub`, `safe`, `static`, `struct`, `trait`, `type`, `unsafe`, or `use`, found `puB` +error: expected one of `#`, `async`, `auto`, `const`, `default`, `enum`, `extern`, `final`, `fn`, `gen`, `impl`, `macro_rules`, `macro`, `mod`, `pub`, `safe`, `static`, `struct`, `trait`, `type`, `unsafe`, or `use`, found `puB` --> $DIR/pub-fn.rs:1:1 | LL | puB fn code() {} - | ^^^ expected one of 21 possible tokens + | ^^^ expected one of 22 possible tokens | help: write keyword `pub` in lowercase | diff --git a/tests/ui/traits/final/final-kw.gated.stderr b/tests/ui/traits/final/final-kw.gated.stderr new file mode 100644 index 000000000000..a7967ebf08e2 --- /dev/null +++ b/tests/ui/traits/final/final-kw.gated.stderr @@ -0,0 +1,13 @@ +error[E0658]: `final` on trait functions is experimental + --> $DIR/final-kw.rs:5:5 + | +LL | final fn foo() {} + | ^^^^^ + | + = note: see issue #1 for more information + = help: add `#![feature(final_associated_functions)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/traits/final/final-kw.rs b/tests/ui/traits/final/final-kw.rs new file mode 100644 index 000000000000..ed675dea6608 --- /dev/null +++ b/tests/ui/traits/final/final-kw.rs @@ -0,0 +1,9 @@ +//@ revisions: ungated gated + +#[cfg(ungated)] +trait Trait { + final fn foo() {} + //~^ ERROR `final` on trait functions is experimental +} + +fn main() {} diff --git a/tests/ui/traits/final/final-kw.ungated.stderr b/tests/ui/traits/final/final-kw.ungated.stderr new file mode 100644 index 000000000000..a7967ebf08e2 --- /dev/null +++ b/tests/ui/traits/final/final-kw.ungated.stderr @@ -0,0 +1,13 @@ +error[E0658]: `final` on trait functions is experimental + --> $DIR/final-kw.rs:5:5 + | +LL | final fn foo() {} + | ^^^^^ + | + = note: see issue #1 for more information + = help: add `#![feature(final_associated_functions)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0658`. From 460cda8c9583ad1a165c771b311afa66cd393882 Mon Sep 17 00:00:00 2001 From: mu001999 Date: Wed, 28 Jan 2026 21:45:38 +0800 Subject: [PATCH 116/265] Validate final usages in AST Co-authored-by: Michael Goulet --- .../rustc_ast_passes/src/ast_validation.rs | 78 +++++++-- compiler/rustc_ast_passes/src/errors.rs | 18 +++ tests/ui/traits/final/final-must-have-body.rs | 8 + .../traits/final/final-must-have-body.stderr | 10 ++ tests/ui/traits/final/positions.rs | 69 ++++++++ tests/ui/traits/final/positions.stderr | 151 ++++++++++++++++++ 6 files changed, 322 insertions(+), 12 deletions(-) create mode 100644 tests/ui/traits/final/final-must-have-body.rs create mode 100644 tests/ui/traits/final/final-must-have-body.stderr create mode 100644 tests/ui/traits/final/positions.rs create mode 100644 tests/ui/traits/final/positions.stderr diff --git a/compiler/rustc_ast_passes/src/ast_validation.rs b/compiler/rustc_ast_passes/src/ast_validation.rs index b9fb20b68971..8a93bd0466bc 100644 --- a/compiler/rustc_ast_passes/src/ast_validation.rs +++ b/compiler/rustc_ast_passes/src/ast_validation.rs @@ -65,6 +65,28 @@ impl TraitOrImpl { } } +enum AllowDefault { + Yes, + No, +} + +impl AllowDefault { + fn when(b: bool) -> Self { + if b { Self::Yes } else { Self::No } + } +} + +enum AllowFinal { + Yes, + No, +} + +impl AllowFinal { + fn when(b: bool) -> Self { + if b { Self::Yes } else { Self::No } + } +} + struct AstValidator<'a> { sess: &'a Session, features: &'a Features, @@ -563,10 +585,32 @@ impl<'a> AstValidator<'a> { } } - fn check_defaultness(&self, span: Span, defaultness: Defaultness) { - if let Defaultness::Default(def_span) = defaultness { - let span = self.sess.source_map().guess_head_span(span); - self.dcx().emit_err(errors::ForbiddenDefault { span, def_span }); + fn check_defaultness( + &self, + span: Span, + defaultness: Defaultness, + allow_default: AllowDefault, + allow_final: AllowFinal, + ) { + match defaultness { + Defaultness::Default(def_span) if matches!(allow_default, AllowDefault::No) => { + let span = self.sess.source_map().guess_head_span(span); + self.dcx().emit_err(errors::ForbiddenDefault { span, def_span }); + } + Defaultness::Final(def_span) if matches!(allow_final, AllowFinal::No) => { + let span = self.sess.source_map().guess_head_span(span); + self.dcx().emit_err(errors::ForbiddenFinal { span, def_span }); + } + _ => (), + } + } + + fn check_final_has_body(&self, item: &Item, defaultness: Defaultness) { + if let AssocItemKind::Fn(box Fn { body: None, .. }) = &item.kind + && let Defaultness::Final(def_span) = defaultness + { + let span = self.sess.source_map().guess_head_span(item.span); + self.dcx().emit_err(errors::ForbiddenFinalWithoutBody { span, def_span }); } } @@ -1192,7 +1236,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> { }, ) => { self.visit_attrs_vis_ident(&item.attrs, &item.vis, ident); - self.check_defaultness(item.span, *defaultness); + self.check_defaultness(item.span, *defaultness, AllowDefault::No, AllowFinal::No); for EiiImpl { eii_macro_path, .. } in eii_impls { self.visit_path(eii_macro_path); @@ -1362,7 +1406,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> { }); } ItemKind::Const(box ConstItem { defaultness, ident, rhs_kind, .. }) => { - self.check_defaultness(item.span, *defaultness); + self.check_defaultness(item.span, *defaultness, AllowDefault::No, AllowFinal::No); if !rhs_kind.has_expr() { self.dcx().emit_err(errors::ConstWithoutBody { span: item.span, @@ -1400,7 +1444,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> { ItemKind::TyAlias( ty_alias @ box TyAlias { defaultness, bounds, after_where_clause, ty, .. }, ) => { - self.check_defaultness(item.span, *defaultness); + self.check_defaultness(item.span, *defaultness, AllowDefault::No, AllowFinal::No); if ty.is_none() { self.dcx().emit_err(errors::TyAliasWithoutBody { span: item.span, @@ -1430,7 +1474,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> { fn visit_foreign_item(&mut self, fi: &'a ForeignItem) { match &fi.kind { ForeignItemKind::Fn(box Fn { defaultness, ident, sig, body, .. }) => { - self.check_defaultness(fi.span, *defaultness); + self.check_defaultness(fi.span, *defaultness, AllowDefault::No, AllowFinal::No); self.check_foreign_fn_bodyless(*ident, body.as_deref()); self.check_foreign_fn_headerless(sig.header); self.check_foreign_item_ascii_only(*ident); @@ -1450,7 +1494,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> { ty, .. }) => { - self.check_defaultness(fi.span, *defaultness); + self.check_defaultness(fi.span, *defaultness, AllowDefault::No, AllowFinal::No); self.check_foreign_kind_bodyless(*ident, "type", ty.as_ref().map(|b| b.span)); self.check_type_no_bounds(bounds, "`extern` blocks"); self.check_foreign_ty_genericless(generics, after_where_clause); @@ -1709,9 +1753,19 @@ impl<'a> Visitor<'a> for AstValidator<'a> { self.check_nomangle_item_asciionly(ident, item.span); } - if ctxt == AssocCtxt::Trait || self.outer_trait_or_trait_impl.is_none() { - self.check_defaultness(item.span, item.kind.defaultness()); - } + let defaultness = item.kind.defaultness(); + self.check_defaultness( + item.span, + defaultness, + // `default` is allowed on all associated items in impls. + AllowDefault::when(matches!(ctxt, AssocCtxt::Impl { .. })), + // `final` is allowed on all associated *functions* in traits. + AllowFinal::when( + ctxt == AssocCtxt::Trait && matches!(item.kind, AssocItemKind::Fn(..)), + ), + ); + + self.check_final_has_body(item, defaultness); if let AssocCtxt::Impl { .. } = ctxt { match &item.kind { diff --git a/compiler/rustc_ast_passes/src/errors.rs b/compiler/rustc_ast_passes/src/errors.rs index bda04129e579..ee5b1b6f3093 100644 --- a/compiler/rustc_ast_passes/src/errors.rs +++ b/compiler/rustc_ast_passes/src/errors.rs @@ -159,6 +159,24 @@ pub(crate) struct ForbiddenDefault { pub def_span: Span, } +#[derive(Diagnostic)] +#[diag("`final` is only allowed on associated functions in traits")] +pub(crate) struct ForbiddenFinal { + #[primary_span] + pub span: Span, + #[label("`final` because of this")] + pub def_span: Span, +} + +#[derive(Diagnostic)] +#[diag("`final` is only allowed on associated functions if they have a body")] +pub(crate) struct ForbiddenFinalWithoutBody { + #[primary_span] + pub span: Span, + #[label("`final` because of this")] + pub def_span: Span, +} + #[derive(Diagnostic)] #[diag("associated constant in `impl` without body")] pub(crate) struct AssocConstWithoutBody { diff --git a/tests/ui/traits/final/final-must-have-body.rs b/tests/ui/traits/final/final-must-have-body.rs new file mode 100644 index 000000000000..57ed26c3e78d --- /dev/null +++ b/tests/ui/traits/final/final-must-have-body.rs @@ -0,0 +1,8 @@ +#![feature(final_associated_functions)] + +trait Foo { + final fn method(); + //~^ ERROR `final` is only allowed on associated functions if they have a body +} + +fn main() {} diff --git a/tests/ui/traits/final/final-must-have-body.stderr b/tests/ui/traits/final/final-must-have-body.stderr new file mode 100644 index 000000000000..e4f1ffb701e8 --- /dev/null +++ b/tests/ui/traits/final/final-must-have-body.stderr @@ -0,0 +1,10 @@ +error: `final` is only allowed on associated functions if they have a body + --> $DIR/final-must-have-body.rs:4:5 + | +LL | final fn method(); + | -----^^^^^^^^^^^^^ + | | + | `final` because of this + +error: aborting due to 1 previous error + diff --git a/tests/ui/traits/final/positions.rs b/tests/ui/traits/final/positions.rs new file mode 100644 index 000000000000..01ce6ea4750f --- /dev/null +++ b/tests/ui/traits/final/positions.rs @@ -0,0 +1,69 @@ +#![feature(final_associated_functions)] + +// Just for exercising the syntax positions +#![feature(associated_type_defaults, extern_types, inherent_associated_types)] +#![allow(incomplete_features)] + +final struct Foo {} +//~^ ERROR a struct cannot be `final` + +final trait Trait { +//~^ ERROR a trait cannot be `final` + + final fn method() {} + // OK! + + final type Foo = (); + //~^ ERROR `final` is only allowed on associated functions in traits + + final const FOO: usize = 1; + //~^ ERROR `final` is only allowed on associated functions in traits +} + +final impl Foo { + final fn method() {} + //~^ ERROR `final` is only allowed on associated functions in traits + + final type Foo = (); + //~^ ERROR `final` is only allowed on associated functions in traits + + final const FOO: usize = 1; + //~^ ERROR `final` is only allowed on associated functions in traits +} + +final impl Trait for Foo { + final fn method() {} + //~^ ERROR `final` is only allowed on associated functions in traits + + final type Foo = (); + //~^ ERROR `final` is only allowed on associated functions in traits + + final const FOO: usize = 1; + //~^ ERROR `final` is only allowed on associated functions in traits +} + + +final fn foo() {} +//~^ ERROR `final` is only allowed on associated functions in traits + +final type FooTy = (); +//~^ ERROR `final` is only allowed on associated functions in traits + +final const FOO: usize = 0; +//~^ ERROR `final` is only allowed on associated functions in traits + +final unsafe extern "C" { +//~^ ERROR an extern block cannot be `final` + + final fn foo_extern(); + //~^ ERROR `final` is only allowed on associated functions in traits + + final type FooExtern; + //~^ ERROR `final` is only allowed on associated functions in traits + + final static FOO_EXTERN: usize = 0; + //~^ ERROR a static item cannot be `final` + //~| ERROR incorrect `static` inside `extern` block +} + +fn main() {} diff --git a/tests/ui/traits/final/positions.stderr b/tests/ui/traits/final/positions.stderr new file mode 100644 index 000000000000..0514f5e9f472 --- /dev/null +++ b/tests/ui/traits/final/positions.stderr @@ -0,0 +1,151 @@ +error: a struct cannot be `final` + --> $DIR/positions.rs:7:1 + | +LL | final struct Foo {} + | ^^^^^ `final` because of this + | + = note: only associated functions in traits can be `final` + +error: a trait cannot be `final` + --> $DIR/positions.rs:10:1 + | +LL | final trait Trait { + | ^^^^^ `final` because of this + | + = note: only associated functions in traits can be `final` + +error: a static item cannot be `final` + --> $DIR/positions.rs:64:5 + | +LL | final static FOO_EXTERN: usize = 0; + | ^^^^^ `final` because of this + | + = note: only associated functions in traits can be `final` + +error: an extern block cannot be `final` + --> $DIR/positions.rs:55:1 + | +LL | final unsafe extern "C" { + | ^^^^^ `final` because of this + | + = note: only associated functions in traits can be `final` + +error: `final` is only allowed on associated functions in traits + --> $DIR/positions.rs:16:5 + | +LL | final type Foo = (); + | -----^^^^^^^^^^^^^^^ + | | + | `final` because of this + +error: `final` is only allowed on associated functions in traits + --> $DIR/positions.rs:19:5 + | +LL | final const FOO: usize = 1; + | -----^^^^^^^^^^^^^^^^^^^^^^ + | | + | `final` because of this + +error: `final` is only allowed on associated functions in traits + --> $DIR/positions.rs:24:5 + | +LL | final fn method() {} + | -----^^^^^^^^^^^^ + | | + | `final` because of this + +error: `final` is only allowed on associated functions in traits + --> $DIR/positions.rs:27:5 + | +LL | final type Foo = (); + | -----^^^^^^^^^^^^^^^ + | | + | `final` because of this + +error: `final` is only allowed on associated functions in traits + --> $DIR/positions.rs:30:5 + | +LL | final const FOO: usize = 1; + | -----^^^^^^^^^^^^^^^^^^^^^^ + | | + | `final` because of this + +error: `final` is only allowed on associated functions in traits + --> $DIR/positions.rs:35:5 + | +LL | final fn method() {} + | -----^^^^^^^^^^^^ + | | + | `final` because of this + +error: `final` is only allowed on associated functions in traits + --> $DIR/positions.rs:38:5 + | +LL | final type Foo = (); + | -----^^^^^^^^^^^^^^^ + | | + | `final` because of this + +error: `final` is only allowed on associated functions in traits + --> $DIR/positions.rs:41:5 + | +LL | final const FOO: usize = 1; + | -----^^^^^^^^^^^^^^^^^^^^^^ + | | + | `final` because of this + +error: `final` is only allowed on associated functions in traits + --> $DIR/positions.rs:46:1 + | +LL | final fn foo() {} + | -----^^^^^^^^^ + | | + | `final` because of this + +error: `final` is only allowed on associated functions in traits + --> $DIR/positions.rs:49:1 + | +LL | final type FooTy = (); + | -----^^^^^^^^^^^^^^^^^ + | | + | `final` because of this + +error: `final` is only allowed on associated functions in traits + --> $DIR/positions.rs:52:1 + | +LL | final const FOO: usize = 0; + | -----^^^^^^^^^^^^^^^^^^^^^^ + | | + | `final` because of this + +error: `final` is only allowed on associated functions in traits + --> $DIR/positions.rs:58:5 + | +LL | final fn foo_extern(); + | -----^^^^^^^^^^^^^^^^^ + | | + | `final` because of this + +error: `final` is only allowed on associated functions in traits + --> $DIR/positions.rs:61:5 + | +LL | final type FooExtern; + | -----^^^^^^^^^^^^^^^^ + | | + | `final` because of this + +error: incorrect `static` inside `extern` block + --> $DIR/positions.rs:64:18 + | +LL | final unsafe extern "C" { + | ----------------------- `extern` blocks define existing foreign statics and statics inside of them cannot have a body +... +LL | final static FOO_EXTERN: usize = 0; + | ^^^^^^^^^^ - the invalid body + | | + | cannot have a body + | + = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html + +error: aborting due to 18 previous errors + From 3572d482a0ddd0b5bd91deb18e618ff254dee3cb Mon Sep 17 00:00:00 2001 From: mu001999 Date: Wed, 28 Jan 2026 21:59:42 +0800 Subject: [PATCH 117/265] Validate no override impl definitions Co-authored-by: Michael Goulet --- .../rustc_hir_analysis/src/check/check.rs | 26 ++++++++- compiler/rustc_hir_analysis/src/check/mod.rs | 12 ---- compiler/rustc_hir_analysis/src/errors.rs | 10 ++++ tests/ui/traits/final/overriding.rs | 12 ++++ tests/ui/traits/final/overriding.stderr | 14 +++++ tests/ui/traits/final/positions.rs | 3 + tests/ui/traits/final/positions.stderr | 58 +++++++++++++++---- tests/ui/traits/final/works.rs | 13 +++++ 8 files changed, 124 insertions(+), 24 deletions(-) create mode 100644 tests/ui/traits/final/overriding.rs create mode 100644 tests/ui/traits/final/overriding.stderr create mode 100644 tests/ui/traits/final/works.rs diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs index 1bee7a72229a..5f22dce29dc6 100644 --- a/compiler/rustc_hir_analysis/src/check/check.rs +++ b/compiler/rustc_hir_analysis/src/check/check.rs @@ -1175,13 +1175,35 @@ pub(super) fn check_specialization_validity<'tcx>( if let Err(parent_impl) = result { if !tcx.is_impl_trait_in_trait(impl_item) { - report_forbidden_specialization(tcx, impl_item, parent_impl); + let span = tcx.def_span(impl_item); + let ident = tcx.item_ident(impl_item); + + let err = match tcx.span_of_impl(parent_impl) { + Ok(sp) => errors::ImplNotMarkedDefault::Ok { span, ident, ok_label: sp }, + Err(cname) => errors::ImplNotMarkedDefault::Err { span, ident, cname }, + }; + + tcx.dcx().emit_err(err); } else { tcx.dcx().delayed_bug(format!("parent item: {parent_impl:?} not marked as default")); } } } +fn check_overriding_final_trait_item<'tcx>( + tcx: TyCtxt<'tcx>, + trait_item: ty::AssocItem, + impl_item: ty::AssocItem, +) { + if trait_item.defaultness(tcx).is_final() { + tcx.dcx().emit_err(errors::OverridingFinalTraitFunction { + impl_span: tcx.def_span(impl_item.def_id), + trait_span: tcx.def_span(trait_item.def_id), + ident: tcx.item_ident(impl_item.def_id), + }); + } +} + fn check_impl_items_against_trait<'tcx>( tcx: TyCtxt<'tcx>, impl_id: LocalDefId, @@ -1259,6 +1281,8 @@ fn check_impl_items_against_trait<'tcx>( impl_id.to_def_id(), impl_item, ); + + check_overriding_final_trait_item(tcx, ty_trait_item, ty_impl_item); } if let Ok(ancestors) = trait_def.ancestors(tcx, impl_id.to_def_id()) { diff --git a/compiler/rustc_hir_analysis/src/check/mod.rs b/compiler/rustc_hir_analysis/src/check/mod.rs index d6ae14a7acfe..074501b8ebe4 100644 --- a/compiler/rustc_hir_analysis/src/check/mod.rs +++ b/compiler/rustc_hir_analysis/src/check/mod.rs @@ -197,18 +197,6 @@ pub(super) fn maybe_check_static_with_link_section(tcx: TyCtxt<'_>, id: LocalDef } } -fn report_forbidden_specialization(tcx: TyCtxt<'_>, impl_item: DefId, parent_impl: DefId) { - let span = tcx.def_span(impl_item); - let ident = tcx.item_ident(impl_item); - - let err = match tcx.span_of_impl(parent_impl) { - Ok(sp) => errors::ImplNotMarkedDefault::Ok { span, ident, ok_label: sp }, - Err(cname) => errors::ImplNotMarkedDefault::Err { span, ident, cname }, - }; - - tcx.dcx().emit_err(err); -} - fn missing_items_err( tcx: TyCtxt<'_>, impl_def_id: LocalDefId, diff --git a/compiler/rustc_hir_analysis/src/errors.rs b/compiler/rustc_hir_analysis/src/errors.rs index 6a23b42ae098..4144f3eb95e7 100644 --- a/compiler/rustc_hir_analysis/src/errors.rs +++ b/compiler/rustc_hir_analysis/src/errors.rs @@ -892,6 +892,16 @@ pub(crate) enum ImplNotMarkedDefault { #[diag("this item cannot be used as its where bounds are not satisfied for the `Self` type")] pub(crate) struct UselessImplItem; +#[derive(Diagnostic)] +#[diag("cannot override `{$ident}` because it already has a `final` definition in the trait")] +pub(crate) struct OverridingFinalTraitFunction { + #[primary_span] + pub impl_span: Span, + #[note("`{$ident}` is marked final here")] + pub trait_span: Span, + pub ident: Ident, +} + #[derive(Diagnostic)] #[diag("not all trait items implemented, missing: `{$missing_items_msg}`", code = E0046)] pub(crate) struct MissingTraitItem { diff --git a/tests/ui/traits/final/overriding.rs b/tests/ui/traits/final/overriding.rs new file mode 100644 index 000000000000..f91451852ff0 --- /dev/null +++ b/tests/ui/traits/final/overriding.rs @@ -0,0 +1,12 @@ +#![feature(final_associated_functions)] + +trait Foo { + final fn method() {} +} + +impl Foo for () { + fn method() {} + //~^ ERROR cannot override `method` because it already has a `final` definition in the trait +} + +fn main() {} diff --git a/tests/ui/traits/final/overriding.stderr b/tests/ui/traits/final/overriding.stderr new file mode 100644 index 000000000000..b5598565072f --- /dev/null +++ b/tests/ui/traits/final/overriding.stderr @@ -0,0 +1,14 @@ +error: cannot override `method` because it already has a `final` definition in the trait + --> $DIR/overriding.rs:8:5 + | +LL | fn method() {} + | ^^^^^^^^^^^ + | +note: `method` is marked final here + --> $DIR/overriding.rs:4:5 + | +LL | final fn method() {} + | ^^^^^^^^^^^^^^^^^ + +error: aborting due to 1 previous error + diff --git a/tests/ui/traits/final/positions.rs b/tests/ui/traits/final/positions.rs index 01ce6ea4750f..9bf659e12431 100644 --- a/tests/ui/traits/final/positions.rs +++ b/tests/ui/traits/final/positions.rs @@ -34,12 +34,15 @@ final impl Foo { final impl Trait for Foo { final fn method() {} //~^ ERROR `final` is only allowed on associated functions in traits + //~^^ ERROR cannot override `method` because it already has a `final` definition in the trait final type Foo = (); //~^ ERROR `final` is only allowed on associated functions in traits + //~^^ ERROR cannot override `Foo` because it already has a `final` definition in the trait final const FOO: usize = 1; //~^ ERROR `final` is only allowed on associated functions in traits + //~^^ ERROR cannot override `FOO` because it already has a `final` definition in the trait } diff --git a/tests/ui/traits/final/positions.stderr b/tests/ui/traits/final/positions.stderr index 0514f5e9f472..bcb300e49d1a 100644 --- a/tests/ui/traits/final/positions.stderr +++ b/tests/ui/traits/final/positions.stderr @@ -15,7 +15,7 @@ LL | final trait Trait { = note: only associated functions in traits can be `final` error: a static item cannot be `final` - --> $DIR/positions.rs:64:5 + --> $DIR/positions.rs:67:5 | LL | final static FOO_EXTERN: usize = 0; | ^^^^^ `final` because of this @@ -23,7 +23,7 @@ LL | final static FOO_EXTERN: usize = 0; = note: only associated functions in traits can be `final` error: an extern block cannot be `final` - --> $DIR/positions.rs:55:1 + --> $DIR/positions.rs:58:1 | LL | final unsafe extern "C" { | ^^^^^ `final` because of this @@ -79,7 +79,7 @@ LL | final fn method() {} | `final` because of this error: `final` is only allowed on associated functions in traits - --> $DIR/positions.rs:38:5 + --> $DIR/positions.rs:39:5 | LL | final type Foo = (); | -----^^^^^^^^^^^^^^^ @@ -87,7 +87,7 @@ LL | final type Foo = (); | `final` because of this error: `final` is only allowed on associated functions in traits - --> $DIR/positions.rs:41:5 + --> $DIR/positions.rs:43:5 | LL | final const FOO: usize = 1; | -----^^^^^^^^^^^^^^^^^^^^^^ @@ -95,7 +95,7 @@ LL | final const FOO: usize = 1; | `final` because of this error: `final` is only allowed on associated functions in traits - --> $DIR/positions.rs:46:1 + --> $DIR/positions.rs:49:1 | LL | final fn foo() {} | -----^^^^^^^^^ @@ -103,7 +103,7 @@ LL | final fn foo() {} | `final` because of this error: `final` is only allowed on associated functions in traits - --> $DIR/positions.rs:49:1 + --> $DIR/positions.rs:52:1 | LL | final type FooTy = (); | -----^^^^^^^^^^^^^^^^^ @@ -111,7 +111,7 @@ LL | final type FooTy = (); | `final` because of this error: `final` is only allowed on associated functions in traits - --> $DIR/positions.rs:52:1 + --> $DIR/positions.rs:55:1 | LL | final const FOO: usize = 0; | -----^^^^^^^^^^^^^^^^^^^^^^ @@ -119,7 +119,7 @@ LL | final const FOO: usize = 0; | `final` because of this error: `final` is only allowed on associated functions in traits - --> $DIR/positions.rs:58:5 + --> $DIR/positions.rs:61:5 | LL | final fn foo_extern(); | -----^^^^^^^^^^^^^^^^^ @@ -127,7 +127,7 @@ LL | final fn foo_extern(); | `final` because of this error: `final` is only allowed on associated functions in traits - --> $DIR/positions.rs:61:5 + --> $DIR/positions.rs:64:5 | LL | final type FooExtern; | -----^^^^^^^^^^^^^^^^ @@ -135,7 +135,7 @@ LL | final type FooExtern; | `final` because of this error: incorrect `static` inside `extern` block - --> $DIR/positions.rs:64:18 + --> $DIR/positions.rs:67:18 | LL | final unsafe extern "C" { | ----------------------- `extern` blocks define existing foreign statics and statics inside of them cannot have a body @@ -147,5 +147,41 @@ LL | final static FOO_EXTERN: usize = 0; | = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html -error: aborting due to 18 previous errors +error: cannot override `method` because it already has a `final` definition in the trait + --> $DIR/positions.rs:35:5 + | +LL | final fn method() {} + | ^^^^^^^^^^^^^^^^^ + | +note: `method` is marked final here + --> $DIR/positions.rs:13:5 + | +LL | final fn method() {} + | ^^^^^^^^^^^^^^^^^ + +error: cannot override `Foo` because it already has a `final` definition in the trait + --> $DIR/positions.rs:39:5 + | +LL | final type Foo = (); + | ^^^^^^^^^^^^^^ + | +note: `Foo` is marked final here + --> $DIR/positions.rs:16:5 + | +LL | final type Foo = (); + | ^^^^^^^^^^^^^^ + +error: cannot override `FOO` because it already has a `final` definition in the trait + --> $DIR/positions.rs:43:5 + | +LL | final const FOO: usize = 1; + | ^^^^^^^^^^^^^^^^^^^^^^ + | +note: `FOO` is marked final here + --> $DIR/positions.rs:19:5 + | +LL | final const FOO: usize = 1; + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 21 previous errors diff --git a/tests/ui/traits/final/works.rs b/tests/ui/traits/final/works.rs new file mode 100644 index 000000000000..e756521701a4 --- /dev/null +++ b/tests/ui/traits/final/works.rs @@ -0,0 +1,13 @@ +//@ check-pass + +#![feature(final_associated_functions)] + +trait Foo { + final fn bar(&self) {} +} + +impl Foo for () {} + +fn main() { + ().bar(); +} From f0e1c8f416f45225db02355fb4969c6e3ade9ddb Mon Sep 17 00:00:00 2001 From: mu001999 Date: Wed, 28 Jan 2026 22:12:13 +0800 Subject: [PATCH 118/265] Fix rustfmt Co-authored-by: Michael Goulet --- src/tools/rustfmt/src/items.rs | 12 ++++++------ src/tools/rustfmt/src/utils.rs | 3 ++- src/tools/rustfmt/src/visitor.rs | 20 ++++++++++++++++++-- src/tools/rustfmt/tests/target/final-kw.rs | 5 +++++ 4 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 src/tools/rustfmt/tests/target/final-kw.rs diff --git a/src/tools/rustfmt/src/items.rs b/src/tools/rustfmt/src/items.rs index 1aa85ce2ce55..90466b0b1110 100644 --- a/src/tools/rustfmt/src/items.rs +++ b/src/tools/rustfmt/src/items.rs @@ -319,12 +319,13 @@ impl<'a> FnSig<'a> { method_sig: &'a ast::FnSig, generics: &'a ast::Generics, visibility: &'a ast::Visibility, + defaultness: ast::Defaultness, ) -> FnSig<'a> { FnSig { safety: method_sig.header.safety, coroutine_kind: Cow::Borrowed(&method_sig.header.coroutine_kind), constness: method_sig.header.constness, - defaultness: ast::Defaultness::Final, + defaultness, ext: method_sig.header.ext, decl: &*method_sig.decl, generics, @@ -339,9 +340,7 @@ impl<'a> FnSig<'a> { ) -> FnSig<'a> { match *fn_kind { visit::FnKind::Fn(visit::FnCtxt::Assoc(..), vis, ast::Fn { sig, generics, .. }) => { - let mut fn_sig = FnSig::from_method_sig(sig, generics, vis); - fn_sig.defaultness = defaultness; - fn_sig + FnSig::from_method_sig(sig, generics, vis, defaultness) } visit::FnKind::Fn(_, vis, ast::Fn { sig, generics, .. }) => FnSig { decl, @@ -459,6 +458,7 @@ impl<'a> FmtVisitor<'a> { sig: &ast::FnSig, vis: &ast::Visibility, generics: &ast::Generics, + defaultness: ast::Defaultness, span: Span, ) -> RewriteResult { // Drop semicolon or it will be interpreted as comment. @@ -469,7 +469,7 @@ impl<'a> FmtVisitor<'a> { &context, indent, ident, - &FnSig::from_method_sig(sig, generics, vis), + &FnSig::from_method_sig(sig, generics, vis, defaultness), span, FnBraceStyle::None, )?; @@ -3495,7 +3495,7 @@ impl Rewrite for ast::ForeignItem { context, shape.indent, ident, - &FnSig::from_method_sig(sig, generics, &self.vis), + &FnSig::from_method_sig(sig, generics, &self.vis, defaultness), span, FnBraceStyle::None, ) diff --git a/src/tools/rustfmt/src/utils.rs b/src/tools/rustfmt/src/utils.rs index 3a2975024a33..b676803379f7 100644 --- a/src/tools/rustfmt/src/utils.rs +++ b/src/tools/rustfmt/src/utils.rs @@ -102,8 +102,9 @@ pub(crate) fn format_constness_right(constness: ast::Const) -> &'static str { #[inline] pub(crate) fn format_defaultness(defaultness: ast::Defaultness) -> &'static str { match defaultness { + ast::Defaultness::Implicit => "", ast::Defaultness::Default(..) => "default ", - ast::Defaultness::Final => "", + ast::Defaultness::Final(..) => "final ", } } diff --git a/src/tools/rustfmt/src/visitor.rs b/src/tools/rustfmt/src/visitor.rs index 8abcba121e58..742caefc7cc5 100644 --- a/src/tools/rustfmt/src/visitor.rs +++ b/src/tools/rustfmt/src/visitor.rs @@ -583,7 +583,15 @@ impl<'b, 'a: 'b> FmtVisitor<'a> { } else { let indent = self.block_indent; let rewrite = self - .rewrite_required_fn(indent, ident, sig, &item.vis, generics, item.span) + .rewrite_required_fn( + indent, + ident, + sig, + &item.vis, + generics, + defaultness, + item.span, + ) .ok(); self.push_rewrite(item.span, rewrite); } @@ -686,7 +694,15 @@ impl<'b, 'a: 'b> FmtVisitor<'a> { } else { let indent = self.block_indent; let rewrite = self - .rewrite_required_fn(indent, fn_kind.ident, sig, &ai.vis, generics, ai.span) + .rewrite_required_fn( + indent, + fn_kind.ident, + sig, + &ai.vis, + generics, + defaultness, + ai.span, + ) .ok(); self.push_rewrite(ai.span, rewrite); } diff --git a/src/tools/rustfmt/tests/target/final-kw.rs b/src/tools/rustfmt/tests/target/final-kw.rs new file mode 100644 index 000000000000..d68b6908d76a --- /dev/null +++ b/src/tools/rustfmt/tests/target/final-kw.rs @@ -0,0 +1,5 @@ +trait Foo { + final fn final_() {} + + fn not_final() {} +} From f0a019bf9036fa9f14e7cee662d2c01dcbc6f6d2 Mon Sep 17 00:00:00 2001 From: mu001999 Date: Wed, 28 Jan 2026 22:44:01 +0800 Subject: [PATCH 119/265] Render final associated functions correctly in rustdoc Co-authored-by: Michael Goulet --- src/librustdoc/clean/mod.rs | 24 ++++++------ src/librustdoc/clean/types.rs | 43 +++++++++++++++++----- src/librustdoc/fold.rs | 4 +- src/librustdoc/html/format.rs | 4 -- src/librustdoc/html/render/mod.rs | 22 +++++++---- src/librustdoc/html/render/search_index.rs | 2 +- src/librustdoc/json/conversions.rs | 2 +- src/librustdoc/visit.rs | 4 +- tests/rustdoc-html/final-trait-method.rs | 22 +++++++++++ 9 files changed, 88 insertions(+), 39 deletions(-) create mode 100644 tests/rustdoc-html/final-trait-method.rs diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index c09e17d3787e..18f991ad43aa 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -1222,11 +1222,11 @@ fn clean_trait_item<'tcx>(trait_item: &hir::TraitItem<'tcx>, cx: &mut DocContext } hir::TraitItemKind::Fn(ref sig, hir::TraitFn::Provided(body)) => { let m = clean_function(cx, sig, trait_item.generics, ParamsSrc::Body(body)); - MethodItem(m, None) + MethodItem(m, Defaultness::from_trait_item(trait_item.defaultness)) } hir::TraitItemKind::Fn(ref sig, hir::TraitFn::Required(idents)) => { let m = clean_function(cx, sig, trait_item.generics, ParamsSrc::Idents(idents)); - RequiredMethodItem(m) + RequiredMethodItem(m, Defaultness::from_trait_item(trait_item.defaultness)) } hir::TraitItemKind::Type(bounds, Some(default)) => { let generics = enter_impl_trait(cx, |cx| clean_generics(trait_item.generics, cx)); @@ -1271,7 +1271,7 @@ pub(crate) fn clean_impl_item<'tcx>( hir::ImplItemImplKind::Inherent { .. } => hir::Defaultness::Final, hir::ImplItemImplKind::Trait { defaultness, .. } => defaultness, }; - MethodItem(m, Some(defaultness)) + MethodItem(m, Defaultness::from_impl_item(defaultness)) } hir::ImplItemKind::Type(hir_ty) => { let type_ = clean_ty(hir_ty, cx); @@ -1353,18 +1353,20 @@ pub(crate) fn clean_middle_assoc_item(assoc_item: &ty::AssocItem, cx: &mut DocCo } } - let provided = match assoc_item.container { - ty::AssocContainer::InherentImpl | ty::AssocContainer::TraitImpl(_) => true, - ty::AssocContainer::Trait => assoc_item.defaultness(tcx).has_value(), + let defaultness = assoc_item.defaultness(tcx); + let (provided, defaultness) = match assoc_item.container { + ty::AssocContainer::Trait => { + (defaultness.has_value(), Defaultness::from_trait_item(defaultness)) + } + ty::AssocContainer::InherentImpl | ty::AssocContainer::TraitImpl(_) => { + (true, Defaultness::from_impl_item(defaultness)) + } }; + if provided { - let defaultness = match assoc_item.container { - ty::AssocContainer::TraitImpl(_) => Some(assoc_item.defaultness(tcx)), - ty::AssocContainer::InherentImpl | ty::AssocContainer::Trait => None, - }; MethodItem(item, defaultness) } else { - RequiredMethodItem(item) + RequiredMethodItem(item, defaultness) } } ty::AssocKind::Type { .. } => { diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index c145929534d9..47a1199e7fe4 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -61,6 +61,29 @@ pub(crate) enum ItemId { Blanket { impl_id: DefId, for_: DefId }, } +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub(crate) enum Defaultness { + Implicit, + Default, + Final, +} + +impl Defaultness { + pub(crate) fn from_trait_item(defaultness: hir::Defaultness) -> Self { + match defaultness { + hir::Defaultness::Default { .. } => Self::Implicit, + hir::Defaultness::Final => Self::Final, + } + } + + pub(crate) fn from_impl_item(defaultness: hir::Defaultness) -> Self { + match defaultness { + hir::Defaultness::Default { .. } => Self::Default, + hir::Defaultness::Final => Self::Implicit, + } + } +} + impl ItemId { #[inline] pub(crate) fn is_local(self) -> bool { @@ -703,12 +726,12 @@ impl Item { ItemType::from(self) } - pub(crate) fn is_default(&self) -> bool { + pub(crate) fn defaultness(&self) -> Option { match self.kind { - ItemKind::MethodItem(_, Some(defaultness)) => { - defaultness.has_value() && !defaultness.is_final() + ItemKind::MethodItem(_, defaultness) | ItemKind::RequiredMethodItem(_, defaultness) => { + Some(defaultness) } - _ => false, + _ => None, } } @@ -770,8 +793,8 @@ impl Item { } } ItemKind::FunctionItem(_) - | ItemKind::MethodItem(_, _) - | ItemKind::RequiredMethodItem(_) => { + | ItemKind::MethodItem(..) + | ItemKind::RequiredMethodItem(..) => { let def_id = self.def_id().unwrap(); build_fn_header(def_id, tcx, tcx.asyncness(def_id)) } @@ -855,11 +878,11 @@ pub(crate) enum ItemKind { TraitAliasItem(TraitAlias), ImplItem(Box), /// A required method in a trait declaration meaning it's only a function signature. - RequiredMethodItem(Box), + RequiredMethodItem(Box, Defaultness), /// A method in a trait impl or a provided method in a trait declaration. /// /// Compared to [RequiredMethodItem], it also contains a method body. - MethodItem(Box, Option), + MethodItem(Box, Defaultness), StructFieldItem(Type), VariantItem(Variant), /// `fn`s from an extern block @@ -917,8 +940,8 @@ impl ItemKind { | StaticItem(_) | ConstantItem(_) | TraitAliasItem(_) - | RequiredMethodItem(_) - | MethodItem(_, _) + | RequiredMethodItem(..) + | MethodItem(..) | StructFieldItem(_) | ForeignFunctionItem(_, _) | ForeignStaticItem(_, _) diff --git a/src/librustdoc/fold.rs b/src/librustdoc/fold.rs index ee5f260615db..c970fdbbc93a 100644 --- a/src/librustdoc/fold.rs +++ b/src/librustdoc/fold.rs @@ -82,8 +82,8 @@ pub(crate) trait DocFolder: Sized { | StaticItem(_) | ConstantItem(..) | TraitAliasItem(_) - | RequiredMethodItem(_) - | MethodItem(_, _) + | RequiredMethodItem(..) + | MethodItem(..) | StructFieldItem(_) | ForeignFunctionItem(..) | ForeignStaticItem(..) diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index f38a21bd1ff3..7646375cbf7a 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -1566,10 +1566,6 @@ pub(crate) fn print_abi_with_space(abi: ExternAbi) -> impl Display { }) } -pub(crate) fn print_default_space(v: bool) -> &'static str { - if v { "default " } else { "" } -} - fn print_generic_arg(generic_arg: &clean::GenericArg, cx: &Context<'_>) -> impl Display { fmt::from_fn(move |f| match generic_arg { clean::GenericArg::Lifetime(lt) => f.write_str(print_lifetime(lt)), diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 86e8167dc3cd..c03a3e8980e1 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -66,7 +66,7 @@ use tracing::{debug, info}; pub(crate) use self::context::*; pub(crate) use self::span_map::{LinkFromSrc, collect_spans_and_sources}; pub(crate) use self::write_shared::*; -use crate::clean::{self, ItemId, RenderedLink}; +use crate::clean::{self, Defaultness, ItemId, RenderedLink}; use crate::display::{Joined as _, MaybeDisplay as _}; use crate::error::Error; use crate::formats::Impl; @@ -75,8 +75,8 @@ use crate::formats::item_type::ItemType; use crate::html::escape::Escape; use crate::html::format::{ Ending, HrefError, HrefInfo, PrintWithSpace, full_print_fn_decl, href, print_abi_with_space, - print_constness_with_space, print_default_space, print_generic_bounds, print_generics, - print_impl, print_path, print_type, print_where_clause, visibility_print_with_space, + print_constness_with_space, print_generic_bounds, print_generics, print_impl, print_path, + print_type, print_where_clause, visibility_print_with_space, }; use crate::html::markdown::{ HeadingOffset, IdMap, Markdown, MarkdownItemInfo, MarkdownSummaryLine, @@ -1109,7 +1109,11 @@ fn assoc_method( let header = meth.fn_header(tcx).expect("Trying to get header from a non-function item"); let name = meth.name.as_ref().unwrap(); let vis = visibility_print_with_space(meth, cx).to_string(); - let defaultness = print_default_space(meth.is_default()); + let defaultness = match meth.defaultness().expect("Expected assoc method to have defaultness") { + Defaultness::Implicit => "", + Defaultness::Final => "final ", + Defaultness::Default => "default ", + }; // FIXME: Once https://github.com/rust-lang/rust/issues/143874 is implemented, we can remove // this condition. let constness = match render_mode { @@ -1260,7 +1264,7 @@ fn render_assoc_item( ) -> impl fmt::Display { fmt::from_fn(move |f| match &item.kind { clean::StrippedItem(..) => Ok(()), - clean::RequiredMethodItem(m) | clean::MethodItem(m, _) => { + clean::RequiredMethodItem(m, _) | clean::MethodItem(m, _) => { assoc_method(item, &m.generics, &m.decl, link, parent, cx, render_mode).fmt(f) } clean::RequiredAssocConstItem(generics, ty) => assoc_const( @@ -1585,7 +1589,7 @@ fn render_deref_methods( fn should_render_item(item: &clean::Item, deref_mut_: bool, tcx: TyCtxt<'_>) -> bool { let self_type_opt = match item.kind { clean::MethodItem(ref method, _) => method.decl.receiver_type(), - clean::RequiredMethodItem(ref method) => method.decl.receiver_type(), + clean::RequiredMethodItem(ref method, _) => method.decl.receiver_type(), _ => None, }; @@ -1855,7 +1859,7 @@ fn render_impl( deprecation_class = ""; } match &item.kind { - clean::MethodItem(..) | clean::RequiredMethodItem(_) => { + clean::MethodItem(..) | clean::RequiredMethodItem(..) => { // Only render when the method is not static or we allow static methods if render_method_item { let id = cx.derive_id(format!("{item_type}.{name}")); @@ -2033,7 +2037,9 @@ fn render_impl( if !impl_.is_negative_trait_impl() { for impl_item in &impl_.items { match impl_item.kind { - clean::MethodItem(..) | clean::RequiredMethodItem(_) => methods.push(impl_item), + clean::MethodItem(..) | clean::RequiredMethodItem(..) => { + methods.push(impl_item) + } clean::RequiredAssocTypeItem(..) | clean::AssocTypeItem(..) => { assoc_types.push(impl_item) } diff --git a/src/librustdoc/html/render/search_index.rs b/src/librustdoc/html/render/search_index.rs index 30b534003da1..766109b65bea 100644 --- a/src/librustdoc/html/render/search_index.rs +++ b/src/librustdoc/html/render/search_index.rs @@ -1968,7 +1968,7 @@ pub(crate) fn get_function_type_for_search( clean::ForeignFunctionItem(ref f, _) | clean::FunctionItem(ref f) | clean::MethodItem(ref f, _) - | clean::RequiredMethodItem(ref f) => { + | clean::RequiredMethodItem(ref f, _) => { get_fn_inputs_and_outputs(f, tcx, impl_or_trait_generics, cache) } clean::ConstantItem(ref c) => make_nullary_fn(&c.type_), diff --git a/src/librustdoc/json/conversions.rs b/src/librustdoc/json/conversions.rs index 2edf7891be40..599d7b10005d 100644 --- a/src/librustdoc/json/conversions.rs +++ b/src/librustdoc/json/conversions.rs @@ -296,7 +296,7 @@ fn from_clean_item(item: &clean::Item, renderer: &JsonRenderer<'_>) -> ItemEnum MethodItem(m, _) => { ItemEnum::Function(from_clean_function(m, true, header.unwrap(), renderer)) } - RequiredMethodItem(m) => { + RequiredMethodItem(m, _) => { ItemEnum::Function(from_clean_function(m, false, header.unwrap(), renderer)) } ImplItem(i) => ItemEnum::Impl(i.into_json(renderer)), diff --git a/src/librustdoc/visit.rs b/src/librustdoc/visit.rs index 4d31409afe82..9f6bf009a054 100644 --- a/src/librustdoc/visit.rs +++ b/src/librustdoc/visit.rs @@ -35,8 +35,8 @@ pub(crate) trait DocVisitor<'a>: Sized { | StaticItem(_) | ConstantItem(..) | TraitAliasItem(_) - | RequiredMethodItem(_) - | MethodItem(_, _) + | RequiredMethodItem(..) + | MethodItem(..) | StructFieldItem(_) | ForeignFunctionItem(..) | ForeignStaticItem(..) diff --git a/tests/rustdoc-html/final-trait-method.rs b/tests/rustdoc-html/final-trait-method.rs new file mode 100644 index 000000000000..016578a8b0e7 --- /dev/null +++ b/tests/rustdoc-html/final-trait-method.rs @@ -0,0 +1,22 @@ +#![feature(final_associated_functions)] + +//@ has final_trait_method/trait.Item.html +pub trait Item { + //@ has - '//*[@id="method.foo"]' 'final fn foo()' + //@ !has - '//*[@id="method.foo"]' 'default fn foo()' + final fn foo() {} + + //@ has - '//*[@id="method.bar"]' 'fn bar()' + //@ !has - '//*[@id="method.bar"]' 'default fn bar()' + //@ !has - '//*[@id="method.bar"]' 'final fn bar()' + fn bar() {} +} + +//@ has final_trait_method/struct.Foo.html +pub struct Foo; +impl Item for Foo { + //@ has - '//*[@id="method.bar"]' 'fn bar()' + //@ !has - '//*[@id="method.bar"]' 'final fn bar()' + //@ !has - '//*[@id="method.bar"]' 'default fn bar()' + fn bar() {} +} From 2e0ff1fb1eaf7405ff19c544bf296a8e59c595ae Mon Sep 17 00:00:00 2001 From: mu001999 Date: Wed, 28 Jan 2026 22:45:25 +0800 Subject: [PATCH 120/265] Fix clippy ast utils Co-authored-by: Michael Goulet --- src/tools/clippy/clippy_utils/src/ast_utils/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tools/clippy/clippy_utils/src/ast_utils/mod.rs b/src/tools/clippy/clippy_utils/src/ast_utils/mod.rs index 3b043f7565ef..15f877632ef1 100644 --- a/src/tools/clippy/clippy_utils/src/ast_utils/mod.rs +++ b/src/tools/clippy/clippy_utils/src/ast_utils/mod.rs @@ -819,7 +819,9 @@ pub fn eq_use_tree_kind(l: &UseTreeKind, r: &UseTreeKind) -> bool { pub fn eq_defaultness(l: Defaultness, r: Defaultness) -> bool { matches!( (l, r), - (Defaultness::Final, Defaultness::Final) | (Defaultness::Default(_), Defaultness::Default(_)) + (Defaultness::Implicit, Defaultness::Implicit) + | (Defaultness::Default(_), Defaultness::Default(_)) + | (Defaultness::Final(_), Defaultness::Final(_)) ) } From 8c77b6c02512e5186dd4a3b7575872c207c399f9 Mon Sep 17 00:00:00 2001 From: mu001999 Date: Thu, 29 Jan 2026 20:34:14 +0800 Subject: [PATCH 121/265] Exclude final methods from dyn-compat check and vtable --- .../src/traits/dyn_compatibility.rs | 5 +++ .../src/traits/vtable.rs | 5 +++ compiler/rustc_ty_utils/src/instance.rs | 6 +++ tests/ui/traits/final/dyn-compat.rs | 40 +++++++++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 tests/ui/traits/final/dyn-compat.rs diff --git a/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs b/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs index 512973e45287..489b2d160a51 100644 --- a/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs +++ b/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs @@ -314,6 +314,11 @@ pub fn dyn_compatibility_violations_for_assoc_item( trait_def_id: DefId, item: ty::AssocItem, ) -> Vec { + // `final` assoc functions don't prevent a trait from being dyn-compatible + if tcx.defaultness(item.def_id).is_final() { + return Vec::new(); + } + // Any item that has a `Self: Sized` requisite is otherwise exempt from the regulations. if tcx.generics_require_sized_self(item.def_id) { return Vec::new(); diff --git a/compiler/rustc_trait_selection/src/traits/vtable.rs b/compiler/rustc_trait_selection/src/traits/vtable.rs index bd48068eb579..b919f158789e 100644 --- a/compiler/rustc_trait_selection/src/traits/vtable.rs +++ b/compiler/rustc_trait_selection/src/traits/vtable.rs @@ -210,6 +210,11 @@ fn own_existential_vtable_entries_iter( debug!("own_existential_vtable_entry: trait_method={:?}", trait_method); let def_id = trait_method.def_id; + // Final methods should not be included in the vtable. + if trait_method.defaultness(tcx).is_final() { + return None; + } + // Some methods cannot be called on an object; skip those. if !is_vtable_safe_method(tcx, trait_def_id, trait_method) { debug!("own_existential_vtable_entry: not vtable safe"); diff --git a/compiler/rustc_ty_utils/src/instance.rs b/compiler/rustc_ty_utils/src/instance.rs index cbe15eb54787..a014098e7ed5 100644 --- a/compiler/rustc_ty_utils/src/instance.rs +++ b/compiler/rustc_ty_utils/src/instance.rs @@ -237,6 +237,12 @@ fn resolve_associated_item<'tcx>( } traits::ImplSource::Builtin(BuiltinImplSource::Object(_), _) => { let trait_ref = ty::TraitRef::from_assoc(tcx, trait_id, rcvr_args); + + // `final` methods should be called directly. + if tcx.defaultness(trait_item_id).is_final() { + return Ok(Some(ty::Instance::new_raw(trait_item_id, rcvr_args))); + } + if trait_ref.has_non_region_infer() || trait_ref.has_non_region_param() { // We only resolve totally substituted vtable entries. None diff --git a/tests/ui/traits/final/dyn-compat.rs b/tests/ui/traits/final/dyn-compat.rs new file mode 100644 index 000000000000..d600058820c2 --- /dev/null +++ b/tests/ui/traits/final/dyn-compat.rs @@ -0,0 +1,40 @@ +//@ run-pass + +#![feature(final_associated_functions)] + +trait FinalNoReceiver { + final fn no_receiver() {} +} + +trait FinalGeneric { + final fn generic(&self, _value: T) {} +} + +trait FinalSelfParam { + final fn self_param(&self, _other: &Self) {} +} + +trait FinalSelfReturn { + final fn self_return(&self) -> &Self { + self + } +} + +struct S; + +impl FinalNoReceiver for S {} +impl FinalGeneric for S {} +impl FinalSelfParam for S {} +impl FinalSelfReturn for S {} + +fn main() { + let s = S; + ::no_receiver(); + let obj_generic: &dyn FinalGeneric = &s; + let obj_param: &dyn FinalSelfParam = &s; + let obj_return: &dyn FinalSelfReturn = &s; + obj_generic.generic(1u8); + obj_param.self_param(obj_param); + let _ = obj_return.self_return(); + let _: &dyn FinalNoReceiver = &s; +} From 590c1c9966caea982b0e6d946dd7637b8c08f0a3 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 19 Jan 2026 13:53:08 +0100 Subject: [PATCH 122/265] UnsafePinned: implement opsem effects of UnsafeUnpin --- compiler/rustc_middle/src/queries.rs | 4 +++ compiler/rustc_middle/src/ty/layout.rs | 12 ++++--- compiler/rustc_middle/src/ty/util.rs | 13 +++++-- compiler/rustc_ty_utils/src/abi.rs | 6 +++- compiler/rustc_ty_utils/src/common_traits.rs | 22 ++++++++---- library/core/src/marker.rs | 19 ++++++---- .../src/borrow_tracker/stacked_borrows/mod.rs | 8 +++-- .../src/borrow_tracker/tree_borrows/mod.rs | 3 +- .../tests/pass/both_borrows/unsafe_pinned.rs | 36 ++++++++++++++++--- tests/auxiliary/minicore.rs | 3 ++ tests/codegen-llvm/function-arguments.rs | 18 +++++++--- 11 files changed, 113 insertions(+), 31 deletions(-) diff --git a/compiler/rustc_middle/src/queries.rs b/compiler/rustc_middle/src/queries.rs index de2298914438..4d2ed8d57f4a 100644 --- a/compiler/rustc_middle/src/queries.rs +++ b/compiler/rustc_middle/src/queries.rs @@ -1694,6 +1694,10 @@ rustc_queries! { query is_freeze_raw(env: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool { desc { "computing whether `{}` is freeze", env.value } } + /// Query backing `Ty::is_unsafe_unpin`. + query is_unsafe_unpin_raw(env: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool { + desc { "computing whether `{}` is `UnsafeUnpin`", env.value } + } /// Query backing `Ty::is_unpin`. query is_unpin_raw(env: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool { desc { "computing whether `{}` is `Unpin`", env.value } diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs index d3b4654a8d79..a9b54092c887 100644 --- a/compiler/rustc_middle/src/ty/layout.rs +++ b/compiler/rustc_middle/src/ty/layout.rs @@ -1049,9 +1049,11 @@ where hir::Mutability::Not => { PointerKind::SharedRef { frozen: optimize && ty.is_freeze(tcx, typing_env) } } - hir::Mutability::Mut => { - PointerKind::MutableRef { unpin: optimize && ty.is_unpin(tcx, typing_env) } - } + hir::Mutability::Mut => PointerKind::MutableRef { + unpin: optimize + && ty.is_unpin(tcx, typing_env) + && ty.is_unsafe_unpin(tcx, typing_env), + }, }; tcx.layout_of(typing_env.as_query_input(ty)).ok().map(|layout| PointeeInfo { @@ -1146,7 +1148,9 @@ where debug_assert!(pointee.safe.is_none()); let optimize = tcx.sess.opts.optimize != OptLevel::No; pointee.safe = Some(PointerKind::Box { - unpin: optimize && boxed_ty.is_unpin(tcx, typing_env), + unpin: optimize + && boxed_ty.is_unpin(tcx, typing_env) + && boxed_ty.is_unsafe_unpin(tcx, typing_env), global: this.ty.is_box_global(tcx), }); } diff --git a/compiler/rustc_middle/src/ty/util.rs b/compiler/rustc_middle/src/ty/util.rs index e01a5721a5e0..d534c273ff65 100644 --- a/compiler/rustc_middle/src/ty/util.rs +++ b/compiler/rustc_middle/src/ty/util.rs @@ -1189,14 +1189,23 @@ impl<'tcx> Ty<'tcx> { } } + /// Checks whether values of this type `T` implement the `UnsafeUnpin` trait. + pub fn is_unsafe_unpin(self, tcx: TyCtxt<'tcx>, typing_env: ty::TypingEnv<'tcx>) -> bool { + self.is_trivially_unpin() || tcx.is_unsafe_unpin_raw(typing_env.as_query_input(self)) + } + /// Checks whether values of this type `T` implement the `Unpin` trait. + /// + /// Note that this is a safe trait, so it cannot be very semantically meaningful. + /// However, as a hack to mitigate until a + /// proper solution is implemented, we do give special semantics to the `Unpin` trait. pub fn is_unpin(self, tcx: TyCtxt<'tcx>, typing_env: ty::TypingEnv<'tcx>) -> bool { self.is_trivially_unpin() || tcx.is_unpin_raw(typing_env.as_query_input(self)) } - /// Fast path helper for testing if a type is `Unpin`. + /// Fast path helper for testing if a type is `Unpin` *and* `UnsafeUnpin`. /// - /// Returning true means the type is known to be `Unpin`. Returning + /// Returning true means the type is known to be `Unpin` and `UnsafeUnpin`. Returning /// `false` means nothing -- could be `Unpin`, might not be. fn is_trivially_unpin(self) -> bool { match self.kind() { diff --git a/compiler/rustc_ty_utils/src/abi.rs b/compiler/rustc_ty_utils/src/abi.rs index 34c080c4938f..72f31bbf62a6 100644 --- a/compiler/rustc_ty_utils/src/abi.rs +++ b/compiler/rustc_ty_utils/src/abi.rs @@ -306,8 +306,12 @@ fn arg_attrs_for_rust_scalar<'tcx>( let kind = if let Some(kind) = pointee.safe { Some(kind) } else if let Some(pointee) = drop_target_pointee { + assert_eq!(pointee, layout.ty.builtin_deref(true).unwrap()); + assert_eq!(offset, Size::ZERO); // The argument to `drop_in_place` is semantically equivalent to a mutable reference. - Some(PointerKind::MutableRef { unpin: pointee.is_unpin(tcx, cx.typing_env) }) + let mutref = Ty::new_mut_ref(tcx, tcx.lifetimes.re_erased, pointee); + let layout = cx.layout_of(mutref).unwrap(); + layout.pointee_info_at(&cx, offset).and_then(|pi| pi.safe) } else { None }; diff --git a/compiler/rustc_ty_utils/src/common_traits.rs b/compiler/rustc_ty_utils/src/common_traits.rs index 7219f40710e0..a3f1be77f47a 100644 --- a/compiler/rustc_ty_utils/src/common_traits.rs +++ b/compiler/rustc_ty_utils/src/common_traits.rs @@ -8,36 +8,43 @@ use rustc_span::DUMMY_SP; use rustc_trait_selection::traits; fn is_copy_raw<'tcx>(tcx: TyCtxt<'tcx>, query: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool { - is_item_raw(tcx, query, LangItem::Copy) + is_trait_raw(tcx, query, LangItem::Copy) } fn is_use_cloned_raw<'tcx>( tcx: TyCtxt<'tcx>, query: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>, ) -> bool { - is_item_raw(tcx, query, LangItem::UseCloned) + is_trait_raw(tcx, query, LangItem::UseCloned) } fn is_sized_raw<'tcx>(tcx: TyCtxt<'tcx>, query: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool { - is_item_raw(tcx, query, LangItem::Sized) + is_trait_raw(tcx, query, LangItem::Sized) } fn is_freeze_raw<'tcx>(tcx: TyCtxt<'tcx>, query: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool { - is_item_raw(tcx, query, LangItem::Freeze) + is_trait_raw(tcx, query, LangItem::Freeze) +} + +fn is_unsafe_unpin_raw<'tcx>( + tcx: TyCtxt<'tcx>, + query: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>, +) -> bool { + is_trait_raw(tcx, query, LangItem::UnsafeUnpin) } fn is_unpin_raw<'tcx>(tcx: TyCtxt<'tcx>, query: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>) -> bool { - is_item_raw(tcx, query, LangItem::Unpin) + is_trait_raw(tcx, query, LangItem::Unpin) } fn is_async_drop_raw<'tcx>( tcx: TyCtxt<'tcx>, query: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>, ) -> bool { - is_item_raw(tcx, query, LangItem::AsyncDrop) + is_trait_raw(tcx, query, LangItem::AsyncDrop) } -fn is_item_raw<'tcx>( +fn is_trait_raw<'tcx>( tcx: TyCtxt<'tcx>, query: ty::PseudoCanonicalInput<'tcx, Ty<'tcx>>, item: LangItem, @@ -53,6 +60,7 @@ pub(crate) fn provide(providers: &mut Providers) { is_use_cloned_raw, is_sized_raw, is_freeze_raw, + is_unsafe_unpin_raw, is_unpin_raw, is_async_drop_raw, ..*providers diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs index 57416455e9de..7187c71799b9 100644 --- a/library/core/src/marker.rs +++ b/library/core/src/marker.rs @@ -927,14 +927,20 @@ marker_impls! { /// This is part of [RFC 3467](https://rust-lang.github.io/rfcs/3467-unsafe-pinned.html), and is /// tracked by [#125735](https://github.com/rust-lang/rust/issues/125735). #[lang = "unsafe_unpin"] -pub(crate) unsafe auto trait UnsafeUnpin {} +#[unstable(feature = "unsafe_unpin", issue = "125735")] +pub unsafe auto trait UnsafeUnpin {} +#[unstable(feature = "unsafe_unpin", issue = "125735")] impl !UnsafeUnpin for UnsafePinned {} -unsafe impl UnsafeUnpin for PhantomData {} -unsafe impl UnsafeUnpin for *const T {} -unsafe impl UnsafeUnpin for *mut T {} -unsafe impl UnsafeUnpin for &T {} -unsafe impl UnsafeUnpin for &mut T {} +marker_impls! { +#[unstable(feature = "unsafe_unpin", issue = "125735")] + unsafe UnsafeUnpin for + {T: ?Sized} PhantomData, + {T: ?Sized} *const T, + {T: ?Sized} *mut T, + {T: ?Sized} &T, + {T: ?Sized} &mut T, +} /// Types that do not require any pinning guarantees. /// @@ -1027,6 +1033,7 @@ impl !Unpin for PhantomPinned {} // continue working. Ideally PhantomPinned could just wrap an `UnsafePinned<()>` to get the same // effect, but we can't add a new field to an already stable unit struct -- that would be a breaking // change. +#[unstable(feature = "unsafe_unpin", issue = "125735")] impl !UnsafeUnpin for PhantomPinned {} marker_impls! { diff --git a/src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs b/src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs index a21898c506ab..2d054557da7e 100644 --- a/src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs +++ b/src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs @@ -71,7 +71,9 @@ impl NewPermission { access: None, protector: None, } - } else if pointee.is_unpin(*cx.tcx, cx.typing_env()) { + } else if pointee.is_unpin(*cx.tcx, cx.typing_env()) + && pointee.is_unsafe_unpin(*cx.tcx, cx.typing_env()) + { // A regular full mutable reference. On `FnEntry` this is `noalias` and `dereferenceable`. NewPermission::Uniform { perm: Permission::Unique, @@ -129,7 +131,9 @@ impl NewPermission { fn from_box_ty<'tcx>(ty: Ty<'tcx>, kind: RetagKind, cx: &crate::MiriInterpCx<'tcx>) -> Self { // `ty` is not the `Box` but the field of the Box with this pointer (due to allocator handling). let pointee = ty.builtin_deref(true).unwrap(); - if pointee.is_unpin(*cx.tcx, cx.typing_env()) { + if pointee.is_unpin(*cx.tcx, cx.typing_env()) + && pointee.is_unsafe_unpin(*cx.tcx, cx.typing_env()) + { // A regular box. On `FnEntry` this is `noalias`, but not `dereferenceable` (hence only // a weak protector). NewPermission::Uniform { diff --git a/src/tools/miri/src/borrow_tracker/tree_borrows/mod.rs b/src/tools/miri/src/borrow_tracker/tree_borrows/mod.rs index 173145788ee3..4f170f48aed8 100644 --- a/src/tools/miri/src/borrow_tracker/tree_borrows/mod.rs +++ b/src/tools/miri/src/borrow_tracker/tree_borrows/mod.rs @@ -133,7 +133,8 @@ impl<'tcx> NewPermission { retag_kind: RetagKind, cx: &crate::MiriInterpCx<'tcx>, ) -> Option { - let ty_is_unpin = pointee.is_unpin(*cx.tcx, cx.typing_env()); + let ty_is_unpin = pointee.is_unpin(*cx.tcx, cx.typing_env()) + && pointee.is_unsafe_unpin(*cx.tcx, cx.typing_env()); let ty_is_freeze = pointee.is_freeze(*cx.tcx, cx.typing_env()); let is_protected = retag_kind == RetagKind::FnEntry; diff --git a/src/tools/miri/tests/pass/both_borrows/unsafe_pinned.rs b/src/tools/miri/tests/pass/both_borrows/unsafe_pinned.rs index 0c75a07bfa2a..8e222e627956 100644 --- a/src/tools/miri/tests/pass/both_borrows/unsafe_pinned.rs +++ b/src/tools/miri/tests/pass/both_borrows/unsafe_pinned.rs @@ -9,8 +9,36 @@ fn mutate(x: &UnsafePinned) { unsafe { ptr.write(42) }; } -fn main() { - let x = UnsafePinned::new(0); - mutate(&x); - assert_eq!(x.into_inner(), 42); +fn mut_alias(x: &mut UnsafePinned, y: &mut UnsafePinned) { + unsafe { + x.get().write(0); + y.get().write(0); + x.get().write(0); + y.get().write(0); + } +} + +// Also try this with a type for which we implement `Unpin`, just to be extra mean. +struct MyUnsafePinned(UnsafePinned); +impl Unpin for MyUnsafePinned {} + +fn my_mut_alias(x: &mut MyUnsafePinned, y: &mut MyUnsafePinned) { + unsafe { + x.0.get().write(0); + y.0.get().write(0); + x.0.get().write(0); + y.0.get().write(0); + } +} + +fn main() { + let mut x = UnsafePinned::new(0i32); + mutate(&x); + assert_eq!(unsafe { x.get().read() }, 42); + + let ptr = &raw mut x; + unsafe { mut_alias(&mut *ptr, &mut *ptr) }; + + let ptr = ptr.cast::>(); + unsafe { my_mut_alias(&mut *ptr, &mut *ptr) }; } diff --git a/tests/auxiliary/minicore.rs b/tests/auxiliary/minicore.rs index 95b217c13031..c4546f4dea93 100644 --- a/tests/auxiliary/minicore.rs +++ b/tests/auxiliary/minicore.rs @@ -76,6 +76,9 @@ pub trait BikeshedGuaranteedNoDrop {} #[lang = "freeze"] pub unsafe auto trait Freeze {} +#[lang = "unsafe_unpin"] +pub unsafe auto trait UnsafeUnpin {} + #[lang = "unpin"] #[diagnostic::on_unimplemented( note = "consider using the `pin!` macro\nconsider using `Box::pin` if you need to access the pinned value outside of the current scope", diff --git a/tests/codegen-llvm/function-arguments.rs b/tests/codegen-llvm/function-arguments.rs index b5febca3b87b..46e153a0cfc6 100644 --- a/tests/codegen-llvm/function-arguments.rs +++ b/tests/codegen-llvm/function-arguments.rs @@ -1,9 +1,9 @@ //@ compile-flags: -Copt-level=3 -C no-prepopulate-passes #![crate_type = "lib"] #![feature(rustc_attrs)] -#![feature(allocator_api)] +#![feature(allocator_api, unsafe_unpin)] -use std::marker::PhantomPinned; +use std::marker::{PhantomPinned, UnsafeUnpin}; use std::mem::MaybeUninit; use std::num::NonZero; use std::ptr::NonNull; @@ -259,11 +259,21 @@ pub fn trait_raw(_: *const dyn Drop) {} // CHECK: @trait_box(ptr noalias noundef nonnull align 1{{( %0)?}}, {{.+}} noalias noundef readonly align {{.*}} dereferenceable({{.*}}){{( %1)?}}) #[no_mangle] -pub fn trait_box(_: Box) {} +pub fn trait_box(_: Box) {} + +// Ensure that removing *either* `Unpin` or `UnsafeUnpin` is enough to lose the attribute. +// CHECK: @trait_box_pin1(ptr noundef nonnull align 1{{( %0)?}}, {{.+}} noalias noundef readonly align {{.*}} dereferenceable({{.*}}){{( %1)?}}) +#[no_mangle] +pub fn trait_box_pin1(_: Box) {} +// CHECK: @trait_box_pin2(ptr noundef nonnull align 1{{( %0)?}}, {{.+}} noalias noundef readonly align {{.*}} dereferenceable({{.*}}){{( %1)?}}) +#[no_mangle] +pub fn trait_box_pin2(_: Box) {} // CHECK: { ptr, ptr } @trait_option(ptr noalias noundef align 1 %x.0, ptr %x.1) #[no_mangle] -pub fn trait_option(x: Option>) -> Option> { +pub fn trait_option( + x: Option>, +) -> Option> { x } From 0cbe1cc992f712704abdcbbcb35db431ab181bbc Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 21 Jan 2026 08:49:25 +0100 Subject: [PATCH 123/265] try to work around rustdoc bug, and other rustdoc adjustments --- library/core/src/num/nonzero.rs | 2 +- .../auto/auto-trait-bounds-by-associated-type-50159.rs | 3 ++- tests/rustdoc-html/empty-section.rs | 4 +++- tests/rustdoc-html/synthetic_auto/basic.rs | 3 ++- tests/rustdoc-html/synthetic_auto/manual.rs | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs index 7876fced1c98..f52438e4e62e 100644 --- a/library/core/src/num/nonzero.rs +++ b/library/core/src/num/nonzero.rs @@ -31,7 +31,7 @@ use crate::{fmt, intrinsics, ptr, ub_checks}; issue = "none" )] pub unsafe trait ZeroablePrimitive: Sized + Copy + private::Sealed { - #[doc(hidden)] + /// A type like `Self` but with a niche that includes zero. type NonZeroInner: Sized + Copy; } diff --git a/tests/rustdoc-html/auto/auto-trait-bounds-by-associated-type-50159.rs b/tests/rustdoc-html/auto/auto-trait-bounds-by-associated-type-50159.rs index 2803c4da437f..14981783e5f3 100644 --- a/tests/rustdoc-html/auto/auto-trait-bounds-by-associated-type-50159.rs +++ b/tests/rustdoc-html/auto/auto-trait-bounds-by-associated-type-50159.rs @@ -20,7 +20,8 @@ where //@ has - '//h3[@class="code-header"]' 'impl Send for Switchwhere ::Item: Send' //@ has - '//h3[@class="code-header"]' 'impl Sync for Switchwhere ::Item: Sync' //@ count - '//*[@id="implementations-list"]//*[@class="impl"]' 0 -//@ count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 6 +//@ count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 7 +// The number here will need updating when new auto traits are added: ^ pub struct Switch { pub inner: ::Item2, } diff --git a/tests/rustdoc-html/empty-section.rs b/tests/rustdoc-html/empty-section.rs index 71ebc66d6953..1e6e725a5a7b 100644 --- a/tests/rustdoc-html/empty-section.rs +++ b/tests/rustdoc-html/empty-section.rs @@ -1,13 +1,15 @@ #![crate_name = "foo"] -#![feature(negative_impls, freeze_impls, freeze)] +#![feature(negative_impls, freeze_impls, freeze, unsafe_unpin)] pub struct Foo; //@ has foo/struct.Foo.html //@ !hasraw - 'Auto Trait Implementations' +// Manually un-implement all auto traits for Foo: impl !Send for Foo {} impl !Sync for Foo {} impl !std::marker::Freeze for Foo {} +impl !std::marker::UnsafeUnpin for Foo {} impl !std::marker::Unpin for Foo {} impl !std::panic::RefUnwindSafe for Foo {} impl !std::panic::UnwindSafe for Foo {} diff --git a/tests/rustdoc-html/synthetic_auto/basic.rs b/tests/rustdoc-html/synthetic_auto/basic.rs index 9daf8963997a..e8c2f5da9fe6 100644 --- a/tests/rustdoc-html/synthetic_auto/basic.rs +++ b/tests/rustdoc-html/synthetic_auto/basic.rs @@ -2,7 +2,8 @@ //@ has - '//h3[@class="code-header"]' 'impl Send for Foowhere T: Send' //@ has - '//h3[@class="code-header"]' 'impl Sync for Foowhere T: Sync' //@ count - '//*[@id="implementations-list"]//*[@class="impl"]' 0 -//@ count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 6 +//@ count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 7 +// The number here will need updating when new auto traits are added: ^ pub struct Foo { field: T, } diff --git a/tests/rustdoc-html/synthetic_auto/manual.rs b/tests/rustdoc-html/synthetic_auto/manual.rs index bbf361a6e596..830bfccca09e 100644 --- a/tests/rustdoc-html/synthetic_auto/manual.rs +++ b/tests/rustdoc-html/synthetic_auto/manual.rs @@ -6,7 +6,8 @@ // 'impl Send for Foo' // //@ count - '//*[@id="trait-implementations-list"]//*[@class="impl"]' 1 -//@ count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 5 +//@ count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 6 +// The number here will need updating when new auto traits are added: ^ pub struct Foo { field: T, } From 11ce0a56552051a3735268a5d239d2b2f0005b1e Mon Sep 17 00:00:00 2001 From: bit-aloo Date: Thu, 12 Feb 2026 14:01:45 +0530 Subject: [PATCH 124/265] pin nightly for miri workflow --- src/tools/rust-analyzer/.github/workflows/ci.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tools/rust-analyzer/.github/workflows/ci.yaml b/src/tools/rust-analyzer/.github/workflows/ci.yaml index c3a5017d72d7..ca7d3058d8f0 100644 --- a/src/tools/rust-analyzer/.github/workflows/ci.yaml +++ b/src/tools/rust-analyzer/.github/workflows/ci.yaml @@ -206,8 +206,11 @@ jobs: - name: Install Rust toolchain run: | - rustup update --no-self-update nightly - rustup default nightly + # FIXME: Pin nightly due to a regression in miri on nightly-2026-02-12. + # See https://github.com/rust-lang/miri/issues/4855. + # Revert to plain `nightly` once this is fixed upstream. + rustup toolchain install nightly-2026-02-10 + rustup default nightly-2026-02-10 rustup component add miri # - name: Cache Dependencies From 8b27b45bbd3969d9e31f983d41a5d1f7f94d5a21 Mon Sep 17 00:00:00 2001 From: Chayim Refael Friedman Date: Thu, 12 Feb 2026 06:41:03 +0200 Subject: [PATCH 125/265] Revert "feat: Implement fine grained client side request cancellation support" --- src/tools/rust-analyzer/Cargo.lock | 12 ++--- src/tools/rust-analyzer/Cargo.toml | 4 +- .../crates/base-db/src/editioned_file_id.rs | 2 +- .../crates/hir-ty/src/tests/regression.rs | 1 - src/tools/rust-analyzer/crates/ide/src/lib.rs | 6 +-- .../crates/rust-analyzer/src/global_state.rs | 8 +-- .../rust-analyzer/src/handlers/dispatch.rs | 17 +------ .../rust-analyzer/crates/span/src/hygiene.rs | 51 ++++++++++--------- 8 files changed, 38 insertions(+), 63 deletions(-) diff --git a/src/tools/rust-analyzer/Cargo.lock b/src/tools/rust-analyzer/Cargo.lock index 755ae55eea46..11d41a17b165 100644 --- a/src/tools/rust-analyzer/Cargo.lock +++ b/src/tools/rust-analyzer/Cargo.lock @@ -2453,9 +2453,9 @@ checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "salsa" -version = "0.26.0" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f77debccd43ba198e9cee23efd7f10330ff445e46a98a2b107fed9094a1ee676" +checksum = "e2e2aa2fca57727371eeafc975acc8e6f4c52f8166a78035543f6ee1c74c2dcc" dependencies = [ "boxcar", "crossbeam-queue", @@ -2478,15 +2478,15 @@ dependencies = [ [[package]] name = "salsa-macro-rules" -version = "0.26.0" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea07adbf42d91cc076b7daf3b38bc8168c19eb362c665964118a89bc55ef19a5" +checksum = "1bfc2a1e7bf06964105515451d728f2422dedc3a112383324a00b191a5c397a3" [[package]] name = "salsa-macros" -version = "0.26.0" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16d4d8b66451b9c75ddf740b7fc8399bc7b8ba33e854a5d7526d18708f67b05" +checksum = "3d844c1aa34946da46af683b5c27ec1088a3d9d84a2b837a108223fd830220e1" dependencies = [ "proc-macro2", "quote", diff --git a/src/tools/rust-analyzer/Cargo.toml b/src/tools/rust-analyzer/Cargo.toml index 04559f15eda4..9f31e1903af5 100644 --- a/src/tools/rust-analyzer/Cargo.toml +++ b/src/tools/rust-analyzer/Cargo.toml @@ -135,13 +135,13 @@ rayon = "1.10.0" rowan = "=0.15.17" # Ideally we'd not enable the macros feature but unfortunately the `tracked` attribute does not work # on impls without it -salsa = { version = "0.26", default-features = false, features = [ +salsa = { version = "0.25.2", default-features = false, features = [ "rayon", "salsa_unstable", "macros", "inventory", ] } -salsa-macros = "0.26" +salsa-macros = "0.25.2" semver = "1.0.26" serde = { version = "1.0.219" } serde_derive = { version = "1.0.219" } diff --git a/src/tools/rust-analyzer/crates/base-db/src/editioned_file_id.rs b/src/tools/rust-analyzer/crates/base-db/src/editioned_file_id.rs index dd419f48fc7e..13fb05d56547 100644 --- a/src/tools/rust-analyzer/crates/base-db/src/editioned_file_id.rs +++ b/src/tools/rust-analyzer/crates/base-db/src/editioned_file_id.rs @@ -60,7 +60,7 @@ const _: () = { } } - impl zalsa_::HashEqLike for EditionedFileIdData { + impl zalsa_struct_::HashEqLike for EditionedFileIdData { #[inline] fn hash(&self, state: &mut H) { Hash::hash(self, state); diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/tests/regression.rs b/src/tools/rust-analyzer/crates/hir-ty/src/tests/regression.rs index fba582f880fd..3b73550ad40d 100644 --- a/src/tools/rust-analyzer/crates/hir-ty/src/tests/regression.rs +++ b/src/tools/rust-analyzer/crates/hir-ty/src/tests/regression.rs @@ -2363,7 +2363,6 @@ fn test() { } "#, expect![[r#" - 46..49 'Foo': Foo 93..97 'self': Foo 108..125 '{ ... }': usize 118..119 'N': usize diff --git a/src/tools/rust-analyzer/crates/ide/src/lib.rs b/src/tools/rust-analyzer/crates/ide/src/lib.rs index 2e618550f92f..930eaf2262d9 100644 --- a/src/tools/rust-analyzer/crates/ide/src/lib.rs +++ b/src/tools/rust-analyzer/crates/ide/src/lib.rs @@ -67,7 +67,7 @@ use ide_db::{ FxHashMap, FxIndexSet, LineIndexDatabase, base_db::{ CrateOrigin, CrateWorkspaceData, Env, FileSet, RootQueryDb, SourceDatabase, VfsPath, - salsa::{CancellationToken, Cancelled, Database}, + salsa::{Cancelled, Database}, }, prime_caches, symbol_index, }; @@ -947,10 +947,6 @@ impl Analysis { // We use `attach_db_allow_change()` and not `attach_db()` because fixture injection can change the database. hir::attach_db_allow_change(&self.db, || Cancelled::catch(|| f(&self.db))) } - - pub fn cancellation_token(&self) -> CancellationToken { - self.db.cancellation_token() - } } #[test] diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/global_state.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/global_state.rs index 1462727df4e1..afd4162de622 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/src/global_state.rs +++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/global_state.rs @@ -14,7 +14,7 @@ use hir::ChangeWithProcMacros; use ide::{Analysis, AnalysisHost, Cancellable, FileId, SourceRootId}; use ide_db::{ MiniCore, - base_db::{Crate, ProcMacroPaths, SourceDatabase, salsa::CancellationToken, salsa::Revision}, + base_db::{Crate, ProcMacroPaths, SourceDatabase, salsa::Revision}, }; use itertools::Itertools; use load_cargo::SourceRootConfig; @@ -88,7 +88,6 @@ pub(crate) struct GlobalState { pub(crate) task_pool: Handle, Receiver>, pub(crate) fmt_pool: Handle, Receiver>, pub(crate) cancellation_pool: thread::Pool, - pub(crate) cancellation_tokens: FxHashMap, pub(crate) config: Arc, pub(crate) config_errors: Option, @@ -266,7 +265,6 @@ impl GlobalState { task_pool, fmt_pool, cancellation_pool, - cancellation_tokens: Default::default(), loader, config: Arc::new(config.clone()), analysis_host, @@ -619,7 +617,6 @@ impl GlobalState { } pub(crate) fn respond(&mut self, response: lsp_server::Response) { - self.cancellation_tokens.remove(&response.id); if let Some((method, start)) = self.req_queue.incoming.complete(&response.id) { if let Some(err) = &response.error && err.message.starts_with("server panicked") @@ -634,9 +631,6 @@ impl GlobalState { } pub(crate) fn cancel(&mut self, request_id: lsp_server::RequestId) { - if let Some(token) = self.cancellation_tokens.remove(&request_id) { - token.cancel(); - } if let Some(response) = self.req_queue.incoming.cancel(request_id) { self.send(response.into()); } diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/dispatch.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/dispatch.rs index 63b4e6430c2d..90deae2d902e 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/dispatch.rs +++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/dispatch.rs @@ -253,9 +253,6 @@ impl RequestDispatcher<'_> { tracing::debug!(?params); let world = self.global_state.snapshot(); - self.global_state - .cancellation_tokens - .insert(req.id.clone(), world.analysis.cancellation_token()); if RUSTFMT { &mut self.global_state.fmt_pool.handle } else { @@ -268,19 +265,7 @@ impl RequestDispatcher<'_> { }); match thread_result_to_response::(req.id.clone(), result) { Ok(response) => Task::Response(response), - Err(HandlerCancelledError::Inner( - Cancelled::PendingWrite | Cancelled::PropagatedPanic, - )) if ALLOW_RETRYING => Task::Retry(req), - // Note: Technically the return value here does not matter as we have already responded to the client with this error. - Err(HandlerCancelledError::Inner(Cancelled::Local)) => Task::Response(Response { - id: req.id, - result: None, - error: Some(ResponseError { - code: lsp_server::ErrorCode::RequestCanceled as i32, - message: "canceled by client".to_owned(), - data: None, - }), - }), + Err(_cancelled) if ALLOW_RETRYING => Task::Retry(req), Err(_cancelled) => { let error = on_cancelled(); Task::Response(Response { id: req.id, result: None, error: Some(error) }) diff --git a/src/tools/rust-analyzer/crates/span/src/hygiene.rs b/src/tools/rust-analyzer/crates/span/src/hygiene.rs index 0a81cef52ec5..fe05ef946518 100644 --- a/src/tools/rust-analyzer/crates/span/src/hygiene.rs +++ b/src/tools/rust-analyzer/crates/span/src/hygiene.rs @@ -81,24 +81,25 @@ const _: () = { #[derive(Hash)] struct StructKey<'db, T0, T1, T2, T3>(T0, T1, T2, T3, std::marker::PhantomData<&'db ()>); - impl<'db, T0, T1, T2, T3> zalsa_::HashEqLike> for SyntaxContextData + impl<'db, T0, T1, T2, T3> zalsa_::interned::HashEqLike> + for SyntaxContextData where - Option: zalsa_::HashEqLike, - Transparency: zalsa_::HashEqLike, - Edition: zalsa_::HashEqLike, - SyntaxContext: zalsa_::HashEqLike, + Option: zalsa_::interned::HashEqLike, + Transparency: zalsa_::interned::HashEqLike, + Edition: zalsa_::interned::HashEqLike, + SyntaxContext: zalsa_::interned::HashEqLike, { fn hash(&self, h: &mut H) { - zalsa_::HashEqLike::::hash(&self.outer_expn, &mut *h); - zalsa_::HashEqLike::::hash(&self.outer_transparency, &mut *h); - zalsa_::HashEqLike::::hash(&self.edition, &mut *h); - zalsa_::HashEqLike::::hash(&self.parent, &mut *h); + zalsa_::interned::HashEqLike::::hash(&self.outer_expn, &mut *h); + zalsa_::interned::HashEqLike::::hash(&self.outer_transparency, &mut *h); + zalsa_::interned::HashEqLike::::hash(&self.edition, &mut *h); + zalsa_::interned::HashEqLike::::hash(&self.parent, &mut *h); } fn eq(&self, data: &StructKey<'db, T0, T1, T2, T3>) -> bool { - zalsa_::HashEqLike::::eq(&self.outer_expn, &data.0) - && zalsa_::HashEqLike::::eq(&self.outer_transparency, &data.1) - && zalsa_::HashEqLike::::eq(&self.edition, &data.2) - && zalsa_::HashEqLike::::eq(&self.parent, &data.3) + zalsa_::interned::HashEqLike::::eq(&self.outer_expn, &data.0) + && zalsa_::interned::HashEqLike::::eq(&self.outer_transparency, &data.1) + && zalsa_::interned::HashEqLike::::eq(&self.edition, &data.2) + && zalsa_::interned::HashEqLike::::eq(&self.parent, &data.3) } } impl zalsa_struct_::Configuration for SyntaxContext { @@ -202,10 +203,10 @@ const _: () = { impl<'db> SyntaxContext { pub fn new< Db, - T0: zalsa_::Lookup> + std::hash::Hash, - T1: zalsa_::Lookup + std::hash::Hash, - T2: zalsa_::Lookup + std::hash::Hash, - T3: zalsa_::Lookup + std::hash::Hash, + T0: zalsa_::interned::Lookup> + std::hash::Hash, + T1: zalsa_::interned::Lookup + std::hash::Hash, + T2: zalsa_::interned::Lookup + std::hash::Hash, + T3: zalsa_::interned::Lookup + std::hash::Hash, >( db: &'db Db, outer_expn: T0, @@ -217,10 +218,10 @@ const _: () = { ) -> Self where Db: ?Sized + salsa::Database, - Option: zalsa_::HashEqLike, - Transparency: zalsa_::HashEqLike, - Edition: zalsa_::HashEqLike, - SyntaxContext: zalsa_::HashEqLike, + Option: zalsa_::interned::HashEqLike, + Transparency: zalsa_::interned::HashEqLike, + Edition: zalsa_::interned::HashEqLike, + SyntaxContext: zalsa_::interned::HashEqLike, { let (zalsa, zalsa_local) = db.zalsas(); @@ -235,10 +236,10 @@ const _: () = { std::marker::PhantomData, ), |id, data| SyntaxContextData { - outer_expn: zalsa_::Lookup::into_owned(data.0), - outer_transparency: zalsa_::Lookup::into_owned(data.1), - edition: zalsa_::Lookup::into_owned(data.2), - parent: zalsa_::Lookup::into_owned(data.3), + outer_expn: zalsa_::interned::Lookup::into_owned(data.0), + outer_transparency: zalsa_::interned::Lookup::into_owned(data.1), + edition: zalsa_::interned::Lookup::into_owned(data.2), + parent: zalsa_::interned::Lookup::into_owned(data.3), opaque: opaque(zalsa_::FromId::from_id(id)), opaque_and_semiopaque: opaque_and_semiopaque(zalsa_::FromId::from_id(id)), }, From 87feb37bc7c5aa6f90ba337de8cbe512d5027ba4 Mon Sep 17 00:00:00 2001 From: bit-aloo Date: Wed, 11 Feb 2026 13:37:08 +0530 Subject: [PATCH 126/265] migrate covert_tuple_return_type to struct to syntax editor --- .../convert_tuple_return_type_to_struct.rs | 121 +++++++---- .../crates/ide-db/src/imports/insert_use.rs | 200 +++++++++++++++++- .../src/ast/syntax_factory/constructors.rs | 18 ++ 3 files changed, 294 insertions(+), 45 deletions(-) diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_tuple_return_type_to_struct.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_tuple_return_type_to_struct.rs index 0e5e6185d054..ad983df8a57a 100644 --- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_tuple_return_type_to_struct.rs +++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_tuple_return_type_to_struct.rs @@ -5,15 +5,16 @@ use ide_db::{ assists::AssistId, defs::Definition, helpers::mod_path_to_ast, - imports::insert_use::{ImportScope, insert_use}, + imports::insert_use::{ImportScope, insert_use_with_editor}, search::{FileReference, UsageSearchResult}, source_change::SourceChangeBuilder, syntax_helpers::node_ext::{for_each_tail_expr, walk_expr}, }; use syntax::{ AstNode, SyntaxNode, - ast::{self, HasName, edit::IndentLevel, edit_in_place::Indent, make}, - match_ast, ted, + ast::{self, HasName, edit::IndentLevel, edit_in_place::Indent, syntax_factory::SyntaxFactory}, + match_ast, + syntax_editor::SyntaxEditor, }; use crate::assist_context::{AssistContext, Assists}; @@ -67,14 +68,15 @@ pub(crate) fn convert_tuple_return_type_to_struct( "Convert tuple return type to tuple struct", target, move |edit| { - let ret_type = edit.make_mut(ret_type); - let fn_ = edit.make_mut(fn_); + let mut syntax_editor = edit.make_editor(ret_type.syntax()); + let syntax_factory = SyntaxFactory::with_mappings(); let usages = Definition::Function(fn_def).usages(&ctx.sema).all(); let struct_name = format!("{}Result", stdx::to_camel_case(&fn_name.to_string())); let parent = fn_.syntax().ancestors().find_map(>::cast); add_tuple_struct_def( edit, + &syntax_factory, ctx, &usages, parent.as_ref().map(|it| it.syntax()).unwrap_or(fn_.syntax()), @@ -83,15 +85,23 @@ pub(crate) fn convert_tuple_return_type_to_struct( &target_module, ); - ted::replace( + syntax_editor.replace( ret_type.syntax(), - make::ret_type(make::ty(&struct_name)).syntax().clone_for_update(), + syntax_factory.ret_type(syntax_factory.ty(&struct_name)).syntax(), ); if let Some(fn_body) = fn_.body() { - replace_body_return_values(ast::Expr::BlockExpr(fn_body), &struct_name); + replace_body_return_values( + &mut syntax_editor, + &syntax_factory, + ast::Expr::BlockExpr(fn_body), + &struct_name, + ); } + syntax_editor.add_mappings(syntax_factory.finish_with_mappings()); + edit.add_file_edits(ctx.vfs_file_id(), syntax_editor); + replace_usages(edit, ctx, &usages, &struct_name, &target_module); }, ) @@ -106,24 +116,37 @@ fn replace_usages( target_module: &hir::Module, ) { for (file_id, references) in usages.iter() { - edit.edit_file(file_id.file_id(ctx.db())); + let Some(first_ref) = references.first() else { continue }; - let refs_with_imports = - augment_references_with_imports(edit, ctx, references, struct_name, target_module); + let mut editor = edit.make_editor(first_ref.name.syntax().as_node().unwrap()); + let syntax_factory = SyntaxFactory::with_mappings(); + + let refs_with_imports = augment_references_with_imports( + &syntax_factory, + ctx, + references, + struct_name, + target_module, + ); refs_with_imports.into_iter().rev().for_each(|(name, import_data)| { if let Some(fn_) = name.syntax().parent().and_then(ast::Fn::cast) { cov_mark::hit!(replace_trait_impl_fns); if let Some(ret_type) = fn_.ret_type() { - ted::replace( + editor.replace( ret_type.syntax(), - make::ret_type(make::ty(struct_name)).syntax().clone_for_update(), + syntax_factory.ret_type(syntax_factory.ty(struct_name)).syntax(), ); } if let Some(fn_body) = fn_.body() { - replace_body_return_values(ast::Expr::BlockExpr(fn_body), struct_name); + replace_body_return_values( + &mut editor, + &syntax_factory, + ast::Expr::BlockExpr(fn_body), + struct_name, + ); } } else { // replace tuple patterns @@ -143,22 +166,30 @@ fn replace_usages( _ => None, }); for tuple_pat in tuple_pats { - ted::replace( + editor.replace( tuple_pat.syntax(), - make::tuple_struct_pat( - make::path_from_text(struct_name), - tuple_pat.fields(), - ) - .clone_for_update() - .syntax(), + syntax_factory + .tuple_struct_pat( + syntax_factory.path_from_text(struct_name), + tuple_pat.fields(), + ) + .syntax(), ); } } - // add imports across modules where needed if let Some((import_scope, path)) = import_data { - insert_use(&import_scope, path, &ctx.config.insert_use); + insert_use_with_editor( + &import_scope, + path, + &ctx.config.insert_use, + &mut editor, + &syntax_factory, + ); } - }) + }); + + editor.add_mappings(syntax_factory.finish_with_mappings()); + edit.add_file_edits(file_id.file_id(ctx.db()), editor); } } @@ -176,7 +207,7 @@ fn node_to_pats(node: SyntaxNode) -> Option> { } fn augment_references_with_imports( - edit: &mut SourceChangeBuilder, + syntax_factory: &SyntaxFactory, ctx: &AssistContext<'_>, references: &[FileReference], struct_name: &str, @@ -191,8 +222,6 @@ fn augment_references_with_imports( ctx.sema.scope(name.syntax()).map(|scope| (name, scope.module())) }) .map(|(name, ref_module)| { - let new_name = edit.make_mut(name); - // if the referenced module is not the same as the target one and has not been seen before, add an import let import_data = if ref_module.nearest_non_block_module(ctx.db()) != *target_module && !visited_modules.contains(&ref_module) @@ -201,8 +230,7 @@ fn augment_references_with_imports( let cfg = ctx.config.find_path_config(ctx.sema.is_nightly(ref_module.krate(ctx.sema.db))); - let import_scope = - ImportScope::find_insert_use_container(new_name.syntax(), &ctx.sema); + let import_scope = ImportScope::find_insert_use_container(name.syntax(), &ctx.sema); let path = ref_module .find_use_path( ctx.sema.db, @@ -211,12 +239,12 @@ fn augment_references_with_imports( cfg, ) .map(|mod_path| { - make::path_concat( + syntax_factory.path_concat( mod_path_to_ast( &mod_path, target_module.krate(ctx.db()).edition(ctx.db()), ), - make::path_from_text(struct_name), + syntax_factory.path_from_text(struct_name), ) }); @@ -225,7 +253,7 @@ fn augment_references_with_imports( None }; - (new_name, import_data) + (name, import_data) }) .collect() } @@ -233,6 +261,7 @@ fn augment_references_with_imports( // Adds the definition of the tuple struct before the parent function. fn add_tuple_struct_def( edit: &mut SourceChangeBuilder, + syntax_factory: &SyntaxFactory, ctx: &AssistContext<'_>, usages: &UsageSearchResult, parent: &SyntaxNode, @@ -248,13 +277,13 @@ fn add_tuple_struct_def( ctx.sema.scope(name.syntax()).map(|scope| scope.module()) }) .any(|module| module.nearest_non_block_module(ctx.db()) != *target_module); - let visibility = if make_struct_pub { Some(make::visibility_pub()) } else { None }; + let visibility = if make_struct_pub { Some(syntax_factory.visibility_pub()) } else { None }; - let field_list = ast::FieldList::TupleFieldList(make::tuple_field_list( - tuple_ty.fields().map(|ty| make::tuple_field(visibility.clone(), ty)), + let field_list = ast::FieldList::TupleFieldList(syntax_factory.tuple_field_list( + tuple_ty.fields().map(|ty| syntax_factory.tuple_field(visibility.clone(), ty)), )); - let struct_name = make::name(struct_name); - let struct_def = make::struct_(visibility, struct_name, None, field_list).clone_for_update(); + let struct_name = syntax_factory.name(struct_name); + let struct_def = syntax_factory.struct_(visibility, struct_name, None, field_list); let indent = IndentLevel::from_node(parent); struct_def.reindent_to(indent); @@ -263,7 +292,12 @@ fn add_tuple_struct_def( } /// Replaces each returned tuple in `body` with the constructor of the tuple struct named `struct_name`. -fn replace_body_return_values(body: ast::Expr, struct_name: &str) { +fn replace_body_return_values( + syntax_editor: &mut SyntaxEditor, + syntax_factory: &SyntaxFactory, + body: ast::Expr, + struct_name: &str, +) { let mut exprs_to_wrap = Vec::new(); let tail_cb = &mut |e: &_| tail_cb_impl(&mut exprs_to_wrap, e); @@ -278,12 +312,11 @@ fn replace_body_return_values(body: ast::Expr, struct_name: &str) { for ret_expr in exprs_to_wrap { if let ast::Expr::TupleExpr(tuple_expr) = &ret_expr { - let struct_constructor = make::expr_call( - make::expr_path(make::ext::ident_path(struct_name)), - make::arg_list(tuple_expr.fields()), - ) - .clone_for_update(); - ted::replace(ret_expr.syntax(), struct_constructor.syntax()); + let struct_constructor = syntax_factory.expr_call( + syntax_factory.expr_path(syntax_factory.ident_path(struct_name)), + syntax_factory.arg_list(tuple_expr.fields()), + ); + syntax_editor.replace(ret_expr.syntax(), struct_constructor.syntax()); } } } diff --git a/src/tools/rust-analyzer/crates/ide-db/src/imports/insert_use.rs b/src/tools/rust-analyzer/crates/ide-db/src/imports/insert_use.rs index db1d599d550d..f26952fa1535 100644 --- a/src/tools/rust-analyzer/crates/ide-db/src/imports/insert_use.rs +++ b/src/tools/rust-analyzer/crates/ide-db/src/imports/insert_use.rs @@ -9,8 +9,9 @@ use syntax::{ Direction, NodeOrToken, SyntaxKind, SyntaxNode, algo, ast::{ self, AstNode, HasAttrs, HasModuleItem, HasVisibility, PathSegmentKind, - edit_in_place::Removable, make, + edit_in_place::Removable, make, syntax_factory::SyntaxFactory, }, + syntax_editor::{Position, SyntaxEditor}, ted, }; @@ -146,6 +147,17 @@ pub fn insert_use(scope: &ImportScope, path: ast::Path, cfg: &InsertUseConfig) { insert_use_with_alias_option(scope, path, cfg, None); } +/// Insert an import path into the given file/node. A `merge` value of none indicates that no import merging is allowed to occur. +pub fn insert_use_with_editor( + scope: &ImportScope, + path: ast::Path, + cfg: &InsertUseConfig, + syntax_editor: &mut SyntaxEditor, + syntax_factory: &SyntaxFactory, +) { + insert_use_with_alias_option_with_editor(scope, path, cfg, None, syntax_editor, syntax_factory); +} + pub fn insert_use_as_alias( scope: &ImportScope, path: ast::Path, @@ -229,6 +241,71 @@ fn insert_use_with_alias_option( insert_use_(scope, use_item, cfg.group); } +fn insert_use_with_alias_option_with_editor( + scope: &ImportScope, + path: ast::Path, + cfg: &InsertUseConfig, + alias: Option, + syntax_editor: &mut SyntaxEditor, + syntax_factory: &SyntaxFactory, +) { + let _p = tracing::info_span!("insert_use_with_alias_option").entered(); + let mut mb = match cfg.granularity { + ImportGranularity::Crate => Some(MergeBehavior::Crate), + ImportGranularity::Module => Some(MergeBehavior::Module), + ImportGranularity::One => Some(MergeBehavior::One), + ImportGranularity::Item => None, + }; + if !cfg.enforce_granularity { + let file_granularity = guess_granularity_from_scope(scope); + mb = match file_granularity { + ImportGranularityGuess::Unknown => mb, + ImportGranularityGuess::Item => None, + ImportGranularityGuess::Module => Some(MergeBehavior::Module), + // We use the user's setting to infer if this is module or item. + ImportGranularityGuess::ModuleOrItem => match mb { + Some(MergeBehavior::Module) | None => mb, + // There isn't really a way to decide between module or item here, so we just pick one. + // FIXME: Maybe it is possible to infer based on semantic analysis? + Some(MergeBehavior::One | MergeBehavior::Crate) => Some(MergeBehavior::Module), + }, + ImportGranularityGuess::Crate => Some(MergeBehavior::Crate), + ImportGranularityGuess::CrateOrModule => match mb { + Some(MergeBehavior::Crate | MergeBehavior::Module) => mb, + Some(MergeBehavior::One) | None => Some(MergeBehavior::Crate), + }, + ImportGranularityGuess::One => Some(MergeBehavior::One), + }; + } + + let use_tree = syntax_factory.use_tree(path, None, alias, false); + if mb == Some(MergeBehavior::One) && use_tree.path().is_some() { + use_tree.wrap_in_tree_list(); + } + let use_item = make::use_(None, None, use_tree).clone_for_update(); + for attr in + scope.required_cfgs.iter().map(|attr| attr.syntax().clone_subtree().clone_for_update()) + { + syntax_editor.insert(Position::first_child_of(use_item.syntax()), attr); + } + + // merge into existing imports if possible + if let Some(mb) = mb { + let filter = |it: &_| !(cfg.skip_glob_imports && ast::Use::is_simple_glob(it)); + for existing_use in + scope.as_syntax_node().children().filter_map(ast::Use::cast).filter(filter) + { + if let Some(merged) = try_merge_imports(&existing_use, &use_item, mb) { + syntax_editor.replace(existing_use.syntax(), merged.syntax()); + return; + } + } + } + // either we weren't allowed to merge or there is no import that fits the merge conditions + // so look for the place we have to insert to + insert_use_with_editor_(scope, use_item, cfg.group, syntax_editor, syntax_factory); +} + pub fn ast_to_remove_for_path_in_use_stmt(path: &ast::Path) -> Option> { // FIXME: improve this if path.parent_path().is_some() { @@ -500,6 +577,127 @@ fn insert_use_(scope: &ImportScope, use_item: ast::Use, group_imports: bool) { } } +fn insert_use_with_editor_( + scope: &ImportScope, + use_item: ast::Use, + group_imports: bool, + syntax_editor: &mut SyntaxEditor, + syntax_factory: &SyntaxFactory, +) { + let scope_syntax = scope.as_syntax_node(); + let insert_use_tree = + use_item.use_tree().expect("`use_item` should have a use tree for `insert_path`"); + let group = ImportGroup::new(&insert_use_tree); + let path_node_iter = scope_syntax + .children() + .filter_map(|node| ast::Use::cast(node.clone()).zip(Some(node))) + .flat_map(|(use_, node)| { + let tree = use_.use_tree()?; + Some((tree, node)) + }); + + if group_imports { + // Iterator that discards anything that's not in the required grouping + // This implementation allows the user to rearrange their import groups as this only takes the first group that fits + let group_iter = path_node_iter + .clone() + .skip_while(|(use_tree, ..)| ImportGroup::new(use_tree) != group) + .take_while(|(use_tree, ..)| ImportGroup::new(use_tree) == group); + + // track the last element we iterated over, if this is still None after the iteration then that means we never iterated in the first place + let mut last = None; + // find the element that would come directly after our new import + let post_insert: Option<(_, SyntaxNode)> = group_iter + .inspect(|(.., node)| last = Some(node.clone())) + .find(|(use_tree, _)| use_tree_cmp(&insert_use_tree, use_tree) != Ordering::Greater); + + if let Some((.., node)) = post_insert { + cov_mark::hit!(insert_group); + // insert our import before that element + return syntax_editor.insert(Position::before(node), use_item.syntax()); + } + if let Some(node) = last { + cov_mark::hit!(insert_group_last); + // there is no element after our new import, so append it to the end of the group + return syntax_editor.insert(Position::after(node), use_item.syntax()); + } + + // the group we were looking for actually doesn't exist, so insert + + let mut last = None; + // find the group that comes after where we want to insert + let post_group = path_node_iter + .inspect(|(.., node)| last = Some(node.clone())) + .find(|(use_tree, ..)| ImportGroup::new(use_tree) > group); + if let Some((.., node)) = post_group { + cov_mark::hit!(insert_group_new_group); + syntax_editor.insert(Position::before(&node), use_item.syntax()); + if let Some(node) = algo::non_trivia_sibling(node.into(), Direction::Prev) { + syntax_editor.insert(Position::after(node), syntax_factory.whitespace("\n")); + } + return; + } + // there is no such group, so append after the last one + if let Some(node) = last { + cov_mark::hit!(insert_group_no_group); + syntax_editor.insert(Position::after(&node), use_item.syntax()); + syntax_editor.insert(Position::after(node), syntax_factory.whitespace("\n")); + return; + } + } else { + // There exists a group, so append to the end of it + if let Some((_, node)) = path_node_iter.last() { + cov_mark::hit!(insert_no_grouping_last); + syntax_editor.insert(Position::after(node), use_item.syntax()); + return; + } + } + + let l_curly = match &scope.kind { + ImportScopeKind::File(_) => None, + // don't insert the imports before the item list/block expr's opening curly brace + ImportScopeKind::Module(item_list) => item_list.l_curly_token(), + // don't insert the imports before the item list's opening curly brace + ImportScopeKind::Block(block) => block.l_curly_token(), + }; + // there are no imports in this file at all + // so put the import after all inner module attributes and possible license header comments + if let Some(last_inner_element) = scope_syntax + .children_with_tokens() + // skip the curly brace + .skip(l_curly.is_some() as usize) + .take_while(|child| match child { + NodeOrToken::Node(node) => is_inner_attribute(node.clone()), + NodeOrToken::Token(token) => { + [SyntaxKind::WHITESPACE, SyntaxKind::COMMENT, SyntaxKind::SHEBANG] + .contains(&token.kind()) + } + }) + .filter(|child| child.as_token().is_none_or(|t| t.kind() != SyntaxKind::WHITESPACE)) + .last() + { + cov_mark::hit!(insert_empty_inner_attr); + syntax_editor.insert(Position::after(&last_inner_element), use_item.syntax()); + syntax_editor.insert(Position::after(last_inner_element), syntax_factory.whitespace("\n")); + } else { + match l_curly { + Some(b) => { + cov_mark::hit!(insert_empty_module); + syntax_editor.insert(Position::after(&b), syntax_factory.whitespace("\n")); + syntax_editor.insert(Position::after(&b), use_item.syntax()); + } + None => { + cov_mark::hit!(insert_empty_file); + syntax_editor.insert( + Position::first_child_of(scope_syntax), + syntax_factory.whitespace("\n\n"), + ); + syntax_editor.insert(Position::first_child_of(scope_syntax), use_item.syntax()); + } + } + } +} + fn is_inner_attribute(node: SyntaxNode) -> bool { ast::Attr::cast(node).map(|attr| attr.kind()) == Some(ast::AttrKind::Inner) } diff --git a/src/tools/rust-analyzer/crates/syntax/src/ast/syntax_factory/constructors.rs b/src/tools/rust-analyzer/crates/syntax/src/ast/syntax_factory/constructors.rs index ad9b9054a8f5..6e17d262a79d 100644 --- a/src/tools/rust-analyzer/crates/syntax/src/ast/syntax_factory/constructors.rs +++ b/src/tools/rust-analyzer/crates/syntax/src/ast/syntax_factory/constructors.rs @@ -75,6 +75,24 @@ impl SyntaxFactory { make::path_from_text(text).clone_for_update() } + pub fn path_concat(&self, first: ast::Path, second: ast::Path) -> ast::Path { + make::path_concat(first, second).clone_for_update() + } + + pub fn visibility_pub(&self) -> ast::Visibility { + make::visibility_pub() + } + + pub fn struct_( + &self, + visibility: Option, + strukt_name: ast::Name, + generic_param_list: Option, + field_list: ast::FieldList, + ) -> ast::Struct { + make::struct_(visibility, strukt_name, generic_param_list, field_list).clone_for_update() + } + pub fn expr_field(&self, receiver: ast::Expr, field: &str) -> ast::FieldExpr { let ast::Expr::FieldExpr(ast) = make::expr_field(receiver.clone(), field).clone_for_update() From 9c468be3630acc6767bac520a6f3d9f9d91a2875 Mon Sep 17 00:00:00 2001 From: bit-aloo Date: Thu, 12 Feb 2026 10:38:36 +0530 Subject: [PATCH 127/265] move to edit::AstNodeEdit from edit_in_place::Indent --- .../src/handlers/convert_tuple_return_type_to_struct.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_tuple_return_type_to_struct.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_tuple_return_type_to_struct.rs index ad983df8a57a..1740cd024a89 100644 --- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_tuple_return_type_to_struct.rs +++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_tuple_return_type_to_struct.rs @@ -12,7 +12,11 @@ use ide_db::{ }; use syntax::{ AstNode, SyntaxNode, - ast::{self, HasName, edit::IndentLevel, edit_in_place::Indent, syntax_factory::SyntaxFactory}, + ast::{ + self, HasName, + edit::{AstNodeEdit, IndentLevel}, + syntax_factory::SyntaxFactory, + }, match_ast, syntax_editor::SyntaxEditor, }; @@ -286,7 +290,7 @@ fn add_tuple_struct_def( let struct_def = syntax_factory.struct_(visibility, struct_name, None, field_list); let indent = IndentLevel::from_node(parent); - struct_def.reindent_to(indent); + let struct_def = struct_def.indent(indent); edit.insert(parent.text_range().start(), format!("{struct_def}\n\n{indent}")); } From 1eddc1798998c9faed8725d249640ff7c63548ab Mon Sep 17 00:00:00 2001 From: xonx <119700621+xonx4l@users.noreply.github.com> Date: Thu, 12 Feb 2026 12:10:08 +0000 Subject: [PATCH 128/265] fix GATs logic --- .../src/error_reporting/infer/mod.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs index 5597fe488c1a..2475bc8f51e5 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs @@ -58,6 +58,7 @@ use rustc_hir::def_id::DefId; use rustc_hir::intravisit::Visitor; use rustc_hir::lang_items::LangItem; use rustc_hir::{self as hir}; +use rustc_infer::infer::DefineOpaqueTypes; use rustc_macros::extension; use rustc_middle::bug; use rustc_middle::dep_graph::DepContext; @@ -278,6 +279,21 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { let is_shadowed = self.infcx.probe(|_| { let impl_substs = self.infcx.fresh_args_for_item(DUMMY_SP, impl_def_id); + let impl_trait_ref = + tcx.impl_trait_ref(impl_def_id).instantiate(tcx, impl_substs); + + let expected_trait_ref = alias.trait_ref(tcx); + + if let Err(_) = self.infcx.at(&ObligationCause::dummy(), param_env).eq( + DefineOpaqueTypes::No, + expected_trait_ref, + impl_trait_ref, + ) { + return false; + } + + let trait_def_id = alias.trait_def_id(tcx); + let rebased_args = alias.args.rebase_onto(tcx, trait_def_id, impl_substs); let leaf_def = match specialization_graph::assoc_def(tcx, impl_def_id, alias.def_id) { @@ -286,7 +302,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { }; let impl_item_def_id = leaf_def.item.def_id; - let impl_assoc_ty = tcx.type_of(impl_item_def_id).instantiate(tcx, impl_substs); + let impl_assoc_ty = tcx.type_of(impl_item_def_id).instantiate(tcx, rebased_args); self.infcx.can_eq(param_env, impl_assoc_ty, concrete) }); From 7a2f2fe754ada6d7d93e3a19bb171c3244ea2ee6 Mon Sep 17 00:00:00 2001 From: xonx <119700621+xonx4l@users.noreply.github.com> Date: Thu, 12 Feb 2026 12:20:36 +0000 Subject: [PATCH 129/265] fix tidy --- .../rustc_trait_selection/src/error_reporting/infer/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs index 2475bc8f51e5..32bbc18f7469 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs @@ -279,8 +279,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { let is_shadowed = self.infcx.probe(|_| { let impl_substs = self.infcx.fresh_args_for_item(DUMMY_SP, impl_def_id); - let impl_trait_ref = - tcx.impl_trait_ref(impl_def_id).instantiate(tcx, impl_substs); + let impl_trait_ref = tcx.impl_trait_ref(impl_def_id).instantiate(tcx, impl_substs); let expected_trait_ref = alias.trait_ref(tcx); From 293e9506204aa8c33a23887f4a74163f6a63c0b7 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 12 Feb 2026 11:16:18 +0000 Subject: [PATCH 130/265] Remove SelfProfilerRef from CodegenContext It can't be serialized to a file. --- src/back/lto.rs | 16 +++++++++++----- src/back/write.rs | 22 ++++++++++------------ src/lib.rs | 12 +++++++++--- 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/back/lto.rs b/src/back/lto.rs index dda777a54002..9a9040708ef8 100644 --- a/src/back/lto.rs +++ b/src/back/lto.rs @@ -30,6 +30,7 @@ use rustc_codegen_ssa::back::write::{CodegenContext, FatLtoInput, SharedEmitter} use rustc_codegen_ssa::traits::*; use rustc_codegen_ssa::{ModuleCodegen, ModuleKind, looks_like_rust_object_file}; use rustc_data_structures::memmap::Mmap; +use rustc_data_structures::profiling::SelfProfilerRef; use rustc_errors::{DiagCtxt, DiagCtxtHandle}; use rustc_log::tracing::info; use rustc_middle::bug; @@ -112,6 +113,7 @@ fn save_as_file(obj: &[u8], path: &Path) -> Result<(), LtoBitcodeFromRlib> { /// for further optimization. pub(crate) fn run_fat( cgcx: &CodegenContext, + prof: &SelfProfilerRef, shared_emitter: &SharedEmitter, each_linked_rlib_for_lto: &[PathBuf], modules: Vec>, @@ -123,6 +125,7 @@ pub(crate) fn run_fat( lto_data.symbols_below_threshold.iter().map(|c| c.as_ptr()).collect::>();*/ fat_lto( cgcx, + prof, dcx, modules, lto_data.upstream_modules, @@ -133,13 +136,14 @@ pub(crate) fn run_fat( fn fat_lto( cgcx: &CodegenContext, + prof: &SelfProfilerRef, _dcx: DiagCtxtHandle<'_>, modules: Vec>, mut serialized_modules: Vec<(SerializedModule, CString)>, tmp_path: TempDir, //symbols_below_threshold: &[String], ) -> ModuleCodegen { - let _timer = cgcx.prof.generic_activity("GCC_fat_lto_build_monolithic_module"); + let _timer = prof.generic_activity("GCC_fat_lto_build_monolithic_module"); info!("going for a fat lto"); // Sort out all our lists of incoming modules into two lists. @@ -223,8 +227,7 @@ fn fat_lto( // We add the object files and save in should_combine_object_files that we should combine // them into a single object file when compiling later. for (bc_decoded, name) in serialized_modules { - let _timer = cgcx - .prof + let _timer = prof .generic_activity_with_arg_recorder("GCC_fat_lto_link_module", |recorder| { recorder.record_arg(format!("{:?}", name)) }); @@ -284,6 +287,7 @@ impl ModuleBufferMethods for ModuleBuffer { /// can simply be copied over from the incr. comp. cache. pub(crate) fn run_thin( cgcx: &CodegenContext, + prof: &SelfProfilerRef, dcx: DiagCtxtHandle<'_>, each_linked_rlib_for_lto: &[PathBuf], modules: Vec<(String, ThinBuffer)>, @@ -298,6 +302,7 @@ pub(crate) fn run_thin( } thin_lto( cgcx, + prof, dcx, modules, lto_data.upstream_modules, @@ -345,7 +350,8 @@ pub(crate) fn prepare_thin(module: ModuleCodegen) -> (String, ThinBu /// all of the `LtoModuleCodegen` units returned below and destroyed once /// they all go out of scope. fn thin_lto( - cgcx: &CodegenContext, + _cgcx: &CodegenContext, + prof: &SelfProfilerRef, _dcx: DiagCtxtHandle<'_>, modules: Vec<(String, ThinBuffer)>, serialized_modules: Vec<(SerializedModule, CString)>, @@ -353,7 +359,7 @@ fn thin_lto( cached_modules: Vec<(SerializedModule, WorkProduct)>, //_symbols_below_threshold: &[String], ) -> (Vec>, Vec) { - let _timer = cgcx.prof.generic_activity("LLVM_thin_lto_global_analysis"); + let _timer = prof.generic_activity("LLVM_thin_lto_global_analysis"); info!("going for that thin, thin LTO"); /*let green_modules: FxHashMap<_, _> = diff --git a/src/back/write.rs b/src/back/write.rs index 5e9644723475..ddf13558027b 100644 --- a/src/back/write.rs +++ b/src/back/write.rs @@ -6,6 +6,7 @@ use rustc_codegen_ssa::back::write::{ BitcodeSection, CodegenContext, EmitObj, ModuleConfig, SharedEmitter, }; use rustc_codegen_ssa::{CompiledModule, ModuleCodegen}; +use rustc_data_structures::profiling::SelfProfilerRef; use rustc_errors::DiagCtxt; use rustc_fs_util::link_or_copy; use rustc_log::tracing::debug; @@ -18,6 +19,7 @@ use crate::{GccContext, LtoMode}; pub(crate) fn codegen( cgcx: &CodegenContext, + prof: &SelfProfilerRef, shared_emitter: &SharedEmitter, module: ModuleCodegen, config: &ModuleConfig, @@ -25,7 +27,7 @@ pub(crate) fn codegen( let dcx = DiagCtxt::new(Box::new(shared_emitter.clone())); let dcx = dcx.handle(); - let _timer = cgcx.prof.generic_activity_with_arg("GCC_module_codegen", &*module.name); + let _timer = prof.generic_activity_with_arg("GCC_module_codegen", &*module.name); { let context = &module.module_llvm.context; @@ -44,9 +46,8 @@ pub(crate) fn codegen( ); if config.bitcode_needed() { - let _timer = cgcx - .prof - .generic_activity_with_arg("GCC_module_codegen_make_bitcode", &*module.name); + let _timer = + prof.generic_activity_with_arg("GCC_module_codegen_make_bitcode", &*module.name); // TODO(antoyo) /*if let Some(bitcode_filename) = bc_out.file_name() { @@ -58,8 +59,7 @@ pub(crate) fn codegen( }*/ if config.emit_bc || config.emit_obj == EmitObj::Bitcode { - let _timer = cgcx - .prof + let _timer = prof .generic_activity_with_arg("GCC_module_codegen_emit_bitcode", &*module.name); if lto_supported { context.add_command_line_option("-flto=auto"); @@ -70,8 +70,7 @@ pub(crate) fn codegen( } if config.emit_obj == EmitObj::ObjectCode(BitcodeSection::Full) { - let _timer = cgcx - .prof + let _timer = prof .generic_activity_with_arg("GCC_module_codegen_embed_bitcode", &*module.name); if lto_supported { // TODO(antoyo): maybe we should call embed_bitcode to have the proper iOS fixes? @@ -98,7 +97,7 @@ pub(crate) fn codegen( if config.emit_asm { let _timer = - cgcx.prof.generic_activity_with_arg("GCC_module_codegen_emit_asm", &*module.name); + prof.generic_activity_with_arg("GCC_module_codegen_emit_asm", &*module.name); let path = cgcx.output_filenames.temp_path_for_cgu( OutputType::Assembly, &module.name, @@ -109,9 +108,8 @@ pub(crate) fn codegen( match config.emit_obj { EmitObj::ObjectCode(_) => { - let _timer = cgcx - .prof - .generic_activity_with_arg("GCC_module_codegen_emit_obj", &*module.name); + let _timer = + prof.generic_activity_with_arg("GCC_module_codegen_emit_obj", &*module.name); if env::var("CG_GCCJIT_DUMP_MODULE_NAMES").as_deref() == Ok("1") { println!("Module {}", module.name); } diff --git a/src/lib.rs b/src/lib.rs index d490650c37f7..24a065d69eca 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -90,6 +90,7 @@ use rustc_codegen_ssa::target_features::cfg_target_feature; use rustc_codegen_ssa::traits::{CodegenBackend, ExtraBackendMethods, WriteBackendMethods}; use rustc_codegen_ssa::{CodegenResults, CompiledModule, ModuleCodegen, TargetConfig}; use rustc_data_structures::fx::FxIndexMap; +use rustc_data_structures::profiling::SelfProfilerRef; use rustc_data_structures::sync::IntoDynSyncSend; use rustc_errors::DiagCtxtHandle; use rustc_middle::dep_graph::{WorkProduct, WorkProductId}; @@ -427,6 +428,7 @@ impl WriteBackendMethods for GccCodegenBackend { fn run_and_optimize_fat_lto( cgcx: &CodegenContext, + prof: &SelfProfilerRef, shared_emitter: &SharedEmitter, _tm_factory: TargetMachineFactoryFn, // FIXME(bjorn3): Limit LTO exports to these symbols @@ -434,11 +436,12 @@ impl WriteBackendMethods for GccCodegenBackend { each_linked_rlib_for_lto: &[PathBuf], modules: Vec>, ) -> ModuleCodegen { - back::lto::run_fat(cgcx, shared_emitter, each_linked_rlib_for_lto, modules) + back::lto::run_fat(cgcx, prof, shared_emitter, each_linked_rlib_for_lto, modules) } fn run_thin_lto( cgcx: &CodegenContext, + prof: &SelfProfilerRef, dcx: DiagCtxtHandle<'_>, // FIXME(bjorn3): Limit LTO exports to these symbols _exported_symbols_for_lto: &[String], @@ -446,7 +449,7 @@ impl WriteBackendMethods for GccCodegenBackend { modules: Vec<(String, Self::ThinBuffer)>, cached_modules: Vec<(SerializedModule, WorkProduct)>, ) -> (Vec>, Vec) { - back::lto::run_thin(cgcx, dcx, each_linked_rlib_for_lto, modules, cached_modules) + back::lto::run_thin(cgcx, prof, dcx, each_linked_rlib_for_lto, modules, cached_modules) } fn print_pass_timings(&self) { @@ -459,6 +462,7 @@ impl WriteBackendMethods for GccCodegenBackend { fn optimize( _cgcx: &CodegenContext, + _prof: &SelfProfilerRef, _shared_emitter: &SharedEmitter, module: &mut ModuleCodegen, config: &ModuleConfig, @@ -468,6 +472,7 @@ impl WriteBackendMethods for GccCodegenBackend { fn optimize_thin( cgcx: &CodegenContext, + _prof: &SelfProfilerRef, _shared_emitter: &SharedEmitter, _tm_factory: TargetMachineFactoryFn, thin: ThinModule, @@ -477,11 +482,12 @@ impl WriteBackendMethods for GccCodegenBackend { fn codegen( cgcx: &CodegenContext, + prof: &SelfProfilerRef, shared_emitter: &SharedEmitter, module: ModuleCodegen, config: &ModuleConfig, ) -> CompiledModule { - back::write::codegen(cgcx, shared_emitter, module, config) + back::write::codegen(cgcx, prof, shared_emitter, module, config) } fn prepare_thin(module: ModuleCodegen) -> (String, Self::ThinBuffer) { From 61df37fafa98736f2ee5de1f117935efb0598f02 Mon Sep 17 00:00:00 2001 From: Chayim Refael Friedman Date: Thu, 12 Feb 2026 23:17:55 +0200 Subject: [PATCH 131/265] Don't assume `extern fn`s parameters are patterns Unlike normal fns, they should be bare identifiers. --- .../crates/hir-def/src/expr_store/lower.rs | 42 +++++++++++++++++-- .../crates/hir-ty/src/tests/regression.rs | 13 ++++++ 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/src/tools/rust-analyzer/crates/hir-def/src/expr_store/lower.rs b/src/tools/rust-analyzer/crates/hir-def/src/expr_store/lower.rs index 701586c25838..1cecd1976b40 100644 --- a/src/tools/rust-analyzer/crates/hir-def/src/expr_store/lower.rs +++ b/src/tools/rust-analyzer/crates/hir-def/src/expr_store/lower.rs @@ -32,8 +32,8 @@ use triomphe::Arc; use tt::TextRange; use crate::{ - AdtId, BlockId, BlockLoc, DefWithBodyId, FunctionId, GenericDefId, ImplId, MacroId, - ModuleDefId, ModuleId, TraitId, TypeAliasId, UnresolvedMacro, + AdtId, BlockId, BlockLoc, DefWithBodyId, FunctionId, GenericDefId, ImplId, ItemContainerId, + MacroId, ModuleDefId, ModuleId, TraitId, TypeAliasId, UnresolvedMacro, attrs::AttrFlags, db::DefDatabase, expr_store::{ @@ -141,9 +141,19 @@ pub(super) fn lower_body( source_map_self_param = Some(collector.expander.in_file(AstPtr::new(&self_param_syn))); } + let is_extern = matches!( + owner, + DefWithBodyId::FunctionId(id) + if matches!(id.loc(db).container, ItemContainerId::ExternBlockId(_)), + ); + for param in param_list.params() { if collector.check_cfg(¶m) { - let param_pat = collector.collect_pat_top(param.pat()); + let param_pat = if is_extern { + collector.collect_extern_fn_param(param.pat()) + } else { + collector.collect_pat_top(param.pat()) + }; params.push(param_pat); } } @@ -2248,6 +2258,32 @@ impl<'db> ExprCollector<'db> { } } + fn collect_extern_fn_param(&mut self, pat: Option) -> PatId { + // `extern` functions cannot have pattern-matched parameters, and furthermore, the identifiers + // in their parameters are always interpreted as bindings, even if in a normal function they + // won't be, because they would refer to a path pattern. + let Some(pat) = pat else { return self.missing_pat() }; + + match &pat { + ast::Pat::IdentPat(bp) => { + // FIXME: Emit an error if `!bp.is_simple_ident()`. + + let name = bp.name().map(|nr| nr.as_name()).unwrap_or_else(Name::missing); + let hygiene = bp + .name() + .map(|name| self.hygiene_id_for(name.syntax().text_range())) + .unwrap_or(HygieneId::ROOT); + let binding = self.alloc_binding(name, BindingAnnotation::Unannotated, hygiene); + let pat = + self.alloc_pat(Pat::Bind { id: binding, subpat: None }, AstPtr::new(&pat)); + self.add_definition_to_binding(binding, pat); + pat + } + // FIXME: Emit an error. + _ => self.missing_pat(), + } + } + // region: patterns fn collect_pat_top(&mut self, pat: Option) -> PatId { diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/tests/regression.rs b/src/tools/rust-analyzer/crates/hir-ty/src/tests/regression.rs index 3b73550ad40d..5291bf80e821 100644 --- a/src/tools/rust-analyzer/crates/hir-ty/src/tests/regression.rs +++ b/src/tools/rust-analyzer/crates/hir-ty/src/tests/regression.rs @@ -2757,3 +2757,16 @@ where "#]], ); } + +#[test] +fn extern_fns_cannot_have_param_patterns() { + check_no_mismatches( + r#" +pub(crate) struct Builder<'a>(&'a ()); + +unsafe extern "C" { + pub(crate) fn foo<'a>(Builder: &Builder<'a>); +} + "#, + ); +} From 4fc780d97cc7c0d9244be42164286a8927855bb2 Mon Sep 17 00:00:00 2001 From: Chayim Refael Friedman Date: Fri, 13 Feb 2026 00:26:49 +0200 Subject: [PATCH 132/265] Do not resolve proc macros in value ns (as functions), only in macro ns, outside their defining crate The main impact is that syntax highlighting will show it as a macro and not a function. --- .../crates/hir-def/src/item_scope.rs | 5 +++ .../crates/hir-def/src/nameres.rs | 8 +++++ .../crates/hir-def/src/nameres/collector.rs | 12 +++++-- .../hir-def/src/nameres/tests/macros.rs | 6 ++-- .../crates/hir-def/src/resolver.rs | 11 ++++-- .../crates/hir-ty/src/tests/simple.rs | 35 +++++++++++++++++++ .../crates/ide/src/references.rs | 2 ++ .../test_data/highlight_macros.html | 3 +- .../ide/src/syntax_highlighting/tests.rs | 8 ++++- 9 files changed, 79 insertions(+), 11 deletions(-) diff --git a/src/tools/rust-analyzer/crates/hir-def/src/item_scope.rs b/src/tools/rust-analyzer/crates/hir-def/src/item_scope.rs index 1303773b59d4..b11a8bcd9097 100644 --- a/src/tools/rust-analyzer/crates/hir-def/src/item_scope.rs +++ b/src/tools/rust-analyzer/crates/hir-def/src/item_scope.rs @@ -483,6 +483,11 @@ impl ItemScope { self.declarations.push(def) } + pub(crate) fn remove_from_value_ns(&mut self, name: &Name, def: ModuleDefId) { + let entry = self.values.shift_remove(name); + assert!(entry.is_some_and(|entry| entry.def == def)) + } + pub(crate) fn get_legacy_macro(&self, name: &Name) -> Option<&[MacroId]> { self.legacy_macros.get(name).map(|it| &**it) } diff --git a/src/tools/rust-analyzer/crates/hir-def/src/nameres.rs b/src/tools/rust-analyzer/crates/hir-def/src/nameres.rs index 1e3ea50c5a0f..5fda1beab413 100644 --- a/src/tools/rust-analyzer/crates/hir-def/src/nameres.rs +++ b/src/tools/rust-analyzer/crates/hir-def/src/nameres.rs @@ -211,6 +211,7 @@ struct DefMapCrateData { /// Side table for resolving derive helpers. exported_derives: FxHashMap>, fn_proc_macro_mapping: FxHashMap, + fn_proc_macro_mapping_back: FxHashMap, /// Custom tool modules registered with `#![register_tool]`. registered_tools: Vec, @@ -230,6 +231,7 @@ impl DefMapCrateData { Self { exported_derives: FxHashMap::default(), fn_proc_macro_mapping: FxHashMap::default(), + fn_proc_macro_mapping_back: FxHashMap::default(), registered_tools: PREDEFINED_TOOLS.iter().map(|it| Symbol::intern(it)).collect(), unstable_features: FxHashSet::default(), rustc_coherence_is_core: false, @@ -244,6 +246,7 @@ impl DefMapCrateData { let Self { exported_derives, fn_proc_macro_mapping, + fn_proc_macro_mapping_back, registered_tools, unstable_features, rustc_coherence_is_core: _, @@ -254,6 +257,7 @@ impl DefMapCrateData { } = self; exported_derives.shrink_to_fit(); fn_proc_macro_mapping.shrink_to_fit(); + fn_proc_macro_mapping_back.shrink_to_fit(); registered_tools.shrink_to_fit(); unstable_features.shrink_to_fit(); } @@ -570,6 +574,10 @@ impl DefMap { self.data.fn_proc_macro_mapping.get(&id).copied() } + pub fn proc_macro_as_fn(&self, id: ProcMacroId) -> Option { + self.data.fn_proc_macro_mapping_back.get(&id).copied() + } + pub fn krate(&self) -> Crate { self.krate } diff --git a/src/tools/rust-analyzer/crates/hir-def/src/nameres/collector.rs b/src/tools/rust-analyzer/crates/hir-def/src/nameres/collector.rs index f51524c1b551..e672e83f0194 100644 --- a/src/tools/rust-analyzer/crates/hir-def/src/nameres/collector.rs +++ b/src/tools/rust-analyzer/crates/hir-def/src/nameres/collector.rs @@ -634,6 +634,7 @@ impl<'db> DefCollector<'db> { crate_data.exported_derives.insert(proc_macro_id.into(), helpers); } crate_data.fn_proc_macro_mapping.insert(fn_id, proc_macro_id); + crate_data.fn_proc_macro_mapping_back.insert(proc_macro_id, fn_id); } /// Define a macro with `macro_rules`. @@ -2095,6 +2096,8 @@ impl ModCollector<'_, '_> { let vis = resolve_vis(def_map, local_def_map, &self.item_tree[it.visibility]); + update_def(self.def_collector, fn_id.into(), &it.name, vis, false); + if self.def_collector.def_map.block.is_none() && self.def_collector.is_proc_macro && self.module_id == self.def_collector.def_map.root @@ -2105,9 +2108,14 @@ impl ModCollector<'_, '_> { InFile::new(self.file_id(), id), fn_id, ); - } - update_def(self.def_collector, fn_id.into(), &it.name, vis, false); + // A proc macro is implemented as a function, but it's treated as a macro, not a function. + // You cannot call it like a function, for example, except in its defining crate. + // So we keep the function definition, but remove it from the scope, leaving only the macro. + self.def_collector.def_map[module_id] + .scope + .remove_from_value_ns(&it.name, fn_id.into()); + } } ModItemId::Struct(id) => { let it = &self.item_tree[id]; diff --git a/src/tools/rust-analyzer/crates/hir-def/src/nameres/tests/macros.rs b/src/tools/rust-analyzer/crates/hir-def/src/nameres/tests/macros.rs index a943f6f0ac01..a013f8b2bc1a 100644 --- a/src/tools/rust-analyzer/crates/hir-def/src/nameres/tests/macros.rs +++ b/src/tools/rust-analyzer/crates/hir-def/src/nameres/tests/macros.rs @@ -1068,10 +1068,8 @@ pub fn derive_macro_2(_item: TokenStream) -> TokenStream { - AnotherTrait : macro# - DummyTrait : macro# - TokenStream : type value - - attribute_macro : value macro# - - derive_macro : value - - derive_macro_2 : value - - function_like_macro : value macro! + - attribute_macro : macro# + - function_like_macro : macro! "#]], ); } diff --git a/src/tools/rust-analyzer/crates/hir-def/src/resolver.rs b/src/tools/rust-analyzer/crates/hir-def/src/resolver.rs index 2ac0f90fb209..c10a0ac3eb51 100644 --- a/src/tools/rust-analyzer/crates/hir-def/src/resolver.rs +++ b/src/tools/rust-analyzer/crates/hir-def/src/resolver.rs @@ -1153,7 +1153,7 @@ impl<'db> ModuleItemMap<'db> { ); match unresolved_idx { None => { - let (value, import) = to_value_ns(module_def)?; + let (value, import) = to_value_ns(module_def, self.def_map)?; Some((ResolveValueResult::ValueNs(value, import), prefix_info)) } Some(unresolved_idx) => { @@ -1194,8 +1194,13 @@ impl<'db> ModuleItemMap<'db> { } } -fn to_value_ns(per_ns: PerNs) -> Option<(ValueNs, Option)> { - let (def, import) = per_ns.take_values_import()?; +fn to_value_ns(per_ns: PerNs, def_map: &DefMap) -> Option<(ValueNs, Option)> { + let (def, import) = per_ns.take_values_import().or_else(|| { + let Some(MacroId::ProcMacroId(proc_macro)) = per_ns.take_macros() else { return None }; + // If we cannot resolve to value ns, but we can resolve to a proc macro, and this is the crate + // defining this proc macro - inside this crate, we should treat the macro as a function. + def_map.proc_macro_as_fn(proc_macro).map(|it| (ModuleDefId::FunctionId(it), None)) + })?; let res = match def { ModuleDefId::FunctionId(it) => ValueNs::FunctionId(it), ModuleDefId::AdtId(AdtId::StructId(it)) => ValueNs::StructId(it), diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/tests/simple.rs b/src/tools/rust-analyzer/crates/hir-ty/src/tests/simple.rs index 7d4f04268af9..dab8bdb54b69 100644 --- a/src/tools/rust-analyzer/crates/hir-ty/src/tests/simple.rs +++ b/src/tools/rust-analyzer/crates/hir-ty/src/tests/simple.rs @@ -4074,3 +4074,38 @@ static S: &[u8; 158] = include_bytes!("/foo/bar/baz.txt"); "#, ); } + +#[test] +fn proc_macros_are_functions_inside_defining_crate_and_macros_outside() { + check_types( + r#" +//- /pm.rs crate:pm +#![crate_type = "proc-macro"] + +#[proc_macro_attribute] +pub fn proc_macro() {} + +fn foo() { + proc_macro; + // ^^^^^^^^^^ fn proc_macro() +} + +mod bar { + use super::proc_macro; + + fn baz() { + super::proc_macro; + // ^^^^^^^^^^^^^^^^^ fn proc_macro() + proc_macro; + // ^^^^^^^^^^ fn proc_macro() + } +} + +//- /lib.rs crate:lib deps:pm +fn foo() { + pm::proc_macro; + // ^^^^^^^^^^^^^^ {unknown} +} + "#, + ); +} diff --git a/src/tools/rust-analyzer/crates/ide/src/references.rs b/src/tools/rust-analyzer/crates/ide/src/references.rs index 5443021988d4..38ee09703398 100644 --- a/src/tools/rust-analyzer/crates/ide/src/references.rs +++ b/src/tools/rust-analyzer/crates/ide/src/references.rs @@ -2073,6 +2073,7 @@ fn func() {} expect![[r#" identity Attribute FileId(1) 1..107 32..40 + FileId(0) 17..25 import FileId(0) 43..51 "#]], ); @@ -2103,6 +2104,7 @@ mirror$0! {} expect![[r#" mirror ProcMacro FileId(1) 1..77 22..28 + FileId(0) 17..23 import FileId(0) 26..32 "#]], ) diff --git a/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_macros.html b/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_macros.html index 59612634fda3..740a6272a79a 100644 --- a/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_macros.html +++ b/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/test_data/highlight_macros.html @@ -41,7 +41,8 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd .invalid_escape_sequence { color: #FC5555; text-decoration: wavy underline; } .unresolved_reference { color: #FC5555; text-decoration: wavy underline; } -

use proc_macros::{mirror, identity, DeriveIdentity};
+
use proc_macros::{mirror, identity, DeriveIdentity};
+use pm::proc_macro;
 
 mirror! {
     {
diff --git a/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/tests.rs b/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/tests.rs
index 8b529cf10f7f..c6aebd0b0cd1 100644
--- a/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/tests.rs
+++ b/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/tests.rs
@@ -55,8 +55,9 @@ fn macros() {
         r#"
 //- proc_macros: mirror, identity, derive_identity
 //- minicore: fmt, include, concat
-//- /lib.rs crate:lib
+//- /lib.rs crate:lib deps:pm
 use proc_macros::{mirror, identity, DeriveIdentity};
+use pm::proc_macro;
 
 mirror! {
     {
@@ -126,6 +127,11 @@ fn main() {
 //- /foo/foo.rs crate:foo
 mod foo {}
 use self::foo as bar;
+//- /pm.rs crate:pm
+#![crate_type = "proc-macro"]
+
+#[proc_macro_attribute]
+pub fn proc_macro() {}
 "#,
         expect_file!["./test_data/highlight_macros.html"],
         false,

From b76642de1572e29aba4c2f423c64d014a19fc5e0 Mon Sep 17 00:00:00 2001
From: Chayim Refael Friedman 
Date: Fri, 13 Feb 2026 00:31:51 +0200
Subject: [PATCH 133/265] Cleanup unnecessary code

---
 .../crates/hir-def/src/resolver.rs            | 70 +++++++++----------
 .../hir-ty/src/diagnostics/unsafe_check.rs    |  2 +-
 .../rust-analyzer/crates/hir-ty/src/infer.rs  |  4 +-
 .../crates/hir-ty/src/infer/path.rs           |  4 +-
 .../crates/hir-ty/src/lower/path.rs           | 10 ++-
 .../crates/hir-ty/src/mir/lower.rs            |  4 +-
 .../hir-ty/src/mir/lower/pattern_matching.rs  |  4 +-
 7 files changed, 45 insertions(+), 53 deletions(-)

diff --git a/src/tools/rust-analyzer/crates/hir-def/src/resolver.rs b/src/tools/rust-analyzer/crates/hir-def/src/resolver.rs
index c10a0ac3eb51..d32e53fc6bee 100644
--- a/src/tools/rust-analyzer/crates/hir-def/src/resolver.rs
+++ b/src/tools/rust-analyzer/crates/hir-def/src/resolver.rs
@@ -32,7 +32,7 @@ use crate::{
         BindingId, ExprId, LabelId,
         generics::{GenericParams, TypeOrConstParamData},
     },
-    item_scope::{BUILTIN_SCOPE, BuiltinShadowMode, ImportOrExternCrate, ImportOrGlob, ItemScope},
+    item_scope::{BUILTIN_SCOPE, BuiltinShadowMode, ImportOrExternCrate, ItemScope},
     lang_item::LangItemTarget,
     nameres::{DefMap, LocalDefMap, MacroSubNs, ResolvePathResultPrefixInfo, block_def_map},
     per_ns::PerNs,
@@ -111,8 +111,8 @@ pub enum TypeNs {
 
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub enum ResolveValueResult {
-    ValueNs(ValueNs, Option),
-    Partial(TypeNs, usize, Option),
+    ValueNs(ValueNs),
+    Partial(TypeNs, usize),
 }
 
 #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
@@ -332,20 +332,17 @@ impl<'db> Resolver<'db> {
             Path::Normal(it) => &it.mod_path,
             Path::LangItem(l, None) => {
                 return Some((
-                    ResolveValueResult::ValueNs(
-                        match *l {
-                            LangItemTarget::FunctionId(it) => ValueNs::FunctionId(it),
-                            LangItemTarget::StaticId(it) => ValueNs::StaticId(it),
-                            LangItemTarget::StructId(it) => ValueNs::StructId(it),
-                            LangItemTarget::EnumVariantId(it) => ValueNs::EnumVariantId(it),
-                            LangItemTarget::UnionId(_)
-                            | LangItemTarget::ImplId(_)
-                            | LangItemTarget::TypeAliasId(_)
-                            | LangItemTarget::TraitId(_)
-                            | LangItemTarget::EnumId(_) => return None,
-                        },
-                        None,
-                    ),
+                    ResolveValueResult::ValueNs(match *l {
+                        LangItemTarget::FunctionId(it) => ValueNs::FunctionId(it),
+                        LangItemTarget::StaticId(it) => ValueNs::StaticId(it),
+                        LangItemTarget::StructId(it) => ValueNs::StructId(it),
+                        LangItemTarget::EnumVariantId(it) => ValueNs::EnumVariantId(it),
+                        LangItemTarget::UnionId(_)
+                        | LangItemTarget::ImplId(_)
+                        | LangItemTarget::TypeAliasId(_)
+                        | LangItemTarget::TraitId(_)
+                        | LangItemTarget::EnumId(_) => return None,
+                    }),
                     ResolvePathResultPrefixInfo::default(),
                 ));
             }
@@ -363,7 +360,7 @@ impl<'db> Resolver<'db> {
                 };
                 // Remaining segments start from 0 because lang paths have no segments other than the remaining.
                 return Some((
-                    ResolveValueResult::Partial(type_ns, 0, None),
+                    ResolveValueResult::Partial(type_ns, 0),
                     ResolvePathResultPrefixInfo::default(),
                 ));
             }
@@ -388,10 +385,7 @@ impl<'db> Resolver<'db> {
 
                         if let Some(e) = entry {
                             return Some((
-                                ResolveValueResult::ValueNs(
-                                    ValueNs::LocalBinding(e.binding()),
-                                    None,
-                                ),
+                                ResolveValueResult::ValueNs(ValueNs::LocalBinding(e.binding())),
                                 ResolvePathResultPrefixInfo::default(),
                             ));
                         }
@@ -404,14 +398,14 @@ impl<'db> Resolver<'db> {
                             && *first_name == sym::Self_
                         {
                             return Some((
-                                ResolveValueResult::ValueNs(ValueNs::ImplSelf(impl_), None),
+                                ResolveValueResult::ValueNs(ValueNs::ImplSelf(impl_)),
                                 ResolvePathResultPrefixInfo::default(),
                             ));
                         }
                         if let Some(id) = params.find_const_by_name(first_name, *def) {
                             let val = ValueNs::GenericParam(id);
                             return Some((
-                                ResolveValueResult::ValueNs(val, None),
+                                ResolveValueResult::ValueNs(val),
                                 ResolvePathResultPrefixInfo::default(),
                             ));
                         }
@@ -431,7 +425,7 @@ impl<'db> Resolver<'db> {
                         if let &GenericDefId::ImplId(impl_) = def {
                             if *first_name == sym::Self_ {
                                 return Some((
-                                    ResolveValueResult::Partial(TypeNs::SelfType(impl_), 1, None),
+                                    ResolveValueResult::Partial(TypeNs::SelfType(impl_), 1),
                                     ResolvePathResultPrefixInfo::default(),
                                 ));
                             }
@@ -440,14 +434,14 @@ impl<'db> Resolver<'db> {
                         {
                             let ty = TypeNs::AdtSelfType(adt);
                             return Some((
-                                ResolveValueResult::Partial(ty, 1, None),
+                                ResolveValueResult::Partial(ty, 1),
                                 ResolvePathResultPrefixInfo::default(),
                             ));
                         }
                         if let Some(id) = params.find_type_by_name(first_name, *def) {
                             let ty = TypeNs::GenericParam(id);
                             return Some((
-                                ResolveValueResult::Partial(ty, 1, None),
+                                ResolveValueResult::Partial(ty, 1),
                                 ResolvePathResultPrefixInfo::default(),
                             ));
                         }
@@ -473,7 +467,7 @@ impl<'db> Resolver<'db> {
             && let Some(builtin) = BuiltinType::by_name(first_name)
         {
             return Some((
-                ResolveValueResult::Partial(TypeNs::BuiltinType(builtin), 1, None),
+                ResolveValueResult::Partial(TypeNs::BuiltinType(builtin), 1),
                 ResolvePathResultPrefixInfo::default(),
             ));
         }
@@ -488,7 +482,7 @@ impl<'db> Resolver<'db> {
         hygiene: HygieneId,
     ) -> Option {
         match self.resolve_path_in_value_ns(db, path, hygiene)? {
-            ResolveValueResult::ValueNs(it, _) => Some(it),
+            ResolveValueResult::ValueNs(it) => Some(it),
             ResolveValueResult::Partial(..) => None,
         }
     }
@@ -1153,12 +1147,12 @@ impl<'db> ModuleItemMap<'db> {
         );
         match unresolved_idx {
             None => {
-                let (value, import) = to_value_ns(module_def, self.def_map)?;
-                Some((ResolveValueResult::ValueNs(value, import), prefix_info))
+                let value = to_value_ns(module_def, self.def_map)?;
+                Some((ResolveValueResult::ValueNs(value), prefix_info))
             }
             Some(unresolved_idx) => {
-                let def = module_def.take_types_full()?;
-                let ty = match def.def {
+                let def = module_def.take_types()?;
+                let ty = match def {
                     ModuleDefId::AdtId(it) => TypeNs::AdtId(it),
                     ModuleDefId::TraitId(it) => TypeNs::TraitId(it),
                     ModuleDefId::TypeAliasId(it) => TypeNs::TypeAliasId(it),
@@ -1171,7 +1165,7 @@ impl<'db> ModuleItemMap<'db> {
                     | ModuleDefId::MacroId(_)
                     | ModuleDefId::StaticId(_) => return None,
                 };
-                Some((ResolveValueResult::Partial(ty, unresolved_idx, def.import), prefix_info))
+                Some((ResolveValueResult::Partial(ty, unresolved_idx), prefix_info))
             }
         }
     }
@@ -1194,12 +1188,12 @@ impl<'db> ModuleItemMap<'db> {
     }
 }
 
-fn to_value_ns(per_ns: PerNs, def_map: &DefMap) -> Option<(ValueNs, Option)> {
-    let (def, import) = per_ns.take_values_import().or_else(|| {
+fn to_value_ns(per_ns: PerNs, def_map: &DefMap) -> Option {
+    let def = per_ns.take_values().or_else(|| {
         let Some(MacroId::ProcMacroId(proc_macro)) = per_ns.take_macros() else { return None };
         // If we cannot resolve to value ns, but we can resolve to a proc macro, and this is the crate
         // defining this proc macro - inside this crate, we should treat the macro as a function.
-        def_map.proc_macro_as_fn(proc_macro).map(|it| (ModuleDefId::FunctionId(it), None))
+        def_map.proc_macro_as_fn(proc_macro).map(ModuleDefId::FunctionId)
     })?;
     let res = match def {
         ModuleDefId::FunctionId(it) => ValueNs::FunctionId(it),
@@ -1215,7 +1209,7 @@ fn to_value_ns(per_ns: PerNs, def_map: &DefMap) -> Option<(ValueNs, Option return None,
     };
-    Some((res, import))
+    Some(res)
 }
 
 fn to_type_ns(per_ns: PerNs) -> Option<(TypeNs, Option)> {
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/unsafe_check.rs b/src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/unsafe_check.rs
index 50d4517d0125..21f263723bb1 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/unsafe_check.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/unsafe_check.rs
@@ -430,7 +430,7 @@ impl<'db> UnsafeVisitor<'db> {
     fn mark_unsafe_path(&mut self, node: ExprOrPatId, path: &Path) {
         let hygiene = self.body.expr_or_pat_path_hygiene(node);
         let value_or_partial = self.resolver.resolve_path_in_value_ns(self.db, path, hygiene);
-        if let Some(ResolveValueResult::ValueNs(ValueNs::StaticId(id), _)) = value_or_partial {
+        if let Some(ResolveValueResult::ValueNs(ValueNs::StaticId(id))) = value_or_partial {
             let static_data = self.db.static_signature(id);
             if static_data.flags.contains(StaticFlags::MUTABLE) {
                 self.on_unsafe_op(node, UnsafetyReason::MutableStatic);
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/infer.rs b/src/tools/rust-analyzer/crates/hir-ty/src/infer.rs
index 35d744e7d16b..991acda14bc7 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/infer.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/infer.rs
@@ -1584,7 +1584,7 @@ impl<'body, 'db> InferenceContext<'body, 'db> {
                 return (self.err_ty(), None);
             };
             match res {
-                ResolveValueResult::ValueNs(value, _) => match value {
+                ResolveValueResult::ValueNs(value) => match value {
                     ValueNs::EnumVariantId(var) => {
                         let args = path_ctx.substs_from_path(var.into(), true, false);
                         drop(ctx);
@@ -1608,7 +1608,7 @@ impl<'body, 'db> InferenceContext<'body, 'db> {
                         return (self.err_ty(), None);
                     }
                 },
-                ResolveValueResult::Partial(typens, unresolved, _) => (typens, Some(unresolved)),
+                ResolveValueResult::Partial(typens, unresolved) => (typens, Some(unresolved)),
             }
         } else {
             match path_ctx.resolve_path_in_type_ns() {
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/infer/path.rs b/src/tools/rust-analyzer/crates/hir-ty/src/infer/path.rs
index ef1a610a323d..40c6fdf3cc88 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/infer/path.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/infer/path.rs
@@ -164,11 +164,11 @@ impl<'db> InferenceContext<'_, 'db> {
             let value_or_partial = path_ctx.resolve_path_in_value_ns(hygiene)?;
 
             match value_or_partial {
-                ResolveValueResult::ValueNs(it, _) => {
+                ResolveValueResult::ValueNs(it) => {
                     drop_ctx(ctx, no_diagnostics);
                     (it, None)
                 }
-                ResolveValueResult::Partial(def, remaining_index, _) => {
+                ResolveValueResult::Partial(def, remaining_index) => {
                     // there may be more intermediate segments between the resolved one and
                     // the end. Only the last segment needs to be resolved to a value; from
                     // the segments before that, we need to get either a type or a trait ref.
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/lower/path.rs b/src/tools/rust-analyzer/crates/hir-ty/src/lower/path.rs
index f3d0de12275e..517f67b828a0 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/lower/path.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/lower/path.rs
@@ -396,12 +396,10 @@ impl<'a, 'b, 'db> PathLoweringContext<'a, 'b, 'db> {
         }
 
         let (mod_segments, enum_segment, resolved_segment_idx) = match res {
-            ResolveValueResult::Partial(_, unresolved_segment, _) => {
+            ResolveValueResult::Partial(_, unresolved_segment) => {
                 (segments.take(unresolved_segment - 1), None, unresolved_segment - 1)
             }
-            ResolveValueResult::ValueNs(ValueNs::EnumVariantId(_), _)
-                if prefix_info.enum_variant =>
-            {
+            ResolveValueResult::ValueNs(ValueNs::EnumVariantId(_)) if prefix_info.enum_variant => {
                 (segments.strip_last_two(), segments.len().checked_sub(2), segments.len() - 1)
             }
             ResolveValueResult::ValueNs(..) => (segments.strip_last(), None, segments.len() - 1),
@@ -431,7 +429,7 @@ impl<'a, 'b, 'db> PathLoweringContext<'a, 'b, 'db> {
         }
 
         match &res {
-            ResolveValueResult::ValueNs(resolution, _) => {
+            ResolveValueResult::ValueNs(resolution) => {
                 let resolved_segment_idx = self.current_segment_u32();
                 let resolved_segment = self.current_or_prev_segment;
 
@@ -469,7 +467,7 @@ impl<'a, 'b, 'db> PathLoweringContext<'a, 'b, 'db> {
                     | ValueNs::ConstId(_) => {}
                 }
             }
-            ResolveValueResult::Partial(resolution, _, _) => {
+            ResolveValueResult::Partial(resolution, _) => {
                 if !self.handle_type_ns_resolution(resolution) {
                     return None;
                 }
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/mir/lower.rs b/src/tools/rust-analyzer/crates/hir-ty/src/mir/lower.rs
index 199db7a3e718..8d5e5c2e6e74 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/mir/lower.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/mir/lower.rs
@@ -1429,7 +1429,7 @@ impl<'a, 'db> MirLowerCtx<'a, 'db> {
                     .resolve_path_in_value_ns(self.db, c, HygieneId::ROOT)
                     .ok_or_else(unresolved_name)?;
                 match pr {
-                    ResolveValueResult::ValueNs(v, _) => {
+                    ResolveValueResult::ValueNs(v) => {
                         if let ValueNs::ConstId(c) = v {
                             self.lower_const_to_operand(
                                 GenericArgs::empty(self.interner()),
@@ -1439,7 +1439,7 @@ impl<'a, 'db> MirLowerCtx<'a, 'db> {
                             not_supported!("bad path in range pattern");
                         }
                     }
-                    ResolveValueResult::Partial(_, _, _) => {
+                    ResolveValueResult::Partial(_, _) => {
                         not_supported!("associated constants in range pattern")
                     }
                 }
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/mir/lower/pattern_matching.rs b/src/tools/rust-analyzer/crates/hir-ty/src/mir/lower/pattern_matching.rs
index a8aacbff16fa..83139821e3b8 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/mir/lower/pattern_matching.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/mir/lower/pattern_matching.rs
@@ -373,7 +373,7 @@ impl<'db> MirLowerCtx<'_, 'db> {
 
                     if let (
                         MatchingMode::Assign,
-                        ResolveValueResult::ValueNs(ValueNs::LocalBinding(binding), _),
+                        ResolveValueResult::ValueNs(ValueNs::LocalBinding(binding)),
                     ) = (mode, &pr)
                     {
                         let local = self.binding_local(*binding)?;
@@ -398,7 +398,7 @@ impl<'db> MirLowerCtx<'_, 'db> {
                         {
                             break 'b (c, x.1);
                         }
-                        if let ResolveValueResult::ValueNs(ValueNs::ConstId(c), _) = pr {
+                        if let ResolveValueResult::ValueNs(ValueNs::ConstId(c)) = pr {
                             break 'b (c, GenericArgs::empty(self.interner()));
                         }
                         not_supported!("path in pattern position that is not const or variant")

From 1911d670fb9ef837d7554309c645e16c47bab2ae Mon Sep 17 00:00:00 2001
From: The Miri Cronjob Bot 
Date: Fri, 13 Feb 2026 05:18:33 +0000
Subject: [PATCH 134/265] Prepare for merging from rust-lang/rust

This updates the rust-version file to 47611e16044c68ef27bac31c35fda2ba1dc20b73.
---
 src/tools/miri/rust-version | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tools/miri/rust-version b/src/tools/miri/rust-version
index e51d39de3c1b..a79511cea30a 100644
--- a/src/tools/miri/rust-version
+++ b/src/tools/miri/rust-version
@@ -1 +1 @@
-f889772d6500faebcac5bb70fa44b5e6581c38cd
+47611e16044c68ef27bac31c35fda2ba1dc20b73

From 7a7d48ea626d12357546f8a4396a065703b58cc0 Mon Sep 17 00:00:00 2001
From: xonx <119700621+xonx4l@users.noreply.github.com>
Date: Fri, 13 Feb 2026 05:32:55 +0000
Subject: [PATCH 135/265] add tests

---
 .../param-env-shadowing-false-positive.rs      | 13 +++++++++++++
 .../param-env-shadowing-false-positive.stderr  | 18 ++++++++++++++++++
 .../param-env-shadowing-gat.rs                 | 13 +++++++++++++
 .../param-env-shadowing-gat.stderr             | 18 ++++++++++++++++++
 4 files changed, 62 insertions(+)
 create mode 100644 tests/ui/associated-types/param-env-shadowing-false-positive.rs
 create mode 100644 tests/ui/associated-types/param-env-shadowing-false-positive.stderr
 create mode 100644 tests/ui/associated-types/param-env-shadowing-gat.rs
 create mode 100644 tests/ui/associated-types/param-env-shadowing-gat.stderr

diff --git a/tests/ui/associated-types/param-env-shadowing-false-positive.rs b/tests/ui/associated-types/param-env-shadowing-false-positive.rs
new file mode 100644
index 000000000000..e40d36dabc81
--- /dev/null
+++ b/tests/ui/associated-types/param-env-shadowing-false-positive.rs
@@ -0,0 +1,13 @@
+trait Trait {
+    type Assoc;
+}
+
+impl Trait for T {
+    type Assoc = T;
+}
+
+fn foo(x: T::Assoc) -> u32 {
+    x //~ ERROR mismatched types
+}
+
+fn main() {}
diff --git a/tests/ui/associated-types/param-env-shadowing-false-positive.stderr b/tests/ui/associated-types/param-env-shadowing-false-positive.stderr
new file mode 100644
index 000000000000..f4a687196ca1
--- /dev/null
+++ b/tests/ui/associated-types/param-env-shadowing-false-positive.stderr
@@ -0,0 +1,18 @@
+error[E0308]: mismatched types
+  --> $DIR/param-env-shadowing-false-positive.rs:10:5
+   |
+LL | fn foo(x: T::Assoc) -> u32 {
+   |                                  --- expected `u32` because of return type
+LL |     x
+   |     ^ expected `u32`, found associated type
+   |
+   = note:         expected type `u32`
+           found associated type `::Assoc`
+help: consider constraining the associated type `::Assoc` to `u32`
+   |
+LL | fn foo>(x: T::Assoc) -> u32 {
+   |                +++++++++++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/associated-types/param-env-shadowing-gat.rs b/tests/ui/associated-types/param-env-shadowing-gat.rs
new file mode 100644
index 000000000000..c7c559eb83b2
--- /dev/null
+++ b/tests/ui/associated-types/param-env-shadowing-gat.rs
@@ -0,0 +1,13 @@
+trait Trait {
+    type Assoc;
+}
+
+impl Trait for T {
+    type Assoc = U;
+}
+
+fn foo(x: T::Assoc) -> u32 {
+    x //~ ERROR mismatched types
+}
+
+fn main() {}
diff --git a/tests/ui/associated-types/param-env-shadowing-gat.stderr b/tests/ui/associated-types/param-env-shadowing-gat.stderr
new file mode 100644
index 000000000000..ed6e92c64ae0
--- /dev/null
+++ b/tests/ui/associated-types/param-env-shadowing-gat.stderr
@@ -0,0 +1,18 @@
+error[E0308]: mismatched types
+  --> $DIR/param-env-shadowing-gat.rs:10:5
+   |
+LL | fn foo(x: T::Assoc) -> u32 {
+   |                                     --- expected `u32` because of return type
+LL |     x
+   |     ^ expected `u32`, found associated type
+   |
+   = note:         expected type `u32`
+           found associated type `::Assoc`
+help: consider constraining the associated type `::Assoc` to `u32`
+   |
+LL | fn foo = u32>>(x: T::Assoc) -> u32 {
+   |                ++++++++++++++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.

From 3a202c47362cd1b5066e734425aad02589c0c389 Mon Sep 17 00:00:00 2001
From: bit-aloo 
Date: Fri, 13 Feb 2026 12:07:01 +0530
Subject: [PATCH 136/265] remove edit_in_place from replace_let_with_if_let
 assist with edit::AstNodeEdit

---
 .../ide-assists/src/handlers/replace_let_with_if_let.rs       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_let_with_if_let.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_let_with_if_let.rs
index b95e9b52b053..98c1cd9b8a37 100644
--- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_let_with_if_let.rs
+++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_let_with_if_let.rs
@@ -1,7 +1,7 @@
 use ide_db::ty_filter::TryEnum;
 use syntax::{
     AstNode, T,
-    ast::{self, edit::IndentLevel, edit_in_place::Indent, syntax_factory::SyntaxFactory},
+    ast::{self, edit::{AstNodeEdit, IndentLevel}, syntax_factory::SyntaxFactory},
 };
 
 use crate::{AssistContext, AssistId, Assists};
@@ -64,7 +64,7 @@ pub(crate) fn replace_let_with_if_let(acc: &mut Assists, ctx: &AssistContext<'_>
                 if let_expr_needs_paren(&init) { make.expr_paren(init).into() } else { init };
 
             let block = make.block_expr([], None);
-            block.indent(IndentLevel::from_node(let_stmt.syntax()));
+            let block = block.indent(IndentLevel::from_node(let_stmt.syntax()));
             let if_expr = make.expr_if(
                 make.expr_let(pat, init_expr).into(),
                 block,

From 28bf2dbb130e175113255ee3223953b7b04158a6 Mon Sep 17 00:00:00 2001
From: bit-aloo 
Date: Fri, 13 Feb 2026 12:11:19 +0530
Subject: [PATCH 137/265] remove edit_in_place from move_const_to_impl assist
 with edit::AstNodeEdit

---
 .../crates/ide-assists/src/handlers/move_const_to_impl.rs    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/move_const_to_impl.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/move_const_to_impl.rs
index 102d7e6d532c..f78b9e5931d6 100644
--- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/move_const_to_impl.rs
+++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/move_const_to_impl.rs
@@ -2,7 +2,7 @@ use hir::{AsAssocItem, AssocItemContainer, FileRange, HasSource};
 use ide_db::{assists::AssistId, defs::Definition, search::SearchScope};
 use syntax::{
     SyntaxKind,
-    ast::{self, AstNode, edit::IndentLevel, edit_in_place::Indent},
+    ast::{self, AstNode, edit::{AstNodeEdit, IndentLevel}},
 };
 
 use crate::assist_context::{AssistContext, Assists};
@@ -136,7 +136,8 @@ pub(crate) fn move_const_to_impl(acc: &mut Assists, ctx: &AssistContext<'_>) ->
             let indent = IndentLevel::from_node(parent_fn.syntax());
 
             let const_ = const_.clone_for_update();
-            const_.reindent_to(indent);
+            let const_ = const_.reset_indent();
+            let const_ = const_.indent(indent);
             builder.insert(insert_offset, format!("\n{indent}{const_}{fixup}"));
         },
     )

From 6221b39591b2db8d1472cded851e378d32668579 Mon Sep 17 00:00:00 2001
From: bit-aloo 
Date: Fri, 13 Feb 2026 12:13:35 +0530
Subject: [PATCH 138/265] remove edit_in_place from bind_unused_param assist
 with edit::AstNodeEdit

---
 .../crates/ide-assists/src/handlers/bind_unused_param.rs        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/bind_unused_param.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/bind_unused_param.rs
index 771e80bb9231..0e85a77822be 100644
--- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/bind_unused_param.rs
+++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/bind_unused_param.rs
@@ -2,7 +2,7 @@ use crate::assist_context::{AssistContext, Assists};
 use ide_db::{LineIndexDatabase, assists::AssistId, defs::Definition};
 use syntax::{
     AstNode,
-    ast::{self, HasName, edit_in_place::Indent},
+    ast::{self, HasName, edit::AstNodeEdit},
 };
 
 // Assist: bind_unused_param

From 5de304e2a4f52ef06318d7e59140a8a7e34377a1 Mon Sep 17 00:00:00 2001
From: bit-aloo 
Date: Fri, 13 Feb 2026 12:15:47 +0530
Subject: [PATCH 139/265] remove edit_in_place from generate_mut_trait_impl
 assist with edit::AstNodeEdit

---
 .../ide-assists/src/handlers/generate_mut_trait_impl.rs     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_mut_trait_impl.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_mut_trait_impl.rs
index 53f6f4883f4d..3a62a8853e3a 100644
--- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_mut_trait_impl.rs
+++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_mut_trait_impl.rs
@@ -1,7 +1,7 @@
 use ide_db::{famous_defs::FamousDefs, traits::resolve_target_trait};
 use syntax::{
     AstNode, SyntaxElement, SyntaxNode, T,
-    ast::{self, edit::AstNodeEdit, edit_in_place::Indent, syntax_factory::SyntaxFactory},
+    ast::{self, edit::AstNodeEdit, syntax_factory::SyntaxFactory},
     syntax_editor::{Element, Position, SyntaxEditor},
 };
 
@@ -46,7 +46,7 @@ use crate::{AssistContext, AssistId, Assists};
 // ```
 pub(crate) fn generate_mut_trait_impl(acc: &mut Assists, ctx: &AssistContext<'_>) -> Option<()> {
     let impl_def = ctx.find_node_at_offset::()?;
-    let indent = Indent::indent_level(&impl_def);
+    let indent = impl_def.indent_level();
 
     let ast::Type::PathType(path) = impl_def.trait_()? else {
         return None;
@@ -78,7 +78,7 @@ pub(crate) fn generate_mut_trait_impl(acc: &mut Assists, ctx: &AssistContext<'_>
 
             let new_impl = ast::Impl::cast(new_root.clone()).unwrap();
 
-            Indent::indent(&new_impl, indent);
+            let new_impl = new_impl.indent(indent);
 
             let mut editor = edit.make_editor(impl_def.syntax());
             editor.insert_all(

From 34eee0c30a657269bf95bbd3207eba75d53c1bf9 Mon Sep 17 00:00:00 2001
From: bit-aloo 
Date: Fri, 13 Feb 2026 12:16:50 +0530
Subject: [PATCH 140/265] remove edit_in_place from generate_getter_or_setter
 assist with edit::AstNodeEdit

---
 .../ide-assists/src/handlers/generate_getter_or_setter.rs    | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_getter_or_setter.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_getter_or_setter.rs
index 2db5e46bb093..84a6f9e8b28c 100644
--- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_getter_or_setter.rs
+++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_getter_or_setter.rs
@@ -3,8 +3,7 @@ use stdx::{format_to, to_lower_snake_case};
 use syntax::{
     TextRange,
     ast::{
-        self, AstNode, HasGenericParams, HasName, HasVisibility, edit_in_place::Indent,
-        syntax_factory::SyntaxFactory,
+        self, AstNode, HasGenericParams, HasName, HasVisibility, edit::AstNodeEdit, syntax_factory::SyntaxFactory
     },
     syntax_editor::Position,
 };
@@ -434,7 +433,7 @@ fn build_source_change(
                 }
             };
             let new_fn = method.clone_for_update();
-            new_fn.indent(1.into());
+            let new_fn = new_fn.indent(1.into());
             new_fn.into()
         })
         .collect();

From 96d6a3e0773ffcc1f3aeea3ee7dab9968a88071a Mon Sep 17 00:00:00 2001
From: bit-aloo 
Date: Fri, 13 Feb 2026 12:20:42 +0530
Subject: [PATCH 141/265] remove edit_in_place from convert_let_else_to_match
 assist with edit::AstNodeEdit

---
 .../ide-assists/src/handlers/convert_let_else_to_match.rs   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_let_else_to_match.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_let_else_to_match.rs
index ebfed9f9ca99..d2336a4a5d8d 100644
--- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_let_else_to_match.rs
+++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_let_else_to_match.rs
@@ -1,7 +1,6 @@
 use syntax::T;
 use syntax::ast::RangeItem;
-use syntax::ast::edit::IndentLevel;
-use syntax::ast::edit_in_place::Indent;
+use syntax::ast::edit::AstNodeEdit;
 use syntax::ast::syntax_factory::SyntaxFactory;
 use syntax::ast::{self, AstNode, HasName, LetStmt, Pat};
 
@@ -93,7 +92,8 @@ pub(crate) fn convert_let_else_to_match(acc: &mut Assists, ctx: &AssistContext<'
             );
             let else_arm = make.match_arm(make.wildcard_pat().into(), None, else_expr);
             let match_ = make.expr_match(init, make.match_arm_list([binding_arm, else_arm]));
-            match_.reindent_to(IndentLevel::from_node(let_stmt.syntax()));
+            let match_ = match_.reset_indent();
+            let match_ = match_.indent(let_stmt.indent_level());
 
             if bindings.is_empty() {
                 editor.replace(let_stmt.syntax(), match_.syntax());

From c8e284bf017db659ee1b7f5b6df1d967868fd2bf Mon Sep 17 00:00:00 2001
From: bit-aloo 
Date: Fri, 13 Feb 2026 13:01:50 +0530
Subject: [PATCH 142/265] remove edit_in_place from replace_if_let_with_match
 assist with edit::AstNodeEdit

---
 .../src/handlers/generate_getter_or_setter.rs |  3 +-
 .../src/handlers/move_const_to_impl.rs        |  5 +-
 .../src/handlers/replace_if_let_with_match.rs | 62 ++++++++++---------
 .../src/handlers/replace_let_with_if_let.rs   |  6 +-
 4 files changed, 43 insertions(+), 33 deletions(-)

diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_getter_or_setter.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_getter_or_setter.rs
index 84a6f9e8b28c..51b967437b56 100644
--- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_getter_or_setter.rs
+++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_getter_or_setter.rs
@@ -3,7 +3,8 @@ use stdx::{format_to, to_lower_snake_case};
 use syntax::{
     TextRange,
     ast::{
-        self, AstNode, HasGenericParams, HasName, HasVisibility, edit::AstNodeEdit, syntax_factory::SyntaxFactory
+        self, AstNode, HasGenericParams, HasName, HasVisibility, edit::AstNodeEdit,
+        syntax_factory::SyntaxFactory,
     },
     syntax_editor::Position,
 };
diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/move_const_to_impl.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/move_const_to_impl.rs
index f78b9e5931d6..b3e79e4663e9 100644
--- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/move_const_to_impl.rs
+++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/move_const_to_impl.rs
@@ -2,7 +2,10 @@ use hir::{AsAssocItem, AssocItemContainer, FileRange, HasSource};
 use ide_db::{assists::AssistId, defs::Definition, search::SearchScope};
 use syntax::{
     SyntaxKind,
-    ast::{self, AstNode, edit::{AstNodeEdit, IndentLevel}},
+    ast::{
+        self, AstNode,
+        edit::{AstNodeEdit, IndentLevel},
+    },
 };
 
 use crate::assist_context::{AssistContext, Assists};
diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_if_let_with_match.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_if_let_with_match.rs
index b7e5344712eb..915dd3ffcaf0 100644
--- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_if_let_with_match.rs
+++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_if_let_with_match.rs
@@ -3,7 +3,11 @@ use std::iter::successors;
 use ide_db::{RootDatabase, defs::NameClass, ty_filter::TryEnum};
 use syntax::{
     AstNode, Edition, SyntaxKind, T, TextRange,
-    ast::{self, HasName, edit::IndentLevel, edit_in_place::Indent, syntax_factory::SyntaxFactory},
+    ast::{
+        self, HasName,
+        edit::{AstNodeEdit, IndentLevel},
+        syntax_factory::SyntaxFactory,
+    },
     syntax_editor::SyntaxEditor,
 };
 
@@ -54,8 +58,7 @@ pub(crate) fn replace_if_let_with_match(acc: &mut Assists, ctx: &AssistContext<'
         ast::ElseBranch::IfExpr(expr) => Some(expr),
         ast::ElseBranch::Block(block) => {
             let block = unwrap_trivial_block(block).clone_for_update();
-            block.reindent_to(IndentLevel(1));
-            else_block = Some(block);
+            else_block = Some(block.reset_indent().indent(IndentLevel(1)));
             None
         }
     });
@@ -82,12 +85,13 @@ pub(crate) fn replace_if_let_with_match(acc: &mut Assists, ctx: &AssistContext<'
                 (Some(pat), guard)
             }
         };
-        if let Some(guard) = &guard {
-            guard.dedent(indent);
-            guard.indent(IndentLevel(1));
-        }
-        let body = if_expr.then_branch()?.clone_for_update();
-        body.indent(IndentLevel(1));
+        let guard = if let Some(guard) = &guard {
+            Some(guard.dedent(indent).indent(IndentLevel(1)))
+        } else {
+            guard
+        };
+
+        let body = if_expr.then_branch()?.clone_for_update().indent(IndentLevel(1));
         cond_bodies.push((cond, guard, body));
     }
 
@@ -109,7 +113,8 @@ pub(crate) fn replace_if_let_with_match(acc: &mut Assists, ctx: &AssistContext<'
                 let else_arm = make_else_arm(ctx, &make, else_block, &cond_bodies);
                 let make_match_arm =
                     |(pat, guard, body): (_, Option, ast::BlockExpr)| {
-                        body.reindent_to(IndentLevel::single());
+                        // Dedent from original position, then indent for match arm
+                        let body = body.dedent(indent).indent(IndentLevel::single());
                         let body = unwrap_trivial_block(body);
                         match (pat, guard.map(|it| make.match_guard(it))) {
                             (Some(pat), guard) => make.match_arm(pat, guard, body),
@@ -122,8 +127,8 @@ pub(crate) fn replace_if_let_with_match(acc: &mut Assists, ctx: &AssistContext<'
                         }
                     };
                 let arms = cond_bodies.into_iter().map(make_match_arm).chain([else_arm]);
-                let match_expr = make.expr_match(scrutinee_to_be_expr, make.match_arm_list(arms));
-                match_expr.indent(indent);
+                let match_expr =
+                    make.expr_match(scrutinee_to_be_expr, make.match_arm_list(arms)).indent(indent);
                 match_expr.into()
             };
 
@@ -131,10 +136,9 @@ pub(crate) fn replace_if_let_with_match(acc: &mut Assists, ctx: &AssistContext<'
                 if_expr.syntax().parent().is_some_and(|it| ast::IfExpr::can_cast(it.kind()));
             let expr = if has_preceding_if_expr {
                 // make sure we replace the `else if let ...` with a block so we don't end up with `else expr`
-                match_expr.dedent(indent);
-                match_expr.indent(IndentLevel(1));
-                let block_expr = make.block_expr([], Some(match_expr));
-                block_expr.indent(indent);
+                let block_expr = make
+                    .block_expr([], Some(match_expr.dedent(indent).indent(IndentLevel(1))))
+                    .indent(indent);
                 block_expr.into()
             } else {
                 match_expr
@@ -267,10 +271,7 @@ pub(crate) fn replace_match_with_if_let(acc: &mut Assists, ctx: &AssistContext<'
                 // wrap them in another BlockExpr.
                 match expr {
                     ast::Expr::BlockExpr(block) if block.modifier().is_none() => block,
-                    expr => {
-                        expr.indent(IndentLevel(1));
-                        make.block_expr([], Some(expr))
-                    }
+                    expr => make.block_expr([], Some(expr.indent(IndentLevel(1)))),
                 }
             };
 
@@ -292,18 +293,19 @@ pub(crate) fn replace_match_with_if_let(acc: &mut Assists, ctx: &AssistContext<'
             } else {
                 condition
             };
-            let then_expr = then_expr.clone_for_update();
-            let else_expr = else_expr.clone_for_update();
-            then_expr.reindent_to(IndentLevel::single());
-            else_expr.reindent_to(IndentLevel::single());
+            let then_expr =
+                then_expr.clone_for_update().reset_indent().indent(IndentLevel::single());
+            let else_expr =
+                else_expr.clone_for_update().reset_indent().indent(IndentLevel::single());
             let then_block = make_block_expr(then_expr);
             let else_expr = if is_empty_expr(&else_expr) { None } else { Some(else_expr) };
-            let if_let_expr = make.expr_if(
-                condition,
-                then_block,
-                else_expr.map(make_block_expr).map(ast::ElseBranch::Block),
-            );
-            if_let_expr.indent(IndentLevel::from_node(match_expr.syntax()));
+            let if_let_expr = make
+                .expr_if(
+                    condition,
+                    then_block,
+                    else_expr.map(make_block_expr).map(ast::ElseBranch::Block),
+                )
+                .indent(IndentLevel::from_node(match_expr.syntax()));
 
             let mut editor = builder.make_editor(match_expr.syntax());
             editor.replace(match_expr.syntax(), if_let_expr.syntax());
diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_let_with_if_let.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_let_with_if_let.rs
index 98c1cd9b8a37..15977c420e64 100644
--- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_let_with_if_let.rs
+++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_let_with_if_let.rs
@@ -1,7 +1,11 @@
 use ide_db::ty_filter::TryEnum;
 use syntax::{
     AstNode, T,
-    ast::{self, edit::{AstNodeEdit, IndentLevel}, syntax_factory::SyntaxFactory},
+    ast::{
+        self,
+        edit::{AstNodeEdit, IndentLevel},
+        syntax_factory::SyntaxFactory,
+    },
 };
 
 use crate::{AssistContext, AssistId, Assists};

From 140a039fb7332154f52ccabb06d9b4f015433da9 Mon Sep 17 00:00:00 2001
From: bit-aloo 
Date: Fri, 13 Feb 2026 13:09:27 +0530
Subject: [PATCH 143/265] remove edit_in_place from generate_trait_from_impl
 assist with edit::AstNodeEdit

---
 .../crates/ide-assists/src/handlers/generate_trait_from_impl.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_trait_from_impl.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_trait_from_impl.rs
index 56500cf06802..8bc4d50cf6af 100644
--- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_trait_from_impl.rs
+++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_trait_from_impl.rs
@@ -2,7 +2,7 @@ use crate::assist_context::{AssistContext, Assists};
 use ide_db::assists::AssistId;
 use syntax::{
     AstNode, SyntaxKind, T,
-    ast::{self, HasGenericParams, HasName, HasVisibility, edit_in_place::Indent, make},
+    ast::{self, HasGenericParams, HasName, HasVisibility, edit::AstNodeEdit, make},
     syntax_editor::{Position, SyntaxEditor},
 };
 

From 85e0c3209e1c627365ca99ec354e1d7f432f36ab Mon Sep 17 00:00:00 2001
From: bit-aloo 
Date: Fri, 13 Feb 2026 13:11:46 +0530
Subject: [PATCH 144/265] remove edit_in_place from convert_bool_to_enum assist
 with edit::AstNodeEdit

---
 .../crates/ide-assists/src/handlers/convert_bool_to_enum.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_bool_to_enum.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_bool_to_enum.rs
index 1ae5f6491744..434fbbae05c4 100644
--- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_bool_to_enum.rs
+++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_bool_to_enum.rs
@@ -11,9 +11,10 @@ use ide_db::{
     source_change::SourceChangeBuilder,
 };
 use itertools::Itertools;
+use syntax::ast::edit::AstNodeEdit;
 use syntax::{
     AstNode, NodeOrToken, SyntaxKind, SyntaxNode, T,
-    ast::{self, HasName, edit::IndentLevel, edit_in_place::Indent, make},
+    ast::{self, HasName, edit::IndentLevel, make},
 };
 
 use crate::{
@@ -479,10 +480,9 @@ fn add_enum_def(
             ctx.sema.scope(name.syntax()).map(|scope| scope.module())
         })
         .any(|module| module.nearest_non_block_module(ctx.db()) != *target_module);
-    let enum_def = make_bool_enum(make_enum_pub);
 
     let indent = IndentLevel::from_node(&insert_before);
-    enum_def.reindent_to(indent);
+    let enum_def = make_bool_enum(make_enum_pub).reset_indent().indent(indent);
 
     edit.insert(
         insert_before.text_range().start(),

From c6b1f8ad9a525ccf50886eb0f0ce60d81195f006 Mon Sep 17 00:00:00 2001
From: bit-aloo 
Date: Fri, 13 Feb 2026 13:14:06 +0530
Subject: [PATCH 145/265] remove edit_in_place from generate_new assist with
 edit::AstNodeEdit

---
 .../crates/ide-assists/src/handlers/generate_new.rs | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_new.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_new.rs
index 4b923ab556b8..793211a27b47 100644
--- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_new.rs
+++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_new.rs
@@ -3,7 +3,7 @@ use ide_db::{
     use_trivial_constructor::use_trivial_constructor,
 };
 use syntax::{
-    ast::{self, AstNode, HasName, HasVisibility, StructKind, edit_in_place::Indent, make},
+    ast::{self, AstNode, HasName, HasVisibility, StructKind, edit::AstNodeEdit, make},
     syntax_editor::Position,
 };
 
@@ -150,14 +150,14 @@ pub(crate) fn generate_new(acc: &mut Assists, ctx: &AssistContext<'_>) -> Option
             false,
             false,
         )
-        .clone_for_update();
-        fn_.indent(1.into());
+        .clone_for_update()
+        .indent(1.into());
 
         let mut editor = builder.make_editor(strukt.syntax());
 
         // Get the node for set annotation
         let contain_fn = if let Some(impl_def) = impl_def {
-            fn_.indent(impl_def.indent_level());
+            let fn_ = fn_.indent(impl_def.indent_level());
 
             if let Some(l_curly) = impl_def.assoc_item_list().and_then(|list| list.l_curly_token())
             {
@@ -182,9 +182,8 @@ pub(crate) fn generate_new(acc: &mut Assists, ctx: &AssistContext<'_>) -> Option
             let indent_level = strukt.indent_level();
             let body = vec![ast::AssocItem::Fn(fn_)];
             let list = make::assoc_item_list(Some(body));
-            let impl_def = generate_impl_with_item(&ast::Adt::Struct(strukt.clone()), Some(list));
-
-            impl_def.indent(strukt.indent_level());
+            let impl_def = generate_impl_with_item(&ast::Adt::Struct(strukt.clone()), Some(list))
+                .indent(strukt.indent_level());
 
             // Insert it after the adt
             editor.insert_all(

From b132beb7e0484d116dfe29530ce2c4a0aa716669 Mon Sep 17 00:00:00 2001
From: Lukas Wirth 
Date: Sat, 7 Feb 2026 14:52:48 +0100
Subject: [PATCH 146/265] internal: Use rayon for proc-macro loading

---
 src/tools/rust-analyzer/Cargo.lock            |  1 +
 .../crates/load-cargo/src/lib.rs              |  7 ++---
 .../crates/proc-macro-api/Cargo.toml          |  1 +
 .../crates/proc-macro-api/src/lib.rs          |  8 ++----
 .../crates/proc-macro-api/src/pool.rs         | 28 +++++++++----------
 .../crates/proc-macro-api/src/process.rs      | 16 ++++++++---
 .../rust-analyzer/crates/span/src/ast_id.rs   |  2 --
 7 files changed, 31 insertions(+), 32 deletions(-)

diff --git a/src/tools/rust-analyzer/Cargo.lock b/src/tools/rust-analyzer/Cargo.lock
index 755ae55eea46..5c2443e26e0f 100644
--- a/src/tools/rust-analyzer/Cargo.lock
+++ b/src/tools/rust-analyzer/Cargo.lock
@@ -1845,6 +1845,7 @@ dependencies = [
  "paths",
  "postcard",
  "proc-macro-srv",
+ "rayon",
  "rustc-hash 2.1.1",
  "semver",
  "serde",
diff --git a/src/tools/rust-analyzer/crates/load-cargo/src/lib.rs b/src/tools/rust-analyzer/crates/load-cargo/src/lib.rs
index c2935d94a8a7..70a00cf82516 100644
--- a/src/tools/rust-analyzer/crates/load-cargo/src/lib.rs
+++ b/src/tools/rust-analyzer/crates/load-cargo/src/lib.rs
@@ -26,10 +26,7 @@ use ide_db::{
 use itertools::Itertools;
 use proc_macro_api::{
     MacroDylib, ProcMacroClient,
-    bidirectional_protocol::{
-        msg::{SubRequest, SubResponse},
-        reject_subrequests,
-    },
+    bidirectional_protocol::msg::{SubRequest, SubResponse},
 };
 use project_model::{CargoConfig, PackageRoot, ProjectManifest, ProjectWorkspace};
 use span::{Span, SpanAnchor, SyntaxContext};
@@ -446,7 +443,7 @@ pub fn load_proc_macro(
 ) -> ProcMacroLoadResult {
     let res: Result, _> = (|| {
         let dylib = MacroDylib::new(path.to_path_buf());
-        let vec = server.load_dylib(dylib, Some(&reject_subrequests)).map_err(|e| {
+        let vec = server.load_dylib(dylib).map_err(|e| {
             ProcMacroLoadingError::ProcMacroSrvError(format!("{e}").into_boxed_str())
         })?;
         if vec.is_empty() {
diff --git a/src/tools/rust-analyzer/crates/proc-macro-api/Cargo.toml b/src/tools/rust-analyzer/crates/proc-macro-api/Cargo.toml
index 4de1a3e5dd7d..a135a469e87e 100644
--- a/src/tools/rust-analyzer/crates/proc-macro-api/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/proc-macro-api/Cargo.toml
@@ -31,6 +31,7 @@ span = { path = "../span", version = "0.0.0", default-features = false}
 intern.workspace = true
 postcard.workspace = true
 semver.workspace = true
+rayon.workspace = true
 
 [features]
 sysroot-abi = ["proc-macro-srv", "proc-macro-srv/sysroot-abi"]
diff --git a/src/tools/rust-analyzer/crates/proc-macro-api/src/lib.rs b/src/tools/rust-analyzer/crates/proc-macro-api/src/lib.rs
index e4b121b033d3..68b3afc3e841 100644
--- a/src/tools/rust-analyzer/crates/proc-macro-api/src/lib.rs
+++ b/src/tools/rust-analyzer/crates/proc-macro-api/src/lib.rs
@@ -198,12 +198,8 @@ impl ProcMacroClient {
     }
 
     /// Loads a proc-macro dylib into the server process returning a list of `ProcMacro`s loaded.
-    pub fn load_dylib(
-        &self,
-        dylib: MacroDylib,
-        callback: Option>,
-    ) -> Result, ServerError> {
-        self.pool.load_dylib(&dylib, callback)
+    pub fn load_dylib(&self, dylib: MacroDylib) -> Result, ServerError> {
+        self.pool.load_dylib(&dylib)
     }
 
     /// Checks if the proc-macro server has exited.
diff --git a/src/tools/rust-analyzer/crates/proc-macro-api/src/pool.rs b/src/tools/rust-analyzer/crates/proc-macro-api/src/pool.rs
index a637bc0e480a..e6541823da58 100644
--- a/src/tools/rust-analyzer/crates/proc-macro-api/src/pool.rs
+++ b/src/tools/rust-analyzer/crates/proc-macro-api/src/pool.rs
@@ -1,10 +1,9 @@
 //! A pool of proc-macro server processes
 use std::sync::Arc;
 
-use crate::{
-    MacroDylib, ProcMacro, ServerError, bidirectional_protocol::SubCallback,
-    process::ProcMacroServerProcess,
-};
+use rayon::iter::{IntoParallelIterator, ParallelIterator};
+
+use crate::{MacroDylib, ProcMacro, ServerError, process::ProcMacroServerProcess};
 
 #[derive(Debug, Clone)]
 pub(crate) struct ProcMacroServerPool {
@@ -50,11 +49,7 @@ impl ProcMacroServerPool {
         })
     }
 
-    pub(crate) fn load_dylib(
-        &self,
-        dylib: &MacroDylib,
-        callback: Option>,
-    ) -> Result, ServerError> {
+    pub(crate) fn load_dylib(&self, dylib: &MacroDylib) -> Result, ServerError> {
         let _span = tracing::info_span!("ProcMacroServer::load_dylib").entered();
 
         let dylib_path = Arc::new(dylib.path.clone());
@@ -64,14 +59,17 @@ impl ProcMacroServerPool {
         let (first, rest) = self.workers.split_first().expect("worker pool must not be empty");
 
         let macros = first
-            .find_proc_macros(&dylib.path, callback)?
+            .find_proc_macros(&dylib.path)?
             .map_err(|e| ServerError { message: e, io: None })?;
 
-        for worker in rest {
-            worker
-                .find_proc_macros(&dylib.path, callback)?
-                .map_err(|e| ServerError { message: e, io: None })?;
-        }
+        rest.into_par_iter()
+            .map(|worker| {
+                worker
+                    .find_proc_macros(&dylib.path)?
+                    .map(|_| ())
+                    .map_err(|e| ServerError { message: e, io: None })
+            })
+            .collect::>()?;
 
         Ok(macros
             .into_iter()
diff --git a/src/tools/rust-analyzer/crates/proc-macro-api/src/process.rs b/src/tools/rust-analyzer/crates/proc-macro-api/src/process.rs
index 9f80880965b8..80e4ed05c36d 100644
--- a/src/tools/rust-analyzer/crates/proc-macro-api/src/process.rs
+++ b/src/tools/rust-analyzer/crates/proc-macro-api/src/process.rs
@@ -18,7 +18,11 @@ use stdx::JodChild;
 
 use crate::{
     ProcMacro, ProcMacroKind, ProtocolFormat, ServerError,
-    bidirectional_protocol::{self, SubCallback, msg::BidirectionalMessage, reject_subrequests},
+    bidirectional_protocol::{
+        self, SubCallback,
+        msg::{BidirectionalMessage, SubResponse},
+        reject_subrequests,
+    },
     legacy_protocol::{self, SpanMode},
     version,
 };
@@ -207,14 +211,18 @@ impl ProcMacroServerProcess {
     pub(crate) fn find_proc_macros(
         &self,
         dylib_path: &AbsPath,
-        callback: Option>,
     ) -> Result, String>, ServerError> {
         match self.protocol {
             Protocol::LegacyJson { .. } => legacy_protocol::find_proc_macros(self, dylib_path),
 
             Protocol::BidirectionalPostcardPrototype { .. } => {
-                let cb = callback.expect("callback required for bidirectional protocol");
-                bidirectional_protocol::find_proc_macros(self, dylib_path, cb)
+                bidirectional_protocol::find_proc_macros(self, dylib_path, &|_| {
+                    Ok(SubResponse::Cancel {
+                        reason: String::from(
+                            "Server should not do a sub request when loading proc-macros",
+                        ),
+                    })
+                })
             }
         }
     }
diff --git a/src/tools/rust-analyzer/crates/span/src/ast_id.rs b/src/tools/rust-analyzer/crates/span/src/ast_id.rs
index 599b3c717522..f52604e13917 100644
--- a/src/tools/rust-analyzer/crates/span/src/ast_id.rs
+++ b/src/tools/rust-analyzer/crates/span/src/ast_id.rs
@@ -88,7 +88,6 @@ impl fmt::Debug for ErasedFileAstId {
             Module,
             Static,
             Trait,
-            TraitAlias,
             Variant,
             Const,
             Fn,
@@ -129,7 +128,6 @@ enum ErasedFileAstIdKind {
     Module,
     Static,
     Trait,
-    TraitAlias,
     // Until here associated with `ErasedHasNameFileAstId`.
     // The following are associated with `ErasedAssocItemFileAstId`.
     Variant,

From c2c7d5d7efbce617577835fc8a02678ccf0847c6 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 13 Feb 2026 11:43:39 +0000
Subject: [PATCH 147/265] build(deps): bump qs from 6.14.1 to 6.14.2 in
 /editors/code

Bumps [qs](https://github.com/ljharb/qs) from 6.14.1 to 6.14.2.
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.14.1...v6.14.2)

---
updated-dependencies:
- dependency-name: qs
  dependency-version: 6.14.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] 
---
 .../rust-analyzer/editors/code/package-lock.json     | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/src/tools/rust-analyzer/editors/code/package-lock.json b/src/tools/rust-analyzer/editors/code/package-lock.json
index 57f6bf69beb0..84be0a666f9c 100644
--- a/src/tools/rust-analyzer/editors/code/package-lock.json
+++ b/src/tools/rust-analyzer/editors/code/package-lock.json
@@ -1486,7 +1486,6 @@
             "integrity": "sha512-4gbs64bnbSzu4FpgMiQ1A+D+urxkoJk/kqlDJ2W//5SygaEiAP2B4GoS7TEdxgwol2el03gckFV9lJ4QOMiiHg==",
             "dev": true,
             "license": "MIT",
-            "peer": true,
             "dependencies": {
                 "@typescript-eslint/scope-manager": "8.25.0",
                 "@typescript-eslint/types": "8.25.0",
@@ -1870,7 +1869,6 @@
             "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==",
             "dev": true,
             "license": "MIT",
-            "peer": true,
             "bin": {
                 "acorn": "bin/acorn"
             },
@@ -2840,7 +2838,6 @@
             "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz",
             "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==",
             "license": "ISC",
-            "peer": true,
             "engines": {
                 "node": ">=12"
             }
@@ -3322,7 +3319,6 @@
             "integrity": "sha512-KjeihdFqTPhOMXTt7StsDxriV4n66ueuF/jfPNC3j/lduHwr/ijDwJMsF+wyMJethgiKi5wniIE243vi07d3pg==",
             "dev": true,
             "license": "MIT",
-            "peer": true,
             "dependencies": {
                 "@eslint-community/eslint-utils": "^4.2.0",
                 "@eslint-community/regexpp": "^4.12.1",
@@ -4410,7 +4406,6 @@
             "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz",
             "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==",
             "license": "MIT",
-            "peer": true,
             "bin": {
                 "jiti": "lib/jiti-cli.mjs"
             }
@@ -5584,9 +5579,9 @@
             }
         },
         "node_modules/qs": {
-            "version": "6.14.1",
-            "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz",
-            "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==",
+            "version": "6.14.2",
+            "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz",
+            "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==",
             "dev": true,
             "license": "BSD-3-Clause",
             "dependencies": {
@@ -6678,7 +6673,6 @@
             "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==",
             "dev": true,
             "license": "Apache-2.0",
-            "peer": true,
             "bin": {
                 "tsc": "bin/tsc",
                 "tsserver": "bin/tsserver"

From c2b8abd8105349dea576917903408266a9212a84 Mon Sep 17 00:00:00 2001
From: Antoni Boucher 
Date: Fri, 13 Feb 2026 07:49:27 -0500
Subject: [PATCH 148/265] Update to nightly-2026-02-13

---
 rust-toolchain | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust-toolchain b/rust-toolchain
index c2179bc3ff98..ce97f300fa40 100644
--- a/rust-toolchain
+++ b/rust-toolchain
@@ -1,3 +1,3 @@
 [toolchain]
-channel = "nightly-2026-01-30"
+channel = "nightly-2026-02-13"
 components = ["rust-src", "rustc-dev", "llvm-tools-preview"]

From 458adbd66a7bf85a058fd4e4d4b88ef86e604ee2 Mon Sep 17 00:00:00 2001
From: Antoni Boucher 
Date: Fri, 13 Feb 2026 08:12:59 -0500
Subject: [PATCH 149/265] Implement fptoint_sat for f16 and f128

---
 src/builder.rs | 33 +++++++++++++++++++--------------
 src/common.rs  |  4 ++++
 2 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/src/builder.rs b/src/builder.rs
index 6347a3fb19b4..8dac76f01d10 100644
--- a/src/builder.rs
+++ b/src/builder.rs
@@ -1873,32 +1873,33 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
         // On the other hand, f_max works even if int_ty::MAX is greater than float_ty::MAX. Because
         // we're rounding towards zero, we just get float_ty::MAX (which is always an integer).
         // This already happens today with u128::MAX = 2^128 - 1 > f32::MAX.
-        let int_max = |signed: bool, int_width: u64| -> u128 {
+        fn int_max(signed: bool, int_width: u64) -> u128 {
             let shift_amount = 128 - int_width;
             if signed { i128::MAX as u128 >> shift_amount } else { u128::MAX >> shift_amount }
-        };
-        let int_min = |signed: bool, int_width: u64| -> i128 {
+        }
+        fn int_min(signed: bool, int_width: u64) -> i128 {
             if signed { i128::MIN >> (128 - int_width) } else { 0 }
-        };
+        }
 
-        let compute_clamp_bounds_single = |signed: bool, int_width: u64| -> (u128, u128) {
+        // TODO: rewrite using a generic function with .
+        let compute_clamp_bounds_half = |signed: bool, int_width: u64| -> (u128, u128) {
             let rounded_min =
-                ieee::Single::from_i128_r(int_min(signed, int_width), Round::TowardZero);
-            assert_eq!(rounded_min.status, Status::OK);
+                ieee::Half::from_i128_r(int_min(signed, int_width), Round::TowardZero);
+            //assert_eq!(rounded_min.status, Status::OK);
             let rounded_max =
-                ieee::Single::from_u128_r(int_max(signed, int_width), Round::TowardZero);
+                ieee::Half::from_u128_r(int_max(signed, int_width), Round::TowardZero);
             assert!(rounded_max.value.is_finite());
             (rounded_min.value.to_bits(), rounded_max.value.to_bits())
         };
-        let compute_clamp_bounds_double = |signed: bool, int_width: u64| -> (u128, u128) {
+        fn compute_clamp_bounds(signed: bool, int_width: u64) -> (u128, u128) {
             let rounded_min =
-                ieee::Double::from_i128_r(int_min(signed, int_width), Round::TowardZero);
+                F::from_i128_r(int_min(signed, int_width), Round::TowardZero);
             assert_eq!(rounded_min.status, Status::OK);
             let rounded_max =
-                ieee::Double::from_u128_r(int_max(signed, int_width), Round::TowardZero);
+                F::from_u128_r(int_max(signed, int_width), Round::TowardZero);
             assert!(rounded_max.value.is_finite());
             (rounded_min.value.to_bits(), rounded_max.value.to_bits())
-        };
+        }
         // To implement saturation, we perform the following steps:
         //
         // 1. Cast val to an integer with fpto[su]i. This may result in undef.
@@ -1928,15 +1929,19 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
 
         let float_bits_to_llval = |bx: &mut Self, bits| {
             let bits_llval = match float_width {
+                16 => bx.cx().const_u16(bits as u16),
                 32 => bx.cx().const_u32(bits as u32),
                 64 => bx.cx().const_u64(bits as u64),
+                128 => bx.cx().const_u128(bits),
                 n => bug!("unsupported float width {}", n),
             };
             bx.bitcast(bits_llval, float_ty)
         };
         let (f_min, f_max) = match float_width {
-            32 => compute_clamp_bounds_single(signed, int_width),
-            64 => compute_clamp_bounds_double(signed, int_width),
+            16 => compute_clamp_bounds_half(signed, int_width),
+            32 => compute_clamp_bounds::(signed, int_width),
+            64 => compute_clamp_bounds::(signed, int_width),
+            128 => compute_clamp_bounds::(signed, int_width),
             n => bug!("unsupported float width {}", n),
         };
         let f_min = float_bits_to_llval(self, f_min);
diff --git a/src/common.rs b/src/common.rs
index 1f133fa0c1b7..86a4eeac89d5 100644
--- a/src/common.rs
+++ b/src/common.rs
@@ -20,6 +20,10 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
         bytes_in_context(self, bytes)
     }
 
+    pub fn const_u16(&self, i: u16) -> RValue<'gcc> {
+        self.const_uint(self.type_u16(), i as u64)
+    }
+
     fn global_string(&self, string: &str) -> LValue<'gcc> {
         // TODO(antoyo): handle non-null-terminated strings.
         let string = self.context.new_string_literal(string);

From 5577bd7ac4bafda4888205fa4a621ca0e89f7180 Mon Sep 17 00:00:00 2001
From: Antoni Boucher 
Date: Fri, 13 Feb 2026 08:13:29 -0500
Subject: [PATCH 150/265] Add missing -Zjson-target-spec for m68k test

---
 .github/workflows/m68k.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/m68k.yml b/.github/workflows/m68k.yml
index e49c62d6c931..11bc88e67d2d 100644
--- a/.github/workflows/m68k.yml
+++ b/.github/workflows/m68k.yml
@@ -83,7 +83,7 @@ jobs:
       run: |
         ./y.sh prepare --only-libcore --cross
         ./y.sh build --sysroot --target-triple m68k-unknown-linux-gnu --target ${{ github.workspace }}/target_specs/m68k-unknown-linux-gnu.json
-        CG_RUSTFLAGS="-Clinker=m68k-unknown-linux-gnu-gcc" ./y.sh cargo build --manifest-path=./tests/hello-world/Cargo.toml --target ${{ github.workspace }}/target_specs/m68k-unknown-linux-gnu.json
+        CG_RUSTFLAGS="-Clinker=m68k-unknown-linux-gnu-gcc" ./y.sh cargo build -Zjson-target-spec --manifest-path=./tests/hello-world/Cargo.toml --target ${{ github.workspace }}/target_specs/m68k-unknown-linux-gnu.json
         ./y.sh clean all
 
     - name: Build

From 27e25ff6d8f9594b23ebb22e677481029fbbd8a7 Mon Sep 17 00:00:00 2001
From: Antoni Boucher 
Date: Fri, 13 Feb 2026 08:27:31 -0500
Subject: [PATCH 151/265] Add failing tests

---
 tests/failing-run-make-tests.txt | 2 +-
 tests/failing-ui-tests.txt       | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/failing-run-make-tests.txt b/tests/failing-run-make-tests.txt
index 822aaec0edeb..528ee1df9f58 100644
--- a/tests/failing-run-make-tests.txt
+++ b/tests/failing-run-make-tests.txt
@@ -11,4 +11,4 @@ tests/run-make/foreign-exceptions/
 tests/run-make/glibc-staticlib-args/
 tests/run-make/lto-smoke-c/
 tests/run-make/return-non-c-like-enum/
-
+tests/run-make/short-ice
diff --git a/tests/failing-ui-tests.txt b/tests/failing-ui-tests.txt
index 75ca1845f45e..8589929d2fbc 100644
--- a/tests/failing-ui-tests.txt
+++ b/tests/failing-ui-tests.txt
@@ -98,3 +98,4 @@ tests/ui/eii/linking/same-symbol.rs
 tests/ui/eii/privacy1.rs
 tests/ui/eii/default/call_impl.rs
 tests/ui/c-variadic/copy.rs
+tests/ui/asm/x86_64/global_asm_escape.rs

From e373b93b0b953033f869e386d30d2446b920133b Mon Sep 17 00:00:00 2001
From: Antoni Boucher 
Date: Fri, 13 Feb 2026 08:35:12 -0500
Subject: [PATCH 152/265] Fix formatting

---
 src/builder.rs | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/builder.rs b/src/builder.rs
index 8dac76f01d10..e1937f5c11eb 100644
--- a/src/builder.rs
+++ b/src/builder.rs
@@ -1892,11 +1892,9 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
             (rounded_min.value.to_bits(), rounded_max.value.to_bits())
         };
         fn compute_clamp_bounds(signed: bool, int_width: u64) -> (u128, u128) {
-            let rounded_min =
-                F::from_i128_r(int_min(signed, int_width), Round::TowardZero);
+            let rounded_min = F::from_i128_r(int_min(signed, int_width), Round::TowardZero);
             assert_eq!(rounded_min.status, Status::OK);
-            let rounded_max =
-                F::from_u128_r(int_max(signed, int_width), Round::TowardZero);
+            let rounded_max = F::from_u128_r(int_max(signed, int_width), Round::TowardZero);
             assert!(rounded_max.value.is_finite());
             (rounded_min.value.to_bits(), rounded_max.value.to_bits())
         }

From c0c3c59b83a8be7baf83e50ea4eb45bf5aef649f Mon Sep 17 00:00:00 2001
From: WANG Rui 
Date: Fri, 13 Feb 2026 16:04:17 +0800
Subject: [PATCH 153/265] ci: Drop outdated toolchain configuration:
 aarch64-linux-gnu.defconfig

---
 src/ci/docker/README.md | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/src/ci/docker/README.md b/src/ci/docker/README.md
index 4ee02e9bf005..52a787cf97d4 100644
--- a/src/ci/docker/README.md
+++ b/src/ci/docker/README.md
@@ -231,22 +231,6 @@ For targets: `armv7-unknown-linux-gnueabihf`
     libraries like jemalloc. See the mk/cfg/arm(v7)-unknown-linux-gnueabi{,hf}.mk
     file in Rust's source code.
 
-### `aarch64-linux-gnu.defconfig`
-
-For targets: `aarch64-unknown-linux-gnu`
-
-- Path and misc options > Prefix directory = /x-tools/${CT\_TARGET}
-- Path and misc options > Use a mirror = ENABLE
-- Path and misc options > Base URL = https://ci-mirrors.rust-lang.org/rustc
-- Target options > Target Architecture = arm
-- Target options > Bitness = 64-bit
-- Operating System > Target OS = linux
-- Operating System > Linux kernel version = 4.1.49
-- Binary utilities > Version of binutils = 2.29.1
-- C-library > glibc version = 2.17 -- aarch64 support was introduced in this version
-- C compiler > gcc version = 13.2.0
-- C compiler > C++ = ENABLE -- to cross compile LLVM
-
 ### `i586-linux-gnu.defconfig`
 
 For targets: `i586-unknown-linux-gnu`

From e37374b1ac6f2f05919aab5db6758b8fc4b8adee Mon Sep 17 00:00:00 2001
From: WANG Rui 
Date: Fri, 13 Feb 2026 16:07:14 +0800
Subject: [PATCH 154/265] ci: dist-arm-linux: Cleanup unused crosstool-ng

---
 .../host-x86_64/dist-arm-linux-musl/Dockerfile     |  9 ---------
 .../dist-arm-linux-musl/arm-linux-musl.defconfig   | 14 --------------
 2 files changed, 23 deletions(-)
 delete mode 100644 src/ci/docker/host-x86_64/dist-arm-linux-musl/arm-linux-musl.defconfig

diff --git a/src/ci/docker/host-x86_64/dist-arm-linux-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-arm-linux-musl/Dockerfile
index 6e055cd2bd5a..dc35285dbab9 100644
--- a/src/ci/docker/host-x86_64/dist-arm-linux-musl/Dockerfile
+++ b/src/ci/docker/host-x86_64/dist-arm-linux-musl/Dockerfile
@@ -3,9 +3,6 @@ FROM ghcr.io/rust-lang/ubuntu:22.04
 COPY scripts/cross-apt-packages.sh /scripts/
 RUN sh /scripts/cross-apt-packages.sh
 
-COPY scripts/crosstool-ng.sh /scripts/
-RUN sh /scripts/crosstool-ng.sh
-
 WORKDIR /build
 
 COPY scripts/musl-toolchain.sh /build/
@@ -14,14 +11,8 @@ RUN CFLAGS="-Wa,--compress-debug-sections=none -Wl,--compress-debug-sections=non
     CXXFLAGS="-Wa,--compress-debug-sections=none -Wl,--compress-debug-sections=none" \
     bash musl-toolchain.sh aarch64 && rm -rf build
 
-COPY scripts/rustbuild-setup.sh /scripts/
-RUN sh /scripts/rustbuild-setup.sh
 WORKDIR /tmp
 
-COPY scripts/crosstool-ng-build.sh /scripts/
-COPY host-x86_64/dist-arm-linux-musl/arm-linux-musl.defconfig /tmp/crosstool.defconfig
-RUN /scripts/crosstool-ng-build.sh
-
 COPY scripts/sccache.sh /scripts/
 RUN sh /scripts/sccache.sh
 
diff --git a/src/ci/docker/host-x86_64/dist-arm-linux-musl/arm-linux-musl.defconfig b/src/ci/docker/host-x86_64/dist-arm-linux-musl/arm-linux-musl.defconfig
deleted file mode 100644
index 014930052b4a..000000000000
--- a/src/ci/docker/host-x86_64/dist-arm-linux-musl/arm-linux-musl.defconfig
+++ /dev/null
@@ -1,14 +0,0 @@
-CT_CONFIG_VERSION="4"
-CT_PREFIX_DIR="/x-tools/${CT_TARGET}"
-CT_USE_MIRROR=y
-CT_MIRROR_BASE_URL="https://ci-mirrors.rust-lang.org/rustc"
-CT_ARCH_ARM=y
-CT_ARCH_ARCH="armv6"
-CT_ARCH_FLOAT_SW=y
-CT_KERNEL_LINUX=y
-CT_LINUX_V_3_2=y
-CT_BINUTILS_V_2_32=y
-CT_GLIBC_V_2_17=y
-CT_GCC_V_8=y
-CT_CC_LANG_CXX=y
-CT_MUSL_V_1_2_5=y

From df798ad68e907fc01f4e0a00aaef2b756b1d5ee2 Mon Sep 17 00:00:00 2001
From: WANG Rui 
Date: Fri, 13 Feb 2026 16:10:37 +0800
Subject: [PATCH 155/265] ci: Lock cross toolchain version and update docs

---
 src/ci/docker/README.md                       | 58 +++++++++++++++++--
 .../loongarch64-unknown-linux-gnu.defconfig   |  2 +
 .../loongarch64-unknown-linux-musl.defconfig  |  3 +
 .../powerpc64-unknown-linux-musl.defconfig    |  2 +
 .../powerpc64le-unknown-linux-gnu.defconfig   |  2 +
 .../powerpc64le-unknown-linux-musl.defconfig  |  2 +
 6 files changed, 65 insertions(+), 4 deletions(-)

diff --git a/src/ci/docker/README.md b/src/ci/docker/README.md
index 52a787cf97d4..34450512ad2d 100644
--- a/src/ci/docker/README.md
+++ b/src/ci/docker/README.md
@@ -233,7 +233,7 @@ For targets: `armv7-unknown-linux-gnueabihf`
 
 ### `i586-linux-gnu.defconfig`
 
-For targets: `i586-unknown-linux-gnu`
+For targets: `i586-unknown-linux-gnu`, `i586-unknown-linux-musl` and `i686-unknown-linux-musl`
 
 - Path and misc options > Prefix directory = /x-tools/${CT\_TARGET}
 - Target options > Target Architecture = x86
@@ -250,7 +250,7 @@ For targets: `i586-unknown-linux-gnu`
 (\*) Compressed debug is enabled by default for gas (assembly) on Linux/x86 targets,
      but that makes our `compiler_builtins` incompatible with binutils < 2.32.
 
-### `loongarch64-linux-gnu.defconfig`
+### `loongarch64-unknown-linux-gnu.defconfig`
 
 For targets: `loongarch64-unknown-linux-gnu`
 
@@ -266,7 +266,7 @@ For targets: `loongarch64-unknown-linux-gnu`
 - C compiler > gcc version = 14.2.0
 - C compiler > C++ = ENABLE -- to cross compile LLVM
 
-### `loongarch64-linux-musl.defconfig`
+### `loongarch64-unknown-linux-musl.defconfig`
 
 For targets: `loongarch64-unknown-linux-musl`
 
@@ -396,6 +396,56 @@ For targets: `powerpc64-unknown-linux-gnu`
 
 (+) These CPU options match the configuration of the toolchains in RHEL6.
 
+### `powerpc64-unknown-linux-musl.defconfig`
+
+For targets: `powerpc64-unknown-linux-musl`
+
+- Path and misc options > Prefix directory = /x-tools/${CT\_TARGET}
+- Path and misc options > Use a mirror = ENABLE
+- Path and misc options > Base URL = https://ci-mirrors.rust-lang.org/rustc
+- Target options > Target Architecture = powerpc
+- Target options > Bitness = 64-bit
+- Operating System > Target OS = linux
+- Operating System > Linux kernel version = 4.19
+- Binary utilities > Version of binutils = 2.42
+- C-library > musl version = 1.2.5
+- C compiler > gcc version = 14.2.0
+- C compiler > C++ = ENABLE -- to cross compile LLVM
+
+### `powerpc64le-unknown-linux-gnu.defconfig`
+
+For targets: `powerpc64le-unknown-linux-gnu`
+
+- Path and misc options > Prefix directory = /x-tools/${CT\_TARGET}
+- Path and misc options > Use a mirror = ENABLE
+- Path and misc options > Base URL = https://ci-mirrors.rust-lang.org/rustc
+- Target options > Target Architecture = powerpc
+- Target options > Bitness = 64-bit
+- Target options > Endianness = Little endian
+- Operating System > Target OS = linux
+- Operating System > Linux kernel version = 3.10
+- Binary utilities > Version of binutils = 2.42
+- C-library > glibc version = 2.17
+- C compiler > gcc version = 14.2.0
+- C compiler > C++ = ENABLE -- to cross compile LLVM
+
+### `powerpc64le-unknown-linux-musl.defconfig`
+
+For targets: `powerpc64le-unknown-linux-musl`
+
+- Path and misc options > Prefix directory = /x-tools/${CT\_TARGET}
+- Path and misc options > Use a mirror = ENABLE
+- Path and misc options > Base URL = https://ci-mirrors.rust-lang.org/rustc
+- Target options > Target Architecture = powerpc
+- Target options > Bitness = 64-bit
+- Target options > Endianness = Little endian
+- Operating System > Target OS = linux
+- Operating System > Linux kernel version = 4.19
+- Binary utilities > Version of binutils = 2.42
+- C-library > musl version = 1.2.5
+- C compiler > gcc version = 14.2.0
+- C compiler > C++ = ENABLE -- to cross compile LLVM
+
 ### `riscv64-unknown-linux-gnu.defconfig`
 
 For targets: `riscv64-unknown-linux-gnu`
@@ -407,7 +457,7 @@ For targets: `riscv64-unknown-linux-gnu`
 - Target options > Bitness = 64-bit
 - Operating System > Target OS = linux
 - Operating System > Linux kernel version = 4.20.17
-- Binary utilities > Version of binutils = 2.36.1
+- Binary utilities > Version of binutils = 2.40
 - C-library > glibc version = 2.29
 - C compiler > gcc version = 8.5.0
 - C compiler > C++ = ENABLE -- to cross compile LLVM
diff --git a/src/ci/docker/host-x86_64/dist-loongarch64-linux/loongarch64-unknown-linux-gnu.defconfig b/src/ci/docker/host-x86_64/dist-loongarch64-linux/loongarch64-unknown-linux-gnu.defconfig
index aa33f72268e4..bb1d2d1f8038 100644
--- a/src/ci/docker/host-x86_64/dist-loongarch64-linux/loongarch64-unknown-linux-gnu.defconfig
+++ b/src/ci/docker/host-x86_64/dist-loongarch64-linux/loongarch64-unknown-linux-gnu.defconfig
@@ -12,5 +12,7 @@ CT_TARGET_LDFLAGS="-mcmodel=medium"
 CT_KERNEL_LINUX=y
 CT_LINUX_V_5_19=y
 CT_GLIBC_V_2_36=y
+CT_BINUTILS_V_2_42=y
+CT_GCC_V_14=y
 CT_CC_GCC_ENABLE_DEFAULT_PIE=y
 CT_CC_LANG_CXX=y
diff --git a/src/ci/docker/host-x86_64/dist-loongarch64-musl/loongarch64-unknown-linux-musl.defconfig b/src/ci/docker/host-x86_64/dist-loongarch64-musl/loongarch64-unknown-linux-musl.defconfig
index 3ccbc583c1bd..aa1696e131d4 100644
--- a/src/ci/docker/host-x86_64/dist-loongarch64-musl/loongarch64-unknown-linux-musl.defconfig
+++ b/src/ci/docker/host-x86_64/dist-loongarch64-musl/loongarch64-unknown-linux-musl.defconfig
@@ -12,6 +12,9 @@ CT_TARGET_LDFLAGS="-mcmodel=medium"
 CT_KERNEL_LINUX=y
 CT_LINUX_V_5_19=y
 CT_LIBC_MUSL=y
+CT_MUSL_V_1_2_5=y
+CT_BINUTILS_V_2_42=y
+CT_GCC_V_14=y
 CT_CC_GCC_ENABLE_DEFAULT_PIE=y
 CT_CC_LANG_CXX=y
 CT_GETTEXT_NEEDED=y
diff --git a/src/ci/docker/host-x86_64/dist-powerpc64-linux-musl/powerpc64-unknown-linux-musl.defconfig b/src/ci/docker/host-x86_64/dist-powerpc64-linux-musl/powerpc64-unknown-linux-musl.defconfig
index 08132d3ab8ba..4b7a9c3d671f 100644
--- a/src/ci/docker/host-x86_64/dist-powerpc64-linux-musl/powerpc64-unknown-linux-musl.defconfig
+++ b/src/ci/docker/host-x86_64/dist-powerpc64-linux-musl/powerpc64-unknown-linux-musl.defconfig
@@ -11,5 +11,7 @@ CT_KERNEL_LINUX=y
 CT_LINUX_V_4_19=y
 CT_LIBC_MUSL=y
 CT_MUSL_V_1_2_5=y
+CT_BINUTILS_V_2_42=y
+CT_GCC_V_14=y
 CT_CC_LANG_CXX=y
 CT_GETTEXT_NEEDED=y
diff --git a/src/ci/docker/host-x86_64/dist-powerpc64le-linux-gnu/powerpc64le-unknown-linux-gnu.defconfig b/src/ci/docker/host-x86_64/dist-powerpc64le-linux-gnu/powerpc64le-unknown-linux-gnu.defconfig
index 5fbf138cdd74..e1fd950922f7 100644
--- a/src/ci/docker/host-x86_64/dist-powerpc64le-linux-gnu/powerpc64le-unknown-linux-gnu.defconfig
+++ b/src/ci/docker/host-x86_64/dist-powerpc64le-linux-gnu/powerpc64le-unknown-linux-gnu.defconfig
@@ -11,5 +11,7 @@ CT_ARCH_ARCH="powerpc64le"
 CT_KERNEL_LINUX=y
 CT_LINUX_V_3_10=y
 CT_GLIBC_V_2_17=y
+CT_BINUTILS_V_2_42=y
+CT_GCC_V_14=y
 CT_CC_LANG_CXX=y
 CT_GETTEXT_NEEDED=y
diff --git a/src/ci/docker/host-x86_64/dist-powerpc64le-linux-musl/powerpc64le-unknown-linux-musl.defconfig b/src/ci/docker/host-x86_64/dist-powerpc64le-linux-musl/powerpc64le-unknown-linux-musl.defconfig
index db2b5533947c..a89e08572aca 100644
--- a/src/ci/docker/host-x86_64/dist-powerpc64le-linux-musl/powerpc64le-unknown-linux-musl.defconfig
+++ b/src/ci/docker/host-x86_64/dist-powerpc64le-linux-musl/powerpc64le-unknown-linux-musl.defconfig
@@ -12,5 +12,7 @@ CT_KERNEL_LINUX=y
 CT_LINUX_V_4_19=y
 CT_LIBC_MUSL=y
 CT_MUSL_V_1_2_5=y
+CT_BINUTILS_V_2_42=y
+CT_GCC_V_14=y
 CT_CC_LANG_CXX=y
 CT_GETTEXT_NEEDED=y

From 34981bf3cd9072adfe303cb2ea54d54d86ffb208 Mon Sep 17 00:00:00 2001
From: xonx <119700621+xonx4l@users.noreply.github.com>
Date: Fri, 13 Feb 2026 14:44:40 +0000
Subject: [PATCH 156/265] add comments to tests

---
 .../ui/associated-types/param-env-shadowing-false-positive.rs | 4 ++++
 .../param-env-shadowing-false-positive.stderr                 | 2 +-
 tests/ui/associated-types/param-env-shadowing-gat.rs          | 4 ++++
 tests/ui/associated-types/param-env-shadowing-gat.stderr      | 2 +-
 4 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/ui/associated-types/param-env-shadowing-false-positive.rs b/tests/ui/associated-types/param-env-shadowing-false-positive.rs
index e40d36dabc81..41993f5cba19 100644
--- a/tests/ui/associated-types/param-env-shadowing-false-positive.rs
+++ b/tests/ui/associated-types/param-env-shadowing-false-positive.rs
@@ -1,3 +1,7 @@
+// Regression test for issue #149910.
+// The compiler previously incorrectly claimed that the local param-env bound
+// shadowed the global impl, but they are actually the same.
+
 trait Trait {
     type Assoc;
 }
diff --git a/tests/ui/associated-types/param-env-shadowing-false-positive.stderr b/tests/ui/associated-types/param-env-shadowing-false-positive.stderr
index f4a687196ca1..64d7950f41ef 100644
--- a/tests/ui/associated-types/param-env-shadowing-false-positive.stderr
+++ b/tests/ui/associated-types/param-env-shadowing-false-positive.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/param-env-shadowing-false-positive.rs:10:5
+  --> $DIR/param-env-shadowing-false-positive.rs:14:5
    |
 LL | fn foo(x: T::Assoc) -> u32 {
    |                                  --- expected `u32` because of return type
diff --git a/tests/ui/associated-types/param-env-shadowing-gat.rs b/tests/ui/associated-types/param-env-shadowing-gat.rs
index c7c559eb83b2..9dc91a1a1465 100644
--- a/tests/ui/associated-types/param-env-shadowing-gat.rs
+++ b/tests/ui/associated-types/param-env-shadowing-gat.rs
@@ -1,3 +1,7 @@
+// Regression test for issue #149910.
+// This ensures that the diagnostics logic handles Generic Associated Types (GATs)
+// correctly without crashing (ICE).
+
 trait Trait {
     type Assoc;
 }
diff --git a/tests/ui/associated-types/param-env-shadowing-gat.stderr b/tests/ui/associated-types/param-env-shadowing-gat.stderr
index ed6e92c64ae0..02c024341724 100644
--- a/tests/ui/associated-types/param-env-shadowing-gat.stderr
+++ b/tests/ui/associated-types/param-env-shadowing-gat.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/param-env-shadowing-gat.rs:10:5
+  --> $DIR/param-env-shadowing-gat.rs:14:5
    |
 LL | fn foo(x: T::Assoc) -> u32 {
    |                                     --- expected `u32` because of return type

From da9ff14a13d072835afc9e70740547d5b0aacc87 Mon Sep 17 00:00:00 2001
From: Lukas Wirth 
Date: Fri, 13 Feb 2026 16:23:59 +0100
Subject: [PATCH 157/265] Remove incorrect warning log

---
 .../rust-analyzer/crates/rust-analyzer/src/flycheck.rs     | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/flycheck.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/flycheck.rs
index c74f4550fd89..797b95994073 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/flycheck.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/flycheck.rs
@@ -757,13 +757,6 @@ impl FlycheckActor {
                                         DiagnosticsReceived::AtLeastOneAndClearedWorkspace;
                                 }
 
-                                if let Some(package_id) = package_id {
-                                    tracing::warn!(
-                                        "Ignoring package label {:?} and applying diagnostics to the whole workspace",
-                                        package_id
-                                    );
-                                }
-
                                 self.send(FlycheckMessage::AddDiagnostic {
                                     id: self.id,
                                     generation: self.generation,

From ec2996cfbad0c83c172486fd6213290f43cc9a90 Mon Sep 17 00:00:00 2001
From: Antoni Boucher 
Date: Fri, 13 Feb 2026 10:39:02 -0500
Subject: [PATCH 158/265] Add cast from f128 to non-native integer

---
 src/int.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/int.rs b/src/int.rs
index 49de0b490e88..442a54addf29 100644
--- a/src/int.rs
+++ b/src/int.rs
@@ -955,6 +955,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
             // cSpell:disable
             TypeKind::Float => "sfti",
             TypeKind::Double => "dfti",
+            TypeKind::FP128 => "tfti",
             // cSpell:enable
             kind => panic!("cannot cast a {:?} to non-native integer", kind),
         };

From 4a6f0bebfb8c14ea11cbdc443d9803f750dbd934 Mon Sep 17 00:00:00 2001
From: Antoni Boucher 
Date: Fri, 13 Feb 2026 10:39:24 -0500
Subject: [PATCH 159/265] Add missing -Zjson-target-spec for m68k sysroot build

---
 build_system/src/build.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/build_system/src/build.rs b/build_system/src/build.rs
index 9b7ee8380ca5..839c762fed74 100644
--- a/build_system/src/build.rs
+++ b/build_system/src/build.rs
@@ -141,6 +141,10 @@ pub fn build_sysroot(env: &HashMap, config: &ConfigInfo) -> Resu
     }
 
     let mut args: Vec<&dyn AsRef> = vec![&"cargo", &"build", &"--target", &config.target];
+    if config.target.ends_with(".json") {
+        args.push(&"-Zjson-target-spec");
+    }
+
     for feature in &config.features {
         args.push(&"--features");
         args.push(feature);

From c5cb56957a1e245ac5bd195fbfc961f319dc9295 Mon Sep 17 00:00:00 2001
From: Antoni Boucher 
Date: Fri, 13 Feb 2026 10:56:10 -0500
Subject: [PATCH 160/265] Add cast from f16 to non-native integer

---
 src/int.rs | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/int.rs b/src/int.rs
index 442a54addf29..51612d604c8f 100644
--- a/src/int.rs
+++ b/src/int.rs
@@ -942,7 +942,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
     fn float_to_int_cast(
         &self,
         signed: bool,
-        value: RValue<'gcc>,
+        mut value: RValue<'gcc>,
         dest_typ: Type<'gcc>,
     ) -> RValue<'gcc> {
         let value_type = value.get_type();
@@ -951,9 +951,14 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
         }
 
         debug_assert!(dest_typ.dyncast_array().is_some());
+        let (dest_type, param_type) = match self.type_kind(value_type) {
+            TypeKind::Half => (Some(self.float_type), self.float_type),
+            _ => (None, value_type),
+        };
         let name_suffix = match self.type_kind(value_type) {
             // cSpell:disable
-            TypeKind::Float => "sfti",
+            // Since we will cast Half to a float, we use sfti for both.
+            TypeKind::Half | TypeKind::Float => "sfti",
             TypeKind::Double => "dfti",
             TypeKind::FP128 => "tfti",
             // cSpell:enable
@@ -961,7 +966,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
         };
         let sign = if signed { "" } else { "uns" };
         let func_name = format!("__fix{}{}", sign, name_suffix);
-        let param = self.context.new_parameter(None, value_type, "n");
+        let param = self.context.new_parameter(None, param_type, "n");
         let func = self.context.new_function(
             None,
             FunctionType::Extern,
@@ -970,6 +975,9 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
             func_name,
             false,
         );
+        if let Some(dest_type) = dest_type {
+            value = self.context.new_cast(None, value, dest_type);
+        }
         self.context.new_call(None, func, &[value])
     }
 

From 2ee28ca538088862b6be98f2f03aeb553bb4ff8c Mon Sep 17 00:00:00 2001
From: Vadim Petrochenkov 
Date: Fri, 13 Feb 2026 18:33:38 +0300
Subject: [PATCH 161/265] rustc_query_impl: Use `ControlFlow` in
 `visit_waiters` instead of nested options

---
 compiler/rustc_query_impl/src/job.rs | 62 ++++++++++++----------------
 1 file changed, 26 insertions(+), 36 deletions(-)

diff --git a/compiler/rustc_query_impl/src/job.rs b/compiler/rustc_query_impl/src/job.rs
index 19b8245b97e7..7fa5882bc8e9 100644
--- a/compiler/rustc_query_impl/src/job.rs
+++ b/compiler/rustc_query_impl/src/job.rs
@@ -1,5 +1,6 @@
 use std::io::Write;
 use std::iter;
+use std::ops::ControlFlow;
 use std::sync::Arc;
 
 use rustc_data_structures::fx::{FxHashMap, FxHashSet};
@@ -117,41 +118,33 @@ type Waiter = (QueryJobId, usize);
 
 /// Visits all the non-resumable and resumable waiters of a query.
 /// Only waiters in a query are visited.
-/// `visit` is called for every waiter and is passed a query waiting on `query_ref`
-/// and a span indicating the reason the query waited on `query_ref`.
-/// If `visit` returns Some, this function returns.
+/// `visit` is called for every waiter and is passed a query waiting on `query`
+/// and a span indicating the reason the query waited on `query`.
+/// If `visit` returns `Break`, this function also returns `Break`,
+/// and if all `visit` calls returns `Continue` it also returns `Continue`.
 /// For visits of non-resumable waiters it returns the return value of `visit`.
-/// For visits of resumable waiters it returns Some(Some(Waiter)) which has the
-/// required information to resume the waiter.
-/// If all `visit` calls returns None, this function also returns None.
-fn visit_waiters<'tcx, F>(
+/// For visits of resumable waiters it returns information required to resume that waiter.
+fn visit_waiters<'tcx>(
     job_map: &QueryJobMap<'tcx>,
     query: QueryJobId,
-    mut visit: F,
-) -> Option>
-where
-    F: FnMut(Span, QueryJobId) -> Option>,
-{
+    mut visit: impl FnMut(Span, QueryJobId) -> ControlFlow>,
+) -> ControlFlow> {
     // Visit the parent query which is a non-resumable waiter since it's on the same stack
-    if let Some(parent) = job_map.parent_of(query)
-        && let Some(cycle) = visit(job_map.span_of(query), parent)
-    {
-        return Some(cycle);
+    if let Some(parent) = job_map.parent_of(query) {
+        visit(job_map.span_of(query), parent)?;
     }
 
     // Visit the explicit waiters which use condvars and are resumable
     if let Some(latch) = job_map.latch_of(query) {
         for (i, waiter) in latch.info.lock().waiters.iter().enumerate() {
             if let Some(waiter_query) = waiter.query {
-                if visit(waiter.span, waiter_query).is_some() {
-                    // Return a value which indicates that this waiter can be resumed
-                    return Some(Some((query, i)));
-                }
+                // Return a value which indicates that this waiter can be resumed
+                visit(waiter.span, waiter_query).map_break(|_| Some((query, i)))?;
             }
         }
     }
 
-    None
+    ControlFlow::Continue(())
 }
 
 /// Look for query cycles by doing a depth first search starting at `query`.
@@ -164,7 +157,7 @@ fn cycle_check<'tcx>(
     span: Span,
     stack: &mut Vec<(Span, QueryJobId)>,
     visited: &mut FxHashSet,
-) -> Option> {
+) -> ControlFlow> {
     if !visited.insert(query) {
         return if let Some(p) = stack.iter().position(|q| q.1 == query) {
             // We detected a query cycle, fix up the initial span and return Some
@@ -173,9 +166,9 @@ fn cycle_check<'tcx>(
             stack.drain(0..p);
             // Replace the span for the first query with the cycle cause
             stack[0].0 = span;
-            Some(None)
+            ControlFlow::Break(None)
         } else {
-            None
+            ControlFlow::Continue(())
         };
     }
 
@@ -188,7 +181,7 @@ fn cycle_check<'tcx>(
     });
 
     // Remove the entry in our stack if we didn't find a cycle
-    if r.is_none() {
+    if r.is_continue() {
         stack.pop();
     }
 
@@ -202,21 +195,18 @@ fn connected_to_root<'tcx>(
     job_map: &QueryJobMap<'tcx>,
     query: QueryJobId,
     visited: &mut FxHashSet,
-) -> bool {
+) -> ControlFlow> {
     // We already visited this or we're deliberately ignoring it
     if !visited.insert(query) {
-        return false;
+        return ControlFlow::Continue(());
     }
 
     // This query is connected to the root (it has no query parent), return true
     if job_map.parent_of(query).is_none() {
-        return true;
+        return ControlFlow::Break(None);
     }
 
-    visit_waiters(job_map, query, |_, successor| {
-        connected_to_root(job_map, successor, visited).then_some(None)
-    })
-    .is_some()
+    visit_waiters(job_map, query, |_, successor| connected_to_root(job_map, successor, visited))
 }
 
 // Deterministically pick an query from a list
@@ -253,7 +243,7 @@ fn remove_cycle<'tcx>(
     let mut visited = FxHashSet::default();
     let mut stack = Vec::new();
     // Look for a cycle starting with the last query in `jobs`
-    if let Some(waiter) =
+    if let ControlFlow::Break(waiter) =
         cycle_check(job_map, jobs.pop().unwrap(), DUMMY_SP, &mut stack, &mut visited)
     {
         // The stack is a vector of pairs of spans and queries; reverse it so that
@@ -284,15 +274,15 @@ fn remove_cycle<'tcx>(
                 } else {
                     let mut waiters = Vec::new();
                     // Find all the direct waiters who lead to the root
-                    visit_waiters(job_map, query, |span, waiter| {
+                    let _ = visit_waiters(job_map, query, |span, waiter| {
                         // Mark all the other queries in the cycle as already visited
                         let mut visited = FxHashSet::from_iter(stack.iter().map(|q| q.1));
 
-                        if connected_to_root(job_map, waiter, &mut visited) {
+                        if connected_to_root(job_map, waiter, &mut visited).is_break() {
                             waiters.push((span, waiter));
                         }
 
-                        None
+                        ControlFlow::Continue(())
                     });
                     if waiters.is_empty() {
                         None

From 7ce98394cce86a54dbf4c79fc71a0d7ecbccb7e4 Mon Sep 17 00:00:00 2001
From: bit-aloo 
Date: Fri, 13 Feb 2026 22:58:11 +0530
Subject: [PATCH 162/265] migrate generate_impl to use AstNodeEdit

---
 .../ide-assists/src/handlers/generate_impl.rs | 21 +++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_impl.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_impl.rs
index 77eb8efc6f6a..bbd42481ef0f 100644
--- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_impl.rs
+++ b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/generate_impl.rs
@@ -1,5 +1,5 @@
 use syntax::{
-    ast::{self, AstNode, HasGenericParams, HasName, edit_in_place::Indent, make},
+    ast::{self, AstNode, HasGenericParams, HasName, edit::AstNodeEdit, make},
     syntax_editor::{Position, SyntaxEditor},
 };
 
@@ -8,10 +8,14 @@ use crate::{
     utils::{self, DefaultMethods, IgnoreAssocItems},
 };
 
-fn insert_impl(editor: &mut SyntaxEditor, impl_: &ast::Impl, nominal: &impl Indent) {
+fn insert_impl(
+    editor: &mut SyntaxEditor,
+    impl_: &ast::Impl,
+    nominal: &impl AstNodeEdit,
+) -> ast::Impl {
     let indent = nominal.indent_level();
 
-    impl_.indent(indent);
+    let impl_ = impl_.indent(indent);
     editor.insert_all(
         Position::after(nominal.syntax()),
         vec![
@@ -20,6 +24,8 @@ fn insert_impl(editor: &mut SyntaxEditor, impl_: &ast::Impl, nominal: &impl Inde
             impl_.syntax().clone().into(),
         ],
     );
+
+    impl_
 }
 
 // Assist: generate_impl
@@ -57,6 +63,8 @@ pub(crate) fn generate_impl(acc: &mut Assists, ctx: &AssistContext<'_>) -> Optio
             let impl_ = utils::generate_impl(&nominal);
 
             let mut editor = edit.make_editor(nominal.syntax());
+
+            let impl_ = insert_impl(&mut editor, &impl_, &nominal);
             // Add a tabstop after the left curly brace
             if let Some(cap) = ctx.config.snippet_cap
                 && let Some(l_curly) = impl_.assoc_item_list().and_then(|it| it.l_curly_token())
@@ -65,7 +73,6 @@ pub(crate) fn generate_impl(acc: &mut Assists, ctx: &AssistContext<'_>) -> Optio
                 editor.add_annotation(l_curly, tabstop);
             }
 
-            insert_impl(&mut editor, &impl_, &nominal);
             edit.add_file_edits(ctx.vfs_file_id(), editor);
         },
     )
@@ -106,6 +113,8 @@ pub(crate) fn generate_trait_impl(acc: &mut Assists, ctx: &AssistContext<'_>) ->
             let impl_ = utils::generate_trait_impl_intransitive(&nominal, make::ty_placeholder());
 
             let mut editor = edit.make_editor(nominal.syntax());
+
+            let impl_ = insert_impl(&mut editor, &impl_, &nominal);
             // Make the trait type a placeholder snippet
             if let Some(cap) = ctx.config.snippet_cap {
                 if let Some(trait_) = impl_.trait_() {
@@ -119,7 +128,6 @@ pub(crate) fn generate_trait_impl(acc: &mut Assists, ctx: &AssistContext<'_>) ->
                 }
             }
 
-            insert_impl(&mut editor, &impl_, &nominal);
             edit.add_file_edits(ctx.vfs_file_id(), editor);
         },
     )
@@ -206,6 +214,8 @@ pub(crate) fn generate_impl_trait(acc: &mut Assists, ctx: &AssistContext<'_>) ->
                 make_impl_(Some(assoc_item_list))
             };
 
+            let impl_ = insert_impl(&mut editor, &impl_, &trait_);
+
             if let Some(cap) = ctx.config.snippet_cap {
                 if let Some(generics) = impl_.trait_().and_then(|it| it.generic_arg_list()) {
                     for generic in generics.generic_args() {
@@ -232,7 +242,6 @@ pub(crate) fn generate_impl_trait(acc: &mut Assists, ctx: &AssistContext<'_>) ->
                 }
             }
 
-            insert_impl(&mut editor, &impl_, &trait_);
             edit.add_file_edits(ctx.vfs_file_id(), editor);
         },
     )

From a9cc42e5763b55e95aed9adf48435a03ac4abf1f Mon Sep 17 00:00:00 2001
From: Lukas Wirth 
Date: Fri, 13 Feb 2026 19:19:07 +0100
Subject: [PATCH 163/265] Revert "fix: Stale diagnostics with rust-project.json
 and rustc JSON"

This reverts commit 2cefe47e6d55c186b68687bf677bf0d5eb65a922.
---
 .../crates/rust-analyzer/src/flycheck.rs      | 87 +++++++------------
 1 file changed, 33 insertions(+), 54 deletions(-)

diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/flycheck.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/flycheck.rs
index 797b95994073..47f7a57f72ec 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/flycheck.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/flycheck.rs
@@ -741,63 +741,42 @@ impl FlycheckActor {
                             flycheck_id = self.id,
                             message = diagnostic.message,
                             package_id = package_id.as_ref().map(|it| it.as_str()),
-                            scope = ?self.scope,
                             "diagnostic received"
                         );
-
-                        match &self.scope {
-                            FlycheckScope::Workspace => {
-                                if self.diagnostics_received == DiagnosticsReceived::NotYet {
-                                    self.send(FlycheckMessage::ClearDiagnostics {
-                                        id: self.id,
-                                        kind: ClearDiagnosticsKind::All(ClearScope::Workspace),
-                                    });
-
-                                    self.diagnostics_received =
-                                        DiagnosticsReceived::AtLeastOneAndClearedWorkspace;
-                                }
-
-                                self.send(FlycheckMessage::AddDiagnostic {
-                                    id: self.id,
-                                    generation: self.generation,
-                                    package_id: None,
-                                    workspace_root: self.root.clone(),
-                                    diagnostic,
-                                });
-                            }
-                            FlycheckScope::Package { package: flycheck_package, .. } => {
-                                if self.diagnostics_received == DiagnosticsReceived::NotYet {
-                                    self.diagnostics_received = DiagnosticsReceived::AtLeastOne;
-                                }
-
-                                // If the package has been set in the diagnostic JSON, respect that. Otherwise, use the
-                                // package that the current flycheck is scoped to. This is useful when a project is
-                                // directly using rustc for its checks (e.g. custom check commands in rust-project.json).
-                                let package_id = package_id.unwrap_or(flycheck_package.clone());
-
-                                if self.diagnostics_cleared_for.insert(package_id.clone()) {
-                                    tracing::trace!(
-                                        flycheck_id = self.id,
-                                        package_id = package_id.as_str(),
-                                        "clearing diagnostics"
-                                    );
-                                    self.send(FlycheckMessage::ClearDiagnostics {
-                                        id: self.id,
-                                        kind: ClearDiagnosticsKind::All(ClearScope::Package(
-                                            package_id.clone(),
-                                        )),
-                                    });
-                                }
-
-                                self.send(FlycheckMessage::AddDiagnostic {
-                                    id: self.id,
-                                    generation: self.generation,
-                                    package_id: Some(package_id),
-                                    workspace_root: self.root.clone(),
-                                    diagnostic,
-                                });
-                            }
+                        if self.diagnostics_received == DiagnosticsReceived::NotYet {
+                            self.diagnostics_received = DiagnosticsReceived::AtLeastOne;
                         }
+                        if let Some(package_id) = &package_id {
+                            if self.diagnostics_cleared_for.insert(package_id.clone()) {
+                                tracing::trace!(
+                                    flycheck_id = self.id,
+                                    package_id = package_id.as_str(),
+                                    "clearing diagnostics"
+                                );
+                                self.send(FlycheckMessage::ClearDiagnostics {
+                                    id: self.id,
+                                    kind: ClearDiagnosticsKind::All(ClearScope::Package(
+                                        package_id.clone(),
+                                    )),
+                                });
+                            }
+                        } else if self.diagnostics_received
+                            != DiagnosticsReceived::AtLeastOneAndClearedWorkspace
+                        {
+                            self.diagnostics_received =
+                                DiagnosticsReceived::AtLeastOneAndClearedWorkspace;
+                            self.send(FlycheckMessage::ClearDiagnostics {
+                                id: self.id,
+                                kind: ClearDiagnosticsKind::All(ClearScope::Workspace),
+                            });
+                        }
+                        self.send(FlycheckMessage::AddDiagnostic {
+                            id: self.id,
+                            generation: self.generation,
+                            package_id,
+                            workspace_root: self.root.clone(),
+                            diagnostic,
+                        });
                     }
                 },
             }

From cd314dead15bfd58815b32a48fae68c3bb2a56a9 Mon Sep 17 00:00:00 2001
From: Pavel Grigorenko 
Date: Sun, 6 Jul 2025 21:41:48 +0300
Subject: [PATCH 164/265] Remove named lifetimes in some `PartialOrd` &
 `PartialEq` `impl`s

---
 library/alloc/src/bstr.rs             | 18 ++++-----
 library/alloc/src/string.rs           | 14 +++----
 library/core/src/bstr/traits.rs       | 14 ++-----
 library/std/src/ffi/os_str.rs         | 16 ++++----
 library/std/src/path.rs               | 58 +++++++++++++--------------
 tests/ui/inference/issue-72616.stderr |  3 ++
 6 files changed, 57 insertions(+), 66 deletions(-)

diff --git a/library/alloc/src/bstr.rs b/library/alloc/src/bstr.rs
index 338c7ac7f887..e0d88b27672e 100644
--- a/library/alloc/src/bstr.rs
+++ b/library/alloc/src/bstr.rs
@@ -477,9 +477,8 @@ impl PartialEq for ByteString {
 
 macro_rules! impl_partial_eq_ord_cow {
     ($lhs:ty, $rhs:ty) => {
-        #[allow(unused_lifetimes)]
         #[unstable(feature = "bstr", issue = "134915")]
-        impl<'a> PartialEq<$rhs> for $lhs {
+        impl PartialEq<$rhs> for $lhs {
             #[inline]
             fn eq(&self, other: &$rhs) -> bool {
                 let other: &[u8] = (&**other).as_ref();
@@ -487,9 +486,8 @@ macro_rules! impl_partial_eq_ord_cow {
             }
         }
 
-        #[allow(unused_lifetimes)]
         #[unstable(feature = "bstr", issue = "134915")]
-        impl<'a> PartialEq<$lhs> for $rhs {
+        impl PartialEq<$lhs> for $rhs {
             #[inline]
             fn eq(&self, other: &$lhs) -> bool {
                 let this: &[u8] = (&**self).as_ref();
@@ -497,9 +495,8 @@ macro_rules! impl_partial_eq_ord_cow {
             }
         }
 
-        #[allow(unused_lifetimes)]
         #[unstable(feature = "bstr", issue = "134915")]
-        impl<'a> PartialOrd<$rhs> for $lhs {
+        impl PartialOrd<$rhs> for $lhs {
             #[inline]
             fn partial_cmp(&self, other: &$rhs) -> Option {
                 let other: &[u8] = (&**other).as_ref();
@@ -507,9 +504,8 @@ macro_rules! impl_partial_eq_ord_cow {
             }
         }
 
-        #[allow(unused_lifetimes)]
         #[unstable(feature = "bstr", issue = "134915")]
-        impl<'a> PartialOrd<$lhs> for $rhs {
+        impl PartialOrd<$lhs> for $rhs {
             #[inline]
             fn partial_cmp(&self, other: &$lhs) -> Option {
                 let this: &[u8] = (&**self).as_ref();
@@ -667,9 +663,9 @@ impl From> for Arc<[u8]> {
 impl_partial_eq!(ByteStr, Vec);
 // PartialOrd with `String` omitted to avoid inference failures
 impl_partial_eq!(ByteStr, String);
-impl_partial_eq_ord_cow!(&'a ByteStr, Cow<'a, ByteStr>);
-impl_partial_eq_ord_cow!(&'a ByteStr, Cow<'a, str>);
-impl_partial_eq_ord_cow!(&'a ByteStr, Cow<'a, [u8]>);
+impl_partial_eq_ord_cow!(&ByteStr, Cow<'_, ByteStr>);
+impl_partial_eq_ord_cow!(&ByteStr, Cow<'_, str>);
+impl_partial_eq_ord_cow!(&ByteStr, Cow<'_, [u8]>);
 
 #[unstable(feature = "bstr", issue = "134915")]
 impl<'a> TryFrom<&'a ByteStr> for String {
diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs
index 4100ee55a4c7..30e52f3e1be4 100644
--- a/library/alloc/src/string.rs
+++ b/library/alloc/src/string.rs
@@ -2661,8 +2661,7 @@ impl<'b> Pattern for &'b String {
 macro_rules! impl_eq {
     ($lhs:ty, $rhs: ty) => {
         #[stable(feature = "rust1", since = "1.0.0")]
-        #[allow(unused_lifetimes)]
-        impl<'a, 'b> PartialEq<$rhs> for $lhs {
+        impl PartialEq<$rhs> for $lhs {
             #[inline]
             fn eq(&self, other: &$rhs) -> bool {
                 PartialEq::eq(&self[..], &other[..])
@@ -2674,8 +2673,7 @@ macro_rules! impl_eq {
         }
 
         #[stable(feature = "rust1", since = "1.0.0")]
-        #[allow(unused_lifetimes)]
-        impl<'a, 'b> PartialEq<$lhs> for $rhs {
+        impl PartialEq<$lhs> for $rhs {
             #[inline]
             fn eq(&self, other: &$lhs) -> bool {
                 PartialEq::eq(&self[..], &other[..])
@@ -2689,13 +2687,13 @@ macro_rules! impl_eq {
 }
 
 impl_eq! { String, str }
-impl_eq! { String, &'a str }
+impl_eq! { String, &str }
 #[cfg(not(no_global_oom_handling))]
-impl_eq! { Cow<'a, str>, str }
+impl_eq! { Cow<'_, str>, str }
 #[cfg(not(no_global_oom_handling))]
-impl_eq! { Cow<'a, str>, &'b str }
+impl_eq! { Cow<'_, str>, &'_ str }
 #[cfg(not(no_global_oom_handling))]
-impl_eq! { Cow<'a, str>, String }
+impl_eq! { Cow<'_, str>, String }
 
 #[stable(feature = "rust1", since = "1.0.0")]
 #[rustc_const_unstable(feature = "const_default", issue = "143894")]
diff --git a/library/core/src/bstr/traits.rs b/library/core/src/bstr/traits.rs
index ff46bb13ba4e..7da6c5f13cce 100644
--- a/library/core/src/bstr/traits.rs
+++ b/library/core/src/bstr/traits.rs
@@ -45,8 +45,7 @@ impl hash::Hash for ByteStr {
 #[unstable(feature = "bstr_internals", issue = "none")]
 macro_rules! impl_partial_eq {
     ($lhs:ty, $rhs:ty) => {
-        #[allow(unused_lifetimes)]
-        impl<'a> PartialEq<$rhs> for $lhs {
+        impl PartialEq<$rhs> for $lhs {
             #[inline]
             fn eq(&self, other: &$rhs) -> bool {
                 let other: &[u8] = other.as_ref();
@@ -54,8 +53,7 @@ macro_rules! impl_partial_eq {
             }
         }
 
-        #[allow(unused_lifetimes)]
-        impl<'a> PartialEq<$lhs> for $rhs {
+        impl PartialEq<$lhs> for $rhs {
             #[inline]
             fn eq(&self, other: &$lhs) -> bool {
                 let this: &[u8] = self.as_ref();
@@ -76,9 +74,8 @@ macro_rules! impl_partial_eq_ord {
     ($lhs:ty, $rhs:ty) => {
         $crate::bstr::impl_partial_eq!($lhs, $rhs);
 
-        #[allow(unused_lifetimes)]
         #[unstable(feature = "bstr", issue = "134915")]
-        impl<'a> PartialOrd<$rhs> for $lhs {
+        impl PartialOrd<$rhs> for $lhs {
             #[inline]
             fn partial_cmp(&self, other: &$rhs) -> Option {
                 let other: &[u8] = other.as_ref();
@@ -86,9 +83,8 @@ macro_rules! impl_partial_eq_ord {
             }
         }
 
-        #[allow(unused_lifetimes)]
         #[unstable(feature = "bstr", issue = "134915")]
-        impl<'a> PartialOrd<$lhs> for $rhs {
+        impl PartialOrd<$lhs> for $rhs {
             #[inline]
             fn partial_cmp(&self, other: &$lhs) -> Option {
                 let this: &[u8] = self.as_ref();
@@ -107,7 +103,6 @@ pub use impl_partial_eq_ord;
 #[unstable(feature = "bstr_internals", issue = "none")]
 macro_rules! impl_partial_eq_n {
     ($lhs:ty, $rhs:ty) => {
-        #[allow(unused_lifetimes)]
         #[unstable(feature = "bstr", issue = "134915")]
         impl PartialEq<$rhs> for $lhs {
             #[inline]
@@ -117,7 +112,6 @@ macro_rules! impl_partial_eq_n {
             }
         }
 
-        #[allow(unused_lifetimes)]
         #[unstable(feature = "bstr", issue = "134915")]
         impl PartialEq<$lhs> for $rhs {
             #[inline]
diff --git a/library/std/src/ffi/os_str.rs b/library/std/src/ffi/os_str.rs
index 4e4d377ae270..ca910153e526 100644
--- a/library/std/src/ffi/os_str.rs
+++ b/library/std/src/ffi/os_str.rs
@@ -1565,7 +1565,7 @@ impl Ord for OsStr {
 macro_rules! impl_cmp {
     ($lhs:ty, $rhs: ty) => {
         #[stable(feature = "cmp_os_str", since = "1.8.0")]
-        impl<'a, 'b> PartialEq<$rhs> for $lhs {
+        impl PartialEq<$rhs> for $lhs {
             #[inline]
             fn eq(&self, other: &$rhs) -> bool {
                 ::eq(self, other)
@@ -1573,7 +1573,7 @@ macro_rules! impl_cmp {
         }
 
         #[stable(feature = "cmp_os_str", since = "1.8.0")]
-        impl<'a, 'b> PartialEq<$lhs> for $rhs {
+        impl PartialEq<$lhs> for $rhs {
             #[inline]
             fn eq(&self, other: &$lhs) -> bool {
                 ::eq(self, other)
@@ -1581,7 +1581,7 @@ macro_rules! impl_cmp {
         }
 
         #[stable(feature = "cmp_os_str", since = "1.8.0")]
-        impl<'a, 'b> PartialOrd<$rhs> for $lhs {
+        impl PartialOrd<$rhs> for $lhs {
             #[inline]
             fn partial_cmp(&self, other: &$rhs) -> Option {
                 ::partial_cmp(self, other)
@@ -1589,7 +1589,7 @@ macro_rules! impl_cmp {
         }
 
         #[stable(feature = "cmp_os_str", since = "1.8.0")]
-        impl<'a, 'b> PartialOrd<$lhs> for $rhs {
+        impl PartialOrd<$lhs> for $rhs {
             #[inline]
             fn partial_cmp(&self, other: &$lhs) -> Option {
                 ::partial_cmp(self, other)
@@ -1599,10 +1599,10 @@ macro_rules! impl_cmp {
 }
 
 impl_cmp!(OsString, OsStr);
-impl_cmp!(OsString, &'a OsStr);
-impl_cmp!(Cow<'a, OsStr>, OsStr);
-impl_cmp!(Cow<'a, OsStr>, &'b OsStr);
-impl_cmp!(Cow<'a, OsStr>, OsString);
+impl_cmp!(OsString, &OsStr);
+impl_cmp!(Cow<'_, OsStr>, OsStr);
+impl_cmp!(Cow<'_, OsStr>, &OsStr);
+impl_cmp!(Cow<'_, OsStr>, OsString);
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl Hash for OsStr {
diff --git a/library/std/src/path.rs b/library/std/src/path.rs
index 14b41a427f1e..bf27df7b0428 100644
--- a/library/std/src/path.rs
+++ b/library/std/src/path.rs
@@ -3841,9 +3841,9 @@ impl<'a> IntoIterator for &'a Path {
 }
 
 macro_rules! impl_cmp {
-    (<$($life:lifetime),*> $lhs:ty, $rhs: ty) => {
+    ($lhs:ty, $rhs: ty) => {
         #[stable(feature = "partialeq_path", since = "1.6.0")]
-        impl<$($life),*> PartialEq<$rhs> for $lhs {
+        impl PartialEq<$rhs> for $lhs {
             #[inline]
             fn eq(&self, other: &$rhs) -> bool {
                 ::eq(self, other)
@@ -3851,7 +3851,7 @@ macro_rules! impl_cmp {
         }
 
         #[stable(feature = "partialeq_path", since = "1.6.0")]
-        impl<$($life),*> PartialEq<$lhs> for $rhs {
+        impl PartialEq<$lhs> for $rhs {
             #[inline]
             fn eq(&self, other: &$lhs) -> bool {
                 ::eq(self, other)
@@ -3859,7 +3859,7 @@ macro_rules! impl_cmp {
         }
 
         #[stable(feature = "cmp_path", since = "1.8.0")]
-        impl<$($life),*> PartialOrd<$rhs> for $lhs {
+        impl PartialOrd<$rhs> for $lhs {
             #[inline]
             fn partial_cmp(&self, other: &$rhs) -> Option {
                 ::partial_cmp(self, other)
@@ -3867,7 +3867,7 @@ macro_rules! impl_cmp {
         }
 
         #[stable(feature = "cmp_path", since = "1.8.0")]
-        impl<$($life),*> PartialOrd<$lhs> for $rhs {
+        impl PartialOrd<$lhs> for $rhs {
             #[inline]
             fn partial_cmp(&self, other: &$lhs) -> Option {
                 ::partial_cmp(self, other)
@@ -3876,16 +3876,16 @@ macro_rules! impl_cmp {
     };
 }
 
-impl_cmp!(<> PathBuf, Path);
-impl_cmp!(<'a> PathBuf, &'a Path);
-impl_cmp!(<'a> Cow<'a, Path>, Path);
-impl_cmp!(<'a, 'b> Cow<'a, Path>, &'b Path);
-impl_cmp!(<'a> Cow<'a, Path>, PathBuf);
+impl_cmp!(PathBuf, Path);
+impl_cmp!(PathBuf, &Path);
+impl_cmp!(Cow<'_, Path>, Path);
+impl_cmp!(Cow<'_, Path>, &Path);
+impl_cmp!(Cow<'_, Path>, PathBuf);
 
 macro_rules! impl_cmp_os_str {
-    (<$($life:lifetime),*> $lhs:ty, $rhs: ty) => {
+    ($lhs:ty, $rhs: ty) => {
         #[stable(feature = "cmp_path", since = "1.8.0")]
-        impl<$($life),*> PartialEq<$rhs> for $lhs {
+        impl PartialEq<$rhs> for $lhs {
             #[inline]
             fn eq(&self, other: &$rhs) -> bool {
                 ::eq(self, other.as_ref())
@@ -3893,7 +3893,7 @@ macro_rules! impl_cmp_os_str {
         }
 
         #[stable(feature = "cmp_path", since = "1.8.0")]
-        impl<$($life),*> PartialEq<$lhs> for $rhs {
+        impl PartialEq<$lhs> for $rhs {
             #[inline]
             fn eq(&self, other: &$lhs) -> bool {
                 ::eq(self.as_ref(), other)
@@ -3901,7 +3901,7 @@ macro_rules! impl_cmp_os_str {
         }
 
         #[stable(feature = "cmp_path", since = "1.8.0")]
-        impl<$($life),*> PartialOrd<$rhs> for $lhs {
+        impl PartialOrd<$rhs> for $lhs {
             #[inline]
             fn partial_cmp(&self, other: &$rhs) -> Option {
                 ::partial_cmp(self, other.as_ref())
@@ -3909,7 +3909,7 @@ macro_rules! impl_cmp_os_str {
         }
 
         #[stable(feature = "cmp_path", since = "1.8.0")]
-        impl<$($life),*> PartialOrd<$lhs> for $rhs {
+        impl PartialOrd<$lhs> for $rhs {
             #[inline]
             fn partial_cmp(&self, other: &$lhs) -> Option {
                 ::partial_cmp(self.as_ref(), other)
@@ -3918,20 +3918,20 @@ macro_rules! impl_cmp_os_str {
     };
 }
 
-impl_cmp_os_str!(<> PathBuf, OsStr);
-impl_cmp_os_str!(<'a> PathBuf, &'a OsStr);
-impl_cmp_os_str!(<'a> PathBuf, Cow<'a, OsStr>);
-impl_cmp_os_str!(<> PathBuf, OsString);
-impl_cmp_os_str!(<> Path, OsStr);
-impl_cmp_os_str!(<'a> Path, &'a OsStr);
-impl_cmp_os_str!(<'a> Path, Cow<'a, OsStr>);
-impl_cmp_os_str!(<> Path, OsString);
-impl_cmp_os_str!(<'a> &'a Path, OsStr);
-impl_cmp_os_str!(<'a, 'b> &'a Path, Cow<'b, OsStr>);
-impl_cmp_os_str!(<'a> &'a Path, OsString);
-impl_cmp_os_str!(<'a> Cow<'a, Path>, OsStr);
-impl_cmp_os_str!(<'a, 'b> Cow<'a, Path>, &'b OsStr);
-impl_cmp_os_str!(<'a> Cow<'a, Path>, OsString);
+impl_cmp_os_str!(PathBuf, OsStr);
+impl_cmp_os_str!(PathBuf, &OsStr);
+impl_cmp_os_str!(PathBuf, Cow<'_, OsStr>);
+impl_cmp_os_str!(PathBuf, OsString);
+impl_cmp_os_str!(Path, OsStr);
+impl_cmp_os_str!(Path, &OsStr);
+impl_cmp_os_str!(Path, Cow<'_, OsStr>);
+impl_cmp_os_str!(Path, OsString);
+impl_cmp_os_str!(&Path, OsStr);
+impl_cmp_os_str!(&Path, Cow<'_, OsStr>);
+impl_cmp_os_str!(&Path, OsString);
+impl_cmp_os_str!(Cow<'_, Path>, OsStr);
+impl_cmp_os_str!(Cow<'_, Path>, &OsStr);
+impl_cmp_os_str!(Cow<'_, Path>, OsString);
 
 #[stable(since = "1.7.0", feature = "strip_prefix")]
 impl fmt::Display for StripPrefixError {
diff --git a/tests/ui/inference/issue-72616.stderr b/tests/ui/inference/issue-72616.stderr
index 6b47d5688113..8eba3216a846 100644
--- a/tests/ui/inference/issue-72616.stderr
+++ b/tests/ui/inference/issue-72616.stderr
@@ -8,8 +8,11 @@ LL |         if String::from("a") == "a".try_into().unwrap() {}
    |
    = note: multiple `impl`s satisfying `String: PartialEq<_>` found in the following crates: `alloc`, `std`:
            - impl PartialEq for String;
+           - impl PartialEq for String;
+           - impl PartialEq for String;
            - impl PartialEq for String;
            - impl PartialEq for String;
+           - impl PartialEq for String;
 help: try using a fully qualified path to specify the expected types
    |
 LL -         if String::from("a") == "a".try_into().unwrap() {}

From c22301b0991e641b276271bea1930dcd2a02176e Mon Sep 17 00:00:00 2001
From: Paul Mabileau 
Date: Thu, 12 Feb 2026 12:21:32 +0100
Subject: [PATCH 165/265] Test(lib/win/net): Skip UDS tests when under Win7

Unix Domain Socket support has only been added to Windows since Windows
10 Insider Preview Build 17063. Thus, it has no chance of ever being
supported under Windows 7, making current tests fail. This therefore
adds the necessary in order to make the tests dynamically skip when run
under Windows 7, 8, and early 10, as it does not trigger linker errors.

Signed-off-by: Paul Mabileau 
---
 library/std/src/os/windows/net/listener.rs |   2 +
 library/std/src/os/windows/net/stream.rs   |   2 +
 library/std/tests/windows_unix_socket.rs   | 135 ++++++++++++++++++++-
 3 files changed, 138 insertions(+), 1 deletion(-)

diff --git a/library/std/src/os/windows/net/listener.rs b/library/std/src/os/windows/net/listener.rs
index 332b116ee1a3..345cfe8d22ba 100644
--- a/library/std/src/os/windows/net/listener.rs
+++ b/library/std/src/os/windows/net/listener.rs
@@ -12,6 +12,8 @@ use crate::{fmt, io};
 
 /// A structure representing a Unix domain socket server.
 ///
+/// Under Windows, it will only work starting from Windows 10 17063.
+///
 /// # Examples
 ///
 /// ```no_run
diff --git a/library/std/src/os/windows/net/stream.rs b/library/std/src/os/windows/net/stream.rs
index c31f03fdf53f..f2d0f7c09e9f 100644
--- a/library/std/src/os/windows/net/stream.rs
+++ b/library/std/src/os/windows/net/stream.rs
@@ -17,6 +17,8 @@ use crate::time::Duration;
 use crate::{fmt, io};
 /// A Unix stream socket.
 ///
+/// Under Windows, it will only work starting from Windows 10 17063.
+///
 /// # Examples
 ///
 /// ```no_run
diff --git a/library/std/tests/windows_unix_socket.rs b/library/std/tests/windows_unix_socket.rs
index 1f20cf586ca2..1d16ec9ed841 100644
--- a/library/std/tests/windows_unix_socket.rs
+++ b/library/std/tests/windows_unix_socket.rs
@@ -5,10 +5,24 @@
 // in the future, will test both unix and windows uds
 use std::io::{Read, Write};
 use std::os::windows::net::{UnixListener, UnixStream};
-use std::thread;
+use std::{mem, thread};
+
+macro_rules! skip_nonapplicable_oses {
+    () => {
+        // UDS have been available under Windows since Insider Preview Build
+        // 17063. "Redstone 4" (RS4, version 1803, build number 17134) is
+        // therefore the first official release to include it.
+        if !is_windows_10_v1803_or_greater() {
+            println!("Not running this test on too-old Windows.");
+            return;
+        }
+    };
+}
 
 #[test]
 fn win_uds_smoke_bind_connect() {
+    skip_nonapplicable_oses!();
+
     let tmp = std::env::temp_dir();
     let sock_path = tmp.join("rust-test-uds-smoke.sock");
     let _ = std::fs::remove_file(&sock_path);
@@ -32,6 +46,8 @@ fn win_uds_smoke_bind_connect() {
 
 #[test]
 fn win_uds_echo() {
+    skip_nonapplicable_oses!();
+
     let tmp = std::env::temp_dir();
     let sock_path = tmp.join("rust-test-uds-echo.sock");
     let _ = std::fs::remove_file(&sock_path);
@@ -68,14 +84,19 @@ fn win_uds_echo() {
 
 #[test]
 fn win_uds_path_too_long() {
+    skip_nonapplicable_oses!();
+
     let tmp = std::env::temp_dir();
     let long_path = tmp.join("a".repeat(200));
     let result = UnixListener::bind(&long_path);
     assert!(result.is_err());
     let _ = std::fs::remove_file(&long_path);
 }
+
 #[test]
 fn win_uds_existing_bind() {
+    skip_nonapplicable_oses!();
+
     let tmp = std::env::temp_dir();
     let sock_path = tmp.join("rust-test-uds-existing.sock");
     let _ = std::fs::remove_file(&sock_path);
@@ -85,3 +106,115 @@ fn win_uds_existing_bind() {
     drop(listener);
     let _ = std::fs::remove_file(&sock_path);
 }
+
+/// Returns true if we are currently running on Windows 10 v1803 (RS4) or greater.
+fn is_windows_10_v1803_or_greater() -> bool {
+    is_windows_version_greater_or_equal(NTDDI_WIN10_RS4)
+}
+
+/// Returns true if we are currently running on the given version of Windows
+/// 10 (or newer).
+fn is_windows_version_greater_or_equal(min_version: u32) -> bool {
+    is_windows_version_or_greater(HIBYTE(OSVER(min_version)), LOBYTE(OSVER(min_version)), 0, 0)
+}
+
+/// Checks if we are running a version of Windows newer than the specified one.
+fn is_windows_version_or_greater(
+    major: u8,
+    minor: u8,
+    service_pack: u8,
+    build_number: u32,
+) -> bool {
+    let mut osvi = OSVERSIONINFOEXW {
+        dwOSVersionInfoSize: mem::size_of::() as _,
+        dwMajorVersion: u32::from(major),
+        dwMinorVersion: u32::from(minor),
+        wServicePackMajor: u16::from(service_pack),
+        dwBuildNumber: build_number,
+        ..OSVERSIONINFOEXW::default()
+    };
+
+    // SAFETY: this function is always safe to call.
+    let condmask = unsafe {
+        VerSetConditionMask(
+            VerSetConditionMask(
+                VerSetConditionMask(
+                    VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL as _),
+                    VER_MINORVERSION,
+                    VER_GREATER_EQUAL as _,
+                ),
+                VER_SERVICEPACKMAJOR,
+                VER_GREATER_EQUAL as _,
+            ),
+            VER_BUILDNUMBER,
+            VER_GREATER_EQUAL as _,
+        )
+    };
+
+    // SAFETY: osvi needs to point to a memory region valid for at least
+    // dwOSVersionInfoSize bytes, which is the case here.
+    (unsafe {
+        RtlVerifyVersionInfo(
+            &raw mut osvi,
+            VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR,
+            condmask,
+        )
+    }) == STATUS_SUCCESS
+}
+
+#[expect(non_snake_case)]
+const fn HIBYTE(x: u16) -> u8 {
+    ((x >> 8) & 0xFF) as u8
+}
+
+#[expect(non_snake_case)]
+const fn LOBYTE(x: u16) -> u8 {
+    (x & 0xFF) as u8
+}
+
+#[expect(non_snake_case)]
+const fn OSVER(x: u32) -> u16 {
+    ((x & OSVERSION_MASK) >> 16) as u16
+}
+
+// Inlined bindings because outside of `std` here.
+
+type NTSTATUS = i32;
+const STATUS_SUCCESS: NTSTATUS = 0;
+
+#[expect(non_camel_case_types)]
+type VER_FLAGS = u32;
+const VER_BUILDNUMBER: VER_FLAGS = 4u32;
+const VER_GREATER_EQUAL: VER_FLAGS = 3u32;
+const VER_MAJORVERSION: VER_FLAGS = 2u32;
+const VER_MINORVERSION: VER_FLAGS = 1u32;
+const VER_SERVICEPACKMAJOR: VER_FLAGS = 32u32;
+
+const OSVERSION_MASK: u32 = 4294901760u32;
+const NTDDI_WIN10_RS4: u32 = 167772165u32;
+
+#[expect(non_snake_case)]
+#[repr(C)]
+#[derive(Clone, Copy)]
+struct OSVERSIONINFOEXW {
+    pub dwOSVersionInfoSize: u32,
+    pub dwMajorVersion: u32,
+    pub dwMinorVersion: u32,
+    pub dwBuildNumber: u32,
+    pub dwPlatformId: u32,
+    pub szCSDVersion: [u16; 128],
+    pub wServicePackMajor: u16,
+    pub wServicePackMinor: u16,
+    pub wSuiteMask: u16,
+    pub wProductType: u8,
+    pub wReserved: u8,
+}
+
+impl Default for OSVERSIONINFOEXW {
+    fn default() -> Self {
+        unsafe { core::mem::zeroed() }
+    }
+}
+
+windows_link::link!("ntdll.dll" "system" fn RtlVerifyVersionInfo(versioninfo : *const OSVERSIONINFOEXW, typemask : u32, conditionmask : u64) -> NTSTATUS);
+windows_link::link!("kernel32.dll" "system" fn VerSetConditionMask(conditionmask : u64, typemask : VER_FLAGS, condition : u8) -> u64);

From 774268afc1eb742698a4230e4a8534a43f936f9d Mon Sep 17 00:00:00 2001
From: Scott McMurray 
Date: Fri, 13 Feb 2026 21:04:59 -0800
Subject: [PATCH 166/265] Pass alignments through the shim as `Alignment` (not
 `usize`)

We're using `Layout` on both sides, so might as well skip the transmutes back and forth to `usize`.

The mir-opt test shows that doing so allows simplifying the boxed-slice drop slightly, for example.
---
 .../src/global_allocator.rs                    | 18 ++++++++++++++----
 compiler/rustc_span/src/symbol.rs              |  2 ++
 library/alloc/src/alloc.rs                     | 18 +++++++++---------
 library/core/src/macros/mod.rs                 |  2 +-
 tests/codegen-llvm/box-uninit-bytes.rs         |  2 +-
 tests/codegen-llvm/vec-calloc.rs               |  2 +-
 ...lace.PreCodegen.after.32bit.panic-abort.mir | 16 +++-------------
 ...ace.PreCodegen.after.32bit.panic-unwind.mir | 16 +++-------------
 ...lace.PreCodegen.after.64bit.panic-abort.mir | 16 +++-------------
 ...ace.PreCodegen.after.64bit.panic-unwind.mir | 16 +++-------------
 tests/mir-opt/pre-codegen/drop_boxed_slice.rs  |  3 +--
 11 files changed, 41 insertions(+), 70 deletions(-)

diff --git a/compiler/rustc_builtin_macros/src/global_allocator.rs b/compiler/rustc_builtin_macros/src/global_allocator.rs
index 9e22d408c125..d9116182eed0 100644
--- a/compiler/rustc_builtin_macros/src/global_allocator.rs
+++ b/compiler/rustc_builtin_macros/src/global_allocator.rs
@@ -128,11 +128,15 @@ impl AllocFnFactory<'_, '_> {
 
                 let usize = self.cx.path_ident(self.span, Ident::new(sym::usize, self.span));
                 let ty_usize = self.cx.ty_path(usize);
-                args.push(self.cx.param(self.span, size, ty_usize.clone()));
-                args.push(self.cx.param(self.span, align, ty_usize));
+                args.push(self.cx.param(self.span, size, ty_usize));
+                let ty_align = self.ptr_alignment();
+                args.push(self.cx.param(self.span, align, ty_align));
 
-                let layout_new =
-                    self.cx.std_path(&[sym::alloc, sym::Layout, sym::from_size_align_unchecked]);
+                let layout_new = self.cx.std_path(&[
+                    sym::alloc,
+                    sym::Layout,
+                    sym::from_size_alignment_unchecked,
+                ]);
                 let layout_new = self.cx.expr_path(self.cx.path(self.span, layout_new));
                 let size = self.cx.expr_ident(self.span, size);
                 let align = self.cx.expr_ident(self.span, align);
@@ -175,6 +179,12 @@ impl AllocFnFactory<'_, '_> {
         self.cx.ty_path(usize)
     }
 
+    fn ptr_alignment(&self) -> Box {
+        let path = self.cx.std_path(&[sym::ptr, sym::Alignment]);
+        let path = self.cx.path(self.span, path);
+        self.cx.ty_path(path)
+    }
+
     fn ptr_u8(&self) -> Box {
         let u8 = self.cx.path_ident(self.span, Ident::new(sym::u8, self.span));
         let ty_u8 = self.cx.ty_path(u8);
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index b9a9d8029d28..0ed5ff28b504 100644
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
@@ -157,6 +157,7 @@ symbols! {
         Abi,
         AcqRel,
         Acquire,
+        Alignment,
         Any,
         Arc,
         ArcWeak,
@@ -1147,6 +1148,7 @@ symbols! {
         from_output,
         from_residual,
         from_size_align_unchecked,
+        from_size_alignment_unchecked,
         from_str,
         from_str_method,
         from_str_nonconst,
diff --git a/library/alloc/src/alloc.rs b/library/alloc/src/alloc.rs
index cd1c2ea8fcd1..263bb1036d8c 100644
--- a/library/alloc/src/alloc.rs
+++ b/library/alloc/src/alloc.rs
@@ -5,7 +5,7 @@
 #[stable(feature = "alloc_module", since = "1.28.0")]
 #[doc(inline)]
 pub use core::alloc::*;
-use core::ptr::{self, NonNull};
+use core::ptr::{self, Alignment, NonNull};
 use core::{cmp, hint};
 
 unsafe extern "Rust" {
@@ -18,19 +18,19 @@ unsafe extern "Rust" {
     #[rustc_nounwind]
     #[rustc_std_internal_symbol]
     #[rustc_allocator_zeroed_variant = "__rust_alloc_zeroed"]
-    fn __rust_alloc(size: usize, align: usize) -> *mut u8;
+    fn __rust_alloc(size: usize, align: Alignment) -> *mut u8;
     #[rustc_deallocator]
     #[rustc_nounwind]
     #[rustc_std_internal_symbol]
-    fn __rust_dealloc(ptr: *mut u8, size: usize, align: usize);
+    fn __rust_dealloc(ptr: *mut u8, size: usize, align: Alignment);
     #[rustc_reallocator]
     #[rustc_nounwind]
     #[rustc_std_internal_symbol]
-    fn __rust_realloc(ptr: *mut u8, old_size: usize, align: usize, new_size: usize) -> *mut u8;
+    fn __rust_realloc(ptr: *mut u8, old_size: usize, align: Alignment, new_size: usize) -> *mut u8;
     #[rustc_allocator_zeroed]
     #[rustc_nounwind]
     #[rustc_std_internal_symbol]
-    fn __rust_alloc_zeroed(size: usize, align: usize) -> *mut u8;
+    fn __rust_alloc_zeroed(size: usize, align: Alignment) -> *mut u8;
 
     #[rustc_nounwind]
     #[rustc_std_internal_symbol]
@@ -92,7 +92,7 @@ pub unsafe fn alloc(layout: Layout) -> *mut u8 {
         // stable code until it is actually stabilized.
         __rust_no_alloc_shim_is_unstable_v2();
 
-        __rust_alloc(layout.size(), layout.align())
+        __rust_alloc(layout.size(), layout.alignment())
     }
 }
 
@@ -112,7 +112,7 @@ pub unsafe fn alloc(layout: Layout) -> *mut u8 {
 #[inline]
 #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
 pub unsafe fn dealloc(ptr: *mut u8, layout: Layout) {
-    unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) }
+    unsafe { __rust_dealloc(ptr, layout.size(), layout.alignment()) }
 }
 
 /// Reallocates memory with the global allocator.
@@ -132,7 +132,7 @@ pub unsafe fn dealloc(ptr: *mut u8, layout: Layout) {
 #[inline]
 #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
 pub unsafe fn realloc(ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 {
-    unsafe { __rust_realloc(ptr, layout.size(), layout.align(), new_size) }
+    unsafe { __rust_realloc(ptr, layout.size(), layout.alignment(), new_size) }
 }
 
 /// Allocates zero-initialized memory with the global allocator.
@@ -175,7 +175,7 @@ pub unsafe fn alloc_zeroed(layout: Layout) -> *mut u8 {
         // stable code until it is actually stabilized.
         __rust_no_alloc_shim_is_unstable_v2();
 
-        __rust_alloc_zeroed(layout.size(), layout.align())
+        __rust_alloc_zeroed(layout.size(), layout.alignment())
     }
 }
 
diff --git a/library/core/src/macros/mod.rs b/library/core/src/macros/mod.rs
index 79eab552303e..e20241f8e4cd 100644
--- a/library/core/src/macros/mod.rs
+++ b/library/core/src/macros/mod.rs
@@ -1777,7 +1777,7 @@ pub(crate) mod builtin {
     ///
     /// See also [`std::alloc::GlobalAlloc`](../../../std/alloc/trait.GlobalAlloc.html).
     #[stable(feature = "global_allocator", since = "1.28.0")]
-    #[allow_internal_unstable(rustc_attrs)]
+    #[allow_internal_unstable(rustc_attrs, ptr_alignment_type)]
     #[rustc_builtin_macro]
     pub macro global_allocator($item:item) {
         /* compiler built-in */
diff --git a/tests/codegen-llvm/box-uninit-bytes.rs b/tests/codegen-llvm/box-uninit-bytes.rs
index 0cc011485951..7ac929646cd4 100644
--- a/tests/codegen-llvm/box-uninit-bytes.rs
+++ b/tests/codegen-llvm/box-uninit-bytes.rs
@@ -41,6 +41,6 @@ pub fn box_lotsa_padding() -> Box {
 
 // Hide the `allocalign` attribute in the declaration of __rust_alloc
 // from the CHECK-NOT above, and also verify the attributes got set reasonably.
-// CHECK: declare {{(dso_local )?}}noalias noundef ptr @{{.*}}__rust_alloc(i{{[0-9]+}} noundef, i{{[0-9]+}} allocalign noundef) unnamed_addr [[RUST_ALLOC_ATTRS:#[0-9]+]]
+// CHECK: declare {{(dso_local )?}}noalias noundef ptr @{{.*}}__rust_alloc(i{{[0-9]+}} noundef, i{{[0-9]+}} allocalign noundef range(i{{[0-9]+}} 1, {{-2147483647|-9223372036854775807}})) unnamed_addr [[RUST_ALLOC_ATTRS:#[0-9]+]]
 
 // CHECK-DAG: attributes [[RUST_ALLOC_ATTRS]] = { {{.*}} allockind("alloc,uninitialized,aligned") allocsize(0) {{(uwtable )?}}"alloc-family"="__rust_alloc" {{.*}} }
diff --git a/tests/codegen-llvm/vec-calloc.rs b/tests/codegen-llvm/vec-calloc.rs
index 15971bbfa003..b02b858f966b 100644
--- a/tests/codegen-llvm/vec-calloc.rs
+++ b/tests/codegen-llvm/vec-calloc.rs
@@ -197,6 +197,6 @@ pub fn vec_array(n: usize) -> Vec<[u32; 1_000_000]> {
 }
 
 // Ensure that __rust_alloc_zeroed gets the right attributes for LLVM to optimize it away.
-// CHECK: declare noalias noundef ptr @{{.*}}__rust_alloc_zeroed(i64 noundef, i64 allocalign noundef) unnamed_addr [[RUST_ALLOC_ZEROED_ATTRS:#[0-9]+]]
+// CHECK: declare noalias noundef ptr @{{.*}}__rust_alloc_zeroed(i64 noundef, i64 allocalign noundef range(i64 1, -9223372036854775807)) unnamed_addr [[RUST_ALLOC_ZEROED_ATTRS:#[0-9]+]]
 
 // CHECK-DAG: attributes [[RUST_ALLOC_ZEROED_ATTRS]] = { {{.*}} allockind("alloc,zeroed,aligned") allocsize(0) uwtable "alloc-family"="__rust_alloc" {{.*}} }
diff --git a/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.32bit.panic-abort.mir b/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.32bit.panic-abort.mir
index 0adc66951e78..f8e575f490b0 100644
--- a/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.32bit.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.32bit.panic-abort.mir
@@ -8,7 +8,7 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
             let _2: std::ptr::NonNull<[T]>;
             let mut _3: *mut [T];
             let mut _4: *const [T];
-            let _10: ();
+            let _9: ();
             scope 3 {
                 scope 4 {
                     scope 17 (inlined Layout::size) {
@@ -32,16 +32,9 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
                                 scope 27 (inlined NonNull::::as_ptr) {
                                 }
                                 scope 28 (inlined std::alloc::dealloc) {
-                                    let mut _9: usize;
                                     scope 29 (inlined Layout::size) {
                                     }
-                                    scope 30 (inlined Layout::align) {
-                                        scope 31 (inlined std::ptr::Alignment::as_usize) {
-                                            scope 32 (inlined std::ptr::Alignment::as_nonzero) {
-                                            }
-                                            scope 33 (inlined NonZero::::get) {
-                                            }
-                                        }
+                                    scope 30 (inlined Layout::alignment) {
                                     }
                                 }
                             }
@@ -100,13 +93,10 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
     bb2: {
         StorageLive(_8);
         _8 = copy _3 as *mut u8 (PtrToPtr);
-        StorageLive(_9);
-        _9 = copy _7 as usize (Transmute);
-        _10 = alloc::alloc::__rust_dealloc(move _8, move _5, move _9) -> [return: bb3, unwind unreachable];
+        _9 = alloc::alloc::__rust_dealloc(move _8, move _5, move _7) -> [return: bb3, unwind unreachable];
     }
 
     bb3: {
-        StorageDead(_9);
         StorageDead(_8);
         goto -> bb4;
     }
diff --git a/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.32bit.panic-unwind.mir b/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.32bit.panic-unwind.mir
index 0adc66951e78..f8e575f490b0 100644
--- a/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.32bit.panic-unwind.mir
+++ b/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.32bit.panic-unwind.mir
@@ -8,7 +8,7 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
             let _2: std::ptr::NonNull<[T]>;
             let mut _3: *mut [T];
             let mut _4: *const [T];
-            let _10: ();
+            let _9: ();
             scope 3 {
                 scope 4 {
                     scope 17 (inlined Layout::size) {
@@ -32,16 +32,9 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
                                 scope 27 (inlined NonNull::::as_ptr) {
                                 }
                                 scope 28 (inlined std::alloc::dealloc) {
-                                    let mut _9: usize;
                                     scope 29 (inlined Layout::size) {
                                     }
-                                    scope 30 (inlined Layout::align) {
-                                        scope 31 (inlined std::ptr::Alignment::as_usize) {
-                                            scope 32 (inlined std::ptr::Alignment::as_nonzero) {
-                                            }
-                                            scope 33 (inlined NonZero::::get) {
-                                            }
-                                        }
+                                    scope 30 (inlined Layout::alignment) {
                                     }
                                 }
                             }
@@ -100,13 +93,10 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
     bb2: {
         StorageLive(_8);
         _8 = copy _3 as *mut u8 (PtrToPtr);
-        StorageLive(_9);
-        _9 = copy _7 as usize (Transmute);
-        _10 = alloc::alloc::__rust_dealloc(move _8, move _5, move _9) -> [return: bb3, unwind unreachable];
+        _9 = alloc::alloc::__rust_dealloc(move _8, move _5, move _7) -> [return: bb3, unwind unreachable];
     }
 
     bb3: {
-        StorageDead(_9);
         StorageDead(_8);
         goto -> bb4;
     }
diff --git a/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.64bit.panic-abort.mir b/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.64bit.panic-abort.mir
index 0adc66951e78..f8e575f490b0 100644
--- a/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.64bit.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.64bit.panic-abort.mir
@@ -8,7 +8,7 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
             let _2: std::ptr::NonNull<[T]>;
             let mut _3: *mut [T];
             let mut _4: *const [T];
-            let _10: ();
+            let _9: ();
             scope 3 {
                 scope 4 {
                     scope 17 (inlined Layout::size) {
@@ -32,16 +32,9 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
                                 scope 27 (inlined NonNull::::as_ptr) {
                                 }
                                 scope 28 (inlined std::alloc::dealloc) {
-                                    let mut _9: usize;
                                     scope 29 (inlined Layout::size) {
                                     }
-                                    scope 30 (inlined Layout::align) {
-                                        scope 31 (inlined std::ptr::Alignment::as_usize) {
-                                            scope 32 (inlined std::ptr::Alignment::as_nonzero) {
-                                            }
-                                            scope 33 (inlined NonZero::::get) {
-                                            }
-                                        }
+                                    scope 30 (inlined Layout::alignment) {
                                     }
                                 }
                             }
@@ -100,13 +93,10 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
     bb2: {
         StorageLive(_8);
         _8 = copy _3 as *mut u8 (PtrToPtr);
-        StorageLive(_9);
-        _9 = copy _7 as usize (Transmute);
-        _10 = alloc::alloc::__rust_dealloc(move _8, move _5, move _9) -> [return: bb3, unwind unreachable];
+        _9 = alloc::alloc::__rust_dealloc(move _8, move _5, move _7) -> [return: bb3, unwind unreachable];
     }
 
     bb3: {
-        StorageDead(_9);
         StorageDead(_8);
         goto -> bb4;
     }
diff --git a/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.64bit.panic-unwind.mir b/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.64bit.panic-unwind.mir
index 0adc66951e78..f8e575f490b0 100644
--- a/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.64bit.panic-unwind.mir
+++ b/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.64bit.panic-unwind.mir
@@ -8,7 +8,7 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
             let _2: std::ptr::NonNull<[T]>;
             let mut _3: *mut [T];
             let mut _4: *const [T];
-            let _10: ();
+            let _9: ();
             scope 3 {
                 scope 4 {
                     scope 17 (inlined Layout::size) {
@@ -32,16 +32,9 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
                                 scope 27 (inlined NonNull::::as_ptr) {
                                 }
                                 scope 28 (inlined std::alloc::dealloc) {
-                                    let mut _9: usize;
                                     scope 29 (inlined Layout::size) {
                                     }
-                                    scope 30 (inlined Layout::align) {
-                                        scope 31 (inlined std::ptr::Alignment::as_usize) {
-                                            scope 32 (inlined std::ptr::Alignment::as_nonzero) {
-                                            }
-                                            scope 33 (inlined NonZero::::get) {
-                                            }
-                                        }
+                                    scope 30 (inlined Layout::alignment) {
                                     }
                                 }
                             }
@@ -100,13 +93,10 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
     bb2: {
         StorageLive(_8);
         _8 = copy _3 as *mut u8 (PtrToPtr);
-        StorageLive(_9);
-        _9 = copy _7 as usize (Transmute);
-        _10 = alloc::alloc::__rust_dealloc(move _8, move _5, move _9) -> [return: bb3, unwind unreachable];
+        _9 = alloc::alloc::__rust_dealloc(move _8, move _5, move _7) -> [return: bb3, unwind unreachable];
     }
 
     bb3: {
-        StorageDead(_9);
         StorageDead(_8);
         goto -> bb4;
     }
diff --git a/tests/mir-opt/pre-codegen/drop_boxed_slice.rs b/tests/mir-opt/pre-codegen/drop_boxed_slice.rs
index cad7251421eb..ae10cfb0b171 100644
--- a/tests/mir-opt/pre-codegen/drop_boxed_slice.rs
+++ b/tests/mir-opt/pre-codegen/drop_boxed_slice.rs
@@ -11,7 +11,6 @@ pub unsafe fn generic_in_place(ptr: *mut Box<[T]>) {
     // CHECK: [[SIZE:_.+]] = std::intrinsics::size_of_val::<[T]>
     // CHECK: [[ALIGN:_.+]] = const ::ALIGN;
     // CHECK: [[B:_.+]] = copy [[ALIGN]] as std::ptr::Alignment (Transmute);
-    // CHECK: [[C:_.+]] = copy [[B]] as usize (Transmute);
-    // CHECK: = alloc::alloc::__rust_dealloc({{.+}}, move [[SIZE]], move [[C]]) ->
+    // CHECK: = alloc::alloc::__rust_dealloc({{.+}}, move [[SIZE]], move [[B]]) ->
     std::ptr::drop_in_place(ptr)
 }

From 98975ffb79868e6965d9ce7a334eb9c2ea8665b8 Mon Sep 17 00:00:00 2001
From: Shunpoco 
Date: Sat, 14 Feb 2026 10:42:40 +0000
Subject: [PATCH 167/265] exchange js_lint message between bless and non-bless

---
 src/tools/tidy/src/extra_checks/mod.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tools/tidy/src/extra_checks/mod.rs b/src/tools/tidy/src/extra_checks/mod.rs
index 6272e00591d7..28e78b396d55 100644
--- a/src/tools/tidy/src/extra_checks/mod.rs
+++ b/src/tools/tidy/src/extra_checks/mod.rs
@@ -334,9 +334,9 @@ fn check_impl(
 
     if js_lint {
         if bless {
-            eprintln!("linting javascript files");
-        } else {
             eprintln!("linting javascript files and applying suggestions");
+        } else {
+            eprintln!("linting javascript files");
         }
         let res = rustdoc_js::lint(outdir, librustdoc_path, tools_path, bless);
         if res.is_err() {

From 42479673c56606e04a474b981384e805f71644a2 Mon Sep 17 00:00:00 2001
From: Roy Ammerschuber 
Date: Thu, 5 Feb 2026 15:05:51 +0100
Subject: [PATCH 168/265] simplify wildcard datastructure

---
 .../src/borrow_tracker/tree_borrows/tree.rs   |  79 +--
 .../borrow_tracker/tree_borrows/wildcard.rs   | 585 +++++-------------
 2 files changed, 187 insertions(+), 477 deletions(-)

diff --git a/src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs b/src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs
index 2c6be522837c..fc8271454796 100644
--- a/src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs
+++ b/src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs
@@ -26,7 +26,7 @@ use super::foreign_access_skipping::IdempotentForeignAccess;
 use super::perms::{PermTransition, Permission};
 use super::tree_visitor::{ChildrenVisitMode, ContinueTraversal, NodeAppArgs, TreeVisitor};
 use super::unimap::{UniIndex, UniKeyMap, UniValMap};
-use super::wildcard::WildcardState;
+use super::wildcard::ExposedCache;
 use crate::borrow_tracker::{AccessKind, GlobalState, ProtectorKind};
 use crate::*;
 
@@ -89,7 +89,7 @@ impl LocationState {
         &mut self,
         idx: UniIndex,
         nodes: &mut UniValMap,
-        wildcard_accesses: &mut UniValMap,
+        exposed_cache: &mut ExposedCache,
         access_kind: AccessKind,
         relatedness: AccessRelatedness,
         protected: bool,
@@ -99,7 +99,7 @@ impl LocationState {
         // ensures it is only called when `skip_if_known_noop` returns
         // `Recurse`, due to the contract of `traverse_this_parents_children_other`.
         self.record_new_access(access_kind, relatedness);
-
+        let old_access_level = self.permission.strongest_allowed_local_access(protected);
         let transition = self.perform_access(access_kind, relatedness, protected)?;
         if !transition.is_noop() {
             let node = nodes.get_mut(idx).unwrap();
@@ -111,8 +111,8 @@ impl LocationState {
             // We need to update the wildcard state, if the permission
             // of an exposed pointer changes.
             if node.is_exposed {
-                let access_type = self.permission.strongest_allowed_local_access(protected);
-                WildcardState::update_exposure(idx, access_type, nodes, wildcard_accesses);
+                let access_level = self.permission.strongest_allowed_local_access(protected);
+                exposed_cache.update_exposure(nodes, idx, old_access_level, access_level);
             }
         }
         Ok(())
@@ -261,14 +261,8 @@ pub struct LocationTree {
     ///
     /// We do uphold the fact that `keys(perms)` is a subset of `keys(nodes)`
     pub perms: UniValMap,
-    /// Maps a tag and a location to its wildcard access tracking information,
-    /// with possible lazy initialization.
-    ///
-    /// If this allocation doesn't have any exposed nodes, then this map doesn't get
-    /// initialized. This way we only need to allocate the map if we need it.
-    ///
-    /// NOTE: same guarantees on entry initialization as for `perms`.
-    pub wildcard_accesses: UniValMap,
+    /// Caches information about the relatedness of nodes for a wildcard access.
+    pub exposed_cache: ExposedCache,
 }
 /// Tree structure with both parents and children since we want to be
 /// able to traverse the tree efficiently in both directions.
@@ -276,7 +270,7 @@ pub struct LocationTree {
 pub struct Tree {
     /// Mapping from tags to keys. The key obtained can then be used in
     /// any of the `UniValMap` relative to this allocation, i.e.
-    /// `nodes`, `LocationTree::perms` and `LocationTree::wildcard_accesses`
+    /// `nodes`, `LocationTree::perms` and `LocationTree::exposed_cache`
     /// of the same `Tree`.
     /// The parent-child relationship in `Node` is encoded in terms of these same
     /// keys, so traversing the entire tree needs exactly one access to
@@ -372,8 +366,8 @@ impl Tree {
                     IdempotentForeignAccess::None,
                 ),
             );
-            let wildcard_accesses = UniValMap::default();
-            DedupRangeMap::new(size, LocationTree { perms, wildcard_accesses })
+            let exposed_cache = ExposedCache::default();
+            DedupRangeMap::new(size, LocationTree { perms, exposed_cache })
         };
         Self { roots: SmallVec::from_slice(&[root_idx]), nodes, locations, tag_mapping }
     }
@@ -451,19 +445,9 @@ impl<'tcx> Tree {
             }
         }
 
-        // We need to ensure the consistency of the wildcard access tracking data structure.
-        // For this, we insert the correct entry for this tag based on its parent, if it exists.
-        // If we are inserting a new wildcard root (with Wildcard as parent_prov) then we insert
-        // the special wildcard root initial state instead.
-        for (_range, loc) in self.locations.iter_mut_all() {
-            if let Some(parent_idx) = parent_idx {
-                if let Some(parent_access) = loc.wildcard_accesses.get(parent_idx) {
-                    loc.wildcard_accesses.insert(idx, parent_access.for_new_child());
-                }
-            } else {
-                loc.wildcard_accesses.insert(idx, WildcardState::for_wildcard_root());
-            }
-        }
+        // We don't have to update `exposed_cache` as the new node is not exposed and
+        // has no children so the default counts of 0 are correct.
+
         // If the parent is a wildcard pointer, then it doesn't track SIFA and doesn't need to be updated.
         if let Some(parent_idx) = parent_idx {
             // Inserting the new perms might have broken the SIFA invariant (see
@@ -807,7 +791,7 @@ impl Tree {
         let node = self.nodes.remove(this).unwrap();
         for (_range, loc) in self.locations.iter_mut_all() {
             loc.perms.remove(this);
-            loc.wildcard_accesses.remove(this);
+            loc.exposed_cache.remove(this);
         }
         self.tag_mapping.remove(&node.tag);
     }
@@ -943,7 +927,7 @@ impl<'tcx> LocationTree {
         };
 
         let accessed_root_tag = accessed_root.map(|idx| nodes.get(idx).unwrap().tag);
-        for root in roots {
+        for (i, root) in roots.enumerate() {
             let tag = nodes.get(root).unwrap().tag;
             // On a protector release access we have to skip the children of the accessed tag.
             // However, if the tag has exposed children then some of the wildcard subtrees could
@@ -981,6 +965,7 @@ impl<'tcx> LocationTree {
                 access_kind,
                 global,
                 diagnostics,
+                /*is_wildcard_tree*/ i != 0,
             )?;
         }
         interp_ok(())
@@ -1029,7 +1014,7 @@ impl<'tcx> LocationTree {
                 .perform_transition(
                     args.idx,
                     args.nodes,
-                    &mut args.data.wildcard_accesses,
+                    &mut args.data.exposed_cache,
                     access_kind,
                     args.rel_pos,
                     protected,
@@ -1074,12 +1059,18 @@ impl<'tcx> LocationTree {
         access_kind: AccessKind,
         global: &GlobalState,
         diagnostics: &DiagnosticInfo,
+        is_wildcard_tree: bool,
     ) -> InterpResult<'tcx> {
         let get_relatedness = |idx: UniIndex, node: &Node, loc: &LocationTree| {
-            let wildcard_state = loc.wildcard_accesses.get(idx).cloned().unwrap_or_default();
             // If the tag is larger than `max_local_tag` then the access can only be foreign.
             let only_foreign = max_local_tag.is_some_and(|max_local_tag| max_local_tag < node.tag);
-            wildcard_state.access_relatedness(access_kind, only_foreign)
+            loc.exposed_cache.access_relatedness(
+                root,
+                idx,
+                access_kind,
+                is_wildcard_tree,
+                only_foreign,
+            )
         };
 
         // Whether there is an exposed node in this tree that allows this access.
@@ -1156,7 +1147,7 @@ impl<'tcx> LocationTree {
                 perm.perform_transition(
                     args.idx,
                     args.nodes,
-                    &mut args.data.wildcard_accesses,
+                    &mut args.data.exposed_cache,
                     access_kind,
                     relatedness,
                     protected,
@@ -1175,19 +1166,11 @@ impl<'tcx> LocationTree {
                 })
             },
         )?;
-        // If there is no exposed node in this tree that allows this access, then the
-        // access *must* be foreign. So we check if the root of this tree would allow this
-        // as a foreign access, and if not, then we can error.
-        // In practice, all wildcard trees accept foreign accesses, but the main tree does
-        // not, so this catches UB when none of the nodes in the main tree allows this access.
-        if !has_valid_exposed
-            && self
-                .wildcard_accesses
-                .get(root)
-                .unwrap()
-                .access_relatedness(access_kind, /* only_foreign */ true)
-                .is_none()
-        {
+        // If there is no exposed node in this tree that allows this access, then the access *must*
+        // be foreign to the entire subtree. Foreign accesses are only possible on wildcard subtrees
+        // as there are no ancestors to the main root. So if we do not find a valid exposed node in
+        // the main tree then this access is UB.
+        if !has_valid_exposed && !is_wildcard_tree {
             return Err(no_valid_exposed_references_error(diagnostics)).into();
         }
         interp_ok(())
diff --git a/src/tools/miri/src/borrow_tracker/tree_borrows/wildcard.rs b/src/tools/miri/src/borrow_tracker/tree_borrows/wildcard.rs
index b5ae0ee4c7d3..b03635de70ae 100644
--- a/src/tools/miri/src/borrow_tracker/tree_borrows/wildcard.rs
+++ b/src/tools/miri/src/borrow_tracker/tree_borrows/wildcard.rs
@@ -1,4 +1,3 @@
-use std::cmp::max;
 use std::fmt::Debug;
 
 use super::Tree;
@@ -51,373 +50,141 @@ impl WildcardAccessRelatedness {
     }
 }
 
+/// Caches information about where in the tree exposed nodes with permission to do reads/ rites are
+/// located. [`ExposedCache`] stores this information a single location (or rather, a range of
+/// homogeneous locations) for all nodes in an allocation.
+///
+/// Nodes not in this map have a default [`ExposedCacheNode`], i.e. they have no exposed children.
+/// In particular, this map remains empty (and thus consumes no memory) until the first
+/// node in the tree gets exposed.
+#[derive(Clone, Debug, Default, PartialEq, Eq)]
+pub struct ExposedCache(UniValMap);
+
 /// State per location per node keeping track of where relative to this
 /// node exposed nodes are and what access permissions they have.
-///
-/// Designed to be completely determined by its parent, siblings and
-/// direct children's max_local_access/max_foreign_access.
-#[derive(Clone, Default, PartialEq, Eq)]
-pub struct WildcardState {
-    /// How many of this node's direct children have `max_local_access()==Write`.
-    child_writes: u16,
-    /// How many of this node's direct children have `max_local_access()>=Read`.
-    child_reads: u16,
-    /// The maximum access level that could happen from an exposed node
-    /// that is foreign to this node.
-    ///
-    /// This is calculated as the `max()` of the parent's `max_foreign_access`,
-    /// `exposed_as` and the siblings' `max_local_access()`.
-    max_foreign_access: WildcardAccessLevel,
-    /// At what access level this node itself is exposed.
-    exposed_as: WildcardAccessLevel,
+#[derive(Clone, Default, Debug, PartialEq, Eq)]
+struct ExposedCacheNode {
+    /// How many local nodes (in this subtree) are exposed with write permissions.
+    local_writes: u16,
+    /// How many local nodes (in this subtree) are exposed with read permissions.
+    local_reads: u16,
 }
-impl Debug for WildcardState {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-        f.debug_struct("WildcardState")
-            .field("child_r/w", &(self.child_reads, self.child_writes))
-            .field("foreign", &self.max_foreign_access)
-            .field("exposed_as", &self.exposed_as)
-            .finish()
-    }
-}
-impl WildcardState {
-    /// The maximum access level that could happen from an exposed
-    /// node that is local to this node.
-    fn max_local_access(&self) -> WildcardAccessLevel {
-        use WildcardAccessLevel::*;
-        max(
-            self.exposed_as,
-            if self.child_writes > 0 {
-                Write
-            } else if self.child_reads > 0 {
-                Read
-            } else {
-                None
-            },
-        )
-    }
 
-    /// From where relative to the node with this wildcard info a read or write access could happen.
-    /// If `only_foreign` is true then we treat `LocalAccess` as impossible. This means we return
-    /// `None` if only a `LocalAccess` is possible, and we treat `EitherAccess` as a
-    /// `ForeignAccess`.
+impl ExposedCache {
+    /// Returns the relatedness of a wildcard access to a node.
+    ///
+    /// This function only considers a single subtree. If the current subtree does not contain
+    /// any valid exposed nodes then the function return `None`.
+    ///
+    /// * `root`: The root of the subtree the node belongs to.
+    /// * `id`: The id of the node.
+    /// * `kind`: The kind of the wildcard access.
+    /// * `is_wildcard_tree`: This nodes belongs to a wildcard subtree.
+    ///   This means we always treat foreign accesses as possible.
+    /// * `only_foreign`: Assume the access cannot come from a local node.
     pub fn access_relatedness(
         &self,
+        root: UniIndex,
+        id: UniIndex,
         kind: AccessKind,
+        is_wildcard_tree: bool,
         only_foreign: bool,
     ) -> Option {
-        let rel = match kind {
-            AccessKind::Read => self.read_access_relatedness(),
-            AccessKind::Write => self.write_access_relatedness(),
+        // All nodes in the tree are local to the root, so we can use the root to get the total
+        // number of valid exposed nodes in the tree.
+        let root = self.0.get(root).cloned().unwrap_or_default();
+        let node = self.0.get(id).cloned().unwrap_or_default();
+
+        let (total_num, local_num) = match kind {
+            AccessKind::Read => (root.local_reads, node.local_reads),
+            AccessKind::Write => (root.local_writes, node.local_writes),
         };
+
+        // If this is a wildcard tree then an access can always be foreign as
+        // it could come from another tree.
+        // We can represent this by adding 1 to the total which means there
+        // always exists a foreign exposed node.
+        // (We cannot bake this into the root's count as then if `node == root` it would
+        // affect both `total` and `local`.)
+        let total_num = total_num + u16::from(is_wildcard_tree);
+
+        use WildcardAccessRelatedness::*;
+        let relatedness = if total_num == 0 {
+            // we return None if the tree does not contain any valid exposed nodes.
+            None
+        } else {
+            Some(if total_num == local_num {
+                // If all valid exposed nodes are local to this node then the access is local.
+                LocalAccess
+            } else if local_num == 0 {
+                // If the node does not have any exposed nodes as children then the access is foreign.
+                ForeignAccess
+            } else {
+                // If some but not all of the valid exposed nodes are local then we cannot determine the correct relatedness.
+                EitherAccess
+            })
+        };
+
         if only_foreign {
-            use WildcardAccessRelatedness as E;
-            match rel {
-                Some(E::EitherAccess | E::ForeignAccess) => Some(E::ForeignAccess),
-                Some(E::LocalAccess) | None => None,
+            // This is definitely not a local access; clamp the result accordingly.
+            match relatedness {
+                Some(LocalAccess) => None,
+                Some(ForeignAccess) => Some(ForeignAccess),
+                Some(EitherAccess) => Some(ForeignAccess),
+                None => None,
             }
         } else {
-            rel
+            relatedness
         }
     }
-
-    /// From where relative to the node with this wildcard info a read access could happen.
-    fn read_access_relatedness(&self) -> Option {
-        let has_foreign = self.max_foreign_access >= WildcardAccessLevel::Read;
-        let has_local = self.max_local_access() >= WildcardAccessLevel::Read;
-        use WildcardAccessRelatedness as E;
-        match (has_foreign, has_local) {
-            (true, true) => Some(E::EitherAccess),
-            (true, false) => Some(E::ForeignAccess),
-            (false, true) => Some(E::LocalAccess),
-            (false, false) => None,
-        }
-    }
-
-    /// From where relative to the node with this wildcard info a write access could happen.
-    fn write_access_relatedness(&self) -> Option {
-        let has_foreign = self.max_foreign_access == WildcardAccessLevel::Write;
-        let has_local = self.max_local_access() == WildcardAccessLevel::Write;
-        use WildcardAccessRelatedness as E;
-        match (has_foreign, has_local) {
-            (true, true) => Some(E::EitherAccess),
-            (true, false) => Some(E::ForeignAccess),
-            (false, true) => Some(E::LocalAccess),
-            (false, false) => None,
-        }
-    }
-
-    /// Gets the access tracking information for a new child node of a parent with this
-    /// wildcard info.
-    /// The new node doesn't have any child reads/writes, but calculates `max_foreign_access`
-    /// from its parent.
-    pub fn for_new_child(&self) -> Self {
-        Self {
-            max_foreign_access: max(self.max_foreign_access, self.max_local_access()),
-            ..Default::default()
-        }
-    }
-    /// Crates the initial `WildcardState` for a wildcard root.
-    /// This has `max_foreign_access==Write` as it actually is the child of *some* exposed node
-    /// through which we can receive foreign accesses.
-    ///
-    /// This is different from the main root which has `max_foreign_access==None`, since there
-    /// cannot be a foreign access to the root of the allocation.
-    pub fn for_wildcard_root() -> Self {
-        Self { max_foreign_access: WildcardAccessLevel::Write, ..Default::default() }
-    }
-
-    /// Pushes the nodes of `children` onto the stack who's `max_foreign_access`
-    /// needs to be updated.
-    ///
-    /// * `children`: A list of nodes with the same parent. `children` doesn't
-    ///   necessarily have to contain all children of parent, but can just be
-    ///   a subset.
-    ///
-    /// * `child_reads`, `child_writes`: How many of `children` have `max_local_access()`
-    ///   of at least `read`/`write`
-    ///
-    /// * `new_foreign_access`, `old_foreign_access`:
-    ///   The max possible access level that is foreign to all `children`
-    ///   (i.e., it is not local to *any* of them).
-    ///   This can be calculated as the max of the parent's `exposed_as()`, `max_foreign_access`
-    ///   and of all `max_local_access()` of any nodes with the same parent that are
-    ///   not listed in `children`.
-    ///
-    ///   This access level changed from `old` to `new`, which is why we need to
-    ///   update `children`.
-    fn push_relevant_children(
-        stack: &mut Vec<(UniIndex, WildcardAccessLevel)>,
-        new_foreign_access: WildcardAccessLevel,
-        old_foreign_access: WildcardAccessLevel,
-        child_reads: u16,
-        child_writes: u16,
-        children: impl Iterator,
-
-        wildcard_accesses: &UniValMap,
-    ) {
-        use WildcardAccessLevel::*;
-
-        // Nothing changed so we don't need to update anything.
-        if new_foreign_access == old_foreign_access {
-            return;
-        }
-
-        // We need to consider that the children's `max_local_access()` affect each
-        // other's `max_foreign_access`, but do not affect their own `max_foreign_access`.
-
-        // The new `max_foreign_acces` for children with `max_local_access()==Write`.
-        let write_foreign_access = max(
-            new_foreign_access,
-            if child_writes > 1 {
-                // There exists at least one more child with exposed write access.
-                // This means that a foreign write through that node is possible.
-                Write
-            } else if child_reads > 1 {
-                // There exists at least one more child with exposed read access,
-                // but no other with write access.
-                // This means that a foreign read but no write through that node
-                // is possible.
-                Read
-            } else {
-                // There are no other nodes with read or write access.
-                // This means no foreign writes through other children are possible.
-                None
-            },
-        );
-
-        // The new `max_foreign_acces` for children with `max_local_access()==Read`.
-        let read_foreign_access = max(
-            new_foreign_access,
-            if child_writes > 0 {
-                // There exists at least one child with write access (and it's not this one).
-                Write
-            } else if child_reads > 1 {
-                // There exists at least one more child with exposed read access,
-                // but no other with write access.
-                Read
-            } else {
-                // There are no other nodes with read or write access,
-                None
-            },
-        );
-
-        // The new `max_foreign_acces` for children with `max_local_access()==None`.
-        let none_foreign_access = max(
-            new_foreign_access,
-            if child_writes > 0 {
-                // There exists at least one child with write access (and it's not this one).
-                Write
-            } else if child_reads > 0 {
-                // There exists at least one child with read access (and it's not this one),
-                // but none with write access.
-                Read
-            } else {
-                // No children are exposed as read or write.
-                None
-            },
-        );
-
-        stack.extend(children.filter_map(|child| {
-            let state = wildcard_accesses.get(child).cloned().unwrap_or_default();
-
-            let new_foreign_access = match state.max_local_access() {
-                Write => write_foreign_access,
-                Read => read_foreign_access,
-                None => none_foreign_access,
-            };
-
-            if new_foreign_access != state.max_foreign_access {
-                Some((child, new_foreign_access))
-            } else {
-                Option::None
-            }
-        }));
-    }
-
     /// Update the tracking information of a tree, to reflect that the node specified by `id` is
-    /// now exposed with `new_exposed_as`.
+    /// now exposed with `new_exposed_as` permission.
     ///
     /// Propagates the Willard access information over the tree. This needs to be called every
     /// time the access level of an exposed node changes, to keep the state in sync with
     /// the rest of the tree.
+    ///
+    /// * `from`: The previous access level of the exposed node.
+    ///   Set to `None` if the node was not exposed before.
+    /// * `to`: The new access level.
     pub fn update_exposure(
-        id: UniIndex,
-        new_exposed_as: WildcardAccessLevel,
+        &mut self,
         nodes: &UniValMap,
-        wildcard_accesses: &mut UniValMap,
+        id: UniIndex,
+        from: WildcardAccessLevel,
+        to: WildcardAccessLevel,
     ) {
-        let mut entry = wildcard_accesses.entry(id);
-        let src_state = entry.or_insert(Default::default());
-        let old_exposed_as = src_state.exposed_as;
-
         // If the exposure doesn't change, then we don't need to update anything.
-        if old_exposed_as == new_exposed_as {
+        if from == to {
             return;
         }
 
-        let src_old_local_access = src_state.max_local_access();
-
-        src_state.exposed_as = new_exposed_as;
-
-        let src_new_local_access = src_state.max_local_access();
-
-        // Stack of nodes for which the max_foreign_access field needs to be updated.
-        // Will be filled with the children of this node and its parents children before
-        // we begin downwards traversal.
-        let mut stack: Vec<(UniIndex, WildcardAccessLevel)> = Vec::new();
-
-        // Add the direct children of this node to the stack.
-        {
+        // Update the counts of this node and all its ancestors.
+        let mut next_id = Some(id);
+        while let Some(id) = next_id {
             let node = nodes.get(id).unwrap();
-            Self::push_relevant_children(
-                &mut stack,
-                // new_foreign_access
-                max(src_state.max_foreign_access, new_exposed_as),
-                // old_foreign_access
-                max(src_state.max_foreign_access, old_exposed_as),
-                // Consider all children.
-                src_state.child_reads,
-                src_state.child_writes,
-                node.children.iter().copied(),
-                wildcard_accesses,
-            );
-        }
-        // We need to propagate the tracking info up the tree, for this we traverse
-        // up the parents.
-        // We can skip propagating info to the parent and siblings of a node if its
-        // access didn't change.
-        {
-            // The child from which we came.
-            let mut child = id;
-            // This is the `max_local_access()` of the child we came from, before
-            // this update...
-            let mut old_child_access = src_old_local_access;
-            // and after this update.
-            let mut new_child_access = src_new_local_access;
-            while let Some(parent_id) = nodes.get(child).unwrap().parent {
-                let parent_node = nodes.get(parent_id).unwrap();
-                let mut entry = wildcard_accesses.entry(parent_id);
-                let parent_state = entry.or_insert(Default::default());
+            let mut state = self.0.entry(id);
+            let state = state.or_insert(Default::default());
 
-                let old_parent_local_access = parent_state.max_local_access();
-                use WildcardAccessLevel::*;
-                // Updating this node's tracking state for its children.
-                match (old_child_access, new_child_access) {
-                    (None | Read, Write) => parent_state.child_writes += 1,
-                    (Write, None | Read) => parent_state.child_writes -= 1,
-                    _ => {}
-                }
-                match (old_child_access, new_child_access) {
-                    (None, Read | Write) => parent_state.child_reads += 1,
-                    (Read | Write, None) => parent_state.child_reads -= 1,
-                    _ => {}
-                }
-
-                let new_parent_local_access = parent_state.max_local_access();
-
-                {
-                    // We need to update the `max_foreign_access` of `child`'s
-                    // siblings. For this we can reuse the `push_relevant_children`
-                    // function.
-                    //
-                    // We pass it just the siblings without child itself. Since
-                    // `child`'s `max_local_access()` is foreign to all of its
-                    // siblings we can pass it as part of the foreign access.
-
-                    let parent_access =
-                        max(parent_state.exposed_as, parent_state.max_foreign_access);
-                    // This is how many of `child`'s siblings have read/write local access.
-                    // If `child` itself has access, then we need to subtract its access from the count.
-                    let sibling_reads =
-                        parent_state.child_reads - if new_child_access >= Read { 1 } else { 0 };
-                    let sibling_writes =
-                        parent_state.child_writes - if new_child_access >= Write { 1 } else { 0 };
-                    Self::push_relevant_children(
-                        &mut stack,
-                        // new_foreign_access
-                        max(parent_access, new_child_access),
-                        // old_foreign_access
-                        max(parent_access, old_child_access),
-                        // Consider only siblings of child.
-                        sibling_reads,
-                        sibling_writes,
-                        parent_node.children.iter().copied().filter(|id| child != *id),
-                        wildcard_accesses,
-                    );
-                }
-                if old_parent_local_access == new_parent_local_access {
-                    // We didn't change `max_local_access()` for parent, so we don't need to propagate further upwards.
-                    break;
-                }
-
-                old_child_access = old_parent_local_access;
-                new_child_access = new_parent_local_access;
-                child = parent_id;
+            use WildcardAccessLevel::*;
+            match (from, to) {
+                (None | Read, Write) => state.local_writes += 1,
+                (Write, None | Read) => state.local_writes -= 1,
+                _ => {}
             }
+            match (from, to) {
+                (None, Read | Write) => state.local_reads += 1,
+                (Read | Write, None) => state.local_reads -= 1,
+                _ => {}
+            }
+            next_id = node.parent;
         }
-        // Traverses down the tree to update max_foreign_access fields of children and cousins who need to be updated.
-        while let Some((id, new_access)) = stack.pop() {
-            let node = nodes.get(id).unwrap();
-            let mut entry = wildcard_accesses.entry(id);
-            let state = entry.or_insert(Default::default());
-
-            let old_access = state.max_foreign_access;
-            state.max_foreign_access = new_access;
-
-            Self::push_relevant_children(
-                &mut stack,
-                // new_foreign_access
-                max(state.exposed_as, new_access),
-                // old_foreign_access
-                max(state.exposed_as, old_access),
-                // Consider all children.
-                state.child_reads,
-                state.child_writes,
-                node.children.iter().copied(),
-                wildcard_accesses,
-            );
-        }
+    }
+    /// Removes a node from the datastructure.
+    ///
+    /// The caller needs to ensure that the node does not have any children.
+    pub fn remove(&mut self, idx: UniIndex) {
+        self.0.remove(idx);
     }
 }
 
@@ -428,25 +195,28 @@ impl Tree {
     pub fn expose_tag(&mut self, tag: BorTag, protected: bool) {
         let id = self.tag_mapping.get(&tag).unwrap();
         let node = self.nodes.get_mut(id).unwrap();
-        node.is_exposed = true;
-        let node = self.nodes.get(id).unwrap();
+        if !node.is_exposed {
+            node.is_exposed = true;
+            let node = self.nodes.get(id).unwrap();
 
-        // When the first tag gets exposed then we initialize the
-        // wildcard state for every node and location in the tree.
-        for (_, loc) in self.locations.iter_mut_all() {
-            let perm = loc
-                .perms
-                .get(id)
-                .map(|p| p.permission())
-                .unwrap_or_else(|| node.default_location_state().permission());
+            for (_, loc) in self.locations.iter_mut_all() {
+                let perm = loc
+                    .perms
+                    .get(id)
+                    .map(|p| p.permission())
+                    .unwrap_or_else(|| node.default_location_state().permission());
 
-            let access_type = perm.strongest_allowed_local_access(protected);
-            WildcardState::update_exposure(
-                id,
-                access_type,
-                &self.nodes,
-                &mut loc.wildcard_accesses,
-            );
+                let access_level = perm.strongest_allowed_local_access(protected);
+                // An unexposed node gets treated as access level `None`. Therefore,
+                // the initial exposure transitions from `None` to the node's actual
+                // `access_level`.
+                loc.exposed_cache.update_exposure(
+                    &self.nodes,
+                    id,
+                    WildcardAccessLevel::None,
+                    access_level,
+                );
+            }
         }
     }
 
@@ -457,10 +227,19 @@ impl Tree {
 
         // We check if the node is already exposed, as we don't want to expose any
         // nodes which aren't already exposed.
-
-        if self.nodes.get(idx).unwrap().is_exposed {
-            // Updates the exposure to the new permission on every location.
-            self.expose_tag(tag, /* protected */ false);
+        let node = self.nodes.get(idx).unwrap();
+        if node.is_exposed {
+            for (_, loc) in self.locations.iter_mut_all() {
+                let perm = loc
+                    .perms
+                    .get(idx)
+                    .map(|p| p.permission())
+                    .unwrap_or_else(|| node.default_location_state().permission());
+                // We are transitioning from protected to unprotected.
+                let old_access_type = perm.strongest_allowed_local_access(/*protected*/ true);
+                let access_type = perm.strongest_allowed_local_access(/*protected*/ false);
+                loc.exposed_cache.update_exposure(&self.nodes, idx, old_access_type, access_type);
+            }
         }
     }
 }
@@ -472,20 +251,15 @@ impl Tree {
     pub fn verify_wildcard_consistency(&self, global: &GlobalState) {
         // We rely on the fact that `roots` is ordered according to tag from low to high.
         assert!(self.roots.is_sorted_by_key(|idx| self.nodes.get(*idx).unwrap().tag));
-        let main_root_idx = self.roots[0];
 
         let protected_tags = &global.borrow().protected_tags;
         for (_, loc) in self.locations.iter_all() {
-            let wildcard_accesses = &loc.wildcard_accesses;
+            let exposed_cache = &loc.exposed_cache;
             let perms = &loc.perms;
-            // Checks if accesses is empty.
-            if wildcard_accesses.is_empty() {
-                return;
-            }
             for (id, node) in self.nodes.iter() {
-                let state = wildcard_accesses.get(id).unwrap();
+                let state = exposed_cache.0.get(id).cloned().unwrap_or_default();
 
-                let expected_exposed_as = if node.is_exposed {
+                let exposed_as = if node.is_exposed {
                     let perm =
                         perms.get(id).copied().unwrap_or_else(|| node.default_location_state());
 
@@ -495,72 +269,25 @@ impl Tree {
                     WildcardAccessLevel::None
                 };
 
-                // The foreign wildcard accesses possible at a node are determined by which
-                // accesses can originate from their siblings, their parent, and from above
-                // their parent.
-                let expected_max_foreign_access = if let Some(parent) = node.parent {
-                    let parent_node = self.nodes.get(parent).unwrap();
-                    let parent_state = wildcard_accesses.get(parent).unwrap();
-
-                    let max_sibling_access = parent_node
-                        .children
-                        .iter()
-                        .copied()
-                        .filter(|child| *child != id)
-                        .map(|child| {
-                            let state = wildcard_accesses.get(child).unwrap();
-                            state.max_local_access()
-                        })
-                        .fold(WildcardAccessLevel::None, max);
-
-                    max_sibling_access
-                        .max(parent_state.max_foreign_access)
-                        .max(parent_state.exposed_as)
-                } else {
-                    if main_root_idx == id {
-                        // There can never be a foreign access to the root of the allocation.
-                        // So its foreign access level is always `None`.
-                        WildcardAccessLevel::None
-                    } else {
-                        // For wildcard roots any access on a different subtree can be foreign
-                        // to it. So a wildcard root has the maximum possible foreign access
-                        // level.
-                        WildcardAccessLevel::Write
-                    }
-                };
-
-                // Count how many children can be the source of wildcard reads or writes
-                // (either directly, or via their children).
-                let child_accesses = node.children.iter().copied().map(|child| {
-                    let state = wildcard_accesses.get(child).unwrap();
-                    state.max_local_access()
-                });
-                let expected_child_reads =
-                    child_accesses.clone().filter(|a| *a >= WildcardAccessLevel::Read).count();
-                let expected_child_writes =
-                    child_accesses.filter(|a| *a >= WildcardAccessLevel::Write).count();
-
+                let (child_reads, child_writes) = node
+                    .children
+                    .iter()
+                    .copied()
+                    .map(|id| exposed_cache.0.get(id).cloned().unwrap_or_default())
+                    .fold((0, 0), |acc, wc| (acc.0 + wc.local_reads, acc.1 + wc.local_writes));
+                let expected_reads =
+                    child_reads + u16::from(exposed_as >= WildcardAccessLevel::Read);
+                let expected_writes =
+                    child_writes + u16::from(exposed_as >= WildcardAccessLevel::Write);
                 assert_eq!(
-                    expected_exposed_as, state.exposed_as,
-                    "tag {:?} (id:{id:?}) should be exposed as {expected_exposed_as:?} but is exposed as {:?}",
-                    node.tag, state.exposed_as
+                    state.local_reads, expected_reads,
+                    "expected {:?}'s (id:{id:?}) local_reads to be {expected_reads:?} instead of {:?} (child_reads: {child_reads:?}, exposed_as: {exposed_as:?})",
+                    node.tag, state.local_reads
                 );
                 assert_eq!(
-                    expected_max_foreign_access, state.max_foreign_access,
-                    "expected {:?}'s (id:{id:?}) max_foreign_access to be {:?} instead of {:?}",
-                    node.tag, expected_max_foreign_access, state.max_foreign_access
-                );
-                let child_reads: usize = state.child_reads.into();
-                assert_eq!(
-                    expected_child_reads, child_reads,
-                    "expected {:?}'s (id:{id:?}) child_reads to be {} instead of {}",
-                    node.tag, expected_child_reads, child_reads
-                );
-                let child_writes: usize = state.child_writes.into();
-                assert_eq!(
-                    expected_child_writes, child_writes,
-                    "expected {:?}'s (id:{id:?}) child_writes to be {} instead of {}",
-                    node.tag, expected_child_writes, child_writes
+                    state.local_writes, expected_writes,
+                    "expected {:?}'s (id:{id:?}) local_writes to be {expected_writes:?} instead of {:?} (child_writes: {child_writes:?}, exposed_as: {exposed_as:?})",
+                    node.tag, state.local_writes
                 );
             }
         }

From 921667859d16c4aa66cadbcfa1320a8b26ffecf7 Mon Sep 17 00:00:00 2001
From: hsqStephenZhang 
Date: Wed, 4 Feb 2026 12:58:48 +0100
Subject: [PATCH 169/265] feat: vtbl1_u8 intrinsic on aarch64

needed for chacha20
---
 src/tools/miri/src/shims/aarch64.rs           | 32 ++++++++++++++++++-
 .../shims/aarch64/intrinsics-aarch64-neon.rs  | 26 +++++++++++++++
 2 files changed, 57 insertions(+), 1 deletion(-)

diff --git a/src/tools/miri/src/shims/aarch64.rs b/src/tools/miri/src/shims/aarch64.rs
index 595a6595b531..2aca71819e5e 100644
--- a/src/tools/miri/src/shims/aarch64.rs
+++ b/src/tools/miri/src/shims/aarch64.rs
@@ -1,4 +1,4 @@
-use rustc_abi::CanonAbi;
+use rustc_abi::{CanonAbi, Size};
 use rustc_middle::mir::BinOp;
 use rustc_middle::ty::Ty;
 use rustc_span::Symbol;
@@ -58,7 +58,37 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
                     this.write_immediate(*res_lane, &dest)?;
                 }
             }
+            // Vector table lookup: each index selects a byte from the 16-byte table, out-of-range -> 0.
+            // Used to implement vtbl1_u8 function.
+            // LLVM does not have a portable shuffle that takes non-const indices.
+            // So we need to implement this ourselves
+            // https://developer.arm.com/architectures/instruction-sets/intrinsics/vtbl1_u8
+            "neon.tbl1.v16i8" => {
+                let [table, indices] =
+                    this.check_shim_sig_lenient(abi, CanonAbi::C, link_name, args)?;
 
+                let (table, table_len) = this.project_to_simd(table)?;
+                let (indices, idx_len) = this.project_to_simd(indices)?;
+                let (dest, dest_len) = this.project_to_simd(dest)?;
+                assert_eq!(table_len, 16);
+                assert_eq!(idx_len, dest_len);
+
+                let table_len = u128::from(table_len);
+                let elem_size = Size::from_bytes(1);
+                for i in 0..dest_len {
+                    let idx = this.read_immediate(&this.project_index(&indices, i)?)?;
+                    let idx_u = idx.to_scalar().to_uint(elem_size)?;
+                    let val = if idx_u < table_len {
+                        let t = this.read_immediate(
+                            &this.project_index(&table, idx_u.try_into().unwrap())?,
+                        )?;
+                        t.to_scalar()
+                    } else {
+                        Scalar::from_u8(0)
+                    };
+                    this.write_scalar(val, &this.project_index(&dest, i)?)?;
+                }
+            }
             _ => return interp_ok(EmulateItemResult::NotSupported),
         }
         interp_ok(EmulateItemResult::NeedsReturn)
diff --git a/src/tools/miri/tests/pass/shims/aarch64/intrinsics-aarch64-neon.rs b/src/tools/miri/tests/pass/shims/aarch64/intrinsics-aarch64-neon.rs
index 84485dbad8c9..b1132fcaabcd 100644
--- a/src/tools/miri/tests/pass/shims/aarch64/intrinsics-aarch64-neon.rs
+++ b/src/tools/miri/tests/pass/shims/aarch64/intrinsics-aarch64-neon.rs
@@ -4,12 +4,14 @@
 
 use std::arch::aarch64::*;
 use std::arch::is_aarch64_feature_detected;
+use std::mem::transmute;
 
 fn main() {
     assert!(is_aarch64_feature_detected!("neon"));
 
     unsafe {
         test_neon();
+        tbl1_v16i8_basic();
     }
 }
 
@@ -38,3 +40,27 @@ unsafe fn test_neon() {
     }
     test_vpmaxq_u8_is_unsigned();
 }
+
+#[target_feature(enable = "neon")]
+fn tbl1_v16i8_basic() {
+    unsafe {
+        // table = 0..15
+        let table: uint8x16_t =
+            transmute::<[u8; 16], _>([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]);
+        // indices: include in-range, 15 (last), 16 and 255 (out-of-range → 0)
+        let idx: uint8x16_t =
+            transmute::<[u8; 16], _>([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]);
+        let got = vqtbl1q_u8(table, idx);
+        let got_arr: [u8; 16] = transmute(got);
+        assert_eq!(got_arr, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]);
+
+        let idx2: uint8x16_t =
+            transmute::<[u8; 16], _>([15, 16, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]);
+        let got2 = vqtbl1q_u8(table, idx2);
+        let got2_arr: [u8; 16] = transmute(got2);
+        assert_eq!(got2_arr[0], 15);
+        assert_eq!(got2_arr[1], 0); // out-of-range
+        assert_eq!(got2_arr[2], 0); // out-of-range
+        assert_eq!(&got2_arr[3..16], &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12][..]);
+    }
+}

From 59329154b71669ede57c579e23251962ca7df771 Mon Sep 17 00:00:00 2001
From: Ralf Jung 
Date: Sat, 14 Feb 2026 13:33:03 +0100
Subject: [PATCH 170/265] minor tweaks

---
 src/tools/miri/src/shims/aarch64.rs              | 16 ++++++----------
 .../shims/aarch64/intrinsics-aarch64-neon.rs     | 11 ++++++-----
 2 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/src/tools/miri/src/shims/aarch64.rs b/src/tools/miri/src/shims/aarch64.rs
index 2aca71819e5e..d06b02a41334 100644
--- a/src/tools/miri/src/shims/aarch64.rs
+++ b/src/tools/miri/src/shims/aarch64.rs
@@ -1,4 +1,4 @@
-use rustc_abi::{CanonAbi, Size};
+use rustc_abi::CanonAbi;
 use rustc_middle::mir::BinOp;
 use rustc_middle::ty::Ty;
 use rustc_span::Symbol;
@@ -60,8 +60,8 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
             }
             // Vector table lookup: each index selects a byte from the 16-byte table, out-of-range -> 0.
             // Used to implement vtbl1_u8 function.
-            // LLVM does not have a portable shuffle that takes non-const indices.
-            // So we need to implement this ourselves
+            // LLVM does not have a portable shuffle that takes non-const indices
+            // so we need to implement this ourselves.
             // https://developer.arm.com/architectures/instruction-sets/intrinsics/vtbl1_u8
             "neon.tbl1.v16i8" => {
                 let [table, indices] =
@@ -73,15 +73,11 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
                 assert_eq!(table_len, 16);
                 assert_eq!(idx_len, dest_len);
 
-                let table_len = u128::from(table_len);
-                let elem_size = Size::from_bytes(1);
                 for i in 0..dest_len {
                     let idx = this.read_immediate(&this.project_index(&indices, i)?)?;
-                    let idx_u = idx.to_scalar().to_uint(elem_size)?;
-                    let val = if idx_u < table_len {
-                        let t = this.read_immediate(
-                            &this.project_index(&table, idx_u.try_into().unwrap())?,
-                        )?;
+                    let idx_u = idx.to_scalar().to_u8()?;
+                    let val = if u64::from(idx_u) < table_len {
+                        let t = this.read_immediate(&this.project_index(&table, idx_u.into())?)?;
                         t.to_scalar()
                     } else {
                         Scalar::from_u8(0)
diff --git a/src/tools/miri/tests/pass/shims/aarch64/intrinsics-aarch64-neon.rs b/src/tools/miri/tests/pass/shims/aarch64/intrinsics-aarch64-neon.rs
index b1132fcaabcd..6d3f153e194f 100644
--- a/src/tools/miri/tests/pass/shims/aarch64/intrinsics-aarch64-neon.rs
+++ b/src/tools/miri/tests/pass/shims/aarch64/intrinsics-aarch64-neon.rs
@@ -10,13 +10,13 @@ fn main() {
     assert!(is_aarch64_feature_detected!("neon"));
 
     unsafe {
-        test_neon();
-        tbl1_v16i8_basic();
+        test_vpmaxq_u8();
+        test_tbl1_v16i8_basic();
     }
 }
 
 #[target_feature(enable = "neon")]
-unsafe fn test_neon() {
+unsafe fn test_vpmaxq_u8() {
     // Adapted from library/stdarch/crates/core_arch/src/aarch64/neon/mod.rs
     unsafe fn test_vpmaxq_u8() {
         let a = vld1q_u8([1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8].as_ptr());
@@ -42,18 +42,19 @@ unsafe fn test_neon() {
 }
 
 #[target_feature(enable = "neon")]
-fn tbl1_v16i8_basic() {
+fn test_tbl1_v16i8_basic() {
     unsafe {
         // table = 0..15
         let table: uint8x16_t =
             transmute::<[u8; 16], _>([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]);
-        // indices: include in-range, 15 (last), 16 and 255 (out-of-range → 0)
+        // indices
         let idx: uint8x16_t =
             transmute::<[u8; 16], _>([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]);
         let got = vqtbl1q_u8(table, idx);
         let got_arr: [u8; 16] = transmute(got);
         assert_eq!(got_arr, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]);
 
+        // Also try different order and out-of-range indices (16, 255).
         let idx2: uint8x16_t =
             transmute::<[u8; 16], _>([15, 16, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]);
         let got2 = vqtbl1q_u8(table, idx2);

From d29c931c9dc4bd4cca3695d54c7b46153ac99e2b Mon Sep 17 00:00:00 2001
From: Antoni Boucher 
Date: Sat, 14 Feb 2026 07:43:15 -0500
Subject: [PATCH 171/265] Update to nightly-2026-02-14

---
 rust-toolchain | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust-toolchain b/rust-toolchain
index ce97f300fa40..655fa6abbab2 100644
--- a/rust-toolchain
+++ b/rust-toolchain
@@ -1,3 +1,3 @@
 [toolchain]
-channel = "nightly-2026-02-13"
+channel = "nightly-2026-02-14"
 components = ["rust-src", "rustc-dev", "llvm-tools-preview"]

From 3fdb366140b46097434b608707fc93e0b3e26439 Mon Sep 17 00:00:00 2001
From: Antoni Boucher 
Date: Sat, 14 Feb 2026 07:47:54 -0500
Subject: [PATCH 172/265] Fix clippy warning

---
 src/declare.rs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/declare.rs b/src/declare.rs
index e4130b221ee3..6450e2d4039c 100644
--- a/src/declare.rs
+++ b/src/declare.rs
@@ -151,7 +151,6 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
 ///
 /// If there’s a value with the same name already declared, the function will
 /// update the declaration and return existing Value instead.
-#[expect(clippy::let_and_return)]
 fn declare_raw_fn<'gcc>(
     cx: &CodegenCx<'gcc, '_>,
     name: &str,

From 27d5b14aef576787388c7f5fe0bef4c5a9a61988 Mon Sep 17 00:00:00 2001
From: Guillaume Gomez 
Date: Sat, 14 Feb 2026 16:59:09 +0100
Subject: [PATCH 173/265] Update GCC submodule

---
 src/gcc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gcc b/src/gcc
index 0081ca6631ab..efdd0a7290c2 160000
--- a/src/gcc
+++ b/src/gcc
@@ -1 +1 @@
-Subproject commit 0081ca6631abdfa02bf42bc85aaf507b8a0e6beb
+Subproject commit efdd0a7290c22f5438d7c5380105d353ee3e8518

From 1f94802603aa571c4d7cdf7045b35b8907eb2ee9 Mon Sep 17 00:00:00 2001
From: Guillaume Gomez 
Date: Sat, 14 Feb 2026 17:12:51 +0100
Subject: [PATCH 174/265] Fix libgccjit version

---
 compiler/rustc_codegen_gcc/libgccjit.version | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/rustc_codegen_gcc/libgccjit.version b/compiler/rustc_codegen_gcc/libgccjit.version
index 25e1105ab07f..abc967702fb0 100644
--- a/compiler/rustc_codegen_gcc/libgccjit.version
+++ b/compiler/rustc_codegen_gcc/libgccjit.version
@@ -1 +1 @@
-896045775f7c40fafe48c6e398f6c53bf6af889e
+efdd0a7290c22f5438d7c5380105d353ee3e8518

From 8d96e266848feb3d04b4216ba9e31f7c111e3e45 Mon Sep 17 00:00:00 2001
From: AprilNEA 
Date: Sat, 14 Feb 2026 19:44:50 +0000
Subject: [PATCH 175/265] Add regression test for struct ctor used as array
 repeat count under mGCA

Using a struct constructor (DefKind::Ctor(Struct, Const)) as an array
repeat count with `#![feature(min_generic_const_args)]` used to trigger
an ICE in const alias normalization. Add a regression test to ensure
the compiler produces a proper type error instead of panicking.
---
 .../mgca/struct-ctor-in-array-len.rs          | 16 ++++++++++++++++
 .../mgca/struct-ctor-in-array-len.stderr      | 19 +++++++++++++++++++
 2 files changed, 35 insertions(+)
 create mode 100644 tests/ui/const-generics/mgca/struct-ctor-in-array-len.rs
 create mode 100644 tests/ui/const-generics/mgca/struct-ctor-in-array-len.stderr

diff --git a/tests/ui/const-generics/mgca/struct-ctor-in-array-len.rs b/tests/ui/const-generics/mgca/struct-ctor-in-array-len.rs
new file mode 100644
index 000000000000..715caef38a9a
--- /dev/null
+++ b/tests/ui/const-generics/mgca/struct-ctor-in-array-len.rs
@@ -0,0 +1,16 @@
+// Regression test for https://github.com/rust-lang/rust/issues/141738
+//
+// Using a struct constructor as an array repeat count with
+// `min_generic_const_args` used to ICE with "unexpected `DefKind`
+// for const alias to resolve to: Ctor(Struct, Const)".
+// It should now produce a proper type error.
+
+#![feature(min_generic_const_args)]
+//~^ WARN the feature `min_generic_const_args` is incomplete
+
+struct S;
+
+fn main() {
+    let _b = [0; S];
+    //~^ ERROR the constant `S` is not of type `usize`
+}
diff --git a/tests/ui/const-generics/mgca/struct-ctor-in-array-len.stderr b/tests/ui/const-generics/mgca/struct-ctor-in-array-len.stderr
new file mode 100644
index 000000000000..baf587a856bc
--- /dev/null
+++ b/tests/ui/const-generics/mgca/struct-ctor-in-array-len.stderr
@@ -0,0 +1,19 @@
+warning: the feature `min_generic_const_args` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/struct-ctor-in-array-len.rs:8:12
+   |
+LL | #![feature(min_generic_const_args)]
+   |            ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #132980  for more information
+   = note: `#[warn(incomplete_features)]` on by default
+
+error: the constant `S` is not of type `usize`
+  --> $DIR/struct-ctor-in-array-len.rs:14:14
+   |
+LL |     let _b = [0; S];
+   |              ^^^^^^ expected `usize`, found `S`
+   |
+   = note: the length of array `[{integer}; S]` must be type `usize`
+
+error: aborting due to 1 previous error; 1 warning emitted
+

From d15d7149b17e8b399cf4030580649cc18b59ed6a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexander=20Kj=C3=A4ll?= 
Date: Sat, 14 Feb 2026 21:02:46 +0100
Subject: [PATCH 176/265] fix smol_str compilation error the command 'cargo
 build --no-default-features --features borsh' failed with: error[E0599]: no
 function or associated item named 'other' found for struct 'borsh::io::Error'
 in the current scope    --> lib/smol_str/src/borsh.rs:33:39     |  33 |      
           .ok_or_else(|| Error::other("u8::vec_from_reader unexpectedly
 returned None"))?;     |                                       ^^^^^ function
 or associated item not found in 'borsh::io::Error'     |

---
 src/tools/rust-analyzer/lib/smol_str/src/borsh.rs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/tools/rust-analyzer/lib/smol_str/src/borsh.rs b/src/tools/rust-analyzer/lib/smol_str/src/borsh.rs
index 527ce85a1746..b684a4910c96 100644
--- a/src/tools/rust-analyzer/lib/smol_str/src/borsh.rs
+++ b/src/tools/rust-analyzer/lib/smol_str/src/borsh.rs
@@ -29,8 +29,9 @@ impl BorshDeserialize for SmolStr {
             }))
         } else {
             // u8::vec_from_reader always returns Some on success in current implementation
-            let vec = u8::vec_from_reader(len, reader)?
-                .ok_or_else(|| Error::other("u8::vec_from_reader unexpectedly returned None"))?;
+            let vec = u8::vec_from_reader(len, reader)?.ok_or_else(|| {
+                Error::new(ErrorKind::Other, "u8::vec_from_reader unexpectedly returned None")
+            })?;
             Ok(SmolStr::from(String::from_utf8(vec).map_err(|err| {
                 let msg = err.to_string();
                 Error::new(ErrorKind::InvalidData, msg)

From b935f379b48b3814c4f28de6487ccdfb3b5037fc Mon Sep 17 00:00:00 2001
From: Folkert de Vries 
Date: Wed, 4 Feb 2026 15:55:08 +0100
Subject: [PATCH 177/265] implement `carryless_mul`

---
 compiler/rustc_codegen_llvm/src/intrinsic.rs  |  34 +++
 compiler/rustc_codegen_llvm/src/lib.rs        |   9 +-
 .../rustc_hir_analysis/src/check/intrinsic.rs |   5 +-
 compiler/rustc_span/src/symbol.rs             |   2 +
 library/core/src/intrinsics/fallback.rs       |  35 +++
 library/core/src/intrinsics/mod.rs            |  13 +
 library/core/src/intrinsics/simd.rs           |  12 +
 library/core/src/lib.rs                       |   1 +
 library/core/src/num/mod.rs                   | 140 +++++++++-
 library/core/src/num/uint_macros.rs           |  59 ++++
 library/coretests/tests/lib.rs                |   1 +
 library/coretests/tests/num/carryless_mul.rs  | 254 ++++++++++++++++++
 library/coretests/tests/num/mod.rs            |   1 +
 library/coretests/tests/num/uint_macros.rs    |   7 +
 library/std/src/lib.rs                        |   1 +
 15 files changed, 569 insertions(+), 5 deletions(-)
 create mode 100644 library/coretests/tests/num/carryless_mul.rs

diff --git a/compiler/rustc_codegen_llvm/src/intrinsic.rs b/compiler/rustc_codegen_llvm/src/intrinsic.rs
index c0e7c18b4d47..6bcc8135f35e 100644
--- a/compiler/rustc_codegen_llvm/src/intrinsic.rs
+++ b/compiler/rustc_codegen_llvm/src/intrinsic.rs
@@ -387,6 +387,27 @@ impl<'ll, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
                 let pair = self.insert_value(pair, high, 1);
                 pair
             }
+
+            // FIXME move into the branch below when LLVM 22 is the lowest version we support.
+            sym::carryless_mul if crate::llvm_util::get_version() >= (22, 0, 0) => {
+                let ty = args[0].layout.ty;
+                if !ty.is_integral() {
+                    tcx.dcx().emit_err(InvalidMonomorphization::BasicIntegerType {
+                        span,
+                        name,
+                        ty,
+                    });
+                    return Ok(());
+                }
+                let (size, _) = ty.int_size_and_signed(self.tcx);
+                let width = size.bits();
+                let llty = self.type_ix(width);
+
+                let lhs = args[0].immediate();
+                let rhs = args[1].immediate();
+                self.call_intrinsic("llvm.clmul", &[llty], &[lhs, rhs])
+            }
+
             sym::ctlz
             | sym::ctlz_nonzero
             | sym::cttz
@@ -2784,6 +2805,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
             | sym::simd_ctlz
             | sym::simd_ctpop
             | sym::simd_cttz
+            | sym::simd_carryless_mul
             | sym::simd_funnel_shl
             | sym::simd_funnel_shr
     ) {
@@ -2808,6 +2830,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
             sym::simd_cttz => "llvm.cttz",
             sym::simd_funnel_shl => "llvm.fshl",
             sym::simd_funnel_shr => "llvm.fshr",
+            sym::simd_carryless_mul => "llvm.clmul",
             _ => unreachable!(),
         };
         let int_size = in_elem.int_size_and_signed(bx.tcx()).0.bits();
@@ -2833,6 +2856,17 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
                 &[vec_ty],
                 &[args[0].immediate(), args[1].immediate(), args[2].immediate()],
             )),
+            sym::simd_carryless_mul => {
+                if crate::llvm_util::get_version() >= (22, 0, 0) {
+                    Ok(bx.call_intrinsic(
+                        llvm_intrinsic,
+                        &[vec_ty],
+                        &[args[0].immediate(), args[1].immediate()],
+                    ))
+                } else {
+                    span_bug!(span, "`simd_carryless_mul` needs LLVM 22 or higher");
+                }
+            }
             _ => unreachable!(),
         };
     }
diff --git a/compiler/rustc_codegen_llvm/src/lib.rs b/compiler/rustc_codegen_llvm/src/lib.rs
index c92de64a3349..3310fe4f43f8 100644
--- a/compiler/rustc_codegen_llvm/src/lib.rs
+++ b/compiler/rustc_codegen_llvm/src/lib.rs
@@ -354,7 +354,14 @@ impl CodegenBackend for LlvmCodegenBackend {
     }
 
     fn replaced_intrinsics(&self) -> Vec {
-        vec![sym::unchecked_funnel_shl, sym::unchecked_funnel_shr, sym::carrying_mul_add]
+        let mut will_not_use_fallback =
+            vec![sym::unchecked_funnel_shl, sym::unchecked_funnel_shr, sym::carrying_mul_add];
+
+        if llvm_util::get_version() >= (22, 0, 0) {
+            will_not_use_fallback.push(sym::carryless_mul);
+        }
+
+        will_not_use_fallback
     }
 
     fn codegen_crate<'tcx>(&self, tcx: TyCtxt<'tcx>) -> Box {
diff --git a/compiler/rustc_hir_analysis/src/check/intrinsic.rs b/compiler/rustc_hir_analysis/src/check/intrinsic.rs
index 22ee490b81a7..6946d1a70040 100644
--- a/compiler/rustc_hir_analysis/src/check/intrinsic.rs
+++ b/compiler/rustc_hir_analysis/src/check/intrinsic.rs
@@ -82,6 +82,7 @@ fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId) -> hi
         | sym::bswap
         | sym::caller_location
         | sym::carrying_mul_add
+        | sym::carryless_mul
         | sym::ceilf16
         | sym::ceilf32
         | sym::ceilf64
@@ -564,6 +565,7 @@ pub(crate) fn check_intrinsic_type(
             (1, 0, vec![param(0), param(0)], param(0))
         }
         sym::saturating_add | sym::saturating_sub => (1, 0, vec![param(0), param(0)], param(0)),
+        sym::carryless_mul => (1, 0, vec![param(0), param(0)], param(0)),
         sym::fadd_fast | sym::fsub_fast | sym::fmul_fast | sym::fdiv_fast | sym::frem_fast => {
             (1, 0, vec![param(0), param(0)], param(0))
         }
@@ -711,7 +713,8 @@ pub(crate) fn check_intrinsic_type(
         | sym::simd_fmin
         | sym::simd_fmax
         | sym::simd_saturating_add
-        | sym::simd_saturating_sub => (1, 0, vec![param(0), param(0)], param(0)),
+        | sym::simd_saturating_sub
+        | sym::simd_carryless_mul => (1, 0, vec![param(0), param(0)], param(0)),
         sym::simd_arith_offset => (2, 0, vec![param(0), param(1)], param(0)),
         sym::simd_neg
         | sym::simd_bswap
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index b9a9d8029d28..f708c925b94d 100644
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
@@ -648,6 +648,7 @@ symbols! {
         caller_location,
         capture_disjoint_fields,
         carrying_mul_add,
+        carryless_mul,
         catch_unwind,
         cause,
         cdylib,
@@ -2093,6 +2094,7 @@ symbols! {
         simd_bitmask,
         simd_bitreverse,
         simd_bswap,
+        simd_carryless_mul,
         simd_cast,
         simd_cast_ptr,
         simd_ceil,
diff --git a/library/core/src/intrinsics/fallback.rs b/library/core/src/intrinsics/fallback.rs
index 932537f2581f..aa9033ee3d26 100644
--- a/library/core/src/intrinsics/fallback.rs
+++ b/library/core/src/intrinsics/fallback.rs
@@ -218,3 +218,38 @@ macro_rules! impl_funnel_shifts {
 impl_funnel_shifts! {
     u8, u16, u32, u64, u128, usize
 }
+
+#[rustc_const_unstable(feature = "core_intrinsics_fallbacks", issue = "none")]
+pub const trait CarrylessMul: Copy + 'static {
+    /// See [`super::carryless_mul`]; we just need the trait indirection to handle
+    /// different types since calling intrinsics with generics doesn't work.
+    fn carryless_mul(self, rhs: Self) -> Self;
+}
+
+macro_rules! impl_carryless_mul{
+    ($($type:ident),*) => {$(
+        #[rustc_const_unstable(feature = "core_intrinsics_fallbacks", issue = "none")]
+        impl const CarrylessMul for $type {
+            #[inline]
+            fn carryless_mul(self, rhs: Self) -> Self {
+                let mut result = 0;
+                let mut i = 0;
+
+                while i < $type::BITS {
+                    // If the i-th bit in rhs is set.
+                    if (rhs >> i) & 1 != 0 {
+                        // Then xor the result with `self` shifted to the left by i positions.
+                        result ^= self << i;
+                    }
+                    i += 1;
+                }
+
+                result
+            }
+        }
+    )*};
+}
+
+impl_carryless_mul! {
+    u8, u16, u32, u64, u128, usize
+}
diff --git a/library/core/src/intrinsics/mod.rs b/library/core/src/intrinsics/mod.rs
index 3ddea90652d1..e48bd7d1c980 100644
--- a/library/core/src/intrinsics/mod.rs
+++ b/library/core/src/intrinsics/mod.rs
@@ -2178,6 +2178,19 @@ pub const unsafe fn unchecked_funnel_shr(
     unsafe { a.unchecked_funnel_shr(b, shift) }
 }
 
+/// Carryless multiply.
+///
+/// Safe versions of this intrinsic are available on the integer primitives
+/// via the `carryless_mul` method. For example, [`u32::carryless_mul`].
+#[rustc_intrinsic]
+#[rustc_nounwind]
+#[rustc_const_unstable(feature = "uint_carryless_mul", issue = "152080")]
+#[unstable(feature = "uint_carryless_mul", issue = "152080")]
+#[miri::intrinsic_fallback_is_spec]
+pub const fn carryless_mul(a: T, b: T) -> T {
+    a.carryless_mul(b)
+}
+
 /// This is an implementation detail of [`crate::ptr::read`] and should
 /// not be used anywhere else.  See its comments for why this exists.
 ///
diff --git a/library/core/src/intrinsics/simd.rs b/library/core/src/intrinsics/simd.rs
index f70262c38ae5..5fb2102c319e 100644
--- a/library/core/src/intrinsics/simd.rs
+++ b/library/core/src/intrinsics/simd.rs
@@ -162,6 +162,18 @@ pub const unsafe fn simd_funnel_shl(a: T, b: T, shift: T) -> T;
 #[rustc_nounwind]
 pub const unsafe fn simd_funnel_shr(a: T, b: T, shift: T) -> T;
 
+/// Compute the carry-less product.
+///
+/// This is similar to long multiplication except that the carry is discarded.
+///
+/// This operation can be used to model multiplication in `GF(2)[X]`, the polynomial
+/// ring over `GF(2)`.
+///
+/// `T` must be a vector of integers.
+#[rustc_intrinsic]
+#[rustc_nounwind]
+pub unsafe fn simd_carryless_mul(a: T, b: T) -> T;
+
 /// "And"s vectors elementwise.
 ///
 /// `T` must be a vector of integers.
diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs
index dfa1236c2a2c..d650239a44c6 100644
--- a/library/core/src/lib.rs
+++ b/library/core/src/lib.rs
@@ -170,6 +170,7 @@
 #![feature(trait_alias)]
 #![feature(transparent_unions)]
 #![feature(try_blocks)]
+#![feature(uint_carryless_mul)]
 #![feature(unboxed_closures)]
 #![feature(unsized_fn_params)]
 #![feature(with_negative_coherence)]
diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs
index 558426c94e5d..839a6fbdc9b7 100644
--- a/library/core/src/num/mod.rs
+++ b/library/core/src/num/mod.rs
@@ -244,6 +244,104 @@ macro_rules! midpoint_impl {
     };
 }
 
+macro_rules! widening_carryless_mul_impl {
+    ($SelfT:ty, $WideT:ty) => {
+        /// Performs a widening carry-less multiplication.
+        ///
+        /// # Examples
+        ///
+        /// ```
+        /// #![feature(uint_carryless_mul)]
+        ///
+        #[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.widening_carryless_mul(",
+                                stringify!($SelfT), "::MAX), ", stringify!($WideT), "::MAX / 3);")]
+        /// ```
+        #[rustc_const_unstable(feature = "uint_carryless_mul", issue = "152080")]
+        #[doc(alias = "clmul")]
+        #[unstable(feature = "uint_carryless_mul", issue = "152080")]
+        #[must_use = "this returns the result of the operation, \
+                      without modifying the original"]
+        #[inline]
+        pub const fn widening_carryless_mul(self, rhs: $SelfT) -> $WideT {
+            (self as $WideT).carryless_mul(rhs as $WideT)
+        }
+    }
+}
+
+macro_rules! carrying_carryless_mul_impl {
+    (u128, u256) => {
+        carrying_carryless_mul_impl! { @internal u128 =>
+            pub const fn carrying_carryless_mul(self, rhs: Self, carry: Self) -> (Self, Self) {
+                let x0 = self as u64;
+                let x1 = (self >> 64) as u64;
+                let y0 = rhs as u64;
+                let y1 = (rhs >> 64) as u64;
+
+                let z0 = u64::widening_carryless_mul(x0, y0);
+                let z2 = u64::widening_carryless_mul(x1, y1);
+
+                // The grade school algorithm would compute:
+                // z1 = x0y1 ^ x1y0
+
+                // Instead, Karatsuba first computes:
+                let z3 = u64::widening_carryless_mul(x0 ^ x1, y0 ^ y1);
+                // Since it distributes over XOR,
+                // z3 == x0y0 ^ x0y1 ^ x1y0 ^ x1y1
+                //       |--|   |---------|   |--|
+                //    ==  z0  ^     z1      ^  z2
+                // so we can compute z1 as
+                let z1 = z3 ^ z0 ^ z2;
+
+                let lo = z0 ^ (z1 << 64);
+                let hi = z2 ^ (z1 >> 64);
+
+                (lo ^ carry, hi)
+            }
+        }
+    };
+    ($SelfT:ty, $WideT:ty) => {
+        carrying_carryless_mul_impl! { @internal $SelfT =>
+            pub const fn carrying_carryless_mul(self, rhs: Self, carry: Self) -> (Self, Self) {
+                // Can't use widening_carryless_mul because it's not implemented for usize.
+                let p = (self as $WideT).carryless_mul(rhs as $WideT);
+
+                let lo = (p as $SelfT);
+                let hi = (p  >> Self::BITS) as $SelfT;
+
+                (lo ^ carry, hi)
+            }
+        }
+    };
+    (@internal $SelfT:ty => $($fn:tt)*) => {
+        /// Calculates the "full carryless multiplication" without the possibility to overflow.
+        ///
+        /// This returns the low-order (wrapping) bits and the high-order (overflow) bits
+        /// of the result as two separate values, in that order.
+        ///
+        /// # Examples
+        ///
+        /// Please note that this example is shared among integer types, which is why `u8` is used.
+        ///
+        /// ```
+        /// #![feature(uint_carryless_mul)]
+        ///
+        /// assert_eq!(0b1000_0000u8.carrying_carryless_mul(0b1000_0000, 0b0000), (0, 0b0100_0000));
+        /// assert_eq!(0b1000_0000u8.carrying_carryless_mul(0b1000_0000, 0b1111), (0b1111, 0b0100_0000));
+        #[doc = concat!("assert_eq!(",
+            stringify!($SelfT), "::MAX.carrying_carryless_mul(", stringify!($SelfT), "::MAX, ", stringify!($SelfT), "::MAX), ",
+            "(!(", stringify!($SelfT), "::MAX / 3), ", stringify!($SelfT), "::MAX / 3));"
+        )]
+        /// ```
+        #[rustc_const_unstable(feature = "uint_carryless_mul", issue = "152080")]
+        #[doc(alias = "clmul")]
+        #[unstable(feature = "uint_carryless_mul", issue = "152080")]
+        #[must_use = "this returns the result of the operation, \
+                      without modifying the original"]
+        #[inline]
+        $($fn)*
+    }
+}
+
 impl i8 {
     int_impl! {
         Self = i8,
@@ -458,6 +556,9 @@ impl u8 {
         fsh_op = "0x36",
         fshl_result = "0x8",
         fshr_result = "0x8d",
+        clmul_lhs = "0x12",
+        clmul_rhs = "0x34",
+        clmul_result = "0x28",
         swap_op = "0x12",
         swapped = "0x12",
         reversed = "0x48",
@@ -468,6 +569,8 @@ impl u8 {
         bound_condition = "",
     }
     midpoint_impl! { u8, u16, unsigned }
+    widening_carryless_mul_impl! { u8, u16 }
+    carrying_carryless_mul_impl! { u8, u16 }
 
     /// Checks if the value is within the ASCII range.
     ///
@@ -1095,6 +1198,9 @@ impl u16 {
         fsh_op = "0x2de",
         fshl_result = "0x30",
         fshr_result = "0x302d",
+        clmul_lhs = "0x9012",
+        clmul_rhs = "0xcd34",
+        clmul_result = "0x928",
         swap_op = "0x1234",
         swapped = "0x3412",
         reversed = "0x2c48",
@@ -1105,6 +1211,8 @@ impl u16 {
         bound_condition = "",
     }
     midpoint_impl! { u16, u32, unsigned }
+    widening_carryless_mul_impl! { u16, u32 }
+    carrying_carryless_mul_impl! { u16, u32 }
 
     /// Checks if the value is a Unicode surrogate code point, which are disallowed values for [`char`].
     ///
@@ -1145,6 +1253,9 @@ impl u32 {
         fsh_op = "0x2fe78e45",
         fshl_result = "0xb32f",
         fshr_result = "0xb32fe78e",
+        clmul_lhs = "0x56789012",
+        clmul_rhs = "0xf52ecd34",
+        clmul_result = "0x9b980928",
         swap_op = "0x12345678",
         swapped = "0x78563412",
         reversed = "0x1e6a2c48",
@@ -1155,6 +1266,8 @@ impl u32 {
         bound_condition = "",
     }
     midpoint_impl! { u32, u64, unsigned }
+    widening_carryless_mul_impl! { u32, u64 }
+    carrying_carryless_mul_impl! { u32, u64 }
 }
 
 impl u64 {
@@ -1171,6 +1284,9 @@ impl u64 {
         fsh_op = "0x2fe78e45983acd98",
         fshl_result = "0x6e12fe",
         fshr_result = "0x6e12fe78e45983ac",
+        clmul_lhs = "0x7890123456789012",
+        clmul_rhs = "0xdd358416f52ecd34",
+        clmul_result = "0xa6299579b980928",
         swap_op = "0x1234567890123456",
         swapped = "0x5634129078563412",
         reversed = "0x6a2c48091e6a2c48",
@@ -1181,6 +1297,8 @@ impl u64 {
         bound_condition = "",
     }
     midpoint_impl! { u64, u128, unsigned }
+    widening_carryless_mul_impl! { u64, u128 }
+    carrying_carryless_mul_impl! { u64, u128 }
 }
 
 impl u128 {
@@ -1197,6 +1315,9 @@ impl u128 {
         fsh_op = "0x2fe78e45983acd98039000008736273",
         fshl_result = "0x4f7602fe",
         fshr_result = "0x4f7602fe78e45983acd9803900000873",
+        clmul_lhs = "0x12345678901234567890123456789012",
+        clmul_rhs = "0x4317e40ab4ddcf05dd358416f52ecd34",
+        clmul_result = "0xb9cf660de35d0c170a6299579b980928",
         swap_op = "0x12345678901234567890123456789012",
         swapped = "0x12907856341290785634129078563412",
         reversed = "0x48091e6a2c48091e6a2c48091e6a2c48",
@@ -1209,6 +1330,7 @@ impl u128 {
         bound_condition = "",
     }
     midpoint_impl! { u128, unsigned }
+    carrying_carryless_mul_impl! { u128, u256 }
 }
 
 #[cfg(target_pointer_width = "16")]
@@ -1223,9 +1345,12 @@ impl usize {
         rot = 4,
         rot_op = "0xa003",
         rot_result = "0x3a",
-        fsh_op = "0x2fe78e45983acd98039000008736273",
-        fshl_result = "0x4f7602fe",
-        fshr_result = "0x4f7602fe78e45983acd9803900000873",
+        fsh_op = "0x2de",
+        fshl_result = "0x30",
+        fshr_result = "0x302d",
+        clmul_lhs = "0x9012",
+        clmul_rhs = "0xcd34",
+        clmul_result = "0x928",
         swap_op = "0x1234",
         swapped = "0x3412",
         reversed = "0x2c48",
@@ -1236,6 +1361,7 @@ impl usize {
         bound_condition = " on 16-bit targets",
     }
     midpoint_impl! { usize, u32, unsigned }
+    carrying_carryless_mul_impl! { usize, u32 }
 }
 
 #[cfg(target_pointer_width = "32")]
@@ -1253,6 +1379,9 @@ impl usize {
         fsh_op = "0x2fe78e45",
         fshl_result = "0xb32f",
         fshr_result = "0xb32fe78e",
+        clmul_lhs = "0x56789012",
+        clmul_rhs = "0xf52ecd34",
+        clmul_result = "0x9b980928",
         swap_op = "0x12345678",
         swapped = "0x78563412",
         reversed = "0x1e6a2c48",
@@ -1263,6 +1392,7 @@ impl usize {
         bound_condition = " on 32-bit targets",
     }
     midpoint_impl! { usize, u64, unsigned }
+    carrying_carryless_mul_impl! { usize, u64 }
 }
 
 #[cfg(target_pointer_width = "64")]
@@ -1280,6 +1410,9 @@ impl usize {
         fsh_op = "0x2fe78e45983acd98",
         fshl_result = "0x6e12fe",
         fshr_result = "0x6e12fe78e45983ac",
+        clmul_lhs = "0x7890123456789012",
+        clmul_rhs = "0xdd358416f52ecd34",
+        clmul_result = "0xa6299579b980928",
         swap_op = "0x1234567890123456",
         swapped = "0x5634129078563412",
         reversed = "0x6a2c48091e6a2c48",
@@ -1290,6 +1423,7 @@ impl usize {
         bound_condition = " on 64-bit targets",
     }
     midpoint_impl! { usize, u128, unsigned }
+    carrying_carryless_mul_impl! { usize, u128 }
 }
 
 impl usize {
diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs
index 8475cc71a7e0..cf79635dcd87 100644
--- a/library/core/src/num/uint_macros.rs
+++ b/library/core/src/num/uint_macros.rs
@@ -17,6 +17,9 @@ macro_rules! uint_impl {
         fsh_op = $fsh_op:literal,
         fshl_result = $fshl_result:literal,
         fshr_result = $fshr_result:literal,
+        clmul_lhs = $clmul_rhs:literal,
+        clmul_rhs = $clmul_lhs:literal,
+        clmul_result = $clmul_result:literal,
         swap_op = $swap_op:literal,
         swapped = $swapped:literal,
         reversed = $reversed:literal,
@@ -482,6 +485,62 @@ macro_rules! uint_impl {
             unsafe { intrinsics::unchecked_funnel_shr(self, rhs, n) }
         }
 
+        /// Performs a carry-less multiplication, returning the lower bits.
+        ///
+        /// This operation is similar to long multiplication, except that exclusive or is used
+        /// instead of addition. The implementation is equivalent to:
+        ///
+        /// ```no_run
+        #[doc = concat!("pub fn carryless_mul(lhs: ", stringify!($SelfT), ", rhs: ", stringify!($SelfT), ") -> ", stringify!($SelfT), "{")]
+        ///     let mut retval = 0;
+        #[doc = concat!("    for i in 0..",  stringify!($SelfT), "::BITS {")]
+        ///         if (rhs >> i) & 1 != 0 {
+        ///             // long multiplication would use +=
+        ///             retval ^= lhs << i;
+        ///         }
+        ///     }
+        ///     retval
+        /// }
+        /// ```
+        ///
+        /// The actual implementation is more efficient, and on some platforms lowers directly to a
+        /// dedicated instruction.
+        ///
+        /// # Uses
+        ///
+        /// Carryless multiplication can be used to turn a bitmask of quote characters into a
+        /// bit mask of characters surrounded by quotes:
+        ///
+        /// ```no_run
+        /// r#"abc xxx "foobar" zzz "a"!"#; // input string
+        ///  0b0000000010000001000001010; // quote_mask
+        ///  0b0000000001111110000000100; // quote_mask.carryless_mul(!0) & !quote_mask
+        /// ```
+        ///
+        /// Another use is in cryptography, where carryless multiplication allows for efficient
+        /// implementations of polynomial multiplication in `GF(2)[X]`, the polynomial ring
+        /// over `GF(2)`.
+        ///
+        /// # Examples
+        ///
+        /// ```
+        /// #![feature(uint_carryless_mul)]
+        ///
+        #[doc = concat!("let a = ", $clmul_lhs, stringify!($SelfT), ";")]
+        #[doc = concat!("let b = ", $clmul_rhs, stringify!($SelfT), ";")]
+        ///
+        #[doc = concat!("assert_eq!(a.carryless_mul(b), ", $clmul_result, ");")]
+        /// ```
+        #[rustc_const_unstable(feature = "uint_carryless_mul", issue = "152080")]
+        #[doc(alias = "clmul")]
+        #[unstable(feature = "uint_carryless_mul", issue = "152080")]
+        #[must_use = "this returns the result of the operation, \
+                      without modifying the original"]
+        #[inline(always)]
+        pub const fn carryless_mul(self, rhs: Self) -> Self {
+            intrinsics::carryless_mul(self, rhs)
+        }
+
         /// Reverses the byte order of the integer.
         ///
         /// # Examples
diff --git a/library/coretests/tests/lib.rs b/library/coretests/tests/lib.rs
index 3a30b6b7edcc..b8702ee20cbb 100644
--- a/library/coretests/tests/lib.rs
+++ b/library/coretests/tests/lib.rs
@@ -116,6 +116,7 @@
 #![feature(try_trait_v2)]
 #![feature(type_info)]
 #![feature(uint_bit_width)]
+#![feature(uint_carryless_mul)]
 #![feature(uint_gather_scatter_bits)]
 #![feature(unsize)]
 #![feature(unwrap_infallible)]
diff --git a/library/coretests/tests/num/carryless_mul.rs b/library/coretests/tests/num/carryless_mul.rs
new file mode 100644
index 000000000000..5d4690beaede
--- /dev/null
+++ b/library/coretests/tests/num/carryless_mul.rs
@@ -0,0 +1,254 @@
+//! Tests the `Unsigned::{carryless_mul, widening_carryless_mul, carrying_carryless_mul}` methods.
+
+#[test]
+fn carryless_mul_u128() {
+    assert_eq_const_safe!(u128: ::carryless_mul(0, 0), 0);
+    assert_eq_const_safe!(u128: ::carryless_mul(1, 1), 1);
+
+    assert_eq_const_safe!(
+        u128: ::carryless_mul(
+            0x0123456789ABCDEF_FEDCBA9876543210,
+            1u128 << 64,
+        ),
+        0xFEDCBA9876543210_0000000000000000
+    );
+
+    assert_eq_const_safe!(
+        u128: ::carryless_mul(
+            0x0123456789ABCDEF_FEDCBA9876543210,
+            (1u128 << 64) | 1,
+        ),
+        0xFFFFFFFFFFFFFFFF_FEDCBA9876543210
+    );
+
+    assert_eq_const_safe!(
+        u128: ::carryless_mul(
+            0x0123456789ABCDEF_FEDCBA9876543211,
+            1u128 << 127,
+        ),
+        0x8000000000000000_0000000000000000
+    );
+
+    assert_eq_const_safe!(
+        u128: ::carryless_mul(
+            0xAAAAAAAAAAAAAAAA_AAAAAAAAAAAAAAAA,
+            0x5555555555555555_5555555555555555,
+        ),
+        0x2222222222222222_2222222222222222
+    );
+
+    assert_eq_const_safe!(
+        u128: ::carryless_mul(
+            (1 << 127) | (1 << 64) | 1,
+            (1 << 63) | 1
+        ),
+        (1 << 64) | (1 << 63) | 1
+    );
+
+    assert_eq_const_safe!(
+        u128: ::carryless_mul(
+            0x8000000000000000_0000000000000001,
+            0x7FFFFFFFFFFFFFFF_FFFFFFFFFFFFFFFF,
+        ),
+        0xFFFFFFFFFFFFFFFF_FFFFFFFFFFFFFFFF
+    );
+}
+
+#[test]
+fn carryless_mul_u64() {
+    assert_eq_const_safe!(u64: ::carryless_mul(0, 0), 0);
+    assert_eq_const_safe!(u64: ::carryless_mul(1, 1), 1);
+
+    assert_eq_const_safe!(
+        u64: ::carryless_mul(
+            0x0123_4567_89AB_CDEF,
+            1u64 << 32,
+        ),
+        0x89AB_CDEF_0000_0000
+    );
+
+    assert_eq_const_safe!(
+        u64: ::carryless_mul(
+            0x0123_4567_89AB_CDEF,
+            (1u64 << 32) | 1,
+        ),
+        0x8888_8888_89AB_CDEF
+    );
+
+    assert_eq_const_safe!(
+        u64: ::carryless_mul(
+            0x0123_4567_89AB_CDEF,
+            1u64 << 63,
+        ),
+        0x8000_0000_0000_0000
+    );
+
+    assert_eq_const_safe!(
+        u64: ::carryless_mul(
+            0xAAAA_AAAA_AAAA_AAAA,
+            0x5555_5555_5555_5555,
+        ),
+        0x2222_2222_2222_2222
+    );
+
+    assert_eq_const_safe!(
+        u64: ::carryless_mul(
+            (1u64 << 63) | (1u64 << 32) | 1,
+            (1u64 << 31) | 1,
+        ),
+          (1u64 << 32) | (1u64 << 31) | 1
+    );
+
+    assert_eq_const_safe!(
+        u64: ::carryless_mul(
+            0x8000_0000_0000_0001,
+            0x7FFF_FFFF_FFFF_FFFF,
+        ),
+        0xFFFF_FFFF_FFFF_FFFF
+    );
+}
+
+#[test]
+fn carryless_mul_u32() {
+    assert_eq_const_safe!(
+        u32: ::carryless_mul(0x0123_4567, 1u32 << 16),
+        0x4567_0000
+    );
+
+    assert_eq_const_safe!(
+        u32: ::carryless_mul(0xAAAA_AAAA, 0x5555_5555),
+        0x2222_2222
+    );
+}
+
+#[test]
+fn carryless_mul_u16() {
+    assert_eq_const_safe!(
+        u16: ::carryless_mul(0x0123, 1u16 << 8),
+        0x2300
+    );
+
+    assert_eq_const_safe!(
+        u16: ::carryless_mul(0xAAAA, 0x5555),
+        0x2222
+    );
+}
+
+#[test]
+fn carryless_mul_u8() {
+    assert_eq_const_safe!(
+        u8: ::carryless_mul(0x01, 1u8 << 4),
+        0x10
+    );
+
+    assert_eq_const_safe!(
+        u8: ::carryless_mul(0xAA, 0x55),
+        0x22
+    );
+}
+
+#[test]
+fn widening_carryless_mul() {
+    assert_eq_const_safe!(
+        u16: ::widening_carryless_mul(0xEFu8, 1u8 << 7),
+        0x7780u16
+    );
+    assert_eq_const_safe!(
+        u16: ::widening_carryless_mul(0xEFu8, (1u8 << 7) | 1),
+        0x776Fu16
+    );
+
+    assert_eq_const_safe!(
+        u32: ::widening_carryless_mul(0xBEEFu16, 1u16 << 15),
+        0x5F77_8000u32
+    );
+    assert_eq_const_safe!(
+        u32: ::widening_carryless_mul(0xBEEFu16, (1u16 << 15) | 1),
+        0x5F77_3EEFu32
+    );
+
+    assert_eq_const_safe!(
+        u64: ::widening_carryless_mul(0xDEAD_BEEFu32, 1u32 << 31),
+        0x6F56_DF77_8000_0000u64
+    );
+    assert_eq_const_safe!(
+        u64: ::widening_carryless_mul(0xDEAD_BEEFu32, (1u32 << 31) | 1),
+        0x6F56_DF77_5EAD_BEEFu64
+    );
+
+    assert_eq_const_safe!(
+        u128: ::widening_carryless_mul(0xDEAD_BEEF_FACE_FEEDu64, 1u64 << 63),
+        147995377545877439359040026616086396928
+
+    );
+    assert_eq_const_safe!(
+        u128: ::widening_carryless_mul(0xDEAD_BEEF_FACE_FEEDu64, (1u64 << 63) | 1),
+        147995377545877439356638973527682121453
+    );
+}
+
+#[test]
+fn carrying_carryless_mul() {
+    assert_eq_const_safe!(
+        (u8, u8): ::carrying_carryless_mul(0xEFu8, 1u8 << 7, 0),
+        (0x80u8, 0x77u8)
+    );
+    assert_eq_const_safe!(
+        (u8, u8): ::carrying_carryless_mul(0xEFu8, (1u8 << 7) | 1, 0xEF),
+        (0x80u8, 0x77u8)
+    );
+
+    assert_eq_const_safe!(
+        (u16, u16): ::carrying_carryless_mul(0xBEEFu16, 1u16 << 15, 0),
+        (0x8000u16, 0x5F77u16)
+    );
+    assert_eq_const_safe!(
+        (u16, u16): ::carrying_carryless_mul(0xBEEFu16, (1u16 << 15) | 1, 0xBEEF),
+        (0x8000u16, 0x5F77u16)
+    );
+
+    assert_eq_const_safe!(
+        (u32, u32): ::carrying_carryless_mul(0xDEAD_BEEFu32, 1u32 << 31, 0),
+        (0x8000_0000u32, 0x6F56_DF77u32)
+    );
+    assert_eq_const_safe!(
+        (u32, u32): ::carrying_carryless_mul(0xDEAD_BEEFu32, (1u32 << 31) | 1, 0xDEAD_BEEF),
+        (0x8000_0000u32, 0x6F56_DF77u32)
+    );
+
+    assert_eq_const_safe!(
+        (u64, u64): ::carrying_carryless_mul(0xDEAD_BEEF_FACE_FEEDu64, 1u64 << 63, 0),
+        (9223372036854775808, 8022845492652638070)
+    );
+    assert_eq_const_safe!(
+        (u64, u64): ::carrying_carryless_mul(
+            0xDEAD_BEEF_FACE_FEEDu64,
+            (1u64 << 63) | 1,
+            0xDEAD_BEEF_FACE_FEED,
+        ),
+        (9223372036854775808, 8022845492652638070)
+    );
+
+    assert_eq_const_safe!(
+        (u128, u128): ::carrying_carryless_mul(
+            0xDEAD_BEEF_FACE_FEED_0123_4567_89AB_CDEFu128,
+            1u128 << 127,
+            0,
+        ),
+        (
+            0x8000_0000_0000_0000_0000_0000_0000_0000u128,
+            147995377545877439359081019380694640375,
+        )
+    );
+    assert_eq_const_safe!(
+        (u128, u128): ::carrying_carryless_mul(
+            0xDEAD_BEEF_FACE_FEED_0123_4567_89AB_CDEFu128,
+            (1u128 << 127) | 1,
+            0xDEAD_BEEF_FACE_FEED_0123_4567_89AB_CDEF,
+        ),
+        (
+            0x8000_0000_0000_0000_0000_0000_0000_0000u128,
+            147995377545877439359081019380694640375,
+        )
+    );
+}
diff --git a/library/coretests/tests/num/mod.rs b/library/coretests/tests/num/mod.rs
index 913f766ec168..73b0e2333fee 100644
--- a/library/coretests/tests/num/mod.rs
+++ b/library/coretests/tests/num/mod.rs
@@ -22,6 +22,7 @@ mod u64;
 mod u8;
 
 mod bignum;
+mod carryless_mul;
 mod const_from;
 mod dec2flt;
 mod float_iter_sum_identity;
diff --git a/library/coretests/tests/num/uint_macros.rs b/library/coretests/tests/num/uint_macros.rs
index 7c4fb22599c0..240c66fd5c71 100644
--- a/library/coretests/tests/num/uint_macros.rs
+++ b/library/coretests/tests/num/uint_macros.rs
@@ -117,6 +117,13 @@ macro_rules! uint_module {
                 assert_eq_const_safe!($T: <$T>::funnel_shr(_1, _1, 4), <$T>::rotate_right(_1, 4));
             }
 
+            fn test_carryless_mul() {
+                assert_eq_const_safe!($T: <$T>::carryless_mul(0, 0), 0);
+                assert_eq_const_safe!($T: <$T>::carryless_mul(1, 1), 1);
+
+                assert_eq_const_safe!($T: <$T>::carryless_mul(0b0100, 2), 0b1000);
+            }
+
             fn test_swap_bytes() {
                 assert_eq_const_safe!($T: A.swap_bytes().swap_bytes(), A);
                 assert_eq_const_safe!($T: B.swap_bytes().swap_bytes(), B);
diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs
index 39c2dd4c0cb7..03e3da013cd2 100644
--- a/library/std/src/lib.rs
+++ b/library/std/src/lib.rs
@@ -315,6 +315,7 @@
 #![feature(try_blocks)]
 #![feature(try_trait_v2)]
 #![feature(type_alias_impl_trait)]
+#![feature(uint_carryless_mul)]
 // tidy-alphabetical-end
 //
 // Library features (core):

From a7888c1342c5a30df5d45bbcb073269e3e163b4c Mon Sep 17 00:00:00 2001
From: Folkert de Vries 
Date: Fri, 2 Jan 2026 15:55:35 +0100
Subject: [PATCH 178/265] allow `const fn` to be c-variadic

however `Drop` for `VaList` is not yet available in const fn
---
 .../rustc_ast_passes/src/ast_validation.rs    |  9 ---
 compiler/rustc_ast_passes/src/errors.rs       | 11 ----
 .../variadic-ffi-semantic-restrictions.rs     | 10 +--
 .../variadic-ffi-semantic-restrictions.stderr | 66 ++++++-------------
 4 files changed, 23 insertions(+), 73 deletions(-)

diff --git a/compiler/rustc_ast_passes/src/ast_validation.rs b/compiler/rustc_ast_passes/src/ast_validation.rs
index b9fb20b68971..f9a64ffe09c4 100644
--- a/compiler/rustc_ast_passes/src/ast_validation.rs
+++ b/compiler/rustc_ast_passes/src/ast_validation.rs
@@ -698,15 +698,6 @@ impl<'a> AstValidator<'a> {
             unreachable!("C variable argument list cannot be used in closures")
         };
 
-        // C-variadics are not yet implemented in const evaluation.
-        if let Const::Yes(const_span) = sig.header.constness {
-            self.dcx().emit_err(errors::ConstAndCVariadic {
-                spans: vec![const_span, variadic_param.span],
-                const_span,
-                variadic_span: variadic_param.span,
-            });
-        }
-
         if let Some(coroutine_kind) = sig.header.coroutine_kind {
             self.dcx().emit_err(errors::CoroutineAndCVariadic {
                 spans: vec![coroutine_kind.span(), variadic_param.span],
diff --git a/compiler/rustc_ast_passes/src/errors.rs b/compiler/rustc_ast_passes/src/errors.rs
index dd260aede489..30b2e6667447 100644
--- a/compiler/rustc_ast_passes/src/errors.rs
+++ b/compiler/rustc_ast_passes/src/errors.rs
@@ -823,17 +823,6 @@ pub(crate) struct ConstAndCoroutine {
     pub coroutine_kind: &'static str,
 }
 
-#[derive(Diagnostic)]
-#[diag("functions cannot be both `const` and C-variadic")]
-pub(crate) struct ConstAndCVariadic {
-    #[primary_span]
-    pub spans: Vec,
-    #[label("`const` because of this")]
-    pub const_span: Span,
-    #[label("C-variadic because of this")]
-    pub variadic_span: Span,
-}
-
 #[derive(Diagnostic)]
 #[diag("functions cannot be both `{$coroutine_kind}` and C-variadic")]
 pub(crate) struct CoroutineAndCVariadic {
diff --git a/tests/ui/parser/variadic-ffi-semantic-restrictions.rs b/tests/ui/parser/variadic-ffi-semantic-restrictions.rs
index 6f61425a8bd6..41d9e73b69e8 100644
--- a/tests/ui/parser/variadic-ffi-semantic-restrictions.rs
+++ b/tests/ui/parser/variadic-ffi-semantic-restrictions.rs
@@ -31,17 +31,14 @@ extern "C" fn f3_3(_: ..., x: isize) {}
 //~^ ERROR `...` must be the last argument of a C-variadic function
 
 const unsafe extern "C" fn f4_1(x: isize, _: ...) {}
-//~^ ERROR functions cannot be both `const` and C-variadic
-//~| ERROR destructor of `VaList<'_>` cannot be evaluated at compile-time
+//~^ ERROR destructor of `VaList<'_>` cannot be evaluated at compile-time
 
 const extern "C" fn f4_2(x: isize, _: ...) {}
-//~^ ERROR functions cannot be both `const` and C-variadic
-//~| ERROR functions with a C variable argument list must be unsafe
+//~^ ERROR functions with a C variable argument list must be unsafe
 //~| ERROR destructor of `VaList<'_>` cannot be evaluated at compile-time
 
 const extern "C" fn f4_3(_: ..., x: isize, _: ...) {}
-//~^ ERROR functions cannot be both `const` and C-variadic
-//~| ERROR functions with a C variable argument list must be unsafe
+//~^ ERROR functions with a C variable argument list must be unsafe
 //~| ERROR `...` must be the last argument of a C-variadic function
 
 extern "C" {
@@ -64,7 +61,6 @@ impl X {
     //~| ERROR `...` must be the last argument of a C-variadic function
     const fn i_f5(x: isize, _: ...) {}
     //~^ ERROR `...` is not supported for non-extern functions
-    //~| ERROR functions cannot be both `const` and C-variadic
     //~| ERROR destructor of `VaList<'_>` cannot be evaluated at compile-time
 }
 
diff --git a/tests/ui/parser/variadic-ffi-semantic-restrictions.stderr b/tests/ui/parser/variadic-ffi-semantic-restrictions.stderr
index 318015737fa1..20a182b8c49f 100644
--- a/tests/ui/parser/variadic-ffi-semantic-restrictions.stderr
+++ b/tests/ui/parser/variadic-ffi-semantic-restrictions.stderr
@@ -80,20 +80,8 @@ error: `...` must be the last argument of a C-variadic function
 LL | extern "C" fn f3_3(_: ..., x: isize) {}
    |                    ^^^^^^
 
-error: functions cannot be both `const` and C-variadic
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:33:1
-   |
-LL | const unsafe extern "C" fn f4_1(x: isize, _: ...) {}
-   | ^^^^^ `const` because of this             ^^^^^^ C-variadic because of this
-
-error: functions cannot be both `const` and C-variadic
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:37:1
-   |
-LL | const extern "C" fn f4_2(x: isize, _: ...) {}
-   | ^^^^^ `const` because of this      ^^^^^^ C-variadic because of this
-
 error: functions with a C variable argument list must be unsafe
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:37:36
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:36:36
    |
 LL | const extern "C" fn f4_2(x: isize, _: ...) {}
    |                                    ^^^^^^
@@ -104,19 +92,13 @@ LL | const unsafe extern "C" fn f4_2(x: isize, _: ...) {}
    |       ++++++
 
 error: `...` must be the last argument of a C-variadic function
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:42:26
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:40:26
    |
 LL | const extern "C" fn f4_3(_: ..., x: isize, _: ...) {}
    |                          ^^^^^^
 
-error: functions cannot be both `const` and C-variadic
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:42:1
-   |
-LL | const extern "C" fn f4_3(_: ..., x: isize, _: ...) {}
-   | ^^^^^ `const` because of this              ^^^^^^ C-variadic because of this
-
 error: functions with a C variable argument list must be unsafe
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:42:44
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:40:44
    |
 LL | const extern "C" fn f4_3(_: ..., x: isize, _: ...) {}
    |                                            ^^^^^^
@@ -127,13 +109,13 @@ LL | const unsafe extern "C" fn f4_3(_: ..., x: isize, _: ...) {}
    |       ++++++
 
 error: `...` must be the last argument of a C-variadic function
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:48:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:45:13
    |
 LL |     fn e_f2(..., x: isize);
    |             ^^^
 
 error: `...` is not supported for non-extern functions
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:55:23
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:52:23
    |
 LL |     fn i_f1(x: isize, _: ...) {}
    |                       ^^^^^^
@@ -141,7 +123,7 @@ LL |     fn i_f1(x: isize, _: ...) {}
    = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
 error: `...` is not supported for non-extern functions
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:57:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:54:13
    |
 LL |     fn i_f2(_: ...) {}
    |             ^^^^^^
@@ -149,13 +131,13 @@ LL |     fn i_f2(_: ...) {}
    = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
 error: `...` must be the last argument of a C-variadic function
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:59:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:56:13
    |
 LL |     fn i_f3(_: ..., x: isize, _: ...) {}
    |             ^^^^^^
 
 error: `...` is not supported for non-extern functions
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:59:31
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:56:31
    |
 LL |     fn i_f3(_: ..., x: isize, _: ...) {}
    |                               ^^^^^^
@@ -163,29 +145,21 @@ LL |     fn i_f3(_: ..., x: isize, _: ...) {}
    = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
 error: `...` must be the last argument of a C-variadic function
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:62:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:59:13
    |
 LL |     fn i_f4(_: ..., x: isize, _: ...) {}
    |             ^^^^^^
 
 error: `...` is not supported for non-extern functions
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:62:31
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:59:31
    |
 LL |     fn i_f4(_: ..., x: isize, _: ...) {}
    |                               ^^^^^^
    |
    = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
-error: functions cannot be both `const` and C-variadic
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:65:5
-   |
-LL |     const fn i_f5(x: isize, _: ...) {}
-   |     ^^^^^                   ^^^^^^ C-variadic because of this
-   |     |
-   |     `const` because of this
-
 error: `...` is not supported for non-extern functions
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:65:29
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:62:29
    |
 LL |     const fn i_f5(x: isize, _: ...) {}
    |                             ^^^^^^
@@ -193,7 +167,7 @@ LL |     const fn i_f5(x: isize, _: ...) {}
    = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
 error: `...` is not supported for non-extern functions
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:72:23
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:68:23
    |
 LL |     fn t_f1(x: isize, _: ...) {}
    |                       ^^^^^^
@@ -201,7 +175,7 @@ LL |     fn t_f1(x: isize, _: ...) {}
    = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
 error: `...` is not supported for non-extern functions
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:74:23
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:70:23
    |
 LL |     fn t_f2(x: isize, _: ...);
    |                       ^^^^^^
@@ -209,7 +183,7 @@ LL |     fn t_f2(x: isize, _: ...);
    = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
 error: `...` is not supported for non-extern functions
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:76:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:72:13
    |
 LL |     fn t_f3(_: ...) {}
    |             ^^^^^^
@@ -217,7 +191,7 @@ LL |     fn t_f3(_: ...) {}
    = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
 error: `...` is not supported for non-extern functions
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:78:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:74:13
    |
 LL |     fn t_f4(_: ...);
    |             ^^^^^^
@@ -225,13 +199,13 @@ LL |     fn t_f4(_: ...);
    = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
 error: `...` must be the last argument of a C-variadic function
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:80:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:76:13
    |
 LL |     fn t_f5(_: ..., x: isize) {}
    |             ^^^^^^
 
 error: `...` must be the last argument of a C-variadic function
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:82:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:78:13
    |
 LL |     fn t_f6(_: ..., x: isize);
    |             ^^^^^^
@@ -245,7 +219,7 @@ LL | const unsafe extern "C" fn f4_1(x: isize, _: ...) {}
    |                                           the destructor for this type cannot be evaluated in constant functions
 
 error[E0493]: destructor of `VaList<'_>` cannot be evaluated at compile-time
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:37:36
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:36:36
    |
 LL | const extern "C" fn f4_2(x: isize, _: ...) {}
    |                                    ^        - value is dropped here
@@ -253,13 +227,13 @@ LL | const extern "C" fn f4_2(x: isize, _: ...) {}
    |                                    the destructor for this type cannot be evaluated in constant functions
 
 error[E0493]: destructor of `VaList<'_>` cannot be evaluated at compile-time
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:65:29
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:62:29
    |
 LL |     const fn i_f5(x: isize, _: ...) {}
    |                             ^        - value is dropped here
    |                             |
    |                             the destructor for this type cannot be evaluated in constant functions
 
-error: aborting due to 33 previous errors
+error: aborting due to 29 previous errors
 
 For more information about this error, try `rustc --explain E0493`.

From ce693807f66a5dc7ee269b0b73860c5f0796eb19 Mon Sep 17 00:00:00 2001
From: Folkert de Vries 
Date: Fri, 2 Jan 2026 16:02:28 +0100
Subject: [PATCH 179/265] make `Va::arg` and `VaList::drop` `const fn`s

---
 library/core/src/ffi/va_list.rs                      |  6 ++++--
 library/core/src/intrinsics/mod.rs                   |  4 ++--
 .../parser/variadic-ffi-semantic-restrictions.stderr | 12 ++++++++++++
 3 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/library/core/src/ffi/va_list.rs b/library/core/src/ffi/va_list.rs
index d0f155316a10..a761b24895cf 100644
--- a/library/core/src/ffi/va_list.rs
+++ b/library/core/src/ffi/va_list.rs
@@ -216,7 +216,8 @@ impl Clone for VaList<'_> {
     }
 }
 
-impl<'f> Drop for VaList<'f> {
+#[rustc_const_unstable(feature = "c_variadic_const", issue = "none")]
+impl<'f> const Drop for VaList<'f> {
     fn drop(&mut self) {
         // SAFETY: this variable argument list is being dropped, so won't be read from again.
         unsafe { va_end(self) }
@@ -291,7 +292,8 @@ impl<'f> VaList<'f> {
     ///
     /// [valid]: https://doc.rust-lang.org/nightly/nomicon/what-unsafe-does.html
     #[inline]
-    pub unsafe fn arg(&mut self) -> T {
+    #[rustc_const_unstable(feature = "c_variadic_const", issue = "none")]
+    pub const unsafe fn arg(&mut self) -> T {
         // SAFETY: the caller must uphold the safety contract for `va_arg`.
         unsafe { va_arg(self) }
     }
diff --git a/library/core/src/intrinsics/mod.rs b/library/core/src/intrinsics/mod.rs
index 3ddea90652d1..4aacafb75bd2 100644
--- a/library/core/src/intrinsics/mod.rs
+++ b/library/core/src/intrinsics/mod.rs
@@ -3472,7 +3472,7 @@ pub(crate) const fn miri_promise_symbolic_alignment(ptr: *const (), align: usize
 ///
 #[rustc_intrinsic]
 #[rustc_nounwind]
-pub unsafe fn va_arg(ap: &mut VaList<'_>) -> T;
+pub const unsafe fn va_arg(ap: &mut VaList<'_>) -> T;
 
 /// Duplicates a variable argument list. The returned list is initially at the same position as
 /// the one in `src`, but can be advanced independently.
@@ -3503,6 +3503,6 @@ pub fn va_copy<'f>(src: &VaList<'f>) -> VaList<'f> {
 ///
 #[rustc_intrinsic]
 #[rustc_nounwind]
-pub unsafe fn va_end(ap: &mut VaList<'_>) {
+pub const unsafe fn va_end(ap: &mut VaList<'_>) {
     /* deliberately does nothing */
 }
diff --git a/tests/ui/parser/variadic-ffi-semantic-restrictions.stderr b/tests/ui/parser/variadic-ffi-semantic-restrictions.stderr
index 20a182b8c49f..26d5cdaf995a 100644
--- a/tests/ui/parser/variadic-ffi-semantic-restrictions.stderr
+++ b/tests/ui/parser/variadic-ffi-semantic-restrictions.stderr
@@ -217,6 +217,10 @@ LL | const unsafe extern "C" fn f4_1(x: isize, _: ...) {}
    |                                           ^        - value is dropped here
    |                                           |
    |                                           the destructor for this type cannot be evaluated in constant functions
+   |
+   = note: see issue #133214  for more information
+   = help: add `#![feature(const_destruct)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0493]: destructor of `VaList<'_>` cannot be evaluated at compile-time
   --> $DIR/variadic-ffi-semantic-restrictions.rs:36:36
@@ -225,6 +229,10 @@ LL | const extern "C" fn f4_2(x: isize, _: ...) {}
    |                                    ^        - value is dropped here
    |                                    |
    |                                    the destructor for this type cannot be evaluated in constant functions
+   |
+   = note: see issue #133214  for more information
+   = help: add `#![feature(const_destruct)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0493]: destructor of `VaList<'_>` cannot be evaluated at compile-time
   --> $DIR/variadic-ffi-semantic-restrictions.rs:62:29
@@ -233,6 +241,10 @@ LL |     const fn i_f5(x: isize, _: ...) {}
    |                             ^        - value is dropped here
    |                             |
    |                             the destructor for this type cannot be evaluated in constant functions
+   |
+   = note: see issue #133214  for more information
+   = help: add `#![feature(const_destruct)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error: aborting due to 29 previous errors
 

From 02c4af397e3a15cfde560907c3a541a438a4e70e Mon Sep 17 00:00:00 2001
From: Folkert de Vries 
Date: Fri, 2 Jan 2026 16:10:28 +0100
Subject: [PATCH 180/265] c-variadic functions in `rustc_const_eval`

---
 .../src/const_eval/machine.rs                 |   4 +-
 compiler/rustc_const_eval/src/errors.rs       |   4 +
 .../rustc_const_eval/src/interpret/call.rs    |  78 ++++-
 .../src/interpret/intrinsics.rs               | 112 +++++-
 .../rustc_const_eval/src/interpret/memory.rs  |  49 ++-
 .../rustc_const_eval/src/interpret/stack.rs   |  33 +-
 .../rustc_middle/src/mir/interpret/error.rs   |   4 +
 .../rustc_middle/src/mir/interpret/mod.rs     |   2 +-
 library/core/src/ffi/va_list.rs               |   7 +-
 library/core/src/intrinsics/mod.rs            |   2 +-
 src/tools/miri/src/alloc_addresses/mod.rs     |   6 +-
 .../src/borrow_tracker/stacked_borrows/mod.rs |   8 +-
 .../src/borrow_tracker/tree_borrows/mod.rs    |   6 +-
 tests/ui/consts/const-eval/c-variadic-fail.rs | 147 ++++++++
 .../consts/const-eval/c-variadic-fail.stderr  | 324 ++++++++++++++++++
 tests/ui/consts/const-eval/c-variadic.rs      | 155 +++++++++
 16 files changed, 908 insertions(+), 33 deletions(-)
 create mode 100644 tests/ui/consts/const-eval/c-variadic-fail.rs
 create mode 100644 tests/ui/consts/const-eval/c-variadic-fail.stderr
 create mode 100644 tests/ui/consts/const-eval/c-variadic.rs

diff --git a/compiler/rustc_const_eval/src/const_eval/machine.rs b/compiler/rustc_const_eval/src/const_eval/machine.rs
index e017362b8c4b..8c182186db89 100644
--- a/compiler/rustc_const_eval/src/const_eval/machine.rs
+++ b/compiler/rustc_const_eval/src/const_eval/machine.rs
@@ -9,7 +9,7 @@ use rustc_errors::msg;
 use rustc_hir::def_id::{DefId, LocalDefId};
 use rustc_hir::{self as hir, CRATE_HIR_ID, LangItem};
 use rustc_middle::mir::AssertMessage;
-use rustc_middle::mir::interpret::{Pointer, ReportedErrorInfo};
+use rustc_middle::mir::interpret::ReportedErrorInfo;
 use rustc_middle::query::TyCtxtAt;
 use rustc_middle::ty::layout::{HasTypingEnv, TyAndLayout, ValidityRequirement};
 use rustc_middle::ty::{self, Ty, TyCtxt};
@@ -22,7 +22,7 @@ use super::error::*;
 use crate::errors::{LongRunning, LongRunningWarn};
 use crate::interpret::{
     self, AllocId, AllocInit, AllocRange, ConstAllocation, CtfeProvenance, FnArg, Frame,
-    GlobalAlloc, ImmTy, InterpCx, InterpResult, OpTy, PlaceTy, RangeSet, Scalar,
+    GlobalAlloc, ImmTy, InterpCx, InterpResult, OpTy, PlaceTy, Pointer, RangeSet, Scalar,
     compile_time_machine, err_inval, interp_ok, throw_exhaust, throw_inval, throw_ub,
     throw_ub_custom, throw_unsup, throw_unsup_format,
 };
diff --git a/compiler/rustc_const_eval/src/errors.rs b/compiler/rustc_const_eval/src/errors.rs
index b477c998a278..9de7d02184b3 100644
--- a/compiler/rustc_const_eval/src/errors.rs
+++ b/compiler/rustc_const_eval/src/errors.rs
@@ -757,6 +757,7 @@ impl<'a> ReportErrorExt for UndefinedBehaviorInfo<'a> {
             WriteToReadOnly(_) => msg!("writing to {$allocation} which is read-only"),
             DerefFunctionPointer(_) => msg!("accessing {$allocation} which contains a function"),
             DerefVTablePointer(_) => msg!("accessing {$allocation} which contains a vtable"),
+            DerefVaListPointer(_) => msg!("accessing {$allocation} which contains a variable argument list"),
             DerefTypeIdPointer(_) => msg!("accessing {$allocation} which contains a `TypeId`"),
             InvalidBool(_) => msg!("interpreting an invalid 8-bit value as a bool: 0x{$value}"),
             InvalidChar(_) => msg!("interpreting an invalid 32-bit value as a char: 0x{$value}"),
@@ -776,6 +777,7 @@ impl<'a> ReportErrorExt for UndefinedBehaviorInfo<'a> {
             }
             AbiMismatchArgument { .. } => msg!("calling a function whose parameter #{$arg_idx} has type {$callee_ty} passing argument of type {$caller_ty}"),
             AbiMismatchReturn { .. } => msg!("calling a function with return type {$callee_ty} passing return place of type {$caller_ty}"),
+            VaArgOutOfBounds => "more C-variadic arguments read than were passed".into(),
         }
     }
 
@@ -800,6 +802,7 @@ impl<'a> ReportErrorExt for UndefinedBehaviorInfo<'a> {
             | InvalidMeta(InvalidMetaKind::TooBig)
             | InvalidUninitBytes(None)
             | DeadLocal
+            | VaArgOutOfBounds
             | UninhabitedEnumVariantWritten(_)
             | UninhabitedEnumVariantRead(_) => {}
 
@@ -874,6 +877,7 @@ impl<'a> ReportErrorExt for UndefinedBehaviorInfo<'a> {
             WriteToReadOnly(alloc)
             | DerefFunctionPointer(alloc)
             | DerefVTablePointer(alloc)
+            | DerefVaListPointer(alloc)
             | DerefTypeIdPointer(alloc) => {
                 diag.arg("allocation", alloc);
             }
diff --git a/compiler/rustc_const_eval/src/interpret/call.rs b/compiler/rustc_const_eval/src/interpret/call.rs
index b17740f57f78..3efac883b9c4 100644
--- a/compiler/rustc_const_eval/src/interpret/call.rs
+++ b/compiler/rustc_const_eval/src/interpret/call.rs
@@ -4,7 +4,7 @@
 use std::borrow::Cow;
 
 use either::{Left, Right};
-use rustc_abi::{self as abi, ExternAbi, FieldIdx, Integer, VariantIdx};
+use rustc_abi::{self as abi, ExternAbi, FieldIdx, HasDataLayout, Integer, Size, VariantIdx};
 use rustc_data_structures::assert_matches;
 use rustc_errors::msg;
 use rustc_hir::def_id::DefId;
@@ -17,9 +17,9 @@ use tracing::field::Empty;
 use tracing::{info, instrument, trace};
 
 use super::{
-    CtfeProvenance, FnVal, ImmTy, InterpCx, InterpResult, MPlaceTy, Machine, OpTy, PlaceTy,
-    Projectable, Provenance, ReturnAction, ReturnContinuation, Scalar, StackPopInfo, interp_ok,
-    throw_ub, throw_ub_custom, throw_unsup_format,
+    CtfeProvenance, FnVal, ImmTy, InterpCx, InterpResult, MPlaceTy, Machine, MemoryKind, OpTy,
+    PlaceTy, Projectable, Provenance, ReturnAction, ReturnContinuation, Scalar, StackPopInfo,
+    interp_ok, throw_ub, throw_ub_custom,
 };
 use crate::enter_trace_span;
 use crate::interpret::EnteredTraceSpan;
@@ -354,12 +354,22 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
     ) -> InterpResult<'tcx> {
         let _trace = enter_trace_span!(M, step::init_stack_frame, %instance, tracing_separate_thread = Empty);
 
-        // Compute callee information.
-        // FIXME: for variadic support, do we have to somehow determine callee's extra_args?
-        let callee_fn_abi = self.fn_abi_of_instance(instance, ty::List::empty())?;
+        let (fixed_count, c_variadic_args) = if caller_fn_abi.c_variadic {
+            let sig = self.tcx.fn_sig(instance.def_id()).skip_binder();
+            let fixed_count = sig.inputs().skip_binder().len();
+            assert!(caller_fn_abi.args.len() >= fixed_count);
+            let extra_tys: Vec> =
+                caller_fn_abi.args[fixed_count..].iter().map(|arg_abi| arg_abi.layout.ty).collect();
 
-        if callee_fn_abi.c_variadic || caller_fn_abi.c_variadic {
-            throw_unsup_format!("calling a c-variadic function is not supported");
+            (fixed_count, self.tcx.mk_type_list(&extra_tys))
+        } else {
+            (caller_fn_abi.args.len(), ty::List::empty())
+        };
+
+        let callee_fn_abi = self.fn_abi_of_instance(instance, c_variadic_args)?;
+
+        if callee_fn_abi.c_variadic ^ caller_fn_abi.c_variadic {
+            unreachable!("caller and callee disagree on being c-variadic");
         }
 
         if caller_fn_abi.conv != callee_fn_abi.conv {
@@ -443,8 +453,14 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
             // this is a single iterator (that handles `spread_arg`), then
             // `pass_argument` would be the loop body. It takes care to
             // not advance `caller_iter` for ignored arguments.
-            let mut callee_args_abis = callee_fn_abi.args.iter().enumerate();
-            for local in body.args_iter() {
+            let mut callee_args_abis = if caller_fn_abi.c_variadic {
+                callee_fn_abi.args[..fixed_count].iter().enumerate()
+            } else {
+                callee_fn_abi.args.iter().enumerate()
+            };
+
+            let mut it = body.args_iter().peekable();
+            while let Some(local) = it.next() {
                 // Construct the destination place for this argument. At this point all
                 // locals are still dead, so we cannot construct a `PlaceTy`.
                 let dest = mir::Place::from(local);
@@ -452,7 +468,45 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
                 // type, but the result gets cached so this avoids calling the instantiation
                 // query *again* the next time this local is accessed.
                 let ty = self.layout_of_local(self.frame(), local, None)?.ty;
-                if Some(local) == body.spread_arg {
+                if caller_fn_abi.c_variadic && it.peek().is_none() {
+                    // The callee's signature has an additional VaList argument, that the caller
+                    // won't actually pass. Here we synthesize a `VaList` value, whose leading bytes
+                    // are a pointer that can be mapped to the corresponding variable argument list.
+                    self.storage_live(local)?;
+
+                    let place = self.eval_place(dest)?;
+                    let mplace = self.force_allocation(&place)?;
+
+                    // Consume the remaining arguments and store them in a global allocation.
+                    let mut varargs = Vec::new();
+                    for (fn_arg, abi) in &mut caller_args {
+                        let op = self.copy_fn_arg(fn_arg);
+                        let mplace = self.allocate(abi.layout, MemoryKind::Stack)?;
+                        self.copy_op(&op, &mplace)?;
+
+                        varargs.push(mplace);
+                    }
+
+                    // When the frame is dropped, this ID is used to deallocate the variable arguments list.
+                    self.frame_mut().va_list = varargs.clone();
+
+                    // This is a new VaList, so start at index 0.
+                    let ptr = self.va_list_ptr(varargs, 0);
+                    let addr = Scalar::from_pointer(ptr, self);
+
+                    // Zero the mplace, so it is fully initialized.
+                    self.write_bytes_ptr(
+                        mplace.ptr(),
+                        (0..mplace.layout.size.bytes()).map(|_| 0u8),
+                    )?;
+
+                    // Store the pointer to the global variable arguments list allocation in the
+                    // first bytes of the `VaList` value.
+                    let mut alloc = self
+                        .get_ptr_alloc_mut(mplace.ptr(), self.data_layout().pointer_size())?
+                        .expect("not a ZST");
+                    alloc.write_ptr_sized(Size::ZERO, addr)?;
+                } else if Some(local) == body.spread_arg {
                     // Make the local live once, then fill in the value field by field.
                     self.storage_live(local)?;
                     // Must be a tuple
diff --git a/compiler/rustc_const_eval/src/interpret/intrinsics.rs b/compiler/rustc_const_eval/src/interpret/intrinsics.rs
index c9a3b578e793..aa7c889b3f3f 100644
--- a/compiler/rustc_const_eval/src/interpret/intrinsics.rs
+++ b/compiler/rustc_const_eval/src/interpret/intrinsics.rs
@@ -24,7 +24,7 @@ use super::util::ensure_monomorphic_enough;
 use super::{
     AllocId, CheckInAllocMsg, ImmTy, InterpCx, InterpResult, Machine, OpTy, PlaceTy, Pointer,
     PointerArithmetic, Provenance, Scalar, err_ub_custom, err_unsup_format, interp_ok, throw_inval,
-    throw_ub_custom, throw_ub_format,
+    throw_ub, throw_ub_custom, throw_ub_format, throw_unsup_format,
 };
 use crate::interpret::Writeable;
 
@@ -750,6 +750,116 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
                 self.float_muladd_intrinsic::(args, dest, MulAddType::Nondeterministic)?
             }
 
+            sym::va_copy => {
+                // fn va_copy<'f>(src: &VaList<'f>) -> VaList<'f>
+                let src_ptr = self.read_pointer(&args[0])?;
+
+                // Read the token pointer from the src VaList (alloc_id + offset-as-index).
+                let src_va_list_ptr = {
+                    let pointer_size = tcx.data_layout.pointer_size();
+                    let alloc = self
+                        .get_ptr_alloc(src_ptr, pointer_size)?
+                        .expect("va_list storage should not be a ZST");
+                    let scalar = alloc.read_pointer(Size::ZERO)?;
+                    scalar.to_pointer(self)?
+                };
+
+                let (prov, offset) = src_va_list_ptr.into_raw_parts();
+                let src_alloc_id = prov.unwrap().get_alloc_id().unwrap();
+                let index = offset.bytes();
+
+                // Look up arguments without consuming src.
+                let Some(arguments) = self.get_va_list_alloc(src_alloc_id) else {
+                    throw_unsup_format!("va_copy on unknown va_list allocation {:?}", src_alloc_id);
+                };
+
+                // Create a new allocation pointing at the same index.
+                let new_va_list_ptr = self.va_list_ptr(arguments.to_vec(), index);
+                let addr = Scalar::from_pointer(new_va_list_ptr, self);
+
+                // Now overwrite the token pointer stored inside the VaList.
+                let mplace = self.force_allocation(dest)?;
+                let mut alloc = self.get_place_alloc_mut(&mplace)?.unwrap();
+                alloc.write_ptr_sized(Size::ZERO, addr)?;
+            }
+
+            sym::va_end => {
+                let ptr_size = self.tcx.data_layout.pointer_size();
+
+                // The only argument is a `&mut VaList`.
+                let ap_ref = self.read_pointer(&args[0])?;
+
+                // The first bytes of the `VaList` value store a pointer. The `AllocId` of this
+                // pointer is a key into a global map of variable argument lists. The offset is
+                // used as the index of the argument to read.
+                let va_list_ptr = {
+                    let alloc = self
+                        .get_ptr_alloc(ap_ref, ptr_size)?
+                        .expect("va_list storage should not be a ZST");
+                    let scalar = alloc.read_pointer(Size::ZERO)?;
+                    scalar.to_pointer(self)?
+                };
+
+                let (prov, _offset) = va_list_ptr.into_raw_parts();
+                let alloc_id = prov.unwrap().get_alloc_id().unwrap();
+
+                let Some(_) = self.remove_va_list_alloc(alloc_id) else {
+                    throw_unsup_format!("va_end on unknown va_list allocation {:?}", alloc_id)
+                };
+            }
+
+            sym::va_arg => {
+                let ptr_size = self.tcx.data_layout.pointer_size();
+
+                // The only argument is a `&mut VaList`.
+                let ap_ref = self.read_pointer(&args[0])?;
+
+                // The first bytes of the `VaList` value store a pointer. The `AllocId` of this
+                // pointer is a key into a global map of variable argument lists. The offset is
+                // used as the index of the argument to read.
+                let va_list_ptr = {
+                    let alloc = self
+                        .get_ptr_alloc(ap_ref, ptr_size)?
+                        .expect("va_list storage should not be a ZST");
+                    let scalar = alloc.read_pointer(Size::ZERO)?;
+                    scalar.to_pointer(self)?
+                };
+
+                let (prov, offset) = va_list_ptr.into_raw_parts();
+                let alloc_id = prov.unwrap().get_alloc_id().unwrap();
+                let index = offset.bytes();
+
+                let Some(varargs) = self.remove_va_list_alloc(alloc_id) else {
+                    throw_unsup_format!("va_arg on unknown va_list allocation {:?}", alloc_id)
+                };
+
+                let Some(src_mplace) = varargs.get(offset.bytes_usize()).cloned() else {
+                    throw_ub!(VaArgOutOfBounds)
+                };
+
+                // Update the offset in this `VaList` value so that a subsequent call to `va_arg`
+                // reads the next argument.
+                let new_va_list_ptr = self.va_list_ptr(varargs, index + 1);
+                let addr = Scalar::from_pointer(new_va_list_ptr, self);
+                let mut alloc = self
+                    .get_ptr_alloc_mut(ap_ref, ptr_size)?
+                    .expect("va_list storage should not be a ZST");
+                alloc.write_ptr_sized(Size::ZERO, addr)?;
+
+                // NOTE: In C some type conversions are allowed (e.g. casting between signed and
+                // unsigned integers). For now we require c-variadic arguments to be read with the
+                // exact type they were passed as.
+                if src_mplace.layout.ty != dest.layout.ty {
+                    throw_unsup_format!(
+                        "va_arg type mismatch: requested `{}`, but next argument is `{}`",
+                        dest.layout.ty,
+                        src_mplace.layout.ty
+                    );
+                }
+
+                self.copy_op(&src_mplace, dest)?;
+            }
+
             // Unsupported intrinsic: skip the return_to_block below.
             _ => return interp_ok(false),
         }
diff --git a/compiler/rustc_const_eval/src/interpret/memory.rs b/compiler/rustc_const_eval/src/interpret/memory.rs
index 0049feee523c..aadbe84ca809 100644
--- a/compiler/rustc_const_eval/src/interpret/memory.rs
+++ b/compiler/rustc_const_eval/src/interpret/memory.rs
@@ -23,8 +23,8 @@ use tracing::{debug, instrument, trace};
 
 use super::{
     AllocBytes, AllocId, AllocInit, AllocMap, AllocRange, Allocation, CheckAlignMsg,
-    CheckInAllocMsg, CtfeProvenance, GlobalAlloc, InterpCx, InterpResult, Machine, MayLeak,
-    Misalignment, Pointer, PointerArithmetic, Provenance, Scalar, alloc_range, err_ub,
+    CheckInAllocMsg, CtfeProvenance, GlobalAlloc, InterpCx, InterpResult, MPlaceTy, Machine,
+    MayLeak, Misalignment, Pointer, PointerArithmetic, Provenance, Scalar, alloc_range, err_ub,
     err_ub_custom, interp_ok, throw_ub, throw_ub_custom, throw_unsup, throw_unsup_format,
 };
 use crate::const_eval::ConstEvalErrKind;
@@ -67,6 +67,8 @@ pub enum AllocKind {
     LiveData,
     /// A function allocation (that fn ptrs point to).
     Function,
+    /// A variable argument list allocation (used by c-variadic functions).
+    VaList,
     /// A vtable allocation.
     VTable,
     /// A TypeId allocation.
@@ -126,6 +128,9 @@ pub struct Memory<'tcx, M: Machine<'tcx>> {
     /// Map for "extra" function pointers.
     extra_fn_ptr_map: FxIndexMap,
 
+    /// Map storing variable argument lists.
+    va_list_map: FxIndexMap>>,
+
     /// To be able to compare pointers with null, and to check alignment for accesses
     /// to ZSTs (where pointers may dangle), we keep track of the size even for allocations
     /// that do not exist any more.
@@ -161,6 +166,7 @@ impl<'tcx, M: Machine<'tcx>> Memory<'tcx, M> {
         Memory {
             alloc_map: M::MemoryMap::default(),
             extra_fn_ptr_map: FxIndexMap::default(),
+            va_list_map: FxIndexMap::default(),
             dead_alloc_map: FxIndexMap::default(),
             validation_in_progress: Cell::new(false),
         }
@@ -199,9 +205,11 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
                 return M::extern_static_pointer(self, def_id);
             }
             None => {
+                let is_fn_ptr = self.memory.extra_fn_ptr_map.contains_key(&alloc_id);
+                let is_va_list = self.memory.va_list_map.contains_key(&alloc_id);
                 assert!(
-                    self.memory.extra_fn_ptr_map.contains_key(&alloc_id),
-                    "{alloc_id:?} is neither global nor a function pointer"
+                    is_fn_ptr || is_va_list,
+                    "{alloc_id:?} is neither global, va_list nor a function pointer"
                 );
             }
             _ => {}
@@ -229,6 +237,21 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
         self.global_root_pointer(Pointer::from(id)).unwrap()
     }
 
+    pub fn va_list_ptr(
+        &mut self,
+        varargs: Vec>,
+        index: u64,
+    ) -> Pointer {
+        let id = self.tcx.reserve_alloc_id();
+        let old = self.memory.va_list_map.insert(id, varargs);
+        assert!(old.is_none());
+        // The offset is used to store the current index.
+        let ptr = Pointer::new(id.into(), Size::from_bytes(index));
+        // Variable argument lists are global allocations, so make sure we get the right root
+        // pointer. We know this is not an `extern static` so this cannot fail.
+        self.global_root_pointer(ptr).unwrap()
+    }
+
     pub fn allocate_ptr(
         &mut self,
         size: Size,
@@ -956,6 +979,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
     pub fn is_alloc_live(&self, id: AllocId) -> bool {
         self.memory.alloc_map.contains_key_ref(&id)
             || self.memory.extra_fn_ptr_map.contains_key(&id)
+            || self.memory.va_list_map.contains_key(&id)
             // We check `tcx` last as that has to acquire a lock in `many-seeds` mode.
             // This also matches the order in `get_alloc_info`.
             || self.tcx.try_get_global_alloc(id).is_some()
@@ -995,6 +1019,11 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
             return AllocInfo::new(Size::ZERO, align, AllocKind::Function, Mutability::Not);
         }
 
+        // # Variable argument lists
+        if let Some(_) = self.get_va_list_alloc(id) {
+            return AllocInfo::new(Size::ZERO, Align::ONE, AllocKind::VaList, Mutability::Not);
+        }
+
         // # Global allocations
         if let Some(global_alloc) = self.tcx.try_get_global_alloc(id) {
             // NOTE: `static` alignment from attributes has already been applied to the allocation.
@@ -1042,6 +1071,18 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
         }
     }
 
+    pub fn get_va_list_alloc(&self, id: AllocId) -> Option<&[MPlaceTy<'tcx, M::Provenance>]> {
+        self.memory.va_list_map.get(&id).map(|v| &**v)
+    }
+
+    pub fn remove_va_list_alloc(
+        &mut self,
+        id: AllocId,
+    ) -> Option>> {
+        self.memory.dead_alloc_map.insert(id, (Size::ZERO, Align::ONE));
+        self.memory.va_list_map.swap_remove(&id)
+    }
+
     /// Takes a pointer that is the first chunk of a `TypeId` and return the type that its
     /// provenance refers to, as well as the segment of the hash that this pointer covers.
     pub fn get_ptr_type_id(
diff --git a/compiler/rustc_const_eval/src/interpret/stack.rs b/compiler/rustc_const_eval/src/interpret/stack.rs
index 1c1c59da9d88..9b2d99bb297f 100644
--- a/compiler/rustc_const_eval/src/interpret/stack.rs
+++ b/compiler/rustc_const_eval/src/interpret/stack.rs
@@ -16,9 +16,9 @@ use tracing::field::Empty;
 use tracing::{info_span, instrument, trace};
 
 use super::{
-    AllocId, CtfeProvenance, Immediate, InterpCx, InterpResult, Machine, MemPlace, MemPlaceMeta,
-    MemoryKind, Operand, PlaceTy, Pointer, Provenance, ReturnAction, Scalar, from_known_layout,
-    interp_ok, throw_ub, throw_unsup,
+    AllocId, CtfeProvenance, Immediate, InterpCx, InterpResult, MPlaceTy, Machine, MemPlace,
+    MemPlaceMeta, MemoryKind, Operand, PlaceTy, Pointer, Provenance, ReturnAction, Scalar,
+    from_known_layout, interp_ok, throw_ub, throw_unsup,
 };
 use crate::{enter_trace_span, errors};
 
@@ -91,6 +91,10 @@ pub struct Frame<'tcx, Prov: Provenance = CtfeProvenance, Extra = ()> {
     /// Do *not* access this directly; always go through the machine hook!
     pub locals: IndexVec>,
 
+    /// The complete variable argument list of this frame. Its elements must be dropped when the
+    /// frame is popped.
+    pub(super) va_list: Vec>,
+
     /// The span of the `tracing` crate is stored here.
     /// When the guard is dropped, the span is exited. This gives us
     /// a full stack trace on all tracing statements.
@@ -259,6 +263,7 @@ impl<'tcx, Prov: Provenance> Frame<'tcx, Prov> {
             return_cont: self.return_cont,
             return_place: self.return_place,
             locals: self.locals,
+            va_list: self.va_list,
             loc: self.loc,
             extra,
             tracing_span: self.tracing_span,
@@ -377,6 +382,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
             return_cont,
             return_place: return_place.clone(),
             locals,
+            va_list: vec![],
             instance,
             tracing_span: SpanGuard::new(),
             extra: (),
@@ -454,6 +460,11 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
                 self.deallocate_local(local.value)?;
             }
 
+            // Deallocate any c-variadic arguments.
+            for mplace in &frame.va_list {
+                self.deallocate_vararg(mplace)?;
+            }
+
             // Call the machine hook, which determines the next steps.
             let return_action = M::after_stack_pop(self, frame, unwinding)?;
             assert_ne!(return_action, ReturnAction::NoCleanup);
@@ -599,6 +610,22 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
         interp_ok(())
     }
 
+    fn deallocate_vararg(&mut self, vararg: &MPlaceTy<'tcx, M::Provenance>) -> InterpResult<'tcx> {
+        let ptr = vararg.ptr();
+
+        // FIXME: is the `unwrap` valid here?
+        trace!(
+            "deallocating vararg {:?}: {:?}",
+            vararg,
+            // FIXME: what do we do with this comment?
+            // Locals always have a `alloc_id` (they are never the result of a int2ptr).
+            self.dump_alloc(ptr.provenance.unwrap().get_alloc_id().unwrap())
+        );
+        self.deallocate_ptr(ptr, None, MemoryKind::Stack)?;
+
+        interp_ok(())
+    }
+
     /// This is public because it is used by [Aquascope](https://github.com/cognitive-engineering-lab/aquascope/)
     /// to analyze all the locals in a stack frame.
     #[inline(always)]
diff --git a/compiler/rustc_middle/src/mir/interpret/error.rs b/compiler/rustc_middle/src/mir/interpret/error.rs
index 66c928f518aa..970dbd95f7cc 100644
--- a/compiler/rustc_middle/src/mir/interpret/error.rs
+++ b/compiler/rustc_middle/src/mir/interpret/error.rs
@@ -392,6 +392,8 @@ pub enum UndefinedBehaviorInfo<'tcx> {
     DerefFunctionPointer(AllocId),
     /// Trying to access the data behind a vtable pointer.
     DerefVTablePointer(AllocId),
+    /// Trying to access the data behind a va_list pointer.
+    DerefVaListPointer(AllocId),
     /// Trying to access the actual type id.
     DerefTypeIdPointer(AllocId),
     /// Using a non-boolean `u8` as bool.
@@ -434,6 +436,8 @@ pub enum UndefinedBehaviorInfo<'tcx> {
     },
     /// ABI-incompatible return types.
     AbiMismatchReturn { caller_ty: Ty<'tcx>, callee_ty: Ty<'tcx> },
+    /// `va_arg` was called on an exhausted `VaList`.
+    VaArgOutOfBounds,
 }
 
 #[derive(Debug, Clone, Copy)]
diff --git a/compiler/rustc_middle/src/mir/interpret/mod.rs b/compiler/rustc_middle/src/mir/interpret/mod.rs
index 0abc3aec7e00..a4ab1f364c16 100644
--- a/compiler/rustc_middle/src/mir/interpret/mod.rs
+++ b/compiler/rustc_middle/src/mir/interpret/mod.rs
@@ -396,7 +396,7 @@ impl<'tcx> GlobalAlloc<'tcx> {
                 // No data to be accessed here. But vtables are pointer-aligned.
                 (Size::ZERO, tcx.data_layout.pointer_align().abi)
             }
-            // Fake allocation, there's nothing to access here
+            // Fake allocation, there's nothing to access here.
             GlobalAlloc::TypeId { .. } => (Size::ZERO, Align::ONE),
         }
     }
diff --git a/library/core/src/ffi/va_list.rs b/library/core/src/ffi/va_list.rs
index a761b24895cf..45a9b7ba5293 100644
--- a/library/core/src/ffi/va_list.rs
+++ b/library/core/src/ffi/va_list.rs
@@ -200,12 +200,13 @@ impl fmt::Debug for VaList<'_> {
 
 impl VaList<'_> {
     // Helper used in the implementation of the `va_copy` intrinsic.
-    pub(crate) fn duplicate(&self) -> Self {
-        Self { inner: self.inner.clone(), _marker: self._marker }
+    pub(crate) const fn duplicate(&self) -> Self {
+        Self { inner: self.inner, _marker: self._marker }
     }
 }
 
-impl Clone for VaList<'_> {
+#[rustc_const_unstable(feature = "c_variadic_const", issue = "none")]
+impl<'f> const Clone for VaList<'f> {
     #[inline]
     fn clone(&self) -> Self {
         // We only implement Clone and not Copy because some future target might not be able to
diff --git a/library/core/src/intrinsics/mod.rs b/library/core/src/intrinsics/mod.rs
index 4aacafb75bd2..66e68cb866db 100644
--- a/library/core/src/intrinsics/mod.rs
+++ b/library/core/src/intrinsics/mod.rs
@@ -3484,7 +3484,7 @@ pub const unsafe fn va_arg(ap: &mut VaList<'_>) -> T;
 /// when a variable argument list is used incorrectly.
 #[rustc_intrinsic]
 #[rustc_nounwind]
-pub fn va_copy<'f>(src: &VaList<'f>) -> VaList<'f> {
+pub const fn va_copy<'f>(src: &VaList<'f>) -> VaList<'f> {
     src.duplicate()
 }
 
diff --git a/src/tools/miri/src/alloc_addresses/mod.rs b/src/tools/miri/src/alloc_addresses/mod.rs
index fed51ed86433..59799ac613b8 100644
--- a/src/tools/miri/src/alloc_addresses/mod.rs
+++ b/src/tools/miri/src/alloc_addresses/mod.rs
@@ -185,7 +185,7 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
                 #[cfg(not(all(unix, feature = "native-lib")))]
                 AllocKind::Function => dummy_alloc(params),
                 AllocKind::VTable => dummy_alloc(params),
-                AllocKind::TypeId | AllocKind::Dead => unreachable!(),
+                AllocKind::TypeId | AllocKind::Dead | AllocKind::VaList => unreachable!(),
             };
             // We don't have to expose this pointer yet, we do that in `prepare_for_native_call`.
             return interp_ok(base_ptr.addr().to_u64());
@@ -363,8 +363,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
             ProvenanceMode::Default => {
                 // The first time this happens at a particular location, print a warning.
                 static DEDUP: SpanDedupDiagnostic = SpanDedupDiagnostic::new();
-                this.dedup_diagnostic(&DEDUP, |first| {
-                    NonHaltingDiagnostic::Int2Ptr { details: first }
+                this.dedup_diagnostic(&DEDUP, |first| NonHaltingDiagnostic::Int2Ptr {
+                    details: first,
                 });
             }
             ProvenanceMode::Strict => {
diff --git a/src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs b/src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs
index a21898c506ab..c9f26d5fefaa 100644
--- a/src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs
+++ b/src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs
@@ -651,7 +651,7 @@ trait EvalContextPrivExt<'tcx, 'ecx>: crate::MiriInterpCxExt<'tcx> {
                         dcx.log_protector();
                     }
                 },
-                AllocKind::Function | AllocKind::VTable | AllocKind::TypeId | AllocKind::Dead => {
+                AllocKind::Function | AllocKind::VTable | AllocKind::TypeId | AllocKind::Dead | AllocKind::VaList => {
                     // No stacked borrows on these allocations.
                 }
             }
@@ -1010,7 +1010,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
                 trace!("Stacked Borrows tag {tag:?} exposed in {alloc_id:?}");
                 alloc_extra.borrow_tracker_sb().borrow_mut().exposed_tags.insert(tag);
             }
-            AllocKind::Function | AllocKind::VTable | AllocKind::TypeId | AllocKind::Dead => {
+            AllocKind::Function
+            | AllocKind::VTable
+            | AllocKind::TypeId
+            | AllocKind::Dead
+            | AllocKind::VaList => {
                 // No stacked borrows on these allocations.
             }
         }
diff --git a/src/tools/miri/src/borrow_tracker/tree_borrows/mod.rs b/src/tools/miri/src/borrow_tracker/tree_borrows/mod.rs
index 173145788ee3..d5d57115ebcb 100644
--- a/src/tools/miri/src/borrow_tracker/tree_borrows/mod.rs
+++ b/src/tools/miri/src/borrow_tracker/tree_borrows/mod.rs
@@ -576,7 +576,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
                 let protected = protected_tags.contains_key(&tag);
                 alloc_extra.borrow_tracker_tb().borrow_mut().expose_tag(tag, protected);
             }
-            AllocKind::Function | AllocKind::VTable | AllocKind::TypeId | AllocKind::Dead => {
+            AllocKind::Function
+            | AllocKind::VTable
+            | AllocKind::TypeId
+            | AllocKind::Dead
+            | AllocKind::VaList => {
                 // No tree borrows on these allocations.
             }
         }
diff --git a/tests/ui/consts/const-eval/c-variadic-fail.rs b/tests/ui/consts/const-eval/c-variadic-fail.rs
new file mode 100644
index 000000000000..37810ddb356d
--- /dev/null
+++ b/tests/ui/consts/const-eval/c-variadic-fail.rs
@@ -0,0 +1,147 @@
+//@ build-fail
+
+#![feature(c_variadic)]
+#![feature(c_variadic_const)]
+#![feature(const_trait_impl)]
+#![feature(const_destruct)]
+#![feature(const_clone)]
+
+use std::ffi::VaList;
+
+const unsafe extern "C" fn read_n(mut ap: ...) {
+    let mut i = N;
+    while i > 0 {
+        i -= 1;
+        let _ = ap.arg::();
+    }
+}
+
+unsafe fn read_too_many() {
+    // None passed, none read.
+    const { read_n::<0>() }
+
+    // One passed, none read. Ignoring arguments is fine.
+    const { read_n::<0>(1) }
+
+    // None passed, one read.
+    const { read_n::<1>() }
+    //~^ ERROR more C-variadic arguments read than were passed
+
+    // One passed, two read.
+    const { read_n::<2>(1) }
+    //~^ ERROR more C-variadic arguments read than were passed
+}
+
+const unsafe extern "C" fn read_as(mut ap: ...) -> T {
+    ap.arg::()
+}
+
+unsafe fn read_cast() {
+    const { read_as::(1i32) };
+    const { read_as::(1u32) };
+
+    const { read_as::(1i32, 2u64, 3.0f64) };
+    const { read_as::(1u32, 2u64, 3.0f64) };
+
+    const { read_as::(1i64) };
+    const { read_as::(1u64) };
+
+    const { read_as::(1i32) };
+    //~^ ERROR va_arg type mismatch: requested `u32`, but next argument is `i32`
+
+    const { read_as::(1u32) };
+    //~^ ERROR va_arg type mismatch: requested `i32`, but next argument is `u32`
+
+    const { read_as::(1u64) };
+    //~^ ERROR va_arg type mismatch: requested `i32`, but next argument is `u64`
+
+    const { read_as::(1i32) };
+    //~^ ERROR va_arg type mismatch: requested `f64`, but next argument is `i32`
+
+    const { read_as::<*const u8>(1i32) };
+    //~^ ERROR va_arg type mismatch: requested `*const u8`, but next argument is `i32`
+}
+
+fn use_after_free() {
+    const unsafe extern "C" fn helper(ap: ...) -> [u8; size_of::()] {
+        unsafe { std::mem::transmute(ap) }
+    }
+
+    const {
+        unsafe {
+            let ap = helper(1, 2, 3);
+            let mut ap = std::mem::transmute::<_, VaList>(ap);
+            ap.arg::();
+            //~^ ERROR memory access failed: ALLOC0 has been freed, so this pointer is dangling [E0080]
+        }
+    };
+}
+
+macro_rules! va_list_copy {
+    ($ap:expr) => {{
+        // A copy created using Clone is valid, and can be used to read arguments.
+        let mut copy = $ap.clone();
+        assert!(copy.arg::() == 1i32);
+
+        let mut u = core::mem::MaybeUninit::uninit();
+        unsafe { core::ptr::copy_nonoverlapping(&$ap, u.as_mut_ptr(), 1) };
+
+        // Manually creating the copy is fine.
+        unsafe { u.assume_init() }
+    }};
+}
+
+fn manual_copy_drop() {
+    const unsafe extern "C" fn helper(ap: ...) {
+        let mut copy: VaList = va_list_copy!(ap);
+
+        // Using the copy is actually fine.
+        let _ = copy.arg::();
+        drop(copy);
+
+        // But then using the original is UB.
+        drop(ap);
+    }
+
+    const { unsafe { helper(1, 2, 3) } };
+    //~^ ERROR va_end on unknown va_list allocation ALLOC0 [E0080]
+}
+
+fn manual_copy_forget() {
+    const unsafe extern "C" fn helper(ap: ...) {
+        let mut copy: VaList = va_list_copy!(ap);
+
+        // Using the copy is actually fine.
+        let _ = copy.arg::();
+        std::mem::forget(copy);
+
+        // The read (via `copy`) deallocated the original allocation.
+        drop(ap);
+    }
+
+    const { unsafe { helper(1, 2, 3) } };
+    //~^ ERROR va_end on unknown va_list allocation ALLOC0 [E0080]
+}
+
+fn manual_copy_read() {
+    const unsafe extern "C" fn helper(mut ap: ...) {
+        let mut copy: VaList = va_list_copy!(ap);
+
+        // Reading from `ap` after reading from `copy` is UB.
+        let _ = copy.arg::();
+        let _ = ap.arg::();
+    }
+
+    const { unsafe { helper(1, 2, 3) } };
+    //~^ ERROR va_arg on unknown va_list allocation ALLOC0
+}
+
+fn main() {
+    unsafe {
+        read_too_many();
+        read_cast();
+        manual_copy_read();
+        manual_copy_drop();
+        manual_copy_forget();
+    }
+}
diff --git a/tests/ui/consts/const-eval/c-variadic-fail.stderr b/tests/ui/consts/const-eval/c-variadic-fail.stderr
new file mode 100644
index 000000000000..4c569a4492d4
--- /dev/null
+++ b/tests/ui/consts/const-eval/c-variadic-fail.stderr
@@ -0,0 +1,324 @@
+error[E0080]: more C-variadic arguments read than were passed
+  --> $DIR/c-variadic-fail.rs:27:13
+   |
+LL |     const { read_n::<1>() }
+   |             ^^^^^^^^^^^^^ evaluation of `read_too_many::{constant#2}` failed inside this call
+   |
+note: inside `read_n::<1>`
+  --> $DIR/c-variadic-fail.rs:15:17
+   |
+LL |         let _ = ap.arg::();
+   |                 ^^^^^^^^^^^^^^^
+note: inside `VaList::<'_>::arg::`
+  --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:27:5
+   |
+LL |     const { read_n::<1>() }
+   |     ^^^^^^^^^^^^^^^^^^^^^^^
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:27:5
+   |
+LL |     const { read_n::<1>() }
+   |     ^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0080]: more C-variadic arguments read than were passed
+  --> $DIR/c-variadic-fail.rs:31:13
+   |
+LL |     const { read_n::<2>(1) }
+   |             ^^^^^^^^^^^^^^ evaluation of `read_too_many::{constant#3}` failed inside this call
+   |
+note: inside `read_n::<2>`
+  --> $DIR/c-variadic-fail.rs:15:17
+   |
+LL |         let _ = ap.arg::();
+   |                 ^^^^^^^^^^^^^^^
+note: inside `VaList::<'_>::arg::`
+  --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:31:5
+   |
+LL |     const { read_n::<2>(1) }
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:31:5
+   |
+LL |     const { read_n::<2>(1) }
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0080]: va_arg type mismatch: requested `u32`, but next argument is `i32`
+  --> $DIR/c-variadic-fail.rs:49:13
+   |
+LL |     const { read_as::(1i32) };
+   |             ^^^^^^^^^^^^^^^^^^^^ evaluation of `read_cast::{constant#6}` failed inside this call
+   |
+note: inside `read_as::`
+  --> $DIR/c-variadic-fail.rs:36:5
+   |
+LL |     ap.arg::()
+   |     ^^^^^^^^^^^^^
+note: inside `VaList::<'_>::arg::`
+  --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:49:5
+   |
+LL |     const { read_as::(1i32) };
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:49:5
+   |
+LL |     const { read_as::(1i32) };
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0080]: va_arg type mismatch: requested `i32`, but next argument is `u32`
+  --> $DIR/c-variadic-fail.rs:52:13
+   |
+LL |     const { read_as::(1u32) };
+   |             ^^^^^^^^^^^^^^^^^^^^ evaluation of `read_cast::{constant#7}` failed inside this call
+   |
+note: inside `read_as::`
+  --> $DIR/c-variadic-fail.rs:36:5
+   |
+LL |     ap.arg::()
+   |     ^^^^^^^^^^^^^
+note: inside `VaList::<'_>::arg::`
+  --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:52:5
+   |
+LL |     const { read_as::(1u32) };
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:52:5
+   |
+LL |     const { read_as::(1u32) };
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0080]: va_arg type mismatch: requested `i32`, but next argument is `u64`
+  --> $DIR/c-variadic-fail.rs:55:13
+   |
+LL |     const { read_as::(1u64) };
+   |             ^^^^^^^^^^^^^^^^^^^^ evaluation of `read_cast::{constant#8}` failed inside this call
+   |
+note: inside `read_as::`
+  --> $DIR/c-variadic-fail.rs:36:5
+   |
+LL |     ap.arg::()
+   |     ^^^^^^^^^^^^^
+note: inside `VaList::<'_>::arg::`
+  --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:55:5
+   |
+LL |     const { read_as::(1u64) };
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:55:5
+   |
+LL |     const { read_as::(1u64) };
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0080]: va_arg type mismatch: requested `f64`, but next argument is `i32`
+  --> $DIR/c-variadic-fail.rs:58:13
+   |
+LL |     const { read_as::(1i32) };
+   |             ^^^^^^^^^^^^^^^^^^^^ evaluation of `read_cast::{constant#9}` failed inside this call
+   |
+note: inside `read_as::`
+  --> $DIR/c-variadic-fail.rs:36:5
+   |
+LL |     ap.arg::()
+   |     ^^^^^^^^^^^^^
+note: inside `VaList::<'_>::arg::`
+  --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:58:5
+   |
+LL |     const { read_as::(1i32) };
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:58:5
+   |
+LL |     const { read_as::(1i32) };
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0080]: va_arg type mismatch: requested `*const u8`, but next argument is `i32`
+  --> $DIR/c-variadic-fail.rs:61:13
+   |
+LL |     const { read_as::<*const u8>(1i32) };
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `read_cast::{constant#10}` failed inside this call
+   |
+note: inside `read_as::<*const u8>`
+  --> $DIR/c-variadic-fail.rs:36:5
+   |
+LL |     ap.arg::()
+   |     ^^^^^^^^^^^^^
+note: inside `VaList::<'_>::arg::<*const u8>`
+  --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:61:5
+   |
+LL |     const { read_as::<*const u8>(1i32) };
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:61:5
+   |
+LL |     const { read_as::<*const u8>(1i32) };
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0080]: memory access failed: ALLOC0 has been freed, so this pointer is dangling
+  --> $DIR/c-variadic-fail.rs:74:13
+   |
+LL |             ap.arg::();
+   |             ^^^^^^^^^^^^^^^ evaluation of `use_after_free::{constant#0}` failed inside this call
+   |
+note: inside `VaList::<'_>::arg::`
+  --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:70:5
+   |
+LL | /     const {
+LL | |         unsafe {
+LL | |             let ap = helper(1, 2, 3);
+LL | |             let mut ap = std::mem::transmute::<_, VaList>(ap);
+...  |
+LL | |     };
+   | |_____^
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:70:5
+   |
+LL | /     const {
+LL | |         unsafe {
+LL | |             let ap = helper(1, 2, 3);
+LL | |             let mut ap = std::mem::transmute::<_, VaList>(ap);
+...  |
+LL | |     };
+   | |_____^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0080]: va_end on unknown va_list allocation ALLOC1
+  --> $DIR/c-variadic-fail.rs:106:22
+   |
+LL |     const { unsafe { helper(1, 2, 3) } };
+   |                      ^^^^^^^^^^^^^^^ evaluation of `manual_copy_drop::{constant#0}` failed inside this call
+   |
+note: inside `manual_copy_drop::helper`
+  --> $DIR/c-variadic-fail.rs:103:9
+   |
+LL |         drop(ap);
+   |         ^^^^^^^^
+note: inside `std::mem::drop::>`
+  --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+note: inside `drop_in_place::> - shim(Some(VaList<'_>))`
+  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+note: inside ` as Drop>::drop`
+  --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:106:5
+   |
+LL |     const { unsafe { helper(1, 2, 3) } };
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:106:5
+   |
+LL |     const { unsafe { helper(1, 2, 3) } };
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0080]: va_end on unknown va_list allocation ALLOC2
+  --> $DIR/c-variadic-fail.rs:122:22
+   |
+LL |     const { unsafe { helper(1, 2, 3) } };
+   |                      ^^^^^^^^^^^^^^^ evaluation of `manual_copy_forget::{constant#0}` failed inside this call
+   |
+note: inside `manual_copy_forget::helper`
+  --> $DIR/c-variadic-fail.rs:119:9
+   |
+LL |         drop(ap);
+   |         ^^^^^^^^
+note: inside `std::mem::drop::>`
+  --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+note: inside `drop_in_place::> - shim(Some(VaList<'_>))`
+  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+note: inside ` as Drop>::drop`
+  --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:122:5
+   |
+LL |     const { unsafe { helper(1, 2, 3) } };
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:122:5
+   |
+LL |     const { unsafe { helper(1, 2, 3) } };
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0080]: va_arg on unknown va_list allocation ALLOC3
+  --> $DIR/c-variadic-fail.rs:135:22
+   |
+LL |     const { unsafe { helper(1, 2, 3) } };
+   |                      ^^^^^^^^^^^^^^^ evaluation of `manual_copy_read::{constant#0}` failed inside this call
+   |
+note: inside `manual_copy_read::helper`
+  --> $DIR/c-variadic-fail.rs:132:17
+   |
+LL |         let _ = ap.arg::();
+   |                 ^^^^^^^^^^^^^^^
+note: inside `VaList::<'_>::arg::`
+  --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:135:5
+   |
+LL |     const { unsafe { helper(1, 2, 3) } };
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:135:5
+   |
+LL |     const { unsafe { helper(1, 2, 3) } };
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 11 previous errors
+
+For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/c-variadic.rs b/tests/ui/consts/const-eval/c-variadic.rs
new file mode 100644
index 000000000000..ec49b5cc5831
--- /dev/null
+++ b/tests/ui/consts/const-eval/c-variadic.rs
@@ -0,0 +1,155 @@
+//@ edition: 2021
+//@ run-pass
+//@ ignore-backends: gcc
+
+#![feature(c_variadic)]
+#![feature(const_destruct)]
+#![feature(c_variadic_const)]
+#![feature(const_cmp)]
+#![feature(const_trait_impl)]
+
+use std::ffi::*;
+
+fn ignores_arguments() {
+    const unsafe extern "C" fn variadic(_: ...) {}
+
+    const {
+        unsafe { variadic() };
+        unsafe { variadic(1, 2, 3) };
+    }
+}
+
+fn echo() {
+    const unsafe extern "C" fn variadic(mut ap: ...) -> i32 {
+        ap.arg()
+    }
+
+    assert_eq!(unsafe { variadic(1) }, 1);
+    assert_eq!(unsafe { variadic(3, 2, 1) }, 3);
+
+    const {
+        assert!(unsafe { variadic(1) } == 1);
+        assert!(unsafe { variadic(3, 2, 1) } == 3);
+    }
+}
+
+fn forward_by_val() {
+    const unsafe fn helper(mut ap: VaList) -> i32 {
+        ap.arg()
+    }
+
+    const unsafe extern "C" fn variadic(ap: ...) -> i32 {
+        helper(ap)
+    }
+
+    assert_eq!(unsafe { variadic(1) }, 1);
+    assert_eq!(unsafe { variadic(3, 2, 1) }, 3);
+
+    const {
+        assert!(unsafe { variadic(1) } == 1);
+        assert!(unsafe { variadic(3, 2, 1) } == 3);
+    }
+}
+
+fn forward_by_ref() {
+    const unsafe fn helper(ap: &mut VaList) -> i32 {
+        ap.arg()
+    }
+
+    const unsafe extern "C" fn variadic(mut ap: ...) -> i32 {
+        helper(&mut ap)
+    }
+
+    assert_eq!(unsafe { variadic(1) }, 1);
+    assert_eq!(unsafe { variadic(3, 2, 1) }, 3);
+
+    const {
+        assert!(unsafe { variadic(1) } == 1);
+        assert!(unsafe { variadic(3, 2, 1) } == 3);
+    }
+}
+
+#[allow(improper_ctypes_definitions)]
+fn nested() {
+    const unsafe fn helper(mut ap1: VaList, mut ap2: VaList) -> (i32, i32) {
+        (ap1.arg(), ap2.arg())
+    }
+
+    const unsafe extern "C" fn variadic2(ap1: VaList, ap2: ...) -> (i32, i32) {
+        helper(ap1, ap2)
+    }
+
+    const unsafe extern "C" fn variadic1(ap1: ...) -> (i32, i32) {
+        variadic2(ap1, 2, 2)
+    }
+
+    assert_eq!(unsafe { variadic1(1) }, (1, 2));
+
+    const {
+        let (a, b) = unsafe { variadic1(1, 1) };
+
+        assert!(a != 2);
+        assert!(a == 1);
+        assert!(b != 1);
+        assert!(b == 2);
+    }
+}
+
+fn various_types() {
+    const unsafe extern "C" fn check_list_2(mut ap: ...) {
+        macro_rules! continue_if {
+            ($cond:expr) => {
+                if !($cond) {
+                    panic!();
+                }
+            };
+        }
+
+        const unsafe fn compare_c_str(ptr: *const c_char, val: &str) -> bool {
+            match CStr::from_ptr(ptr).to_str() {
+                Ok(cstr) => cstr == val,
+                Err(_) => panic!(),
+            }
+        }
+
+        continue_if!(ap.arg::().floor() == 3.14f64.floor());
+        continue_if!(ap.arg::() == 12);
+        continue_if!(ap.arg::() == 'a' as c_int);
+        continue_if!(ap.arg::().floor() == 6.18f64.floor());
+        continue_if!(compare_c_str(ap.arg::<*const c_char>(), "Hello"));
+        continue_if!(ap.arg::() == 42);
+        continue_if!(compare_c_str(ap.arg::<*const c_char>(), "World"));
+    }
+
+    unsafe {
+        check_list_2(
+            3.14 as c_double,
+            12 as c_long,
+            b'a' as c_int,
+            6.28 as c_double,
+            c"Hello".as_ptr(),
+            42 as c_int,
+            c"World".as_ptr(),
+        );
+        const {
+            check_list_2(
+                3.14 as c_double,
+                12 as c_long,
+                b'a' as c_int,
+                6.28 as c_double,
+                c"Hello".as_ptr(),
+                42 as c_int,
+                c"World".as_ptr(),
+            )
+        };
+    }
+}
+
+fn main() {
+    ignores_arguments();
+    echo();
+    forward_by_val();
+    forward_by_ref();
+    nested();
+    various_types();
+}

From ca3d1a3211d70c1ce838e8c68eb24e3e340cac04 Mon Sep 17 00:00:00 2001
From: Folkert de Vries 
Date: Thu, 22 Jan 2026 19:23:51 +0100
Subject: [PATCH 181/265] add c-variadic miri test

---
 src/tools/miri/tests/pass/c-variadic.rs | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 src/tools/miri/tests/pass/c-variadic.rs

diff --git a/src/tools/miri/tests/pass/c-variadic.rs b/src/tools/miri/tests/pass/c-variadic.rs
new file mode 100644
index 000000000000..a1f03db6872f
--- /dev/null
+++ b/src/tools/miri/tests/pass/c-variadic.rs
@@ -0,0 +1,18 @@
+#![feature(c_variadic)]
+
+use core::ffi::VaList;
+
+fn helper(ap: VaList) -> i32 {
+    // unsafe { ap.arg::() }
+    let _ = ap;
+    0
+}
+
+unsafe extern "C" fn variadic(a: i32, ap: ...) -> i32 {
+    assert_eq!(a, 42);
+    helper(ap)
+}
+
+fn main() {
+    assert_eq!(unsafe { variadic(42, 1) }, 1);
+}

From 1be41648d4a3fd8e3116f8bcf1d25f23119a27c7 Mon Sep 17 00:00:00 2001
From: xonx <119700621+xonx4l@users.noreply.github.com>
Date: Sat, 14 Feb 2026 21:32:57 +0000
Subject: [PATCH 182/265] move and add comment

---
 .../rustc_trait_selection/src/error_reporting/infer/mod.rs  | 6 +++---
 .../ui/associated-types/param-env-shadowing-issue-149910.rs | 3 +++
 .../param-env-shadowing-issue-149910.stderr                 | 2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs
index 32bbc18f7469..2b2f9a07890f 100644
--- a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs
+++ b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs
@@ -291,15 +291,15 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
                     return false;
                 }
 
-                let trait_def_id = alias.trait_def_id(tcx);
-                let rebased_args = alias.args.rebase_onto(tcx, trait_def_id, impl_substs);
-
                 let leaf_def = match specialization_graph::assoc_def(tcx, impl_def_id, alias.def_id)
                 {
                     Ok(leaf) => leaf,
                     Err(_) => return false,
                 };
 
+                let trait_def_id = alias.trait_def_id(tcx);
+                let rebased_args = alias.args.rebase_onto(tcx, trait_def_id, impl_substs);
+
                 let impl_item_def_id = leaf_def.item.def_id;
                 let impl_assoc_ty = tcx.type_of(impl_item_def_id).instantiate(tcx, rebased_args);
 
diff --git a/tests/ui/associated-types/param-env-shadowing-issue-149910.rs b/tests/ui/associated-types/param-env-shadowing-issue-149910.rs
index bd4df859dc07..368b80e66189 100644
--- a/tests/ui/associated-types/param-env-shadowing-issue-149910.rs
+++ b/tests/ui/associated-types/param-env-shadowing-issue-149910.rs
@@ -1,3 +1,6 @@
+// Regression test for issue #149910.
+// We want to tell the user about param_env shadowing here.
+
 trait Trait {
     type Assoc;
 }
diff --git a/tests/ui/associated-types/param-env-shadowing-issue-149910.stderr b/tests/ui/associated-types/param-env-shadowing-issue-149910.stderr
index b06770e52635..71ce456bfc1a 100644
--- a/tests/ui/associated-types/param-env-shadowing-issue-149910.stderr
+++ b/tests/ui/associated-types/param-env-shadowing-issue-149910.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/param-env-shadowing-issue-149910.rs:10:5
+  --> $DIR/param-env-shadowing-issue-149910.rs:13:5
    |
 LL | fn foo(x: T) -> T::Assoc {
    |        -                  -------- expected `::Assoc` because of return type

From f5bf3353e6dc78176e2f4f4324f526524e601a92 Mon Sep 17 00:00:00 2001
From: Folkert de Vries 
Date: Thu, 22 Jan 2026 22:24:26 +0100
Subject: [PATCH 183/265] move va_list operations into `InterpCx`

---
 compiler/rustc_const_eval/src/errors.rs       |  16 +-
 .../rustc_const_eval/src/interpret/call.rs    | 100 ++++++-------
 .../src/interpret/intrinsics.rs               | 137 +++++++-----------
 .../rustc_const_eval/src/interpret/memory.rs  |  61 +++++---
 .../rustc_const_eval/src/interpret/stack.rs   |  76 +++++++---
 .../rustc_middle/src/mir/interpret/error.rs   |   6 +
 src/tools/miri/src/alloc_addresses/mod.rs     |   8 +-
 .../tests/fail/c-variadic-mismatch-count.rs   |  13 ++
 .../fail/c-variadic-mismatch-count.stderr     |  13 ++
 .../miri/tests/fail/c-variadic-mismatch.rs    |  13 ++
 .../tests/fail/c-variadic-mismatch.stderr     |  13 ++
 src/tools/miri/tests/fail/c-variadic.rs       |  15 ++
 src/tools/miri/tests/fail/c-variadic.stderr   |  22 +++
 src/tools/miri/tests/pass/c-variadic.rs       | 115 +++++++++++++--
 tests/ui/consts/const-eval/c-variadic-fail.rs |  40 ++---
 .../consts/const-eval/c-variadic-fail.stderr  | 125 ++++++++++------
 .../variadic-ffi-semantic-restrictions.rs     |   4 +
 .../variadic-ffi-semantic-restrictions.stderr |  83 ++++++++---
 18 files changed, 577 insertions(+), 283 deletions(-)
 create mode 100644 src/tools/miri/tests/fail/c-variadic-mismatch-count.rs
 create mode 100644 src/tools/miri/tests/fail/c-variadic-mismatch-count.stderr
 create mode 100644 src/tools/miri/tests/fail/c-variadic-mismatch.rs
 create mode 100644 src/tools/miri/tests/fail/c-variadic-mismatch.stderr
 create mode 100644 src/tools/miri/tests/fail/c-variadic.rs
 create mode 100644 src/tools/miri/tests/fail/c-variadic.stderr

diff --git a/compiler/rustc_const_eval/src/errors.rs b/compiler/rustc_const_eval/src/errors.rs
index 9de7d02184b3..061ed38c9df1 100644
--- a/compiler/rustc_const_eval/src/errors.rs
+++ b/compiler/rustc_const_eval/src/errors.rs
@@ -763,6 +763,7 @@ impl<'a> ReportErrorExt for UndefinedBehaviorInfo<'a> {
             InvalidChar(_) => msg!("interpreting an invalid 32-bit value as a char: 0x{$value}"),
             InvalidTag(_) => msg!("enum value has invalid tag: {$tag}"),
             InvalidFunctionPointer(_) => msg!("using {$pointer} as function pointer but it does not point to a function"),
+            InvalidVaListPointer(_) => msg!("using {$pointer} as variable argument list pointer but it does not point to a variable argument list"),
             InvalidVTablePointer(_) => msg!("using {$pointer} as vtable pointer but it does not point to a vtable"),
             InvalidVTableTrait { .. } => msg!("using vtable for `{$vtable_dyn_type}` but `{$expected_dyn_type}` was expected"),
             InvalidStr(_) => msg!("this string is not valid UTF-8: {$err}"),
@@ -778,6 +779,8 @@ impl<'a> ReportErrorExt for UndefinedBehaviorInfo<'a> {
             AbiMismatchArgument { .. } => msg!("calling a function whose parameter #{$arg_idx} has type {$callee_ty} passing argument of type {$caller_ty}"),
             AbiMismatchReturn { .. } => msg!("calling a function with return type {$callee_ty} passing return place of type {$caller_ty}"),
             VaArgOutOfBounds => "more C-variadic arguments read than were passed".into(),
+            CVariadicMismatch { ..} => "calling a function where the caller and callee disagree on whether the function is C-variadic".into(),
+            CVariadicFixedCountMismatch { .. } => msg!("calling a C-variadic function with {$caller} fixed arguments, but the function expects {$callee}"),
         }
     }
 
@@ -823,7 +826,10 @@ impl<'a> ReportErrorExt for UndefinedBehaviorInfo<'a> {
                 diag.arg("len", len);
                 diag.arg("index", index);
             }
-            UnterminatedCString(ptr) | InvalidFunctionPointer(ptr) | InvalidVTablePointer(ptr) => {
+            UnterminatedCString(ptr)
+            | InvalidFunctionPointer(ptr)
+            | InvalidVaListPointer(ptr)
+            | InvalidVTablePointer(ptr) => {
                 diag.arg("pointer", ptr);
             }
             InvalidVTableTrait { expected_dyn_type, vtable_dyn_type } => {
@@ -914,6 +920,14 @@ impl<'a> ReportErrorExt for UndefinedBehaviorInfo<'a> {
                 diag.arg("caller_ty", caller_ty);
                 diag.arg("callee_ty", callee_ty);
             }
+            CVariadicMismatch { caller_is_c_variadic, callee_is_c_variadic } => {
+                diag.arg("caller_is_c_variadic", caller_is_c_variadic);
+                diag.arg("callee_is_c_variadic", callee_is_c_variadic);
+            }
+            CVariadicFixedCountMismatch { caller, callee } => {
+                diag.arg("caller", caller);
+                diag.arg("callee", callee);
+            }
         }
     }
 }
diff --git a/compiler/rustc_const_eval/src/interpret/call.rs b/compiler/rustc_const_eval/src/interpret/call.rs
index 3efac883b9c4..dabee7fa19b0 100644
--- a/compiler/rustc_const_eval/src/interpret/call.rs
+++ b/compiler/rustc_const_eval/src/interpret/call.rs
@@ -4,7 +4,7 @@
 use std::borrow::Cow;
 
 use either::{Left, Right};
-use rustc_abi::{self as abi, ExternAbi, FieldIdx, HasDataLayout, Integer, Size, VariantIdx};
+use rustc_abi::{self as abi, ExternAbi, FieldIdx, Integer, VariantIdx};
 use rustc_data_structures::assert_matches;
 use rustc_errors::msg;
 use rustc_hir::def_id::DefId;
@@ -17,9 +17,9 @@ use tracing::field::Empty;
 use tracing::{info, instrument, trace};
 
 use super::{
-    CtfeProvenance, FnVal, ImmTy, InterpCx, InterpResult, MPlaceTy, Machine, MemoryKind, OpTy,
-    PlaceTy, Projectable, Provenance, ReturnAction, ReturnContinuation, Scalar, StackPopInfo,
-    interp_ok, throw_ub, throw_ub_custom,
+    CtfeProvenance, FnVal, ImmTy, InterpCx, InterpResult, MPlaceTy, Machine, OpTy, PlaceTy,
+    Projectable, Provenance, ReturnAction, ReturnContinuation, Scalar, StackPopInfo, interp_ok,
+    throw_ub, throw_ub_custom,
 };
 use crate::enter_trace_span;
 use crate::interpret::EnteredTraceSpan;
@@ -354,23 +354,18 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
     ) -> InterpResult<'tcx> {
         let _trace = enter_trace_span!(M, step::init_stack_frame, %instance, tracing_separate_thread = Empty);
 
-        let (fixed_count, c_variadic_args) = if caller_fn_abi.c_variadic {
-            let sig = self.tcx.fn_sig(instance.def_id()).skip_binder();
-            let fixed_count = sig.inputs().skip_binder().len();
-            assert!(caller_fn_abi.args.len() >= fixed_count);
-            let extra_tys: Vec> =
-                caller_fn_abi.args[fixed_count..].iter().map(|arg_abi| arg_abi.layout.ty).collect();
-
-            (fixed_count, self.tcx.mk_type_list(&extra_tys))
+        // The first order of business is to figure out the callee signature.
+        // However, that requires the list of variadic arguments.
+        // We use the *caller* information to determine where to split the list of arguments,
+        // and then later check that the callee indeed has the same number of fixed arguments.
+        let extra_tys = if caller_fn_abi.c_variadic {
+            let fixed_count = usize::try_from(caller_fn_abi.fixed_count).unwrap();
+            let extra_tys = args[fixed_count..].iter().map(|arg| arg.layout().ty);
+            self.tcx.mk_type_list_from_iter(extra_tys)
         } else {
-            (caller_fn_abi.args.len(), ty::List::empty())
+            ty::List::empty()
         };
-
-        let callee_fn_abi = self.fn_abi_of_instance(instance, c_variadic_args)?;
-
-        if callee_fn_abi.c_variadic ^ caller_fn_abi.c_variadic {
-            unreachable!("caller and callee disagree on being c-variadic");
-        }
+        let callee_fn_abi = self.fn_abi_of_instance(instance, extra_tys)?;
 
         if caller_fn_abi.conv != callee_fn_abi.conv {
             throw_ub_custom!(
@@ -382,6 +377,19 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
             )
         }
 
+        if caller_fn_abi.c_variadic != callee_fn_abi.c_variadic {
+            throw_ub!(CVariadicMismatch {
+                caller_is_c_variadic: caller_fn_abi.c_variadic,
+                callee_is_c_variadic: callee_fn_abi.c_variadic,
+            });
+        }
+        if caller_fn_abi.c_variadic && caller_fn_abi.fixed_count != callee_fn_abi.fixed_count {
+            throw_ub!(CVariadicFixedCountMismatch {
+                caller: caller_fn_abi.fixed_count,
+                callee: callee_fn_abi.fixed_count,
+            });
+        }
+
         // Check that all target features required by the callee (i.e., from
         // the attribute `#[target_feature(enable = ...)]`) are enabled at
         // compile time.
@@ -453,14 +461,12 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
             // this is a single iterator (that handles `spread_arg`), then
             // `pass_argument` would be the loop body. It takes care to
             // not advance `caller_iter` for ignored arguments.
-            let mut callee_args_abis = if caller_fn_abi.c_variadic {
-                callee_fn_abi.args[..fixed_count].iter().enumerate()
-            } else {
-                callee_fn_abi.args.iter().enumerate()
-            };
-
-            let mut it = body.args_iter().peekable();
-            while let Some(local) = it.next() {
+            let mut callee_args_abis = callee_fn_abi.args.iter().enumerate();
+            // Determine whether there is a special VaList argument. This is always the
+            // last argument, and since arguments start at index 1 that's `arg_count`.
+            let va_list_arg =
+                callee_fn_abi.c_variadic.then(|| mir::Local::from_usize(body.arg_count));
+            for local in body.args_iter() {
                 // Construct the destination place for this argument. At this point all
                 // locals are still dead, so we cannot construct a `PlaceTy`.
                 let dest = mir::Place::from(local);
@@ -468,44 +474,30 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
                 // type, but the result gets cached so this avoids calling the instantiation
                 // query *again* the next time this local is accessed.
                 let ty = self.layout_of_local(self.frame(), local, None)?.ty;
-                if caller_fn_abi.c_variadic && it.peek().is_none() {
-                    // The callee's signature has an additional VaList argument, that the caller
-                    // won't actually pass. Here we synthesize a `VaList` value, whose leading bytes
-                    // are a pointer that can be mapped to the corresponding variable argument list.
+                if Some(local) == va_list_arg {
+                    // This is the last callee-side argument of a variadic function.
+                    // This argument is a VaList holding the remaining caller-side arguments.
                     self.storage_live(local)?;
 
                     let place = self.eval_place(dest)?;
                     let mplace = self.force_allocation(&place)?;
 
-                    // Consume the remaining arguments and store them in a global allocation.
-                    let mut varargs = Vec::new();
-                    for (fn_arg, abi) in &mut caller_args {
-                        let op = self.copy_fn_arg(fn_arg);
-                        let mplace = self.allocate(abi.layout, MemoryKind::Stack)?;
-                        self.copy_op(&op, &mplace)?;
-
-                        varargs.push(mplace);
-                    }
-
-                    // When the frame is dropped, this ID is used to deallocate the variable arguments list.
+                    // Consume the remaining arguments by putting them into the variable argument
+                    // list.
+                    let varargs = self.allocate_varargs(&mut caller_args, &mut callee_args_abis)?;
+                    // When the frame is dropped, these variable arguments are deallocated.
                     self.frame_mut().va_list = varargs.clone();
+                    let key = self.va_list_ptr(varargs.into());
 
-                    // This is a new VaList, so start at index 0.
-                    let ptr = self.va_list_ptr(varargs, 0);
-                    let addr = Scalar::from_pointer(ptr, self);
-
-                    // Zero the mplace, so it is fully initialized.
+                    // Zero the VaList, so it is fully initialized.
                     self.write_bytes_ptr(
                         mplace.ptr(),
                         (0..mplace.layout.size.bytes()).map(|_| 0u8),
                     )?;
 
-                    // Store the pointer to the global variable arguments list allocation in the
-                    // first bytes of the `VaList` value.
-                    let mut alloc = self
-                        .get_ptr_alloc_mut(mplace.ptr(), self.data_layout().pointer_size())?
-                        .expect("not a ZST");
-                    alloc.write_ptr_sized(Size::ZERO, addr)?;
+                    // Store the "key" pointer in the right field.
+                    let key_mplace = self.va_list_key_field(&mplace)?;
+                    self.write_pointer(key, &key_mplace)?;
                 } else if Some(local) == body.spread_arg {
                     // Make the local live once, then fill in the value field by field.
                     self.storage_live(local)?;
@@ -545,7 +537,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
             if instance.def.requires_caller_location(*self.tcx) {
                 callee_args_abis.next().unwrap();
             }
-            // Now we should have no more caller args or callee arg ABIs
+            // Now we should have no more caller args or callee arg ABIs.
             assert!(
                 callee_args_abis.next().is_none(),
                 "mismatch between callee ABI and callee body arguments"
diff --git a/compiler/rustc_const_eval/src/interpret/intrinsics.rs b/compiler/rustc_const_eval/src/interpret/intrinsics.rs
index aa7c889b3f3f..e0c75da87a4b 100644
--- a/compiler/rustc_const_eval/src/interpret/intrinsics.rs
+++ b/compiler/rustc_const_eval/src/interpret/intrinsics.rs
@@ -23,8 +23,8 @@ use super::memory::MemoryKind;
 use super::util::ensure_monomorphic_enough;
 use super::{
     AllocId, CheckInAllocMsg, ImmTy, InterpCx, InterpResult, Machine, OpTy, PlaceTy, Pointer,
-    PointerArithmetic, Provenance, Scalar, err_ub_custom, err_unsup_format, interp_ok, throw_inval,
-    throw_ub, throw_ub_custom, throw_ub_format, throw_unsup_format,
+    PointerArithmetic, Projectable, Provenance, Scalar, err_ub_custom, err_unsup_format, interp_ok,
+    throw_inval, throw_ub, throw_ub_custom, throw_ub_format, throw_unsup_format,
 };
 use crate::interpret::Writeable;
 
@@ -751,113 +751,54 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
             }
 
             sym::va_copy => {
-                // fn va_copy<'f>(src: &VaList<'f>) -> VaList<'f>
-                let src_ptr = self.read_pointer(&args[0])?;
+                let va_list = self.deref_pointer(&args[0])?;
+                let key_mplace = self.va_list_key_field(&va_list)?;
+                let key = self.read_pointer(&key_mplace)?;
 
-                // Read the token pointer from the src VaList (alloc_id + offset-as-index).
-                let src_va_list_ptr = {
-                    let pointer_size = tcx.data_layout.pointer_size();
-                    let alloc = self
-                        .get_ptr_alloc(src_ptr, pointer_size)?
-                        .expect("va_list storage should not be a ZST");
-                    let scalar = alloc.read_pointer(Size::ZERO)?;
-                    scalar.to_pointer(self)?
-                };
+                let varargs = self.get_ptr_va_list(key)?;
+                let copy_key = self.va_list_ptr(varargs.clone());
 
-                let (prov, offset) = src_va_list_ptr.into_raw_parts();
-                let src_alloc_id = prov.unwrap().get_alloc_id().unwrap();
-                let index = offset.bytes();
-
-                // Look up arguments without consuming src.
-                let Some(arguments) = self.get_va_list_alloc(src_alloc_id) else {
-                    throw_unsup_format!("va_copy on unknown va_list allocation {:?}", src_alloc_id);
-                };
-
-                // Create a new allocation pointing at the same index.
-                let new_va_list_ptr = self.va_list_ptr(arguments.to_vec(), index);
-                let addr = Scalar::from_pointer(new_va_list_ptr, self);
-
-                // Now overwrite the token pointer stored inside the VaList.
-                let mplace = self.force_allocation(dest)?;
-                let mut alloc = self.get_place_alloc_mut(&mplace)?.unwrap();
-                alloc.write_ptr_sized(Size::ZERO, addr)?;
+                let copy_key_mplace = self.va_list_key_field(dest)?;
+                self.write_pointer(copy_key, ©_key_mplace)?;
             }
 
             sym::va_end => {
-                let ptr_size = self.tcx.data_layout.pointer_size();
+                let va_list = self.deref_pointer(&args[0])?;
+                let key_mplace = self.va_list_key_field(&va_list)?;
+                let key = self.read_pointer(&key_mplace)?;
 
-                // The only argument is a `&mut VaList`.
-                let ap_ref = self.read_pointer(&args[0])?;
-
-                // The first bytes of the `VaList` value store a pointer. The `AllocId` of this
-                // pointer is a key into a global map of variable argument lists. The offset is
-                // used as the index of the argument to read.
-                let va_list_ptr = {
-                    let alloc = self
-                        .get_ptr_alloc(ap_ref, ptr_size)?
-                        .expect("va_list storage should not be a ZST");
-                    let scalar = alloc.read_pointer(Size::ZERO)?;
-                    scalar.to_pointer(self)?
-                };
-
-                let (prov, _offset) = va_list_ptr.into_raw_parts();
-                let alloc_id = prov.unwrap().get_alloc_id().unwrap();
-
-                let Some(_) = self.remove_va_list_alloc(alloc_id) else {
-                    throw_unsup_format!("va_end on unknown va_list allocation {:?}", alloc_id)
-                };
+                self.deallocate_va_list(key)?;
             }
 
             sym::va_arg => {
-                let ptr_size = self.tcx.data_layout.pointer_size();
+                let va_list = self.deref_pointer(&args[0])?;
+                let key_mplace = self.va_list_key_field(&va_list)?;
+                let key = self.read_pointer(&key_mplace)?;
 
-                // The only argument is a `&mut VaList`.
-                let ap_ref = self.read_pointer(&args[0])?;
+                // Invalidate the old list and get its content. We'll recreate the
+                // new list (one element shorter) below.
+                let mut varargs = self.deallocate_va_list(key)?;
 
-                // The first bytes of the `VaList` value store a pointer. The `AllocId` of this
-                // pointer is a key into a global map of variable argument lists. The offset is
-                // used as the index of the argument to read.
-                let va_list_ptr = {
-                    let alloc = self
-                        .get_ptr_alloc(ap_ref, ptr_size)?
-                        .expect("va_list storage should not be a ZST");
-                    let scalar = alloc.read_pointer(Size::ZERO)?;
-                    scalar.to_pointer(self)?
+                let Some(arg_mplace) = varargs.pop_front() else {
+                    throw_ub!(VaArgOutOfBounds);
                 };
 
-                let (prov, offset) = va_list_ptr.into_raw_parts();
-                let alloc_id = prov.unwrap().get_alloc_id().unwrap();
-                let index = offset.bytes();
-
-                let Some(varargs) = self.remove_va_list_alloc(alloc_id) else {
-                    throw_unsup_format!("va_arg on unknown va_list allocation {:?}", alloc_id)
-                };
-
-                let Some(src_mplace) = varargs.get(offset.bytes_usize()).cloned() else {
-                    throw_ub!(VaArgOutOfBounds)
-                };
-
-                // Update the offset in this `VaList` value so that a subsequent call to `va_arg`
-                // reads the next argument.
-                let new_va_list_ptr = self.va_list_ptr(varargs, index + 1);
-                let addr = Scalar::from_pointer(new_va_list_ptr, self);
-                let mut alloc = self
-                    .get_ptr_alloc_mut(ap_ref, ptr_size)?
-                    .expect("va_list storage should not be a ZST");
-                alloc.write_ptr_sized(Size::ZERO, addr)?;
-
                 // NOTE: In C some type conversions are allowed (e.g. casting between signed and
                 // unsigned integers). For now we require c-variadic arguments to be read with the
                 // exact type they were passed as.
-                if src_mplace.layout.ty != dest.layout.ty {
+                if arg_mplace.layout.ty != dest.layout.ty {
                     throw_unsup_format!(
                         "va_arg type mismatch: requested `{}`, but next argument is `{}`",
                         dest.layout.ty,
-                        src_mplace.layout.ty
+                        arg_mplace.layout.ty
                     );
                 }
+                // Copy the argument.
+                self.copy_op(&arg_mplace, dest)?;
 
-                self.copy_op(&src_mplace, dest)?;
+                // Update the VaList pointer.
+                let new_key = self.va_list_ptr(varargs);
+                self.write_pointer(new_key, &key_mplace)?;
             }
 
             // Unsupported intrinsic: skip the return_to_block below.
@@ -1340,4 +1281,26 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
             interp_ok(Some(ImmTy::from_scalar(val, cast_to)))
         }
     }
+
+    /// Get the MPlace of the key from the place storing the VaList.
+    pub(super) fn va_list_key_field>(
+        &self,
+        va_list: &P,
+    ) -> InterpResult<'tcx, P> {
+        // The struct wrapped by VaList.
+        let va_list_inner = self.project_field(va_list, FieldIdx::ZERO)?;
+
+        // Find the first pointer field in this struct. The exact index is target-specific.
+        let ty::Adt(adt, substs) = va_list_inner.layout().ty.kind() else {
+            bug!("invalid VaListImpl layout");
+        };
+
+        for (i, field) in adt.non_enum_variant().fields.iter().enumerate() {
+            if field.ty(*self.tcx, substs).is_raw_ptr() {
+                return self.project_field(&va_list_inner, FieldIdx::from_usize(i));
+            }
+        }
+
+        bug!("no VaListImpl field is a pointer");
+    }
 }
diff --git a/compiler/rustc_const_eval/src/interpret/memory.rs b/compiler/rustc_const_eval/src/interpret/memory.rs
index aadbe84ca809..7b67d3acd555 100644
--- a/compiler/rustc_const_eval/src/interpret/memory.rs
+++ b/compiler/rustc_const_eval/src/interpret/memory.rs
@@ -129,7 +129,7 @@ pub struct Memory<'tcx, M: Machine<'tcx>> {
     extra_fn_ptr_map: FxIndexMap,
 
     /// Map storing variable argument lists.
-    va_list_map: FxIndexMap>>,
+    va_list_map: FxIndexMap>>,
 
     /// To be able to compare pointers with null, and to check alignment for accesses
     /// to ZSTs (where pointers may dangle), we keep track of the size even for allocations
@@ -237,19 +237,17 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
         self.global_root_pointer(Pointer::from(id)).unwrap()
     }
 
+    /// Insert a new variable argument list in the global map of variable argument lists.
     pub fn va_list_ptr(
         &mut self,
-        varargs: Vec>,
-        index: u64,
+        varargs: VecDeque>,
     ) -> Pointer {
         let id = self.tcx.reserve_alloc_id();
         let old = self.memory.va_list_map.insert(id, varargs);
         assert!(old.is_none());
-        // The offset is used to store the current index.
-        let ptr = Pointer::new(id.into(), Size::from_bytes(index));
         // Variable argument lists are global allocations, so make sure we get the right root
         // pointer. We know this is not an `extern static` so this cannot fail.
-        self.global_root_pointer(ptr).unwrap()
+        self.global_root_pointer(Pointer::from(id)).unwrap()
     }
 
     pub fn allocate_ptr(
@@ -1020,7 +1018,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
         }
 
         // # Variable argument lists
-        if let Some(_) = self.get_va_list_alloc(id) {
+        if self.memory.va_list_map.contains_key(&id) {
             return AllocInfo::new(Size::ZERO, Align::ONE, AllocKind::VaList, Mutability::Not);
         }
 
@@ -1071,18 +1069,6 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
         }
     }
 
-    pub fn get_va_list_alloc(&self, id: AllocId) -> Option<&[MPlaceTy<'tcx, M::Provenance>]> {
-        self.memory.va_list_map.get(&id).map(|v| &**v)
-    }
-
-    pub fn remove_va_list_alloc(
-        &mut self,
-        id: AllocId,
-    ) -> Option>> {
-        self.memory.dead_alloc_map.insert(id, (Size::ZERO, Align::ONE));
-        self.memory.va_list_map.swap_remove(&id)
-    }
-
     /// Takes a pointer that is the first chunk of a `TypeId` and return the type that its
     /// provenance refers to, as well as the segment of the hash that this pointer covers.
     pub fn get_ptr_type_id(
@@ -1110,6 +1096,43 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
             .into()
     }
 
+    pub fn get_ptr_va_list(
+        &self,
+        ptr: Pointer>,
+    ) -> InterpResult<'tcx, &VecDeque>> {
+        trace!("get_ptr_va_list({:?})", ptr);
+        let (alloc_id, offset, _prov) = self.ptr_get_alloc_id(ptr, 0)?;
+        if offset.bytes() != 0 {
+            throw_ub!(InvalidVaListPointer(Pointer::new(alloc_id, offset)))
+        }
+
+        let Some(va_list) = self.memory.va_list_map.get(&alloc_id) else {
+            throw_ub!(InvalidVaListPointer(Pointer::new(alloc_id, offset)))
+        };
+
+        interp_ok(va_list)
+    }
+
+    /// Removes this VaList from the global map of variable argument lists. This does not deallocate
+    /// the VaList elements, that happens when the Frame is popped.
+    pub fn deallocate_va_list(
+        &mut self,
+        ptr: Pointer>,
+    ) -> InterpResult<'tcx, VecDeque>> {
+        trace!("deallocate_va_list({:?})", ptr);
+        let (alloc_id, offset, _prov) = self.ptr_get_alloc_id(ptr, 0)?;
+        if offset.bytes() != 0 {
+            throw_ub!(InvalidVaListPointer(Pointer::new(alloc_id, offset)))
+        }
+
+        let Some(va_list) = self.memory.va_list_map.swap_remove(&alloc_id) else {
+            throw_ub!(InvalidVaListPointer(Pointer::new(alloc_id, offset)))
+        };
+
+        self.memory.dead_alloc_map.insert(alloc_id, (Size::ZERO, Align::ONE));
+        interp_ok(va_list)
+    }
+
     /// Get the dynamic type of the given vtable pointer.
     /// If `expected_trait` is `Some`, it must be a vtable for the given trait.
     pub fn get_ptr_vtable_ty(
diff --git a/compiler/rustc_const_eval/src/interpret/stack.rs b/compiler/rustc_const_eval/src/interpret/stack.rs
index 9b2d99bb297f..1b8af1c44277 100644
--- a/compiler/rustc_const_eval/src/interpret/stack.rs
+++ b/compiler/rustc_const_eval/src/interpret/stack.rs
@@ -12,11 +12,12 @@ use rustc_middle::ty::{self, Ty, TyCtxt};
 use rustc_middle::{bug, mir};
 use rustc_mir_dataflow::impls::always_storage_live_locals;
 use rustc_span::Span;
+use rustc_target::callconv::ArgAbi;
 use tracing::field::Empty;
 use tracing::{info_span, instrument, trace};
 
 use super::{
-    AllocId, CtfeProvenance, Immediate, InterpCx, InterpResult, MPlaceTy, Machine, MemPlace,
+    AllocId, CtfeProvenance, FnArg, Immediate, InterpCx, InterpResult, MPlaceTy, Machine, MemPlace,
     MemPlaceMeta, MemoryKind, Operand, PlaceTy, Pointer, Provenance, ReturnAction, Scalar,
     from_known_layout, interp_ok, throw_ub, throw_unsup,
 };
@@ -455,15 +456,12 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
         };
 
         let return_action = if cleanup {
-            // We need to take the locals out, since we need to mutate while iterating.
             for local in &frame.locals {
                 self.deallocate_local(local.value)?;
             }
 
             // Deallocate any c-variadic arguments.
-            for mplace in &frame.va_list {
-                self.deallocate_vararg(mplace)?;
-            }
+            self.deallocate_varargs(&frame.va_list)?;
 
             // Call the machine hook, which determines the next steps.
             let return_action = M::after_stack_pop(self, frame, unwinding)?;
@@ -610,22 +608,6 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
         interp_ok(())
     }
 
-    fn deallocate_vararg(&mut self, vararg: &MPlaceTy<'tcx, M::Provenance>) -> InterpResult<'tcx> {
-        let ptr = vararg.ptr();
-
-        // FIXME: is the `unwrap` valid here?
-        trace!(
-            "deallocating vararg {:?}: {:?}",
-            vararg,
-            // FIXME: what do we do with this comment?
-            // Locals always have a `alloc_id` (they are never the result of a int2ptr).
-            self.dump_alloc(ptr.provenance.unwrap().get_alloc_id().unwrap())
-        );
-        self.deallocate_ptr(ptr, None, MemoryKind::Stack)?;
-
-        interp_ok(())
-    }
-
     /// This is public because it is used by [Aquascope](https://github.com/cognitive-engineering-lab/aquascope/)
     /// to analyze all the locals in a stack frame.
     #[inline(always)]
@@ -653,6 +635,58 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
     }
 }
 
+impl<'a, 'tcx: 'a, M: Machine<'tcx>> InterpCx<'tcx, M> {
+    /// Consume the arguments provided by the iterator and store them as a list
+    /// of variadic arguments. Return a list of the places that hold those arguments.
+    pub(crate) fn allocate_varargs(
+        &mut self,
+        caller_args: &mut I,
+        callee_abis: &mut J,
+    ) -> InterpResult<'tcx, Vec>>
+    where
+        I: Iterator, &'a ArgAbi<'tcx, Ty<'tcx>>)>,
+        J: Iterator>)>,
+    {
+        // Consume the remaining arguments and store them in fresh allocations.
+        let mut varargs = Vec::new();
+        for (fn_arg, caller_abi) in caller_args {
+            // The callee ABI is entirely computed based on which arguments the caller has
+            // provided so it should not be possible to get a mismatch here.
+            let (_idx, callee_abi) = callee_abis.next().unwrap();
+            assert!(self.check_argument_compat(caller_abi, callee_abi)?);
+            // FIXME: do we have to worry about in-place argument passing?
+            let op = self.copy_fn_arg(fn_arg);
+            let mplace = self.allocate(op.layout, MemoryKind::Stack)?;
+            self.copy_op(&op, &mplace)?;
+
+            varargs.push(mplace);
+        }
+        assert!(callee_abis.next().is_none());
+
+        interp_ok(varargs)
+    }
+
+    /// Deallocate the variadic arguments in the list (that must have been created with `allocate_varargs`).
+    fn deallocate_varargs(
+        &mut self,
+        varargs: &[MPlaceTy<'tcx, M::Provenance>],
+    ) -> InterpResult<'tcx> {
+        for vararg in varargs {
+            let ptr = vararg.ptr();
+
+            trace!(
+                "deallocating vararg {:?}: {:?}",
+                vararg,
+                // Locals always have a `alloc_id` (they are never the result of a int2ptr).
+                self.dump_alloc(ptr.provenance.unwrap().get_alloc_id().unwrap())
+            );
+            self.deallocate_ptr(ptr, None, MemoryKind::Stack)?;
+        }
+
+        interp_ok(())
+    }
+}
+
 impl<'tcx, Prov: Provenance> LocalState<'tcx, Prov> {
     pub(super) fn print(
         &self,
diff --git a/compiler/rustc_middle/src/mir/interpret/error.rs b/compiler/rustc_middle/src/mir/interpret/error.rs
index 970dbd95f7cc..035ffd362a6b 100644
--- a/compiler/rustc_middle/src/mir/interpret/error.rs
+++ b/compiler/rustc_middle/src/mir/interpret/error.rs
@@ -404,6 +404,8 @@ pub enum UndefinedBehaviorInfo<'tcx> {
     InvalidTag(Scalar),
     /// Using a pointer-not-to-a-function as function pointer.
     InvalidFunctionPointer(Pointer),
+    /// Using a pointer-not-to-a-va-list as variable argument list pointer.
+    InvalidVaListPointer(Pointer),
     /// Using a pointer-not-to-a-vtable as vtable pointer.
     InvalidVTablePointer(Pointer),
     /// Using a vtable for the wrong trait.
@@ -438,6 +440,10 @@ pub enum UndefinedBehaviorInfo<'tcx> {
     AbiMismatchReturn { caller_ty: Ty<'tcx>, callee_ty: Ty<'tcx> },
     /// `va_arg` was called on an exhausted `VaList`.
     VaArgOutOfBounds,
+    /// The caller and callee disagree on whether they are c-variadic or not.
+    CVariadicMismatch { caller_is_c_variadic: bool, callee_is_c_variadic: bool },
+    /// The caller and callee disagree on the number of fixed (i.e. non-c-variadic) arguments.
+    CVariadicFixedCountMismatch { caller: u32, callee: u32 },
 }
 
 #[derive(Debug, Clone, Copy)]
diff --git a/src/tools/miri/src/alloc_addresses/mod.rs b/src/tools/miri/src/alloc_addresses/mod.rs
index 59799ac613b8..32897eb89a83 100644
--- a/src/tools/miri/src/alloc_addresses/mod.rs
+++ b/src/tools/miri/src/alloc_addresses/mod.rs
@@ -184,8 +184,8 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
                 }
                 #[cfg(not(all(unix, feature = "native-lib")))]
                 AllocKind::Function => dummy_alloc(params),
-                AllocKind::VTable => dummy_alloc(params),
-                AllocKind::TypeId | AllocKind::Dead | AllocKind::VaList => unreachable!(),
+                AllocKind::VTable | AllocKind::VaList => dummy_alloc(params),
+                AllocKind::TypeId | AllocKind::Dead => unreachable!(),
             };
             // We don't have to expose this pointer yet, we do that in `prepare_for_native_call`.
             return interp_ok(base_ptr.addr().to_u64());
@@ -363,8 +363,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
             ProvenanceMode::Default => {
                 // The first time this happens at a particular location, print a warning.
                 static DEDUP: SpanDedupDiagnostic = SpanDedupDiagnostic::new();
-                this.dedup_diagnostic(&DEDUP, |first| NonHaltingDiagnostic::Int2Ptr {
-                    details: first,
+                this.dedup_diagnostic(&DEDUP, |first| {
+                    NonHaltingDiagnostic::Int2Ptr { details: first }
                 });
             }
             ProvenanceMode::Strict => {
diff --git a/src/tools/miri/tests/fail/c-variadic-mismatch-count.rs b/src/tools/miri/tests/fail/c-variadic-mismatch-count.rs
new file mode 100644
index 000000000000..c01860cd1df9
--- /dev/null
+++ b/src/tools/miri/tests/fail/c-variadic-mismatch-count.rs
@@ -0,0 +1,13 @@
+#![feature(c_variadic)]
+
+unsafe extern "C" fn helper(_: i32, _: ...) {}
+
+fn main() {
+    unsafe {
+        let f = helper as *const ();
+        let f = std::mem::transmute::<_, unsafe extern "C" fn(...)>(f);
+
+        f(1);
+        //~^ ERROR: Undefined Behavior
+    }
+}
diff --git a/src/tools/miri/tests/fail/c-variadic-mismatch-count.stderr b/src/tools/miri/tests/fail/c-variadic-mismatch-count.stderr
new file mode 100644
index 000000000000..9350b9986196
--- /dev/null
+++ b/src/tools/miri/tests/fail/c-variadic-mismatch-count.stderr
@@ -0,0 +1,13 @@
+error: Undefined Behavior: calling a C-variadic function with 0 fixed arguments, but the function expects 1
+  --> tests/fail/c-variadic-mismatch-count.rs:LL:CC
+   |
+LL |         f(1);
+   |         ^^^^ Undefined Behavior occurred here
+   |
+   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
+   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
+
+note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
+
+error: aborting due to 1 previous error
+
diff --git a/src/tools/miri/tests/fail/c-variadic-mismatch.rs b/src/tools/miri/tests/fail/c-variadic-mismatch.rs
new file mode 100644
index 000000000000..bf44fb00bcee
--- /dev/null
+++ b/src/tools/miri/tests/fail/c-variadic-mismatch.rs
@@ -0,0 +1,13 @@
+#![feature(c_variadic)]
+
+unsafe extern "C" fn helper(_: i32, _: ...) {}
+
+fn main() {
+    unsafe {
+        let f = helper as *const ();
+        let f = std::mem::transmute::<_, unsafe extern "C" fn(_: i32, _: i64)>(f);
+
+        f(1i32, 1i64);
+        //~^ ERROR: Undefined Behavior: calling a function where the caller and callee disagree on whether the function is C-variadic
+    }
+}
diff --git a/src/tools/miri/tests/fail/c-variadic-mismatch.stderr b/src/tools/miri/tests/fail/c-variadic-mismatch.stderr
new file mode 100644
index 000000000000..a68b96f738d2
--- /dev/null
+++ b/src/tools/miri/tests/fail/c-variadic-mismatch.stderr
@@ -0,0 +1,13 @@
+error: Undefined Behavior: calling a function where the caller and callee disagree on whether the function is C-variadic
+  --> tests/fail/c-variadic-mismatch.rs:LL:CC
+   |
+LL |         f(1i32, 1i64);
+   |         ^^^^^^^^^^^^^ Undefined Behavior occurred here
+   |
+   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
+   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
+
+note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
+
+error: aborting due to 1 previous error
+
diff --git a/src/tools/miri/tests/fail/c-variadic.rs b/src/tools/miri/tests/fail/c-variadic.rs
new file mode 100644
index 000000000000..38141c23d08d
--- /dev/null
+++ b/src/tools/miri/tests/fail/c-variadic.rs
@@ -0,0 +1,15 @@
+#![feature(c_variadic)]
+
+//@error-in-other-file: Undefined Behavior: more C-variadic arguments read than were passed
+
+fn read_too_many() {
+    unsafe extern "C" fn variadic(mut ap: ...) {
+        ap.arg::();
+    }
+
+    unsafe { variadic() };
+}
+
+fn main() {
+    read_too_many();
+}
diff --git a/src/tools/miri/tests/fail/c-variadic.stderr b/src/tools/miri/tests/fail/c-variadic.stderr
new file mode 100644
index 000000000000..31695f1cab49
--- /dev/null
+++ b/src/tools/miri/tests/fail/c-variadic.stderr
@@ -0,0 +1,22 @@
+error: Undefined Behavior: more C-variadic arguments read than were passed
+  --> RUSTLIB/core/src/ffi/va_list.rs:LL:CC
+   |
+LL |         unsafe { va_arg(self) }
+   |                  ^^^^^^^^^^^^ Undefined Behavior occurred here
+   |
+   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
+   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
+   = note: stack backtrace:
+           0: std::ffi::VaList::<'_>::arg
+               at RUSTLIB/core/src/ffi/va_list.rs:LL:CC
+           1: read_too_many::variadic
+               at tests/fail/c-variadic.rs:LL:CC
+           2: read_too_many
+               at tests/fail/c-variadic.rs:LL:CC
+           3: main
+               at tests/fail/c-variadic.rs:LL:CC
+
+note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
+
+error: aborting due to 1 previous error
+
diff --git a/src/tools/miri/tests/pass/c-variadic.rs b/src/tools/miri/tests/pass/c-variadic.rs
index a1f03db6872f..8b353885699e 100644
--- a/src/tools/miri/tests/pass/c-variadic.rs
+++ b/src/tools/miri/tests/pass/c-variadic.rs
@@ -1,18 +1,115 @@
 #![feature(c_variadic)]
 
-use core::ffi::VaList;
+use std::ffi::{CStr, VaList, c_char, c_double, c_int, c_long};
 
-fn helper(ap: VaList) -> i32 {
-    // unsafe { ap.arg::() }
-    let _ = ap;
-    0
+fn ignores_arguments() {
+    unsafe extern "C" fn variadic(_: ...) {}
+
+    unsafe { variadic() };
+    unsafe { variadic(1, 2, 3) };
 }
 
-unsafe extern "C" fn variadic(a: i32, ap: ...) -> i32 {
-    assert_eq!(a, 42);
-    helper(ap)
+fn echo() {
+    unsafe extern "C" fn variadic(mut ap: ...) -> i32 {
+        ap.arg()
+    }
+
+    assert_eq!(unsafe { variadic(1) }, 1);
+    assert_eq!(unsafe { variadic(3, 2, 1) }, 3);
+}
+
+fn forward_by_val() {
+    unsafe fn helper(mut ap: VaList) -> i32 {
+        ap.arg()
+    }
+
+    unsafe extern "C" fn variadic(ap: ...) -> i32 {
+        helper(ap)
+    }
+
+    assert_eq!(unsafe { variadic(1) }, 1);
+    assert_eq!(unsafe { variadic(3, 2, 1) }, 3);
+}
+
+fn forward_by_ref() {
+    unsafe fn helper(ap: &mut VaList) -> i32 {
+        ap.arg()
+    }
+
+    unsafe extern "C" fn variadic(mut ap: ...) -> i32 {
+        helper(&mut ap)
+    }
+
+    assert_eq!(unsafe { variadic(1) }, 1);
+    assert_eq!(unsafe { variadic(3, 2, 1) }, 3);
+}
+
+#[allow(improper_ctypes_definitions)]
+fn nested() {
+    unsafe fn helper(mut ap1: VaList, mut ap2: VaList) -> (i32, i32) {
+        (ap1.arg(), ap2.arg())
+    }
+
+    unsafe extern "C" fn variadic2(ap1: VaList, ap2: ...) -> (i32, i32) {
+        helper(ap1, ap2)
+    }
+
+    unsafe extern "C" fn variadic1(ap1: ...) -> (i32, i32) {
+        variadic2(ap1, 2, 2)
+    }
+
+    assert_eq!(unsafe { variadic1(1) }, (1, 2));
+
+    let (a, b) = unsafe { variadic1(1, 1) };
+
+    assert_eq!(a, 1);
+    assert_eq!(b, 2);
+}
+
+fn various_types() {
+    unsafe extern "C" fn check_list_2(mut ap: ...) {
+        macro_rules! continue_if {
+            ($cond:expr) => {
+                if !($cond) {
+                    panic!();
+                }
+            };
+        }
+
+        unsafe fn compare_c_str(ptr: *const c_char, val: &str) -> bool {
+            match CStr::from_ptr(ptr).to_str() {
+                Ok(cstr) => cstr == val,
+                Err(_) => panic!(),
+            }
+        }
+
+        continue_if!(ap.arg::().floor() == 3.14f64.floor());
+        continue_if!(ap.arg::() == 12);
+        continue_if!(ap.arg::() == 'a' as c_int);
+        continue_if!(ap.arg::().floor() == 6.18f64.floor());
+        continue_if!(compare_c_str(ap.arg::<*const c_char>(), "Hello"));
+        continue_if!(ap.arg::() == 42);
+        continue_if!(compare_c_str(ap.arg::<*const c_char>(), "World"));
+    }
+
+    unsafe {
+        check_list_2(
+            3.14 as c_double,
+            12 as c_long,
+            b'a' as c_int,
+            6.28 as c_double,
+            c"Hello".as_ptr(),
+            42 as c_int,
+            c"World".as_ptr(),
+        );
+    }
 }
 
 fn main() {
-    assert_eq!(unsafe { variadic(42, 1) }, 1);
+    ignores_arguments();
+    echo();
+    forward_by_val();
+    forward_by_ref();
+    nested();
+    various_types();
 }
diff --git a/tests/ui/consts/const-eval/c-variadic-fail.rs b/tests/ui/consts/const-eval/c-variadic-fail.rs
index 37810ddb356d..859dfed35719 100644
--- a/tests/ui/consts/const-eval/c-variadic-fail.rs
+++ b/tests/ui/consts/const-eval/c-variadic-fail.rs
@@ -7,6 +7,7 @@
 #![feature(const_clone)]
 
 use std::ffi::VaList;
+use std::mem::MaybeUninit;
 
 const unsafe extern "C" fn read_n(mut ap: ...) {
     let mut i = N;
@@ -77,23 +78,13 @@ fn use_after_free() {
     };
 }
 
-macro_rules! va_list_copy {
-    ($ap:expr) => {{
-        // A copy created using Clone is valid, and can be used to read arguments.
-        let mut copy = $ap.clone();
-        assert!(copy.arg::() == 1i32);
-
-        let mut u = core::mem::MaybeUninit::uninit();
-        unsafe { core::ptr::copy_nonoverlapping(&$ap, u.as_mut_ptr(), 1) };
-
-        // Manually creating the copy is fine.
-        unsafe { u.assume_init() }
-    }};
-}
-
 fn manual_copy_drop() {
     const unsafe extern "C" fn helper(ap: ...) {
-        let mut copy: VaList = va_list_copy!(ap);
+        // A copy created using Clone is valid, and can be used to read arguments.
+        let mut copy = ap.clone();
+        assert!(copy.arg::() == 1i32);
+
+        let mut copy: VaList = unsafe { std::mem::transmute_copy(&ap) };
 
         // Using the copy is actually fine.
         let _ = copy.arg::();
@@ -104,12 +95,12 @@ fn manual_copy_drop() {
     }
 
     const { unsafe { helper(1, 2, 3) } };
-    //~^ ERROR va_end on unknown va_list allocation ALLOC0 [E0080]
+    //~^ ERROR using ALLOC0 as variable argument list pointer but it does not point to a variable argument list [E0080]
 }
 
 fn manual_copy_forget() {
     const unsafe extern "C" fn helper(ap: ...) {
-        let mut copy: VaList = va_list_copy!(ap);
+        let mut copy: VaList = unsafe { std::mem::transmute_copy(&ap) };
 
         // Using the copy is actually fine.
         let _ = copy.arg::();
@@ -120,12 +111,12 @@ fn manual_copy_forget() {
     }
 
     const { unsafe { helper(1, 2, 3) } };
-    //~^ ERROR va_end on unknown va_list allocation ALLOC0 [E0080]
+    //~^ ERROR using ALLOC0 as variable argument list pointer but it does not point to a variable argument list [E0080]
 }
 
 fn manual_copy_read() {
     const unsafe extern "C" fn helper(mut ap: ...) {
-        let mut copy: VaList = va_list_copy!(ap);
+        let mut copy: VaList = unsafe { std::mem::transmute_copy(&ap) };
 
         // Reading from `ap` after reading from `copy` is UB.
         let _ = copy.arg::();
@@ -133,7 +124,15 @@ fn manual_copy_read() {
     }
 
     const { unsafe { helper(1, 2, 3) } };
-    //~^ ERROR va_arg on unknown va_list allocation ALLOC0
+    //~^ ERROR using ALLOC0 as variable argument list pointer but it does not point to a variable argument list [E0080]
+}
+
+fn drop_of_invalid() {
+    const {
+        let mut invalid: MaybeUninit = MaybeUninit::zeroed();
+        let ap = unsafe { invalid.assume_init() };
+    }
+    //~^ ERROR pointer not dereferenceable: pointer must point to some allocation, but got null pointer [E0080]
 }
 
 fn main() {
@@ -143,5 +142,6 @@ fn main() {
         manual_copy_read();
         manual_copy_drop();
         manual_copy_forget();
+        drop_of_invalid();
     }
 }
diff --git a/tests/ui/consts/const-eval/c-variadic-fail.stderr b/tests/ui/consts/const-eval/c-variadic-fail.stderr
index 4c569a4492d4..14da5500cb1b 100644
--- a/tests/ui/consts/const-eval/c-variadic-fail.stderr
+++ b/tests/ui/consts/const-eval/c-variadic-fail.stderr
@@ -1,11 +1,11 @@
 error[E0080]: more C-variadic arguments read than were passed
-  --> $DIR/c-variadic-fail.rs:27:13
+  --> $DIR/c-variadic-fail.rs:28:13
    |
 LL |     const { read_n::<1>() }
    |             ^^^^^^^^^^^^^ evaluation of `read_too_many::{constant#2}` failed inside this call
    |
 note: inside `read_n::<1>`
-  --> $DIR/c-variadic-fail.rs:15:17
+  --> $DIR/c-variadic-fail.rs:16:17
    |
 LL |         let _ = ap.arg::();
    |                 ^^^^^^^^^^^^^^^
@@ -13,13 +13,13 @@ note: inside `VaList::<'_>::arg::`
   --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:27:5
+  --> $DIR/c-variadic-fail.rs:28:5
    |
 LL |     const { read_n::<1>() }
    |     ^^^^^^^^^^^^^^^^^^^^^^^
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:27:5
+  --> $DIR/c-variadic-fail.rs:28:5
    |
 LL |     const { read_n::<1>() }
    |     ^^^^^^^^^^^^^^^^^^^^^^^
@@ -27,13 +27,13 @@ LL |     const { read_n::<1>() }
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0080]: more C-variadic arguments read than were passed
-  --> $DIR/c-variadic-fail.rs:31:13
+  --> $DIR/c-variadic-fail.rs:32:13
    |
 LL |     const { read_n::<2>(1) }
    |             ^^^^^^^^^^^^^^ evaluation of `read_too_many::{constant#3}` failed inside this call
    |
 note: inside `read_n::<2>`
-  --> $DIR/c-variadic-fail.rs:15:17
+  --> $DIR/c-variadic-fail.rs:16:17
    |
 LL |         let _ = ap.arg::();
    |                 ^^^^^^^^^^^^^^^
@@ -41,13 +41,13 @@ note: inside `VaList::<'_>::arg::`
   --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:31:5
+  --> $DIR/c-variadic-fail.rs:32:5
    |
 LL |     const { read_n::<2>(1) }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:31:5
+  --> $DIR/c-variadic-fail.rs:32:5
    |
 LL |     const { read_n::<2>(1) }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -55,13 +55,13 @@ LL |     const { read_n::<2>(1) }
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0080]: va_arg type mismatch: requested `u32`, but next argument is `i32`
-  --> $DIR/c-variadic-fail.rs:49:13
+  --> $DIR/c-variadic-fail.rs:50:13
    |
 LL |     const { read_as::(1i32) };
    |             ^^^^^^^^^^^^^^^^^^^^ evaluation of `read_cast::{constant#6}` failed inside this call
    |
 note: inside `read_as::`
-  --> $DIR/c-variadic-fail.rs:36:5
+  --> $DIR/c-variadic-fail.rs:37:5
    |
 LL |     ap.arg::()
    |     ^^^^^^^^^^^^^
@@ -69,13 +69,13 @@ note: inside `VaList::<'_>::arg::`
   --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:49:5
+  --> $DIR/c-variadic-fail.rs:50:5
    |
 LL |     const { read_as::(1i32) };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:49:5
+  --> $DIR/c-variadic-fail.rs:50:5
    |
 LL |     const { read_as::(1i32) };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -83,13 +83,13 @@ LL |     const { read_as::(1i32) };
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0080]: va_arg type mismatch: requested `i32`, but next argument is `u32`
-  --> $DIR/c-variadic-fail.rs:52:13
+  --> $DIR/c-variadic-fail.rs:53:13
    |
 LL |     const { read_as::(1u32) };
    |             ^^^^^^^^^^^^^^^^^^^^ evaluation of `read_cast::{constant#7}` failed inside this call
    |
 note: inside `read_as::`
-  --> $DIR/c-variadic-fail.rs:36:5
+  --> $DIR/c-variadic-fail.rs:37:5
    |
 LL |     ap.arg::()
    |     ^^^^^^^^^^^^^
@@ -97,13 +97,13 @@ note: inside `VaList::<'_>::arg::`
   --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:52:5
+  --> $DIR/c-variadic-fail.rs:53:5
    |
 LL |     const { read_as::(1u32) };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:52:5
+  --> $DIR/c-variadic-fail.rs:53:5
    |
 LL |     const { read_as::(1u32) };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -111,13 +111,13 @@ LL |     const { read_as::(1u32) };
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0080]: va_arg type mismatch: requested `i32`, but next argument is `u64`
-  --> $DIR/c-variadic-fail.rs:55:13
+  --> $DIR/c-variadic-fail.rs:56:13
    |
 LL |     const { read_as::(1u64) };
    |             ^^^^^^^^^^^^^^^^^^^^ evaluation of `read_cast::{constant#8}` failed inside this call
    |
 note: inside `read_as::`
-  --> $DIR/c-variadic-fail.rs:36:5
+  --> $DIR/c-variadic-fail.rs:37:5
    |
 LL |     ap.arg::()
    |     ^^^^^^^^^^^^^
@@ -125,13 +125,13 @@ note: inside `VaList::<'_>::arg::`
   --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:55:5
+  --> $DIR/c-variadic-fail.rs:56:5
    |
 LL |     const { read_as::(1u64) };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:55:5
+  --> $DIR/c-variadic-fail.rs:56:5
    |
 LL |     const { read_as::(1u64) };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -139,13 +139,13 @@ LL |     const { read_as::(1u64) };
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0080]: va_arg type mismatch: requested `f64`, but next argument is `i32`
-  --> $DIR/c-variadic-fail.rs:58:13
+  --> $DIR/c-variadic-fail.rs:59:13
    |
 LL |     const { read_as::(1i32) };
    |             ^^^^^^^^^^^^^^^^^^^^ evaluation of `read_cast::{constant#9}` failed inside this call
    |
 note: inside `read_as::`
-  --> $DIR/c-variadic-fail.rs:36:5
+  --> $DIR/c-variadic-fail.rs:37:5
    |
 LL |     ap.arg::()
    |     ^^^^^^^^^^^^^
@@ -153,13 +153,13 @@ note: inside `VaList::<'_>::arg::`
   --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:58:5
+  --> $DIR/c-variadic-fail.rs:59:5
    |
 LL |     const { read_as::(1i32) };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:58:5
+  --> $DIR/c-variadic-fail.rs:59:5
    |
 LL |     const { read_as::(1i32) };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -167,13 +167,13 @@ LL |     const { read_as::(1i32) };
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0080]: va_arg type mismatch: requested `*const u8`, but next argument is `i32`
-  --> $DIR/c-variadic-fail.rs:61:13
+  --> $DIR/c-variadic-fail.rs:62:13
    |
 LL |     const { read_as::<*const u8>(1i32) };
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `read_cast::{constant#10}` failed inside this call
    |
 note: inside `read_as::<*const u8>`
-  --> $DIR/c-variadic-fail.rs:36:5
+  --> $DIR/c-variadic-fail.rs:37:5
    |
 LL |     ap.arg::()
    |     ^^^^^^^^^^^^^
@@ -181,13 +181,13 @@ note: inside `VaList::<'_>::arg::<*const u8>`
   --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:61:5
+  --> $DIR/c-variadic-fail.rs:62:5
    |
 LL |     const { read_as::<*const u8>(1i32) };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:61:5
+  --> $DIR/c-variadic-fail.rs:62:5
    |
 LL |     const { read_as::<*const u8>(1i32) };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -195,7 +195,7 @@ LL |     const { read_as::<*const u8>(1i32) };
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0080]: memory access failed: ALLOC0 has been freed, so this pointer is dangling
-  --> $DIR/c-variadic-fail.rs:74:13
+  --> $DIR/c-variadic-fail.rs:75:13
    |
 LL |             ap.arg::();
    |             ^^^^^^^^^^^^^^^ evaluation of `use_after_free::{constant#0}` failed inside this call
@@ -204,7 +204,7 @@ note: inside `VaList::<'_>::arg::`
   --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:70:5
+  --> $DIR/c-variadic-fail.rs:71:5
    |
 LL | /     const {
 LL | |         unsafe {
@@ -215,7 +215,7 @@ LL | |     };
    | |_____^
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:70:5
+  --> $DIR/c-variadic-fail.rs:71:5
    |
 LL | /     const {
 LL | |         unsafe {
@@ -227,14 +227,14 @@ LL | |     };
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0080]: va_end on unknown va_list allocation ALLOC1
-  --> $DIR/c-variadic-fail.rs:106:22
+error[E0080]: using ALLOC1 as variable argument list pointer but it does not point to a variable argument list
+  --> $DIR/c-variadic-fail.rs:97:22
    |
 LL |     const { unsafe { helper(1, 2, 3) } };
    |                      ^^^^^^^^^^^^^^^ evaluation of `manual_copy_drop::{constant#0}` failed inside this call
    |
 note: inside `manual_copy_drop::helper`
-  --> $DIR/c-variadic-fail.rs:103:9
+  --> $DIR/c-variadic-fail.rs:94:9
    |
 LL |         drop(ap);
    |         ^^^^^^^^
@@ -246,27 +246,27 @@ note: inside ` as Drop>::drop`
   --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:106:5
+  --> $DIR/c-variadic-fail.rs:97:5
    |
 LL |     const { unsafe { helper(1, 2, 3) } };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:106:5
+  --> $DIR/c-variadic-fail.rs:97:5
    |
 LL |     const { unsafe { helper(1, 2, 3) } };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0080]: va_end on unknown va_list allocation ALLOC2
-  --> $DIR/c-variadic-fail.rs:122:22
+error[E0080]: using ALLOC2 as variable argument list pointer but it does not point to a variable argument list
+  --> $DIR/c-variadic-fail.rs:113:22
    |
 LL |     const { unsafe { helper(1, 2, 3) } };
    |                      ^^^^^^^^^^^^^^^ evaluation of `manual_copy_forget::{constant#0}` failed inside this call
    |
 note: inside `manual_copy_forget::helper`
-  --> $DIR/c-variadic-fail.rs:119:9
+  --> $DIR/c-variadic-fail.rs:110:9
    |
 LL |         drop(ap);
    |         ^^^^^^^^
@@ -278,27 +278,27 @@ note: inside ` as Drop>::drop`
   --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:122:5
+  --> $DIR/c-variadic-fail.rs:113:5
    |
 LL |     const { unsafe { helper(1, 2, 3) } };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:122:5
+  --> $DIR/c-variadic-fail.rs:113:5
    |
 LL |     const { unsafe { helper(1, 2, 3) } };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0080]: va_arg on unknown va_list allocation ALLOC3
-  --> $DIR/c-variadic-fail.rs:135:22
+error[E0080]: using ALLOC3 as variable argument list pointer but it does not point to a variable argument list
+  --> $DIR/c-variadic-fail.rs:126:22
    |
 LL |     const { unsafe { helper(1, 2, 3) } };
    |                      ^^^^^^^^^^^^^^^ evaluation of `manual_copy_read::{constant#0}` failed inside this call
    |
 note: inside `manual_copy_read::helper`
-  --> $DIR/c-variadic-fail.rs:132:17
+  --> $DIR/c-variadic-fail.rs:123:17
    |
 LL |         let _ = ap.arg::();
    |                 ^^^^^^^^^^^^^^^
@@ -306,19 +306,50 @@ note: inside `VaList::<'_>::arg::`
   --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:135:5
+  --> $DIR/c-variadic-fail.rs:126:5
    |
 LL |     const { unsafe { helper(1, 2, 3) } };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 note: erroneous constant encountered
-  --> $DIR/c-variadic-fail.rs:135:5
+  --> $DIR/c-variadic-fail.rs:126:5
    |
 LL |     const { unsafe { helper(1, 2, 3) } };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: aborting due to 11 previous errors
+error[E0080]: pointer not dereferenceable: pointer must point to some allocation, but got null pointer
+  --> $DIR/c-variadic-fail.rs:134:5
+   |
+LL |     }
+   |     ^ evaluation of `drop_of_invalid::{constant#0}` failed inside this call
+   |
+note: inside `drop_in_place::> - shim(Some(VaList<'_>))`
+  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+note: inside ` as Drop>::drop`
+  --> $SRC_DIR/core/src/ffi/va_list.rs:LL:COL
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:131:5
+   |
+LL | /     const {
+LL | |         let mut invalid: MaybeUninit = MaybeUninit::zeroed();
+LL | |         let ap = unsafe { invalid.assume_init() };
+LL | |     }
+   | |_____^
+
+note: erroneous constant encountered
+  --> $DIR/c-variadic-fail.rs:131:5
+   |
+LL | /     const {
+LL | |         let mut invalid: MaybeUninit = MaybeUninit::zeroed();
+LL | |         let ap = unsafe { invalid.assume_init() };
+LL | |     }
+   | |_____^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 12 previous errors
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/parser/variadic-ffi-semantic-restrictions.rs b/tests/ui/parser/variadic-ffi-semantic-restrictions.rs
index 41d9e73b69e8..4e038875d78f 100644
--- a/tests/ui/parser/variadic-ffi-semantic-restrictions.rs
+++ b/tests/ui/parser/variadic-ffi-semantic-restrictions.rs
@@ -32,14 +32,17 @@ extern "C" fn f3_3(_: ..., x: isize) {}
 
 const unsafe extern "C" fn f4_1(x: isize, _: ...) {}
 //~^ ERROR destructor of `VaList<'_>` cannot be evaluated at compile-time
+//~| ERROR c-variadic const function definitions are unstable
 
 const extern "C" fn f4_2(x: isize, _: ...) {}
 //~^ ERROR functions with a C variable argument list must be unsafe
 //~| ERROR destructor of `VaList<'_>` cannot be evaluated at compile-time
+//~| ERROR c-variadic const function definitions are unstable
 
 const extern "C" fn f4_3(_: ..., x: isize, _: ...) {}
 //~^ ERROR functions with a C variable argument list must be unsafe
 //~| ERROR `...` must be the last argument of a C-variadic function
+//~| ERROR c-variadic const function definitions are unstable
 
 extern "C" {
     fn e_f2(..., x: isize);
@@ -62,6 +65,7 @@ impl X {
     const fn i_f5(x: isize, _: ...) {}
     //~^ ERROR `...` is not supported for non-extern functions
     //~| ERROR destructor of `VaList<'_>` cannot be evaluated at compile-time
+    //~| ERROR c-variadic const function definitions are unstable
 }
 
 trait T {
diff --git a/tests/ui/parser/variadic-ffi-semantic-restrictions.stderr b/tests/ui/parser/variadic-ffi-semantic-restrictions.stderr
index 26d5cdaf995a..ea9f9baa58ba 100644
--- a/tests/ui/parser/variadic-ffi-semantic-restrictions.stderr
+++ b/tests/ui/parser/variadic-ffi-semantic-restrictions.stderr
@@ -80,8 +80,28 @@ error: `...` must be the last argument of a C-variadic function
 LL | extern "C" fn f3_3(_: ..., x: isize) {}
    |                    ^^^^^^
 
+error[E0658]: c-variadic const function definitions are unstable
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:33:1
+   |
+LL | const unsafe extern "C" fn f4_1(x: isize, _: ...) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #151787  for more information
+   = help: add `#![feature(const_c_variadic)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error[E0658]: c-variadic const function definitions are unstable
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:37:1
+   |
+LL | const extern "C" fn f4_2(x: isize, _: ...) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #151787  for more information
+   = help: add `#![feature(const_c_variadic)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
 error: functions with a C variable argument list must be unsafe
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:36:36
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:37:36
    |
 LL | const extern "C" fn f4_2(x: isize, _: ...) {}
    |                                    ^^^^^^
@@ -92,13 +112,23 @@ LL | const unsafe extern "C" fn f4_2(x: isize, _: ...) {}
    |       ++++++
 
 error: `...` must be the last argument of a C-variadic function
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:40:26
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:42:26
    |
 LL | const extern "C" fn f4_3(_: ..., x: isize, _: ...) {}
    |                          ^^^^^^
 
+error[E0658]: c-variadic const function definitions are unstable
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:42:1
+   |
+LL | const extern "C" fn f4_3(_: ..., x: isize, _: ...) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #151787  for more information
+   = help: add `#![feature(const_c_variadic)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
 error: functions with a C variable argument list must be unsafe
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:40:44
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:42:44
    |
 LL | const extern "C" fn f4_3(_: ..., x: isize, _: ...) {}
    |                                            ^^^^^^
@@ -109,13 +139,13 @@ LL | const unsafe extern "C" fn f4_3(_: ..., x: isize, _: ...) {}
    |       ++++++
 
 error: `...` must be the last argument of a C-variadic function
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:45:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:48:13
    |
 LL |     fn e_f2(..., x: isize);
    |             ^^^
 
 error: `...` is not supported for non-extern functions
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:52:23
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:55:23
    |
 LL |     fn i_f1(x: isize, _: ...) {}
    |                       ^^^^^^
@@ -123,7 +153,7 @@ LL |     fn i_f1(x: isize, _: ...) {}
    = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
 error: `...` is not supported for non-extern functions
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:54:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:57:13
    |
 LL |     fn i_f2(_: ...) {}
    |             ^^^^^^
@@ -131,13 +161,13 @@ LL |     fn i_f2(_: ...) {}
    = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
 error: `...` must be the last argument of a C-variadic function
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:56:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:59:13
    |
 LL |     fn i_f3(_: ..., x: isize, _: ...) {}
    |             ^^^^^^
 
 error: `...` is not supported for non-extern functions
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:56:31
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:59:31
    |
 LL |     fn i_f3(_: ..., x: isize, _: ...) {}
    |                               ^^^^^^
@@ -145,21 +175,31 @@ LL |     fn i_f3(_: ..., x: isize, _: ...) {}
    = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
 error: `...` must be the last argument of a C-variadic function
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:59:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:62:13
    |
 LL |     fn i_f4(_: ..., x: isize, _: ...) {}
    |             ^^^^^^
 
 error: `...` is not supported for non-extern functions
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:59:31
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:62:31
    |
 LL |     fn i_f4(_: ..., x: isize, _: ...) {}
    |                               ^^^^^^
    |
    = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
+error[E0658]: c-variadic const function definitions are unstable
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:65:5
+   |
+LL |     const fn i_f5(x: isize, _: ...) {}
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #151787  for more information
+   = help: add `#![feature(const_c_variadic)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
 error: `...` is not supported for non-extern functions
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:62:29
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:65:29
    |
 LL |     const fn i_f5(x: isize, _: ...) {}
    |                             ^^^^^^
@@ -167,7 +207,7 @@ LL |     const fn i_f5(x: isize, _: ...) {}
    = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
 error: `...` is not supported for non-extern functions
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:68:23
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:72:23
    |
 LL |     fn t_f1(x: isize, _: ...) {}
    |                       ^^^^^^
@@ -175,7 +215,7 @@ LL |     fn t_f1(x: isize, _: ...) {}
    = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
 error: `...` is not supported for non-extern functions
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:70:23
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:74:23
    |
 LL |     fn t_f2(x: isize, _: ...);
    |                       ^^^^^^
@@ -183,7 +223,7 @@ LL |     fn t_f2(x: isize, _: ...);
    = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
 error: `...` is not supported for non-extern functions
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:72:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:76:13
    |
 LL |     fn t_f3(_: ...) {}
    |             ^^^^^^
@@ -191,7 +231,7 @@ LL |     fn t_f3(_: ...) {}
    = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
 error: `...` is not supported for non-extern functions
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:74:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:78:13
    |
 LL |     fn t_f4(_: ...);
    |             ^^^^^^
@@ -199,13 +239,13 @@ LL |     fn t_f4(_: ...);
    = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
 
 error: `...` must be the last argument of a C-variadic function
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:76:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:80:13
    |
 LL |     fn t_f5(_: ..., x: isize) {}
    |             ^^^^^^
 
 error: `...` must be the last argument of a C-variadic function
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:78:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:82:13
    |
 LL |     fn t_f6(_: ..., x: isize);
    |             ^^^^^^
@@ -223,7 +263,7 @@ LL | const unsafe extern "C" fn f4_1(x: isize, _: ...) {}
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0493]: destructor of `VaList<'_>` cannot be evaluated at compile-time
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:36:36
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:37:36
    |
 LL | const extern "C" fn f4_2(x: isize, _: ...) {}
    |                                    ^        - value is dropped here
@@ -235,7 +275,7 @@ LL | const extern "C" fn f4_2(x: isize, _: ...) {}
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0493]: destructor of `VaList<'_>` cannot be evaluated at compile-time
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:62:29
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:65:29
    |
 LL |     const fn i_f5(x: isize, _: ...) {}
    |                             ^        - value is dropped here
@@ -246,6 +286,7 @@ LL |     const fn i_f5(x: isize, _: ...) {}
    = help: add `#![feature(const_destruct)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
-error: aborting due to 29 previous errors
+error: aborting due to 33 previous errors
 
-For more information about this error, try `rustc --explain E0493`.
+Some errors have detailed explanations: E0493, E0658.
+For more information about an error, try `rustc --explain E0493`.

From 646418838fc494822f4814e6fd58a59f08d3575a Mon Sep 17 00:00:00 2001
From: Albab-Hasan 
Date: Sat, 14 Feb 2026 22:19:26 +0600
Subject: [PATCH 184/265] fix: handle `ref mut` bindings in
 `contains_explicit_ref_binding`

the standalone `contains_explicit_ref_binding` function only checked for
`BindingAnnotation::Ref`, missing `BindingAnnotation::RefMut`. this caused
`let ref mut x = expr` to incorrectly take the coercion path instead of
preserving the exact type of the rhs expression. the method version used
for match arms already handles both `Ref` and `RefMut` correctly.
---
 .../crates/hir-ty/src/infer/pat.rs            |  2 +-
 .../crates/hir-ty/src/tests/never_type.rs     | 26 +++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/infer/pat.rs b/src/tools/rust-analyzer/crates/hir-ty/src/infer/pat.rs
index 1b8ce5ceaf86..87fd0dace38f 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/infer/pat.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/infer/pat.rs
@@ -673,7 +673,7 @@ impl<'db> InferenceContext<'_, 'db> {
 pub(super) fn contains_explicit_ref_binding(body: &Body, pat_id: PatId) -> bool {
     let mut res = false;
     body.walk_pats(pat_id, &mut |pat| {
-        res |= matches!(body[pat], Pat::Bind { id, .. } if body[id].mode == BindingAnnotation::Ref);
+        res |= matches!(body[pat], Pat::Bind { id, .. } if matches!(body[id].mode, BindingAnnotation::Ref | BindingAnnotation::RefMut));
     });
     res
 }
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/tests/never_type.rs b/src/tools/rust-analyzer/crates/hir-ty/src/tests/never_type.rs
index 4d68179a88b8..a89d97984dfe 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/tests/never_type.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/tests/never_type.rs
@@ -760,6 +760,32 @@ fn coerce_ref_binding() -> ! {
     )
 }
 
+#[test]
+fn diverging_place_match_ref_mut() {
+    check_infer_with_mismatches(
+        r#"
+//- minicore: sized
+fn coerce_ref_mut_binding() -> ! {
+    unsafe {
+        let x: *mut ! = 0 as _;
+        let ref mut _x: () = *x;
+    }
+}
+"#,
+        expect![[r#"
+            33..120 '{     ...   } }': !
+            39..118 'unsafe...     }': !
+            60..61 'x': *mut !
+            72..73 '0': i32
+            72..78 '0 as _': *mut !
+            92..102 'ref mut _x': &'? mut ()
+            109..111 '*x': !
+            110..111 'x': *mut !
+            109..111: expected (), got !
+        "#]],
+    )
+}
+
 #[test]
 fn never_place_isnt_diverging() {
     check_infer_with_mismatches(

From 1c21e6096440b6b5c273ff8a1755e9d534389701 Mon Sep 17 00:00:00 2001
From: Ben Kimock 
Date: Sat, 14 Feb 2026 17:54:44 -0500
Subject: [PATCH 185/265] made -> marked

---
 src/tools/miri/src/concurrency/weak_memory.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tools/miri/src/concurrency/weak_memory.rs b/src/tools/miri/src/concurrency/weak_memory.rs
index 2869152bc39d..3aded9a1454a 100644
--- a/src/tools/miri/src/concurrency/weak_memory.rs
+++ b/src/tools/miri/src/concurrency/weak_memory.rs
@@ -389,7 +389,7 @@ impl<'tcx> StoreBuffer {
             })
             .filter(|&store_elem| {
                 if is_seqcst && store_elem.is_seqcst {
-                    // An SC load needs to ignore all but last store made SC (stores not marked SC are not
+                    // An SC load needs to ignore all but last store marked SC (stores not marked SC are not
                     // affected)
                     let include = !found_sc;
                     found_sc = true;

From 54875f68359ca79638b84420d9d9ca4af0e47909 Mon Sep 17 00:00:00 2001
From: Alex Macleod 
Date: Sat, 14 Feb 2026 17:14:51 +0000
Subject: [PATCH 186/265] Provide all lint group names to Clippy

Unblocks https://github.com/rust-lang/rust-clippy/pull/14689
---
 compiler/rustc_lint/src/context.rs                           | 5 +++++
 .../clippy/clippy_lints/src/cargo/lint_groups_priority.rs    | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs
index 19f3a9b4c062..561bdd1a2db6 100644
--- a/compiler/rustc_lint/src/context.rs
+++ b/compiler/rustc_lint/src/context.rs
@@ -154,6 +154,11 @@ impl LintStore {
             })
     }
 
+    /// Returns all lint group names, including deprecated/aliased groups
+    pub fn get_all_group_names(&self) -> impl Iterator {
+        self.lint_groups.keys().copied()
+    }
+
     pub fn register_early_pass(
         &mut self,
         pass: impl Fn() -> EarlyLintPassObject + 'static + sync::DynSend + sync::DynSync,
diff --git a/src/tools/clippy/clippy_lints/src/cargo/lint_groups_priority.rs b/src/tools/clippy/clippy_lints/src/cargo/lint_groups_priority.rs
index f937f065d6e0..fbf5f72c5361 100644
--- a/src/tools/clippy/clippy_lints/src/cargo/lint_groups_priority.rs
+++ b/src/tools/clippy/clippy_lints/src/cargo/lint_groups_priority.rs
@@ -135,7 +135,7 @@ pub fn check(cx: &LateContext<'_>) {
     {
         let mut rustc_groups = FxHashSet::default();
         let mut clippy_groups = FxHashSet::default();
-        for (group, ..) in unerased_lint_store(cx.tcx.sess).get_lint_groups() {
+        for group in unerased_lint_store(cx.tcx.sess).get_all_group_names() {
             match group.split_once("::") {
                 None => {
                     rustc_groups.insert(group);

From 32e6a1a0ab2b53877e0595677a4ca395f18a08e9 Mon Sep 17 00:00:00 2001
From: Nicholas Nethercote 
Date: Wed, 11 Feb 2026 19:06:33 +1100
Subject: [PATCH 187/265] Remove `QueryContext`.

`rustc_query_system` has been reduced so much that it's no longer
needed. This avoids a lot of indirection and abstraction.
---
 Cargo.lock                                    |   1 -
 .../rustc_incremental/src/assert_dep_graph.rs |   2 +-
 .../rustc_incremental/src/persist/clean.rs    |   2 +-
 compiler/rustc_interface/src/callbacks.rs     |   5 +-
 .../rustc_middle/src/dep_graph/dep_node.rs    |  22 +---
 .../src/dep_graph/dep_node_key.rs             |   2 +-
 compiler/rustc_middle/src/dep_graph/graph.rs  | 101 ++++++++++--------
 compiler/rustc_middle/src/dep_graph/mod.rs    |   4 +-
 compiler/rustc_middle/src/query/mod.rs        |  18 ----
 compiler/rustc_query_impl/Cargo.toml          |   1 -
 .../rustc_query_impl/src/dep_kind_vtables.rs  |   4 +-
 compiler/rustc_query_impl/src/execution.rs    |   4 +-
 compiler/rustc_query_impl/src/plumbing.rs     |  36 +------
 13 files changed, 75 insertions(+), 127 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index 4e0978a8cf21..f9bd9fe60349 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4500,7 +4500,6 @@ dependencies = [
  "rustc_index",
  "rustc_macros",
  "rustc_middle",
- "rustc_query_system",
  "rustc_serialize",
  "rustc_session",
  "rustc_span",
diff --git a/compiler/rustc_incremental/src/assert_dep_graph.rs b/compiler/rustc_incremental/src/assert_dep_graph.rs
index 3447836598bf..a51b86eb72bf 100644
--- a/compiler/rustc_incremental/src/assert_dep_graph.rs
+++ b/compiler/rustc_incremental/src/assert_dep_graph.rs
@@ -45,7 +45,7 @@ use rustc_hir::def_id::{CRATE_DEF_ID, DefId, LocalDefId};
 use rustc_hir::intravisit::{self, Visitor};
 use rustc_middle::bug;
 use rustc_middle::dep_graph::{
-    DepGraphQuery, DepKind, DepNode, DepNodeExt, DepNodeFilter, EdgeFilter, dep_kinds,
+    DepGraphQuery, DepKind, DepNode, DepNodeFilter, EdgeFilter, dep_kinds,
 };
 use rustc_middle::hir::nested_filter;
 use rustc_middle::ty::TyCtxt;
diff --git a/compiler/rustc_incremental/src/persist/clean.rs b/compiler/rustc_incremental/src/persist/clean.rs
index d83ba5a78bed..0067b38fadc7 100644
--- a/compiler/rustc_incremental/src/persist/clean.rs
+++ b/compiler/rustc_incremental/src/persist/clean.rs
@@ -27,7 +27,7 @@ use rustc_hir::{
     Attribute, ImplItemKind, ItemKind as HirItem, Node as HirNode, TraitItemKind, find_attr,
     intravisit,
 };
-use rustc_middle::dep_graph::{DepNode, DepNodeExt, dep_kind_from_label, label_strs};
+use rustc_middle::dep_graph::{DepNode, dep_kind_from_label, label_strs};
 use rustc_middle::hir::nested_filter;
 use rustc_middle::ty::TyCtxt;
 use rustc_span::{Span, Symbol};
diff --git a/compiler/rustc_interface/src/callbacks.rs b/compiler/rustc_interface/src/callbacks.rs
index 5aa1616397f8..49c682ea93f8 100644
--- a/compiler/rustc_interface/src/callbacks.rs
+++ b/compiler/rustc_interface/src/callbacks.rs
@@ -13,9 +13,8 @@ use std::fmt;
 
 use rustc_errors::{DiagInner, TRACK_DIAGNOSTIC};
 use rustc_middle::dep_graph::dep_node::default_dep_kind_debug;
-use rustc_middle::dep_graph::{DepContext, DepKind, DepNode, DepNodeExt, TaskDepsRef};
+use rustc_middle::dep_graph::{DepContext, DepKind, DepNode, TaskDepsRef};
 use rustc_middle::ty::tls;
-use rustc_query_impl::QueryCtxt;
 
 fn track_span_parent(def_id: rustc_span::def_id::LocalDefId) {
     tls::with_context_opt(|icx| {
@@ -41,7 +40,7 @@ fn track_span_parent(def_id: rustc_span::def_id::LocalDefId) {
 fn track_diagnostic(diagnostic: DiagInner, f: &mut dyn FnMut(DiagInner) -> R) -> R {
     tls::with_context_opt(|icx| {
         if let Some(icx) = icx {
-            icx.tcx.dep_graph.record_diagnostic(QueryCtxt::new(icx.tcx), &diagnostic);
+            icx.tcx.dep_graph.record_diagnostic(icx.tcx, &diagnostic);
 
             // Diagnostics are tracked, we can ignore the dependency.
             let icx = tls::ImplicitCtxt { task_deps: TaskDepsRef::Ignore, ..icx.clone() };
diff --git a/compiler/rustc_middle/src/dep_graph/dep_node.rs b/compiler/rustc_middle/src/dep_graph/dep_node.rs
index 0033a1cd2337..2d198b65d128 100644
--- a/compiler/rustc_middle/src/dep_graph/dep_node.rs
+++ b/compiler/rustc_middle/src/dep_graph/dep_node.rs
@@ -434,19 +434,7 @@ pub(crate) fn make_metadata(tcx: TyCtxt<'_>) -> DepNode {
     DepNode::construct(tcx, dep_kinds::Metadata, &())
 }
 
-pub trait DepNodeExt: Sized {
-    fn extract_def_id(&self, tcx: TyCtxt<'_>) -> Option;
-
-    fn from_label_string(
-        tcx: TyCtxt<'_>,
-        label: &str,
-        def_path_hash: DefPathHash,
-    ) -> Result;
-
-    fn has_label_string(label: &str) -> bool;
-}
-
-impl DepNodeExt for DepNode {
+impl DepNode {
     /// Extracts the DefId corresponding to this DepNode. This will work
     /// if two conditions are met:
     ///
@@ -457,7 +445,7 @@ impl DepNodeExt for DepNode {
     /// DepNode. Condition (2) might not be fulfilled if a DepNode
     /// refers to something from the previous compilation session that
     /// has been removed.
-    fn extract_def_id(&self, tcx: TyCtxt<'_>) -> Option {
+    pub fn extract_def_id(&self, tcx: TyCtxt<'_>) -> Option {
         if tcx.fingerprint_style(self.kind) == FingerprintStyle::DefPathHash {
             tcx.def_path_hash_to_def_id(DefPathHash(self.hash.into()))
         } else {
@@ -465,8 +453,7 @@ impl DepNodeExt for DepNode {
         }
     }
 
-    /// Used in testing
-    fn from_label_string(
+    pub fn from_label_string(
         tcx: TyCtxt<'_>,
         label: &str,
         def_path_hash: DefPathHash,
@@ -482,8 +469,7 @@ impl DepNodeExt for DepNode {
         }
     }
 
-    /// Used in testing
-    fn has_label_string(label: &str) -> bool {
+    pub fn has_label_string(label: &str) -> bool {
         dep_kind_from_label_string(label).is_ok()
     }
 }
diff --git a/compiler/rustc_middle/src/dep_graph/dep_node_key.rs b/compiler/rustc_middle/src/dep_graph/dep_node_key.rs
index b1dfc15539bf..1b9b02b67fad 100644
--- a/compiler/rustc_middle/src/dep_graph/dep_node_key.rs
+++ b/compiler/rustc_middle/src/dep_graph/dep_node_key.rs
@@ -3,7 +3,7 @@ use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE, LocalDefId, LocalModDefId,
 use rustc_hir::definitions::DefPathHash;
 use rustc_hir::{HirId, ItemLocalId, OwnerId};
 
-use crate::dep_graph::{DepContext, DepNode, DepNodeExt, DepNodeKey, FingerprintStyle};
+use crate::dep_graph::{DepContext, DepNode, DepNodeKey, FingerprintStyle};
 use crate::ty::TyCtxt;
 
 impl<'tcx> DepNodeKey> for () {
diff --git a/compiler/rustc_middle/src/dep_graph/graph.rs b/compiler/rustc_middle/src/dep_graph/graph.rs
index 3ef0511795b9..734b313f082e 100644
--- a/compiler/rustc_middle/src/dep_graph/graph.rs
+++ b/compiler/rustc_middle/src/dep_graph/graph.rs
@@ -27,7 +27,7 @@ use super::query::DepGraphQuery;
 use super::serialized::{GraphEncoder, SerializedDepGraph, SerializedDepNodeIndex};
 use super::{DepContext, DepKind, DepNode, Deps, HasDepContext, WorkProductId};
 use crate::dep_graph::edges::EdgesVec;
-use crate::query::QueryContext;
+use crate::ty::TyCtxt;
 use crate::verify_ich::incremental_verify_ich;
 
 pub struct DepGraph {
@@ -525,16 +525,12 @@ impl DepGraph {
     /// This encodes a diagnostic by creating a node with an unique index and associating
     /// `diagnostic` with it, for use in the next session.
     #[inline]
-    pub fn record_diagnostic<'tcx, Qcx: QueryContext<'tcx>>(
-        &self,
-        qcx: Qcx,
-        diagnostic: &DiagInner,
-    ) {
+    pub fn record_diagnostic<'tcx>(&self, tcx: TyCtxt<'tcx>, diagnostic: &DiagInner) {
         if let Some(ref data) = self.data {
             D::read_deps(|task_deps| match task_deps {
                 TaskDepsRef::EvalAlways | TaskDepsRef::Ignore => return,
                 TaskDepsRef::Forbid | TaskDepsRef::Allow(..) => {
-                    self.read_index(data.encode_diagnostic(qcx, diagnostic));
+                    self.read_index(data.encode_diagnostic(tcx, diagnostic));
                 }
             })
         }
@@ -542,13 +538,13 @@ impl DepGraph {
     /// This forces a diagnostic node green by running its side effect. `prev_index` would
     /// refer to a node created used `encode_diagnostic` in the previous session.
     #[inline]
-    pub fn force_diagnostic_node<'tcx, Qcx: QueryContext<'tcx>>(
+    pub fn force_diagnostic_node<'tcx>(
         &self,
-        qcx: Qcx,
+        tcx: TyCtxt<'tcx>,
         prev_index: SerializedDepNodeIndex,
     ) {
         if let Some(ref data) = self.data {
-            data.force_diagnostic_node(qcx, prev_index);
+            data.force_diagnostic_node(tcx, prev_index);
         }
     }
 
@@ -688,11 +684,7 @@ impl DepGraphData {
     /// This encodes a diagnostic by creating a node with an unique index and associating
     /// `diagnostic` with it, for use in the next session.
     #[inline]
-    fn encode_diagnostic<'tcx, Qcx: QueryContext<'tcx>>(
-        &self,
-        qcx: Qcx,
-        diagnostic: &DiagInner,
-    ) -> DepNodeIndex {
+    fn encode_diagnostic<'tcx>(&self, tcx: TyCtxt<'tcx>, diagnostic: &DiagInner) -> DepNodeIndex {
         // Use `send_new` so we get an unique index, even though the dep node is not.
         let dep_node_index = self.current.encoder.send_new(
             DepNode {
@@ -705,24 +697,20 @@ impl DepGraphData {
             std::iter::once(DepNodeIndex::FOREVER_RED_NODE).collect(),
         );
         let side_effect = QuerySideEffect::Diagnostic(diagnostic.clone());
-        qcx.store_side_effect(dep_node_index, side_effect);
+        tcx.store_side_effect(dep_node_index, side_effect);
         dep_node_index
     }
 
     /// This forces a diagnostic node green by running its side effect. `prev_index` would
     /// refer to a node created used `encode_diagnostic` in the previous session.
     #[inline]
-    fn force_diagnostic_node<'tcx, Qcx: QueryContext<'tcx>>(
-        &self,
-        qcx: Qcx,
-        prev_index: SerializedDepNodeIndex,
-    ) {
+    fn force_diagnostic_node<'tcx>(&self, tcx: TyCtxt<'tcx>, prev_index: SerializedDepNodeIndex) {
         D::with_deps(TaskDepsRef::Ignore, || {
-            let side_effect = qcx.load_side_effect(prev_index).unwrap();
+            let side_effect = tcx.load_side_effect(prev_index).unwrap();
 
             match &side_effect {
                 QuerySideEffect::Diagnostic(diagnostic) => {
-                    qcx.dep_context().sess().dcx().emit_diagnostic(diagnostic.clone());
+                    tcx.dcx().emit_diagnostic(diagnostic.clone());
                 }
             }
 
@@ -741,7 +729,7 @@ impl DepGraphData {
                 true,
             );
             // This will just overwrite the same value for concurrent calls.
-            qcx.store_side_effect(dep_node_index, side_effect);
+            tcx.store_side_effect(dep_node_index, side_effect);
         })
     }
 
@@ -867,12 +855,12 @@ impl DepGraph {
         DepNodeColor::Unknown
     }
 
-    pub fn try_mark_green<'tcx, Qcx: QueryContext<'tcx, Deps = D>>(
+    pub fn try_mark_green<'tcx>(
         &self,
-        qcx: Qcx,
+        tcx: TyCtxt<'tcx>,
         dep_node: &DepNode,
     ) -> Option<(SerializedDepNodeIndex, DepNodeIndex)> {
-        self.data().and_then(|data| data.try_mark_green(qcx, dep_node))
+        self.data().and_then(|data| data.try_mark_green(tcx, dep_node))
     }
 }
 
@@ -882,12 +870,12 @@ impl DepGraphData {
     /// A node will have an index, when it's already been marked green, or when we can mark it
     /// green. This function will mark the current task as a reader of the specified node, when
     /// a node index can be found for that node.
-    pub fn try_mark_green<'tcx, Qcx: QueryContext<'tcx, Deps = D>>(
+    pub fn try_mark_green<'tcx>(
         &self,
-        qcx: Qcx,
+        tcx: TyCtxt<'tcx>,
         dep_node: &DepNode,
     ) -> Option<(SerializedDepNodeIndex, DepNodeIndex)> {
-        debug_assert!(!qcx.dep_context().is_eval_always(dep_node.kind));
+        debug_assert!(!tcx.is_eval_always(dep_node.kind));
 
         // Return None if the dep node didn't exist in the previous session
         let prev_index = self.previous.node_to_index_opt(dep_node)?;
@@ -902,16 +890,16 @@ impl DepGraphData {
                 // in the previous compilation session too, so we can try to
                 // mark it as green by recursively marking all of its
                 // dependencies green.
-                self.try_mark_previous_green(qcx, prev_index, None)
+                self.try_mark_previous_green(tcx, prev_index, None)
                     .map(|dep_node_index| (prev_index, dep_node_index))
             }
         }
     }
 
-    #[instrument(skip(self, qcx, parent_dep_node_index, frame), level = "debug")]
-    fn try_mark_parent_green<'tcx, Qcx: QueryContext<'tcx, Deps = D>>(
+    #[instrument(skip(self, tcx, parent_dep_node_index, frame), level = "debug")]
+    fn try_mark_parent_green<'tcx>(
         &self,
-        qcx: Qcx,
+        tcx: TyCtxt<'tcx>,
         parent_dep_node_index: SerializedDepNodeIndex,
         frame: &MarkFrame<'_>,
     ) -> Option<()> {
@@ -944,13 +932,13 @@ impl DepGraphData {
 
         // We don't know the state of this dependency. If it isn't
         // an eval_always node, let's try to mark it green recursively.
-        if !qcx.dep_context().is_eval_always(dep_dep_node.kind) {
+        if !tcx.is_eval_always(dep_dep_node.kind) {
             debug!(
                 "state of dependency {:?} ({}) is unknown, trying to mark it green",
                 dep_dep_node, dep_dep_node.hash,
             );
 
-            let node_index = self.try_mark_previous_green(qcx, parent_dep_node_index, Some(frame));
+            let node_index = self.try_mark_previous_green(tcx, parent_dep_node_index, Some(frame));
 
             if node_index.is_some() {
                 debug!("managed to MARK dependency {dep_dep_node:?} as green");
@@ -960,7 +948,7 @@ impl DepGraphData {
 
         // We failed to mark it green, so we try to force the query.
         debug!("trying to force dependency {dep_dep_node:?}");
-        if !qcx.dep_context().try_force_from_dep_node(*dep_dep_node, parent_dep_node_index, frame) {
+        if !tcx.dep_context().try_force_from_dep_node(*dep_dep_node, parent_dep_node_index, frame) {
             // The DepNode could not be forced.
             debug!("dependency {dep_dep_node:?} could not be forced");
             return None;
@@ -978,7 +966,7 @@ impl DepGraphData {
             DepNodeColor::Unknown => {}
         }
 
-        if let None = qcx.dep_context().sess().dcx().has_errors_or_delayed_bugs() {
+        if let None = tcx.dcx().has_errors_or_delayed_bugs() {
             panic!("try_mark_previous_green() - Forcing the DepNode should have set its color")
         }
 
@@ -997,10 +985,10 @@ impl DepGraphData {
     }
 
     /// Try to mark a dep-node which existed in the previous compilation session as green.
-    #[instrument(skip(self, qcx, prev_dep_node_index, frame), level = "debug")]
-    fn try_mark_previous_green<'tcx, Qcx: QueryContext<'tcx, Deps = D>>(
+    #[instrument(skip(self, tcx, prev_dep_node_index, frame), level = "debug")]
+    fn try_mark_previous_green<'tcx>(
         &self,
-        qcx: Qcx,
+        tcx: TyCtxt<'tcx>,
         prev_dep_node_index: SerializedDepNodeIndex,
         frame: Option<&MarkFrame<'_>>,
     ) -> Option {
@@ -1008,14 +996,14 @@ impl DepGraphData {
 
         // We never try to mark eval_always nodes as green
         debug_assert!(
-            !qcx.dep_context()
+            !tcx.dep_context()
                 .is_eval_always(self.previous.index_to_node(prev_dep_node_index).kind)
         );
 
         let prev_deps = self.previous.edge_targets_from(prev_dep_node_index);
 
         for dep_dep_node_index in prev_deps {
-            self.try_mark_parent_green(qcx, dep_dep_node_index, &frame)?;
+            self.try_mark_parent_green(tcx, dep_dep_node_index, &frame)?;
         }
 
         // If we got here without hitting a `return` that means that all
@@ -1508,3 +1496,30 @@ fn panic_on_forbidden_read(data: &DepGraphData, dep_node_index: DepN
          See ."
     )
 }
+
+impl<'tcx> TyCtxt<'tcx> {
+    /// Return whether this kind always require evaluation.
+    #[inline(always)]
+    fn is_eval_always(self, kind: DepKind) -> bool {
+        self.dep_kind_vtable(kind).is_eval_always
+    }
+
+    // Interactions with on_disk_cache
+    fn load_side_effect(
+        self,
+        prev_dep_node_index: SerializedDepNodeIndex,
+    ) -> Option {
+        self.query_system
+            .on_disk_cache
+            .as_ref()
+            .and_then(|c| c.load_side_effect(self, prev_dep_node_index))
+    }
+
+    #[inline(never)]
+    #[cold]
+    fn store_side_effect(self, dep_node_index: DepNodeIndex, side_effect: QuerySideEffect) {
+        if let Some(c) = self.query_system.on_disk_cache.as_ref() {
+            c.store_side_effect(dep_node_index, side_effect)
+        }
+    }
+}
diff --git a/compiler/rustc_middle/src/dep_graph/mod.rs b/compiler/rustc_middle/src/dep_graph/mod.rs
index 723eed21f211..611d76ef7e5e 100644
--- a/compiler/rustc_middle/src/dep_graph/mod.rs
+++ b/compiler/rustc_middle/src/dep_graph/mod.rs
@@ -7,8 +7,7 @@ use rustc_session::Session;
 use tracing::instrument;
 
 pub use self::dep_node::{
-    DepKind, DepNode, DepNodeExt, DepNodeKey, WorkProductId, dep_kind_from_label, dep_kinds,
-    label_strs,
+    DepKind, DepNode, DepNodeKey, WorkProductId, dep_kind_from_label, dep_kinds, label_strs,
 };
 pub use self::graph::{
     DepGraphData, DepNodeIndex, TaskDepsRef, WorkProduct, WorkProductMap, hash_result,
@@ -52,6 +51,7 @@ pub trait DepContext: Copy {
 
     #[inline(always)]
     /// Return whether this kind always require evaluation.
+    // FIXME: remove this in favour of the version on `TyCtxt`.
     fn is_eval_always(self, kind: DepKind) -> bool {
         self.dep_kind_vtable(kind).is_eval_always
     }
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs
index d16ca3c401d2..66e4a77ea6a5 100644
--- a/compiler/rustc_middle/src/query/mod.rs
+++ b/compiler/rustc_middle/src/query/mod.rs
@@ -1,6 +1,4 @@
-use rustc_data_structures::jobserver::Proxy;
 use rustc_hir::def_id::LocalDefId;
-use rustc_query_system::query::QuerySideEffect;
 
 pub use self::caches::{
     DefIdCache, DefaultCache, QueryCache, QueryCacheKey, SingleCache, VecCache,
@@ -12,7 +10,6 @@ pub use self::plumbing::{
     TyCtxtAt, TyCtxtEnsureDone, TyCtxtEnsureOk,
 };
 pub use self::stack::{QueryStackDeferred, QueryStackFrame, QueryStackFrameExtra};
-use crate::dep_graph::{DepNodeIndex, HasDepContext, SerializedDepNodeIndex};
 pub use crate::queries::Providers;
 use crate::ty::TyCtxt;
 
@@ -36,18 +33,3 @@ pub fn describe_as_module(def_id: impl Into, tcx: TyCtxt<'_>) -> Str
         format!("module `{}`", tcx.def_path_str(def_id))
     }
 }
-
-pub trait QueryContext<'tcx>: HasDepContext {
-    /// Gets a jobserver reference which is used to release then acquire
-    /// a token while waiting on a query.
-    fn jobserver_proxy(&self) -> &Proxy;
-
-    /// Load a side effect associated to the node in the previous session.
-    fn load_side_effect(
-        self,
-        prev_dep_node_index: SerializedDepNodeIndex,
-    ) -> Option;
-
-    /// Register a side effect for the given node, for use in next session.
-    fn store_side_effect(self, dep_node_index: DepNodeIndex, side_effect: QuerySideEffect);
-}
diff --git a/compiler/rustc_query_impl/Cargo.toml b/compiler/rustc_query_impl/Cargo.toml
index a8edc1129481..5b840cba5a59 100644
--- a/compiler/rustc_query_impl/Cargo.toml
+++ b/compiler/rustc_query_impl/Cargo.toml
@@ -14,7 +14,6 @@ rustc_hir = { path = "../rustc_hir" }
 rustc_index = { path = "../rustc_index" }
 rustc_macros = { path = "../rustc_macros" }
 rustc_middle = { path = "../rustc_middle" }
-rustc_query_system = { path = "../rustc_query_system" }
 rustc_serialize = { path = "../rustc_serialize" }
 rustc_session = { path = "../rustc_session" }
 rustc_span = { path = "../rustc_span" }
diff --git a/compiler/rustc_query_impl/src/dep_kind_vtables.rs b/compiler/rustc_query_impl/src/dep_kind_vtables.rs
index 99feeb86bac9..53fc8034e022 100644
--- a/compiler/rustc_query_impl/src/dep_kind_vtables.rs
+++ b/compiler/rustc_query_impl/src/dep_kind_vtables.rs
@@ -4,7 +4,7 @@ use rustc_middle::query::QueryCache;
 use rustc_middle::ty::TyCtxt;
 
 use crate::plumbing::{force_from_dep_node_inner, try_load_from_on_disk_cache_inner};
-use crate::{QueryCtxt, QueryDispatcherUnerased, QueryFlags};
+use crate::{QueryDispatcherUnerased, QueryFlags};
 
 /// [`DepKindVTable`] constructors for special dep kinds that aren't queries.
 #[expect(non_snake_case, reason = "use non-snake case to avoid collision with query names")]
@@ -45,7 +45,7 @@ mod non_query {
             is_eval_always: false,
             fingerprint_style: FingerprintStyle::Unit,
             force_from_dep_node: Some(|tcx, _, prev_index| {
-                tcx.dep_graph.force_diagnostic_node(QueryCtxt::new(tcx), prev_index);
+                tcx.dep_graph.force_diagnostic_node(tcx, prev_index);
                 true
             }),
             try_load_from_on_disk_cache: None,
diff --git a/compiler/rustc_query_impl/src/execution.rs b/compiler/rustc_query_impl/src/execution.rs
index 4df55e46e13e..89ec7ad9012a 100644
--- a/compiler/rustc_query_impl/src/execution.rs
+++ b/compiler/rustc_query_impl/src/execution.rs
@@ -495,7 +495,7 @@ fn try_load_from_disk_and_cache_in_memory<'tcx, C: QueryCache, const FLAGS: Quer
     // Note this function can be called concurrently from the same query
     // We must ensure that this is handled correctly.
 
-    let (prev_dep_node_index, dep_node_index) = dep_graph_data.try_mark_green(qcx, dep_node)?;
+    let (prev_dep_node_index, dep_node_index) = dep_graph_data.try_mark_green(qcx.tcx, dep_node)?;
 
     debug_assert!(dep_graph_data.is_index_green(prev_dep_node_index));
 
@@ -602,7 +602,7 @@ fn ensure_must_run<'tcx, C: QueryCache, const FLAGS: QueryFlags>(
     let dep_node = query.construct_dep_node(qcx.tcx, key);
 
     let dep_graph = &qcx.tcx.dep_graph;
-    let serialized_dep_node_index = match dep_graph.try_mark_green(qcx, &dep_node) {
+    let serialized_dep_node_index = match dep_graph.try_mark_green(qcx.tcx, &dep_node) {
         None => {
             // A None return from `try_mark_green` means that this is either
             // a new dep node or that the dep node has already been marked red.
diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs
index ad782b3150b0..911d38d0993e 100644
--- a/compiler/rustc_query_impl/src/plumbing.rs
+++ b/compiler/rustc_query_impl/src/plumbing.rs
@@ -4,7 +4,6 @@
 
 use std::num::NonZero;
 
-use rustc_data_structures::jobserver::Proxy;
 use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
 use rustc_data_structures::sync::{DynSend, DynSync};
 use rustc_data_structures::unord::UnordMap;
@@ -24,14 +23,12 @@ use rustc_middle::query::on_disk_cache::{
 };
 use rustc_middle::query::plumbing::QueryVTable;
 use rustc_middle::query::{
-    Key, QueryCache, QueryContext, QueryJobId, QueryStackDeferred, QueryStackFrame,
-    QueryStackFrameExtra,
+    Key, QueryCache, QueryJobId, QueryStackDeferred, QueryStackFrame, QueryStackFrameExtra,
 };
 use rustc_middle::ty::codec::TyEncoder;
 use rustc_middle::ty::print::with_reduced_queries;
 use rustc_middle::ty::tls::{self, ImplicitCtxt};
 use rustc_middle::ty::{self, TyCtxt};
-use rustc_query_system::query::QuerySideEffect;
 use rustc_serialize::{Decodable, Encodable};
 use rustc_span::def_id::LOCAL_CRATE;
 
@@ -40,8 +37,6 @@ use crate::execution::{all_inactive, force_query};
 use crate::job::{QueryJobMap, find_dep_kind_root};
 use crate::{QueryDispatcherUnerased, QueryFlags, SemiDynamicQueryDispatcher};
 
-/// Implements [`QueryContext`] for use by [`rustc_query_system`], since that
-/// crate does not have direct access to [`TyCtxt`].
 #[derive(Copy, Clone)]
 pub struct QueryCtxt<'tcx> {
     pub tcx: TyCtxt<'tcx>,
@@ -156,35 +151,8 @@ impl<'tcx> HasDepContext for QueryCtxt<'tcx> {
     }
 }
 
-impl<'tcx> QueryContext<'tcx> for QueryCtxt<'tcx> {
-    #[inline]
-    fn jobserver_proxy(&self) -> &Proxy {
-        &self.tcx.jobserver_proxy
-    }
-
-    // Interactions with on_disk_cache
-    fn load_side_effect(
-        self,
-        prev_dep_node_index: SerializedDepNodeIndex,
-    ) -> Option {
-        self.tcx
-            .query_system
-            .on_disk_cache
-            .as_ref()
-            .and_then(|c| c.load_side_effect(self.tcx, prev_dep_node_index))
-    }
-
-    #[inline(never)]
-    #[cold]
-    fn store_side_effect(self, dep_node_index: DepNodeIndex, side_effect: QuerySideEffect) {
-        if let Some(c) = self.tcx.query_system.on_disk_cache.as_ref() {
-            c.store_side_effect(dep_node_index, side_effect)
-        }
-    }
-}
-
 pub(super) fn try_mark_green<'tcx>(tcx: TyCtxt<'tcx>, dep_node: &dep_graph::DepNode) -> bool {
-    tcx.dep_graph.try_mark_green(QueryCtxt::new(tcx), dep_node).is_some()
+    tcx.dep_graph.try_mark_green(tcx, dep_node).is_some()
 }
 
 pub(super) fn encode_all_query_results<'tcx>(

From 1d83208683c766f55683336b9b189db24e9bd066 Mon Sep 17 00:00:00 2001
From: Nicholas Nethercote 
Date: Thu, 12 Feb 2026 09:37:42 +1100
Subject: [PATCH 188/265] De-genericize the dep graph.

By removing the generic `D` parameter from `DepGraph`, `DepGraphData`,
`CurrentDepGraph`, `SerializedDepGraph`, `SerializedNodeHeader`, and
`EncoderState`.
---
 .../rustc_incremental/src/persist/load.rs     |  4 +-
 compiler/rustc_middle/src/dep_graph/graph.rs  | 90 +++++++++----------
 compiler/rustc_middle/src/dep_graph/mod.rs    |  6 +-
 .../rustc_middle/src/dep_graph/serialized.rs  | 80 ++++++++---------
 compiler/rustc_middle/src/verify_ich.rs       |  2 +-
 compiler/rustc_query_impl/src/execution.rs    |  6 +-
 6 files changed, 88 insertions(+), 100 deletions(-)

diff --git a/compiler/rustc_incremental/src/persist/load.rs b/compiler/rustc_incremental/src/persist/load.rs
index e93cba2c8d0f..f7182e3614dc 100644
--- a/compiler/rustc_incremental/src/persist/load.rs
+++ b/compiler/rustc_incremental/src/persist/load.rs
@@ -6,7 +6,7 @@ use std::sync::Arc;
 use rustc_data_structures::memmap::Mmap;
 use rustc_data_structures::unord::UnordMap;
 use rustc_hashes::Hash64;
-use rustc_middle::dep_graph::{DepGraph, DepsType, SerializedDepGraph, WorkProductMap};
+use rustc_middle::dep_graph::{DepGraph, SerializedDepGraph, WorkProductMap};
 use rustc_middle::query::on_disk_cache::OnDiskCache;
 use rustc_serialize::Decodable;
 use rustc_serialize::opaque::MemDecoder;
@@ -171,7 +171,7 @@ fn load_dep_graph(sess: &Session) -> LoadResult<(Arc, WorkPr
                 return LoadResult::DataOutOfDate;
             }
 
-            let dep_graph = SerializedDepGraph::decode::(&mut decoder);
+            let dep_graph = SerializedDepGraph::decode(&mut decoder);
 
             LoadResult::Ok { data: (dep_graph, prev_work_products) }
         }
diff --git a/compiler/rustc_middle/src/dep_graph/graph.rs b/compiler/rustc_middle/src/dep_graph/graph.rs
index 734b313f082e..0ee1ee44fd1c 100644
--- a/compiler/rustc_middle/src/dep_graph/graph.rs
+++ b/compiler/rustc_middle/src/dep_graph/graph.rs
@@ -25,13 +25,14 @@ use {super::debug::EdgeFilter, std::env};
 
 use super::query::DepGraphQuery;
 use super::serialized::{GraphEncoder, SerializedDepGraph, SerializedDepNodeIndex};
-use super::{DepContext, DepKind, DepNode, Deps, HasDepContext, WorkProductId};
+use super::{DepContext, DepKind, DepNode, Deps, DepsType, HasDepContext, WorkProductId};
 use crate::dep_graph::edges::EdgesVec;
 use crate::ty::TyCtxt;
 use crate::verify_ich::incremental_verify_ich;
 
-pub struct DepGraph {
-    data: Option>>,
+#[derive(Clone)]
+pub struct DepGraph {
+    data: Option>,
 
     /// This field is used for assigning DepNodeIndices when running in
     /// non-incremental mode. Even in non-incremental mode we make sure that
@@ -40,17 +41,6 @@ pub struct DepGraph {
     virtual_dep_node_index: Arc,
 }
 
-/// Manual clone impl that does not require `D: Clone`.
-impl Clone for DepGraph {
-    fn clone(&self) -> Self {
-        let Self { data, virtual_dep_node_index } = self;
-        Self {
-            data: Option::>::clone(data),
-            virtual_dep_node_index: Arc::clone(virtual_dep_node_index),
-        }
-    }
-}
-
 rustc_index::newtype_index! {
     pub struct DepNodeIndex {}
 }
@@ -84,12 +74,12 @@ pub(super) enum DepNodeColor {
     Unknown,
 }
 
-pub struct DepGraphData {
+pub struct DepGraphData {
     /// The new encoding of the dependency graph, optimized for red/green
     /// tracking. The `current` field is the dependency graph of only the
     /// current compilation session: We don't merge the previous dep-graph into
     /// current one anymore, but we do reference shared data to save space.
-    current: CurrentDepGraph,
+    current: CurrentDepGraph,
 
     /// The dep-graph from the previous compilation session. It contains all
     /// nodes and edges as well as all fingerprints of nodes that have them.
@@ -120,13 +110,13 @@ where
     stable_hasher.finish()
 }
 
-impl DepGraph {
+impl DepGraph {
     pub fn new(
         session: &Session,
         prev_graph: Arc,
         prev_work_products: WorkProductMap,
         encoder: FileEncoder,
-    ) -> DepGraph {
+    ) -> DepGraph {
         let prev_graph_node_count = prev_graph.node_count();
 
         let current =
@@ -136,7 +126,7 @@ impl DepGraph {
 
         // Instantiate a node with zero dependencies only once for anonymous queries.
         let _green_node_index = current.alloc_new_node(
-            DepNode { kind: D::DEP_KIND_ANON_ZERO_DEPS, hash: current.anon_id_seed.into() },
+            DepNode { kind: DepsType::DEP_KIND_ANON_ZERO_DEPS, hash: current.anon_id_seed.into() },
             EdgesVec::new(),
             Fingerprint::ZERO,
         );
@@ -144,7 +134,7 @@ impl DepGraph {
 
         // Instantiate a dependy-less red node only once for anonymous queries.
         let red_node_index = current.alloc_new_node(
-            DepNode { kind: D::DEP_KIND_RED, hash: Fingerprint::ZERO.into() },
+            DepNode { kind: DepsType::DEP_KIND_RED, hash: Fingerprint::ZERO.into() },
             EdgesVec::new(),
             Fingerprint::ZERO,
         );
@@ -168,12 +158,12 @@ impl DepGraph {
         }
     }
 
-    pub fn new_disabled() -> DepGraph {
+    pub fn new_disabled() -> DepGraph {
         DepGraph { data: None, virtual_dep_node_index: Arc::new(AtomicU32::new(0)) }
     }
 
     #[inline]
-    pub fn data(&self) -> Option<&DepGraphData> {
+    pub fn data(&self) -> Option<&DepGraphData> {
         self.data.as_deref()
     }
 
@@ -191,7 +181,7 @@ impl DepGraph {
 
     pub fn assert_ignored(&self) {
         if let Some(..) = self.data {
-            D::read_deps(|task_deps| {
+            DepsType::read_deps(|task_deps| {
                 assert_matches!(
                     task_deps,
                     TaskDepsRef::Ignore,
@@ -205,7 +195,7 @@ impl DepGraph {
     where
         OP: FnOnce() -> R,
     {
-        D::with_deps(TaskDepsRef::Ignore, op)
+        DepsType::with_deps(TaskDepsRef::Ignore, op)
     }
 
     /// Used to wrap the deserialization of a query result from disk,
@@ -258,11 +248,11 @@ impl DepGraph {
     where
         OP: FnOnce() -> R,
     {
-        D::with_deps(TaskDepsRef::Forbid, op)
+        DepsType::with_deps(TaskDepsRef::Forbid, op)
     }
 
     #[inline(always)]
-    pub fn with_task, A: Debug, R>(
+    pub fn with_task, A: Debug, R>(
         &self,
         key: DepNode,
         cx: Ctxt,
@@ -276,7 +266,7 @@ impl DepGraph {
         }
     }
 
-    pub fn with_anon_task, OP, R>(
+    pub fn with_anon_task, OP, R>(
         &self,
         cx: Tcx,
         dep_kind: DepKind,
@@ -296,7 +286,7 @@ impl DepGraph {
     }
 }
 
-impl DepGraphData {
+impl DepGraphData {
     /// Starts a new dep-graph task. Dep-graph tasks are specified
     /// using a free function (`task`) and **not** a closure -- this
     /// is intentional because we want to exercise tight control over
@@ -325,7 +315,7 @@ impl DepGraphData {
     ///
     /// [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/queries/incremental-compilation.html
     #[inline(always)]
-    pub fn with_task, A: Debug, R>(
+    pub fn with_task, A: Debug, R>(
         &self,
         key: DepNode,
         cx: Ctxt,
@@ -350,7 +340,7 @@ impl DepGraphData {
             },
         );
 
-        let with_deps = |task_deps| D::with_deps(task_deps, || task(cx, arg));
+        let with_deps = |task_deps| DepsType::with_deps(task_deps, || task(cx, arg));
         let (result, edges) = if cx.dep_context().is_eval_always(key.kind) {
             (with_deps(TaskDepsRef::EvalAlways), EdgesVec::new())
         } else {
@@ -379,7 +369,7 @@ impl DepGraphData {
     /// FIXME: This could perhaps return a `WithDepNode` to ensure that the
     /// user of this function actually performs the read; we'll have to see
     /// how to make that work with `anon` in `execute_job_incr`, though.
-    pub fn with_anon_task_inner, OP, R>(
+    pub fn with_anon_task_inner, OP, R>(
         &self,
         cx: Tcx,
         dep_kind: DepKind,
@@ -397,7 +387,7 @@ impl DepGraphData {
             None,
             128,
         ));
-        let result = D::with_deps(TaskDepsRef::Allow(&task_deps), op);
+        let result = DepsType::with_deps(TaskDepsRef::Allow(&task_deps), op);
         let task_deps = task_deps.into_inner();
         let reads = task_deps.reads;
 
@@ -448,7 +438,7 @@ impl DepGraphData {
     }
 
     /// Intern the new `DepNode` with the dependencies up-to-now.
-    fn hash_result_and_alloc_node, R>(
+    fn hash_result_and_alloc_node, R>(
         &self,
         cx: &Ctxt,
         node: DepNode,
@@ -466,11 +456,11 @@ impl DepGraphData {
     }
 }
 
-impl DepGraph {
+impl DepGraph {
     #[inline]
     pub fn read_index(&self, dep_node_index: DepNodeIndex) {
         if let Some(ref data) = self.data {
-            D::read_deps(|task_deps| {
+            DepsType::read_deps(|task_deps| {
                 let mut task_deps = match task_deps {
                     TaskDepsRef::Allow(deps) => deps.lock(),
                     TaskDepsRef::EvalAlways => {
@@ -527,7 +517,7 @@ impl DepGraph {
     #[inline]
     pub fn record_diagnostic<'tcx>(&self, tcx: TyCtxt<'tcx>, diagnostic: &DiagInner) {
         if let Some(ref data) = self.data {
-            D::read_deps(|task_deps| match task_deps {
+            DepsType::read_deps(|task_deps| match task_deps {
                 TaskDepsRef::EvalAlways | TaskDepsRef::Ignore => return,
                 TaskDepsRef::Forbid | TaskDepsRef::Allow(..) => {
                     self.read_index(data.encode_diagnostic(tcx, diagnostic));
@@ -563,7 +553,7 @@ impl DepGraph {
     /// FIXME: If the code is changed enough for this node to be marked before requiring the
     /// caller's node, we suppose that those changes will be enough to mark this node red and
     /// force a recomputation using the "normal" way.
-    pub fn with_feed_task, R>(
+    pub fn with_feed_task, R>(
         &self,
         node: DepNode,
         cx: Ctxt,
@@ -604,7 +594,7 @@ impl DepGraph {
             }
 
             let mut edges = EdgesVec::new();
-            D::read_deps(|task_deps| match task_deps {
+            DepsType::read_deps(|task_deps| match task_deps {
                 TaskDepsRef::Allow(deps) => edges.extend(deps.lock().reads.iter().copied()),
                 TaskDepsRef::EvalAlways => {
                     edges.push(DepNodeIndex::FOREVER_RED_NODE);
@@ -626,7 +616,7 @@ impl DepGraph {
     }
 }
 
-impl DepGraphData {
+impl DepGraphData {
     fn assert_dep_node_not_yet_allocated_in_current_session(
         &self,
         sess: &Session,
@@ -688,7 +678,7 @@ impl DepGraphData {
         // Use `send_new` so we get an unique index, even though the dep node is not.
         let dep_node_index = self.current.encoder.send_new(
             DepNode {
-                kind: D::DEP_KIND_SIDE_EFFECT,
+                kind: DepsType::DEP_KIND_SIDE_EFFECT,
                 hash: PackedFingerprint::from(Fingerprint::ZERO),
             },
             Fingerprint::ZERO,
@@ -705,7 +695,7 @@ impl DepGraphData {
     /// refer to a node created used `encode_diagnostic` in the previous session.
     #[inline]
     fn force_diagnostic_node<'tcx>(&self, tcx: TyCtxt<'tcx>, prev_index: SerializedDepNodeIndex) {
-        D::with_deps(TaskDepsRef::Ignore, || {
+        DepsType::with_deps(TaskDepsRef::Ignore, || {
             let side_effect = tcx.load_side_effect(prev_index).unwrap();
 
             match &side_effect {
@@ -721,7 +711,7 @@ impl DepGraphData {
                 prev_index,
                 &self.colors,
                 DepNode {
-                    kind: D::DEP_KIND_SIDE_EFFECT,
+                    kind: DepsType::DEP_KIND_SIDE_EFFECT,
                     hash: PackedFingerprint::from(Fingerprint::ZERO),
                 },
                 Fingerprint::ZERO,
@@ -799,7 +789,7 @@ impl DepGraphData {
     }
 }
 
-impl DepGraph {
+impl DepGraph {
     /// Checks whether a previous work product exists for `v` and, if
     /// so, return the path that leads to it. Used to skip doing work.
     pub fn previous_work_product(&self, v: &WorkProductId) -> Option {
@@ -864,7 +854,7 @@ impl DepGraph {
     }
 }
 
-impl DepGraphData {
+impl DepGraphData {
     /// Try to mark a node index for the node dep_node.
     ///
     /// A node will have an index, when it's already been marked green, or when we can mark it
@@ -1029,7 +1019,7 @@ impl DepGraphData {
     }
 }
 
-impl DepGraph {
+impl DepGraph {
     /// Returns true if the given node has been marked as red during the
     /// current compilation session. Used in various assertions
     pub fn is_red(&self, dep_node: &DepNode) -> bool {
@@ -1163,8 +1153,8 @@ rustc_index::newtype_index! {
 /// `anon_node_to_index` and `data`, or `prev_index_to_index` and `data`. When
 /// manipulating both, we acquire `anon_node_to_index` or `prev_index_to_index`
 /// first, and `data` second.
-pub(super) struct CurrentDepGraph {
-    encoder: GraphEncoder,
+pub(super) struct CurrentDepGraph {
+    encoder: GraphEncoder,
     anon_node_to_index: ShardedHashMap,
 
     /// This is used to verify that fingerprints do not change between the creation of a node
@@ -1202,7 +1192,7 @@ pub(super) struct CurrentDepGraph {
     pub(super) total_duplicate_read_count: AtomicU64,
 }
 
-impl CurrentDepGraph {
+impl CurrentDepGraph {
     fn new(
         session: &Session,
         prev_graph_node_count: usize,
@@ -1436,7 +1426,7 @@ impl DepNodeColorMap {
 
 #[inline(never)]
 #[cold]
-pub(crate) fn print_markframe_trace(graph: &DepGraph, frame: &MarkFrame<'_>) {
+pub(crate) fn print_markframe_trace(graph: &DepGraph, frame: &MarkFrame<'_>) {
     let data = graph.data.as_ref().unwrap();
 
     eprintln!("there was a panic while trying to force a dep node");
@@ -1456,7 +1446,7 @@ pub(crate) fn print_markframe_trace(graph: &DepGraph, frame: &MarkFr
 
 #[cold]
 #[inline(never)]
-fn panic_on_forbidden_read(data: &DepGraphData, dep_node_index: DepNodeIndex) -> ! {
+fn panic_on_forbidden_read(data: &DepGraphData, dep_node_index: DepNodeIndex) -> ! {
     // We have to do an expensive reverse-lookup of the DepNode that
     // corresponds to `dep_node_index`, but that's OK since we are about
     // to ICE anyway.
diff --git a/compiler/rustc_middle/src/dep_graph/mod.rs b/compiler/rustc_middle/src/dep_graph/mod.rs
index 611d76ef7e5e..0c100b773392 100644
--- a/compiler/rustc_middle/src/dep_graph/mod.rs
+++ b/compiler/rustc_middle/src/dep_graph/mod.rs
@@ -10,7 +10,7 @@ pub use self::dep_node::{
     DepKind, DepNode, DepNodeKey, WorkProductId, dep_kind_from_label, dep_kinds, label_strs,
 };
 pub use self::graph::{
-    DepGraphData, DepNodeIndex, TaskDepsRef, WorkProduct, WorkProductMap, hash_result,
+    DepGraph, DepGraphData, DepNodeIndex, TaskDepsRef, WorkProduct, WorkProductMap, hash_result,
 };
 use self::graph::{MarkFrame, print_markframe_trace};
 pub use self::query::DepGraphQuery;
@@ -34,7 +34,7 @@ pub trait DepContext: Copy {
     fn with_stable_hashing_context(self, f: impl FnOnce(StableHashingContext<'_>) -> R) -> R;
 
     /// Access the DepGraph.
-    fn dep_graph(&self) -> &graph::DepGraph;
+    fn dep_graph(&self) -> &DepGraph;
 
     /// Access the profiler.
     fn profiler(&self) -> &SelfProfilerRef;
@@ -179,8 +179,6 @@ impl FingerprintStyle {
     }
 }
 
-pub type DepGraph = graph::DepGraph;
-
 pub type DepKindVTable<'tcx> = dep_node::DepKindVTable>;
 
 pub struct DepsType;
diff --git a/compiler/rustc_middle/src/dep_graph/serialized.rs b/compiler/rustc_middle/src/dep_graph/serialized.rs
index 3b5954fc8f94..87b85226c9c3 100644
--- a/compiler/rustc_middle/src/dep_graph/serialized.rs
+++ b/compiler/rustc_middle/src/dep_graph/serialized.rs
@@ -41,7 +41,6 @@
 
 use std::cell::RefCell;
 use std::cmp::max;
-use std::marker::PhantomData;
 use std::sync::Arc;
 use std::sync::atomic::Ordering;
 use std::{iter, mem, u64};
@@ -62,6 +61,7 @@ use tracing::{debug, instrument};
 use super::graph::{CurrentDepGraph, DepNodeColorMap};
 use super::query::DepGraphQuery;
 use super::{DepKind, DepNode, DepNodeIndex, Deps};
+use crate::dep_graph::DepsType;
 use crate::dep_graph::edges::EdgesVec;
 
 // The maximum value of `SerializedDepNodeIndex` leaves the upper two bits
@@ -192,7 +192,7 @@ fn mask(bits: usize) -> usize {
 
 impl SerializedDepGraph {
     #[instrument(level = "debug", skip(d))]
-    pub fn decode(d: &mut MemDecoder<'_>) -> Arc {
+    pub fn decode(d: &mut MemDecoder<'_>) -> Arc {
         // The last 16 bytes are the node count and edge count.
         debug!("position: {:?}", d.position());
 
@@ -213,7 +213,10 @@ impl SerializedDepGraph {
         let graph_bytes = d.len() - (3 * IntEncodedWithFixedSize::ENCODED_SIZE) - d.position();
 
         let mut nodes = IndexVec::from_elem_n(
-            DepNode { kind: D::DEP_KIND_NULL, hash: PackedFingerprint::from(Fingerprint::ZERO) },
+            DepNode {
+                kind: DepsType::DEP_KIND_NULL,
+                hash: PackedFingerprint::from(Fingerprint::ZERO),
+            },
             node_max,
         );
         let mut fingerprints = IndexVec::from_elem_n(Fingerprint::ZERO, node_max);
@@ -230,19 +233,21 @@ impl SerializedDepGraph {
         // least (34 byte header + 1 byte len + 64 bytes edge data), which is ~1%. A 2-byte leb128
         // length is about the same fractional overhead and it amortizes for yet greater lengths.
         let mut edge_list_data =
-            Vec::with_capacity(graph_bytes - node_count * size_of::>());
+            Vec::with_capacity(graph_bytes - node_count * size_of::());
 
         for _ in 0..node_count {
             // Decode the header for this edge; the header packs together as many of the fixed-size
             // fields as possible to limit the number of times we update decoder state.
-            let node_header =
-                SerializedNodeHeader:: { bytes: d.read_array(), _marker: PhantomData };
+            let node_header = SerializedNodeHeader { bytes: d.read_array() };
 
             let index = node_header.index();
 
             let node = &mut nodes[index];
             // Make sure there's no duplicate indices in the dep graph.
-            assert!(node_header.node().kind != D::DEP_KIND_NULL && node.kind == D::DEP_KIND_NULL);
+            assert!(
+                node_header.node().kind != DepsType::DEP_KIND_NULL
+                    && node.kind == DepsType::DEP_KIND_NULL
+            );
             *node = node_header.node();
 
             fingerprints[index] = node_header.fingerprint();
@@ -270,7 +275,7 @@ impl SerializedDepGraph {
         edge_list_data.extend(&[0u8; DEP_NODE_PAD]);
 
         // Read the number of each dep kind and use it to create an hash map with a suitable size.
-        let mut index: Vec<_> = (0..(D::DEP_KIND_MAX + 1))
+        let mut index: Vec<_> = (0..(DepsType::DEP_KIND_MAX + 1))
             .map(|_| UnhashMap::with_capacity_and_hasher(d.read_u32() as usize, Default::default()))
             .collect();
 
@@ -279,8 +284,10 @@ impl SerializedDepGraph {
         for (idx, node) in nodes.iter_enumerated() {
             if index[node.kind.as_usize()].insert(node.hash, idx).is_some() {
                 // Empty nodes and side effect nodes can have duplicates
-                if node.kind != D::DEP_KIND_NULL && node.kind != D::DEP_KIND_SIDE_EFFECT {
-                    let name = D::name(node.kind);
+                if node.kind != DepsType::DEP_KIND_NULL
+                    && node.kind != DepsType::DEP_KIND_SIDE_EFFECT
+                {
+                    let name = DepsType::name(node.kind);
                     panic!(
                     "Error: A dep graph node ({name}) does not have an unique index. \
                      Running a clean build on a nightly compiler with `-Z incremental-verify-ich` \
@@ -310,13 +317,12 @@ impl SerializedDepGraph {
 /// * The `DepKind`'s discriminant (a u16, but not all bits are used...)
 /// * The byte width of the encoded edges for this node
 /// * In whatever bits remain, the length of the edge list for this node, if it fits
-struct SerializedNodeHeader {
+struct SerializedNodeHeader {
     // 2 bytes for the DepNode
     // 4 bytes for the index
     // 16 for Fingerprint in DepNode
     // 16 for Fingerprint in NodeInfo
     bytes: [u8; 38],
-    _marker: PhantomData,
 }
 
 // The fields of a `SerializedNodeHeader`, this struct is an implementation detail and exists only
@@ -337,11 +343,11 @@ struct Unpacked {
 // 0..M    length of the edge
 // M..M+N  bytes per index
 // M+N..16 kind
-impl SerializedNodeHeader {
+impl SerializedNodeHeader {
     const TOTAL_BITS: usize = size_of::() * 8;
     const LEN_BITS: usize = Self::TOTAL_BITS - Self::KIND_BITS - Self::WIDTH_BITS;
     const WIDTH_BITS: usize = DEP_NODE_WIDTH_BITS;
-    const KIND_BITS: usize = Self::TOTAL_BITS - D::DEP_KIND_MAX.leading_zeros() as usize;
+    const KIND_BITS: usize = Self::TOTAL_BITS - DepsType::DEP_KIND_MAX.leading_zeros() as usize;
     const MAX_INLINE_LEN: usize = (u16::MAX as usize >> (Self::TOTAL_BITS - Self::LEN_BITS)) - 1;
 
     #[inline]
@@ -377,14 +383,14 @@ impl SerializedNodeHeader {
 
         #[cfg(debug_assertions)]
         {
-            let res = Self { bytes, _marker: PhantomData };
+            let res = Self { bytes };
             assert_eq!(fingerprint, res.fingerprint());
             assert_eq!(*node, res.node());
             if let Some(len) = res.len() {
                 assert_eq!(edge_count, len as usize);
             }
         }
-        Self { bytes, _marker: PhantomData }
+        Self { bytes }
     }
 
     #[inline]
@@ -451,15 +457,10 @@ struct NodeInfo {
 }
 
 impl NodeInfo {
-    fn encode(&self, e: &mut MemEncoder, index: DepNodeIndex) {
+    fn encode(&self, e: &mut MemEncoder, index: DepNodeIndex) {
         let NodeInfo { ref node, fingerprint, ref edges } = *self;
-        let header = SerializedNodeHeader::::new(
-            node,
-            index,
-            fingerprint,
-            edges.max_index(),
-            edges.len(),
-        );
+        let header =
+            SerializedNodeHeader::new(node, index, fingerprint, edges.max_index(), edges.len());
         e.write_array(header.bytes);
 
         if header.len().is_none() {
@@ -480,7 +481,7 @@ impl NodeInfo {
     /// the previous dep graph and expects all edges to already have a new dep node index assigned.
     /// This avoids the overhead of constructing `EdgesVec`, which would be needed to call `encode`.
     #[inline]
-    fn encode_promoted(
+    fn encode_promoted(
         e: &mut MemEncoder,
         node: &DepNode,
         index: DepNodeIndex,
@@ -496,7 +497,7 @@ impl NodeInfo {
         let edge_max =
             edges.clone().map(|i| colors.current(i).unwrap().as_u32()).max().unwrap_or(0);
 
-        let header = SerializedNodeHeader::::new(node, index, fingerprint, edge_max, edge_count);
+        let header = SerializedNodeHeader::new(node, index, fingerprint, edge_max, edge_count);
         e.write_array(header.bytes);
 
         if header.len().is_none() {
@@ -543,16 +544,15 @@ struct LocalEncoderResult {
     kind_stats: Vec,
 }
 
-struct EncoderState {
+struct EncoderState {
     next_node_index: AtomicU64,
     previous: Arc,
     file: Lock>,
     local: WorkerLocal>,
     stats: Option>>,
-    marker: PhantomData,
 }
 
-impl EncoderState {
+impl EncoderState {
     fn new(encoder: FileEncoder, record_stats: bool, previous: Arc) -> Self {
         Self {
             previous,
@@ -566,10 +566,9 @@ impl EncoderState {
                     edge_count: 0,
                     node_count: 0,
                     encoder: MemEncoder::new(),
-                    kind_stats: iter::repeat_n(0, D::DEP_KIND_MAX as usize + 1).collect(),
+                    kind_stats: iter::repeat_n(0, DepsType::DEP_KIND_MAX as usize + 1).collect(),
                 })
             }),
-            marker: PhantomData,
         }
     }
 
@@ -658,7 +657,7 @@ impl EncoderState {
         record_graph: &Option>,
         local: &mut LocalEncoderState,
     ) {
-        node.encode::(&mut local.encoder, index);
+        node.encode(&mut local.encoder, index);
         self.flush_mem_encoder(&mut *local);
         self.record(
             &node.node,
@@ -687,7 +686,7 @@ impl EncoderState {
     ) {
         let node = self.previous.index_to_node(prev_index);
         let fingerprint = self.previous.fingerprint_by_index(prev_index);
-        let edge_count = NodeInfo::encode_promoted::(
+        let edge_count = NodeInfo::encode_promoted(
             &mut local.encoder,
             node,
             index,
@@ -712,7 +711,7 @@ impl EncoderState {
         );
     }
 
-    fn finish(&self, profiler: &SelfProfilerRef, current: &CurrentDepGraph) -> FileEncodeResult {
+    fn finish(&self, profiler: &SelfProfilerRef, current: &CurrentDepGraph) -> FileEncodeResult {
         // Prevent more indices from being allocated.
         self.next_node_index.store(u32::MAX as u64 + 1, Ordering::SeqCst);
 
@@ -735,7 +734,8 @@ impl EncoderState {
 
         let mut encoder = self.file.lock().take().unwrap();
 
-        let mut kind_stats: Vec = iter::repeat_n(0, D::DEP_KIND_MAX as usize + 1).collect();
+        let mut kind_stats: Vec =
+            iter::repeat_n(0, DepsType::DEP_KIND_MAX as usize + 1).collect();
 
         let mut node_max = 0;
         let mut node_count = 0;
@@ -778,7 +778,7 @@ impl EncoderState {
 
     fn print_incremental_info(
         &self,
-        current: &CurrentDepGraph,
+        current: &CurrentDepGraph,
         total_node_count: usize,
         total_edge_count: usize,
     ) {
@@ -835,13 +835,13 @@ impl EncoderState {
     }
 }
 
-pub(crate) struct GraphEncoder {
+pub(crate) struct GraphEncoder {
     profiler: SelfProfilerRef,
-    status: EncoderState,
+    status: EncoderState,
     record_graph: Option>,
 }
 
-impl GraphEncoder {
+impl GraphEncoder {
     pub(crate) fn new(
         sess: &Session,
         encoder: FileEncoder,
@@ -945,7 +945,7 @@ impl GraphEncoder {
         }
     }
 
-    pub(crate) fn finish(&self, current: &CurrentDepGraph) -> FileEncodeResult {
+    pub(crate) fn finish(&self, current: &CurrentDepGraph) -> FileEncodeResult {
         let _prof_timer = self.profiler.generic_activity("incr_comp_encode_dep_graph_finish");
 
         self.status.finish(&self.profiler, current)
diff --git a/compiler/rustc_middle/src/verify_ich.rs b/compiler/rustc_middle/src/verify_ich.rs
index c5aec73679ec..9e7f26836521 100644
--- a/compiler/rustc_middle/src/verify_ich.rs
+++ b/compiler/rustc_middle/src/verify_ich.rs
@@ -10,7 +10,7 @@ use crate::dep_graph::{DepContext, DepGraphData, SerializedDepNodeIndex};
 #[instrument(skip(tcx, dep_graph_data, result, hash_result, format_value), level = "debug")]
 pub fn incremental_verify_ich(
     tcx: Tcx,
-    dep_graph_data: &DepGraphData,
+    dep_graph_data: &DepGraphData,
     result: &V,
     prev_index: SerializedDepNodeIndex,
     hash_result: Option, &V) -> Fingerprint>,
diff --git a/compiler/rustc_query_impl/src/execution.rs b/compiler/rustc_query_impl/src/execution.rs
index 89ec7ad9012a..683e96f4d257 100644
--- a/compiler/rustc_query_impl/src/execution.rs
+++ b/compiler/rustc_query_impl/src/execution.rs
@@ -5,7 +5,7 @@ use rustc_data_structures::hash_table::{Entry, HashTable};
 use rustc_data_structures::stack::ensure_sufficient_stack;
 use rustc_data_structures::{outline, sharded, sync};
 use rustc_errors::{Diag, FatalError, StashKey};
-use rustc_middle::dep_graph::{DepGraphData, DepNodeKey, DepsType, HasDepContext};
+use rustc_middle::dep_graph::{DepGraphData, DepNodeKey, HasDepContext};
 use rustc_middle::query::{
     ActiveKeyStatus, CycleError, CycleErrorHandling, QueryCache, QueryJob, QueryJobId, QueryLatch,
     QueryMode, QueryStackDeferred, QueryStackFrame, QueryState,
@@ -438,7 +438,7 @@ fn execute_job_non_incr<'tcx, C: QueryCache, const FLAGS: QueryFlags>(
 fn execute_job_incr<'tcx, C: QueryCache, const FLAGS: QueryFlags>(
     query: SemiDynamicQueryDispatcher<'tcx, C, FLAGS>,
     qcx: QueryCtxt<'tcx>,
-    dep_graph_data: &DepGraphData,
+    dep_graph_data: &DepGraphData,
     key: C::Key,
     mut dep_node_opt: Option,
     job_id: QueryJobId,
@@ -487,7 +487,7 @@ fn execute_job_incr<'tcx, C: QueryCache, const FLAGS: QueryFlags>(
 #[inline(always)]
 fn try_load_from_disk_and_cache_in_memory<'tcx, C: QueryCache, const FLAGS: QueryFlags>(
     query: SemiDynamicQueryDispatcher<'tcx, C, FLAGS>,
-    dep_graph_data: &DepGraphData,
+    dep_graph_data: &DepGraphData,
     qcx: QueryCtxt<'tcx>,
     key: &C::Key,
     dep_node: &DepNode,

From 414be2e6ff398dd67aea1f6fffb1d335a23322bd Mon Sep 17 00:00:00 2001
From: Nicholas Nethercote 
Date: Thu, 12 Feb 2026 10:35:23 +1100
Subject: [PATCH 189/265] Remove `Deps`.

It's no longer needed.
---
 compiler/rustc_middle/src/dep_graph/graph.rs  | 14 ++---
 compiler/rustc_middle/src/dep_graph/mod.rs    | 54 +++++--------------
 .../rustc_middle/src/dep_graph/serialized.rs  |  2 +-
 compiler/rustc_query_impl/src/plumbing.rs     |  5 +-
 4 files changed, 24 insertions(+), 51 deletions(-)

diff --git a/compiler/rustc_middle/src/dep_graph/graph.rs b/compiler/rustc_middle/src/dep_graph/graph.rs
index 0ee1ee44fd1c..5d3d09ded212 100644
--- a/compiler/rustc_middle/src/dep_graph/graph.rs
+++ b/compiler/rustc_middle/src/dep_graph/graph.rs
@@ -25,7 +25,7 @@ use {super::debug::EdgeFilter, std::env};
 
 use super::query::DepGraphQuery;
 use super::serialized::{GraphEncoder, SerializedDepGraph, SerializedDepNodeIndex};
-use super::{DepContext, DepKind, DepNode, Deps, DepsType, HasDepContext, WorkProductId};
+use super::{DepContext, DepKind, DepNode, DepsType, HasDepContext, WorkProductId};
 use crate::dep_graph::edges::EdgesVec;
 use crate::ty::TyCtxt;
 use crate::verify_ich::incremental_verify_ich;
@@ -252,7 +252,7 @@ impl DepGraph {
     }
 
     #[inline(always)]
-    pub fn with_task, A: Debug, R>(
+    pub fn with_task(
         &self,
         key: DepNode,
         cx: Ctxt,
@@ -266,7 +266,7 @@ impl DepGraph {
         }
     }
 
-    pub fn with_anon_task, OP, R>(
+    pub fn with_anon_task(
         &self,
         cx: Tcx,
         dep_kind: DepKind,
@@ -315,7 +315,7 @@ impl DepGraphData {
     ///
     /// [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/queries/incremental-compilation.html
     #[inline(always)]
-    pub fn with_task, A: Debug, R>(
+    pub fn with_task(
         &self,
         key: DepNode,
         cx: Ctxt,
@@ -369,7 +369,7 @@ impl DepGraphData {
     /// FIXME: This could perhaps return a `WithDepNode` to ensure that the
     /// user of this function actually performs the read; we'll have to see
     /// how to make that work with `anon` in `execute_job_incr`, though.
-    pub fn with_anon_task_inner, OP, R>(
+    pub fn with_anon_task_inner(
         &self,
         cx: Tcx,
         dep_kind: DepKind,
@@ -438,7 +438,7 @@ impl DepGraphData {
     }
 
     /// Intern the new `DepNode` with the dependencies up-to-now.
-    fn hash_result_and_alloc_node, R>(
+    fn hash_result_and_alloc_node(
         &self,
         cx: &Ctxt,
         node: DepNode,
@@ -553,7 +553,7 @@ impl DepGraph {
     /// FIXME: If the code is changed enough for this node to be marked before requiring the
     /// caller's node, we suppose that those changes will be enough to mark this node red and
     /// force a recomputation using the "normal" way.
-    pub fn with_feed_task, R>(
+    pub fn with_feed_task(
         &self,
         node: DepNode,
         cx: Ctxt,
diff --git a/compiler/rustc_middle/src/dep_graph/mod.rs b/compiler/rustc_middle/src/dep_graph/mod.rs
index 0c100b773392..3b04ba4ca276 100644
--- a/compiler/rustc_middle/src/dep_graph/mod.rs
+++ b/compiler/rustc_middle/src/dep_graph/mod.rs
@@ -1,7 +1,6 @@
 use std::panic;
 
 use rustc_data_structures::profiling::SelfProfilerRef;
-use rustc_data_structures::sync::DynSync;
 use rustc_query_system::ich::StableHashingContext;
 use rustc_session::Session;
 use tracing::instrument;
@@ -28,8 +27,6 @@ mod query;
 mod serialized;
 
 pub trait DepContext: Copy {
-    type Deps: Deps;
-
     /// Create a hashing context for hashing new results.
     fn with_stable_hashing_context(self, f: impl FnOnce(StableHashingContext<'_>) -> R) -> R;
 
@@ -96,45 +93,13 @@ pub trait DepContext: Copy {
     fn with_reduced_queries(self, _: impl FnOnce() -> T) -> T;
 }
 
-pub trait Deps: DynSync {
-    /// Execute the operation with provided dependencies.
-    fn with_deps(deps: TaskDepsRef<'_>, op: OP) -> R
-    where
-        OP: FnOnce() -> R;
-
-    /// Access dependencies from current implicit context.
-    fn read_deps(op: OP)
-    where
-        OP: for<'a> FnOnce(TaskDepsRef<'a>);
-
-    fn name(dep_kind: DepKind) -> &'static str;
-
-    /// We use this for most things when incr. comp. is turned off.
-    const DEP_KIND_NULL: DepKind;
-
-    /// We use this to create a forever-red node.
-    const DEP_KIND_RED: DepKind;
-
-    /// We use this to create a side effect node.
-    const DEP_KIND_SIDE_EFFECT: DepKind;
-
-    /// We use this to create the anon node with zero dependencies.
-    const DEP_KIND_ANON_ZERO_DEPS: DepKind;
-
-    /// This is the highest value a `DepKind` can have. It's used during encoding to
-    /// pack information into the unused bits.
-    const DEP_KIND_MAX: u16;
-}
-
 pub trait HasDepContext: Copy {
-    type Deps: self::Deps;
-    type DepContext: self::DepContext;
+    type DepContext: self::DepContext;
 
     fn dep_context(&self) -> &Self::DepContext;
 }
 
 impl HasDepContext for T {
-    type Deps = T::Deps;
     type DepContext = Self;
 
     fn dep_context(&self) -> &Self::DepContext {
@@ -143,7 +108,6 @@ impl HasDepContext for T {
 }
 
 impl HasDepContext for (T, Q) {
-    type Deps = T::Deps;
     type DepContext = T::DepContext;
 
     fn dep_context(&self) -> &Self::DepContext {
@@ -183,7 +147,8 @@ pub type DepKindVTable<'tcx> = dep_node::DepKindVTable>;
 
 pub struct DepsType;
 
-impl Deps for DepsType {
+impl DepsType {
+    /// Execute the operation with provided dependencies.
     fn with_deps(task_deps: TaskDepsRef<'_>, op: OP) -> R
     where
         OP: FnOnce() -> R,
@@ -195,6 +160,7 @@ impl Deps for DepsType {
         })
     }
 
+    /// Access dependencies from current implicit context.
     fn read_deps(op: OP)
     where
         OP: for<'a> FnOnce(TaskDepsRef<'a>),
@@ -209,16 +175,24 @@ impl Deps for DepsType {
         dep_node::DEP_KIND_NAMES[dep_kind.as_usize()]
     }
 
+    /// We use this for most things when incr. comp. is turned off.
     const DEP_KIND_NULL: DepKind = dep_kinds::Null;
+
+    /// We use this to create a forever-red node.
     const DEP_KIND_RED: DepKind = dep_kinds::Red;
+
+    /// We use this to create a side effect node.
     const DEP_KIND_SIDE_EFFECT: DepKind = dep_kinds::SideEffect;
+
+    /// We use this to create the anon node with zero dependencies.
     const DEP_KIND_ANON_ZERO_DEPS: DepKind = dep_kinds::AnonZeroDeps;
+
+    /// This is the highest value a `DepKind` can have. It's used during encoding to
+    /// pack information into the unused bits.
     const DEP_KIND_MAX: u16 = dep_node::DEP_KIND_VARIANTS - 1;
 }
 
 impl<'tcx> DepContext for TyCtxt<'tcx> {
-    type Deps = DepsType;
-
     #[inline]
     fn with_stable_hashing_context(self, f: impl FnOnce(StableHashingContext<'_>) -> R) -> R {
         TyCtxt::with_stable_hashing_context(self, f)
diff --git a/compiler/rustc_middle/src/dep_graph/serialized.rs b/compiler/rustc_middle/src/dep_graph/serialized.rs
index 87b85226c9c3..d2938373f544 100644
--- a/compiler/rustc_middle/src/dep_graph/serialized.rs
+++ b/compiler/rustc_middle/src/dep_graph/serialized.rs
@@ -60,7 +60,7 @@ use tracing::{debug, instrument};
 
 use super::graph::{CurrentDepGraph, DepNodeColorMap};
 use super::query::DepGraphQuery;
-use super::{DepKind, DepNode, DepNodeIndex, Deps};
+use super::{DepKind, DepNode, DepNodeIndex};
 use crate::dep_graph::DepsType;
 use crate::dep_graph::edges::EdgesVec;
 
diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs
index 911d38d0993e..50838daf0112 100644
--- a/compiler/rustc_query_impl/src/plumbing.rs
+++ b/compiler/rustc_query_impl/src/plumbing.rs
@@ -15,8 +15,8 @@ use rustc_middle::bug;
 #[expect(unused_imports, reason = "used by doc comments")]
 use rustc_middle::dep_graph::DepKindVTable;
 use rustc_middle::dep_graph::{
-    self, DepContext, DepNode, DepNodeIndex, DepNodeKey, DepsType, HasDepContext,
-    SerializedDepNodeIndex, dep_kinds,
+    self, DepContext, DepNode, DepNodeIndex, DepNodeKey, HasDepContext, SerializedDepNodeIndex,
+    dep_kinds,
 };
 use rustc_middle::query::on_disk_cache::{
     AbsoluteBytePos, CacheDecoder, CacheEncoder, EncodedDepNodeIndex,
@@ -142,7 +142,6 @@ impl<'tcx> QueryCtxt<'tcx> {
 }
 
 impl<'tcx> HasDepContext for QueryCtxt<'tcx> {
-    type Deps = DepsType;
     type DepContext = TyCtxt<'tcx>;
 
     #[inline]

From 7c877d994bc7b062326e8301646a4da045e5e5ba Mon Sep 17 00:00:00 2001
From: Nicholas Nethercote 
Date: Thu, 12 Feb 2026 11:25:32 +1100
Subject: [PATCH 190/265] Remove `DepContext`.

It's no longer needed now that we can access `TyCtxt` directly.
---
 compiler/rustc_interface/src/callbacks.rs     |   2 +-
 .../rustc_middle/src/dep_graph/dep_node.rs    |  52 +++---
 .../src/dep_graph/dep_node_key.rs             |  20 +--
 compiler/rustc_middle/src/dep_graph/graph.rs  |  42 ++---
 compiler/rustc_middle/src/dep_graph/mod.rs    | 161 ++++++------------
 compiler/rustc_middle/src/query/inner.rs      |   2 +-
 compiler/rustc_middle/src/verify_ich.rs       |  34 ++--
 .../rustc_query_impl/src/dep_kind_vtables.rs  |   3 +-
 compiler/rustc_query_impl/src/execution.rs    |   4 +-
 compiler/rustc_query_impl/src/job.rs          |   1 -
 compiler/rustc_query_impl/src/plumbing.rs     |  13 +-
 .../src/error_reporting/infer/mod.rs          |  11 +-
 12 files changed, 138 insertions(+), 207 deletions(-)

diff --git a/compiler/rustc_interface/src/callbacks.rs b/compiler/rustc_interface/src/callbacks.rs
index 49c682ea93f8..05ddfd1f107a 100644
--- a/compiler/rustc_interface/src/callbacks.rs
+++ b/compiler/rustc_interface/src/callbacks.rs
@@ -13,7 +13,7 @@ use std::fmt;
 
 use rustc_errors::{DiagInner, TRACK_DIAGNOSTIC};
 use rustc_middle::dep_graph::dep_node::default_dep_kind_debug;
-use rustc_middle::dep_graph::{DepContext, DepKind, DepNode, TaskDepsRef};
+use rustc_middle::dep_graph::{DepKind, DepNode, TaskDepsRef};
 use rustc_middle::ty::tls;
 
 fn track_span_parent(def_id: rustc_span::def_id::LocalDefId) {
diff --git a/compiler/rustc_middle/src/dep_graph/dep_node.rs b/compiler/rustc_middle/src/dep_graph/dep_node.rs
index 2d198b65d128..14e43e045e82 100644
--- a/compiler/rustc_middle/src/dep_graph/dep_node.rs
+++ b/compiler/rustc_middle/src/dep_graph/dep_node.rs
@@ -67,7 +67,7 @@ use rustc_macros::{Decodable, Encodable};
 use rustc_query_system::ich::StableHashingContext;
 use rustc_span::Symbol;
 
-use super::{DepContext, FingerprintStyle, SerializedDepNodeIndex};
+use super::{FingerprintStyle, SerializedDepNodeIndex};
 use crate::mir::mono::MonoItem;
 use crate::ty::TyCtxt;
 
@@ -117,18 +117,14 @@ impl DepNode {
     /// Creates a new, parameterless DepNode. This method will assert
     /// that the DepNode corresponding to the given DepKind actually
     /// does not require any parameters.
-    pub fn new_no_params(tcx: Tcx, kind: DepKind) -> DepNode
-    where
-        Tcx: super::DepContext,
-    {
+    pub fn new_no_params<'tcx>(tcx: TyCtxt<'tcx>, kind: DepKind) -> DepNode {
         debug_assert_eq!(tcx.fingerprint_style(kind), FingerprintStyle::Unit);
         DepNode { kind, hash: Fingerprint::ZERO.into() }
     }
 
-    pub fn construct(tcx: Tcx, kind: DepKind, arg: &Key) -> DepNode
+    pub fn construct<'tcx, Key>(tcx: TyCtxt<'tcx>, kind: DepKind, arg: &Key) -> DepNode
     where
-        Tcx: super::DepContext,
-        Key: DepNodeKey,
+        Key: DepNodeKey<'tcx>,
     {
         let hash = arg.to_fingerprint(tcx);
         let dep_node = DepNode { kind, hash: hash.into() };
@@ -136,10 +132,10 @@ impl DepNode {
         #[cfg(debug_assertions)]
         {
             if !tcx.fingerprint_style(kind).reconstructible()
-                && (tcx.sess().opts.unstable_opts.incremental_info
-                    || tcx.sess().opts.unstable_opts.query_dep_graph)
+                && (tcx.sess.opts.unstable_opts.incremental_info
+                    || tcx.sess.opts.unstable_opts.query_dep_graph)
             {
-                tcx.dep_graph().register_dep_node_debug_str(dep_node, || arg.to_debug_str(tcx));
+                tcx.dep_graph.register_dep_node_debug_str(dep_node, || arg.to_debug_str(tcx));
             }
         }
 
@@ -149,10 +145,11 @@ impl DepNode {
     /// Construct a DepNode from the given DepKind and DefPathHash. This
     /// method will assert that the given DepKind actually requires a
     /// single DefId/DefPathHash parameter.
-    pub fn from_def_path_hash(tcx: Tcx, def_path_hash: DefPathHash, kind: DepKind) -> Self
-    where
-        Tcx: super::DepContext,
-    {
+    pub fn from_def_path_hash<'tcx>(
+        tcx: TyCtxt<'tcx>,
+        def_path_hash: DefPathHash,
+        kind: DepKind,
+    ) -> Self {
         debug_assert!(tcx.fingerprint_style(kind) == FingerprintStyle::DefPathHash);
         DepNode { kind, hash: def_path_hash.0.into() }
     }
@@ -172,14 +169,14 @@ impl fmt::Debug for DepNode {
 }
 
 /// Trait for query keys as seen by dependency-node tracking.
-pub trait DepNodeKey: fmt::Debug + Sized {
+pub trait DepNodeKey<'tcx>: fmt::Debug + Sized {
     fn fingerprint_style() -> FingerprintStyle;
 
     /// This method turns a query key into an opaque `Fingerprint` to be used
     /// in `DepNode`.
-    fn to_fingerprint(&self, _: Tcx) -> Fingerprint;
+    fn to_fingerprint(&self, tcx: TyCtxt<'tcx>) -> Fingerprint;
 
-    fn to_debug_str(&self, tcx: Tcx) -> String;
+    fn to_debug_str(&self, tcx: TyCtxt<'tcx>) -> String;
 
     /// This method tries to recover the query key from the given `DepNode`,
     /// something which is needed when forcing `DepNode`s during red-green
@@ -187,11 +184,11 @@ pub trait DepNodeKey: fmt::Debug + Sized {
     /// `fingerprint_style()` is not `FingerprintStyle::Opaque`.
     /// It is always valid to return `None` here, in which case incremental
     /// compilation will treat the query as having changed instead of forcing it.
-    fn recover(tcx: Tcx, dep_node: &DepNode) -> Option;
+    fn recover(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option;
 }
 
 // Blanket impl of `DepNodeKey`, which is specialized by other impls elsewhere.
-impl DepNodeKey for T
+impl<'tcx, T> DepNodeKey<'tcx> for T
 where
     T: for<'a> HashStable> + fmt::Debug,
 {
@@ -201,7 +198,7 @@ where
     }
 
     #[inline(always)]
-    default fn to_fingerprint(&self, tcx: Tcx) -> Fingerprint {
+    default fn to_fingerprint(&self, tcx: TyCtxt<'tcx>) -> Fingerprint {
         tcx.with_stable_hashing_context(|mut hcx| {
             let mut hasher = StableHasher::new();
             self.hash_stable(&mut hcx, &mut hasher);
@@ -210,7 +207,7 @@ where
     }
 
     #[inline(always)]
-    default fn to_debug_str(&self, tcx: Tcx) -> String {
+    default fn to_debug_str(&self, tcx: TyCtxt<'tcx>) -> String {
         // Make sure to print dep node params with reduced queries since printing
         // may themselves call queries, which may lead to (possibly untracked!)
         // query cycles.
@@ -218,7 +215,7 @@ where
     }
 
     #[inline(always)]
-    default fn recover(_: Tcx, _: &DepNode) -> Option {
+    default fn recover(_: TyCtxt<'tcx>, _: &DepNode) -> Option {
         None
     }
 }
@@ -228,7 +225,7 @@ where
 /// Information is retrieved by indexing the `DEP_KINDS` array using the integer value
 /// of the `DepKind`. Overall, this allows to implement `DepContext` using this manual
 /// jump table instead of large matches.
-pub struct DepKindVTable {
+pub struct DepKindVTable<'tcx> {
     /// Anonymous queries cannot be replayed from one compiler invocation to the next.
     /// When their result is needed, it is recomputed. They are useful for fine-grained
     /// dependency tracking, and caching within one compiler invocation.
@@ -279,11 +276,12 @@ pub struct DepKindVTable {
     /// with kind `MirValidated`, we know that the GUID/fingerprint of the `DepNode`
     /// is actually a `DefPathHash`, and can therefore just look up the corresponding
     /// `DefId` in `tcx.def_path_hash_to_def_id`.
-    pub force_from_dep_node:
-        Option bool>,
+    pub force_from_dep_node: Option<
+        fn(tcx: TyCtxt<'tcx>, dep_node: DepNode, prev_index: SerializedDepNodeIndex) -> bool,
+    >,
 
     /// Invoke a query to put the on-disk cached value in memory.
-    pub try_load_from_on_disk_cache: Option,
+    pub try_load_from_on_disk_cache: Option, DepNode)>,
 
     /// The name of this dep kind.
     pub name: &'static &'static str,
diff --git a/compiler/rustc_middle/src/dep_graph/dep_node_key.rs b/compiler/rustc_middle/src/dep_graph/dep_node_key.rs
index 1b9b02b67fad..92c135a6e7fd 100644
--- a/compiler/rustc_middle/src/dep_graph/dep_node_key.rs
+++ b/compiler/rustc_middle/src/dep_graph/dep_node_key.rs
@@ -3,10 +3,10 @@ use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE, LocalDefId, LocalModDefId,
 use rustc_hir::definitions::DefPathHash;
 use rustc_hir::{HirId, ItemLocalId, OwnerId};
 
-use crate::dep_graph::{DepContext, DepNode, DepNodeKey, FingerprintStyle};
+use crate::dep_graph::{DepNode, DepNodeKey, FingerprintStyle};
 use crate::ty::TyCtxt;
 
-impl<'tcx> DepNodeKey> for () {
+impl<'tcx> DepNodeKey<'tcx> for () {
     #[inline(always)]
     fn fingerprint_style() -> FingerprintStyle {
         FingerprintStyle::Unit
@@ -23,7 +23,7 @@ impl<'tcx> DepNodeKey> for () {
     }
 }
 
-impl<'tcx> DepNodeKey> for DefId {
+impl<'tcx> DepNodeKey<'tcx> for DefId {
     #[inline(always)]
     fn fingerprint_style() -> FingerprintStyle {
         FingerprintStyle::DefPathHash
@@ -45,7 +45,7 @@ impl<'tcx> DepNodeKey> for DefId {
     }
 }
 
-impl<'tcx> DepNodeKey> for LocalDefId {
+impl<'tcx> DepNodeKey<'tcx> for LocalDefId {
     #[inline(always)]
     fn fingerprint_style() -> FingerprintStyle {
         FingerprintStyle::DefPathHash
@@ -67,7 +67,7 @@ impl<'tcx> DepNodeKey> for LocalDefId {
     }
 }
 
-impl<'tcx> DepNodeKey> for OwnerId {
+impl<'tcx> DepNodeKey<'tcx> for OwnerId {
     #[inline(always)]
     fn fingerprint_style() -> FingerprintStyle {
         FingerprintStyle::DefPathHash
@@ -89,7 +89,7 @@ impl<'tcx> DepNodeKey> for OwnerId {
     }
 }
 
-impl<'tcx> DepNodeKey> for CrateNum {
+impl<'tcx> DepNodeKey<'tcx> for CrateNum {
     #[inline(always)]
     fn fingerprint_style() -> FingerprintStyle {
         FingerprintStyle::DefPathHash
@@ -112,7 +112,7 @@ impl<'tcx> DepNodeKey> for CrateNum {
     }
 }
 
-impl<'tcx> DepNodeKey> for (DefId, DefId) {
+impl<'tcx> DepNodeKey<'tcx> for (DefId, DefId) {
     #[inline(always)]
     fn fingerprint_style() -> FingerprintStyle {
         FingerprintStyle::Opaque
@@ -139,7 +139,7 @@ impl<'tcx> DepNodeKey> for (DefId, DefId) {
     }
 }
 
-impl<'tcx> DepNodeKey> for HirId {
+impl<'tcx> DepNodeKey<'tcx> for HirId {
     #[inline(always)]
     fn fingerprint_style() -> FingerprintStyle {
         FingerprintStyle::HirId
@@ -182,7 +182,7 @@ impl<'tcx> DepNodeKey> for HirId {
     }
 }
 
-impl<'tcx> DepNodeKey> for ModDefId {
+impl<'tcx> DepNodeKey<'tcx> for ModDefId {
     #[inline(always)]
     fn fingerprint_style() -> FingerprintStyle {
         FingerprintStyle::DefPathHash
@@ -204,7 +204,7 @@ impl<'tcx> DepNodeKey> for ModDefId {
     }
 }
 
-impl<'tcx> DepNodeKey> for LocalModDefId {
+impl<'tcx> DepNodeKey<'tcx> for LocalModDefId {
     #[inline(always)]
     fn fingerprint_style() -> FingerprintStyle {
         FingerprintStyle::DefPathHash
diff --git a/compiler/rustc_middle/src/dep_graph/graph.rs b/compiler/rustc_middle/src/dep_graph/graph.rs
index 5d3d09ded212..d0ac39852318 100644
--- a/compiler/rustc_middle/src/dep_graph/graph.rs
+++ b/compiler/rustc_middle/src/dep_graph/graph.rs
@@ -25,7 +25,7 @@ use {super::debug::EdgeFilter, std::env};
 
 use super::query::DepGraphQuery;
 use super::serialized::{GraphEncoder, SerializedDepGraph, SerializedDepNodeIndex};
-use super::{DepContext, DepKind, DepNode, DepsType, HasDepContext, WorkProductId};
+use super::{DepKind, DepNode, DepsType, HasDepContext, WorkProductId};
 use crate::dep_graph::edges::EdgesVec;
 use crate::ty::TyCtxt;
 use crate::verify_ich::incremental_verify_ich;
@@ -62,7 +62,7 @@ impl From for QueryInvocationId {
     }
 }
 
-pub struct MarkFrame<'a> {
+pub(crate) struct MarkFrame<'a> {
     index: SerializedDepNodeIndex,
     parent: Option<&'a MarkFrame<'a>>,
 }
@@ -252,7 +252,7 @@ impl DepGraph {
     }
 
     #[inline(always)]
-    pub fn with_task(
+    pub fn with_task<'tcx, Ctxt: HasDepContext<'tcx>, A: Debug, R>(
         &self,
         key: DepNode,
         cx: Ctxt,
@@ -266,9 +266,9 @@ impl DepGraph {
         }
     }
 
-    pub fn with_anon_task(
+    pub fn with_anon_task<'tcx, OP, R>(
         &self,
-        cx: Tcx,
+        cx: TyCtxt<'tcx>,
         dep_kind: DepKind,
         op: OP,
     ) -> (R, DepNodeIndex)
@@ -315,7 +315,7 @@ impl DepGraphData {
     ///
     /// [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/queries/incremental-compilation.html
     #[inline(always)]
-    pub fn with_task(
+    pub fn with_task<'tcx, Ctxt: HasDepContext<'tcx>, A: Debug, R>(
         &self,
         key: DepNode,
         cx: Ctxt,
@@ -329,7 +329,7 @@ impl DepGraphData {
         // 2. Two distinct query keys get mapped to the same `DepNode`
         //    (see for example #48923).
         self.assert_dep_node_not_yet_allocated_in_current_session(
-            cx.dep_context().sess(),
+            cx.dep_context().sess,
             &key,
             || {
                 format!(
@@ -352,8 +352,8 @@ impl DepGraphData {
             (with_deps(TaskDepsRef::Allow(&task_deps)), task_deps.into_inner().reads)
         };
 
-        let dcx = cx.dep_context();
-        let dep_node_index = self.hash_result_and_alloc_node(dcx, key, edges, &result, hash_result);
+        let dep_node_index =
+            self.hash_result_and_alloc_node(cx.dep_context(), key, edges, &result, hash_result);
 
         (result, dep_node_index)
     }
@@ -369,9 +369,9 @@ impl DepGraphData {
     /// FIXME: This could perhaps return a `WithDepNode` to ensure that the
     /// user of this function actually performs the read; we'll have to see
     /// how to make that work with `anon` in `execute_job_incr`, though.
-    pub fn with_anon_task_inner(
+    pub fn with_anon_task_inner<'tcx, OP, R>(
         &self,
-        cx: Tcx,
+        cx: TyCtxt<'tcx>,
         dep_kind: DepKind,
         op: OP,
     ) -> (R, DepNodeIndex)
@@ -438,17 +438,17 @@ impl DepGraphData {
     }
 
     /// Intern the new `DepNode` with the dependencies up-to-now.
-    fn hash_result_and_alloc_node(
+    fn hash_result_and_alloc_node<'tcx, R>(
         &self,
-        cx: &Ctxt,
+        tcx: TyCtxt<'tcx>,
         node: DepNode,
         edges: EdgesVec,
         result: &R,
         hash_result: Option, &R) -> Fingerprint>,
     ) -> DepNodeIndex {
-        let hashing_timer = cx.profiler().incr_result_hashing();
+        let hashing_timer = tcx.prof.incr_result_hashing();
         let current_fingerprint = hash_result.map(|hash_result| {
-            cx.with_stable_hashing_context(|mut hcx| hash_result(&mut hcx, result))
+            tcx.with_stable_hashing_context(|mut hcx| hash_result(&mut hcx, result))
         });
         let dep_node_index = self.alloc_and_color_node(node, edges, current_fingerprint);
         hashing_timer.finish_with_query_invocation_id(dep_node_index.into());
@@ -553,10 +553,10 @@ impl DepGraph {
     /// FIXME: If the code is changed enough for this node to be marked before requiring the
     /// caller's node, we suppose that those changes will be enough to mark this node red and
     /// force a recomputation using the "normal" way.
-    pub fn with_feed_task(
+    pub fn with_feed_task<'tcx, R>(
         &self,
         node: DepNode,
-        cx: Ctxt,
+        tcx: TyCtxt<'tcx>,
         result: &R,
         hash_result: Option, &R) -> Fingerprint>,
         format_value_fn: fn(&R) -> String,
@@ -572,7 +572,7 @@ impl DepGraph {
                 let dep_node_index = data.colors.current(prev_index);
                 if let Some(dep_node_index) = dep_node_index {
                     incremental_verify_ich(
-                        cx,
+                        tcx,
                         data,
                         result,
                         prev_index,
@@ -605,7 +605,7 @@ impl DepGraph {
                 }
             });
 
-            data.hash_result_and_alloc_node(&cx, node, edges, result, hash_result)
+            data.hash_result_and_alloc_node(tcx, node, edges, result, hash_result)
         } else {
             // Incremental compilation is turned off. We just execute the task
             // without tracking. We still provide a dep-node index that uniquely
@@ -1051,8 +1051,8 @@ impl DepGraph {
     ///
     /// This method will only load queries that will end up in the disk cache.
     /// Other queries will not be executed.
-    pub fn exec_cache_promotions(&self, tcx: Tcx) {
-        let _prof_timer = tcx.profiler().generic_activity("incr_comp_query_cache_promotion");
+    pub fn exec_cache_promotions<'tcx>(&self, tcx: TyCtxt<'tcx>) {
+        let _prof_timer = tcx.prof.generic_activity("incr_comp_query_cache_promotion");
 
         let data = self.data.as_ref().unwrap();
         for prev_index in data.colors.values.indices() {
diff --git a/compiler/rustc_middle/src/dep_graph/mod.rs b/compiler/rustc_middle/src/dep_graph/mod.rs
index 3b04ba4ca276..ea347f53ac44 100644
--- a/compiler/rustc_middle/src/dep_graph/mod.rs
+++ b/compiler/rustc_middle/src/dep_graph/mod.rs
@@ -1,12 +1,10 @@
 use std::panic;
 
-use rustc_data_structures::profiling::SelfProfilerRef;
-use rustc_query_system::ich::StableHashingContext;
-use rustc_session::Session;
 use tracing::instrument;
 
 pub use self::dep_node::{
-    DepKind, DepNode, DepNodeKey, WorkProductId, dep_kind_from_label, dep_kinds, label_strs,
+    DepKind, DepKindVTable, DepNode, DepNodeKey, WorkProductId, dep_kind_from_label, dep_kinds,
+    label_strs,
 };
 pub use self::graph::{
     DepGraph, DepGraphData, DepNodeIndex, TaskDepsRef, WorkProduct, WorkProductMap, hash_result,
@@ -26,91 +24,18 @@ mod graph;
 mod query;
 mod serialized;
 
-pub trait DepContext: Copy {
-    /// Create a hashing context for hashing new results.
-    fn with_stable_hashing_context(self, f: impl FnOnce(StableHashingContext<'_>) -> R) -> R;
-
-    /// Access the DepGraph.
-    fn dep_graph(&self) -> &DepGraph;
-
-    /// Access the profiler.
-    fn profiler(&self) -> &SelfProfilerRef;
-
-    /// Access the compiler session.
-    fn sess(&self) -> &Session;
-
-    fn dep_kind_vtable(&self, dep_node: DepKind) -> &dep_node::DepKindVTable;
-
-    #[inline(always)]
-    fn fingerprint_style(self, kind: DepKind) -> FingerprintStyle {
-        self.dep_kind_vtable(kind).fingerprint_style
-    }
-
-    #[inline(always)]
-    /// Return whether this kind always require evaluation.
-    // FIXME: remove this in favour of the version on `TyCtxt`.
-    fn is_eval_always(self, kind: DepKind) -> bool {
-        self.dep_kind_vtable(kind).is_eval_always
-    }
-
-    /// Try to force a dep node to execute and see if it's green.
-    ///
-    /// Returns true if the query has actually been forced. It is valid that a query
-    /// fails to be forced, e.g. when the query key cannot be reconstructed from the
-    /// dep-node or when the query kind outright does not support it.
-    #[inline]
-    #[instrument(skip(self, frame), level = "debug")]
-    fn try_force_from_dep_node(
-        self,
-        dep_node: DepNode,
-        prev_index: SerializedDepNodeIndex,
-        frame: &MarkFrame<'_>,
-    ) -> bool {
-        if let Some(force_fn) = self.dep_kind_vtable(dep_node.kind).force_from_dep_node {
-            match panic::catch_unwind(panic::AssertUnwindSafe(|| {
-                force_fn(self, dep_node, prev_index)
-            })) {
-                Err(value) => {
-                    if !value.is::() {
-                        print_markframe_trace(self.dep_graph(), frame);
-                    }
-                    panic::resume_unwind(value)
-                }
-                Ok(query_has_been_forced) => query_has_been_forced,
-            }
-        } else {
-            false
-        }
-    }
-
-    /// Load data from the on-disk cache.
-    fn try_load_from_on_disk_cache(self, dep_node: &DepNode) {
-        if let Some(try_load_fn) = self.dep_kind_vtable(dep_node.kind).try_load_from_on_disk_cache {
-            try_load_fn(self, *dep_node)
-        }
-    }
-
-    fn with_reduced_queries(self, _: impl FnOnce() -> T) -> T;
+pub trait HasDepContext<'tcx>: Copy {
+    fn dep_context(&self) -> TyCtxt<'tcx>;
 }
 
-pub trait HasDepContext: Copy {
-    type DepContext: self::DepContext;
-
-    fn dep_context(&self) -> &Self::DepContext;
-}
-
-impl HasDepContext for T {
-    type DepContext = Self;
-
-    fn dep_context(&self) -> &Self::DepContext {
-        self
+impl<'tcx> HasDepContext<'tcx> for TyCtxt<'tcx> {
+    fn dep_context(&self) -> TyCtxt<'tcx> {
+        *self
     }
 }
 
-impl HasDepContext for (T, Q) {
-    type DepContext = T::DepContext;
-
-    fn dep_context(&self) -> &Self::DepContext {
+impl<'tcx, T: HasDepContext<'tcx>, Q: Copy> HasDepContext<'tcx> for (T, Q) {
+    fn dep_context(&self) -> TyCtxt<'tcx> {
         self.0.dep_context()
     }
 }
@@ -143,8 +68,6 @@ impl FingerprintStyle {
     }
 }
 
-pub type DepKindVTable<'tcx> = dep_node::DepKindVTable>;
-
 pub struct DepsType;
 
 impl DepsType {
@@ -192,33 +115,55 @@ impl DepsType {
     const DEP_KIND_MAX: u16 = dep_node::DEP_KIND_VARIANTS - 1;
 }
 
-impl<'tcx> DepContext for TyCtxt<'tcx> {
+impl<'tcx> TyCtxt<'tcx> {
     #[inline]
-    fn with_stable_hashing_context(self, f: impl FnOnce(StableHashingContext<'_>) -> R) -> R {
-        TyCtxt::with_stable_hashing_context(self, f)
-    }
-
-    #[inline]
-    fn dep_graph(&self) -> &DepGraph {
-        &self.dep_graph
-    }
-
-    #[inline(always)]
-    fn profiler(&self) -> &SelfProfilerRef {
-        &self.prof
-    }
-
-    #[inline(always)]
-    fn sess(&self) -> &Session {
-        self.sess
-    }
-
-    #[inline]
-    fn dep_kind_vtable(&self, dk: DepKind) -> &DepKindVTable<'tcx> {
+    pub fn dep_kind_vtable(self, dk: DepKind) -> &'tcx DepKindVTable<'tcx> {
         &self.dep_kind_vtables[dk.as_usize()]
     }
 
     fn with_reduced_queries(self, f: impl FnOnce() -> T) -> T {
         with_reduced_queries!(f())
     }
+
+    #[inline(always)]
+    pub fn fingerprint_style(self, kind: DepKind) -> FingerprintStyle {
+        self.dep_kind_vtable(kind).fingerprint_style
+    }
+
+    /// Try to force a dep node to execute and see if it's green.
+    ///
+    /// Returns true if the query has actually been forced. It is valid that a query
+    /// fails to be forced, e.g. when the query key cannot be reconstructed from the
+    /// dep-node or when the query kind outright does not support it.
+    #[inline]
+    #[instrument(skip(self, frame), level = "debug")]
+    fn try_force_from_dep_node(
+        self,
+        dep_node: DepNode,
+        prev_index: SerializedDepNodeIndex,
+        frame: &MarkFrame<'_>,
+    ) -> bool {
+        if let Some(force_fn) = self.dep_kind_vtable(dep_node.kind).force_from_dep_node {
+            match panic::catch_unwind(panic::AssertUnwindSafe(|| {
+                force_fn(self, dep_node, prev_index)
+            })) {
+                Err(value) => {
+                    if !value.is::() {
+                        print_markframe_trace(&self.dep_graph, frame);
+                    }
+                    panic::resume_unwind(value)
+                }
+                Ok(query_has_been_forced) => query_has_been_forced,
+            }
+        } else {
+            false
+        }
+    }
+
+    /// Load data from the on-disk cache.
+    fn try_load_from_on_disk_cache(self, dep_node: &DepNode) {
+        if let Some(try_load_fn) = self.dep_kind_vtable(dep_node.kind).try_load_from_on_disk_cache {
+            try_load_fn(self, *dep_node)
+        }
+    }
 }
diff --git a/compiler/rustc_middle/src/query/inner.rs b/compiler/rustc_middle/src/query/inner.rs
index b977172fcf9d..0b575b536cb6 100644
--- a/compiler/rustc_middle/src/query/inner.rs
+++ b/compiler/rustc_middle/src/query/inner.rs
@@ -105,7 +105,7 @@ pub(crate) fn query_feed<'tcx, Cache>(
     value: Cache::Value,
 ) where
     Cache: QueryCache,
-    Cache::Key: DepNodeKey>,
+    Cache::Key: DepNodeKey<'tcx>,
 {
     let format_value = query_vtable.format_value;
 
diff --git a/compiler/rustc_middle/src/verify_ich.rs b/compiler/rustc_middle/src/verify_ich.rs
index 9e7f26836521..290786d439d4 100644
--- a/compiler/rustc_middle/src/verify_ich.rs
+++ b/compiler/rustc_middle/src/verify_ich.rs
@@ -4,20 +4,19 @@ use rustc_data_structures::fingerprint::Fingerprint;
 use rustc_query_system::ich::StableHashingContext;
 use tracing::instrument;
 
-use crate::dep_graph::{DepContext, DepGraphData, SerializedDepNodeIndex};
+use crate::dep_graph::{DepGraphData, SerializedDepNodeIndex};
+use crate::ty::TyCtxt;
 
 #[inline]
 #[instrument(skip(tcx, dep_graph_data, result, hash_result, format_value), level = "debug")]
-pub fn incremental_verify_ich(
-    tcx: Tcx,
+pub fn incremental_verify_ich<'tcx, V>(
+    tcx: TyCtxt<'tcx>,
     dep_graph_data: &DepGraphData,
     result: &V,
     prev_index: SerializedDepNodeIndex,
     hash_result: Option, &V) -> Fingerprint>,
     format_value: fn(&V) -> String,
-) where
-    Tcx: DepContext,
-{
+) {
     if !dep_graph_data.is_index_green(prev_index) {
         incremental_verify_ich_not_green(tcx, prev_index)
     }
@@ -35,13 +34,10 @@ pub fn incremental_verify_ich(
 
 #[cold]
 #[inline(never)]
-fn incremental_verify_ich_not_green(tcx: Tcx, prev_index: SerializedDepNodeIndex)
-where
-    Tcx: DepContext,
-{
+fn incremental_verify_ich_not_green<'tcx>(tcx: TyCtxt<'tcx>, prev_index: SerializedDepNodeIndex) {
     panic!(
         "fingerprint for green query instance not loaded from cache: {:?}",
-        tcx.dep_graph().data().unwrap().prev_node_of(prev_index)
+        tcx.dep_graph.data().unwrap().prev_node_of(prev_index)
     )
 }
 
@@ -50,13 +46,11 @@ where
 // chew on (and filling up the final binary, too).
 #[cold]
 #[inline(never)]
-fn incremental_verify_ich_failed(
-    tcx: Tcx,
+fn incremental_verify_ich_failed<'tcx>(
+    tcx: TyCtxt<'tcx>,
     prev_index: SerializedDepNodeIndex,
     result: &dyn Fn() -> String,
-) where
-    Tcx: DepContext,
-{
+) {
     // When we emit an error message and panic, we try to debug-print the `DepNode`
     // and query result. Unfortunately, this can cause us to run additional queries,
     // which may result in another fingerprint mismatch while we're in the middle
@@ -70,16 +64,16 @@ fn incremental_verify_ich_failed(
     let old_in_panic = INSIDE_VERIFY_PANIC.replace(true);
 
     if old_in_panic {
-        tcx.sess().dcx().emit_err(crate::error::Reentrant);
+        tcx.dcx().emit_err(crate::error::Reentrant);
     } else {
-        let run_cmd = if let Some(crate_name) = &tcx.sess().opts.crate_name {
+        let run_cmd = if let Some(crate_name) = &tcx.sess.opts.crate_name {
             format!("`cargo clean -p {crate_name}` or `cargo clean`")
         } else {
             "`cargo clean`".to_string()
         };
 
-        let dep_node = tcx.dep_graph().data().unwrap().prev_node_of(prev_index);
-        tcx.sess().dcx().emit_err(crate::error::IncrementCompilation {
+        let dep_node = tcx.dep_graph.data().unwrap().prev_node_of(prev_index);
+        tcx.dcx().emit_err(crate::error::IncrementCompilation {
             run_cmd,
             dep_node: format!("{dep_node:?}"),
         });
diff --git a/compiler/rustc_query_impl/src/dep_kind_vtables.rs b/compiler/rustc_query_impl/src/dep_kind_vtables.rs
index 53fc8034e022..60d9fdc47ed6 100644
--- a/compiler/rustc_query_impl/src/dep_kind_vtables.rs
+++ b/compiler/rustc_query_impl/src/dep_kind_vtables.rs
@@ -1,7 +1,6 @@
 use rustc_middle::bug;
 use rustc_middle::dep_graph::{DepKindVTable, DepNodeKey, FingerprintStyle};
 use rustc_middle::query::QueryCache;
-use rustc_middle::ty::TyCtxt;
 
 use crate::plumbing::{force_from_dep_node_inner, try_load_from_on_disk_cache_inner};
 use crate::{QueryDispatcherUnerased, QueryFlags};
@@ -122,7 +121,7 @@ where
     let fingerprint_style = if is_anon {
         FingerprintStyle::Opaque
     } else {
-        >>::fingerprint_style()
+        >::fingerprint_style()
     };
 
     if is_anon || !fingerprint_style.reconstructible() {
diff --git a/compiler/rustc_query_impl/src/execution.rs b/compiler/rustc_query_impl/src/execution.rs
index 683e96f4d257..826a794bc8fa 100644
--- a/compiler/rustc_query_impl/src/execution.rs
+++ b/compiler/rustc_query_impl/src/execution.rs
@@ -14,7 +14,7 @@ use rustc_middle::ty::TyCtxt;
 use rustc_middle::verify_ich::incremental_verify_ich;
 use rustc_span::{DUMMY_SP, Span};
 
-use crate::dep_graph::{DepContext, DepNode, DepNodeIndex};
+use crate::dep_graph::{DepNode, DepNodeIndex};
 use crate::job::{QueryJobInfo, QueryJobMap, find_cycle_in_stack, report_cycle};
 use crate::{QueryCtxt, QueryFlags, SemiDynamicQueryDispatcher};
 
@@ -535,7 +535,7 @@ fn try_load_from_disk_and_cache_in_memory<'tcx, C: QueryCache, const FLAGS: Quer
     // can be forced from `DepNode`.
     debug_assert!(
         !query.will_cache_on_disk_for_key(qcx.tcx, key)
-            || !qcx.dep_context().fingerprint_style(dep_node.kind).reconstructible(),
+            || !qcx.tcx.fingerprint_style(dep_node.kind).reconstructible(),
         "missing on-disk cache entry for {dep_node:?}"
     );
 
diff --git a/compiler/rustc_query_impl/src/job.rs b/compiler/rustc_query_impl/src/job.rs
index 8e554d4ed4e6..6fda5ab779dc 100644
--- a/compiler/rustc_query_impl/src/job.rs
+++ b/compiler/rustc_query_impl/src/job.rs
@@ -13,7 +13,6 @@ use rustc_session::Session;
 use rustc_span::{DUMMY_SP, Span};
 
 use crate::QueryCtxt;
-use crate::dep_graph::DepContext;
 
 /// Map from query job IDs to job information collected by
 /// `collect_active_jobs_from_all_queries`.
diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs
index 50838daf0112..030ea29a2a6b 100644
--- a/compiler/rustc_query_impl/src/plumbing.rs
+++ b/compiler/rustc_query_impl/src/plumbing.rs
@@ -15,8 +15,7 @@ use rustc_middle::bug;
 #[expect(unused_imports, reason = "used by doc comments")]
 use rustc_middle::dep_graph::DepKindVTable;
 use rustc_middle::dep_graph::{
-    self, DepContext, DepNode, DepNodeIndex, DepNodeKey, HasDepContext, SerializedDepNodeIndex,
-    dep_kinds,
+    self, DepNode, DepNodeIndex, DepNodeKey, HasDepContext, SerializedDepNodeIndex, dep_kinds,
 };
 use rustc_middle::query::on_disk_cache::{
     AbsoluteBytePos, CacheDecoder, CacheEncoder, EncodedDepNodeIndex,
@@ -141,12 +140,10 @@ impl<'tcx> QueryCtxt<'tcx> {
     }
 }
 
-impl<'tcx> HasDepContext for QueryCtxt<'tcx> {
-    type DepContext = TyCtxt<'tcx>;
-
+impl<'tcx> HasDepContext<'tcx> for QueryCtxt<'tcx> {
     #[inline]
-    fn dep_context(&self) -> &Self::DepContext {
-        &self.tcx
+    fn dep_context(&self) -> TyCtxt<'tcx> {
+        self.tcx
     }
 }
 
@@ -165,7 +162,7 @@ pub(super) fn encode_all_query_results<'tcx>(
 }
 
 pub fn query_key_hash_verify_all<'tcx>(tcx: TyCtxt<'tcx>) {
-    if tcx.sess().opts.unstable_opts.incremental_verify_ich || cfg!(debug_assertions) {
+    if tcx.sess.opts.unstable_opts.incremental_verify_ich || cfg!(debug_assertions) {
         tcx.sess.time("query_key_hash_verify_all", || {
             for verify in super::QUERY_KEY_HASH_VERIFY.iter() {
                 verify(tcx);
diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs
index 47810e2578df..8579320321e1 100644
--- a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs
+++ b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs
@@ -60,7 +60,6 @@ use rustc_hir::lang_items::LangItem;
 use rustc_hir::{self as hir};
 use rustc_macros::extension;
 use rustc_middle::bug;
-use rustc_middle::dep_graph::DepContext;
 use rustc_middle::traits::PatternOriginExpr;
 use rustc_middle::ty::error::{ExpectedFound, TypeError, TypeErrorToStringExt};
 use rustc_middle::ty::print::{PrintTraitRefExt as _, WrapBinderMode, with_forced_trimmed_paths};
@@ -1757,7 +1756,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
                 // containing a single ASCII character, perhaps the user meant to write `b'c'` to
                 // specify a byte literal
                 (ty::Uint(ty::UintTy::U8), ty::Char) => {
-                    if let Ok(code) = self.tcx.sess().source_map().span_to_snippet(span)
+                    if let Ok(code) = self.tcx.sess.source_map().span_to_snippet(span)
                         && let Some(code) = code.strip_circumfix('\'', '\'')
                         // forbid all Unicode escapes
                         && !code.starts_with("\\u")
@@ -1774,7 +1773,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
                 // containing a single character, perhaps the user meant to write `'c'` to
                 // specify a character literal (issue #92479)
                 (ty::Char, ty::Ref(_, r, _)) if r.is_str() => {
-                    if let Ok(code) = self.tcx.sess().source_map().span_to_snippet(span)
+                    if let Ok(code) = self.tcx.sess.source_map().span_to_snippet(span)
                         && let Some(code) = code.strip_circumfix('"', '"')
                         && code.chars().count() == 1
                     {
@@ -1787,7 +1786,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
                 // If a string was expected and the found expression is a character literal,
                 // perhaps the user meant to write `"s"` to specify a string literal.
                 (ty::Ref(_, r, _), ty::Char) if r.is_str() => {
-                    if let Ok(code) = self.tcx.sess().source_map().span_to_snippet(span)
+                    if let Ok(code) = self.tcx.sess.source_map().span_to_snippet(span)
                         && code.starts_with("'")
                         && code.ends_with("'")
                     {
@@ -1928,7 +1927,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
             return None;
         }
 
-        let Ok(code) = self.tcx.sess().source_map().span_to_snippet(span) else { return None };
+        let Ok(code) = self.tcx.sess.source_map().span_to_snippet(span) else { return None };
 
         let sugg = if code.starts_with('(') && code.ends_with(')') {
             let before_close = span.hi() - BytePos::from_u32(1);
@@ -2005,7 +2004,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
                 // Use the terminal width as the basis to determine when to compress the printed
                 // out type, but give ourselves some leeway to avoid ending up creating a file for
                 // a type that is somewhat shorter than the path we'd write to.
-                let len = self.tcx.sess().diagnostic_width() + 40;
+                let len = self.tcx.sess.diagnostic_width() + 40;
                 let exp_s = exp.content();
                 let fnd_s = fnd.content();
                 if exp_s.len() > len {

From fcea886c1a6d9d0a5736d097b95a7903e7ab83ce Mon Sep 17 00:00:00 2001
From: Nicholas Nethercote 
Date: Thu, 12 Feb 2026 12:14:02 +1100
Subject: [PATCH 191/265] Break up `DepsType`.

By moving most of it into `DepKind`, and changing two methods into free
functions.
---
 .../rustc_middle/src/dep_graph/dep_node.rs    | 20 ++++++
 compiler/rustc_middle/src/dep_graph/graph.rs  | 28 ++++-----
 compiler/rustc_middle/src/dep_graph/mod.rs    | 63 ++++++-------------
 .../rustc_middle/src/dep_graph/serialized.rs  | 26 +++-----
 4 files changed, 61 insertions(+), 76 deletions(-)

diff --git a/compiler/rustc_middle/src/dep_graph/dep_node.rs b/compiler/rustc_middle/src/dep_graph/dep_node.rs
index 14e43e045e82..909638b85906 100644
--- a/compiler/rustc_middle/src/dep_graph/dep_node.rs
+++ b/compiler/rustc_middle/src/dep_graph/dep_node.rs
@@ -92,6 +92,26 @@ impl DepKind {
     pub const fn as_usize(&self) -> usize {
         self.variant as usize
     }
+
+    pub(crate) fn name(self) -> &'static str {
+        DEP_KIND_NAMES[self.as_usize()]
+    }
+
+    /// We use this for most things when incr. comp. is turned off.
+    pub(crate) const NULL: DepKind = dep_kinds::Null;
+
+    /// We use this to create a forever-red node.
+    pub(crate) const RED: DepKind = dep_kinds::Red;
+
+    /// We use this to create a side effect node.
+    pub(crate) const SIDE_EFFECT: DepKind = dep_kinds::SideEffect;
+
+    /// We use this to create the anon node with zero dependencies.
+    pub(crate) const ANON_ZERO_DEPS: DepKind = dep_kinds::AnonZeroDeps;
+
+    /// This is the highest value a `DepKind` can have. It's used during encoding to
+    /// pack information into the unused bits.
+    pub(crate) const MAX: u16 = DEP_KIND_VARIANTS - 1;
 }
 
 pub fn default_dep_kind_debug(kind: DepKind, f: &mut fmt::Formatter<'_>) -> fmt::Result {
diff --git a/compiler/rustc_middle/src/dep_graph/graph.rs b/compiler/rustc_middle/src/dep_graph/graph.rs
index d0ac39852318..6b9f18a6bfe1 100644
--- a/compiler/rustc_middle/src/dep_graph/graph.rs
+++ b/compiler/rustc_middle/src/dep_graph/graph.rs
@@ -25,7 +25,7 @@ use {super::debug::EdgeFilter, std::env};
 
 use super::query::DepGraphQuery;
 use super::serialized::{GraphEncoder, SerializedDepGraph, SerializedDepNodeIndex};
-use super::{DepKind, DepNode, DepsType, HasDepContext, WorkProductId};
+use super::{DepKind, DepNode, HasDepContext, WorkProductId, read_deps, with_deps};
 use crate::dep_graph::edges::EdgesVec;
 use crate::ty::TyCtxt;
 use crate::verify_ich::incremental_verify_ich;
@@ -126,7 +126,7 @@ impl DepGraph {
 
         // Instantiate a node with zero dependencies only once for anonymous queries.
         let _green_node_index = current.alloc_new_node(
-            DepNode { kind: DepsType::DEP_KIND_ANON_ZERO_DEPS, hash: current.anon_id_seed.into() },
+            DepNode { kind: DepKind::ANON_ZERO_DEPS, hash: current.anon_id_seed.into() },
             EdgesVec::new(),
             Fingerprint::ZERO,
         );
@@ -134,7 +134,7 @@ impl DepGraph {
 
         // Instantiate a dependy-less red node only once for anonymous queries.
         let red_node_index = current.alloc_new_node(
-            DepNode { kind: DepsType::DEP_KIND_RED, hash: Fingerprint::ZERO.into() },
+            DepNode { kind: DepKind::RED, hash: Fingerprint::ZERO.into() },
             EdgesVec::new(),
             Fingerprint::ZERO,
         );
@@ -181,7 +181,7 @@ impl DepGraph {
 
     pub fn assert_ignored(&self) {
         if let Some(..) = self.data {
-            DepsType::read_deps(|task_deps| {
+            read_deps(|task_deps| {
                 assert_matches!(
                     task_deps,
                     TaskDepsRef::Ignore,
@@ -195,7 +195,7 @@ impl DepGraph {
     where
         OP: FnOnce() -> R,
     {
-        DepsType::with_deps(TaskDepsRef::Ignore, op)
+        with_deps(TaskDepsRef::Ignore, op)
     }
 
     /// Used to wrap the deserialization of a query result from disk,
@@ -248,7 +248,7 @@ impl DepGraph {
     where
         OP: FnOnce() -> R,
     {
-        DepsType::with_deps(TaskDepsRef::Forbid, op)
+        with_deps(TaskDepsRef::Forbid, op)
     }
 
     #[inline(always)]
@@ -340,7 +340,7 @@ impl DepGraphData {
             },
         );
 
-        let with_deps = |task_deps| DepsType::with_deps(task_deps, || task(cx, arg));
+        let with_deps = |task_deps| with_deps(task_deps, || task(cx, arg));
         let (result, edges) = if cx.dep_context().is_eval_always(key.kind) {
             (with_deps(TaskDepsRef::EvalAlways), EdgesVec::new())
         } else {
@@ -387,7 +387,7 @@ impl DepGraphData {
             None,
             128,
         ));
-        let result = DepsType::with_deps(TaskDepsRef::Allow(&task_deps), op);
+        let result = with_deps(TaskDepsRef::Allow(&task_deps), op);
         let task_deps = task_deps.into_inner();
         let reads = task_deps.reads;
 
@@ -460,7 +460,7 @@ impl DepGraph {
     #[inline]
     pub fn read_index(&self, dep_node_index: DepNodeIndex) {
         if let Some(ref data) = self.data {
-            DepsType::read_deps(|task_deps| {
+            read_deps(|task_deps| {
                 let mut task_deps = match task_deps {
                     TaskDepsRef::Allow(deps) => deps.lock(),
                     TaskDepsRef::EvalAlways => {
@@ -517,7 +517,7 @@ impl DepGraph {
     #[inline]
     pub fn record_diagnostic<'tcx>(&self, tcx: TyCtxt<'tcx>, diagnostic: &DiagInner) {
         if let Some(ref data) = self.data {
-            DepsType::read_deps(|task_deps| match task_deps {
+            read_deps(|task_deps| match task_deps {
                 TaskDepsRef::EvalAlways | TaskDepsRef::Ignore => return,
                 TaskDepsRef::Forbid | TaskDepsRef::Allow(..) => {
                     self.read_index(data.encode_diagnostic(tcx, diagnostic));
@@ -594,7 +594,7 @@ impl DepGraph {
             }
 
             let mut edges = EdgesVec::new();
-            DepsType::read_deps(|task_deps| match task_deps {
+            read_deps(|task_deps| match task_deps {
                 TaskDepsRef::Allow(deps) => edges.extend(deps.lock().reads.iter().copied()),
                 TaskDepsRef::EvalAlways => {
                     edges.push(DepNodeIndex::FOREVER_RED_NODE);
@@ -678,7 +678,7 @@ impl DepGraphData {
         // Use `send_new` so we get an unique index, even though the dep node is not.
         let dep_node_index = self.current.encoder.send_new(
             DepNode {
-                kind: DepsType::DEP_KIND_SIDE_EFFECT,
+                kind: DepKind::SIDE_EFFECT,
                 hash: PackedFingerprint::from(Fingerprint::ZERO),
             },
             Fingerprint::ZERO,
@@ -695,7 +695,7 @@ impl DepGraphData {
     /// refer to a node created used `encode_diagnostic` in the previous session.
     #[inline]
     fn force_diagnostic_node<'tcx>(&self, tcx: TyCtxt<'tcx>, prev_index: SerializedDepNodeIndex) {
-        DepsType::with_deps(TaskDepsRef::Ignore, || {
+        with_deps(TaskDepsRef::Ignore, || {
             let side_effect = tcx.load_side_effect(prev_index).unwrap();
 
             match &side_effect {
@@ -711,7 +711,7 @@ impl DepGraphData {
                 prev_index,
                 &self.colors,
                 DepNode {
-                    kind: DepsType::DEP_KIND_SIDE_EFFECT,
+                    kind: DepKind::SIDE_EFFECT,
                     hash: PackedFingerprint::from(Fingerprint::ZERO),
                 },
                 Fingerprint::ZERO,
diff --git a/compiler/rustc_middle/src/dep_graph/mod.rs b/compiler/rustc_middle/src/dep_graph/mod.rs
index ea347f53ac44..b10f341c71a6 100644
--- a/compiler/rustc_middle/src/dep_graph/mod.rs
+++ b/compiler/rustc_middle/src/dep_graph/mod.rs
@@ -68,51 +68,26 @@ impl FingerprintStyle {
     }
 }
 
-pub struct DepsType;
+/// Execute the operation with provided dependencies.
+fn with_deps(task_deps: TaskDepsRef<'_>, op: OP) -> R
+where
+    OP: FnOnce() -> R,
+{
+    ty::tls::with_context(|icx| {
+        let icx = ty::tls::ImplicitCtxt { task_deps, ..icx.clone() };
+        ty::tls::enter_context(&icx, op)
+    })
+}
 
-impl DepsType {
-    /// Execute the operation with provided dependencies.
-    fn with_deps(task_deps: TaskDepsRef<'_>, op: OP) -> R
-    where
-        OP: FnOnce() -> R,
-    {
-        ty::tls::with_context(|icx| {
-            let icx = ty::tls::ImplicitCtxt { task_deps, ..icx.clone() };
-
-            ty::tls::enter_context(&icx, op)
-        })
-    }
-
-    /// Access dependencies from current implicit context.
-    fn read_deps(op: OP)
-    where
-        OP: for<'a> FnOnce(TaskDepsRef<'a>),
-    {
-        ty::tls::with_context_opt(|icx| {
-            let Some(icx) = icx else { return };
-            op(icx.task_deps)
-        })
-    }
-
-    fn name(dep_kind: DepKind) -> &'static str {
-        dep_node::DEP_KIND_NAMES[dep_kind.as_usize()]
-    }
-
-    /// We use this for most things when incr. comp. is turned off.
-    const DEP_KIND_NULL: DepKind = dep_kinds::Null;
-
-    /// We use this to create a forever-red node.
-    const DEP_KIND_RED: DepKind = dep_kinds::Red;
-
-    /// We use this to create a side effect node.
-    const DEP_KIND_SIDE_EFFECT: DepKind = dep_kinds::SideEffect;
-
-    /// We use this to create the anon node with zero dependencies.
-    const DEP_KIND_ANON_ZERO_DEPS: DepKind = dep_kinds::AnonZeroDeps;
-
-    /// This is the highest value a `DepKind` can have. It's used during encoding to
-    /// pack information into the unused bits.
-    const DEP_KIND_MAX: u16 = dep_node::DEP_KIND_VARIANTS - 1;
+/// Access dependencies from current implicit context.
+fn read_deps(op: OP)
+where
+    OP: for<'a> FnOnce(TaskDepsRef<'a>),
+{
+    ty::tls::with_context_opt(|icx| {
+        let Some(icx) = icx else { return };
+        op(icx.task_deps)
+    })
 }
 
 impl<'tcx> TyCtxt<'tcx> {
diff --git a/compiler/rustc_middle/src/dep_graph/serialized.rs b/compiler/rustc_middle/src/dep_graph/serialized.rs
index d2938373f544..dbcd5ea07088 100644
--- a/compiler/rustc_middle/src/dep_graph/serialized.rs
+++ b/compiler/rustc_middle/src/dep_graph/serialized.rs
@@ -61,7 +61,6 @@ use tracing::{debug, instrument};
 use super::graph::{CurrentDepGraph, DepNodeColorMap};
 use super::query::DepGraphQuery;
 use super::{DepKind, DepNode, DepNodeIndex};
-use crate::dep_graph::DepsType;
 use crate::dep_graph::edges::EdgesVec;
 
 // The maximum value of `SerializedDepNodeIndex` leaves the upper two bits
@@ -213,10 +212,7 @@ impl SerializedDepGraph {
         let graph_bytes = d.len() - (3 * IntEncodedWithFixedSize::ENCODED_SIZE) - d.position();
 
         let mut nodes = IndexVec::from_elem_n(
-            DepNode {
-                kind: DepsType::DEP_KIND_NULL,
-                hash: PackedFingerprint::from(Fingerprint::ZERO),
-            },
+            DepNode { kind: DepKind::NULL, hash: PackedFingerprint::from(Fingerprint::ZERO) },
             node_max,
         );
         let mut fingerprints = IndexVec::from_elem_n(Fingerprint::ZERO, node_max);
@@ -244,10 +240,7 @@ impl SerializedDepGraph {
 
             let node = &mut nodes[index];
             // Make sure there's no duplicate indices in the dep graph.
-            assert!(
-                node_header.node().kind != DepsType::DEP_KIND_NULL
-                    && node.kind == DepsType::DEP_KIND_NULL
-            );
+            assert!(node_header.node().kind != DepKind::NULL && node.kind == DepKind::NULL);
             *node = node_header.node();
 
             fingerprints[index] = node_header.fingerprint();
@@ -275,7 +268,7 @@ impl SerializedDepGraph {
         edge_list_data.extend(&[0u8; DEP_NODE_PAD]);
 
         // Read the number of each dep kind and use it to create an hash map with a suitable size.
-        let mut index: Vec<_> = (0..(DepsType::DEP_KIND_MAX + 1))
+        let mut index: Vec<_> = (0..(DepKind::MAX + 1))
             .map(|_| UnhashMap::with_capacity_and_hasher(d.read_u32() as usize, Default::default()))
             .collect();
 
@@ -284,10 +277,8 @@ impl SerializedDepGraph {
         for (idx, node) in nodes.iter_enumerated() {
             if index[node.kind.as_usize()].insert(node.hash, idx).is_some() {
                 // Empty nodes and side effect nodes can have duplicates
-                if node.kind != DepsType::DEP_KIND_NULL
-                    && node.kind != DepsType::DEP_KIND_SIDE_EFFECT
-                {
-                    let name = DepsType::name(node.kind);
+                if node.kind != DepKind::NULL && node.kind != DepKind::SIDE_EFFECT {
+                    let name = node.kind.name();
                     panic!(
                     "Error: A dep graph node ({name}) does not have an unique index. \
                      Running a clean build on a nightly compiler with `-Z incremental-verify-ich` \
@@ -347,7 +338,7 @@ impl SerializedNodeHeader {
     const TOTAL_BITS: usize = size_of::() * 8;
     const LEN_BITS: usize = Self::TOTAL_BITS - Self::KIND_BITS - Self::WIDTH_BITS;
     const WIDTH_BITS: usize = DEP_NODE_WIDTH_BITS;
-    const KIND_BITS: usize = Self::TOTAL_BITS - DepsType::DEP_KIND_MAX.leading_zeros() as usize;
+    const KIND_BITS: usize = Self::TOTAL_BITS - DepKind::MAX.leading_zeros() as usize;
     const MAX_INLINE_LEN: usize = (u16::MAX as usize >> (Self::TOTAL_BITS - Self::LEN_BITS)) - 1;
 
     #[inline]
@@ -566,7 +557,7 @@ impl EncoderState {
                     edge_count: 0,
                     node_count: 0,
                     encoder: MemEncoder::new(),
-                    kind_stats: iter::repeat_n(0, DepsType::DEP_KIND_MAX as usize + 1).collect(),
+                    kind_stats: iter::repeat_n(0, DepKind::MAX as usize + 1).collect(),
                 })
             }),
         }
@@ -734,8 +725,7 @@ impl EncoderState {
 
         let mut encoder = self.file.lock().take().unwrap();
 
-        let mut kind_stats: Vec =
-            iter::repeat_n(0, DepsType::DEP_KIND_MAX as usize + 1).collect();
+        let mut kind_stats: Vec = iter::repeat_n(0, DepKind::MAX as usize + 1).collect();
 
         let mut node_max = 0;
         let mut node_count = 0;

From 71dff624494d8c3cde3dda25df47befd15c79bae Mon Sep 17 00:00:00 2001
From: Yuki Okushi 
Date: Sun, 15 Feb 2026 11:07:30 +0900
Subject: [PATCH 192/265] Add a note about elided lifetime

---
 .../trait_impl_difference.rs                  | 120 +++++++++++++++++-
 ...pl-mismatch-elided-lifetime-issue-65866.rs |  49 +++++++
 ...ismatch-elided-lifetime-issue-65866.stderr |  40 ++++++
 3 files changed, 206 insertions(+), 3 deletions(-)
 create mode 100644 tests/ui/lifetimes/trait-impl-mismatch-elided-lifetime-issue-65866.rs
 create mode 100644 tests/ui/lifetimes/trait-impl-mismatch-elided-lifetime-issue-65866.stderr

diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/nice_region_error/trait_impl_difference.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/nice_region_error/trait_impl_difference.rs
index 5a8dd0364bee..7e6f566e242a 100644
--- a/compiler/rustc_trait_selection/src/error_reporting/infer/nice_region_error/trait_impl_difference.rs
+++ b/compiler/rustc_trait_selection/src/error_reporting/infer/nice_region_error/trait_impl_difference.rs
@@ -11,7 +11,7 @@ use rustc_middle::traits::ObligationCauseCode;
 use rustc_middle::ty::error::ExpectedFound;
 use rustc_middle::ty::print::RegionHighlightMode;
 use rustc_middle::ty::{self, TyCtxt, TypeVisitable};
-use rustc_span::Span;
+use rustc_span::{Ident, Span};
 use tracing::debug;
 
 use crate::error_reporting::infer::nice_region_error::NiceRegionError;
@@ -99,7 +99,8 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
 
         // Get the span of all the used type parameters in the method.
         let assoc_item = self.tcx().associated_item(trait_item_def_id);
-        let mut visitor = TypeParamSpanVisitor { tcx: self.tcx(), types: vec![] };
+        let mut visitor =
+            TypeParamSpanVisitor { tcx: self.tcx(), types: vec![], elided_lifetime_paths: vec![] };
         match assoc_item.kind {
             ty::AssocKind::Fn { .. } => {
                 if let Some(hir_id) =
@@ -122,13 +123,49 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
             found,
         };
 
-        self.tcx().dcx().emit_err(diag)
+        let mut diag = self.tcx().dcx().create_err(diag);
+        // A limit not to make diag verbose.
+        const ELIDED_LIFETIME_NOTE_LIMIT: usize = 5;
+        let elided_lifetime_paths = visitor.elided_lifetime_paths;
+        let total_elided_lifetime_paths = elided_lifetime_paths.len();
+        let shown_elided_lifetime_paths = if tcx.sess.opts.verbose {
+            total_elided_lifetime_paths
+        } else {
+            ELIDED_LIFETIME_NOTE_LIMIT
+        };
+
+        for elided in elided_lifetime_paths.into_iter().take(shown_elided_lifetime_paths) {
+            diag.span_note(
+                elided.span,
+                format!("`{}` here is elided as `{}`", elided.ident, elided.shorthand),
+            );
+        }
+        if total_elided_lifetime_paths > shown_elided_lifetime_paths {
+            diag.note(format!(
+                "and {} more elided lifetime{} in type paths",
+                total_elided_lifetime_paths - shown_elided_lifetime_paths,
+                if total_elided_lifetime_paths - shown_elided_lifetime_paths == 1 {
+                    ""
+                } else {
+                    "s"
+                },
+            ));
+        }
+        diag.emit()
     }
 }
 
+#[derive(Clone)]
+struct ElidedLifetimeInPath {
+    span: Span,
+    ident: Ident,
+    shorthand: String,
+}
+
 struct TypeParamSpanVisitor<'tcx> {
     tcx: TyCtxt<'tcx>,
     types: Vec,
+    elided_lifetime_paths: Vec,
 }
 
 impl<'tcx> Visitor<'tcx> for TypeParamSpanVisitor<'tcx> {
@@ -138,6 +175,83 @@ impl<'tcx> Visitor<'tcx> for TypeParamSpanVisitor<'tcx> {
         self.tcx
     }
 
+    fn visit_qpath(&mut self, qpath: &'tcx hir::QPath<'tcx>, id: hir::HirId, _span: Span) {
+        fn record_elided_lifetimes(
+            tcx: TyCtxt<'_>,
+            elided_lifetime_paths: &mut Vec,
+            segment: &hir::PathSegment<'_>,
+        ) {
+            let Some(args) = segment.args else { return };
+            if args.parenthesized != hir::GenericArgsParentheses::No {
+                // Our diagnostic rendering below uses `<...>` syntax; skip cases like `Fn(..) -> ..`.
+                return;
+            }
+            let elided_count = args
+                .args
+                .iter()
+                .filter(|arg| {
+                    let hir::GenericArg::Lifetime(l) = arg else { return false };
+                    l.syntax == hir::LifetimeSyntax::Implicit
+                        && matches!(l.source, hir::LifetimeSource::Path { .. })
+                })
+                .count();
+            if elided_count == 0
+                || elided_lifetime_paths.iter().any(|p| p.span == segment.ident.span)
+            {
+                return;
+            }
+
+            let sm = tcx.sess.source_map();
+            let mut parts = args
+                .args
+                .iter()
+                .map(|arg| match arg {
+                    hir::GenericArg::Lifetime(l) => {
+                        if l.syntax == hir::LifetimeSyntax::Implicit
+                            && matches!(l.source, hir::LifetimeSource::Path { .. })
+                        {
+                            "'_".to_string()
+                        } else {
+                            sm.span_to_snippet(l.ident.span)
+                                .unwrap_or_else(|_| format!("'{}", l.ident.name))
+                        }
+                    }
+                    hir::GenericArg::Type(ty) => {
+                        sm.span_to_snippet(ty.span).unwrap_or_else(|_| "..".to_string())
+                    }
+                    hir::GenericArg::Const(ct) => {
+                        sm.span_to_snippet(ct.span).unwrap_or_else(|_| "..".to_string())
+                    }
+                    hir::GenericArg::Infer(_) => "_".to_string(),
+                })
+                .collect::>();
+            parts.extend(args.constraints.iter().map(|constraint| {
+                sm.span_to_snippet(constraint.span)
+                    .unwrap_or_else(|_| format!("{} = ..", constraint.ident))
+            }));
+            let shorthand = format!("{}<{}>", segment.ident, parts.join(", "));
+
+            elided_lifetime_paths.push(ElidedLifetimeInPath {
+                span: segment.ident.span,
+                ident: segment.ident,
+                shorthand,
+            });
+        }
+
+        match qpath {
+            hir::QPath::Resolved(_, path) => {
+                for segment in path.segments {
+                    record_elided_lifetimes(self.tcx, &mut self.elided_lifetime_paths, segment);
+                }
+            }
+            hir::QPath::TypeRelative(_, segment) => {
+                record_elided_lifetimes(self.tcx, &mut self.elided_lifetime_paths, segment);
+            }
+        }
+
+        hir::intravisit::walk_qpath(self, qpath, id);
+    }
+
     fn visit_ty(&mut self, arg: &'tcx hir::Ty<'tcx, AmbigArg>) {
         match arg.kind {
             hir::TyKind::Ref(_, ref mut_ty) => {
diff --git a/tests/ui/lifetimes/trait-impl-mismatch-elided-lifetime-issue-65866.rs b/tests/ui/lifetimes/trait-impl-mismatch-elided-lifetime-issue-65866.rs
new file mode 100644
index 000000000000..4bf92a2c1c18
--- /dev/null
+++ b/tests/ui/lifetimes/trait-impl-mismatch-elided-lifetime-issue-65866.rs
@@ -0,0 +1,49 @@
+// Regression test for https://github.com/rust-lang/rust/issues/65866.
+
+mod plain {
+    struct Foo;
+
+    struct Re<'a> {
+        _data: &'a u16,
+    }
+
+    trait Bar {
+        fn bar(&self, r: &mut Re);
+        //~^ NOTE expected
+        //~| NOTE `Re` here is elided as `Re<'_>`
+    }
+
+    impl Bar for Foo {
+        fn bar<'a, 'b>(&'a self, _r: &'b mut Re<'a>) {}
+        //~^ ERROR `impl` item signature doesn't match `trait` item signature
+        //~| NOTE expected signature
+        //~| NOTE found
+        //~| HELP the lifetime requirements
+        //~| HELP verify the lifetime relationships
+    }
+}
+
+mod with_type_args {
+    struct Foo;
+
+    struct Re<'a, T> {
+        _data: (&'a u16, T),
+    }
+
+    trait Bar {
+        fn bar(&self, r: &mut Re);
+        //~^ NOTE expected
+        //~| NOTE `Re` here is elided as `Re<'_, u8>`
+    }
+
+    impl Bar for Foo {
+        fn bar<'a, 'b>(&'a self, _r: &'b mut Re<'a, u8>) {}
+        //~^ ERROR `impl` item signature doesn't match `trait` item signature
+        //~| NOTE expected signature
+        //~| NOTE found
+        //~| HELP the lifetime requirements
+        //~| HELP verify the lifetime relationships
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/lifetimes/trait-impl-mismatch-elided-lifetime-issue-65866.stderr b/tests/ui/lifetimes/trait-impl-mismatch-elided-lifetime-issue-65866.stderr
new file mode 100644
index 000000000000..db69b4f3656e
--- /dev/null
+++ b/tests/ui/lifetimes/trait-impl-mismatch-elided-lifetime-issue-65866.stderr
@@ -0,0 +1,40 @@
+error: `impl` item signature doesn't match `trait` item signature
+  --> $DIR/trait-impl-mismatch-elided-lifetime-issue-65866.rs:17:9
+   |
+LL |         fn bar(&self, r: &mut Re);
+   |         -------------------------- expected `fn(&'1 plain::Foo, &'2 mut plain::Re<'3>)`
+...
+LL |         fn bar<'a, 'b>(&'a self, _r: &'b mut Re<'a>) {}
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 plain::Foo, &'2 mut plain::Re<'1>)`
+   |
+   = note: expected signature `fn(&'1 plain::Foo, &'2 mut plain::Re<'3>)`
+              found signature `fn(&'1 plain::Foo, &'2 mut plain::Re<'1>)`
+   = help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
+   = help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output
+note: `Re` here is elided as `Re<'_>`
+  --> $DIR/trait-impl-mismatch-elided-lifetime-issue-65866.rs:11:31
+   |
+LL |         fn bar(&self, r: &mut Re);
+   |                               ^^
+
+error: `impl` item signature doesn't match `trait` item signature
+  --> $DIR/trait-impl-mismatch-elided-lifetime-issue-65866.rs:40:9
+   |
+LL |         fn bar(&self, r: &mut Re);
+   |         ------------------------------ expected `fn(&'1 with_type_args::Foo, &'2 mut with_type_args::Re<'3, u8>)`
+...
+LL |         fn bar<'a, 'b>(&'a self, _r: &'b mut Re<'a, u8>) {}
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 with_type_args::Foo, &'2 mut with_type_args::Re<'1, u8>)`
+   |
+   = note: expected signature `fn(&'1 with_type_args::Foo, &'2 mut with_type_args::Re<'3, u8>)`
+              found signature `fn(&'1 with_type_args::Foo, &'2 mut with_type_args::Re<'1, u8>)`
+   = help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
+   = help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output
+note: `Re` here is elided as `Re<'_, u8>`
+  --> $DIR/trait-impl-mismatch-elided-lifetime-issue-65866.rs:34:31
+   |
+LL |         fn bar(&self, r: &mut Re);
+   |                               ^^
+
+error: aborting due to 2 previous errors
+

From abca0d5f74217d9f8917cf366463ff83562cbe17 Mon Sep 17 00:00:00 2001
From: reddevilmidzy 
Date: Sun, 8 Feb 2026 12:28:18 +0000
Subject: [PATCH 193/265] Move dynamically-sized-types tests into dst dir

---
 tests/ui/README.md                                        | 4 ----
 .../{dynamically-sized-types => dst}/dst-coerce-custom.rs | 0
 .../ui/{dynamically-sized-types => dst}/dst-coerce-rc.rs  | 0
 .../ui/{dynamically-sized-types => dst}/dst-coercions.rs  | 0
 .../{dynamically-sized-types => dst}/dst-coercions.stderr | 0
 .../ui/{dynamically-sized-types => dst}/dst-deref-mut.rs  | 0
 tests/ui/{dynamically-sized-types => dst}/dst-deref.rs    | 0
 .../{dynamically-sized-types => dst}/dst-field-align.rs   | 0
 tests/ui/dst/{dst-index.rs => dst-index-fail.rs}          | 0
 tests/ui/dst/{dst-index.stderr => dst-index-fail.stderr}  | 8 ++++----
 .../dst-index.rs => dst/dst-index-success.rs}             | 0
 .../dst-irrefutable-bind.rs                               | 0
 tests/ui/{dynamically-sized-types => dst}/dst-raw.rs      | 0
 .../{dynamically-sized-types => dst}/dst-struct-sole.rs   | 0
 tests/ui/{dynamically-sized-types => dst}/dst-struct.rs   | 0
 tests/ui/{dynamically-sized-types => dst}/dst-trait.rs    | 0
 16 files changed, 4 insertions(+), 8 deletions(-)
 rename tests/ui/{dynamically-sized-types => dst}/dst-coerce-custom.rs (100%)
 rename tests/ui/{dynamically-sized-types => dst}/dst-coerce-rc.rs (100%)
 rename tests/ui/{dynamically-sized-types => dst}/dst-coercions.rs (100%)
 rename tests/ui/{dynamically-sized-types => dst}/dst-coercions.stderr (100%)
 rename tests/ui/{dynamically-sized-types => dst}/dst-deref-mut.rs (100%)
 rename tests/ui/{dynamically-sized-types => dst}/dst-deref.rs (100%)
 rename tests/ui/{dynamically-sized-types => dst}/dst-field-align.rs (100%)
 rename tests/ui/dst/{dst-index.rs => dst-index-fail.rs} (100%)
 rename tests/ui/dst/{dst-index.stderr => dst-index-fail.stderr} (85%)
 rename tests/ui/{dynamically-sized-types/dst-index.rs => dst/dst-index-success.rs} (100%)
 rename tests/ui/{dynamically-sized-types => dst}/dst-irrefutable-bind.rs (100%)
 rename tests/ui/{dynamically-sized-types => dst}/dst-raw.rs (100%)
 rename tests/ui/{dynamically-sized-types => dst}/dst-struct-sole.rs (100%)
 rename tests/ui/{dynamically-sized-types => dst}/dst-struct.rs (100%)
 rename tests/ui/{dynamically-sized-types => dst}/dst-trait.rs (100%)

diff --git a/tests/ui/README.md b/tests/ui/README.md
index 237cfb9c4f07..612661dae907 100644
--- a/tests/ui/README.md
+++ b/tests/ui/README.md
@@ -518,10 +518,6 @@ The `dyn` keyword is used to highlight that calls to methods on the associated T
 
 See [`dyn` keyword](https://doc.rust-lang.org/std/keyword.dyn.html).
 
-## `tests/ui/dynamically-sized-types`: Dynamically Sized Types
-
-**FIXME**: should be coalesced with `tests/ui/dst`.
-
 ## `tests/ui/editions/`: Rust edition-specific peculiarities
 
 These tests run in specific Rust editions, such as Rust 2015 or Rust 2018, and check errors and functionality related to specific now-deprecated idioms and features.
diff --git a/tests/ui/dynamically-sized-types/dst-coerce-custom.rs b/tests/ui/dst/dst-coerce-custom.rs
similarity index 100%
rename from tests/ui/dynamically-sized-types/dst-coerce-custom.rs
rename to tests/ui/dst/dst-coerce-custom.rs
diff --git a/tests/ui/dynamically-sized-types/dst-coerce-rc.rs b/tests/ui/dst/dst-coerce-rc.rs
similarity index 100%
rename from tests/ui/dynamically-sized-types/dst-coerce-rc.rs
rename to tests/ui/dst/dst-coerce-rc.rs
diff --git a/tests/ui/dynamically-sized-types/dst-coercions.rs b/tests/ui/dst/dst-coercions.rs
similarity index 100%
rename from tests/ui/dynamically-sized-types/dst-coercions.rs
rename to tests/ui/dst/dst-coercions.rs
diff --git a/tests/ui/dynamically-sized-types/dst-coercions.stderr b/tests/ui/dst/dst-coercions.stderr
similarity index 100%
rename from tests/ui/dynamically-sized-types/dst-coercions.stderr
rename to tests/ui/dst/dst-coercions.stderr
diff --git a/tests/ui/dynamically-sized-types/dst-deref-mut.rs b/tests/ui/dst/dst-deref-mut.rs
similarity index 100%
rename from tests/ui/dynamically-sized-types/dst-deref-mut.rs
rename to tests/ui/dst/dst-deref-mut.rs
diff --git a/tests/ui/dynamically-sized-types/dst-deref.rs b/tests/ui/dst/dst-deref.rs
similarity index 100%
rename from tests/ui/dynamically-sized-types/dst-deref.rs
rename to tests/ui/dst/dst-deref.rs
diff --git a/tests/ui/dynamically-sized-types/dst-field-align.rs b/tests/ui/dst/dst-field-align.rs
similarity index 100%
rename from tests/ui/dynamically-sized-types/dst-field-align.rs
rename to tests/ui/dst/dst-field-align.rs
diff --git a/tests/ui/dst/dst-index.rs b/tests/ui/dst/dst-index-fail.rs
similarity index 100%
rename from tests/ui/dst/dst-index.rs
rename to tests/ui/dst/dst-index-fail.rs
diff --git a/tests/ui/dst/dst-index.stderr b/tests/ui/dst/dst-index-fail.stderr
similarity index 85%
rename from tests/ui/dst/dst-index.stderr
rename to tests/ui/dst/dst-index-fail.stderr
index d38af3f89c21..a5481e9ad673 100644
--- a/tests/ui/dst/dst-index.stderr
+++ b/tests/ui/dst/dst-index-fail.stderr
@@ -1,23 +1,23 @@
 error[E0161]: cannot move a value of type `str`
-  --> $DIR/dst-index.rs:31:5
+  --> $DIR/dst-index-fail.rs:31:5
    |
 LL |     S[0];
    |     ^^^^ the size of `str` cannot be statically determined
 
 error[E0161]: cannot move a value of type `dyn Debug`
-  --> $DIR/dst-index.rs:34:5
+  --> $DIR/dst-index-fail.rs:34:5
    |
 LL |     T[0];
    |     ^^^^ the size of `dyn Debug` cannot be statically determined
 
 error[E0507]: cannot move out of index of `S`
-  --> $DIR/dst-index.rs:31:5
+  --> $DIR/dst-index-fail.rs:31:5
    |
 LL |     S[0];
    |     ^^^^ move occurs because value has type `str`, which does not implement the `Copy` trait
 
 error[E0507]: cannot move out of index of `T`
-  --> $DIR/dst-index.rs:34:5
+  --> $DIR/dst-index-fail.rs:34:5
    |
 LL |     T[0];
    |     ^^^^ move occurs because value has type `dyn Debug`, which does not implement the `Copy` trait
diff --git a/tests/ui/dynamically-sized-types/dst-index.rs b/tests/ui/dst/dst-index-success.rs
similarity index 100%
rename from tests/ui/dynamically-sized-types/dst-index.rs
rename to tests/ui/dst/dst-index-success.rs
diff --git a/tests/ui/dynamically-sized-types/dst-irrefutable-bind.rs b/tests/ui/dst/dst-irrefutable-bind.rs
similarity index 100%
rename from tests/ui/dynamically-sized-types/dst-irrefutable-bind.rs
rename to tests/ui/dst/dst-irrefutable-bind.rs
diff --git a/tests/ui/dynamically-sized-types/dst-raw.rs b/tests/ui/dst/dst-raw.rs
similarity index 100%
rename from tests/ui/dynamically-sized-types/dst-raw.rs
rename to tests/ui/dst/dst-raw.rs
diff --git a/tests/ui/dynamically-sized-types/dst-struct-sole.rs b/tests/ui/dst/dst-struct-sole.rs
similarity index 100%
rename from tests/ui/dynamically-sized-types/dst-struct-sole.rs
rename to tests/ui/dst/dst-struct-sole.rs
diff --git a/tests/ui/dynamically-sized-types/dst-struct.rs b/tests/ui/dst/dst-struct.rs
similarity index 100%
rename from tests/ui/dynamically-sized-types/dst-struct.rs
rename to tests/ui/dst/dst-struct.rs
diff --git a/tests/ui/dynamically-sized-types/dst-trait.rs b/tests/ui/dst/dst-trait.rs
similarity index 100%
rename from tests/ui/dynamically-sized-types/dst-trait.rs
rename to tests/ui/dst/dst-trait.rs

From 161298831023272ae38bf62b0bb9f433b68abf8d Mon Sep 17 00:00:00 2001
From: reddevilmidzy 
Date: Sun, 8 Feb 2026 12:38:25 +0000
Subject: [PATCH 194/265] Move underscore-imports tests into imports subdir

---
 src/tools/tidy/src/issues.txt                        |  1 -
 tests/ui/README.md                                   |  6 ------
 .../underscore-imports/auxiliary/duplicate.rs        |  0
 .../auxiliary/underscore-imports.rs                  |  0
 tests/ui/{ => imports}/underscore-imports/basic.rs   |  0
 .../ui/{ => imports}/underscore-imports/basic.stderr |  0
 tests/ui/{ => imports}/underscore-imports/cycle.rs   |  0
 .../ui/{ => imports}/underscore-imports/duplicate.rs |  0
 .../ui/{ => imports}/underscore-imports/hygiene-2.rs |  0
 tests/ui/{ => imports}/underscore-imports/hygiene.rs |  0
 .../{ => imports}/underscore-imports/intercrate.rs   |  0
 .../invalid-path-110164.ed2015.stderr}               | 12 ++++++------
 .../invalid-path-110164.ed2021.stderr}               | 12 ++++++------
 .../underscore-imports/invalid-path-110164.rs}       |  0
 .../underscore-imports/macro-expanded.rs             |  0
 ...iple-extern-by-macro-for-underscore.ed2015.stderr |  0
 ...iple-extern-by-macro-for-underscore.ed2021.stderr |  0
 .../multiple-extern-by-macro-for-underscore.rs       |  0
 .../underscore-imports/multiple-uses.ed2015.stderr   |  0
 .../underscore-imports/multiple-uses.ed2021.stderr   |  0
 .../underscore-imports/multiple-uses.rs              |  0
 tests/ui/{ => imports}/underscore-imports/shadow.rs  |  0
 .../{ => imports}/underscore-imports/shadow.stderr   |  0
 .../{ => imports}/underscore-imports/unused-2018.rs  |  0
 .../underscore-imports/unused-2018.stderr            |  0
 25 files changed, 12 insertions(+), 19 deletions(-)
 rename tests/ui/{ => imports}/underscore-imports/auxiliary/duplicate.rs (100%)
 rename tests/ui/{ => imports}/underscore-imports/auxiliary/underscore-imports.rs (100%)
 rename tests/ui/{ => imports}/underscore-imports/basic.rs (100%)
 rename tests/ui/{ => imports}/underscore-imports/basic.stderr (100%)
 rename tests/ui/{ => imports}/underscore-imports/cycle.rs (100%)
 rename tests/ui/{ => imports}/underscore-imports/duplicate.rs (100%)
 rename tests/ui/{ => imports}/underscore-imports/hygiene-2.rs (100%)
 rename tests/ui/{ => imports}/underscore-imports/hygiene.rs (100%)
 rename tests/ui/{ => imports}/underscore-imports/intercrate.rs (100%)
 rename tests/ui/{underscore-imports/issue-110164.ed2015.stderr => imports/underscore-imports/invalid-path-110164.ed2015.stderr} (79%)
 rename tests/ui/{underscore-imports/issue-110164.ed2021.stderr => imports/underscore-imports/invalid-path-110164.ed2021.stderr} (79%)
 rename tests/ui/{underscore-imports/issue-110164.rs => imports/underscore-imports/invalid-path-110164.rs} (100%)
 rename tests/ui/{ => imports}/underscore-imports/macro-expanded.rs (100%)
 rename tests/ui/imports/{ => underscore-imports}/multiple-extern-by-macro-for-underscore.ed2015.stderr (100%)
 rename tests/ui/imports/{ => underscore-imports}/multiple-extern-by-macro-for-underscore.ed2021.stderr (100%)
 rename tests/ui/imports/{ => underscore-imports}/multiple-extern-by-macro-for-underscore.rs (100%)
 rename tests/ui/{ => imports}/underscore-imports/multiple-uses.ed2015.stderr (100%)
 rename tests/ui/{ => imports}/underscore-imports/multiple-uses.ed2021.stderr (100%)
 rename tests/ui/{ => imports}/underscore-imports/multiple-uses.rs (100%)
 rename tests/ui/{ => imports}/underscore-imports/shadow.rs (100%)
 rename tests/ui/{ => imports}/underscore-imports/shadow.stderr (100%)
 rename tests/ui/{ => imports}/underscore-imports/unused-2018.rs (100%)
 rename tests/ui/{ => imports}/underscore-imports/unused-2018.stderr (100%)

diff --git a/src/tools/tidy/src/issues.txt b/src/tools/tidy/src/issues.txt
index c747636691f6..295cf228815e 100644
--- a/src/tools/tidy/src/issues.txt
+++ b/src/tools/tidy/src/issues.txt
@@ -2978,7 +2978,6 @@ ui/unboxed-closures/issue-18652.rs
 ui/unboxed-closures/issue-18661.rs
 ui/unboxed-closures/issue-30906.rs
 ui/unboxed-closures/issue-53448.rs
-ui/underscore-imports/issue-110164.rs
 ui/uniform-paths/auxiliary/issue-53691.rs
 ui/uniform-paths/issue-53691.rs
 ui/uninhabited/issue-107505.rs
diff --git a/tests/ui/README.md b/tests/ui/README.md
index 612661dae907..faf1721e0b03 100644
--- a/tests/ui/README.md
+++ b/tests/ui/README.md
@@ -1526,12 +1526,6 @@ See [RFC 0132 Unified Function Call Syntax](https://github.com/rust-lang/rfcs/bl
 
 See [Tracking issue for Fn traits (`unboxed_closures` & `fn_traits` feature)](https://github.com/rust-lang/rust/issues/29625).
 
-## `tests/ui/underscore-imports/`
-
-See [Underscore imports | Reference](https://doc.rust-lang.org/reference/items/use-declarations.html#underscore-imports).
-
-**FIXME**: should become a subdirectory of `tests/ui/imports/`.
-
 ## `tests/ui/underscore-lifetime/`: `'_` elided lifetime
 
 Exercises [anonymous elided lifetimes](https://doc.rust-lang.org/reference/lifetime-elision.html).
diff --git a/tests/ui/underscore-imports/auxiliary/duplicate.rs b/tests/ui/imports/underscore-imports/auxiliary/duplicate.rs
similarity index 100%
rename from tests/ui/underscore-imports/auxiliary/duplicate.rs
rename to tests/ui/imports/underscore-imports/auxiliary/duplicate.rs
diff --git a/tests/ui/underscore-imports/auxiliary/underscore-imports.rs b/tests/ui/imports/underscore-imports/auxiliary/underscore-imports.rs
similarity index 100%
rename from tests/ui/underscore-imports/auxiliary/underscore-imports.rs
rename to tests/ui/imports/underscore-imports/auxiliary/underscore-imports.rs
diff --git a/tests/ui/underscore-imports/basic.rs b/tests/ui/imports/underscore-imports/basic.rs
similarity index 100%
rename from tests/ui/underscore-imports/basic.rs
rename to tests/ui/imports/underscore-imports/basic.rs
diff --git a/tests/ui/underscore-imports/basic.stderr b/tests/ui/imports/underscore-imports/basic.stderr
similarity index 100%
rename from tests/ui/underscore-imports/basic.stderr
rename to tests/ui/imports/underscore-imports/basic.stderr
diff --git a/tests/ui/underscore-imports/cycle.rs b/tests/ui/imports/underscore-imports/cycle.rs
similarity index 100%
rename from tests/ui/underscore-imports/cycle.rs
rename to tests/ui/imports/underscore-imports/cycle.rs
diff --git a/tests/ui/underscore-imports/duplicate.rs b/tests/ui/imports/underscore-imports/duplicate.rs
similarity index 100%
rename from tests/ui/underscore-imports/duplicate.rs
rename to tests/ui/imports/underscore-imports/duplicate.rs
diff --git a/tests/ui/underscore-imports/hygiene-2.rs b/tests/ui/imports/underscore-imports/hygiene-2.rs
similarity index 100%
rename from tests/ui/underscore-imports/hygiene-2.rs
rename to tests/ui/imports/underscore-imports/hygiene-2.rs
diff --git a/tests/ui/underscore-imports/hygiene.rs b/tests/ui/imports/underscore-imports/hygiene.rs
similarity index 100%
rename from tests/ui/underscore-imports/hygiene.rs
rename to tests/ui/imports/underscore-imports/hygiene.rs
diff --git a/tests/ui/underscore-imports/intercrate.rs b/tests/ui/imports/underscore-imports/intercrate.rs
similarity index 100%
rename from tests/ui/underscore-imports/intercrate.rs
rename to tests/ui/imports/underscore-imports/intercrate.rs
diff --git a/tests/ui/underscore-imports/issue-110164.ed2015.stderr b/tests/ui/imports/underscore-imports/invalid-path-110164.ed2015.stderr
similarity index 79%
rename from tests/ui/underscore-imports/issue-110164.ed2015.stderr
rename to tests/ui/imports/underscore-imports/invalid-path-110164.ed2015.stderr
index f34b5ab5dde7..e023ec58d1ad 100644
--- a/tests/ui/underscore-imports/issue-110164.ed2015.stderr
+++ b/tests/ui/imports/underscore-imports/invalid-path-110164.ed2015.stderr
@@ -1,35 +1,35 @@
 error: expected identifier, found reserved identifier `_`
-  --> $DIR/issue-110164.rs:8:5
+  --> $DIR/invalid-path-110164.rs:8:5
    |
 LL | use _::a;
    |     ^ expected identifier, found reserved identifier
 
 error: expected identifier, found reserved identifier `_`
-  --> $DIR/issue-110164.rs:10:5
+  --> $DIR/invalid-path-110164.rs:10:5
    |
 LL | use _::*;
    |     ^ expected identifier, found reserved identifier
 
 error: expected identifier, found reserved identifier `_`
-  --> $DIR/issue-110164.rs:14:9
+  --> $DIR/invalid-path-110164.rs:14:9
    |
 LL |     use _::a;
    |         ^ expected identifier, found reserved identifier
 
 error: expected identifier, found reserved identifier `_`
-  --> $DIR/issue-110164.rs:16:9
+  --> $DIR/invalid-path-110164.rs:16:9
    |
 LL |     use _::*;
    |         ^ expected identifier, found reserved identifier
 
 error[E0432]: unresolved import `self::*`
-  --> $DIR/issue-110164.rs:4:5
+  --> $DIR/invalid-path-110164.rs:4:5
    |
 LL | use self::*;
    |     ^^^^^^^ cannot glob-import a module into itself
 
 error[E0432]: unresolved import `crate::*`
-  --> $DIR/issue-110164.rs:6:5
+  --> $DIR/invalid-path-110164.rs:6:5
    |
 LL | use crate::*;
    |     ^^^^^^^^ cannot glob-import a module into itself
diff --git a/tests/ui/underscore-imports/issue-110164.ed2021.stderr b/tests/ui/imports/underscore-imports/invalid-path-110164.ed2021.stderr
similarity index 79%
rename from tests/ui/underscore-imports/issue-110164.ed2021.stderr
rename to tests/ui/imports/underscore-imports/invalid-path-110164.ed2021.stderr
index f34b5ab5dde7..e023ec58d1ad 100644
--- a/tests/ui/underscore-imports/issue-110164.ed2021.stderr
+++ b/tests/ui/imports/underscore-imports/invalid-path-110164.ed2021.stderr
@@ -1,35 +1,35 @@
 error: expected identifier, found reserved identifier `_`
-  --> $DIR/issue-110164.rs:8:5
+  --> $DIR/invalid-path-110164.rs:8:5
    |
 LL | use _::a;
    |     ^ expected identifier, found reserved identifier
 
 error: expected identifier, found reserved identifier `_`
-  --> $DIR/issue-110164.rs:10:5
+  --> $DIR/invalid-path-110164.rs:10:5
    |
 LL | use _::*;
    |     ^ expected identifier, found reserved identifier
 
 error: expected identifier, found reserved identifier `_`
-  --> $DIR/issue-110164.rs:14:9
+  --> $DIR/invalid-path-110164.rs:14:9
    |
 LL |     use _::a;
    |         ^ expected identifier, found reserved identifier
 
 error: expected identifier, found reserved identifier `_`
-  --> $DIR/issue-110164.rs:16:9
+  --> $DIR/invalid-path-110164.rs:16:9
    |
 LL |     use _::*;
    |         ^ expected identifier, found reserved identifier
 
 error[E0432]: unresolved import `self::*`
-  --> $DIR/issue-110164.rs:4:5
+  --> $DIR/invalid-path-110164.rs:4:5
    |
 LL | use self::*;
    |     ^^^^^^^ cannot glob-import a module into itself
 
 error[E0432]: unresolved import `crate::*`
-  --> $DIR/issue-110164.rs:6:5
+  --> $DIR/invalid-path-110164.rs:6:5
    |
 LL | use crate::*;
    |     ^^^^^^^^ cannot glob-import a module into itself
diff --git a/tests/ui/underscore-imports/issue-110164.rs b/tests/ui/imports/underscore-imports/invalid-path-110164.rs
similarity index 100%
rename from tests/ui/underscore-imports/issue-110164.rs
rename to tests/ui/imports/underscore-imports/invalid-path-110164.rs
diff --git a/tests/ui/underscore-imports/macro-expanded.rs b/tests/ui/imports/underscore-imports/macro-expanded.rs
similarity index 100%
rename from tests/ui/underscore-imports/macro-expanded.rs
rename to tests/ui/imports/underscore-imports/macro-expanded.rs
diff --git a/tests/ui/imports/multiple-extern-by-macro-for-underscore.ed2015.stderr b/tests/ui/imports/underscore-imports/multiple-extern-by-macro-for-underscore.ed2015.stderr
similarity index 100%
rename from tests/ui/imports/multiple-extern-by-macro-for-underscore.ed2015.stderr
rename to tests/ui/imports/underscore-imports/multiple-extern-by-macro-for-underscore.ed2015.stderr
diff --git a/tests/ui/imports/multiple-extern-by-macro-for-underscore.ed2021.stderr b/tests/ui/imports/underscore-imports/multiple-extern-by-macro-for-underscore.ed2021.stderr
similarity index 100%
rename from tests/ui/imports/multiple-extern-by-macro-for-underscore.ed2021.stderr
rename to tests/ui/imports/underscore-imports/multiple-extern-by-macro-for-underscore.ed2021.stderr
diff --git a/tests/ui/imports/multiple-extern-by-macro-for-underscore.rs b/tests/ui/imports/underscore-imports/multiple-extern-by-macro-for-underscore.rs
similarity index 100%
rename from tests/ui/imports/multiple-extern-by-macro-for-underscore.rs
rename to tests/ui/imports/underscore-imports/multiple-extern-by-macro-for-underscore.rs
diff --git a/tests/ui/underscore-imports/multiple-uses.ed2015.stderr b/tests/ui/imports/underscore-imports/multiple-uses.ed2015.stderr
similarity index 100%
rename from tests/ui/underscore-imports/multiple-uses.ed2015.stderr
rename to tests/ui/imports/underscore-imports/multiple-uses.ed2015.stderr
diff --git a/tests/ui/underscore-imports/multiple-uses.ed2021.stderr b/tests/ui/imports/underscore-imports/multiple-uses.ed2021.stderr
similarity index 100%
rename from tests/ui/underscore-imports/multiple-uses.ed2021.stderr
rename to tests/ui/imports/underscore-imports/multiple-uses.ed2021.stderr
diff --git a/tests/ui/underscore-imports/multiple-uses.rs b/tests/ui/imports/underscore-imports/multiple-uses.rs
similarity index 100%
rename from tests/ui/underscore-imports/multiple-uses.rs
rename to tests/ui/imports/underscore-imports/multiple-uses.rs
diff --git a/tests/ui/underscore-imports/shadow.rs b/tests/ui/imports/underscore-imports/shadow.rs
similarity index 100%
rename from tests/ui/underscore-imports/shadow.rs
rename to tests/ui/imports/underscore-imports/shadow.rs
diff --git a/tests/ui/underscore-imports/shadow.stderr b/tests/ui/imports/underscore-imports/shadow.stderr
similarity index 100%
rename from tests/ui/underscore-imports/shadow.stderr
rename to tests/ui/imports/underscore-imports/shadow.stderr
diff --git a/tests/ui/underscore-imports/unused-2018.rs b/tests/ui/imports/underscore-imports/unused-2018.rs
similarity index 100%
rename from tests/ui/underscore-imports/unused-2018.rs
rename to tests/ui/imports/underscore-imports/unused-2018.rs
diff --git a/tests/ui/underscore-imports/unused-2018.stderr b/tests/ui/imports/underscore-imports/unused-2018.stderr
similarity index 100%
rename from tests/ui/underscore-imports/unused-2018.stderr
rename to tests/ui/imports/underscore-imports/unused-2018.stderr

From 863caf8b6b776f684bda74657d4f05a34d935549 Mon Sep 17 00:00:00 2001
From: reddevilmidzy 
Date: Sun, 8 Feb 2026 12:56:06 +0000
Subject: [PATCH 195/265] Move btreemap, hashmap tests into collections subdir

---
 tests/ui/README.md                                   | 12 +-----------
 .../btreemap/btreemap-index-mut-2.rs                 |  0
 .../btreemap/btreemap-index-mut-2.stderr             |  0
 .../{ => collections}/btreemap/btreemap-index-mut.rs |  0
 .../btreemap/btreemap-index-mut.stderr               |  0
 .../ui/{ => collections}/btreemap/btreemap_dropck.rs |  0
 .../btreemap/btreemap_dropck.stderr                  |  0
 .../btreemap/btreemap_into_iterator_lifetime.rs      |  0
 .../hashmap/hashmap-capacity-overflow.rs             |  0
 .../{ => collections}/hashmap/hashmap-index-mut.rs   |  0
 .../hashmap/hashmap-index-mut.stderr                 |  0
 .../hashmap/hashmap-iter-value-lifetime.rs           |  0
 .../hashmap/hashmap-iter-value-lifetime.stderr       |  0
 .../{ => collections}/hashmap/hashmap-lifetimes.rs   |  0
 .../hashmap/hashmap-lifetimes.stderr                 |  0
 tests/ui/{ => collections}/hashmap/hashmap-memory.rs |  0
 .../ui/{ => collections}/hashmap/hashmap-path-key.rs |  0
 .../hashmap/hashset-enum-variant.rs                  |  0
 .../ui/{ => collections}/hashmap/hashset_generics.rs |  0
 .../hashmap/hashset_generics.stderr                  |  0
 20 files changed, 1 insertion(+), 11 deletions(-)
 rename tests/ui/{ => collections}/btreemap/btreemap-index-mut-2.rs (100%)
 rename tests/ui/{ => collections}/btreemap/btreemap-index-mut-2.stderr (100%)
 rename tests/ui/{ => collections}/btreemap/btreemap-index-mut.rs (100%)
 rename tests/ui/{ => collections}/btreemap/btreemap-index-mut.stderr (100%)
 rename tests/ui/{ => collections}/btreemap/btreemap_dropck.rs (100%)
 rename tests/ui/{ => collections}/btreemap/btreemap_dropck.stderr (100%)
 rename tests/ui/{ => collections}/btreemap/btreemap_into_iterator_lifetime.rs (100%)
 rename tests/ui/{ => collections}/hashmap/hashmap-capacity-overflow.rs (100%)
 rename tests/ui/{ => collections}/hashmap/hashmap-index-mut.rs (100%)
 rename tests/ui/{ => collections}/hashmap/hashmap-index-mut.stderr (100%)
 rename tests/ui/{ => collections}/hashmap/hashmap-iter-value-lifetime.rs (100%)
 rename tests/ui/{ => collections}/hashmap/hashmap-iter-value-lifetime.stderr (100%)
 rename tests/ui/{ => collections}/hashmap/hashmap-lifetimes.rs (100%)
 rename tests/ui/{ => collections}/hashmap/hashmap-lifetimes.stderr (100%)
 rename tests/ui/{ => collections}/hashmap/hashmap-memory.rs (100%)
 rename tests/ui/{ => collections}/hashmap/hashmap-path-key.rs (100%)
 rename tests/ui/{ => collections}/hashmap/hashset-enum-variant.rs (100%)
 rename tests/ui/{ => collections}/hashmap/hashset_generics.rs (100%)
 rename tests/ui/{ => collections}/hashmap/hashset_generics.stderr (100%)

diff --git a/tests/ui/README.md b/tests/ui/README.md
index faf1721e0b03..947949ff7181 100644
--- a/tests/ui/README.md
+++ b/tests/ui/README.md
@@ -172,10 +172,6 @@ See:
 - [`std::box::Boxed`](https://doc.rust-lang.org/std/boxed/struct.Box.html)
 - [Tracking issue for `box_patterns` feature #29641](https://github.com/rust-lang/rust/issues/29641)
 
-## `tests/ui/btreemap/`: B-Tree Maps
-
-Tests focused on `BTreeMap` collections and their compiler interactions. E.g. collection patterns, iterator behavior, and trait implementations specific to `BTreeMap`. See [`std::collections::BTreeMap`](https://doc.rust-lang.org/std/collections/struct.BTreeMap.html).
-
 ## `tests/ui/builtin-superkinds/`: Built-in Trait Hierarchy Tests
 
 Tests for built-in trait hierarchy (Send, Sync, Sized, etc.) and their supertrait relationships. E.g. auto traits and marker trait constraints.
@@ -262,12 +258,10 @@ This directory only contains one highly specific test. Other coinduction tests c
 
 ## `tests/ui/collections`
 
-These tests exercise the `collections` library.
+These tests exercise the `collections` library. For example, `BTreeMap` and `HashMap`.
 
 See [`std::collections`](https://doc.rust-lang.org/std/collections/index.html)
 
-**FIXME**: consider merge with `tests/ui/btreemap` and `tests/ui/hashmap`
-
 ## `tests/ui/command/`: `std::process::Command`
 
 This directory is actually for the standard library [`std::process::Command`](https://doc.rust-lang.org/std/process/struct.Command.html) type, where some tests are too difficult or inconvenient to write as unit tests or integration tests within the standard library itself.
@@ -684,10 +678,6 @@ Tests on range patterns where one of the bounds is not a direct value.
 
 **FIXME**: Overlaps with `ui/range`. `impossible_range.rs` is particularly suspected to be a duplicate test.
 
-## `tests/ui/hashmap/`
-
-Tests for the standard library collection [`std::collections::HashMap`](https://doc.rust-lang.org/std/collections/struct.HashMap.html).
-
 ## `tests/ui/higher-ranked/`
 
 Tests for higher-ranked trait bounds.
diff --git a/tests/ui/btreemap/btreemap-index-mut-2.rs b/tests/ui/collections/btreemap/btreemap-index-mut-2.rs
similarity index 100%
rename from tests/ui/btreemap/btreemap-index-mut-2.rs
rename to tests/ui/collections/btreemap/btreemap-index-mut-2.rs
diff --git a/tests/ui/btreemap/btreemap-index-mut-2.stderr b/tests/ui/collections/btreemap/btreemap-index-mut-2.stderr
similarity index 100%
rename from tests/ui/btreemap/btreemap-index-mut-2.stderr
rename to tests/ui/collections/btreemap/btreemap-index-mut-2.stderr
diff --git a/tests/ui/btreemap/btreemap-index-mut.rs b/tests/ui/collections/btreemap/btreemap-index-mut.rs
similarity index 100%
rename from tests/ui/btreemap/btreemap-index-mut.rs
rename to tests/ui/collections/btreemap/btreemap-index-mut.rs
diff --git a/tests/ui/btreemap/btreemap-index-mut.stderr b/tests/ui/collections/btreemap/btreemap-index-mut.stderr
similarity index 100%
rename from tests/ui/btreemap/btreemap-index-mut.stderr
rename to tests/ui/collections/btreemap/btreemap-index-mut.stderr
diff --git a/tests/ui/btreemap/btreemap_dropck.rs b/tests/ui/collections/btreemap/btreemap_dropck.rs
similarity index 100%
rename from tests/ui/btreemap/btreemap_dropck.rs
rename to tests/ui/collections/btreemap/btreemap_dropck.rs
diff --git a/tests/ui/btreemap/btreemap_dropck.stderr b/tests/ui/collections/btreemap/btreemap_dropck.stderr
similarity index 100%
rename from tests/ui/btreemap/btreemap_dropck.stderr
rename to tests/ui/collections/btreemap/btreemap_dropck.stderr
diff --git a/tests/ui/btreemap/btreemap_into_iterator_lifetime.rs b/tests/ui/collections/btreemap/btreemap_into_iterator_lifetime.rs
similarity index 100%
rename from tests/ui/btreemap/btreemap_into_iterator_lifetime.rs
rename to tests/ui/collections/btreemap/btreemap_into_iterator_lifetime.rs
diff --git a/tests/ui/hashmap/hashmap-capacity-overflow.rs b/tests/ui/collections/hashmap/hashmap-capacity-overflow.rs
similarity index 100%
rename from tests/ui/hashmap/hashmap-capacity-overflow.rs
rename to tests/ui/collections/hashmap/hashmap-capacity-overflow.rs
diff --git a/tests/ui/hashmap/hashmap-index-mut.rs b/tests/ui/collections/hashmap/hashmap-index-mut.rs
similarity index 100%
rename from tests/ui/hashmap/hashmap-index-mut.rs
rename to tests/ui/collections/hashmap/hashmap-index-mut.rs
diff --git a/tests/ui/hashmap/hashmap-index-mut.stderr b/tests/ui/collections/hashmap/hashmap-index-mut.stderr
similarity index 100%
rename from tests/ui/hashmap/hashmap-index-mut.stderr
rename to tests/ui/collections/hashmap/hashmap-index-mut.stderr
diff --git a/tests/ui/hashmap/hashmap-iter-value-lifetime.rs b/tests/ui/collections/hashmap/hashmap-iter-value-lifetime.rs
similarity index 100%
rename from tests/ui/hashmap/hashmap-iter-value-lifetime.rs
rename to tests/ui/collections/hashmap/hashmap-iter-value-lifetime.rs
diff --git a/tests/ui/hashmap/hashmap-iter-value-lifetime.stderr b/tests/ui/collections/hashmap/hashmap-iter-value-lifetime.stderr
similarity index 100%
rename from tests/ui/hashmap/hashmap-iter-value-lifetime.stderr
rename to tests/ui/collections/hashmap/hashmap-iter-value-lifetime.stderr
diff --git a/tests/ui/hashmap/hashmap-lifetimes.rs b/tests/ui/collections/hashmap/hashmap-lifetimes.rs
similarity index 100%
rename from tests/ui/hashmap/hashmap-lifetimes.rs
rename to tests/ui/collections/hashmap/hashmap-lifetimes.rs
diff --git a/tests/ui/hashmap/hashmap-lifetimes.stderr b/tests/ui/collections/hashmap/hashmap-lifetimes.stderr
similarity index 100%
rename from tests/ui/hashmap/hashmap-lifetimes.stderr
rename to tests/ui/collections/hashmap/hashmap-lifetimes.stderr
diff --git a/tests/ui/hashmap/hashmap-memory.rs b/tests/ui/collections/hashmap/hashmap-memory.rs
similarity index 100%
rename from tests/ui/hashmap/hashmap-memory.rs
rename to tests/ui/collections/hashmap/hashmap-memory.rs
diff --git a/tests/ui/hashmap/hashmap-path-key.rs b/tests/ui/collections/hashmap/hashmap-path-key.rs
similarity index 100%
rename from tests/ui/hashmap/hashmap-path-key.rs
rename to tests/ui/collections/hashmap/hashmap-path-key.rs
diff --git a/tests/ui/hashmap/hashset-enum-variant.rs b/tests/ui/collections/hashmap/hashset-enum-variant.rs
similarity index 100%
rename from tests/ui/hashmap/hashset-enum-variant.rs
rename to tests/ui/collections/hashmap/hashset-enum-variant.rs
diff --git a/tests/ui/hashmap/hashset_generics.rs b/tests/ui/collections/hashmap/hashset_generics.rs
similarity index 100%
rename from tests/ui/hashmap/hashset_generics.rs
rename to tests/ui/collections/hashmap/hashset_generics.rs
diff --git a/tests/ui/hashmap/hashset_generics.stderr b/tests/ui/collections/hashmap/hashset_generics.stderr
similarity index 100%
rename from tests/ui/hashmap/hashset_generics.stderr
rename to tests/ui/collections/hashmap/hashset_generics.stderr

From 86f1affe5a3a7fe71bc8b59044522c3a6e479b03 Mon Sep 17 00:00:00 2001
From: reddevilmidzy 
Date: Sun, 8 Feb 2026 13:02:57 +0000
Subject: [PATCH 196/265] Move higher-ranked-trait-bounds tests into
 higher-ranked subdir

---
 tests/ui/README.md                                          | 4 ----
 .../trait-bounds}/higher-trait-bounds-ice-60218.rs          | 4 +---
 .../trait-bounds}/higher-trait-bounds-ice-60218.stderr      | 6 +++---
 3 files changed, 4 insertions(+), 10 deletions(-)
 rename tests/ui/{higher-ranked-trait-bounds => higher-ranked/trait-bounds}/higher-trait-bounds-ice-60218.rs (81%)
 rename tests/ui/{higher-ranked-trait-bounds => higher-ranked/trait-bounds}/higher-trait-bounds-ice-60218.stderr (85%)

diff --git a/tests/ui/README.md b/tests/ui/README.md
index 947949ff7181..5892083771d2 100644
--- a/tests/ui/README.md
+++ b/tests/ui/README.md
@@ -687,10 +687,6 @@ See:
 - [Higher-ranked trait bounds | rustc-dev-guide](https://rustc-dev-guide.rust-lang.org/traits/hrtb.html)
 - [Higher-ranked trait bounds | Nomicon](https://doc.rust-lang.org/nomicon/hrtb.html)
 
-## `tests/ui/higher-ranked-trait-bounds`
-
-**FIXME**: move to `tests/ui/higher-ranked/trait-bounds`
-
 ## `tests/ui/hygiene/`
 
 This seems to have been originally intended for "hygienic macros" - macros which work in all contexts, independent of what surrounds them. However, this category has grown into a mish-mash of many tests that may belong in the other directories.
diff --git a/tests/ui/higher-ranked-trait-bounds/higher-trait-bounds-ice-60218.rs b/tests/ui/higher-ranked/trait-bounds/higher-trait-bounds-ice-60218.rs
similarity index 81%
rename from tests/ui/higher-ranked-trait-bounds/higher-trait-bounds-ice-60218.rs
rename to tests/ui/higher-ranked/trait-bounds/higher-trait-bounds-ice-60218.rs
index d1a4e09243ec..d0d09f11a574 100644
--- a/tests/ui/higher-ranked-trait-bounds/higher-trait-bounds-ice-60218.rs
+++ b/tests/ui/higher-ranked/trait-bounds/higher-trait-bounds-ice-60218.rs
@@ -1,6 +1,4 @@
-// https://github.com/rust-lang/rust/issues/60218
-// Regression test for #60218
-//
+// Regression test for https://github.com/rust-lang/rust/issues/60218
 // This was reported to cause ICEs.
 
 use std::iter::Map;
diff --git a/tests/ui/higher-ranked-trait-bounds/higher-trait-bounds-ice-60218.stderr b/tests/ui/higher-ranked/trait-bounds/higher-trait-bounds-ice-60218.stderr
similarity index 85%
rename from tests/ui/higher-ranked-trait-bounds/higher-trait-bounds-ice-60218.stderr
rename to tests/ui/higher-ranked/trait-bounds/higher-trait-bounds-ice-60218.stderr
index 4c403bcbd601..b02179f14125 100644
--- a/tests/ui/higher-ranked-trait-bounds/higher-trait-bounds-ice-60218.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/higher-trait-bounds-ice-60218.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `&u32: Foo` is not satisfied
-  --> $DIR/higher-trait-bounds-ice-60218.rs:19:19
+  --> $DIR/higher-trait-bounds-ice-60218.rs:17:19
    |
 LL |     trigger_error(vec![], |x: &u32| x)
    |     ------------- ^^^^^^ the trait `Foo` is not implemented for `&u32`
@@ -7,12 +7,12 @@ LL |     trigger_error(vec![], |x: &u32| x)
    |     required by a bound introduced by this call
    |
 help: this trait has no implementations, consider adding one
-  --> $DIR/higher-trait-bounds-ice-60218.rs:8:1
+  --> $DIR/higher-trait-bounds-ice-60218.rs:6:1
    |
 LL | pub trait Foo {}
    | ^^^^^^^^^^^^^
 note: required by a bound in `trigger_error`
-  --> $DIR/higher-trait-bounds-ice-60218.rs:14:72
+  --> $DIR/higher-trait-bounds-ice-60218.rs:12:72
    |
 LL | pub fn trigger_error(iterable: I, functor: F)
    |        ------------- required by a bound in this function

From c92f384eb111d0994bbbe984f503c6c6edfa8404 Mon Sep 17 00:00:00 2001
From: reddevilmidzy 
Date: Sun, 8 Feb 2026 13:09:08 +0000
Subject: [PATCH 197/265] Move meta tests to compiletest-self-test, bootstrap
 dir

---
 tests/ui/README.md                                          | 6 ------
 tests/ui/{meta => bootstrap}/no_std-extern-libc.rs          | 0
 tests/ui/{meta => compiletest-self-test}/auxiliary/env.rs   | 0
 .../{meta => compiletest-self-test}/dir.with.dots/test.rs   | 0
 .../expected-error-correct-rev.a.stderr                     | 0
 .../expected-error-correct-rev.rs                           | 0
 .../meta-expected-error-wrong-rev.a.stderr                  | 0
 .../meta-expected-error-wrong-rev.rs                        | 0
 tests/ui/{meta => compiletest-self-test}/revision-bad.rs    | 0
 tests/ui/{meta => compiletest-self-test}/revision-ok.rs     | 0
 tests/ui/{meta => compiletest-self-test}/rustc-env.rs       | 0
 11 files changed, 6 deletions(-)
 rename tests/ui/{meta => bootstrap}/no_std-extern-libc.rs (100%)
 rename tests/ui/{meta => compiletest-self-test}/auxiliary/env.rs (100%)
 rename tests/ui/{meta => compiletest-self-test}/dir.with.dots/test.rs (100%)
 rename tests/ui/{meta => compiletest-self-test}/expected-error-correct-rev.a.stderr (100%)
 rename tests/ui/{meta => compiletest-self-test}/expected-error-correct-rev.rs (100%)
 rename tests/ui/{meta => compiletest-self-test}/meta-expected-error-wrong-rev.a.stderr (100%)
 rename tests/ui/{meta => compiletest-self-test}/meta-expected-error-wrong-rev.rs (100%)
 rename tests/ui/{meta => compiletest-self-test}/revision-bad.rs (100%)
 rename tests/ui/{meta => compiletest-self-test}/revision-ok.rs (100%)
 rename tests/ui/{meta => compiletest-self-test}/rustc-env.rs (100%)

diff --git a/tests/ui/README.md b/tests/ui/README.md
index 5892083771d2..16cdde08431c 100644
--- a/tests/ui/README.md
+++ b/tests/ui/README.md
@@ -909,12 +909,6 @@ See [Tracking issue for allowing overlapping implementations for marker trait #2
 
 Broad category of tests on `match` constructs.
 
-## `tests/ui/meta/`: Tests for compiletest itself
-
-These tests check the function of the UI test suite at large and Compiletest in itself.
-
-**FIXME**: This should absolutely be merged with `tests/ui/compiletest-self-test/`.
-
 ## `tests/ui/methods/`
 
 A broad category for anything related to methods and method resolution.
diff --git a/tests/ui/meta/no_std-extern-libc.rs b/tests/ui/bootstrap/no_std-extern-libc.rs
similarity index 100%
rename from tests/ui/meta/no_std-extern-libc.rs
rename to tests/ui/bootstrap/no_std-extern-libc.rs
diff --git a/tests/ui/meta/auxiliary/env.rs b/tests/ui/compiletest-self-test/auxiliary/env.rs
similarity index 100%
rename from tests/ui/meta/auxiliary/env.rs
rename to tests/ui/compiletest-self-test/auxiliary/env.rs
diff --git a/tests/ui/meta/dir.with.dots/test.rs b/tests/ui/compiletest-self-test/dir.with.dots/test.rs
similarity index 100%
rename from tests/ui/meta/dir.with.dots/test.rs
rename to tests/ui/compiletest-self-test/dir.with.dots/test.rs
diff --git a/tests/ui/meta/expected-error-correct-rev.a.stderr b/tests/ui/compiletest-self-test/expected-error-correct-rev.a.stderr
similarity index 100%
rename from tests/ui/meta/expected-error-correct-rev.a.stderr
rename to tests/ui/compiletest-self-test/expected-error-correct-rev.a.stderr
diff --git a/tests/ui/meta/expected-error-correct-rev.rs b/tests/ui/compiletest-self-test/expected-error-correct-rev.rs
similarity index 100%
rename from tests/ui/meta/expected-error-correct-rev.rs
rename to tests/ui/compiletest-self-test/expected-error-correct-rev.rs
diff --git a/tests/ui/meta/meta-expected-error-wrong-rev.a.stderr b/tests/ui/compiletest-self-test/meta-expected-error-wrong-rev.a.stderr
similarity index 100%
rename from tests/ui/meta/meta-expected-error-wrong-rev.a.stderr
rename to tests/ui/compiletest-self-test/meta-expected-error-wrong-rev.a.stderr
diff --git a/tests/ui/meta/meta-expected-error-wrong-rev.rs b/tests/ui/compiletest-self-test/meta-expected-error-wrong-rev.rs
similarity index 100%
rename from tests/ui/meta/meta-expected-error-wrong-rev.rs
rename to tests/ui/compiletest-self-test/meta-expected-error-wrong-rev.rs
diff --git a/tests/ui/meta/revision-bad.rs b/tests/ui/compiletest-self-test/revision-bad.rs
similarity index 100%
rename from tests/ui/meta/revision-bad.rs
rename to tests/ui/compiletest-self-test/revision-bad.rs
diff --git a/tests/ui/meta/revision-ok.rs b/tests/ui/compiletest-self-test/revision-ok.rs
similarity index 100%
rename from tests/ui/meta/revision-ok.rs
rename to tests/ui/compiletest-self-test/revision-ok.rs
diff --git a/tests/ui/meta/rustc-env.rs b/tests/ui/compiletest-self-test/rustc-env.rs
similarity index 100%
rename from tests/ui/meta/rustc-env.rs
rename to tests/ui/compiletest-self-test/rustc-env.rs

From d888b1c1082217d7b084aa02cab2c59783edffd1 Mon Sep 17 00:00:00 2001
From: The Miri Cronjob Bot 
Date: Sun, 15 Feb 2026 05:18:09 +0000
Subject: [PATCH 198/265] Prepare for merging from rust-lang/rust

This updates the rust-version file to 7bee525095c0872e87c038c412c781b9bbb3f5dc.
---
 src/tools/miri/rust-version | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tools/miri/rust-version b/src/tools/miri/rust-version
index a79511cea30a..28c3e88535f6 100644
--- a/src/tools/miri/rust-version
+++ b/src/tools/miri/rust-version
@@ -1 +1 @@
-47611e16044c68ef27bac31c35fda2ba1dc20b73
+7bee525095c0872e87c038c412c781b9bbb3f5dc

From 8d3b9f4a81f7763e7901287a477bc4e17e16f30b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexander=20Kj=C3=A4ll?= 
Date: Sun, 15 Feb 2026 10:28:47 +0100
Subject: [PATCH 199/265] gate borsh tests on std also, as they depend on both

---
 src/tools/rust-analyzer/lib/smol_str/tests/test.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tools/rust-analyzer/lib/smol_str/tests/test.rs b/src/tools/rust-analyzer/lib/smol_str/tests/test.rs
index 640e7df681c9..00fab2ee1c7f 100644
--- a/src/tools/rust-analyzer/lib/smol_str/tests/test.rs
+++ b/src/tools/rust-analyzer/lib/smol_str/tests/test.rs
@@ -393,7 +393,7 @@ mod test_str_ext {
     }
 }
 
-#[cfg(feature = "borsh")]
+#[cfg(all(feature = "borsh", feature = "std"))]
 mod borsh_tests {
     use borsh::BorshDeserialize;
     use smol_str::{SmolStr, ToSmolStr};

From fa753a46c15d9992eedb7b6cf9ac3da4044b45d2 Mon Sep 17 00:00:00 2001
From: bjorn3 <17426603+bjorn3@users.noreply.github.com>
Date: Fri, 13 Feb 2026 09:58:04 +0000
Subject: [PATCH 200/265] Remove code for ThinLTO from cg_gcc

It was just a dummy implementation to workarround the fact that thin
local lto is the default in rustc. By adding a thin_lto_supported thin
local lto can be automatically disabled for cg_gcc, removing the need
for this dummy implementation. This makes improvements to the LTO
handling on the cg_ssa side a lot easier.
---
 compiler/rustc_codegen_gcc/src/back/lto.rs    | 395 +-----------------
 compiler/rustc_codegen_gcc/src/lib.rs         |  46 +-
 .../rustc_codegen_ssa/src/traits/backend.rs   |   5 +
 compiler/rustc_interface/src/interface.rs     |   1 +
 .../rustc_macros/src/diagnostics/message.rs   |   1 +
 compiler/rustc_session/src/errors.rs          |   4 +
 compiler/rustc_session/src/session.rs         |  13 +
 7 files changed, 56 insertions(+), 409 deletions(-)

diff --git a/compiler/rustc_codegen_gcc/src/back/lto.rs b/compiler/rustc_codegen_gcc/src/back/lto.rs
index 9a9040708ef8..a08e3dc0df87 100644
--- a/compiler/rustc_codegen_gcc/src/back/lto.rs
+++ b/compiler/rustc_codegen_gcc/src/back/lto.rs
@@ -17,15 +17,13 @@
 // /usr/bin/ld: warning: type of symbol `_RNvNvNvNvNtNtNtCsAj5i4SGTR7_3std4sync4mpmc5waker17current_thread_id5DUMMY7___getit5___KEY' changed from 1 to 6 in /tmp/ccKeUSiR.ltrans0.ltrans.o
 // /usr/bin/ld: warning: incremental linking of LTO and non-LTO objects; using -flinker-output=nolto-rel which will bypass whole program optimization
 // cSpell:enable
-use std::ffi::{CStr, CString};
+use std::ffi::CString;
 use std::fs::{self, File};
 use std::path::{Path, PathBuf};
-use std::sync::Arc;
-use std::sync::atomic::Ordering;
 
-use gccjit::{Context, OutputKind};
+use gccjit::OutputKind;
 use object::read::archive::ArchiveFile;
-use rustc_codegen_ssa::back::lto::{SerializedModule, ThinModule, ThinShared};
+use rustc_codegen_ssa::back::lto::SerializedModule;
 use rustc_codegen_ssa::back::write::{CodegenContext, FatLtoInput, SharedEmitter};
 use rustc_codegen_ssa::traits::*;
 use rustc_codegen_ssa::{ModuleCodegen, ModuleKind, looks_like_rust_object_file};
@@ -33,15 +31,12 @@ use rustc_data_structures::memmap::Mmap;
 use rustc_data_structures::profiling::SelfProfilerRef;
 use rustc_errors::{DiagCtxt, DiagCtxtHandle};
 use rustc_log::tracing::info;
-use rustc_middle::bug;
-use rustc_middle::dep_graph::WorkProduct;
 use rustc_session::config::Lto;
-use rustc_target::spec::RelocModel;
 use tempfile::{TempDir, tempdir};
 
 use crate::back::write::save_temp_bitcode;
 use crate::errors::LtoBitcodeFromRlib;
-use crate::{GccCodegenBackend, GccContext, LTO_SUPPORTED, LtoMode, SyncContext, to_gcc_opt_level};
+use crate::{GccCodegenBackend, GccContext, LtoMode, to_gcc_opt_level};
 
 struct LtoData {
     // TODO(antoyo): use symbols_below_threshold.
@@ -281,385 +276,3 @@ impl ModuleBufferMethods for ModuleBuffer {
         &[]
     }
 }
-
-/// Performs thin LTO by performing necessary global analysis and returning two
-/// lists, one of the modules that need optimization and another for modules that
-/// can simply be copied over from the incr. comp. cache.
-pub(crate) fn run_thin(
-    cgcx: &CodegenContext,
-    prof: &SelfProfilerRef,
-    dcx: DiagCtxtHandle<'_>,
-    each_linked_rlib_for_lto: &[PathBuf],
-    modules: Vec<(String, ThinBuffer)>,
-    cached_modules: Vec<(SerializedModule, WorkProduct)>,
-) -> (Vec>, Vec) {
-    let lto_data = prepare_lto(cgcx, each_linked_rlib_for_lto, dcx);
-    if cgcx.use_linker_plugin_lto {
-        unreachable!(
-            "We should never reach this case if the LTO step \
-                      is deferred to the linker"
-        );
-    }
-    thin_lto(
-        cgcx,
-        prof,
-        dcx,
-        modules,
-        lto_data.upstream_modules,
-        lto_data.tmp_path,
-        cached_modules,
-        //<o_data.symbols_below_threshold,
-    )
-}
-
-pub(crate) fn prepare_thin(module: ModuleCodegen) -> (String, ThinBuffer) {
-    let name = module.name;
-    //let buffer = ThinBuffer::new(module.module_llvm.context, true);
-    let buffer = ThinBuffer::new(&module.module_llvm.context);
-    (name, buffer)
-}
-
-/// Prepare "thin" LTO to get run on these modules.
-///
-/// The general structure of ThinLTO is quite different from the structure of
-/// "fat" LTO above. With "fat" LTO all LLVM modules in question are merged into
-/// one giant LLVM module, and then we run more optimization passes over this
-/// big module after internalizing most symbols. Thin LTO, on the other hand,
-/// avoid this large bottleneck through more targeted optimization.
-///
-/// At a high level Thin LTO looks like:
-///
-///    1. Prepare a "summary" of each LLVM module in question which describes
-///       the values inside, cost of the values, etc.
-///    2. Merge the summaries of all modules in question into one "index"
-///    3. Perform some global analysis on this index
-///    4. For each module, use the index and analysis calculated previously to
-///       perform local transformations on the module, for example inlining
-///       small functions from other modules.
-///    5. Run thin-specific optimization passes over each module, and then code
-///       generate everything at the end.
-///
-/// The summary for each module is intended to be quite cheap, and the global
-/// index is relatively quite cheap to create as well. As a result, the goal of
-/// ThinLTO is to reduce the bottleneck on LTO and enable LTO to be used in more
-/// situations. For example one cheap optimization is that we can parallelize
-/// all codegen modules, easily making use of all the cores on a machine.
-///
-/// With all that in mind, the function here is designed at specifically just
-/// calculating the *index* for ThinLTO. This index will then be shared amongst
-/// all of the `LtoModuleCodegen` units returned below and destroyed once
-/// they all go out of scope.
-fn thin_lto(
-    _cgcx: &CodegenContext,
-    prof: &SelfProfilerRef,
-    _dcx: DiagCtxtHandle<'_>,
-    modules: Vec<(String, ThinBuffer)>,
-    serialized_modules: Vec<(SerializedModule, CString)>,
-    tmp_path: TempDir,
-    cached_modules: Vec<(SerializedModule, WorkProduct)>,
-    //_symbols_below_threshold: &[String],
-) -> (Vec>, Vec) {
-    let _timer = prof.generic_activity("LLVM_thin_lto_global_analysis");
-    info!("going for that thin, thin LTO");
-
-    /*let green_modules: FxHashMap<_, _> =
-    cached_modules.iter().map(|(_, wp)| (wp.cgu_name.clone(), wp.clone())).collect();*/
-
-    let full_scope_len = modules.len() + serialized_modules.len() + cached_modules.len();
-    let mut thin_buffers = Vec::with_capacity(modules.len());
-    let mut module_names = Vec::with_capacity(full_scope_len);
-    //let mut thin_modules = Vec::with_capacity(full_scope_len);
-
-    for (i, (name, buffer)) in modules.into_iter().enumerate() {
-        info!("local module: {} - {}", i, name);
-        let cname = CString::new(name.as_bytes()).unwrap();
-        /*thin_modules.push(llvm::ThinLTOModule {
-            identifier: cname.as_ptr(),
-            data: buffer.data().as_ptr(),
-            len: buffer.data().len(),
-        });*/
-        thin_buffers.push(buffer);
-        module_names.push(cname);
-    }
-
-    // FIXME: All upstream crates are deserialized internally in the
-    //        function below to extract their summary and modules. Note that
-    //        unlike the loop above we *must* decode and/or read something
-    //        here as these are all just serialized files on disk. An
-    //        improvement, however, to make here would be to store the
-    //        module summary separately from the actual module itself. Right
-    //        now this is store in one large bitcode file, and the entire
-    //        file is deflate-compressed. We could try to bypass some of the
-    //        decompression by storing the index uncompressed and only
-    //        lazily decompressing the bytecode if necessary.
-    //
-    //        Note that truly taking advantage of this optimization will
-    //        likely be further down the road. We'd have to implement
-    //        incremental ThinLTO first where we could actually avoid
-    //        looking at upstream modules entirely sometimes (the contents,
-    //        we must always unconditionally look at the index).
-    let mut serialized = Vec::with_capacity(serialized_modules.len() + cached_modules.len());
-
-    let cached_modules =
-        cached_modules.into_iter().map(|(sm, wp)| (sm, CString::new(wp.cgu_name).unwrap()));
-
-    for (module, name) in serialized_modules.into_iter().chain(cached_modules) {
-        info!("upstream or cached module {:?}", name);
-        /*thin_modules.push(llvm::ThinLTOModule {
-            identifier: name.as_ptr(),
-            data: module.data().as_ptr(),
-            len: module.data().len(),
-        });*/
-
-        match module {
-            SerializedModule::Local(_) => {
-                //let path = module_buffer.0.to_str().expect("path");
-                //let my_path = PathBuf::from(path);
-                //let exists = my_path.exists();
-                /*module.module_llvm.should_combine_object_files = true;
-                module
-                .module_llvm
-                .context
-                .add_driver_option(module_buffer.0.to_str().expect("path"));*/
-            }
-            SerializedModule::FromRlib(_) => unimplemented!("from rlib"),
-            SerializedModule::FromUncompressedFile(_) => {
-                unimplemented!("from uncompressed file")
-            }
-        }
-
-        serialized.push(module);
-        module_names.push(name);
-    }
-
-    // Sanity check
-    //assert_eq!(thin_modules.len(), module_names.len());
-
-    // Delegate to the C++ bindings to create some data here. Once this is a
-    // tried-and-true interface we may wish to try to upstream some of this
-    // to LLVM itself, right now we reimplement a lot of what they do
-    // upstream...
-    /*let data = llvm::LLVMRustCreateThinLTOData(
-        thin_modules.as_ptr(),
-        thin_modules.len() as u32,
-        symbols_below_threshold.as_ptr(),
-        symbols_below_threshold.len() as u32,
-    )
-    .ok_or_else(|| write::llvm_err(dcx, LlvmError::PrepareThinLtoContext))?;
-    */
-
-    let data = ThinData; //(Arc::new(tmp_path))/*(data)*/;
-
-    info!("thin LTO data created");
-
-    /*let (key_map_path, prev_key_map, curr_key_map) =
-        if let Some(ref incr_comp_session_dir) = cgcx.incr_comp_session_dir {
-            let path = incr_comp_session_dir.join(THIN_LTO_KEYS_INCR_COMP_FILE_NAME);
-            // If the previous file was deleted, or we get an IO error
-            // reading the file, then we'll just use `None` as the
-            // prev_key_map, which will force the code to be recompiled.
-            let prev =
-                if path.exists() { ThinLTOKeysMap::load_from_file(&path).ok() } else { None };
-            let curr = ThinLTOKeysMap::from_thin_lto_modules(&data, &thin_modules, &module_names);
-            (Some(path), prev, curr)
-        }
-        else {
-            // If we don't compile incrementally, we don't need to load the
-            // import data from LLVM.
-            assert!(green_modules.is_empty());
-            let curr = ThinLTOKeysMap::default();
-            (None, None, curr)
-        };
-    info!("thin LTO cache key map loaded");
-    info!("prev_key_map: {:#?}", prev_key_map);
-    info!("curr_key_map: {:#?}", curr_key_map);*/
-
-    // Throw our data in an `Arc` as we'll be sharing it across threads. We
-    // also put all memory referenced by the C++ data (buffers, ids, etc)
-    // into the arc as well. After this we'll create a thin module
-    // codegen per module in this data.
-    let shared =
-        Arc::new(ThinShared { data, thin_buffers, serialized_modules: serialized, module_names });
-
-    let copy_jobs = vec![];
-    let mut opt_jobs = vec![];
-
-    info!("checking which modules can be-reused and which have to be re-optimized.");
-    for (module_index, module_name) in shared.module_names.iter().enumerate() {
-        let module_name = module_name_to_str(module_name);
-        /*if let (Some(prev_key_map), true) =
-            (prev_key_map.as_ref(), green_modules.contains_key(module_name))
-        {
-            assert!(cgcx.incr_comp_session_dir.is_some());
-
-            // If a module exists in both the current and the previous session,
-            // and has the same LTO cache key in both sessions, then we can re-use it
-            if prev_key_map.keys.get(module_name) == curr_key_map.keys.get(module_name) {
-                let work_product = green_modules[module_name].clone();
-                copy_jobs.push(work_product);
-                info!(" - {}: re-used", module_name);
-                assert!(cgcx.incr_comp_session_dir.is_some());
-                continue;
-            }
-        }*/
-
-        info!(" - {}: re-compiled", module_name);
-        opt_jobs.push(ThinModule { shared: shared.clone(), idx: module_index });
-    }
-
-    // Save the current ThinLTO import information for the next compilation
-    // session, overwriting the previous serialized data (if any).
-    /*if let Some(path) = key_map_path {
-        if let Err(err) = curr_key_map.save_to_file(&path) {
-            return Err(write::llvm_err(dcx, LlvmError::WriteThinLtoKey { err }));
-        }
-    }*/
-
-    // NOTE: save the temporary directory used by LTO so that it gets deleted after linking instead
-    // of now.
-    //module.module_llvm.temp_dir = Some(tmp_path);
-    // TODO: save the directory so that it gets deleted later.
-    std::mem::forget(tmp_path);
-
-    (opt_jobs, copy_jobs)
-}
-
-pub fn optimize_thin_module(
-    thin_module: ThinModule,
-    _cgcx: &CodegenContext,
-) -> ModuleCodegen {
-    //let module_name = &thin_module.shared.module_names[thin_module.idx];
-
-    // Right now the implementation we've got only works over serialized
-    // modules, so we create a fresh new LLVM context and parse the module
-    // into that context. One day, however, we may do this for upstream
-    // crates but for locally codegened modules we may be able to reuse
-    // that LLVM Context and Module.
-    //let llcx = llvm::LLVMRustContextCreate(cgcx.fewer_names);
-    //let llmod_raw = parse_module(llcx, module_name, thin_module.data(), &dcx)? as *const _;
-    let mut lto_mode = LtoMode::None;
-    let context = match thin_module.shared.thin_buffers.get(thin_module.idx) {
-        Some(thin_buffer) => Arc::clone(&thin_buffer.context),
-        None => {
-            let context = Context::default();
-            let len = thin_module.shared.thin_buffers.len();
-            let module = &thin_module.shared.serialized_modules[thin_module.idx - len];
-            match *module {
-                SerializedModule::Local(ref module_buffer) => {
-                    let path = module_buffer.0.to_str().expect("path");
-                    context.add_driver_option(path);
-                    lto_mode = LtoMode::Thin;
-                    /*module.module_llvm.should_combine_object_files = true;
-                    module
-                        .module_llvm
-                        .context
-                        .add_driver_option(module_buffer.0.to_str().expect("path"));*/
-                }
-                SerializedModule::FromRlib(_) => unimplemented!("from rlib"),
-                SerializedModule::FromUncompressedFile(_) => {
-                    unimplemented!("from uncompressed file")
-                }
-            }
-            Arc::new(SyncContext::new(context))
-        }
-    };
-    let lto_supported = LTO_SUPPORTED.load(Ordering::SeqCst);
-    let module = ModuleCodegen::new_regular(
-        thin_module.name().to_string(),
-        GccContext {
-            context,
-            lto_mode,
-            lto_supported,
-            // TODO(antoyo): use the correct relocation model here.
-            relocation_model: RelocModel::Pic,
-            temp_dir: None,
-        },
-    );
-    /*{
-        let target = &*module.module_llvm.tm;
-        let llmod = module.module_llvm.llmod();
-        save_temp_bitcode(cgcx, &module, "thin-lto-input");
-
-        // Up next comes the per-module local analyses that we do for Thin LTO.
-        // Each of these functions is basically copied from the LLVM
-        // implementation and then tailored to suit this implementation. Ideally
-        // each of these would be supported by upstream LLVM but that's perhaps
-        // a patch for another day!
-        //
-        // You can find some more comments about these functions in the LLVM
-        // bindings we've got (currently `PassWrapper.cpp`)
-        {
-            let _timer =
-                cgcx.prof.generic_activity_with_arg("LLVM_thin_lto_rename", thin_module.name());
-            unsafe { llvm::LLVMRustPrepareThinLTORename(thin_module.shared.data.0, llmod, target) };
-            save_temp_bitcode(cgcx, &module, "thin-lto-after-rename");
-        }
-
-        {
-            let _timer = cgcx
-                .prof
-                .generic_activity_with_arg("LLVM_thin_lto_resolve_weak", thin_module.name());
-            if !llvm::LLVMRustPrepareThinLTOResolveWeak(thin_module.shared.data.0, llmod) {
-                return Err(write::llvm_err(&dcx, LlvmError::PrepareThinLtoModule));
-            }
-            save_temp_bitcode(cgcx, &module, "thin-lto-after-resolve");
-        }
-
-        {
-            let _timer = cgcx
-                .prof
-                .generic_activity_with_arg("LLVM_thin_lto_internalize", thin_module.name());
-            if !llvm::LLVMRustPrepareThinLTOInternalize(thin_module.shared.data.0, llmod) {
-                return Err(write::llvm_err(&dcx, LlvmError::PrepareThinLtoModule));
-            }
-            save_temp_bitcode(cgcx, &module, "thin-lto-after-internalize");
-        }
-
-        {
-            let _timer =
-                cgcx.prof.generic_activity_with_arg("LLVM_thin_lto_import", thin_module.name());
-            if !llvm::LLVMRustPrepareThinLTOImport(thin_module.shared.data.0, llmod, target) {
-                return Err(write::llvm_err(&dcx, LlvmError::PrepareThinLtoModule));
-            }
-            save_temp_bitcode(cgcx, &module, "thin-lto-after-import");
-        }
-
-        // Alright now that we've done everything related to the ThinLTO
-        // analysis it's time to run some optimizations! Here we use the same
-        // `run_pass_manager` as the "fat" LTO above except that we tell it to
-        // populate a thin-specific pass manager, which presumably LLVM treats a
-        // little differently.
-        {
-            info!("running thin lto passes over {}", module.name);
-            run_pass_manager(cgcx, &dcx, &mut module, true)?;
-            save_temp_bitcode(cgcx, &module, "thin-lto-after-pm");
-        }
-    }*/
-    // FIXME: switch to #[expect] when the clippy bug is fixed.
-    #[allow(clippy::let_and_return)]
-    module
-}
-
-pub struct ThinBuffer {
-    context: Arc,
-}
-
-impl ThinBuffer {
-    pub(crate) fn new(context: &Arc) -> Self {
-        Self { context: Arc::clone(context) }
-    }
-}
-
-impl ThinBufferMethods for ThinBuffer {
-    fn data(&self) -> &[u8] {
-        &[]
-    }
-}
-
-pub struct ThinData; //(Arc);
-
-fn module_name_to_str(c_str: &CStr) -> &str {
-    c_str.to_str().unwrap_or_else(|e| {
-        bug!("Encountered non-utf8 GCC module name `{}`: {}", c_str.to_string_lossy(), e)
-    })
-}
diff --git a/compiler/rustc_codegen_gcc/src/lib.rs b/compiler/rustc_codegen_gcc/src/lib.rs
index 1b3d78c42e65..5d03d2406870 100644
--- a/compiler/rustc_codegen_gcc/src/lib.rs
+++ b/compiler/rustc_codegen_gcc/src/lib.rs
@@ -76,7 +76,6 @@ use std::path::{Path, PathBuf};
 use std::sync::atomic::{AtomicBool, Ordering};
 use std::sync::{Arc, Mutex};
 
-use back::lto::{ThinBuffer, ThinData};
 use gccjit::{CType, Context, OptimizationLevel};
 #[cfg(feature = "master")]
 use gccjit::{TargetInfo, Version};
@@ -87,7 +86,9 @@ use rustc_codegen_ssa::back::write::{
 };
 use rustc_codegen_ssa::base::codegen_crate;
 use rustc_codegen_ssa::target_features::cfg_target_feature;
-use rustc_codegen_ssa::traits::{CodegenBackend, ExtraBackendMethods, WriteBackendMethods};
+use rustc_codegen_ssa::traits::{
+    CodegenBackend, ExtraBackendMethods, ThinBufferMethods, WriteBackendMethods,
+};
 use rustc_codegen_ssa::{CodegenResults, CompiledModule, ModuleCodegen, TargetConfig};
 use rustc_data_structures::fx::FxIndexMap;
 use rustc_data_structures::profiling::SelfProfilerRef;
@@ -177,8 +178,6 @@ pub struct GccCodegenBackend {
     lto_supported: Arc,
 }
 
-static LTO_SUPPORTED: AtomicBool = AtomicBool::new(false);
-
 fn load_libgccjit_if_needed(libgccjit_target_lib_file: &Path) {
     if gccjit::is_loaded() {
         // Do not load a libgccjit second time.
@@ -251,7 +250,6 @@ impl CodegenBackend for GccCodegenBackend {
         #[cfg(feature = "master")]
         {
             let lto_supported = gccjit::is_lto_supported();
-            LTO_SUPPORTED.store(lto_supported, Ordering::SeqCst);
             self.lto_supported.store(lto_supported, Ordering::SeqCst);
 
             gccjit::set_global_personality_function_name(b"rust_eh_personality\0");
@@ -281,6 +279,10 @@ impl CodegenBackend for GccCodegenBackend {
         }
     }
 
+    fn thin_lto_supported(&self) -> bool {
+        false
+    }
+
     fn provide(&self, providers: &mut Providers) {
         providers.queries.global_backend_features =
             |tcx, ()| gcc_util::global_gcc_features(tcx.sess)
@@ -421,11 +423,19 @@ unsafe impl Send for SyncContext {}
 // FIXME(antoyo): that shouldn't be Sync. Parallel compilation is currently disabled with "CodegenBackend::supports_parallel()".
 unsafe impl Sync for SyncContext {}
 
+pub struct ThinBuffer;
+
+impl ThinBufferMethods for ThinBuffer {
+    fn data(&self) -> &[u8] {
+        &[]
+    }
+}
+
 impl WriteBackendMethods for GccCodegenBackend {
     type Module = GccContext;
     type TargetMachine = ();
     type ModuleBuffer = ModuleBuffer;
-    type ThinData = ThinData;
+    type ThinData = ();
     type ThinBuffer = ThinBuffer;
 
     fn run_and_optimize_fat_lto(
@@ -442,16 +452,16 @@ impl WriteBackendMethods for GccCodegenBackend {
     }
 
     fn run_thin_lto(
-        cgcx: &CodegenContext,
-        prof: &SelfProfilerRef,
-        dcx: DiagCtxtHandle<'_>,
+        _cgcx: &CodegenContext,
+        _prof: &SelfProfilerRef,
+        _dcx: DiagCtxtHandle<'_>,
         // FIXME(bjorn3): Limit LTO exports to these symbols
         _exported_symbols_for_lto: &[String],
-        each_linked_rlib_for_lto: &[PathBuf],
-        modules: Vec<(String, Self::ThinBuffer)>,
-        cached_modules: Vec<(SerializedModule, WorkProduct)>,
+        _each_linked_rlib_for_lto: &[PathBuf],
+        _modules: Vec<(String, Self::ThinBuffer)>,
+        _cached_modules: Vec<(SerializedModule, WorkProduct)>,
     ) -> (Vec>, Vec) {
-        back::lto::run_thin(cgcx, prof, dcx, each_linked_rlib_for_lto, modules, cached_modules)
+        unreachable!()
     }
 
     fn print_pass_timings(&self) {
@@ -473,13 +483,13 @@ impl WriteBackendMethods for GccCodegenBackend {
     }
 
     fn optimize_thin(
-        cgcx: &CodegenContext,
+        _cgcx: &CodegenContext,
         _prof: &SelfProfilerRef,
         _shared_emitter: &SharedEmitter,
         _tm_factory: TargetMachineFactoryFn,
-        thin: ThinModule,
+        _thin: ThinModule,
     ) -> ModuleCodegen {
-        back::lto::optimize_thin_module(thin, cgcx)
+        unreachable!()
     }
 
     fn codegen(
@@ -492,8 +502,8 @@ impl WriteBackendMethods for GccCodegenBackend {
         back::write::codegen(cgcx, prof, shared_emitter, module, config)
     }
 
-    fn prepare_thin(module: ModuleCodegen) -> (String, Self::ThinBuffer) {
-        back::lto::prepare_thin(module)
+    fn prepare_thin(_module: ModuleCodegen) -> (String, Self::ThinBuffer) {
+        unreachable!()
     }
 
     fn serialize_module(_module: ModuleCodegen) -> (String, Self::ModuleBuffer) {
diff --git a/compiler/rustc_codegen_ssa/src/traits/backend.rs b/compiler/rustc_codegen_ssa/src/traits/backend.rs
index 996e87b7f31e..7ebff77710fb 100644
--- a/compiler/rustc_codegen_ssa/src/traits/backend.rs
+++ b/compiler/rustc_codegen_ssa/src/traits/backend.rs
@@ -80,6 +80,11 @@ pub trait CodegenBackend {
         vec![]
     }
 
+    /// Is ThinLTO supported by this backend?
+    fn thin_lto_supported(&self) -> bool {
+        true
+    }
+
     /// Value printed by `--print=backend-has-zstd`.
     ///
     /// Used by compiletest to determine whether tests involving zstd compression
diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs
index 6cbc184e8f1b..34c064362168 100644
--- a/compiler/rustc_interface/src/interface.rs
+++ b/compiler/rustc_interface/src/interface.rs
@@ -463,6 +463,7 @@ pub fn run_compiler(config: Config, f: impl FnOnce(&Compiler) -> R + Se
 
             codegen_backend.init(&sess);
             sess.replaced_intrinsics = FxHashSet::from_iter(codegen_backend.replaced_intrinsics());
+            sess.thin_lto_supported = codegen_backend.thin_lto_supported();
 
             let cfg = parse_cfg(sess.dcx(), config.crate_cfg);
             let mut cfg = config::build_configuration(&sess, cfg);
diff --git a/compiler/rustc_macros/src/diagnostics/message.rs b/compiler/rustc_macros/src/diagnostics/message.rs
index 3276abfce413..dfc5c7e800c6 100644
--- a/compiler/rustc_macros/src/diagnostics/message.rs
+++ b/compiler/rustc_macros/src/diagnostics/message.rs
@@ -101,6 +101,7 @@ const ALLOWED_CAPITALIZED_WORDS: &[&str] = &[
     "NaNs",
     "OK",
     "Rust",
+    "ThinLTO",
     "Unicode",
     "VS",
     // tidy-alphabetical-end
diff --git a/compiler/rustc_session/src/errors.rs b/compiler/rustc_session/src/errors.rs
index 0c6a33f22808..04a32c20a791 100644
--- a/compiler/rustc_session/src/errors.rs
+++ b/compiler/rustc_session/src/errors.rs
@@ -537,3 +537,7 @@ pub(crate) struct UnexpectedBuiltinCfg {
     pub(crate) cfg_name: Symbol,
     pub(crate) controlled_by: &'static str,
 }
+
+#[derive(Diagnostic)]
+#[diag("ThinLTO is not supported by the codegen backend")]
+pub(crate) struct ThinLtoNotSupportedByBackend;
diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs
index ed37e9e960cd..bb22e4a8db04 100644
--- a/compiler/rustc_session/src/session.rs
+++ b/compiler/rustc_session/src/session.rs
@@ -158,6 +158,9 @@ pub struct Session {
     /// The names of intrinsics that the current codegen backend replaces
     /// with its own implementations.
     pub replaced_intrinsics: FxHashSet,
+
+    /// Does the codegen backend support ThinLTO?
+    pub thin_lto_supported: bool,
 }
 
 #[derive(Clone, Copy)]
@@ -606,10 +609,19 @@ impl Session {
             }
             config::LtoCli::Thin => {
                 // The user explicitly asked for ThinLTO
+                if !self.thin_lto_supported {
+                    // Backend doesn't support ThinLTO, disable LTO.
+                    self.dcx().emit_warn(errors::ThinLtoNotSupportedByBackend);
+                    return config::Lto::No;
+                }
                 return config::Lto::Thin;
             }
         }
 
+        if !self.thin_lto_supported {
+            return config::Lto::No;
+        }
+
         // Ok at this point the target doesn't require anything and the user
         // hasn't asked for anything. Our next decision is whether or not
         // we enable "auto" ThinLTO where we use multiple codegen units and
@@ -1088,6 +1100,7 @@ pub fn build_session(
         host_filesearch,
         invocation_temp,
         replaced_intrinsics: FxHashSet::default(), // filled by `run_compiler`
+        thin_lto_supported: true,                  // filled by `run_compiler`
     };
 
     validate_commandline_args_with_session_available(&sess);

From dab350a3ed7691201f6752c4375e8e6ab40b58b9 Mon Sep 17 00:00:00 2001
From: Jonathan Brouwer 
Date: Sun, 15 Feb 2026 10:32:50 +0100
Subject: [PATCH 201/265] Remove timing assertion from
 `oneshot::send_before_recv_timeout`

---
 library/std/tests/sync/oneshot.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/library/std/tests/sync/oneshot.rs b/library/std/tests/sync/oneshot.rs
index 8c47f35ebfea..8e63a26fa3ac 100644
--- a/library/std/tests/sync/oneshot.rs
+++ b/library/std/tests/sync/oneshot.rs
@@ -89,15 +89,15 @@ fn send_before_recv_timeout() {
 
     assert!(sender.send(22i128).is_ok());
 
-    let start = Instant::now();
-
     let timeout = Duration::from_secs(1);
     match receiver.recv_timeout(timeout) {
         Ok(22) => {}
         _ => panic!("expected Ok(22)"),
     }
 
-    assert!(start.elapsed() < timeout);
+    // FIXME(#152648): There previously was a timing assertion here.
+    // This was removed, because under load there's no guarantee that the main thread is
+    // scheduled and run before `timeout` expires
 }
 
 #[test]

From 7733f65ff9fbd5b033e5ad012250f0fc4bee44ad Mon Sep 17 00:00:00 2001
From: Albab-Hasan 
Date: Sun, 15 Feb 2026 17:37:51 +0600
Subject: [PATCH 202/265] fix: use `ExprIsRead::Yes` for rhs of ordinary
 assignments

the rhs of an ordinary assignment `x = *never_ptr` was inferred with
`ExprIsRead::No`, which prevented `NeverToAny` coercion for place
expressions of type `!`. this caused false type mismatches and missing
divergence detection. the destructuring assignment path and let binding
path both correctly use `ExprIsRead::Yes` for the rhs value, since the
value is always consumed (read). this makes the ordinary assignment path
consistent with both.
---
 .../crates/hir-ty/src/infer/expr.rs              |  2 +-
 .../crates/hir-ty/src/tests/never_type.rs        | 16 ++++++++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/infer/expr.rs b/src/tools/rust-analyzer/crates/hir-ty/src/infer/expr.rs
index 9f2d9d25b957..16e7d51e8734 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/infer/expr.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/infer/expr.rs
@@ -751,7 +751,7 @@ impl<'db> InferenceContext<'_, 'db> {
 
                 if let Some(lhs_ty) = lhs_ty {
                     self.write_pat_ty(target, lhs_ty);
-                    self.infer_expr_coerce(value, &Expectation::has_type(lhs_ty), ExprIsRead::No);
+                    self.infer_expr_coerce(value, &Expectation::has_type(lhs_ty), ExprIsRead::Yes);
                 } else {
                     let rhs_ty = self.infer_expr(value, &Expectation::none(), ExprIsRead::Yes);
                     let resolver_guard =
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/tests/never_type.rs b/src/tools/rust-analyzer/crates/hir-ty/src/tests/never_type.rs
index a89d97984dfe..e4e7b4cc3885 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/tests/never_type.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/tests/never_type.rs
@@ -786,6 +786,22 @@ fn coerce_ref_mut_binding() -> ! {
     )
 }
 
+#[test]
+fn assign_never_place_no_mismatch() {
+    check_no_mismatches(
+        r#"
+//- minicore: sized
+fn foo() {
+    unsafe {
+        let p: *mut ! = 0 as _;
+        let mut x: () = ();
+        x = *p;
+    }
+}
+"#,
+    );
+}
+
 #[test]
 fn never_place_isnt_diverging() {
     check_infer_with_mismatches(

From b022e16e2a7c3a3098d890b045a1a63077107b71 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mateusz=20Miku=C5=82a?= 
Date: Wed, 11 Feb 2026 21:30:33 +0100
Subject: [PATCH 203/265] Install LLVM DLL in the right place on Windows

Unlike other systems, Windows requires runtime libraries to be present
in `PATH` or right next to the binary.

So, we copy the library next to the binary as the easier solution.
---
 src/bootstrap/src/core/build_steps/dist.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs
index eee960027a9f..75deb695a482 100644
--- a/src/bootstrap/src/core/build_steps/dist.rs
+++ b/src/bootstrap/src/core/build_steps/dist.rs
@@ -2557,7 +2557,7 @@ pub fn maybe_install_llvm_target(builder: &Builder<'_>, target: TargetSelection,
     ),
 )]
 pub fn maybe_install_llvm_runtime(builder: &Builder<'_>, target: TargetSelection, sysroot: &Path) {
-    let dst_libdir = sysroot.join(builder.sysroot_libdir_relative(Compiler::new(1, target)));
+    let dst_libdir = sysroot.join(builder.libdir_relative(Compiler::new(1, target)));
     // We do not need to copy LLVM files into the sysroot if it is not
     // dynamically linked; it is already included into librustc_llvm
     // statically.

From 88f0ac34dce0e0d21da576aa111ce3b7d66bfafc Mon Sep 17 00:00:00 2001
From: lapla 
Date: Sat, 7 Feb 2026 18:51:44 +0900
Subject: [PATCH 204/265] Fix const normalization for generic const items with
 trait assoc consts

---
 .../src/traits/query/normalize.rs              | 10 +++++++---
 .../type-const-nested-assoc-const.rs           | 18 ++++++++++++++++++
 2 files changed, 25 insertions(+), 3 deletions(-)
 create mode 100644 tests/ui/generic-const-items/type-const-nested-assoc-const.rs

diff --git a/compiler/rustc_trait_selection/src/traits/query/normalize.rs b/compiler/rustc_trait_selection/src/traits/query/normalize.rs
index 02438b24ca7f..2f83ee046498 100644
--- a/compiler/rustc_trait_selection/src/traits/query/normalize.rs
+++ b/compiler/rustc_trait_selection/src/traits/query/normalize.rs
@@ -376,10 +376,14 @@ impl<'a, 'tcx> QueryNormalizer<'a, 'tcx> {
         // `tcx.normalize_canonicalized_projection` may normalize to a type that
         // still has unevaluated consts, so keep normalizing here if that's the case.
         // Similarly, `tcx.normalize_canonicalized_free_alias` will only unwrap one layer
-        // of type and we need to continue folding it to reveal the TAIT behind it.
+        // of type/const and we need to continue folding it to reveal the TAIT behind it
+        // or further normalize nested unevaluated consts.
         if res != term.to_term(tcx)
-            && (res.as_type().map_or(false, |t| t.has_type_flags(ty::TypeFlags::HAS_CT_PROJECTION))
-                || term.kind(tcx) == ty::AliasTermKind::FreeTy)
+            && (res.has_type_flags(ty::TypeFlags::HAS_CT_PROJECTION)
+                || matches!(
+                    term.kind(tcx),
+                    ty::AliasTermKind::FreeTy | ty::AliasTermKind::FreeConst
+                ))
         {
             res.try_fold_with(self)
         } else {
diff --git a/tests/ui/generic-const-items/type-const-nested-assoc-const.rs b/tests/ui/generic-const-items/type-const-nested-assoc-const.rs
new file mode 100644
index 000000000000..72a3098b76cf
--- /dev/null
+++ b/tests/ui/generic-const-items/type-const-nested-assoc-const.rs
@@ -0,0 +1,18 @@
+//@ check-pass
+
+#![feature(generic_const_items, min_generic_const_args)]
+#![allow(incomplete_features)]
+
+type const CT: usize = { ::N };
+
+trait Trait {
+    type const N: usize;
+}
+
+impl Trait for T {
+    type const N:usize = 0;
+}
+
+fn f(_x: [(); CT::<()>]) {}
+
+fn main() {}

From b55673bd76a1054c91988376bfd303c546b9b6d7 Mon Sep 17 00:00:00 2001
From: THARUN 
Date: Sun, 15 Feb 2026 19:02:44 +0530
Subject: [PATCH 205/265] Avoid ICE in From/TryFrom diagnostic under
 -Znext-solver

---
 .../traits/fulfillment_errors.rs              | 34 ++++++++++++-------
 tests/ui/traits/next-solver-ice.rs            |  9 +++++
 tests/ui/traits/next-solver-ice.stderr        | 21 ++++++++++++
 3 files changed, 51 insertions(+), 13 deletions(-)
 create mode 100644 tests/ui/traits/next-solver-ice.rs
 create mode 100644 tests/ui/traits/next-solver-ice.stderr

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 d9c6d339328a..d0dabd982476 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
@@ -282,23 +282,31 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
                         if self.tcx.is_diagnostic_item(sym::From, trait_def_id)
                             || self.tcx.is_diagnostic_item(sym::TryFrom, trait_def_id)
                         {
-                            let found_ty = leaf_trait_predicate.skip_binder().trait_ref.args.type_at(1);
-                            let ty = main_trait_predicate.skip_binder().self_ty();
-                            if let Some(cast_ty) = self.find_explicit_cast_type(
-                                obligation.param_env,
-                                found_ty,
-                                ty,
-                            ) {
-                                let found_ty_str = self.tcx.short_string(found_ty, &mut long_ty_file);
-                                let cast_ty_str = self.tcx.short_string(cast_ty, &mut long_ty_file);
-                                err.help(
-                                    format!(
+                            let trait_ref = leaf_trait_predicate.skip_binder().trait_ref;
+
+                            // Defensive: next-solver may produce fewer args than expected.
+                            if trait_ref.args.len() > 1 {
+                                let found_ty = trait_ref.args.type_at(1);
+                                let ty = main_trait_predicate.skip_binder().self_ty();
+
+                                if let Some(cast_ty) = self.find_explicit_cast_type(
+                                    obligation.param_env,
+                                    found_ty,
+                                    ty,
+                                ) {
+                                    let found_ty_str =
+                                        self.tcx.short_string(found_ty, &mut long_ty_file);
+                                    let cast_ty_str =
+                                        self.tcx.short_string(cast_ty, &mut long_ty_file);
+
+                                    err.help(format!(
                                         "consider casting the `{found_ty_str}` value to `{cast_ty_str}`",
-                                    ),
-                                );
+                                    ));
+                                }
                             }
                         }
 
+
                         *err.long_ty_path() = long_ty_file;
 
                         let mut suggested = false;
diff --git a/tests/ui/traits/next-solver-ice.rs b/tests/ui/traits/next-solver-ice.rs
new file mode 100644
index 000000000000..889d1094a103
--- /dev/null
+++ b/tests/ui/traits/next-solver-ice.rs
@@ -0,0 +1,9 @@
+//@compile-flags: -Znext-solver=globally
+//@check-fail
+
+fn check() {
+    ::Item>>::from;
+    //~^ ERROR the trait bound `f32: From<::Item>` is not satisfied
+}
+
+fn main() {}
diff --git a/tests/ui/traits/next-solver-ice.stderr b/tests/ui/traits/next-solver-ice.stderr
new file mode 100644
index 000000000000..d6b022d70175
--- /dev/null
+++ b/tests/ui/traits/next-solver-ice.stderr
@@ -0,0 +1,21 @@
+error[E0277]: the trait bound `f32: From<::Item>` is not satisfied
+  --> $DIR/next-solver-ice.rs:5:6
+   |
+LL |     ::Item>>::from;
+   |      ^^^ the nightly-only, unstable trait `ZeroablePrimitive` is not implemented for `f32`
+   |
+   = help: the following other types implement trait `ZeroablePrimitive`:
+             i128
+             i16
+             i32
+             i64
+             i8
+             isize
+             u128
+             u16
+           and 4 others
+   = note: required for `f32` to implement `From<::Item>`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0277`.

From 40a3ca1189940ad1805c8deb3ba60744fa16dc57 Mon Sep 17 00:00:00 2001
From: Embers-of-the-Fire 
Date: Sun, 15 Feb 2026 22:01:01 +0800
Subject: [PATCH 206/265] fix: remove unused source span

---
 src/librustdoc/html/render/mod.rs | 46 ++++---------------------------
 src/librustdoc/html/sources.rs    | 12 ++++++--
 2 files changed, 15 insertions(+), 43 deletions(-)

diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs
index 57428b6f481e..a3860e1ec227 100644
--- a/src/librustdoc/html/render/mod.rs
+++ b/src/librustdoc/html/render/mod.rs
@@ -2779,46 +2779,12 @@ fn render_call_locations(
         let needs_expansion = line_max - line_min > NUM_VISIBLE_LINES;
         let locations_encoded = serde_json::to_string(&line_ranges).unwrap();
 
-        let source_map = tcx.sess.source_map();
-        let files = source_map.files();
-        let local = tcx.sess.local_crate_source_file().unwrap();
-
-        let get_file_start_pos = || {
-            let crate_src = local.clone().into_local_path()?;
-            let abs_crate_src = crate_src.canonicalize().ok()?;
-            let crate_root = abs_crate_src.parent()?.parent()?;
-            let rel_path = path.strip_prefix(crate_root).ok()?;
-            files
-                .iter()
-                .find(|file| match &file.name {
-                    FileName::Real(real) => real.local_path().map_or(false, |p| p == rel_path),
-                    _ => false,
-                })
-                .map(|file| file.start_pos)
-        };
-
-        // Look for the example file in the source map if it exists, otherwise
-        // return a span to the local crate's source file
-        let Some(file_span) = get_file_start_pos()
-            .or_else(|| {
-                files
-                    .iter()
-                    .find(|file| match &file.name {
-                        FileName::Real(file_name) => file_name == &local,
-                        _ => false,
-                    })
-                    .map(|file| file.start_pos)
-            })
-            .map(|start_pos| {
-                rustc_span::Span::with_root_ctxt(
-                    start_pos + BytePos(byte_min),
-                    start_pos + BytePos(byte_max),
-                )
-            })
-        else {
-            // if the fallback span can't be built, don't render the code for this example
-            return false;
-        };
+        // For scraped examples, we don't need a real span from the SourceMap.
+        // The URL is already provided in ScrapedInfo, and sources::print_src
+        // will use that directly. We use DUMMY_SP as a placeholder.
+        // Note: DUMMY_SP is safe here because href_from_span won't be called
+        // for scraped examples.
+        let file_span = rustc_span::DUMMY_SP;
 
         let mut decoration_info = FxIndexMap::default();
         decoration_info.insert("highlight focus", vec![byte_ranges.remove(0)]);
diff --git a/src/librustdoc/html/sources.rs b/src/librustdoc/html/sources.rs
index 89fd78979839..dda9b7c55351 100644
--- a/src/librustdoc/html/sources.rs
+++ b/src/librustdoc/html/sources.rs
@@ -344,9 +344,15 @@ pub(crate) fn print_src(
         lines += line_info.start_line as usize;
     }
     let code = fmt::from_fn(move |fmt| {
-        let current_href = context
-            .href_from_span(clean::Span::new(file_span), false)
-            .expect("only local crates should have sources emitted");
+        // For scraped examples, use the URL from ScrapedInfo directly.
+        // For regular sources, derive it from the span.
+        let current_href = if let SourceContext::Embedded(info) = source_context {
+            info.url.to_string()
+        } else {
+            context
+                .href_from_span(clean::Span::new(file_span), false)
+                .expect("only local crates should have sources emitted")
+        };
         highlight::write_code(
             fmt,
             s,

From a8bbacd2702cfbc260b52f9c19fc5c01c510a7bb Mon Sep 17 00:00:00 2001
From: Embers-of-the-Fire 
Date: Sun, 15 Feb 2026 22:26:54 +0800
Subject: [PATCH 207/265] fix: remove unused import

---
 src/librustdoc/html/render/mod.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs
index a3860e1ec227..53df362a34f7 100644
--- a/src/librustdoc/html/render/mod.rs
+++ b/src/librustdoc/html/render/mod.rs
@@ -60,7 +60,7 @@ use rustc_hir::{ConstStability, Mutability, RustcVersion, StabilityLevel, Stable
 use rustc_middle::ty::print::PrintTraitRefExt;
 use rustc_middle::ty::{self, TyCtxt};
 use rustc_span::symbol::{Symbol, sym};
-use rustc_span::{BytePos, DUMMY_SP, FileName};
+use rustc_span::DUMMY_SP;
 use tracing::{debug, info};
 
 pub(crate) use self::context::*;

From d13828b2c7cedb6147999222118cd87bf4fe28cd Mon Sep 17 00:00:00 2001
From: Embers-of-the-Fire 
Date: Sun, 15 Feb 2026 22:34:53 +0800
Subject: [PATCH 208/265] fix: re-format the changes

---
 src/librustdoc/html/render/mod.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs
index 53df362a34f7..c0f0167aec79 100644
--- a/src/librustdoc/html/render/mod.rs
+++ b/src/librustdoc/html/render/mod.rs
@@ -59,8 +59,8 @@ use rustc_hir::def_id::{DefId, DefIdSet};
 use rustc_hir::{ConstStability, Mutability, RustcVersion, StabilityLevel, StableSince};
 use rustc_middle::ty::print::PrintTraitRefExt;
 use rustc_middle::ty::{self, TyCtxt};
-use rustc_span::symbol::{Symbol, sym};
 use rustc_span::DUMMY_SP;
+use rustc_span::symbol::{Symbol, sym};
 use tracing::{debug, info};
 
 pub(crate) use self::context::*;

From d12923346c44ea09fa2ace6467836e22c7534bfd Mon Sep 17 00:00:00 2001
From: Lieselotte <52315535+she3py@users.noreply.github.com>
Date: Sun, 15 Feb 2026 15:40:13 +0100
Subject: [PATCH 209/265] feat: show what lint was overruled

---
 compiler/rustc_lint/src/errors.rs                     |  7 ++++---
 compiler/rustc_lint/src/levels.rs                     |  4 +++-
 tests/ui/lint/lint-forbid-attr.rs                     |  5 +++--
 tests/ui/lint/lint-forbid-cmdline-1.rs                |  5 +++++
 ...id-cmdline.stderr => lint-forbid-cmdline-1.stderr} |  4 ++--
 tests/ui/lint/lint-forbid-cmdline-2.rs                |  8 ++++++++
 tests/ui/lint/lint-forbid-cmdline-2.stderr            | 11 +++++++++++
 tests/ui/lint/lint-forbid-cmdline.rs                  |  5 -----
 8 files changed, 36 insertions(+), 13 deletions(-)
 create mode 100644 tests/ui/lint/lint-forbid-cmdline-1.rs
 rename tests/ui/lint/{lint-forbid-cmdline.stderr => lint-forbid-cmdline-1.stderr} (70%)
 create mode 100644 tests/ui/lint/lint-forbid-cmdline-2.rs
 create mode 100644 tests/ui/lint/lint-forbid-cmdline-2.stderr
 delete mode 100644 tests/ui/lint/lint-forbid-cmdline.rs

diff --git a/compiler/rustc_lint/src/errors.rs b/compiler/rustc_lint/src/errors.rs
index 51b97bc67d2c..8fec30816bd1 100644
--- a/compiler/rustc_lint/src/errors.rs
+++ b/compiler/rustc_lint/src/errors.rs
@@ -20,7 +20,7 @@ pub(crate) struct OverruledAttribute<'a> {
 pub(crate) enum OverruledAttributeSub {
     DefaultSource { id: String },
     NodeSource { span: Span, reason: Option },
-    CommandLineSource,
+    CommandLineSource { id: Symbol },
 }
 
 impl Subdiagnostic for OverruledAttributeSub {
@@ -36,8 +36,9 @@ impl Subdiagnostic for OverruledAttributeSub {
                     diag.note(rationale.to_string());
                 }
             }
-            OverruledAttributeSub::CommandLineSource => {
-                diag.note(msg!("`forbid` lint level was set on command line"));
+            OverruledAttributeSub::CommandLineSource { id } => {
+                diag.note(msg!("`forbid` lint level was set on command line (`-F {$id}`)"));
+                diag.arg("id", id);
             }
         }
     }
diff --git a/compiler/rustc_lint/src/levels.rs b/compiler/rustc_lint/src/levels.rs
index 048118875712..a3376ad967e0 100644
--- a/compiler/rustc_lint/src/levels.rs
+++ b/compiler/rustc_lint/src/levels.rs
@@ -580,7 +580,9 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
                 LintLevelSource::Node { span, reason, .. } => {
                     OverruledAttributeSub::NodeSource { span, reason }
                 }
-                LintLevelSource::CommandLine(_, _) => OverruledAttributeSub::CommandLineSource,
+                LintLevelSource::CommandLine(name, _) => {
+                    OverruledAttributeSub::CommandLineSource { id: name }
+                }
             };
             if !fcw_warning {
                 self.sess.dcx().emit_err(OverruledAttribute {
diff --git a/tests/ui/lint/lint-forbid-attr.rs b/tests/ui/lint/lint-forbid-attr.rs
index 270a379c2f84..cbe7a02a0c17 100644
--- a/tests/ui/lint/lint-forbid-attr.rs
+++ b/tests/ui/lint/lint-forbid-attr.rs
@@ -1,6 +1,7 @@
-#![forbid(deprecated)]
+#![forbid(deprecated)] //~ NOTE `forbid` level set here
 
 #[allow(deprecated)]
-//~^ ERROR allow(deprecated) incompatible
+//~^ ERROR allow(deprecated) incompatible with previous forbid [E0453]
+//~^^ NOTE overruled by previous forbid
 fn main() {
 }
diff --git a/tests/ui/lint/lint-forbid-cmdline-1.rs b/tests/ui/lint/lint-forbid-cmdline-1.rs
new file mode 100644
index 000000000000..19a8f825f57d
--- /dev/null
+++ b/tests/ui/lint/lint-forbid-cmdline-1.rs
@@ -0,0 +1,5 @@
+//@ compile-flags: -F deprecated
+
+#[allow(deprecated)] //~ ERROR allow(deprecated) incompatible with previous forbid [E0453]
+fn main() {
+}
diff --git a/tests/ui/lint/lint-forbid-cmdline.stderr b/tests/ui/lint/lint-forbid-cmdline-1.stderr
similarity index 70%
rename from tests/ui/lint/lint-forbid-cmdline.stderr
rename to tests/ui/lint/lint-forbid-cmdline-1.stderr
index 3920a7429763..7f4893fabd97 100644
--- a/tests/ui/lint/lint-forbid-cmdline.stderr
+++ b/tests/ui/lint/lint-forbid-cmdline-1.stderr
@@ -1,10 +1,10 @@
 error[E0453]: allow(deprecated) incompatible with previous forbid
-  --> $DIR/lint-forbid-cmdline.rs:3:9
+  --> $DIR/lint-forbid-cmdline-1.rs:3:9
    |
 LL | #[allow(deprecated)]
    |         ^^^^^^^^^^ overruled by previous forbid
    |
-   = note: `forbid` lint level was set on command line
+   = note: `forbid` lint level was set on command line (`-F deprecated`)
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/lint/lint-forbid-cmdline-2.rs b/tests/ui/lint/lint-forbid-cmdline-2.rs
new file mode 100644
index 000000000000..3505c11f4201
--- /dev/null
+++ b/tests/ui/lint/lint-forbid-cmdline-2.rs
@@ -0,0 +1,8 @@
+//@ compile-flags: -F dead_code
+
+#[allow(unused)]
+//~^ ERROR allow(unused) incompatible with previous forbid [E0453]
+//~| NOTE overruled by previous forbid
+//~| NOTE `forbid` lint level was set on command line (`-F dead_code`)
+fn main() {
+}
diff --git a/tests/ui/lint/lint-forbid-cmdline-2.stderr b/tests/ui/lint/lint-forbid-cmdline-2.stderr
new file mode 100644
index 000000000000..18a60b2f8b7e
--- /dev/null
+++ b/tests/ui/lint/lint-forbid-cmdline-2.stderr
@@ -0,0 +1,11 @@
+error[E0453]: allow(unused) incompatible with previous forbid
+  --> $DIR/lint-forbid-cmdline-2.rs:3:9
+   |
+LL | #[allow(unused)]
+   |         ^^^^^^ overruled by previous forbid
+   |
+   = note: `forbid` lint level was set on command line (`-F dead_code`)
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0453`.
diff --git a/tests/ui/lint/lint-forbid-cmdline.rs b/tests/ui/lint/lint-forbid-cmdline.rs
deleted file mode 100644
index 8a4eb449d3c8..000000000000
--- a/tests/ui/lint/lint-forbid-cmdline.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-//@ compile-flags: -F deprecated
-
-#[allow(deprecated)] //~ ERROR allow(deprecated) incompatible
-fn main() {
-}

From bd523647a4b7e505a90a88deb43428e1992ae262 Mon Sep 17 00:00:00 2001
From: joboet 
Date: Sun, 15 Feb 2026 17:06:36 +0100
Subject: [PATCH 210/265] std: use libc version of `_NSGetArgc`/`_NSGetArgv`

---
 library/std/src/sys/args/unix.rs | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/library/std/src/sys/args/unix.rs b/library/std/src/sys/args/unix.rs
index 0dfbd5f03eba..7a592c2b079d 100644
--- a/library/std/src/sys/args/unix.rs
+++ b/library/std/src/sys/args/unix.rs
@@ -164,7 +164,7 @@ mod imp {
 // of this used `[[NSProcessInfo processInfo] arguments]`.
 #[cfg(target_vendor = "apple")]
 mod imp {
-    use crate::ffi::{c_char, c_int};
+    use crate::ffi::c_char;
 
     pub unsafe fn init(_argc: isize, _argv: *const *const u8) {
         // No need to initialize anything in here, `libdyld.dylib` has already
@@ -172,12 +172,6 @@ mod imp {
     }
 
     pub fn argc_argv() -> (isize, *const *const c_char) {
-        unsafe extern "C" {
-            // These functions are in crt_externs.h.
-            fn _NSGetArgc() -> *mut c_int;
-            fn _NSGetArgv() -> *mut *mut *mut c_char;
-        }
-
         // SAFETY: The returned pointer points to a static initialized early
         // in the program lifetime by `libdyld.dylib`, and as such is always
         // valid.
@@ -187,9 +181,9 @@ mod imp {
         // doesn't exist a lock that we can take. Instead, it is generally
         // expected that it's only modified in `main` / before other code
         // runs, so reading this here should be fine.
-        let argc = unsafe { _NSGetArgc().read() };
+        let argc = unsafe { libc::_NSGetArgc().read() };
         // SAFETY: Same as above.
-        let argv = unsafe { _NSGetArgv().read() };
+        let argv = unsafe { libc::_NSGetArgv().read() };
 
         // Cast from `*mut *mut c_char` to `*const *const c_char`
         (argc as isize, argv.cast())

From 702793191fd51ec36803f620553fee675ed93157 Mon Sep 17 00:00:00 2001
From: The Miri Cronjob Bot 
Date: Sun, 15 Feb 2026 05:27:15 +0000
Subject: [PATCH 211/265] fmt

---
 .../miri/tests/fail/match/all_variants_uninhabited.rs      | 2 +-
 .../miri/tests/fail/match/closures/uninhabited-variant2.rs | 3 ++-
 src/tools/miri/tests/fail/match/only_inhabited_variant.rs  | 7 ++++---
 src/tools/miri/tests/fail/match/single_variant.rs          | 7 ++++---
 src/tools/miri/tests/fail/match/single_variant_uninit.rs   | 3 ++-
 5 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/src/tools/miri/tests/fail/match/all_variants_uninhabited.rs b/src/tools/miri/tests/fail/match/all_variants_uninhabited.rs
index e7ca45579d84..b073d339f10c 100644
--- a/src/tools/miri/tests/fail/match/all_variants_uninhabited.rs
+++ b/src/tools/miri/tests/fail/match/all_variants_uninhabited.rs
@@ -5,7 +5,7 @@ enum Never {}
 fn main() {
     unsafe {
         match *std::ptr::null::>() {
-        //~^ ERROR: read discriminant of an uninhabited enum variant
+            //~^ ERROR: read discriminant of an uninhabited enum variant
             Ok(_) => {
                 lol();
             }
diff --git a/src/tools/miri/tests/fail/match/closures/uninhabited-variant2.rs b/src/tools/miri/tests/fail/match/closures/uninhabited-variant2.rs
index ed68e357fbd5..050e83884d1e 100644
--- a/src/tools/miri/tests/fail/match/closures/uninhabited-variant2.rs
+++ b/src/tools/miri/tests/fail/match/closures/uninhabited-variant2.rs
@@ -22,7 +22,8 @@ fn main() {
         // After rust-lang/rust#138961, constructing the closure performs a reborrow of r.
         // Nevertheless, the discriminant is only actually inspected when the closure
         // is called.
-        match r { //~ ERROR: read discriminant of an uninhabited enum variant
+        match r {
+            //~^ ERROR: read discriminant of an uninhabited enum variant
             E::V0 => {}
             E::V1(_) => {}
         }
diff --git a/src/tools/miri/tests/fail/match/only_inhabited_variant.rs b/src/tools/miri/tests/fail/match/only_inhabited_variant.rs
index 30a7350d2b66..2be5e8083aa7 100644
--- a/src/tools/miri/tests/fail/match/only_inhabited_variant.rs
+++ b/src/tools/miri/tests/fail/match/only_inhabited_variant.rs
@@ -4,8 +4,8 @@
 #[repr(C)]
 #[allow(dead_code)]
 enum E {
-  V0, // discriminant: 0
-  V1(!), // 1
+    V0,    // discriminant: 0
+    V1(!), // 1
 }
 
 fn main() {
@@ -14,7 +14,8 @@ fn main() {
     let val = 1u32;
     let ptr = (&raw const val).cast::();
     let r = unsafe { &*ptr };
-    match r { //~ ERROR: read discriminant of an uninhabited enum variant
+    match r {
+        //~^ ERROR: read discriminant of an uninhabited enum variant
         E::V0 => {}
         E::V1(_) => {}
     }
diff --git a/src/tools/miri/tests/fail/match/single_variant.rs b/src/tools/miri/tests/fail/match/single_variant.rs
index dcef6d461a2c..35bb63620ea2 100644
--- a/src/tools/miri/tests/fail/match/single_variant.rs
+++ b/src/tools/miri/tests/fail/match/single_variant.rs
@@ -20,12 +20,13 @@ fn main() {
         let x: &[u8; 2] = &[21, 37];
         let y: &Exhaustive = std::mem::transmute(x);
         match y {
-            Exhaustive::A(_) => {},
+            Exhaustive::A(_) => {}
         }
 
         let y: &NonExhaustive = std::mem::transmute(x);
-        match y { //~ ERROR: enum value has invalid tag
-            NonExhaustive::A(_) => {},
+        match y {
+            //~^ ERROR: enum value has invalid tag
+            NonExhaustive::A(_) => {}
         }
     }
 }
diff --git a/src/tools/miri/tests/fail/match/single_variant_uninit.rs b/src/tools/miri/tests/fail/match/single_variant_uninit.rs
index 51e8bc57c837..e04947f99628 100644
--- a/src/tools/miri/tests/fail/match/single_variant_uninit.rs
+++ b/src/tools/miri/tests/fail/match/single_variant_uninit.rs
@@ -28,7 +28,8 @@ fn main() {
             _ => {}
         }
 
-        match *nexh { //~ ERROR: memory is uninitialized
+        match *nexh {
+            //~^ ERROR: memory is uninitialized
             NonExhaustive::A(ref _val) => {}
             _ => {}
         }

From 2c1d605f21efee7ba9414e84a61498f34516dd5c Mon Sep 17 00:00:00 2001
From: xonx <119700621+xonx4l@users.noreply.github.com>
Date: Tue, 28 Oct 2025 11:49:20 +0000
Subject: [PATCH 212/265] unify and deduplicate floats

---
 .../0029-sysroot_tests-disable-f16-math.patch | 133 ++++
 library/coretests/tests/floats/mod.rs         | 746 ++++++++++++++----
 library/coretests/tests/lib.rs                |   2 +
 library/std/Cargo.toml                        |   4 -
 library/std/tests/floats/f128.rs              | 320 --------
 library/std/tests/floats/f16.rs               | 297 -------
 library/std/tests/floats/f32.rs               | 258 ------
 library/std/tests/floats/f64.rs               | 249 ------
 library/std/tests/floats/lib.rs               |  43 -
 9 files changed, 707 insertions(+), 1345 deletions(-)
 create mode 100644 compiler/rustc_codegen_cranelift/patches/0029-sysroot_tests-disable-f16-math.patch
 delete mode 100644 library/std/tests/floats/f128.rs
 delete mode 100644 library/std/tests/floats/f16.rs
 delete mode 100644 library/std/tests/floats/f32.rs
 delete mode 100644 library/std/tests/floats/f64.rs
 delete mode 100644 library/std/tests/floats/lib.rs

diff --git a/compiler/rustc_codegen_cranelift/patches/0029-sysroot_tests-disable-f16-math.patch b/compiler/rustc_codegen_cranelift/patches/0029-sysroot_tests-disable-f16-math.patch
new file mode 100644
index 000000000000..6a0244cfde3f
--- /dev/null
+++ b/compiler/rustc_codegen_cranelift/patches/0029-sysroot_tests-disable-f16-math.patch
@@ -0,0 +1,133 @@
+From 285d5716fcfa6d43a3516d899b73bc85da322c25 Mon Sep 17 00:00:00 2001
+From: xonx <119700621+xonx4l@users.noreply.github.com>
+Date: Sun, 15 Feb 2026 14:06:49 +0000
+Subject: [PATCH] Disable f16 math tests for cranelift
+
+---
+ coretests/tests/floats/mod.rs | 26 +++++++++++++-------------
+ 1 file changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/coretests/tests/floats/mod.rs b/coretests/tests/floats/mod.rs
+index c61961f8584..d7b4fa20322 100644
+--- a/coretests/tests/floats/mod.rs
++++ b/coretests/tests/floats/mod.rs
+@@ -1534,7 +1534,7 @@ fn s_nan() -> Float {
+     name: powf,
+     attrs: {
+         const: #[cfg(false)],
+-        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
++        f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
+         f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+     },
+     test {
+@@ -1557,7 +1557,7 @@ fn s_nan() -> Float {
+     name: exp,
+     attrs: {
+         const: #[cfg(false)],
+-        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
++        f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
+         f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+     },
+     test {
+@@ -1578,7 +1578,7 @@ fn s_nan() -> Float {
+     name: exp2,
+     attrs: {
+         const: #[cfg(false)],
+-        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
++        f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
+         f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+     },
+     test {
+@@ -1598,7 +1598,7 @@ fn s_nan() -> Float {
+     name: ln,
+     attrs: {
+         const: #[cfg(false)],
+-        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
++        f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
+         f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+     },
+     test {
+@@ -1620,7 +1620,7 @@ fn s_nan() -> Float {
+     name: log,
+     attrs: {
+         const: #[cfg(false)],
+-        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
++        f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
+         f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+     },
+     test {
+@@ -1645,7 +1645,7 @@ fn s_nan() -> Float {
+     name: log2,
+     attrs: {
+         const: #[cfg(false)],
+-        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
++        f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
+         f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+     },
+     test {
+@@ -1668,7 +1668,7 @@ fn s_nan() -> Float {
+     name: log10,
+     attrs: {
+         const: #[cfg(false)],
+-        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
++        f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
+         f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+     },
+     test {
+@@ -1692,7 +1692,7 @@ fn s_nan() -> Float {
+     name: asinh,
+     attrs: {
+         const: #[cfg(false)],
+-        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
++        f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
+         f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+     },
+     test {
+@@ -1725,7 +1725,7 @@ fn s_nan() -> Float {
+     name: acosh,
+     attrs: {
+         const: #[cfg(false)],
+-        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
++        f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
+         f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+     },
+     test {
+@@ -1753,7 +1753,7 @@ fn s_nan() -> Float {
+     name: atanh,
+     attrs: {
+         const: #[cfg(false)],
+-        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
++        f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
+         f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+     },
+     test {
+@@ -1779,7 +1779,7 @@ fn s_nan() -> Float {
+     name: gamma,
+     attrs: {
+         const: #[cfg(false)],
+-        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
++        f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
+         f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+     },
+     test {
+@@ -1814,7 +1814,7 @@ fn s_nan() -> Float {
+     name: ln_gamma,
+     attrs: {
+         const: #[cfg(false)],
+-        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
++        f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
+         f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+     },
+     test {
+@@ -2027,7 +2027,7 @@ fn s_nan() -> Float {
+     attrs: {
+         // FIXME(f16_f128): add math tests when available
+         const: #[cfg(false)],
+-        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
++        f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
+         f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+     },
+     test {
+-- 
+2.50.1
+
diff --git a/library/coretests/tests/floats/mod.rs b/library/coretests/tests/floats/mod.rs
index 06fc3c96eafc..c61961f8584e 100644
--- a/library/coretests/tests/floats/mod.rs
+++ b/library/coretests/tests/floats/mod.rs
@@ -2,19 +2,35 @@ use std::num::FpCategory as Fp;
 use std::ops::{Add, Div, Mul, Rem, Sub};
 
 trait TestableFloat: Sized {
+    const BITS: u32;
     /// Unsigned int with the same size, for converting to/from bits.
     type Int;
     /// Set the default tolerance for float comparison based on the type.
     const APPROX: Self;
     /// Allow looser tolerance for f32 on miri
     const POWI_APPROX: Self = Self::APPROX;
+    /// Tolerance for `powf` tests; some types need looser bounds
+    const POWF_APPROX: Self = Self::APPROX;
     /// Allow looser tolerance for f16
     const _180_TO_RADIANS_APPROX: Self = Self::APPROX;
     /// Allow for looser tolerance for f16
     const PI_TO_DEGREES_APPROX: Self = Self::APPROX;
+    /// Tolerance for math tests
+    const EXP_APPROX: Self = Self::APPROX;
+    const LN_APPROX: Self = Self::APPROX;
+    const LOG_APPROX: Self = Self::APPROX;
+    const LOG2_APPROX: Self = Self::APPROX;
+    const LOG10_APPROX: Self = Self::APPROX;
+    const ASINH_APPROX: Self = Self::APPROX;
+    const ACOSH_APPROX: Self = Self::APPROX;
+    const ATANH_APPROX: Self = Self::APPROX;
+    const GAMMA_APPROX: Self = Self::APPROX;
+    const GAMMA_APPROX_LOOSE: Self = Self::APPROX;
+    const LNGAMMA_APPROX: Self = Self::APPROX;
+    const LNGAMMA_APPROX_LOOSE: Self = Self::APPROX;
     const ZERO: Self;
     const ONE: Self;
-    const PI: Self;
+
     const MIN_POSITIVE_NORMAL: Self;
     const MAX_SUBNORMAL: Self;
     /// Smallest number
@@ -43,13 +59,26 @@ trait TestableFloat: Sized {
 }
 
 impl TestableFloat for f16 {
+    const BITS: u32 = 16;
     type Int = u16;
     const APPROX: Self = 1e-3;
+    const POWF_APPROX: Self = 5e-1;
     const _180_TO_RADIANS_APPROX: Self = 1e-2;
     const PI_TO_DEGREES_APPROX: Self = 0.125;
+    const EXP_APPROX: Self = 1e-2;
+    const LN_APPROX: Self = 1e-2;
+    const LOG_APPROX: Self = 1e-2;
+    const LOG2_APPROX: Self = 1e-2;
+    const LOG10_APPROX: Self = 1e-2;
+    const ASINH_APPROX: Self = 1e-2;
+    const ACOSH_APPROX: Self = 1e-2;
+    const ATANH_APPROX: Self = 1e-2;
+    const GAMMA_APPROX: Self = 1e-2;
+    const GAMMA_APPROX_LOOSE: Self = 1e-1;
+    const LNGAMMA_APPROX: Self = 1e-2;
+    const LNGAMMA_APPROX_LOOSE: Self = 1e-1;
     const ZERO: Self = 0.0;
     const ONE: Self = 1.0;
-    const PI: Self = std::f16::consts::PI;
     const MIN_POSITIVE_NORMAL: Self = Self::MIN_POSITIVE;
     const MAX_SUBNORMAL: Self = Self::MIN_POSITIVE.next_down();
     const TINY: Self = Self::from_bits(0x1);
@@ -70,15 +99,28 @@ impl TestableFloat for f16 {
 }
 
 impl TestableFloat for f32 {
+    const BITS: u32 = 32;
     type Int = u32;
     const APPROX: Self = 1e-6;
     /// Miri adds some extra errors to float functions; make sure the tests still pass.
     /// These values are purely used as a canary to test against and are thus not a stable guarantee Rust provides.
     /// They serve as a way to get an idea of the real precision of floating point operations on different platforms.
     const POWI_APPROX: Self = if cfg!(miri) { 1e-4 } else { Self::APPROX };
+    const POWF_APPROX: Self = if cfg!(miri) { 1e-3 } else { 1e-4 };
+    const EXP_APPROX: Self = if cfg!(miri) { 1e-3 } else { Self::APPROX };
+    const LN_APPROX: Self = if cfg!(miri) { 1e-3 } else { Self::APPROX };
+    const LOG_APPROX: Self = if cfg!(miri) { 1e-3 } else { Self::APPROX };
+    const LOG2_APPROX: Self = if cfg!(miri) { 1e-3 } else { Self::APPROX };
+    const LOG10_APPROX: Self = if cfg!(miri) { 1e-3 } else { Self::APPROX };
+    const ASINH_APPROX: Self = if cfg!(miri) { 1e-3 } else { Self::APPROX };
+    const ACOSH_APPROX: Self = if cfg!(miri) { 1e-3 } else { Self::APPROX };
+    const ATANH_APPROX: Self = if cfg!(miri) { 1e-3 } else { Self::APPROX };
+    const GAMMA_APPROX: Self = if cfg!(miri) { 1e-3 } else { Self::APPROX };
+    const GAMMA_APPROX_LOOSE: Self = if cfg!(miri) { 1e-2 } else { 1e-4 };
+    const LNGAMMA_APPROX: Self = if cfg!(miri) { 1e-3 } else { Self::APPROX };
+    const LNGAMMA_APPROX_LOOSE: Self = if cfg!(miri) { 1e-2 } else { 1e-4 };
     const ZERO: Self = 0.0;
     const ONE: Self = 1.0;
-    const PI: Self = std::f32::consts::PI;
     const MIN_POSITIVE_NORMAL: Self = Self::MIN_POSITIVE;
     const MAX_SUBNORMAL: Self = Self::MIN_POSITIVE.next_down();
     const TINY: Self = Self::from_bits(0x1);
@@ -99,11 +141,13 @@ impl TestableFloat for f32 {
 }
 
 impl TestableFloat for f64 {
+    const BITS: u32 = 64;
     type Int = u64;
     const APPROX: Self = 1e-6;
+    const GAMMA_APPROX_LOOSE: Self = 1e-4;
+    const LNGAMMA_APPROX_LOOSE: Self = 1e-4;
     const ZERO: Self = 0.0;
     const ONE: Self = 1.0;
-    const PI: Self = std::f64::consts::PI;
     const MIN_POSITIVE_NORMAL: Self = Self::MIN_POSITIVE;
     const MAX_SUBNORMAL: Self = Self::MIN_POSITIVE.next_down();
     const TINY: Self = Self::from_bits(0x1);
@@ -124,11 +168,23 @@ impl TestableFloat for f64 {
 }
 
 impl TestableFloat for f128 {
+    const BITS: u32 = 128;
     type Int = u128;
     const APPROX: Self = 1e-9;
+    const EXP_APPROX: Self = 1e-12;
+    const LN_APPROX: Self = 1e-12;
+    const LOG_APPROX: Self = 1e-12;
+    const LOG2_APPROX: Self = 1e-12;
+    const LOG10_APPROX: Self = 1e-12;
+    const ASINH_APPROX: Self = 1e-10;
+    const ACOSH_APPROX: Self = 1e-10;
+    const ATANH_APPROX: Self = 1e-10;
+    const GAMMA_APPROX: Self = 1e-12;
+    const GAMMA_APPROX_LOOSE: Self = 1e-10;
+    const LNGAMMA_APPROX: Self = 1e-12;
+    const LNGAMMA_APPROX_LOOSE: Self = 1e-10;
     const ZERO: Self = 0.0;
     const ONE: Self = 1.0;
-    const PI: Self = std::f128::consts::PI;
     const MIN_POSITIVE_NORMAL: Self = Self::MIN_POSITIVE;
     const MAX_SUBNORMAL: Self = Self::MIN_POSITIVE.next_down();
     const TINY: Self = Self::from_bits(0x1);
@@ -287,6 +343,8 @@ macro_rules! float_test {
             #[test]
             $( $( #[$f16_meta] )+ )?
             fn test_f16() {
+                #[allow(unused_imports)]
+                use core::f16::consts;
                 type $fty = f16;
                 #[allow(unused)]
                 const fn flt (x: $fty) -> $fty { x }
@@ -296,6 +354,8 @@ macro_rules! float_test {
             #[test]
             $( $( #[$f32_meta] )+ )?
             fn test_f32() {
+                #[allow(unused_imports)]
+                use core::f32::consts;
                 type $fty = f32;
                 #[allow(unused)]
                 const fn flt (x: $fty) -> $fty { x }
@@ -305,6 +365,8 @@ macro_rules! float_test {
             #[test]
             $( $( #[$f64_meta] )+ )?
             fn test_f64() {
+                #[allow(unused_imports)]
+                use core::f64::consts;
                 type $fty = f64;
                 #[allow(unused)]
                 const fn flt (x: $fty) -> $fty { x }
@@ -314,6 +376,8 @@ macro_rules! float_test {
             #[test]
             $( $( #[$f128_meta] )+ )?
             fn test_f128() {
+                #[allow(unused_imports)]
+                use core::f128::consts;
                 type $fty = f128;
                 #[allow(unused)]
                 const fn flt (x: $fty) -> $fty { x }
@@ -338,6 +402,8 @@ macro_rules! float_test {
                 #[test]
                 $( $( #[$f16_const_meta] )+ )?
                 fn test_f16() {
+                    #[allow(unused_imports)]
+                    use core::f16::consts;
                     type $fty = f16;
                     #[allow(unused)]
                     const fn flt (x: $fty) -> $fty { x }
@@ -347,6 +413,8 @@ macro_rules! float_test {
                 #[test]
                 $( $( #[$f32_const_meta] )+ )?
                 fn test_f32() {
+                    #[allow(unused_imports)]
+                    use core::f32::consts;
                     type $fty = f32;
                     #[allow(unused)]
                     const fn flt (x: $fty) -> $fty { x }
@@ -356,6 +424,8 @@ macro_rules! float_test {
                 #[test]
                 $( $( #[$f64_const_meta] )+ )?
                 fn test_f64() {
+                    #[allow(unused_imports)]
+                    use core::f64::consts;
                     type $fty = f64;
                     #[allow(unused)]
                     const fn flt (x: $fty) -> $fty { x }
@@ -365,6 +435,8 @@ macro_rules! float_test {
                 #[test]
                 $( $( #[$f128_const_meta] )+ )?
                 fn test_f128() {
+                    #[allow(unused_imports)]
+                    use core::f128::consts;
                     type $fty = f128;
                     #[allow(unused)]
                     const fn flt (x: $fty) -> $fty { x }
@@ -631,25 +703,25 @@ float_test! {
         f128: #[cfg(any(miri, target_has_reliable_f128_math))],
     },
     test {
-        assert_biteq!((0.0 as Float).min(0.0), 0.0);
-        assert_biteq!((-0.0 as Float).min(-0.0), -0.0);
-        assert_biteq!((9.0 as Float).min(9.0), 9.0);
-        assert_biteq!((-9.0 as Float).min(0.0), -9.0);
-        assert_biteq!((0.0 as Float).min(9.0), 0.0);
-        assert_biteq!((-0.0 as Float).min(9.0), -0.0);
-        assert_biteq!((-0.0 as Float).min(-9.0), -9.0);
+        assert_biteq!(flt(0.0).min(0.0), 0.0);
+        assert_biteq!(flt(-0.0).min(-0.0), -0.0);
+        assert_biteq!(flt(9.0).min(9.0), 9.0);
+        assert_biteq!(flt(-9.0).min(0.0), -9.0);
+        assert_biteq!(flt(0.0).min(9.0), 0.0);
+        assert_biteq!(flt(-0.0).min(9.0), -0.0);
+        assert_biteq!(flt(-0.0).min(-9.0), -9.0);
         assert_biteq!(Float::INFINITY.min(9.0), 9.0);
-        assert_biteq!((9.0 as Float).min(Float::INFINITY), 9.0);
+        assert_biteq!(flt(9.0).min(Float::INFINITY), 9.0);
         assert_biteq!(Float::INFINITY.min(-9.0), -9.0);
-        assert_biteq!((-9.0 as Float).min(Float::INFINITY), -9.0);
+        assert_biteq!(flt(-9.0).min(Float::INFINITY), -9.0);
         assert_biteq!(Float::NEG_INFINITY.min(9.0), Float::NEG_INFINITY);
-        assert_biteq!((9.0 as Float).min(Float::NEG_INFINITY), Float::NEG_INFINITY);
+        assert_biteq!(flt(9.0).min(Float::NEG_INFINITY), Float::NEG_INFINITY);
         assert_biteq!(Float::NEG_INFINITY.min(-9.0), Float::NEG_INFINITY);
-        assert_biteq!((-9.0 as Float).min(Float::NEG_INFINITY), Float::NEG_INFINITY);
+        assert_biteq!(flt(-9.0).min(Float::NEG_INFINITY), Float::NEG_INFINITY);
         assert_biteq!(Float::NAN.min(9.0), 9.0);
         assert_biteq!(Float::NAN.min(-9.0), -9.0);
-        assert_biteq!((9.0 as Float).min(Float::NAN), 9.0);
-        assert_biteq!((-9.0 as Float).min(Float::NAN), -9.0);
+        assert_biteq!(flt(9.0).min(Float::NAN), 9.0);
+        assert_biteq!(flt(-9.0).min(Float::NAN), -9.0);
         assert!(Float::NAN.min(Float::NAN).is_nan());
     }
 }
@@ -661,26 +733,26 @@ float_test! {
         f128: #[cfg(any(miri, target_has_reliable_f128_math))],
     },
     test {
-        assert_biteq!((0.0 as Float).max(0.0), 0.0);
-        assert_biteq!((-0.0 as Float).max(-0.0), -0.0);
-        assert_biteq!((9.0 as Float).max(9.0), 9.0);
-        assert_biteq!((-9.0 as Float).max(0.0), 0.0);
-        assert_biteq!((-9.0 as Float).max(-0.0), -0.0);
-        assert_biteq!((0.0 as Float).max(9.0), 9.0);
-        assert_biteq!((0.0 as Float).max(-9.0), 0.0);
-        assert_biteq!((-0.0 as Float).max(-9.0), -0.0);
+        assert_biteq!(flt(0.0).max(0.0), 0.0);
+        assert_biteq!(flt(-0.0).max(-0.0), -0.0);
+        assert_biteq!(flt(9.0).max(9.0), 9.0);
+        assert_biteq!(flt(-9.0).max(0.0), 0.0);
+        assert_biteq!(flt(-9.0).max(-0.0), -0.0);
+        assert_biteq!(flt(0.0).max(9.0), 9.0);
+        assert_biteq!(flt(0.0).max(-9.0), 0.0);
+        assert_biteq!(flt(-0.0).max(-9.0), -0.0);
         assert_biteq!(Float::INFINITY.max(9.0), Float::INFINITY);
-        assert_biteq!((9.0 as Float).max(Float::INFINITY), Float::INFINITY);
+        assert_biteq!(flt(9.0).max(Float::INFINITY), Float::INFINITY);
         assert_biteq!(Float::INFINITY.max(-9.0), Float::INFINITY);
-        assert_biteq!((-9.0 as Float).max(Float::INFINITY), Float::INFINITY);
+        assert_biteq!(flt(-9.0).max(Float::INFINITY), Float::INFINITY);
         assert_biteq!(Float::NEG_INFINITY.max(9.0), 9.0);
-        assert_biteq!((9.0 as Float).max(Float::NEG_INFINITY), 9.0);
+        assert_biteq!(flt(9.0).max(Float::NEG_INFINITY), 9.0);
         assert_biteq!(Float::NEG_INFINITY.max(-9.0), -9.0);
-        assert_biteq!((-9.0 as Float).max(Float::NEG_INFINITY), -9.0);
+        assert_biteq!(flt(-9.0).max(Float::NEG_INFINITY), -9.0);
         assert_biteq!(Float::NAN.max(9.0), 9.0);
         assert_biteq!(Float::NAN.max(-9.0), -9.0);
-        assert_biteq!((9.0 as Float).max(Float::NAN), 9.0);
-        assert_biteq!((-9.0 as Float).max(Float::NAN), -9.0);
+        assert_biteq!(flt(9.0).max(Float::NAN), 9.0);
+        assert_biteq!(flt(-9.0).max(Float::NAN), -9.0);
         assert!(Float::NAN.max(Float::NAN).is_nan());
     }
 }
@@ -692,26 +764,26 @@ float_test! {
         f128: #[cfg(any(miri, target_has_reliable_f128_math))],
     },
     test {
-        assert_biteq!((0.0 as Float).minimum(0.0), 0.0);
-        assert_biteq!((-0.0 as Float).minimum(0.0), -0.0);
-        assert_biteq!((-0.0 as Float).minimum(-0.0), -0.0);
-        assert_biteq!((9.0 as Float).minimum(9.0), 9.0);
-        assert_biteq!((-9.0 as Float).minimum(0.0), -9.0);
-        assert_biteq!((0.0 as Float).minimum(9.0), 0.0);
-        assert_biteq!((-0.0 as Float).minimum(9.0), -0.0);
-        assert_biteq!((-0.0 as Float).minimum(-9.0), -9.0);
+        assert_biteq!(flt(0.0).minimum(0.0), 0.0);
+        assert_biteq!(flt(-0.0).minimum(0.0), -0.0);
+        assert_biteq!(flt(-0.0).minimum(-0.0), -0.0);
+        assert_biteq!(flt(9.0).minimum(9.0), 9.0);
+        assert_biteq!(flt(-9.0).minimum(0.0), -9.0);
+        assert_biteq!(flt(0.0).minimum(9.0), 0.0);
+        assert_biteq!(flt(-0.0).minimum(9.0), -0.0);
+        assert_biteq!(flt(-0.0).minimum(-9.0), -9.0);
         assert_biteq!(Float::INFINITY.minimum(9.0), 9.0);
-        assert_biteq!((9.0 as Float).minimum(Float::INFINITY), 9.0);
+        assert_biteq!(flt(9.0).minimum(Float::INFINITY), 9.0);
         assert_biteq!(Float::INFINITY.minimum(-9.0), -9.0);
-        assert_biteq!((-9.0 as Float).minimum(Float::INFINITY), -9.0);
+        assert_biteq!(flt(-9.0).minimum(Float::INFINITY), -9.0);
         assert_biteq!(Float::NEG_INFINITY.minimum(9.0), Float::NEG_INFINITY);
-        assert_biteq!((9.0 as Float).minimum(Float::NEG_INFINITY), Float::NEG_INFINITY);
+        assert_biteq!(flt(9.0).minimum(Float::NEG_INFINITY), Float::NEG_INFINITY);
         assert_biteq!(Float::NEG_INFINITY.minimum(-9.0), Float::NEG_INFINITY);
-        assert_biteq!((-9.0 as Float).minimum(Float::NEG_INFINITY), Float::NEG_INFINITY);
+        assert_biteq!(flt(-9.0).minimum(Float::NEG_INFINITY), Float::NEG_INFINITY);
         assert!(Float::NAN.minimum(9.0).is_nan());
         assert!(Float::NAN.minimum(-9.0).is_nan());
-        assert!((9.0 as Float).minimum(Float::NAN).is_nan());
-        assert!((-9.0 as Float).minimum(Float::NAN).is_nan());
+        assert!(flt(9.0).minimum(Float::NAN).is_nan());
+        assert!(flt(-9.0).minimum(Float::NAN).is_nan());
         assert!(Float::NAN.minimum(Float::NAN).is_nan());
     }
 }
@@ -723,27 +795,27 @@ float_test! {
         f128: #[cfg(any(miri, target_has_reliable_f128_math))],
     },
     test {
-        assert_biteq!((0.0 as Float).maximum(0.0), 0.0);
-        assert_biteq!((-0.0 as Float).maximum(0.0), 0.0);
-        assert_biteq!((-0.0 as Float).maximum(-0.0), -0.0);
-        assert_biteq!((9.0 as Float).maximum(9.0), 9.0);
-        assert_biteq!((-9.0 as Float).maximum(0.0), 0.0);
-        assert_biteq!((-9.0 as Float).maximum(-0.0), -0.0);
-        assert_biteq!((0.0 as Float).maximum(9.0), 9.0);
-        assert_biteq!((0.0 as Float).maximum(-9.0), 0.0);
-        assert_biteq!((-0.0 as Float).maximum(-9.0), -0.0);
+        assert_biteq!(flt(0.0).maximum(0.0), 0.0);
+        assert_biteq!(flt(-0.0).maximum(0.0), 0.0);
+        assert_biteq!(flt(-0.0).maximum(-0.0), -0.0);
+        assert_biteq!(flt(9.0).maximum(9.0), 9.0);
+        assert_biteq!(flt(-9.0).maximum(0.0), 0.0);
+        assert_biteq!(flt(-9.0).maximum(-0.0), -0.0);
+        assert_biteq!(flt(0.0).maximum(9.0), 9.0);
+        assert_biteq!(flt(0.0).maximum(-9.0), 0.0);
+        assert_biteq!(flt(-0.0).maximum(-9.0), -0.0);
         assert_biteq!(Float::INFINITY.maximum(9.0), Float::INFINITY);
-        assert_biteq!((9.0 as Float).maximum(Float::INFINITY), Float::INFINITY);
+        assert_biteq!(flt(9.0).maximum(Float::INFINITY), Float::INFINITY);
         assert_biteq!(Float::INFINITY.maximum(-9.0), Float::INFINITY);
-        assert_biteq!((-9.0 as Float).maximum(Float::INFINITY), Float::INFINITY);
+        assert_biteq!(flt(-9.0).maximum(Float::INFINITY), Float::INFINITY);
         assert_biteq!(Float::NEG_INFINITY.maximum(9.0), 9.0);
-        assert_biteq!((9.0 as Float).maximum(Float::NEG_INFINITY), 9.0);
+        assert_biteq!(flt(9.0).maximum(Float::NEG_INFINITY), 9.0);
         assert_biteq!(Float::NEG_INFINITY.maximum(-9.0), -9.0);
-        assert_biteq!((-9.0 as Float).maximum(Float::NEG_INFINITY), -9.0);
+        assert_biteq!(flt(-9.0).maximum(Float::NEG_INFINITY), -9.0);
         assert!(Float::NAN.maximum(9.0).is_nan());
         assert!(Float::NAN.maximum(-9.0).is_nan());
-        assert!((9.0 as Float).maximum(Float::NAN).is_nan());
-        assert!((-9.0 as Float).maximum(Float::NAN).is_nan());
+        assert!(flt(9.0).maximum(Float::NAN).is_nan());
+        assert!(flt(-9.0).maximum(Float::NAN).is_nan());
         assert!(Float::NAN.maximum(Float::NAN).is_nan());
     }
 }
@@ -755,15 +827,15 @@ float_test! {
         f128: #[cfg(any(miri, target_has_reliable_f128_math))],
     },
     test {
-        assert_biteq!((0.5 as Float).midpoint(0.5), 0.5);
-        assert_biteq!((0.5 as Float).midpoint(2.5), 1.5);
-        assert_biteq!((3.0 as Float).midpoint(4.0), 3.5);
-        assert_biteq!((-3.0 as Float).midpoint(4.0), 0.5);
-        assert_biteq!((3.0 as Float).midpoint(-4.0), -0.5);
-        assert_biteq!((-3.0 as Float).midpoint(-4.0), -3.5);
-        assert_biteq!((0.0 as Float).midpoint(0.0), 0.0);
-        assert_biteq!((-0.0 as Float).midpoint(-0.0), -0.0);
-        assert_biteq!((-5.0 as Float).midpoint(5.0), 0.0);
+        assert_biteq!(flt(0.5).midpoint(0.5), 0.5);
+        assert_biteq!(flt(0.5).midpoint(2.5), 1.5);
+        assert_biteq!(flt(3.0).midpoint(4.0), 3.5);
+        assert_biteq!(flt(-3.0).midpoint(4.0), 0.5);
+        assert_biteq!(flt(3.0).midpoint(-4.0), -0.5);
+        assert_biteq!(flt(-3.0).midpoint(-4.0), -3.5);
+        assert_biteq!(flt(0.0).midpoint(0.0), 0.0);
+        assert_biteq!(flt(-0.0).midpoint(-0.0), -0.0);
+        assert_biteq!(flt(-5.0).midpoint(5.0), 0.0);
         assert_biteq!(Float::MAX.midpoint(Float::MIN), 0.0);
         assert_biteq!(Float::MIN.midpoint(Float::MAX), 0.0);
         assert_biteq!(Float::MAX.midpoint(Float::MIN_POSITIVE), Float::MAX / 2.);
@@ -793,7 +865,7 @@ float_test! {
         assert!(Float::NEG_INFINITY.midpoint(Float::INFINITY).is_nan());
         assert!(Float::INFINITY.midpoint(Float::NEG_INFINITY).is_nan());
         assert!(Float::NAN.midpoint(1.0).is_nan());
-        assert!((1.0 as Float).midpoint(Float::NAN).is_nan());
+        assert!(flt(1.0).midpoint(Float::NAN).is_nan());
         assert!(Float::NAN.midpoint(Float::NAN).is_nan());
     }
 }
@@ -815,10 +887,10 @@ float_test! {
         // be safely doubled, while j is significantly smaller.
         for i in Float::MAX_EXP.saturating_sub(64)..Float::MAX_EXP {
             for j in 0..64u8 {
-                let large = (2.0 as Float).powi(i);
+                let large = flt(2.0).powi(i);
                 // a much smaller number, such that there is no chance of overflow to test
                 // potential double rounding in midpoint's implementation.
-                let small = (2.0 as Float).powi(Float::MAX_EXP - 1)
+                let small = flt(2.0).powi(Float::MAX_EXP - 1)
                     * Float::EPSILON
                     * Float::from(j);
 
@@ -856,8 +928,8 @@ float_test! {
         f128: #[cfg(any(miri, target_has_reliable_f128_math))],
     },
     test {
-        assert_biteq!((1.0 as Float).copysign(-2.0), -1.0);
-        assert_biteq!((-1.0 as Float).copysign(2.0), 1.0);
+        assert_biteq!(flt(1.0).copysign(-2.0), -1.0);
+        assert_biteq!(flt(-1.0).copysign(2.0), 1.0);
         assert_biteq!(Float::INFINITY.copysign(-0.0), Float::NEG_INFINITY);
         assert_biteq!(Float::NEG_INFINITY.copysign(0.0), Float::INFINITY);
     }
@@ -871,9 +943,9 @@ float_test! {
         f128: #[cfg(any(miri, target_has_reliable_f128_math))],
     },
     test {
-        assert!(Float::INFINITY.rem_euclid(42.0 as Float).is_nan());
-        assert_biteq!((42.0 as Float).rem_euclid(Float::INFINITY), 42.0 as Float);
-        assert!((42.0 as Float).rem_euclid(Float::NAN).is_nan());
+        assert!(Float::INFINITY.rem_euclid(42.0).is_nan());
+        assert_biteq!(flt(42.0).rem_euclid(Float::INFINITY), 42.0);
+        assert!(flt(42.0).rem_euclid(Float::NAN).is_nan());
         assert!(Float::INFINITY.rem_euclid(Float::INFINITY).is_nan());
         assert!(Float::INFINITY.rem_euclid(Float::NAN).is_nan());
         assert!(Float::NAN.rem_euclid(Float::INFINITY).is_nan());
@@ -888,8 +960,8 @@ float_test! {
         f128: #[cfg(any(miri, target_has_reliable_f128_math))],
     },
     test {
-        assert_biteq!((42.0 as Float).div_euclid(Float::INFINITY), 0.0);
-        assert!((42.0 as Float).div_euclid(Float::NAN).is_nan());
+        assert_biteq!(flt(42.0).div_euclid(Float::INFINITY), 0.0);
+        assert!(flt(42.0).div_euclid(Float::NAN).is_nan());
         assert!(Float::INFINITY.div_euclid(Float::INFINITY).is_nan());
         assert!(Float::INFINITY.div_euclid(Float::NAN).is_nan());
         assert!(Float::NAN.div_euclid(Float::INFINITY).is_nan());
@@ -903,18 +975,18 @@ float_test! {
         f128: #[cfg(any(miri, target_has_reliable_f128_math))],
     },
     test {
-        assert_biteq!((1.0 as Float).floor(), 1.0);
-        assert_biteq!((1.3 as Float).floor(), 1.0);
-        assert_biteq!((1.5 as Float).floor(), 1.0);
-        assert_biteq!((1.7 as Float).floor(), 1.0);
-        assert_biteq!((0.5 as Float).floor(), 0.0);
-        assert_biteq!((0.0 as Float).floor(), 0.0);
-        assert_biteq!((-0.0 as Float).floor(), -0.0);
-        assert_biteq!((-0.5 as Float).floor(), -1.0);
-        assert_biteq!((-1.0 as Float).floor(), -1.0);
-        assert_biteq!((-1.3 as Float).floor(), -2.0);
-        assert_biteq!((-1.5 as Float).floor(), -2.0);
-        assert_biteq!((-1.7 as Float).floor(), -2.0);
+        assert_biteq!(flt(1.0).floor(), 1.0);
+        assert_biteq!(flt(1.3).floor(), 1.0);
+        assert_biteq!(flt(1.5).floor(), 1.0);
+        assert_biteq!(flt(1.7).floor(), 1.0);
+        assert_biteq!(flt(0.5).floor(), 0.0);
+        assert_biteq!(flt(0.0).floor(), 0.0);
+        assert_biteq!(flt(-0.0).floor(), -0.0);
+        assert_biteq!(flt(-0.5).floor(), -1.0);
+        assert_biteq!(flt(-1.0).floor(), -1.0);
+        assert_biteq!(flt(-1.3).floor(), -2.0);
+        assert_biteq!(flt(-1.5).floor(), -2.0);
+        assert_biteq!(flt(-1.7).floor(), -2.0);
         assert_biteq!(Float::MAX.floor(), Float::MAX);
         assert_biteq!(Float::MIN.floor(), Float::MIN);
         assert_biteq!(Float::MIN_POSITIVE.floor(), 0.0);
@@ -932,18 +1004,18 @@ float_test! {
         f128: #[cfg(any(miri, target_has_reliable_f128_math))],
     },
     test {
-        assert_biteq!((1.0 as Float).ceil(), 1.0);
-        assert_biteq!((1.3 as Float).ceil(), 2.0);
-        assert_biteq!((1.5 as Float).ceil(), 2.0);
-        assert_biteq!((1.7 as Float).ceil(), 2.0);
-        assert_biteq!((0.5 as Float).ceil(), 1.0);
-        assert_biteq!((0.0 as Float).ceil(), 0.0);
-        assert_biteq!((-0.0 as Float).ceil(), -0.0);
-        assert_biteq!((-0.5 as Float).ceil(), -0.0);
-        assert_biteq!((-1.0 as Float).ceil(), -1.0);
-        assert_biteq!((-1.3 as Float).ceil(), -1.0);
-        assert_biteq!((-1.5 as Float).ceil(), -1.0);
-        assert_biteq!((-1.7 as Float).ceil(), -1.0);
+        assert_biteq!(flt(1.0).ceil(), 1.0);
+        assert_biteq!(flt(1.3).ceil(), 2.0);
+        assert_biteq!(flt(1.5).ceil(), 2.0);
+        assert_biteq!(flt(1.7).ceil(), 2.0);
+        assert_biteq!(flt(0.5).ceil(), 1.0);
+        assert_biteq!(flt(0.0).ceil(), 0.0);
+        assert_biteq!(flt(-0.0).ceil(), -0.0);
+        assert_biteq!(flt(-0.5).ceil(), -0.0);
+        assert_biteq!(flt(-1.0).ceil(), -1.0);
+        assert_biteq!(flt(-1.3).ceil(), -1.0);
+        assert_biteq!(flt(-1.5).ceil(), -1.0);
+        assert_biteq!(flt(-1.7).ceil(), -1.0);
         assert_biteq!(Float::MAX.ceil(), Float::MAX);
         assert_biteq!(Float::MIN.ceil(), Float::MIN);
         assert_biteq!(Float::MIN_POSITIVE.ceil(), 1.0);
@@ -961,19 +1033,19 @@ float_test! {
         f128: #[cfg(any(miri, target_has_reliable_f128_math))],
     },
     test {
-        assert_biteq!((2.5 as Float).round(), 3.0);
-        assert_biteq!((1.0 as Float).round(), 1.0);
-        assert_biteq!((1.3 as Float).round(), 1.0);
-        assert_biteq!((1.5 as Float).round(), 2.0);
-        assert_biteq!((1.7 as Float).round(), 2.0);
-        assert_biteq!((0.5 as Float).round(), 1.0);
-        assert_biteq!((0.0 as Float).round(), 0.0);
-        assert_biteq!((-0.0 as Float).round(), -0.0);
-        assert_biteq!((-0.5 as Float).round(), -1.0);
-        assert_biteq!((-1.0 as Float).round(), -1.0);
-        assert_biteq!((-1.3 as Float).round(), -1.0);
-        assert_biteq!((-1.5 as Float).round(), -2.0);
-        assert_biteq!((-1.7 as Float).round(), -2.0);
+        assert_biteq!(flt(2.5).round(), 3.0);
+        assert_biteq!(flt(1.0).round(), 1.0);
+        assert_biteq!(flt(1.3).round(), 1.0);
+        assert_biteq!(flt(1.5).round(), 2.0);
+        assert_biteq!(flt(1.7).round(), 2.0);
+        assert_biteq!(flt(0.5).round(), 1.0);
+        assert_biteq!(flt(0.0).round(), 0.0);
+        assert_biteq!(flt(-0.0).round(), -0.0);
+        assert_biteq!(flt(-0.5).round(), -1.0);
+        assert_biteq!(flt(-1.0).round(), -1.0);
+        assert_biteq!(flt(-1.3).round(), -1.0);
+        assert_biteq!(flt(-1.5).round(), -2.0);
+        assert_biteq!(flt(-1.7).round(), -2.0);
         assert_biteq!(Float::MAX.round(), Float::MAX);
         assert_biteq!(Float::MIN.round(), Float::MIN);
         assert_biteq!(Float::MIN_POSITIVE.round(), 0.0);
@@ -991,19 +1063,19 @@ float_test! {
         f128: #[cfg(any(miri, target_has_reliable_f128_math))],
     },
     test {
-        assert_biteq!((2.5 as Float).round_ties_even(), 2.0);
-        assert_biteq!((1.0 as Float).round_ties_even(), 1.0);
-        assert_biteq!((1.3 as Float).round_ties_even(), 1.0);
-        assert_biteq!((1.5 as Float).round_ties_even(), 2.0);
-        assert_biteq!((1.7 as Float).round_ties_even(), 2.0);
-        assert_biteq!((0.5 as Float).round_ties_even(), 0.0);
-        assert_biteq!((0.0 as Float).round_ties_even(), 0.0);
-        assert_biteq!((-0.0 as Float).round_ties_even(), -0.0);
-        assert_biteq!((-0.5 as Float).round_ties_even(), -0.0);
-        assert_biteq!((-1.0 as Float).round_ties_even(), -1.0);
-        assert_biteq!((-1.3 as Float).round_ties_even(), -1.0);
-        assert_biteq!((-1.5 as Float).round_ties_even(), -2.0);
-        assert_biteq!((-1.7 as Float).round_ties_even(), -2.0);
+        assert_biteq!(flt(2.5).round_ties_even(), 2.0);
+        assert_biteq!(flt(1.0).round_ties_even(), 1.0);
+        assert_biteq!(flt(1.3).round_ties_even(), 1.0);
+        assert_biteq!(flt(1.5).round_ties_even(), 2.0);
+        assert_biteq!(flt(1.7).round_ties_even(), 2.0);
+        assert_biteq!(flt(0.5).round_ties_even(), 0.0);
+        assert_biteq!(flt(0.0).round_ties_even(), 0.0);
+        assert_biteq!(flt(-0.0).round_ties_even(), -0.0);
+        assert_biteq!(flt(-0.5).round_ties_even(), -0.0);
+        assert_biteq!(flt(-1.0).round_ties_even(), -1.0);
+        assert_biteq!(flt(-1.3).round_ties_even(), -1.0);
+        assert_biteq!(flt(-1.5).round_ties_even(), -2.0);
+        assert_biteq!(flt(-1.7).round_ties_even(), -2.0);
         assert_biteq!(Float::MAX.round_ties_even(), Float::MAX);
         assert_biteq!(Float::MIN.round_ties_even(), Float::MIN);
         assert_biteq!(Float::MIN_POSITIVE.round_ties_even(), 0.0);
@@ -1021,18 +1093,18 @@ float_test! {
         f128: #[cfg(any(miri, target_has_reliable_f128_math))],
     },
     test {
-        assert_biteq!((1.0 as Float).trunc(), 1.0);
-        assert_biteq!((1.3 as Float).trunc(), 1.0);
-        assert_biteq!((1.5 as Float).trunc(), 1.0);
-        assert_biteq!((1.7 as Float).trunc(), 1.0);
-        assert_biteq!((0.5 as Float).trunc(), 0.0);
-        assert_biteq!((0.0 as Float).trunc(), 0.0);
-        assert_biteq!((-0.0 as Float).trunc(), -0.0);
-        assert_biteq!((-0.5 as Float).trunc(), -0.0);
-        assert_biteq!((-1.0 as Float).trunc(), -1.0);
-        assert_biteq!((-1.3 as Float).trunc(), -1.0);
-        assert_biteq!((-1.5 as Float).trunc(), -1.0);
-        assert_biteq!((-1.7 as Float).trunc(), -1.0);
+        assert_biteq!(flt(1.0).trunc(), 1.0);
+        assert_biteq!(flt(1.3).trunc(), 1.0);
+        assert_biteq!(flt(1.5).trunc(), 1.0);
+        assert_biteq!(flt(1.7).trunc(), 1.0);
+        assert_biteq!(flt(0.5).trunc(), 0.0);
+        assert_biteq!(flt(0.0).trunc(), 0.0);
+        assert_biteq!(flt(-0.0).trunc(), -0.0);
+        assert_biteq!(flt(-0.5).trunc(), -0.0);
+        assert_biteq!(flt(-1.0).trunc(), -1.0);
+        assert_biteq!(flt(-1.3).trunc(), -1.0);
+        assert_biteq!(flt(-1.5).trunc(), -1.0);
+        assert_biteq!(flt(-1.7).trunc(), -1.0);
         assert_biteq!(Float::MAX.trunc(), Float::MAX);
         assert_biteq!(Float::MIN.trunc(), Float::MIN);
         assert_biteq!(Float::MIN_POSITIVE.trunc(), 0.0);
@@ -1050,18 +1122,18 @@ float_test! {
         f128: #[cfg(any(miri, target_has_reliable_f128_math))],
     },
     test {
-        assert_biteq!((1.0 as Float).fract(), 0.0);
-        assert_approx_eq!((1.3 as Float).fract(), 0.3); // rounding differs between float types
-        assert_biteq!((1.5 as Float).fract(), 0.5);
-        assert_approx_eq!((1.7 as Float).fract(), 0.7);
-        assert_biteq!((0.5 as Float).fract(), 0.5);
-        assert_biteq!((0.0 as Float).fract(), 0.0);
-        assert_biteq!((-0.0 as Float).fract(), 0.0);
-        assert_biteq!((-0.5 as Float).fract(), -0.5);
-        assert_biteq!((-1.0 as Float).fract(), 0.0);
-        assert_approx_eq!((-1.3 as Float).fract(), -0.3); // rounding differs between float types
-        assert_biteq!((-1.5 as Float).fract(), -0.5);
-        assert_approx_eq!((-1.7 as Float).fract(), -0.7);
+        assert_biteq!(flt(1.0).fract(), 0.0);
+        assert_approx_eq!(flt(1.3).fract(), 0.3); // rounding differs between float types
+        assert_biteq!(flt(1.5).fract(), 0.5);
+        assert_approx_eq!(flt(1.7).fract(), 0.7);
+        assert_biteq!(flt(0.5).fract(), 0.5);
+        assert_biteq!(flt(0.0).fract(), 0.0);
+        assert_biteq!(flt(-0.0).fract(), 0.0);
+        assert_biteq!(flt(-0.5).fract(), -0.5);
+        assert_biteq!(flt(-1.0).fract(), 0.0);
+        assert_approx_eq!(flt(-1.3).fract(), -0.3); // rounding differs between float types
+        assert_biteq!(flt(-1.5).fract(), -0.5);
+        assert_approx_eq!(flt(-1.7).fract(), -0.7);
         assert_biteq!(Float::MAX.fract(), 0.0);
         assert_biteq!(Float::MIN.fract(), 0.0);
         assert_biteq!(Float::MIN_POSITIVE.fract(), Float::MIN_POSITIVE);
@@ -1425,10 +1497,10 @@ float_test! {
         let inf: Float = Float::INFINITY;
         let neg_inf: Float = Float::NEG_INFINITY;
         let max: Float = Float::MAX;
-        assert_biteq!((1.0 as Float).recip(), 1.0);
-        assert_biteq!((2.0 as Float).recip(), 0.5);
-        assert_biteq!((-0.4 as Float).recip(), -2.5);
-        assert_biteq!((0.0 as Float).recip(), inf);
+        assert_biteq!(flt(1.0).recip(), 1.0);
+        assert_biteq!(flt(2.0).recip(), 0.5);
+        assert_biteq!(flt(-0.4).recip(), -2.5);
+        assert_biteq!(flt(0.0).recip(), inf);
         assert!(nan.recip().is_nan());
         assert_biteq!(inf.recip(), 0.0);
         assert_biteq!(neg_inf.recip(), -0.0);
@@ -1449,15 +1521,314 @@ float_test! {
         let inf: Float = Float::INFINITY;
         let neg_inf: Float = Float::NEG_INFINITY;
         assert_approx_eq!(Float::ONE.powi(1), Float::ONE);
-        assert_approx_eq!((-3.1 as Float).powi(2), 9.6100000000000005506706202140776519387, Float::POWI_APPROX);
-        assert_approx_eq!((5.9 as Float).powi(-2), 0.028727377190462507313100483690639638451);
-        assert_biteq!((8.3 as Float).powi(0), Float::ONE);
+        assert_approx_eq!(flt(-3.1).powi(2), 9.6100000000000005506706202140776519387, Float::POWI_APPROX);
+        assert_approx_eq!(flt(5.9).powi(-2), 0.028727377190462507313100483690639638451);
+        assert_biteq!(flt(8.3).powi(0), Float::ONE);
         assert!(nan.powi(2).is_nan());
         assert_biteq!(inf.powi(3), inf);
         assert_biteq!(neg_inf.powi(2), inf);
     }
 }
 
+float_test! {
+    name: powf,
+    attrs: {
+        const: #[cfg(false)],
+        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
+        f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+    },
+    test {
+        let nan: Float = Float::NAN;
+        let inf: Float = Float::INFINITY;
+        let neg_inf: Float = Float::NEG_INFINITY;
+        assert_biteq!(flt(1.0).powf(1.0), 1.0);
+        assert_approx_eq!(flt(3.4).powf(4.5), 246.40818323761892815995637964326426756, Float::POWF_APPROX);
+        assert_approx_eq!(flt(2.7).powf(-3.2), 0.041652009108526178281070304373500889273, Float::POWF_APPROX);
+        assert_approx_eq!(flt(-3.1).powf(2.0), 9.6100000000000005506706202140776519387, Float::POWF_APPROX);
+        assert_approx_eq!(flt(5.9).powf(-2.0), 0.028727377190462507313100483690639638451, Float::POWF_APPROX);
+        assert_biteq!(flt(8.3).powf(0.0), 1.0);
+        assert!(nan.powf(2.0).is_nan());
+        assert_biteq!(inf.powf(2.0), inf);
+        assert_biteq!(neg_inf.powf(3.0), neg_inf);
+    }
+}
+
+float_test! {
+    name: exp,
+    attrs: {
+        const: #[cfg(false)],
+        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
+        f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+    },
+    test {
+        assert_biteq!(1.0, flt(0.0).exp());
+        assert_approx_eq!(consts::E, flt(1.0).exp(), Float::EXP_APPROX);
+        assert_approx_eq!(148.41315910257660342111558004055227962348775, flt(5.0).exp(), Float::EXP_APPROX);
+
+        let inf: Float = Float::INFINITY;
+        let neg_inf: Float = Float::NEG_INFINITY;
+        let nan: Float = Float::NAN;
+        assert_biteq!(inf, inf.exp());
+        assert_biteq!(0.0, neg_inf.exp());
+        assert!(nan.exp().is_nan());
+    }
+}
+
+float_test! {
+    name: exp2,
+    attrs: {
+        const: #[cfg(false)],
+        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
+        f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+    },
+    test {
+        assert_approx_eq!(32.0, flt(5.0).exp2(), Float::EXP_APPROX);
+        assert_biteq!(1.0, flt(0.0).exp2());
+
+        let inf: Float = Float::INFINITY;
+        let neg_inf: Float = Float::NEG_INFINITY;
+        let nan: Float = Float::NAN;
+        assert_biteq!(inf, inf.exp2());
+        assert_biteq!(0.0, neg_inf.exp2());
+        assert!(nan.exp2().is_nan());
+    }
+}
+
+float_test! {
+    name: ln,
+    attrs: {
+        const: #[cfg(false)],
+        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
+        f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+    },
+    test {
+        let nan: Float = Float::NAN;
+        let inf: Float = Float::INFINITY;
+        let neg_inf: Float = Float::NEG_INFINITY;
+        assert_approx_eq!(flt(1.0).exp().ln(), 1.0, Float::LN_APPROX);
+        assert!(nan.ln().is_nan());
+        assert_biteq!(inf.ln(), inf);
+        assert!(neg_inf.ln().is_nan());
+        assert!(flt(-2.3).ln().is_nan());
+        assert_biteq!(flt(-0.0).ln(), neg_inf);
+        assert_biteq!(flt(0.0).ln(), neg_inf);
+        assert_approx_eq!(flt(4.0).ln(), 1.3862943611198906188344642429163531366, Float::LN_APPROX);
+    }
+}
+
+float_test! {
+    name: log,
+    attrs: {
+        const: #[cfg(false)],
+        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
+        f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+    },
+    test {
+        let nan: Float = Float::NAN;
+        let inf: Float = Float::INFINITY;
+        let neg_inf: Float = Float::NEG_INFINITY;
+        assert_approx_eq!(flt(10.0).log(10.0), 1.0, Float::LOG_APPROX);
+        assert_approx_eq!(flt(2.3).log(3.5), 0.66485771361478710036766645911922010272, Float::LOG_APPROX);
+        assert_approx_eq!(flt(1.0).exp().log(flt(1.0).exp()), 1.0, Float::LOG_APPROX);
+        assert!(flt(1.0).log(1.0).is_nan());
+        assert!(flt(1.0).log(-13.9).is_nan());
+        assert!(nan.log(2.3).is_nan());
+        assert_biteq!(inf.log(10.0), inf);
+        assert!(neg_inf.log(8.8).is_nan());
+        assert!(flt(-2.3).log(0.1).is_nan());
+        assert_biteq!(flt(-0.0).log(2.0), neg_inf);
+        assert_biteq!(flt(0.0).log(7.0), neg_inf);
+    }
+}
+
+float_test! {
+    name: log2,
+    attrs: {
+        const: #[cfg(false)],
+        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
+        f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+    },
+    test {
+        let nan: Float = Float::NAN;
+        let inf: Float = Float::INFINITY;
+        let neg_inf: Float = Float::NEG_INFINITY;
+        assert_approx_eq!(flt(10.0).log2(), 3.32192809488736234787031942948939017, Float::LOG2_APPROX);
+        assert_approx_eq!(flt(2.3).log2(), 1.2016338611696504130002982471978765921, Float::LOG2_APPROX);
+        assert_approx_eq!(flt(1.0).exp().log2(), 1.4426950408889634073599246810018921381, Float::LOG2_APPROX);
+        assert!(nan.log2().is_nan());
+        assert_biteq!(inf.log2(), inf);
+        assert!(neg_inf.log2().is_nan());
+        assert!(flt(-2.3).log2().is_nan());
+        assert_biteq!(flt(-0.0).log2(), neg_inf);
+        assert_biteq!(flt(0.0).log2(), neg_inf);
+    }
+}
+
+float_test! {
+    name: log10,
+    attrs: {
+        const: #[cfg(false)],
+        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
+        f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+    },
+    test {
+        let nan: Float = Float::NAN;
+        let inf: Float = Float::INFINITY;
+        let neg_inf: Float = Float::NEG_INFINITY;
+        assert_approx_eq!(flt(10.0).log10(), 1.0, Float::LOG10_APPROX);
+        assert_approx_eq!(flt(2.3).log10(), 0.36172783601759284532595218865859309898, Float::LOG10_APPROX);
+        assert_approx_eq!(flt(1.0).exp().log10(), 0.43429448190325182765112891891660508222, Float::LOG10_APPROX);
+        assert_biteq!(flt(1.0).log10(), 0.0);
+        assert!(nan.log10().is_nan());
+        assert_biteq!(inf.log10(), inf);
+        assert!(neg_inf.log10().is_nan());
+        assert!(flt(-2.3).log10().is_nan());
+        assert_biteq!(flt(-0.0).log10(), neg_inf);
+        assert_biteq!(flt(0.0).log10(), neg_inf);
+    }
+}
+
+float_test! {
+    name: asinh,
+    attrs: {
+        const: #[cfg(false)],
+        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
+        f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+    },
+    test {
+        assert_biteq!(flt(0.0).asinh(), 0.0);
+        assert_biteq!(flt(-0.0).asinh(), -0.0);
+
+        let inf: Float = Float::INFINITY;
+        let neg_inf: Float = Float::NEG_INFINITY;
+        let nan: Float = Float::NAN;
+        assert_biteq!(inf.asinh(), inf);
+        assert_biteq!(neg_inf.asinh(), neg_inf);
+        assert!(nan.asinh().is_nan());
+        assert!(flt(-0.0).asinh().is_sign_negative());
+
+        // issue 63271
+        assert_approx_eq!(flt(2.0).asinh(), 1.443635475178810342493276740273105, Float::ASINH_APPROX);
+        assert_approx_eq!(flt(-2.0).asinh(), -1.443635475178810342493276740273105, Float::ASINH_APPROX);
+
+        assert_approx_eq!(flt(-200.0).asinh(), -5.991470797049389, Float::ASINH_APPROX);
+
+        #[allow(overflowing_literals)]
+        if Float::MAX > flt(66000.0) {
+             // regression test for the catastrophic cancellation fixed in 72486
+             assert_approx_eq!(flt(-67452098.07139316).asinh(), -18.720075426274544393985484294000831757220, Float::ASINH_APPROX);
+        }
+    }
+}
+
+float_test! {
+    name: acosh,
+    attrs: {
+        const: #[cfg(false)],
+        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
+        f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+    },
+    test {
+        assert_biteq!(flt(1.0).acosh(), 0.0);
+        assert!(flt(0.999).acosh().is_nan());
+
+        let inf: Float = Float::INFINITY;
+        let neg_inf: Float = Float::NEG_INFINITY;
+        let nan: Float = Float::NAN;
+        assert_biteq!(inf.acosh(), inf);
+        assert!(neg_inf.acosh().is_nan());
+        assert!(nan.acosh().is_nan());
+        assert_approx_eq!(flt(2.0).acosh(), 1.31695789692481670862504634730796844, Float::ACOSH_APPROX);
+        assert_approx_eq!(flt(3.0).acosh(), 1.76274717403908605046521864995958461, Float::ACOSH_APPROX);
+
+        #[allow(overflowing_literals)]
+        if Float::MAX > flt(66000.0) {
+            // test for low accuracy from issue 104548
+            assert_approx_eq!(flt(60.0), flt(60.0).cosh().acosh(), Float::ACOSH_APPROX);
+        }
+    }
+}
+
+float_test! {
+    name: atanh,
+    attrs: {
+        const: #[cfg(false)],
+        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
+        f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+    },
+    test {
+        assert_biteq!(flt(0.0).atanh(), 0.0);
+        assert_biteq!(flt(-0.0).atanh(), -0.0);
+
+        let inf: Float = Float::INFINITY;
+        let neg_inf: Float = Float::NEG_INFINITY;
+        assert_biteq!(flt(1.0).atanh(), inf);
+        assert_biteq!(flt(-1.0).atanh(), neg_inf);
+
+        let nan: Float = Float::NAN;
+        assert!(inf.atanh().is_nan());
+        assert!(neg_inf.atanh().is_nan());
+        assert!(nan.atanh().is_nan());
+
+        assert_approx_eq!(flt(0.5).atanh(), 0.54930614433405484569762261846126285, Float::ATANH_APPROX);
+        assert_approx_eq!(flt(-0.5).atanh(), -0.54930614433405484569762261846126285, Float::ATANH_APPROX);
+    }
+}
+
+float_test! {
+    name: gamma,
+    attrs: {
+        const: #[cfg(false)],
+        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
+        f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+    },
+    test {
+        assert_approx_eq!(flt(1.0).gamma(), 1.0, Float::GAMMA_APPROX);
+        assert_approx_eq!(flt(2.0).gamma(), 1.0, Float::GAMMA_APPROX);
+        assert_approx_eq!(flt(3.0).gamma(), 2.0, Float::GAMMA_APPROX);
+        assert_approx_eq!(flt(4.0).gamma(), 6.0, Float::GAMMA_APPROX);
+        assert_approx_eq!(flt(5.0).gamma(), 24.0, Float::GAMMA_APPROX_LOOSE);
+        assert_approx_eq!(flt(0.5).gamma(), consts::PI.sqrt(), Float::GAMMA_APPROX);
+        assert_approx_eq!(flt(-0.5).gamma(), flt(-2.0) * consts::PI.sqrt(), Float::GAMMA_APPROX_LOOSE);
+        assert_biteq!(flt(0.0).gamma(), Float::INFINITY);
+        assert_biteq!(flt(-0.0).gamma(), Float::NEG_INFINITY);
+        assert!(flt(-1.0).gamma().is_nan());
+        assert!(flt(-2.0).gamma().is_nan());
+        assert!(Float::NAN.gamma().is_nan());
+        assert!(Float::NEG_INFINITY.gamma().is_nan());
+        assert_biteq!(Float::INFINITY.gamma(), Float::INFINITY);
+
+        // FIXME: there is a bug in the MinGW gamma implementation that causes this to
+        // return NaN. https://sourceforge.net/p/mingw-w64/bugs/517/
+        if !cfg!(all(target_os = "windows", target_env = "gnu", not(target_abi = "llvm"))) {
+             assert_biteq!(flt(1760.9).gamma(), Float::INFINITY);
+        }
+
+        if ::BITS <= 64 {
+             assert_biteq!(flt(171.71).gamma(), Float::INFINITY);
+        }
+    }
+}
+
+float_test! {
+    name: ln_gamma,
+    attrs: {
+        const: #[cfg(false)],
+        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
+        f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+    },
+    test {
+        assert_approx_eq!(flt(1.0).ln_gamma().0, 0.0, Float::LNGAMMA_APPROX);
+        assert_eq!(flt(1.0).ln_gamma().1, 1);
+        assert_approx_eq!(flt(2.0).ln_gamma().0, 0.0, Float::LNGAMMA_APPROX);
+        assert_eq!(flt(2.0).ln_gamma().1, 1);
+        assert_approx_eq!(flt(3.0).ln_gamma().0, flt(2.0).ln(), Float::LNGAMMA_APPROX);
+        assert_eq!(flt(3.0).ln_gamma().1, 1);
+        assert_approx_eq!(flt(-0.5).ln_gamma().0, (flt(2.0) * consts::PI.sqrt()).ln(), Float::LNGAMMA_APPROX_LOOSE);
+        assert_eq!(flt(-0.5).ln_gamma().1, -1);
+    }
+}
+
 float_test! {
     name: to_degrees,
     attrs: {
@@ -1465,17 +1836,17 @@ float_test! {
         f128: #[cfg(any(miri, target_has_reliable_f128))],
     },
     test {
-        let pi: Float = Float::PI;
+        let pi: Float = consts::PI;
         let nan: Float = Float::NAN;
         let inf: Float = Float::INFINITY;
         let neg_inf: Float = Float::NEG_INFINITY;
-        assert_biteq!((0.0 as Float).to_degrees(), 0.0);
-        assert_approx_eq!((-5.8 as Float).to_degrees(), -332.31552117587745090765431723855668471);
+        assert_biteq!(flt(0.0).to_degrees(), 0.0);
+        assert_approx_eq!(flt(-5.8).to_degrees(), -332.31552117587745090765431723855668471);
         assert_approx_eq!(pi.to_degrees(), 180.0, Float::PI_TO_DEGREES_APPROX);
         assert!(nan.to_degrees().is_nan());
         assert_biteq!(inf.to_degrees(), inf);
         assert_biteq!(neg_inf.to_degrees(), neg_inf);
-        assert_biteq!((1.0 as Float).to_degrees(), 57.2957795130823208767981548141051703);
+        assert_biteq!(flt(1.0).to_degrees(), 57.2957795130823208767981548141051703);
     }
 }
 
@@ -1486,14 +1857,14 @@ float_test! {
         f128: #[cfg(any(miri, target_has_reliable_f128))],
     },
     test {
-        let pi: Float = Float::PI;
+        let pi: Float = consts::PI;
         let nan: Float = Float::NAN;
         let inf: Float = Float::INFINITY;
         let neg_inf: Float = Float::NEG_INFINITY;
-        assert_biteq!((0.0 as Float).to_radians(), 0.0);
-        assert_approx_eq!((154.6 as Float).to_radians(), 2.6982790235832334267135442069489767804);
-        assert_approx_eq!((-332.31 as Float).to_radians(), -5.7999036373023566567593094812182763013);
-        assert_approx_eq!((180.0 as Float).to_radians(), pi, Float::_180_TO_RADIANS_APPROX);
+        assert_biteq!(flt(0.0).to_radians(), 0.0);
+        assert_approx_eq!(flt(154.6).to_radians(), 2.6982790235832334267135442069489767804);
+        assert_approx_eq!(flt(-332.31).to_radians(), -5.7999036373023566567593094812182763013);
+        assert_approx_eq!(flt(180.0).to_radians(), pi, Float::_180_TO_RADIANS_APPROX);
         assert!(nan.to_radians().is_nan());
         assert_biteq!(inf.to_radians(), inf);
         assert_biteq!(neg_inf.to_radians(), neg_inf);
@@ -1507,8 +1878,8 @@ float_test! {
         f128: #[cfg(any(miri, target_has_reliable_f128))],
     },
     test {
-        let a: Float = 123.0;
-        let b: Float = 456.0;
+        let a: Float = flt(123.0);
+        let b: Float = flt(456.0);
 
         // Check that individual operations match their primitive counterparts.
         //
@@ -1564,8 +1935,8 @@ float_test! {
         let nan: Float = Float::NAN;
         let inf: Float = Float::INFINITY;
         let neg_inf: Float = Float::NEG_INFINITY;
-        assert_biteq!(flt(12.3).mul_add(4.5, 6.7), Float::MUL_ADD_RESULT);
-        assert_biteq!((flt(-12.3)).mul_add(-4.5, -6.7), Float::NEG_MUL_ADD_RESULT);
+        assert_biteq!(flt(12.3).mul_add(flt(4.5), flt(6.7)), Float::MUL_ADD_RESULT);
+        assert_biteq!((flt(-12.3)).mul_add(flt(-4.5), flt(-6.7)), Float::NEG_MUL_ADD_RESULT);
         assert_biteq!(flt(0.0).mul_add(8.9, 1.2), 1.2);
         assert_biteq!(flt(3.4).mul_add(-0.0, 5.6), 5.6);
         assert!(nan.mul_add(7.8, 9.0).is_nan());
@@ -1650,3 +2021,30 @@ float_test! {
 //         assert_biteq!(Float::from(i64::MAX), 9223372036854775807.0);
 //     }
 // }
+
+float_test! {
+    name: real_consts,
+    attrs: {
+        // FIXME(f16_f128): add math tests when available
+        const: #[cfg(false)],
+        f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
+        f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
+    },
+    test {
+        let pi: Float = consts::PI;
+        assert_approx_eq!(consts::FRAC_PI_2, pi / 2.0);
+        assert_approx_eq!(consts::FRAC_PI_3, pi / 3.0, Float::APPROX);
+        assert_approx_eq!(consts::FRAC_PI_4, pi / 4.0);
+        assert_approx_eq!(consts::FRAC_PI_6, pi / 6.0);
+        assert_approx_eq!(consts::FRAC_PI_8, pi / 8.0);
+        assert_approx_eq!(consts::FRAC_1_PI, 1.0 / pi);
+        assert_approx_eq!(consts::FRAC_2_PI, 2.0 / pi);
+        assert_approx_eq!(consts::FRAC_2_SQRT_PI, 2.0 / pi.sqrt());
+        assert_approx_eq!(consts::SQRT_2, flt(2.0).sqrt());
+        assert_approx_eq!(consts::FRAC_1_SQRT_2, 1.0 / flt(2.0).sqrt());
+        assert_approx_eq!(consts::LOG2_E, consts::E.log2());
+        assert_approx_eq!(consts::LOG10_E, consts::E.log10());
+        assert_approx_eq!(consts::LN_2, flt(2.0).ln());
+        assert_approx_eq!(consts::LN_10, flt(10.0).ln(), Float::APPROX);
+    }
+}
diff --git a/library/coretests/tests/lib.rs b/library/coretests/tests/lib.rs
index b8702ee20cbb..34732741a21c 100644
--- a/library/coretests/tests/lib.rs
+++ b/library/coretests/tests/lib.rs
@@ -52,6 +52,8 @@
 #![feature(f16)]
 #![feature(f128)]
 #![feature(float_algebraic)]
+#![feature(float_bits_const)]
+#![feature(float_gamma)]
 #![feature(float_minimum_maximum)]
 #![feature(flt2dec)]
 #![feature(fmt_internals)]
diff --git a/library/std/Cargo.toml b/library/std/Cargo.toml
index f4cc8edc0c1d..1b7a41d69736 100644
--- a/library/std/Cargo.toml
+++ b/library/std/Cargo.toml
@@ -146,10 +146,6 @@ harness = false
 name = "sync"
 path = "tests/sync/lib.rs"
 
-[[test]]
-name = "floats"
-path = "tests/floats/lib.rs"
-
 [[test]]
 name = "thread_local"
 path = "tests/thread_local/lib.rs"
diff --git a/library/std/tests/floats/f128.rs b/library/std/tests/floats/f128.rs
deleted file mode 100644
index d20762023caf..000000000000
--- a/library/std/tests/floats/f128.rs
+++ /dev/null
@@ -1,320 +0,0 @@
-#![cfg(target_has_reliable_f128)]
-
-use std::f128::consts;
-use std::ops::{Add, Div, Mul, Sub};
-
-// Note these tolerances make sense around zero, but not for more extreme exponents.
-
-/// Default tolerances. Works for values that should be near precise but not exact. Roughly
-/// the precision carried by `100 * 100`.
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f128_math)]
-const TOL: f128 = 1e-12;
-
-/// For operations that are near exact, usually not involving math of different
-/// signs.
-const TOL_PRECISE: f128 = 1e-28;
-
-/// Tolerances for math that is allowed to be imprecise, usually due to multiple chained
-/// operations.
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f128_math)]
-const TOL_IMPR: f128 = 1e-10;
-
-/// Compare by representation
-#[allow(unused_macros)]
-macro_rules! assert_f128_biteq {
-    ($a:expr, $b:expr) => {
-        let (l, r): (&f128, &f128) = (&$a, &$b);
-        let lb = l.to_bits();
-        let rb = r.to_bits();
-        assert_eq!(lb, rb, "float {l:?} is not bitequal to {r:?}.\na: {lb:#034x}\nb: {rb:#034x}");
-    };
-}
-
-#[test]
-fn test_num_f128() {
-    // FIXME(f128): replace with a `test_num` call once the required `fmodl`/`fmodf128`
-    // function is available on all platforms.
-    let ten = 10f128;
-    let two = 2f128;
-    assert_eq!(ten.add(two), ten + two);
-    assert_eq!(ten.sub(two), ten - two);
-    assert_eq!(ten.mul(two), ten * two);
-    assert_eq!(ten.div(two), ten / two);
-}
-
-// Many math functions allow for less accurate results, so the next tolerance up is used
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f128_math)]
-fn test_powf() {
-    let nan: f128 = f128::NAN;
-    let inf: f128 = f128::INFINITY;
-    let neg_inf: f128 = f128::NEG_INFINITY;
-    assert_eq!(1.0f128.powf(1.0), 1.0);
-    assert_approx_eq!(3.4f128.powf(4.5), 246.40818323761892815995637964326426756, TOL_IMPR);
-    assert_approx_eq!(2.7f128.powf(-3.2), 0.041652009108526178281070304373500889273, TOL_IMPR);
-    assert_approx_eq!((-3.1f128).powf(2.0), 9.6100000000000005506706202140776519387, TOL_IMPR);
-    assert_approx_eq!(5.9f128.powf(-2.0), 0.028727377190462507313100483690639638451, TOL_IMPR);
-    assert_eq!(8.3f128.powf(0.0), 1.0);
-    assert!(nan.powf(2.0).is_nan());
-    assert_eq!(inf.powf(2.0), inf);
-    assert_eq!(neg_inf.powf(3.0), neg_inf);
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f128_math)]
-fn test_exp() {
-    assert_eq!(1.0, 0.0f128.exp());
-    assert_approx_eq!(consts::E, 1.0f128.exp(), TOL);
-    assert_approx_eq!(148.41315910257660342111558004055227962348775, 5.0f128.exp(), TOL);
-
-    let inf: f128 = f128::INFINITY;
-    let neg_inf: f128 = f128::NEG_INFINITY;
-    let nan: f128 = f128::NAN;
-    assert_eq!(inf, inf.exp());
-    assert_eq!(0.0, neg_inf.exp());
-    assert!(nan.exp().is_nan());
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f128_math)]
-fn test_exp2() {
-    assert_eq!(32.0, 5.0f128.exp2());
-    assert_eq!(1.0, 0.0f128.exp2());
-
-    let inf: f128 = f128::INFINITY;
-    let neg_inf: f128 = f128::NEG_INFINITY;
-    let nan: f128 = f128::NAN;
-    assert_eq!(inf, inf.exp2());
-    assert_eq!(0.0, neg_inf.exp2());
-    assert!(nan.exp2().is_nan());
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f128_math)]
-fn test_ln() {
-    let nan: f128 = f128::NAN;
-    let inf: f128 = f128::INFINITY;
-    let neg_inf: f128 = f128::NEG_INFINITY;
-    assert_approx_eq!(1.0f128.exp().ln(), 1.0, TOL);
-    assert!(nan.ln().is_nan());
-    assert_eq!(inf.ln(), inf);
-    assert!(neg_inf.ln().is_nan());
-    assert!((-2.3f128).ln().is_nan());
-    assert_eq!((-0.0f128).ln(), neg_inf);
-    assert_eq!(0.0f128.ln(), neg_inf);
-    assert_approx_eq!(4.0f128.ln(), 1.3862943611198906188344642429163531366, TOL);
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f128_math)]
-fn test_log() {
-    let nan: f128 = f128::NAN;
-    let inf: f128 = f128::INFINITY;
-    let neg_inf: f128 = f128::NEG_INFINITY;
-    assert_eq!(10.0f128.log(10.0), 1.0);
-    assert_approx_eq!(2.3f128.log(3.5), 0.66485771361478710036766645911922010272, TOL);
-    assert_eq!(1.0f128.exp().log(1.0f128.exp()), 1.0);
-    assert!(1.0f128.log(1.0).is_nan());
-    assert!(1.0f128.log(-13.9).is_nan());
-    assert!(nan.log(2.3).is_nan());
-    assert_eq!(inf.log(10.0), inf);
-    assert!(neg_inf.log(8.8).is_nan());
-    assert!((-2.3f128).log(0.1).is_nan());
-    assert_eq!((-0.0f128).log(2.0), neg_inf);
-    assert_eq!(0.0f128.log(7.0), neg_inf);
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f128_math)]
-fn test_log2() {
-    let nan: f128 = f128::NAN;
-    let inf: f128 = f128::INFINITY;
-    let neg_inf: f128 = f128::NEG_INFINITY;
-    assert_approx_eq!(10.0f128.log2(), 3.32192809488736234787031942948939017, TOL);
-    assert_approx_eq!(2.3f128.log2(), 1.2016338611696504130002982471978765921, TOL);
-    assert_approx_eq!(1.0f128.exp().log2(), 1.4426950408889634073599246810018921381, TOL);
-    assert!(nan.log2().is_nan());
-    assert_eq!(inf.log2(), inf);
-    assert!(neg_inf.log2().is_nan());
-    assert!((-2.3f128).log2().is_nan());
-    assert_eq!((-0.0f128).log2(), neg_inf);
-    assert_eq!(0.0f128.log2(), neg_inf);
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f128_math)]
-fn test_log10() {
-    let nan: f128 = f128::NAN;
-    let inf: f128 = f128::INFINITY;
-    let neg_inf: f128 = f128::NEG_INFINITY;
-    assert_eq!(10.0f128.log10(), 1.0);
-    assert_approx_eq!(2.3f128.log10(), 0.36172783601759284532595218865859309898, TOL);
-    assert_approx_eq!(1.0f128.exp().log10(), 0.43429448190325182765112891891660508222, TOL);
-    assert_eq!(1.0f128.log10(), 0.0);
-    assert!(nan.log10().is_nan());
-    assert_eq!(inf.log10(), inf);
-    assert!(neg_inf.log10().is_nan());
-    assert!((-2.3f128).log10().is_nan());
-    assert_eq!((-0.0f128).log10(), neg_inf);
-    assert_eq!(0.0f128.log10(), neg_inf);
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f128_math)]
-fn test_asinh() {
-    // Lower accuracy results are allowed, use increased tolerances
-    assert_eq!(0.0f128.asinh(), 0.0f128);
-    assert_eq!((-0.0f128).asinh(), -0.0f128);
-
-    let inf: f128 = f128::INFINITY;
-    let neg_inf: f128 = f128::NEG_INFINITY;
-    let nan: f128 = f128::NAN;
-    assert_eq!(inf.asinh(), inf);
-    assert_eq!(neg_inf.asinh(), neg_inf);
-    assert!(nan.asinh().is_nan());
-    assert!((-0.0f128).asinh().is_sign_negative());
-
-    // issue 63271
-    assert_approx_eq!(2.0f128.asinh(), 1.443635475178810342493276740273105f128, TOL_IMPR);
-    assert_approx_eq!((-2.0f128).asinh(), -1.443635475178810342493276740273105f128, TOL_IMPR);
-    // regression test for the catastrophic cancellation fixed in 72486
-    assert_approx_eq!(
-        (-67452098.07139316f128).asinh(),
-        -18.720075426274544393985484294000831757220,
-        TOL_IMPR
-    );
-
-    // test for low accuracy from issue 104548
-    assert_approx_eq!(60.0f128, 60.0f128.sinh().asinh(), TOL_IMPR);
-    // mul needed for approximate comparison to be meaningful
-    assert_approx_eq!(1.0f128, 1e-15f128.sinh().asinh() * 1e15f128, TOL_IMPR);
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f128_math)]
-fn test_acosh() {
-    assert_eq!(1.0f128.acosh(), 0.0f128);
-    assert!(0.999f128.acosh().is_nan());
-
-    let inf: f128 = f128::INFINITY;
-    let neg_inf: f128 = f128::NEG_INFINITY;
-    let nan: f128 = f128::NAN;
-    assert_eq!(inf.acosh(), inf);
-    assert!(neg_inf.acosh().is_nan());
-    assert!(nan.acosh().is_nan());
-    assert_approx_eq!(2.0f128.acosh(), 1.31695789692481670862504634730796844f128, TOL_IMPR);
-    assert_approx_eq!(3.0f128.acosh(), 1.76274717403908605046521864995958461f128, TOL_IMPR);
-
-    // test for low accuracy from issue 104548
-    assert_approx_eq!(60.0f128, 60.0f128.cosh().acosh(), TOL_IMPR);
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f128_math)]
-fn test_atanh() {
-    assert_eq!(0.0f128.atanh(), 0.0f128);
-    assert_eq!((-0.0f128).atanh(), -0.0f128);
-
-    let inf: f128 = f128::INFINITY;
-    let neg_inf: f128 = f128::NEG_INFINITY;
-    let nan: f128 = f128::NAN;
-    assert_eq!(1.0f128.atanh(), inf);
-    assert_eq!((-1.0f128).atanh(), neg_inf);
-    assert!(2f128.atanh().atanh().is_nan());
-    assert!((-2f128).atanh().atanh().is_nan());
-    assert!(inf.atanh().is_nan());
-    assert!(neg_inf.atanh().is_nan());
-    assert!(nan.atanh().is_nan());
-    assert_approx_eq!(0.5f128.atanh(), 0.54930614433405484569762261846126285f128, TOL_IMPR);
-    assert_approx_eq!((-0.5f128).atanh(), -0.54930614433405484569762261846126285f128, TOL_IMPR);
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f128_math)]
-fn test_gamma() {
-    // precision can differ among platforms
-    assert_approx_eq!(1.0f128.gamma(), 1.0f128, TOL_IMPR);
-    assert_approx_eq!(2.0f128.gamma(), 1.0f128, TOL_IMPR);
-    assert_approx_eq!(3.0f128.gamma(), 2.0f128, TOL_IMPR);
-    assert_approx_eq!(4.0f128.gamma(), 6.0f128, TOL_IMPR);
-    assert_approx_eq!(5.0f128.gamma(), 24.0f128, TOL_IMPR);
-    assert_approx_eq!(0.5f128.gamma(), consts::PI.sqrt(), TOL_IMPR);
-    assert_approx_eq!((-0.5f128).gamma(), -2.0 * consts::PI.sqrt(), TOL_IMPR);
-    assert_eq!(0.0f128.gamma(), f128::INFINITY);
-    assert_eq!((-0.0f128).gamma(), f128::NEG_INFINITY);
-    assert!((-1.0f128).gamma().is_nan());
-    assert!((-2.0f128).gamma().is_nan());
-    assert!(f128::NAN.gamma().is_nan());
-    assert!(f128::NEG_INFINITY.gamma().is_nan());
-    assert_eq!(f128::INFINITY.gamma(), f128::INFINITY);
-    assert_eq!(1760.9f128.gamma(), f128::INFINITY);
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f128_math)]
-fn test_ln_gamma() {
-    assert_approx_eq!(1.0f128.ln_gamma().0, 0.0f128, TOL_IMPR);
-    assert_eq!(1.0f128.ln_gamma().1, 1);
-    assert_approx_eq!(2.0f128.ln_gamma().0, 0.0f128, TOL_IMPR);
-    assert_eq!(2.0f128.ln_gamma().1, 1);
-    assert_approx_eq!(3.0f128.ln_gamma().0, 2.0f128.ln(), TOL_IMPR);
-    assert_eq!(3.0f128.ln_gamma().1, 1);
-    assert_approx_eq!((-0.5f128).ln_gamma().0, (2.0 * consts::PI.sqrt()).ln(), TOL_IMPR);
-    assert_eq!((-0.5f128).ln_gamma().1, -1);
-}
-
-#[test]
-fn test_real_consts() {
-    let pi: f128 = consts::PI;
-    let frac_pi_2: f128 = consts::FRAC_PI_2;
-    let frac_pi_3: f128 = consts::FRAC_PI_3;
-    let frac_pi_4: f128 = consts::FRAC_PI_4;
-    let frac_pi_6: f128 = consts::FRAC_PI_6;
-    let frac_pi_8: f128 = consts::FRAC_PI_8;
-    let frac_1_pi: f128 = consts::FRAC_1_PI;
-    let frac_2_pi: f128 = consts::FRAC_2_PI;
-
-    assert_approx_eq!(frac_pi_2, pi / 2f128, TOL_PRECISE);
-    assert_approx_eq!(frac_pi_3, pi / 3f128, TOL_PRECISE);
-    assert_approx_eq!(frac_pi_4, pi / 4f128, TOL_PRECISE);
-    assert_approx_eq!(frac_pi_6, pi / 6f128, TOL_PRECISE);
-    assert_approx_eq!(frac_pi_8, pi / 8f128, TOL_PRECISE);
-    assert_approx_eq!(frac_1_pi, 1f128 / pi, TOL_PRECISE);
-    assert_approx_eq!(frac_2_pi, 2f128 / pi, TOL_PRECISE);
-
-    #[cfg(not(miri))]
-    #[cfg(target_has_reliable_f128_math)]
-    {
-        let frac_2_sqrtpi: f128 = consts::FRAC_2_SQRT_PI;
-        let sqrt2: f128 = consts::SQRT_2;
-        let frac_1_sqrt2: f128 = consts::FRAC_1_SQRT_2;
-        let e: f128 = consts::E;
-        let log2_e: f128 = consts::LOG2_E;
-        let log10_e: f128 = consts::LOG10_E;
-        let ln_2: f128 = consts::LN_2;
-        let ln_10: f128 = consts::LN_10;
-
-        assert_approx_eq!(frac_2_sqrtpi, 2f128 / pi.sqrt(), TOL_PRECISE);
-        assert_approx_eq!(sqrt2, 2f128.sqrt(), TOL_PRECISE);
-        assert_approx_eq!(frac_1_sqrt2, 1f128 / 2f128.sqrt(), TOL_PRECISE);
-        assert_approx_eq!(log2_e, e.log2(), TOL_PRECISE);
-        assert_approx_eq!(log10_e, e.log10(), TOL_PRECISE);
-        assert_approx_eq!(ln_2, 2f128.ln(), TOL_PRECISE);
-        assert_approx_eq!(ln_10, 10f128.ln(), TOL_PRECISE);
-    }
-}
diff --git a/library/std/tests/floats/f16.rs b/library/std/tests/floats/f16.rs
deleted file mode 100644
index cc0960765f41..000000000000
--- a/library/std/tests/floats/f16.rs
+++ /dev/null
@@ -1,297 +0,0 @@
-#![cfg(target_has_reliable_f16)]
-
-use std::f16::consts;
-
-/// Tolerance for results on the order of 10.0e-2
-#[allow(unused)]
-const TOL_N2: f16 = 0.0001;
-
-/// Tolerance for results on the order of 10.0e+0
-#[allow(unused)]
-const TOL_0: f16 = 0.01;
-
-/// Tolerance for results on the order of 10.0e+2
-#[allow(unused)]
-const TOL_P2: f16 = 0.5;
-
-/// Tolerance for results on the order of 10.0e+4
-#[allow(unused)]
-const TOL_P4: f16 = 10.0;
-
-/// Compare by representation
-#[allow(unused_macros)]
-macro_rules! assert_f16_biteq {
-    ($a:expr, $b:expr) => {
-        let (l, r): (&f16, &f16) = (&$a, &$b);
-        let lb = l.to_bits();
-        let rb = r.to_bits();
-        assert_eq!(lb, rb, "float {l:?} ({lb:#04x}) is not bitequal to {r:?} ({rb:#04x})");
-    };
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f16_math)]
-fn test_powf() {
-    let nan: f16 = f16::NAN;
-    let inf: f16 = f16::INFINITY;
-    let neg_inf: f16 = f16::NEG_INFINITY;
-    assert_eq!(1.0f16.powf(1.0), 1.0);
-    assert_approx_eq!(3.4f16.powf(4.5), 246.408183, TOL_P2);
-    assert_approx_eq!(2.7f16.powf(-3.2), 0.041652, TOL_N2);
-    assert_approx_eq!((-3.1f16).powf(2.0), 9.61, TOL_P2);
-    assert_approx_eq!(5.9f16.powf(-2.0), 0.028727, TOL_N2);
-    assert_eq!(8.3f16.powf(0.0), 1.0);
-    assert!(nan.powf(2.0).is_nan());
-    assert_eq!(inf.powf(2.0), inf);
-    assert_eq!(neg_inf.powf(3.0), neg_inf);
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f16_math)]
-fn test_exp() {
-    assert_eq!(1.0, 0.0f16.exp());
-    assert_approx_eq!(2.718282, 1.0f16.exp(), TOL_0);
-    assert_approx_eq!(148.413159, 5.0f16.exp(), TOL_0);
-
-    let inf: f16 = f16::INFINITY;
-    let neg_inf: f16 = f16::NEG_INFINITY;
-    let nan: f16 = f16::NAN;
-    assert_eq!(inf, inf.exp());
-    assert_eq!(0.0, neg_inf.exp());
-    assert!(nan.exp().is_nan());
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f16_math)]
-fn test_exp2() {
-    assert_eq!(32.0, 5.0f16.exp2());
-    assert_eq!(1.0, 0.0f16.exp2());
-
-    let inf: f16 = f16::INFINITY;
-    let neg_inf: f16 = f16::NEG_INFINITY;
-    let nan: f16 = f16::NAN;
-    assert_eq!(inf, inf.exp2());
-    assert_eq!(0.0, neg_inf.exp2());
-    assert!(nan.exp2().is_nan());
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f16_math)]
-fn test_ln() {
-    let nan: f16 = f16::NAN;
-    let inf: f16 = f16::INFINITY;
-    let neg_inf: f16 = f16::NEG_INFINITY;
-    assert_approx_eq!(1.0f16.exp().ln(), 1.0, TOL_0);
-    assert!(nan.ln().is_nan());
-    assert_eq!(inf.ln(), inf);
-    assert!(neg_inf.ln().is_nan());
-    assert!((-2.3f16).ln().is_nan());
-    assert_eq!((-0.0f16).ln(), neg_inf);
-    assert_eq!(0.0f16.ln(), neg_inf);
-    assert_approx_eq!(4.0f16.ln(), 1.386294, TOL_0);
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f16_math)]
-fn test_log() {
-    let nan: f16 = f16::NAN;
-    let inf: f16 = f16::INFINITY;
-    let neg_inf: f16 = f16::NEG_INFINITY;
-    assert_eq!(10.0f16.log(10.0), 1.0);
-    assert_approx_eq!(2.3f16.log(3.5), 0.664858, TOL_0);
-    assert_eq!(1.0f16.exp().log(1.0f16.exp()), 1.0);
-    assert!(1.0f16.log(1.0).is_nan());
-    assert!(1.0f16.log(-13.9).is_nan());
-    assert!(nan.log(2.3).is_nan());
-    assert_eq!(inf.log(10.0), inf);
-    assert!(neg_inf.log(8.8).is_nan());
-    assert!((-2.3f16).log(0.1).is_nan());
-    assert_eq!((-0.0f16).log(2.0), neg_inf);
-    assert_eq!(0.0f16.log(7.0), neg_inf);
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f16_math)]
-fn test_log2() {
-    let nan: f16 = f16::NAN;
-    let inf: f16 = f16::INFINITY;
-    let neg_inf: f16 = f16::NEG_INFINITY;
-    assert_approx_eq!(10.0f16.log2(), 3.321928, TOL_0);
-    assert_approx_eq!(2.3f16.log2(), 1.201634, TOL_0);
-    assert_approx_eq!(1.0f16.exp().log2(), 1.442695, TOL_0);
-    assert!(nan.log2().is_nan());
-    assert_eq!(inf.log2(), inf);
-    assert!(neg_inf.log2().is_nan());
-    assert!((-2.3f16).log2().is_nan());
-    assert_eq!((-0.0f16).log2(), neg_inf);
-    assert_eq!(0.0f16.log2(), neg_inf);
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f16_math)]
-fn test_log10() {
-    let nan: f16 = f16::NAN;
-    let inf: f16 = f16::INFINITY;
-    let neg_inf: f16 = f16::NEG_INFINITY;
-    assert_eq!(10.0f16.log10(), 1.0);
-    assert_approx_eq!(2.3f16.log10(), 0.361728, TOL_0);
-    assert_approx_eq!(1.0f16.exp().log10(), 0.434294, TOL_0);
-    assert_eq!(1.0f16.log10(), 0.0);
-    assert!(nan.log10().is_nan());
-    assert_eq!(inf.log10(), inf);
-    assert!(neg_inf.log10().is_nan());
-    assert!((-2.3f16).log10().is_nan());
-    assert_eq!((-0.0f16).log10(), neg_inf);
-    assert_eq!(0.0f16.log10(), neg_inf);
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f16_math)]
-fn test_asinh() {
-    assert_eq!(0.0f16.asinh(), 0.0f16);
-    assert_eq!((-0.0f16).asinh(), -0.0f16);
-
-    let inf: f16 = f16::INFINITY;
-    let neg_inf: f16 = f16::NEG_INFINITY;
-    let nan: f16 = f16::NAN;
-    assert_eq!(inf.asinh(), inf);
-    assert_eq!(neg_inf.asinh(), neg_inf);
-    assert!(nan.asinh().is_nan());
-    assert!((-0.0f16).asinh().is_sign_negative());
-    // issue 63271
-    assert_approx_eq!(2.0f16.asinh(), 1.443635475178810342493276740273105f16, TOL_0);
-    assert_approx_eq!((-2.0f16).asinh(), -1.443635475178810342493276740273105f16, TOL_0);
-    // regression test for the catastrophic cancellation fixed in 72486
-    assert_approx_eq!((-200.0f16).asinh(), -5.991470797049389, TOL_0);
-
-    // test for low accuracy from issue 104548
-    assert_approx_eq!(10.0f16, 10.0f16.sinh().asinh(), TOL_0);
-    // mul needed for approximate comparison to be meaningful
-    assert_approx_eq!(1.0f16, 1e-3f16.sinh().asinh() * 1e3f16, TOL_0);
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f16_math)]
-fn test_acosh() {
-    assert_eq!(1.0f16.acosh(), 0.0f16);
-    assert!(0.999f16.acosh().is_nan());
-
-    let inf: f16 = f16::INFINITY;
-    let neg_inf: f16 = f16::NEG_INFINITY;
-    let nan: f16 = f16::NAN;
-    assert_eq!(inf.acosh(), inf);
-    assert!(neg_inf.acosh().is_nan());
-    assert!(nan.acosh().is_nan());
-    assert_approx_eq!(2.0f16.acosh(), 1.31695789692481670862504634730796844f16, TOL_0);
-    assert_approx_eq!(3.0f16.acosh(), 1.76274717403908605046521864995958461f16, TOL_0);
-
-    // test for low accuracy from issue 104548
-    assert_approx_eq!(10.0f16, 10.0f16.cosh().acosh(), TOL_P2);
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f16_math)]
-fn test_atanh() {
-    assert_eq!(0.0f16.atanh(), 0.0f16);
-    assert_eq!((-0.0f16).atanh(), -0.0f16);
-
-    let inf: f16 = f16::INFINITY;
-    let neg_inf: f16 = f16::NEG_INFINITY;
-    let nan: f16 = f16::NAN;
-    assert_eq!(1.0f16.atanh(), inf);
-    assert_eq!((-1.0f16).atanh(), neg_inf);
-    assert!(2f16.atanh().atanh().is_nan());
-    assert!((-2f16).atanh().atanh().is_nan());
-    assert!(inf.atanh().is_nan());
-    assert!(neg_inf.atanh().is_nan());
-    assert!(nan.atanh().is_nan());
-    assert_approx_eq!(0.5f16.atanh(), 0.54930614433405484569762261846126285f16, TOL_0);
-    assert_approx_eq!((-0.5f16).atanh(), -0.54930614433405484569762261846126285f16, TOL_0);
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f16_math)]
-fn test_gamma() {
-    // precision can differ among platforms
-    assert_approx_eq!(1.0f16.gamma(), 1.0f16, TOL_0);
-    assert_approx_eq!(2.0f16.gamma(), 1.0f16, TOL_0);
-    assert_approx_eq!(3.0f16.gamma(), 2.0f16, TOL_0);
-    assert_approx_eq!(4.0f16.gamma(), 6.0f16, TOL_0);
-    assert_approx_eq!(5.0f16.gamma(), 24.0f16, TOL_0);
-    assert_approx_eq!(0.5f16.gamma(), consts::PI.sqrt(), TOL_0);
-    assert_approx_eq!((-0.5f16).gamma(), -2.0 * consts::PI.sqrt(), TOL_0);
-    assert_eq!(0.0f16.gamma(), f16::INFINITY);
-    assert_eq!((-0.0f16).gamma(), f16::NEG_INFINITY);
-    assert!((-1.0f16).gamma().is_nan());
-    assert!((-2.0f16).gamma().is_nan());
-    assert!(f16::NAN.gamma().is_nan());
-    assert!(f16::NEG_INFINITY.gamma().is_nan());
-    assert_eq!(f16::INFINITY.gamma(), f16::INFINITY);
-    assert_eq!(171.71f16.gamma(), f16::INFINITY);
-}
-
-#[test]
-#[cfg(not(miri))]
-#[cfg(target_has_reliable_f16_math)]
-fn test_ln_gamma() {
-    assert_approx_eq!(1.0f16.ln_gamma().0, 0.0f16, TOL_0);
-    assert_eq!(1.0f16.ln_gamma().1, 1);
-    assert_approx_eq!(2.0f16.ln_gamma().0, 0.0f16, TOL_0);
-    assert_eq!(2.0f16.ln_gamma().1, 1);
-    assert_approx_eq!(3.0f16.ln_gamma().0, 2.0f16.ln(), TOL_0);
-    assert_eq!(3.0f16.ln_gamma().1, 1);
-    assert_approx_eq!((-0.5f16).ln_gamma().0, (2.0 * consts::PI.sqrt()).ln(), TOL_0);
-    assert_eq!((-0.5f16).ln_gamma().1, -1);
-}
-
-#[test]
-fn test_real_consts() {
-    let pi: f16 = consts::PI;
-    let frac_pi_2: f16 = consts::FRAC_PI_2;
-    let frac_pi_3: f16 = consts::FRAC_PI_3;
-    let frac_pi_4: f16 = consts::FRAC_PI_4;
-    let frac_pi_6: f16 = consts::FRAC_PI_6;
-    let frac_pi_8: f16 = consts::FRAC_PI_8;
-    let frac_1_pi: f16 = consts::FRAC_1_PI;
-    let frac_2_pi: f16 = consts::FRAC_2_PI;
-
-    assert_approx_eq!(frac_pi_2, pi / 2f16, TOL_0);
-    assert_approx_eq!(frac_pi_3, pi / 3f16, TOL_0);
-    assert_approx_eq!(frac_pi_4, pi / 4f16, TOL_0);
-    assert_approx_eq!(frac_pi_6, pi / 6f16, TOL_0);
-    assert_approx_eq!(frac_pi_8, pi / 8f16, TOL_0);
-    assert_approx_eq!(frac_1_pi, 1f16 / pi, TOL_0);
-    assert_approx_eq!(frac_2_pi, 2f16 / pi, TOL_0);
-
-    #[cfg(not(miri))]
-    #[cfg(target_has_reliable_f16_math)]
-    {
-        let frac_2_sqrtpi: f16 = consts::FRAC_2_SQRT_PI;
-        let sqrt2: f16 = consts::SQRT_2;
-        let frac_1_sqrt2: f16 = consts::FRAC_1_SQRT_2;
-        let e: f16 = consts::E;
-        let log2_e: f16 = consts::LOG2_E;
-        let log10_e: f16 = consts::LOG10_E;
-        let ln_2: f16 = consts::LN_2;
-        let ln_10: f16 = consts::LN_10;
-
-        assert_approx_eq!(frac_2_sqrtpi, 2f16 / pi.sqrt(), TOL_0);
-        assert_approx_eq!(sqrt2, 2f16.sqrt(), TOL_0);
-        assert_approx_eq!(frac_1_sqrt2, 1f16 / 2f16.sqrt(), TOL_0);
-        assert_approx_eq!(log2_e, e.log2(), TOL_0);
-        assert_approx_eq!(log10_e, e.log10(), TOL_0);
-        assert_approx_eq!(ln_2, 2f16.ln(), TOL_0);
-        assert_approx_eq!(ln_10, 10f16.ln(), TOL_0);
-    }
-}
diff --git a/library/std/tests/floats/f32.rs b/library/std/tests/floats/f32.rs
deleted file mode 100644
index 3acd06709141..000000000000
--- a/library/std/tests/floats/f32.rs
+++ /dev/null
@@ -1,258 +0,0 @@
-use std::f32::consts;
-
-/// Miri adds some extra errors to float functions; make sure the tests still pass.
-/// These values are purely used as a canary to test against and are thus not a stable guarantee Rust provides.
-/// They serve as a way to get an idea of the real precision of floating point operations on different platforms.
-const APPROX_DELTA: f32 = if cfg!(miri) { 1e-3 } else { 1e-6 };
-
-#[allow(unused_macros)]
-macro_rules! assert_f32_biteq {
-    ($left : expr, $right : expr) => {
-        let l: &f32 = &$left;
-        let r: &f32 = &$right;
-        let lb = l.to_bits();
-        let rb = r.to_bits();
-        assert_eq!(lb, rb, "float {l} ({lb:#010x}) is not bitequal to {r} ({rb:#010x})");
-    };
-}
-
-#[test]
-fn test_powf() {
-    let nan: f32 = f32::NAN;
-    let inf: f32 = f32::INFINITY;
-    let neg_inf: f32 = f32::NEG_INFINITY;
-    assert_eq!(1.0f32.powf(1.0), 1.0);
-    assert_approx_eq!(3.4f32.powf(4.5), 246.408218, APPROX_DELTA);
-    assert_approx_eq!(2.7f32.powf(-3.2), 0.041652);
-    assert_approx_eq!((-3.1f32).powf(2.0), 9.61, APPROX_DELTA);
-    assert_approx_eq!(5.9f32.powf(-2.0), 0.028727);
-    assert_eq!(8.3f32.powf(0.0), 1.0);
-    assert!(nan.powf(2.0).is_nan());
-    assert_eq!(inf.powf(2.0), inf);
-    assert_eq!(neg_inf.powf(3.0), neg_inf);
-}
-
-#[test]
-fn test_exp() {
-    assert_eq!(1.0, 0.0f32.exp());
-    assert_approx_eq!(2.718282, 1.0f32.exp(), APPROX_DELTA);
-    assert_approx_eq!(148.413162, 5.0f32.exp(), APPROX_DELTA);
-
-    let inf: f32 = f32::INFINITY;
-    let neg_inf: f32 = f32::NEG_INFINITY;
-    let nan: f32 = f32::NAN;
-    assert_eq!(inf, inf.exp());
-    assert_eq!(0.0, neg_inf.exp());
-    assert!(nan.exp().is_nan());
-}
-
-#[test]
-fn test_exp2() {
-    assert_approx_eq!(32.0, 5.0f32.exp2(), APPROX_DELTA);
-    assert_eq!(1.0, 0.0f32.exp2());
-
-    let inf: f32 = f32::INFINITY;
-    let neg_inf: f32 = f32::NEG_INFINITY;
-    let nan: f32 = f32::NAN;
-    assert_eq!(inf, inf.exp2());
-    assert_eq!(0.0, neg_inf.exp2());
-    assert!(nan.exp2().is_nan());
-}
-
-#[test]
-fn test_ln() {
-    let nan: f32 = f32::NAN;
-    let inf: f32 = f32::INFINITY;
-    let neg_inf: f32 = f32::NEG_INFINITY;
-    assert_approx_eq!(1.0f32.exp().ln(), 1.0);
-    assert!(nan.ln().is_nan());
-    assert_eq!(inf.ln(), inf);
-    assert!(neg_inf.ln().is_nan());
-    assert!((-2.3f32).ln().is_nan());
-    assert_eq!((-0.0f32).ln(), neg_inf);
-    assert_eq!(0.0f32.ln(), neg_inf);
-    assert_approx_eq!(4.0f32.ln(), 1.386294, APPROX_DELTA);
-}
-
-#[test]
-fn test_log() {
-    let nan: f32 = f32::NAN;
-    let inf: f32 = f32::INFINITY;
-    let neg_inf: f32 = f32::NEG_INFINITY;
-    assert_approx_eq!(10.0f32.log(10.0), 1.0);
-    assert_approx_eq!(2.3f32.log(3.5), 0.664858);
-    assert_approx_eq!(1.0f32.exp().log(1.0f32.exp()), 1.0, APPROX_DELTA);
-    assert!(1.0f32.log(1.0).is_nan());
-    assert!(1.0f32.log(-13.9).is_nan());
-    assert!(nan.log(2.3).is_nan());
-    assert_eq!(inf.log(10.0), inf);
-    assert!(neg_inf.log(8.8).is_nan());
-    assert!((-2.3f32).log(0.1).is_nan());
-    assert_eq!((-0.0f32).log(2.0), neg_inf);
-    assert_eq!(0.0f32.log(7.0), neg_inf);
-}
-
-#[test]
-fn test_log2() {
-    let nan: f32 = f32::NAN;
-    let inf: f32 = f32::INFINITY;
-    let neg_inf: f32 = f32::NEG_INFINITY;
-    assert_approx_eq!(10.0f32.log2(), 3.321928, APPROX_DELTA);
-    assert_approx_eq!(2.3f32.log2(), 1.201634);
-    assert_approx_eq!(1.0f32.exp().log2(), 1.442695, APPROX_DELTA);
-    assert!(nan.log2().is_nan());
-    assert_eq!(inf.log2(), inf);
-    assert!(neg_inf.log2().is_nan());
-    assert!((-2.3f32).log2().is_nan());
-    assert_eq!((-0.0f32).log2(), neg_inf);
-    assert_eq!(0.0f32.log2(), neg_inf);
-}
-
-#[test]
-fn test_log10() {
-    let nan: f32 = f32::NAN;
-    let inf: f32 = f32::INFINITY;
-    let neg_inf: f32 = f32::NEG_INFINITY;
-    assert_approx_eq!(10.0f32.log10(), 1.0);
-    assert_approx_eq!(2.3f32.log10(), 0.361728);
-    assert_approx_eq!(1.0f32.exp().log10(), 0.434294);
-    assert_eq!(1.0f32.log10(), 0.0);
-    assert!(nan.log10().is_nan());
-    assert_eq!(inf.log10(), inf);
-    assert!(neg_inf.log10().is_nan());
-    assert!((-2.3f32).log10().is_nan());
-    assert_eq!((-0.0f32).log10(), neg_inf);
-    assert_eq!(0.0f32.log10(), neg_inf);
-}
-
-#[test]
-fn test_asinh() {
-    assert_eq!(0.0f32.asinh(), 0.0f32);
-    assert_eq!((-0.0f32).asinh(), -0.0f32);
-
-    let inf: f32 = f32::INFINITY;
-    let neg_inf: f32 = f32::NEG_INFINITY;
-    let nan: f32 = f32::NAN;
-    assert_eq!(inf.asinh(), inf);
-    assert_eq!(neg_inf.asinh(), neg_inf);
-    assert!(nan.asinh().is_nan());
-    assert!((-0.0f32).asinh().is_sign_negative()); // issue 63271
-    assert_approx_eq!(2.0f32.asinh(), 1.443635475178810342493276740273105f32);
-    assert_approx_eq!((-2.0f32).asinh(), -1.443635475178810342493276740273105f32);
-    // regression test for the catastrophic cancellation fixed in 72486
-    assert_approx_eq!((-3000.0f32).asinh(), -8.699514775987968673236893537700647f32, APPROX_DELTA);
-
-    // test for low accuracy from issue 104548
-    assert_approx_eq!(60.0f32, 60.0f32.sinh().asinh(), APPROX_DELTA);
-    // mul needed for approximate comparison to be meaningful
-    assert_approx_eq!(1.0f32, 1e-15f32.sinh().asinh() * 1e15f32);
-}
-
-#[test]
-fn test_acosh() {
-    assert_eq!(1.0f32.acosh(), 0.0f32);
-    assert!(0.999f32.acosh().is_nan());
-
-    let inf: f32 = f32::INFINITY;
-    let neg_inf: f32 = f32::NEG_INFINITY;
-    let nan: f32 = f32::NAN;
-    assert_eq!(inf.acosh(), inf);
-    assert!(neg_inf.acosh().is_nan());
-    assert!(nan.acosh().is_nan());
-    assert_approx_eq!(2.0f32.acosh(), 1.31695789692481670862504634730796844f32);
-    assert_approx_eq!(3.0f32.acosh(), 1.76274717403908605046521864995958461f32);
-
-    // test for low accuracy from issue 104548
-    assert_approx_eq!(60.0f32, 60.0f32.cosh().acosh(), APPROX_DELTA);
-}
-
-#[test]
-fn test_atanh() {
-    assert_eq!(0.0f32.atanh(), 0.0f32);
-    assert_eq!((-0.0f32).atanh(), -0.0f32);
-
-    let inf32: f32 = f32::INFINITY;
-    let neg_inf32: f32 = f32::NEG_INFINITY;
-    assert_eq!(1.0f32.atanh(), inf32);
-    assert_eq!((-1.0f32).atanh(), neg_inf32);
-
-    assert!(2f64.atanh().atanh().is_nan());
-    assert!((-2f64).atanh().atanh().is_nan());
-
-    let inf64: f32 = f32::INFINITY;
-    let neg_inf64: f32 = f32::NEG_INFINITY;
-    let nan32: f32 = f32::NAN;
-    assert!(inf64.atanh().is_nan());
-    assert!(neg_inf64.atanh().is_nan());
-    assert!(nan32.atanh().is_nan());
-
-    assert_approx_eq!(0.5f32.atanh(), 0.54930614433405484569762261846126285f32);
-    assert_approx_eq!((-0.5f32).atanh(), -0.54930614433405484569762261846126285f32);
-}
-
-#[test]
-fn test_gamma() {
-    // precision can differ between platforms
-    assert_approx_eq!(1.0f32.gamma(), 1.0f32, APPROX_DELTA);
-    assert_approx_eq!(2.0f32.gamma(), 1.0f32, APPROX_DELTA);
-    assert_approx_eq!(3.0f32.gamma(), 2.0f32, APPROX_DELTA);
-    assert_approx_eq!(4.0f32.gamma(), 6.0f32, APPROX_DELTA);
-    assert_approx_eq!(5.0f32.gamma(), 24.0f32, APPROX_DELTA);
-    assert_approx_eq!(0.5f32.gamma(), consts::PI.sqrt(), APPROX_DELTA);
-    assert_approx_eq!((-0.5f32).gamma(), -2.0 * consts::PI.sqrt(), APPROX_DELTA);
-    assert_eq!(0.0f32.gamma(), f32::INFINITY);
-    assert_eq!((-0.0f32).gamma(), f32::NEG_INFINITY);
-    assert!((-1.0f32).gamma().is_nan());
-    assert!((-2.0f32).gamma().is_nan());
-    assert!(f32::NAN.gamma().is_nan());
-    assert!(f32::NEG_INFINITY.gamma().is_nan());
-    assert_eq!(f32::INFINITY.gamma(), f32::INFINITY);
-    assert_eq!(171.71f32.gamma(), f32::INFINITY);
-}
-
-#[test]
-fn test_ln_gamma() {
-    assert_approx_eq!(1.0f32.ln_gamma().0, 0.0f32);
-    assert_eq!(1.0f32.ln_gamma().1, 1);
-    assert_approx_eq!(2.0f32.ln_gamma().0, 0.0f32);
-    assert_eq!(2.0f32.ln_gamma().1, 1);
-    assert_approx_eq!(3.0f32.ln_gamma().0, 2.0f32.ln());
-    assert_eq!(3.0f32.ln_gamma().1, 1);
-    assert_approx_eq!((-0.5f32).ln_gamma().0, (2.0 * consts::PI.sqrt()).ln(), APPROX_DELTA);
-    assert_eq!((-0.5f32).ln_gamma().1, -1);
-}
-
-#[test]
-fn test_real_consts() {
-    let pi: f32 = consts::PI;
-    let frac_pi_2: f32 = consts::FRAC_PI_2;
-    let frac_pi_3: f32 = consts::FRAC_PI_3;
-    let frac_pi_4: f32 = consts::FRAC_PI_4;
-    let frac_pi_6: f32 = consts::FRAC_PI_6;
-    let frac_pi_8: f32 = consts::FRAC_PI_8;
-    let frac_1_pi: f32 = consts::FRAC_1_PI;
-    let frac_2_pi: f32 = consts::FRAC_2_PI;
-    let frac_2_sqrtpi: f32 = consts::FRAC_2_SQRT_PI;
-    let sqrt2: f32 = consts::SQRT_2;
-    let frac_1_sqrt2: f32 = consts::FRAC_1_SQRT_2;
-    let e: f32 = consts::E;
-    let log2_e: f32 = consts::LOG2_E;
-    let log10_e: f32 = consts::LOG10_E;
-    let ln_2: f32 = consts::LN_2;
-    let ln_10: f32 = consts::LN_10;
-
-    assert_approx_eq!(frac_pi_2, pi / 2f32);
-    assert_approx_eq!(frac_pi_3, pi / 3f32, APPROX_DELTA);
-    assert_approx_eq!(frac_pi_4, pi / 4f32);
-    assert_approx_eq!(frac_pi_6, pi / 6f32);
-    assert_approx_eq!(frac_pi_8, pi / 8f32);
-    assert_approx_eq!(frac_1_pi, 1f32 / pi);
-    assert_approx_eq!(frac_2_pi, 2f32 / pi);
-    assert_approx_eq!(frac_2_sqrtpi, 2f32 / pi.sqrt());
-    assert_approx_eq!(sqrt2, 2f32.sqrt());
-    assert_approx_eq!(frac_1_sqrt2, 1f32 / 2f32.sqrt());
-    assert_approx_eq!(log2_e, e.log2());
-    assert_approx_eq!(log10_e, e.log10());
-    assert_approx_eq!(ln_2, 2f32.ln());
-    assert_approx_eq!(ln_10, 10f32.ln(), APPROX_DELTA);
-}
diff --git a/library/std/tests/floats/f64.rs b/library/std/tests/floats/f64.rs
deleted file mode 100644
index fccf20097278..000000000000
--- a/library/std/tests/floats/f64.rs
+++ /dev/null
@@ -1,249 +0,0 @@
-use std::f64::consts;
-
-#[allow(unused_macros)]
-macro_rules! assert_f64_biteq {
-    ($left : expr, $right : expr) => {
-        let l: &f64 = &$left;
-        let r: &f64 = &$right;
-        let lb = l.to_bits();
-        let rb = r.to_bits();
-        assert_eq!(lb, rb, "float {l} ({lb:#018x}) is not bitequal to {r} ({rb:#018x})");
-    };
-}
-
-#[test]
-fn test_powf() {
-    let nan: f64 = f64::NAN;
-    let inf: f64 = f64::INFINITY;
-    let neg_inf: f64 = f64::NEG_INFINITY;
-    assert_eq!(1.0f64.powf(1.0), 1.0);
-    assert_approx_eq!(3.4f64.powf(4.5), 246.408183);
-    assert_approx_eq!(2.7f64.powf(-3.2), 0.041652);
-    assert_approx_eq!((-3.1f64).powf(2.0), 9.61);
-    assert_approx_eq!(5.9f64.powf(-2.0), 0.028727);
-    assert_eq!(8.3f64.powf(0.0), 1.0);
-    assert!(nan.powf(2.0).is_nan());
-    assert_eq!(inf.powf(2.0), inf);
-    assert_eq!(neg_inf.powf(3.0), neg_inf);
-}
-
-#[test]
-fn test_exp() {
-    assert_eq!(1.0, 0.0f64.exp());
-    assert_approx_eq!(2.718282, 1.0f64.exp());
-    assert_approx_eq!(148.413159, 5.0f64.exp());
-
-    let inf: f64 = f64::INFINITY;
-    let neg_inf: f64 = f64::NEG_INFINITY;
-    let nan: f64 = f64::NAN;
-    assert_eq!(inf, inf.exp());
-    assert_eq!(0.0, neg_inf.exp());
-    assert!(nan.exp().is_nan());
-}
-
-#[test]
-fn test_exp2() {
-    assert_approx_eq!(32.0, 5.0f64.exp2());
-    assert_eq!(1.0, 0.0f64.exp2());
-
-    let inf: f64 = f64::INFINITY;
-    let neg_inf: f64 = f64::NEG_INFINITY;
-    let nan: f64 = f64::NAN;
-    assert_eq!(inf, inf.exp2());
-    assert_eq!(0.0, neg_inf.exp2());
-    assert!(nan.exp2().is_nan());
-}
-
-#[test]
-fn test_ln() {
-    let nan: f64 = f64::NAN;
-    let inf: f64 = f64::INFINITY;
-    let neg_inf: f64 = f64::NEG_INFINITY;
-    assert_approx_eq!(1.0f64.exp().ln(), 1.0);
-    assert!(nan.ln().is_nan());
-    assert_eq!(inf.ln(), inf);
-    assert!(neg_inf.ln().is_nan());
-    assert!((-2.3f64).ln().is_nan());
-    assert_eq!((-0.0f64).ln(), neg_inf);
-    assert_eq!(0.0f64.ln(), neg_inf);
-    assert_approx_eq!(4.0f64.ln(), 1.386294);
-}
-
-#[test]
-fn test_log() {
-    let nan: f64 = f64::NAN;
-    let inf: f64 = f64::INFINITY;
-    let neg_inf: f64 = f64::NEG_INFINITY;
-    assert_approx_eq!(10.0f64.log(10.0), 1.0);
-    assert_approx_eq!(2.3f64.log(3.5), 0.664858);
-    assert_approx_eq!(1.0f64.exp().log(1.0f64.exp()), 1.0);
-    assert!(1.0f64.log(1.0).is_nan());
-    assert!(1.0f64.log(-13.9).is_nan());
-    assert!(nan.log(2.3).is_nan());
-    assert_eq!(inf.log(10.0), inf);
-    assert!(neg_inf.log(8.8).is_nan());
-    assert!((-2.3f64).log(0.1).is_nan());
-    assert_eq!((-0.0f64).log(2.0), neg_inf);
-    assert_eq!(0.0f64.log(7.0), neg_inf);
-}
-
-#[test]
-fn test_log2() {
-    let nan: f64 = f64::NAN;
-    let inf: f64 = f64::INFINITY;
-    let neg_inf: f64 = f64::NEG_INFINITY;
-    assert_approx_eq!(10.0f64.log2(), 3.321928);
-    assert_approx_eq!(2.3f64.log2(), 1.201634);
-    assert_approx_eq!(1.0f64.exp().log2(), 1.442695);
-    assert!(nan.log2().is_nan());
-    assert_eq!(inf.log2(), inf);
-    assert!(neg_inf.log2().is_nan());
-    assert!((-2.3f64).log2().is_nan());
-    assert_eq!((-0.0f64).log2(), neg_inf);
-    assert_eq!(0.0f64.log2(), neg_inf);
-}
-
-#[test]
-fn test_log10() {
-    let nan: f64 = f64::NAN;
-    let inf: f64 = f64::INFINITY;
-    let neg_inf: f64 = f64::NEG_INFINITY;
-    assert_approx_eq!(10.0f64.log10(), 1.0);
-    assert_approx_eq!(2.3f64.log10(), 0.361728);
-    assert_approx_eq!(1.0f64.exp().log10(), 0.434294);
-    assert_eq!(1.0f64.log10(), 0.0);
-    assert!(nan.log10().is_nan());
-    assert_eq!(inf.log10(), inf);
-    assert!(neg_inf.log10().is_nan());
-    assert!((-2.3f64).log10().is_nan());
-    assert_eq!((-0.0f64).log10(), neg_inf);
-    assert_eq!(0.0f64.log10(), neg_inf);
-}
-
-#[test]
-fn test_asinh() {
-    assert_eq!(0.0f64.asinh(), 0.0f64);
-    assert_eq!((-0.0f64).asinh(), -0.0f64);
-
-    let inf: f64 = f64::INFINITY;
-    let neg_inf: f64 = f64::NEG_INFINITY;
-    let nan: f64 = f64::NAN;
-    assert_eq!(inf.asinh(), inf);
-    assert_eq!(neg_inf.asinh(), neg_inf);
-    assert!(nan.asinh().is_nan());
-    assert!((-0.0f64).asinh().is_sign_negative());
-    // issue 63271
-    assert_approx_eq!(2.0f64.asinh(), 1.443635475178810342493276740273105f64);
-    assert_approx_eq!((-2.0f64).asinh(), -1.443635475178810342493276740273105f64);
-    // regression test for the catastrophic cancellation fixed in 72486
-    assert_approx_eq!((-67452098.07139316f64).asinh(), -18.72007542627454439398548429400083);
-
-    // test for low accuracy from issue 104548
-    assert_approx_eq!(60.0f64, 60.0f64.sinh().asinh());
-    // mul needed for approximate comparison to be meaningful
-    assert_approx_eq!(1.0f64, 1e-15f64.sinh().asinh() * 1e15f64);
-}
-
-#[test]
-fn test_acosh() {
-    assert_eq!(1.0f64.acosh(), 0.0f64);
-    assert!(0.999f64.acosh().is_nan());
-
-    let inf: f64 = f64::INFINITY;
-    let neg_inf: f64 = f64::NEG_INFINITY;
-    let nan: f64 = f64::NAN;
-    assert_eq!(inf.acosh(), inf);
-    assert!(neg_inf.acosh().is_nan());
-    assert!(nan.acosh().is_nan());
-    assert_approx_eq!(2.0f64.acosh(), 1.31695789692481670862504634730796844f64);
-    assert_approx_eq!(3.0f64.acosh(), 1.76274717403908605046521864995958461f64);
-
-    // test for low accuracy from issue 104548
-    assert_approx_eq!(60.0f64, 60.0f64.cosh().acosh());
-}
-
-#[test]
-fn test_atanh() {
-    assert_eq!(0.0f64.atanh(), 0.0f64);
-    assert_eq!((-0.0f64).atanh(), -0.0f64);
-
-    let inf: f64 = f64::INFINITY;
-    let neg_inf: f64 = f64::NEG_INFINITY;
-    let nan: f64 = f64::NAN;
-    assert_eq!(1.0f64.atanh(), inf);
-    assert_eq!((-1.0f64).atanh(), neg_inf);
-    assert!(2f64.atanh().atanh().is_nan());
-    assert!((-2f64).atanh().atanh().is_nan());
-    assert!(inf.atanh().is_nan());
-    assert!(neg_inf.atanh().is_nan());
-    assert!(nan.atanh().is_nan());
-    assert_approx_eq!(0.5f64.atanh(), 0.54930614433405484569762261846126285f64);
-    assert_approx_eq!((-0.5f64).atanh(), -0.54930614433405484569762261846126285f64);
-}
-
-#[test]
-fn test_gamma() {
-    // precision can differ between platforms
-    assert_approx_eq!(1.0f64.gamma(), 1.0f64);
-    assert_approx_eq!(2.0f64.gamma(), 1.0f64);
-    assert_approx_eq!(3.0f64.gamma(), 2.0f64);
-    assert_approx_eq!(4.0f64.gamma(), 6.0f64);
-    assert_approx_eq!(5.0f64.gamma(), 24.0f64);
-    assert_approx_eq!(0.5f64.gamma(), consts::PI.sqrt());
-    assert_approx_eq!((-0.5f64).gamma(), -2.0 * consts::PI.sqrt());
-    assert_eq!(0.0f64.gamma(), f64::INFINITY);
-    assert_eq!((-0.0f64).gamma(), f64::NEG_INFINITY);
-    assert!((-1.0f64).gamma().is_nan());
-    assert!((-2.0f64).gamma().is_nan());
-    assert!(f64::NAN.gamma().is_nan());
-    assert!(f64::NEG_INFINITY.gamma().is_nan());
-    assert_eq!(f64::INFINITY.gamma(), f64::INFINITY);
-    assert_eq!(171.71f64.gamma(), f64::INFINITY);
-}
-
-#[test]
-fn test_ln_gamma() {
-    assert_approx_eq!(1.0f64.ln_gamma().0, 0.0f64);
-    assert_eq!(1.0f64.ln_gamma().1, 1);
-    assert_approx_eq!(2.0f64.ln_gamma().0, 0.0f64);
-    assert_eq!(2.0f64.ln_gamma().1, 1);
-    assert_approx_eq!(3.0f64.ln_gamma().0, 2.0f64.ln());
-    assert_eq!(3.0f64.ln_gamma().1, 1);
-    assert_approx_eq!((-0.5f64).ln_gamma().0, (2.0 * consts::PI.sqrt()).ln());
-    assert_eq!((-0.5f64).ln_gamma().1, -1);
-}
-
-#[test]
-fn test_real_consts() {
-    let pi: f64 = consts::PI;
-    let frac_pi_2: f64 = consts::FRAC_PI_2;
-    let frac_pi_3: f64 = consts::FRAC_PI_3;
-    let frac_pi_4: f64 = consts::FRAC_PI_4;
-    let frac_pi_6: f64 = consts::FRAC_PI_6;
-    let frac_pi_8: f64 = consts::FRAC_PI_8;
-    let frac_1_pi: f64 = consts::FRAC_1_PI;
-    let frac_2_pi: f64 = consts::FRAC_2_PI;
-    let frac_2_sqrtpi: f64 = consts::FRAC_2_SQRT_PI;
-    let sqrt2: f64 = consts::SQRT_2;
-    let frac_1_sqrt2: f64 = consts::FRAC_1_SQRT_2;
-    let e: f64 = consts::E;
-    let log2_e: f64 = consts::LOG2_E;
-    let log10_e: f64 = consts::LOG10_E;
-    let ln_2: f64 = consts::LN_2;
-    let ln_10: f64 = consts::LN_10;
-
-    assert_approx_eq!(frac_pi_2, pi / 2f64);
-    assert_approx_eq!(frac_pi_3, pi / 3f64);
-    assert_approx_eq!(frac_pi_4, pi / 4f64);
-    assert_approx_eq!(frac_pi_6, pi / 6f64);
-    assert_approx_eq!(frac_pi_8, pi / 8f64);
-    assert_approx_eq!(frac_1_pi, 1f64 / pi);
-    assert_approx_eq!(frac_2_pi, 2f64 / pi);
-    assert_approx_eq!(frac_2_sqrtpi, 2f64 / pi.sqrt());
-    assert_approx_eq!(sqrt2, 2f64.sqrt());
-    assert_approx_eq!(frac_1_sqrt2, 1f64 / 2f64.sqrt());
-    assert_approx_eq!(log2_e, e.log2());
-    assert_approx_eq!(log10_e, e.log10());
-    assert_approx_eq!(ln_2, 2f64.ln());
-    assert_approx_eq!(ln_10, 10f64.ln());
-}
diff --git a/library/std/tests/floats/lib.rs b/library/std/tests/floats/lib.rs
deleted file mode 100644
index 012349350b0b..000000000000
--- a/library/std/tests/floats/lib.rs
+++ /dev/null
@@ -1,43 +0,0 @@
-#![feature(f16, f128, float_gamma, cfg_target_has_reliable_f16_f128)]
-#![expect(internal_features)] // for reliable_f16_f128
-
-use std::fmt;
-use std::ops::{Add, Div, Mul, Rem, Sub};
-
-/// Verify that floats are within a tolerance of each other, 1.0e-6 by default.
-macro_rules! assert_approx_eq {
-    ($a:expr, $b:expr) => {{ assert_approx_eq!($a, $b, 1.0e-6) }};
-    ($a:expr, $b:expr, $lim:expr) => {{
-        let (a, b) = (&$a, &$b);
-        let diff = (*a - *b).abs();
-        assert!(
-            diff <= $lim,
-            "{a:?} is not approximately equal to {b:?} (threshold {lim:?}, difference {diff:?})",
-            lim = $lim
-        );
-    }};
-}
-
-/// Helper function for testing numeric operations
-pub fn test_num(ten: T, two: T)
-where
-    T: PartialEq
-        + Add
-        + Sub
-        + Mul
-        + Div
-        + Rem
-        + fmt::Debug
-        + Copy,
-{
-    assert_eq!(ten.add(two), ten + two);
-    assert_eq!(ten.sub(two), ten - two);
-    assert_eq!(ten.mul(two), ten * two);
-    assert_eq!(ten.div(two), ten / two);
-    assert_eq!(ten.rem(two), ten % two);
-}
-
-mod f128;
-mod f16;
-mod f32;
-mod f64;

From 83794755b7ecce9ebcf96321b98db4eca50ea572 Mon Sep 17 00:00:00 2001
From: Trevor Gross 
Date: Fri, 30 Jan 2026 21:35:07 -0600
Subject: [PATCH 213/265] clif: Only set has_reliable_f128_math with glibc

New float tests in core are failing on clif with issues like the
following:

    Undefined symbols for architecture arm64:
        "_coshf128", referenced from:
            __RNvMNtCshY0fR2o0hOA_3std4f128C4f1284coshCs5TKtJxXQNGL_9coretests in coretests-e38519c0cc90db54.coretests.44b6247a565e10d1-cgu.10.rcgu.o
                "_exp2f128", referenced from:
            __RNvMNtCshY0fR2o0hOA_3std4f128C4f1284exp2Cs5TKtJxXQNGL_9coretests in coretests-e38519c0cc90db54.coretests.44b6247a565e10d1-cgu.10.rcgu.o
        ...

Disable f128 math unless the symbols are known to be available, which
for now is only glibc targets. This matches the LLVM backend.
---
 compiler/rustc_codegen_cranelift/src/lib.rs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/compiler/rustc_codegen_cranelift/src/lib.rs b/compiler/rustc_codegen_cranelift/src/lib.rs
index 656e7b0aec5b..7bab07def63d 100644
--- a/compiler/rustc_codegen_cranelift/src/lib.rs
+++ b/compiler/rustc_codegen_cranelift/src/lib.rs
@@ -180,6 +180,10 @@ impl CodegenBackend for CraneliftCodegenBackend {
             && sess.target.env == Env::Gnu
             && sess.target.abi != Abi::Llvm);
 
+        // FIXME(f128): f128 math operations need f128 math symbols, which currently aren't always
+        // filled in by compiler-builtins. The only libc that provides these currently is glibc.
+        let has_reliable_f128_math = has_reliable_f16_f128 && sess.target.env == Env::Gnu;
+
         TargetConfig {
             target_features,
             unstable_target_features,
@@ -188,7 +192,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
             has_reliable_f16: has_reliable_f16_f128,
             has_reliable_f16_math: has_reliable_f16_f128,
             has_reliable_f128: has_reliable_f16_f128,
-            has_reliable_f128_math: has_reliable_f16_f128,
+            has_reliable_f128_math,
         }
     }
 

From 981dacc34fe799c4c1643d662819f8fcba76fd0e Mon Sep 17 00:00:00 2001
From: Folkert de Vries 
Date: Wed, 28 Jan 2026 21:03:41 +0100
Subject: [PATCH 214/265] feature-gate c-variadic definitions and calls in
 const contexts

---
 .../rustc_ast_passes/src/ast_validation.rs    |  7 ++++++
 .../src/check_consts/check.rs                 |  4 ++++
 .../rustc_const_eval/src/check_consts/ops.rs  | 21 ++++++++++++++++
 compiler/rustc_const_eval/src/errors.rs       | 13 ++++++++++
 compiler/rustc_feature/src/unstable.rs        |  2 ++
 compiler/rustc_span/src/symbol.rs             |  1 +
 library/core/src/ffi/va_list.rs               |  6 ++---
 tests/ui/consts/const-eval/c-variadic-fail.rs |  2 +-
 tests/ui/consts/const-eval/c-variadic.rs      |  2 +-
 .../feature-gate-const-c-variadic.rs          | 11 +++++++++
 .../feature-gate-const-c-variadic.stderr      | 24 +++++++++++++++++++
 11 files changed, 88 insertions(+), 5 deletions(-)
 create mode 100644 tests/ui/feature-gates/feature-gate-const-c-variadic.rs
 create mode 100644 tests/ui/feature-gates/feature-gate-const-c-variadic.stderr

diff --git a/compiler/rustc_ast_passes/src/ast_validation.rs b/compiler/rustc_ast_passes/src/ast_validation.rs
index f9a64ffe09c4..ac2ba6b2b92a 100644
--- a/compiler/rustc_ast_passes/src/ast_validation.rs
+++ b/compiler/rustc_ast_passes/src/ast_validation.rs
@@ -698,6 +698,13 @@ impl<'a> AstValidator<'a> {
             unreachable!("C variable argument list cannot be used in closures")
         };
 
+        if let Const::Yes(_) = sig.header.constness
+            && !self.features.enabled(sym::const_c_variadic)
+        {
+            let msg = format!("c-variadic const function definitions are unstable");
+            feature_err(&self.sess, sym::const_c_variadic, sig.span, msg).emit();
+        }
+
         if let Some(coroutine_kind) = sig.header.coroutine_kind {
             self.dcx().emit_err(errors::CoroutineAndCVariadic {
                 spans: vec![coroutine_kind.span(), variadic_param.span],
diff --git a/compiler/rustc_const_eval/src/check_consts/check.rs b/compiler/rustc_const_eval/src/check_consts/check.rs
index 57396b657a3f..4ce0345f2e61 100644
--- a/compiler/rustc_const_eval/src/check_consts/check.rs
+++ b/compiler/rustc_const_eval/src/check_consts/check.rs
@@ -815,6 +815,10 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
                     });
                 }
 
+                if self.tcx.fn_sig(callee).skip_binder().c_variadic() {
+                    self.check_op(ops::FnCallCVariadic)
+                }
+
                 // At this point, we are calling a function, `callee`, whose `DefId` is known...
 
                 // `begin_panic` and `panic_display` functions accept generic
diff --git a/compiler/rustc_const_eval/src/check_consts/ops.rs b/compiler/rustc_const_eval/src/check_consts/ops.rs
index 5b62ba8c1605..be8f0f430e13 100644
--- a/compiler/rustc_const_eval/src/check_consts/ops.rs
+++ b/compiler/rustc_const_eval/src/check_consts/ops.rs
@@ -75,6 +75,27 @@ impl<'tcx> NonConstOp<'tcx> for FnCallIndirect {
     }
 }
 
+/// A c-variadic function call.
+#[derive(Debug)]
+pub(crate) struct FnCallCVariadic;
+impl<'tcx> NonConstOp<'tcx> for FnCallCVariadic {
+    fn status_in_item(&self, _ccx: &ConstCx<'_, 'tcx>) -> Status {
+        Status::Unstable {
+            gate: sym::const_c_variadic,
+            gate_already_checked: false,
+            safe_to_expose_on_stable: false,
+            is_function_call: true,
+        }
+    }
+
+    fn build_error(&self, ccx: &ConstCx<'_, 'tcx>, span: Span) -> Diag<'tcx> {
+        ccx.tcx.sess.create_feature_err(
+            errors::NonConstCVariadicCall { span, kind: ccx.const_kind() },
+            sym::const_c_variadic,
+        )
+    }
+}
+
 /// A call to a function that is in a trait, or has trait bounds that make it conditionally-const.
 #[derive(Debug)]
 pub(crate) struct ConditionallyConstCall<'tcx> {
diff --git a/compiler/rustc_const_eval/src/errors.rs b/compiler/rustc_const_eval/src/errors.rs
index 061ed38c9df1..886995aa3a40 100644
--- a/compiler/rustc_const_eval/src/errors.rs
+++ b/compiler/rustc_const_eval/src/errors.rs
@@ -531,6 +531,19 @@ pub struct NonConstClosure {
     pub non_or_conditionally: &'static str,
 }
 
+#[derive(Diagnostic)]
+#[diag(r#"calling const c-variadic functions is unstable in {$kind ->
+    [const] constant
+    [static] static
+    [const_fn] constant function
+    *[other] {""}
+}s"#, code = E0015)]
+pub struct NonConstCVariadicCall {
+    #[primary_span]
+    pub span: Span,
+    pub kind: ConstContext,
+}
+
 #[derive(Subdiagnostic)]
 pub enum NonConstClosureNote {
     #[note("function defined here, but it is not `const`")]
diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs
index 082558cf9a93..36be4a037806 100644
--- a/compiler/rustc_feature/src/unstable.rs
+++ b/compiler/rustc_feature/src/unstable.rs
@@ -420,6 +420,8 @@ declare_features! (
     (unstable, const_async_blocks, "1.53.0", Some(85368)),
     /// Allows `const { ... }` as a shorthand for `const _: () = const { ... };` for module items.
     (unstable, const_block_items, "CURRENT_RUSTC_VERSION", Some(149226)),
+    /// Allows defining and calling c-variadic functions in const contexts.
+    (unstable, const_c_variadic, "CURRENT_RUSTC_VERSION", Some(151787)),
     /// Allows `const || {}` closures in const contexts.
     (incomplete, const_closures, "1.68.0", Some(106003)),
     /// Allows using `[const] Destruct` bounds and calling drop impls in const contexts.
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index b9a9d8029d28..a39f01c8e70b 100644
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
@@ -740,6 +740,7 @@ symbols! {
         const_allocate,
         const_async_blocks,
         const_block_items,
+        const_c_variadic,
         const_closures,
         const_compare_raw_pointers,
         const_constructor,
diff --git a/library/core/src/ffi/va_list.rs b/library/core/src/ffi/va_list.rs
index 45a9b7ba5293..4ed93f54d43c 100644
--- a/library/core/src/ffi/va_list.rs
+++ b/library/core/src/ffi/va_list.rs
@@ -205,7 +205,7 @@ impl VaList<'_> {
     }
 }
 
-#[rustc_const_unstable(feature = "c_variadic_const", issue = "none")]
+#[rustc_const_unstable(feature = "const_c_variadic", issue = "151787")]
 impl<'f> const Clone for VaList<'f> {
     #[inline]
     fn clone(&self) -> Self {
@@ -217,7 +217,7 @@ impl<'f> const Clone for VaList<'f> {
     }
 }
 
-#[rustc_const_unstable(feature = "c_variadic_const", issue = "none")]
+#[rustc_const_unstable(feature = "const_c_variadic", issue = "151787")]
 impl<'f> const Drop for VaList<'f> {
     fn drop(&mut self) {
         // SAFETY: this variable argument list is being dropped, so won't be read from again.
@@ -293,7 +293,7 @@ impl<'f> VaList<'f> {
     ///
     /// [valid]: https://doc.rust-lang.org/nightly/nomicon/what-unsafe-does.html
     #[inline]
-    #[rustc_const_unstable(feature = "c_variadic_const", issue = "none")]
+    #[rustc_const_unstable(feature = "const_c_variadic", issue = "151787")]
     pub const unsafe fn arg(&mut self) -> T {
         // SAFETY: the caller must uphold the safety contract for `va_arg`.
         unsafe { va_arg(self) }
diff --git a/tests/ui/consts/const-eval/c-variadic-fail.rs b/tests/ui/consts/const-eval/c-variadic-fail.rs
index 859dfed35719..b5a400a8bf25 100644
--- a/tests/ui/consts/const-eval/c-variadic-fail.rs
+++ b/tests/ui/consts/const-eval/c-variadic-fail.rs
@@ -1,7 +1,7 @@
 //@ build-fail
 
 #![feature(c_variadic)]
-#![feature(c_variadic_const)]
+#![feature(const_c_variadic)]
 #![feature(const_trait_impl)]
 #![feature(const_destruct)]
 #![feature(const_clone)]
diff --git a/tests/ui/consts/const-eval/c-variadic.rs b/tests/ui/consts/const-eval/c-variadic.rs
index ec49b5cc5831..2f8d043fb5db 100644
--- a/tests/ui/consts/const-eval/c-variadic.rs
+++ b/tests/ui/consts/const-eval/c-variadic.rs
@@ -3,8 +3,8 @@
 //@ ignore-backends: gcc
 
 #![feature(c_variadic)]
+#![feature(const_c_variadic)]
 #![feature(const_destruct)]
-#![feature(c_variadic_const)]
 #![feature(const_cmp)]
 #![feature(const_trait_impl)]
 
diff --git a/tests/ui/feature-gates/feature-gate-const-c-variadic.rs b/tests/ui/feature-gates/feature-gate-const-c-variadic.rs
new file mode 100644
index 000000000000..4e8b3c54b1fd
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-const-c-variadic.rs
@@ -0,0 +1,11 @@
+#![feature(c_variadic)]
+
+fn main() {
+    const unsafe extern "C" fn foo(ap: ...) {
+        //~^ ERROR c-variadic const function definitions are unstable
+        core::mem::forget(ap);
+    }
+
+    const { unsafe { foo() } }
+    //~^ ERROR calling const c-variadic functions is unstable in constants
+}
diff --git a/tests/ui/feature-gates/feature-gate-const-c-variadic.stderr b/tests/ui/feature-gates/feature-gate-const-c-variadic.stderr
new file mode 100644
index 000000000000..8fd85be08fca
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-const-c-variadic.stderr
@@ -0,0 +1,24 @@
+error[E0658]: c-variadic const function definitions are unstable
+  --> $DIR/feature-gate-const-c-variadic.rs:4:5
+   |
+LL |     const unsafe extern "C" fn foo(ap: ...) {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #151787  for more information
+   = help: add `#![feature(const_c_variadic)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error[E0015]: calling const c-variadic functions is unstable in constants
+  --> $DIR/feature-gate-const-c-variadic.rs:9:22
+   |
+LL |     const { unsafe { foo() } }
+   |                      ^^^^^
+   |
+   = note: see issue #151787  for more information
+   = help: add `#![feature(const_c_variadic)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0015, E0658.
+For more information about an error, try `rustc --explain E0015`.

From f1664acfbfe7335bfb59cdebf940342a6157ea9d Mon Sep 17 00:00:00 2001
From: Zalathar 
Date: Sun, 15 Feb 2026 21:16:35 +1100
Subject: [PATCH 215/265] Inline the `is_tool` check for setting
 `-Zforce-unstable-if-unmarked`

---
 src/bootstrap/src/core/builder/cargo.rs | 14 ++++++++++++--
 src/bootstrap/src/lib.rs                |  7 -------
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs
index e3fa826c45af..7f4e23881e45 100644
--- a/src/bootstrap/src/core/builder/cargo.rs
+++ b/src/bootstrap/src/core/builder/cargo.rs
@@ -999,8 +999,18 @@ impl Builder<'_> {
             cargo.env("UPDATE_EXPECT", "1");
         }
 
-        if !mode.is_tool() {
-            cargo.env("RUSTC_FORCE_UNSTABLE", "1");
+        // Set an environment variable that tells the rustc/rustdoc wrapper
+        // binary to pass `-Zforce-unstable-if-unmarked` to the real compiler.
+        match mode {
+            // Any library crate that's part of the sysroot should be marked unstable
+            // (including third-party dependencies), unless it uses a staged_api
+            // `#![stable(..)]` attribute to explicitly mark itself stable.
+            Mode::Std | Mode::Codegen | Mode::Rustc => {
+                cargo.env("RUSTC_FORCE_UNSTABLE", "1");
+            }
+
+            // For everything else, crate stability shouldn't matter, so don't set a flag.
+            Mode::ToolBootstrap | Mode::ToolRustcPrivate | Mode::ToolStd | Mode::ToolTarget => {}
         }
 
         if let Some(x) = self.crt_static(target) {
diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
index dfa29b5aa3cd..ec5c6fbe1d01 100644
--- a/src/bootstrap/src/lib.rs
+++ b/src/bootstrap/src/lib.rs
@@ -340,13 +340,6 @@ pub enum Mode {
 }
 
 impl Mode {
-    pub fn is_tool(&self) -> bool {
-        match self {
-            Mode::ToolBootstrap | Mode::ToolRustcPrivate | Mode::ToolStd | Mode::ToolTarget => true,
-            Mode::Std | Mode::Codegen | Mode::Rustc => false,
-        }
-    }
-
     pub fn must_support_dlopen(&self) -> bool {
         match self {
             Mode::Std | Mode::Codegen => true,

From 2ef5156751c949377e1fee6c71a3257dcc2ef0d6 Mon Sep 17 00:00:00 2001
From: The rustc-josh-sync Cronjob Bot 
Date: Mon, 16 Feb 2026 04:49:19 +0000
Subject: [PATCH 216/265] Prepare for merging from rust-lang/rust

This updates the rust-version file to 139651428df86cf88443295542c12ea617cbb587.
---
 src/tools/rust-analyzer/rust-version | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tools/rust-analyzer/rust-version b/src/tools/rust-analyzer/rust-version
index a1011c4a0acf..b22c6c3869c6 100644
--- a/src/tools/rust-analyzer/rust-version
+++ b/src/tools/rust-analyzer/rust-version
@@ -1 +1 @@
-ba284f468cd2cda48420251efc991758ec13d450
+139651428df86cf88443295542c12ea617cbb587

From 0f5c2215ad3a6e5475c87ddd6416b9a13437aaa8 Mon Sep 17 00:00:00 2001
From: Zalathar 
Date: Mon, 16 Feb 2026 17:13:47 +1100
Subject: [PATCH 217/265] Regression test for "unstable" traits in
 force-unstable builds

---
 tests/ui/traits/auxiliary/force_unstable.rs   |  7 ++++
 .../traits/nightly-only-unstable.force.stderr | 36 +++++++++++++++++++
 .../nightly-only-unstable.normal.stderr       | 36 +++++++++++++++++++
 tests/ui/traits/nightly-only-unstable.rs      | 36 +++++++++++++++++++
 4 files changed, 115 insertions(+)
 create mode 100644 tests/ui/traits/auxiliary/force_unstable.rs
 create mode 100644 tests/ui/traits/nightly-only-unstable.force.stderr
 create mode 100644 tests/ui/traits/nightly-only-unstable.normal.stderr
 create mode 100644 tests/ui/traits/nightly-only-unstable.rs

diff --git a/tests/ui/traits/auxiliary/force_unstable.rs b/tests/ui/traits/auxiliary/force_unstable.rs
new file mode 100644
index 000000000000..ce71e1241f9c
--- /dev/null
+++ b/tests/ui/traits/auxiliary/force_unstable.rs
@@ -0,0 +1,7 @@
+//@ edition: 2024
+//@ compile-flags: -Zforce-unstable-if-unmarked
+
+// Auxiliary crate that uses `-Zforce-unstable-if-unmarked` to export an
+// "unstable" trait.
+
+pub trait ForeignTrait {}
diff --git a/tests/ui/traits/nightly-only-unstable.force.stderr b/tests/ui/traits/nightly-only-unstable.force.stderr
new file mode 100644
index 000000000000..b24e2867a304
--- /dev/null
+++ b/tests/ui/traits/nightly-only-unstable.force.stderr
@@ -0,0 +1,36 @@
+error[E0277]: the trait bound `(): LocalTrait` is not satisfied
+  --> $DIR/nightly-only-unstable.rs:25:21
+   |
+LL |     use_local_trait(());
+   |     --------------- ^^ the nightly-only, unstable trait `LocalTrait` is not implemented for `()`
+   |     |
+   |     required by a bound introduced by this call
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/nightly-only-unstable.rs:14:1
+   |
+LL | trait LocalTrait {}
+   | ^^^^^^^^^^^^^^^^
+note: required by a bound in `use_local_trait`
+  --> $DIR/nightly-only-unstable.rs:16:28
+   |
+LL | fn use_local_trait(_: impl LocalTrait) {}
+   |                            ^^^^^^^^^^ required by this bound in `use_local_trait`
+
+error[E0277]: the trait bound `(): ForeignTrait` is not satisfied
+  --> $DIR/nightly-only-unstable.rs:31:23
+   |
+LL |     use_foreign_trait(());
+   |     ----------------- ^^ the nightly-only, unstable trait `ForeignTrait` is not implemented for `()`
+   |     |
+   |     required by a bound introduced by this call
+   |
+note: required by a bound in `use_foreign_trait`
+  --> $DIR/nightly-only-unstable.rs:20:30
+   |
+LL | fn use_foreign_trait(_: impl force_unstable::ForeignTrait) {}
+   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `use_foreign_trait`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/nightly-only-unstable.normal.stderr b/tests/ui/traits/nightly-only-unstable.normal.stderr
new file mode 100644
index 000000000000..51b896cfefdf
--- /dev/null
+++ b/tests/ui/traits/nightly-only-unstable.normal.stderr
@@ -0,0 +1,36 @@
+error[E0277]: the trait bound `(): LocalTrait` is not satisfied
+  --> $DIR/nightly-only-unstable.rs:25:21
+   |
+LL |     use_local_trait(());
+   |     --------------- ^^ the trait `LocalTrait` is not implemented for `()`
+   |     |
+   |     required by a bound introduced by this call
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/nightly-only-unstable.rs:14:1
+   |
+LL | trait LocalTrait {}
+   | ^^^^^^^^^^^^^^^^
+note: required by a bound in `use_local_trait`
+  --> $DIR/nightly-only-unstable.rs:16:28
+   |
+LL | fn use_local_trait(_: impl LocalTrait) {}
+   |                            ^^^^^^^^^^ required by this bound in `use_local_trait`
+
+error[E0277]: the trait bound `(): ForeignTrait` is not satisfied
+  --> $DIR/nightly-only-unstable.rs:31:23
+   |
+LL |     use_foreign_trait(());
+   |     ----------------- ^^ the nightly-only, unstable trait `ForeignTrait` is not implemented for `()`
+   |     |
+   |     required by a bound introduced by this call
+   |
+note: required by a bound in `use_foreign_trait`
+  --> $DIR/nightly-only-unstable.rs:20:30
+   |
+LL | fn use_foreign_trait(_: impl force_unstable::ForeignTrait) {}
+   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `use_foreign_trait`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/nightly-only-unstable.rs b/tests/ui/traits/nightly-only-unstable.rs
new file mode 100644
index 000000000000..c3fa5df944b6
--- /dev/null
+++ b/tests/ui/traits/nightly-only-unstable.rs
@@ -0,0 +1,36 @@
+//@ revisions: normal force
+//@ edition: 2024
+//@ aux-crate: force_unstable=force_unstable.rs
+//@[force] compile-flags: -Zforce-unstable-if-unmarked
+
+#![feature(rustc_private)]
+
+// Regression test for .
+//
+// When building a crate with `-Zforce-unstable-if-unmarked` (e.g. the compiler or stdlib),
+// it's unhelpful to mention that a not-implemented trait is unstable, because that will
+// be true of every local and foreign trait that isn't explicitly marked stable.
+
+trait LocalTrait {}
+
+fn use_local_trait(_: impl LocalTrait) {}
+//~^ NOTE required by a bound in `use_local_trait`
+//~| NOTE required by this bound in `use_local_trait`
+
+fn use_foreign_trait(_: impl force_unstable::ForeignTrait) {}
+//~^ NOTE required by a bound in `use_foreign_trait`
+//~| NOTE required by this bound in `use_foreign_trait`
+
+fn main() {
+    use_local_trait(());
+    //~^ ERROR the trait bound `(): LocalTrait` is not satisfied
+    //[normal]~| NOTE the trait `LocalTrait` is not implemented for `()`
+    //[force]~| NOTE the nightly-only, unstable trait `LocalTrait` is not implemented for `()`
+    //~| NOTE required by a bound introduced by this call
+
+    use_foreign_trait(());
+    //~^ ERROR the trait bound `(): ForeignTrait` is not satisfied
+    //[normal]~| NOTE the nightly-only, unstable trait `ForeignTrait` is not implemented for `()`
+    //[force]~| NOTE the nightly-only, unstable trait `ForeignTrait` is not implemented for `()`
+    //~| NOTE required by a bound introduced by this call
+}

From 125e69e862b79a2943a68c7dd03bea224073cdf1 Mon Sep 17 00:00:00 2001
From: Zalathar 
Date: Mon, 16 Feb 2026 17:05:13 +1100
Subject: [PATCH 218/265] Suppress unstable-trait notes under
 `-Zforce-unstable-if-unmarked`

---
 .../src/error_reporting/traits/suggestions.rs  | 18 ++++++++++--------
 .../traits/nightly-only-unstable.force.stderr  |  4 ++--
 tests/ui/traits/nightly-only-unstable.rs       |  4 ++--
 3 files changed, 14 insertions(+), 12 deletions(-)

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 63fd61cb257b..434c8caae7dc 100644
--- a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs
+++ b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs
@@ -5608,15 +5608,17 @@ pub(super) fn get_explanation_based_on_obligation<'tcx>(
             None => String::new(),
         };
         if let ty::PredicatePolarity::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
+            // unhelpful noise. See .
+            let mention_unstable = !tcx.sess.opts.unstable_opts.force_unstable_if_unmarked
+                && try { tcx.lookup_stability(trait_predicate.def_id())?.level.is_stable() }
+                    == Some(false);
+            let unstable = if mention_unstable { "nightly-only, unstable " } else { "" };
+
             format!(
-                "{pre_message}the {}trait `{}` is not implemented for{desc} `{}`",
-                if tcx.lookup_stability(trait_predicate.def_id()).map(|s| s.level.is_stable())
-                    == Some(false)
-                {
-                    "nightly-only, unstable "
-                } else {
-                    ""
-                },
+                "{pre_message}the {unstable}trait `{}` is not implemented for{desc} `{}`",
                 trait_predicate.print_modifiers_and_trait_path(),
                 tcx.short_string(trait_predicate.self_ty().skip_binder(), long_ty_path),
             )
diff --git a/tests/ui/traits/nightly-only-unstable.force.stderr b/tests/ui/traits/nightly-only-unstable.force.stderr
index b24e2867a304..c1b5a45dc827 100644
--- a/tests/ui/traits/nightly-only-unstable.force.stderr
+++ b/tests/ui/traits/nightly-only-unstable.force.stderr
@@ -2,7 +2,7 @@ error[E0277]: the trait bound `(): LocalTrait` is not satisfied
   --> $DIR/nightly-only-unstable.rs:25:21
    |
 LL |     use_local_trait(());
-   |     --------------- ^^ the nightly-only, unstable trait `LocalTrait` is not implemented for `()`
+   |     --------------- ^^ the trait `LocalTrait` is not implemented for `()`
    |     |
    |     required by a bound introduced by this call
    |
@@ -21,7 +21,7 @@ error[E0277]: the trait bound `(): ForeignTrait` is not satisfied
   --> $DIR/nightly-only-unstable.rs:31:23
    |
 LL |     use_foreign_trait(());
-   |     ----------------- ^^ the nightly-only, unstable trait `ForeignTrait` is not implemented for `()`
+   |     ----------------- ^^ the trait `ForeignTrait` is not implemented for `()`
    |     |
    |     required by a bound introduced by this call
    |
diff --git a/tests/ui/traits/nightly-only-unstable.rs b/tests/ui/traits/nightly-only-unstable.rs
index c3fa5df944b6..94f300074390 100644
--- a/tests/ui/traits/nightly-only-unstable.rs
+++ b/tests/ui/traits/nightly-only-unstable.rs
@@ -25,12 +25,12 @@ fn main() {
     use_local_trait(());
     //~^ ERROR the trait bound `(): LocalTrait` is not satisfied
     //[normal]~| NOTE the trait `LocalTrait` is not implemented for `()`
-    //[force]~| NOTE the nightly-only, unstable trait `LocalTrait` is not implemented for `()`
+    //[force]~| NOTE the trait `LocalTrait` is not implemented for `()`
     //~| NOTE required by a bound introduced by this call
 
     use_foreign_trait(());
     //~^ ERROR the trait bound `(): ForeignTrait` is not satisfied
     //[normal]~| NOTE the nightly-only, unstable trait `ForeignTrait` is not implemented for `()`
-    //[force]~| NOTE the nightly-only, unstable trait `ForeignTrait` is not implemented for `()`
+    //[force]~| NOTE the trait `ForeignTrait` is not implemented for `()`
     //~| NOTE required by a bound introduced by this call
 }

From 93d45480aa6db1009ebf67b845d8e9b995f46f56 Mon Sep 17 00:00:00 2001
From: Ralf Jung 
Date: Sat, 25 Oct 2025 13:17:59 +0200
Subject: [PATCH 219/265] replace box_new in Box::new with write_via_move

requires lowering write_via_move during MIR building to make it just like an assignment
---
 .../rustc_mir_build/src/builder/expr/into.rs  | 27 ++++++-
 .../src/lower_intrinsics.rs                   | 25 +-----
 library/alloc/src/alloc.rs                    |  6 +-
 library/alloc/src/boxed.rs                    | 12 ++-
 .../both_borrows/aliasing_mut4.tree.stderr    |  2 +-
 ...move.box_new.CleanupPostBorrowck.after.mir | 76 +++++++++++++++++++
 tests/mir-opt/building/write_via_move.rs      | 23 ++++++
 ....run2-{closure#0}.Inline.panic-unwind.diff |  2 +-
 tests/mir-opt/lower_intrinsics.rs             | 11 ---
 ...ve_string.LowerIntrinsics.panic-abort.diff | 31 --------
 ...e_string.LowerIntrinsics.panic-unwind.diff | 31 --------
 tests/ui/limits/issue-17913.32bit.stderr      | 27 ++++---
 12 files changed, 159 insertions(+), 114 deletions(-)
 create mode 100644 tests/mir-opt/building/write_via_move.box_new.CleanupPostBorrowck.after.mir
 create mode 100644 tests/mir-opt/building/write_via_move.rs
 delete mode 100644 tests/mir-opt/lower_intrinsics.write_via_move_string.LowerIntrinsics.panic-abort.diff
 delete mode 100644 tests/mir-opt/lower_intrinsics.write_via_move_string.LowerIntrinsics.panic-unwind.diff

diff --git a/compiler/rustc_mir_build/src/builder/expr/into.rs b/compiler/rustc_mir_build/src/builder/expr/into.rs
index 60e05b691a83..230b4d97f14f 100644
--- a/compiler/rustc_mir_build/src/builder/expr/into.rs
+++ b/compiler/rustc_mir_build/src/builder/expr/into.rs
@@ -9,8 +9,8 @@ use rustc_middle::mir::*;
 use rustc_middle::span_bug;
 use rustc_middle::thir::*;
 use rustc_middle::ty::{self, CanonicalUserTypeAnnotation, Ty};
-use rustc_span::DUMMY_SP;
 use rustc_span::source_map::Spanned;
+use rustc_span::{DUMMY_SP, sym};
 use rustc_trait_selection::infer::InferCtxtExt;
 use tracing::{debug, instrument};
 
@@ -366,6 +366,31 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
                     None
                 })
             }
+            // The `write_via_move` intrinsic needs to be special-cased very early to avoid
+            // introducing unnecessary copies that can be hard to remove again later:
+            // `write_via_move(ptr, val)` becomes `*ptr = val` but without any dropping.
+            ExprKind::Call { ty, fun, ref args, .. }
+                if let ty::FnDef(def_id, _generic_args) = ty.kind()
+                    && let Some(intrinsic) = this.tcx.intrinsic(def_id)
+                    && intrinsic.name == sym::write_via_move =>
+            {
+                // We still have to evaluate the callee expression as normal (but we don't care
+                // about its result).
+                let _fun = unpack!(block = this.as_local_operand(block, fun));
+                // The destination must have unit type (so we don't actually have to store anything
+                // into it).
+                assert!(destination.ty(&this.local_decls, this.tcx).ty.is_unit());
+
+                // Compile this to an assignment of the argument into the destination.
+                let [ptr, val] = **args else {
+                    span_bug!(expr_span, "invalid write_via_move call")
+                };
+                let Some(ptr) = unpack!(block = this.as_local_operand(block, ptr)).place() else {
+                    span_bug!(expr_span, "invalid write_via_move call")
+                };
+                let ptr_deref = ptr.project_deeper(&[ProjectionElem::Deref], this.tcx);
+                this.expr_into_dest(ptr_deref, block, val)
+            }
             ExprKind::Call { ty: _, fun, ref args, from_hir_call, fn_span } => {
                 let fun = unpack!(block = this.as_local_operand(block, fun));
                 let args: Box<[_]> = args
diff --git a/compiler/rustc_mir_transform/src/lower_intrinsics.rs b/compiler/rustc_mir_transform/src/lower_intrinsics.rs
index dcee54c37108..8b2e68f156f9 100644
--- a/compiler/rustc_mir_transform/src/lower_intrinsics.rs
+++ b/compiler/rustc_mir_transform/src/lower_intrinsics.rs
@@ -177,30 +177,7 @@ impl<'tcx> crate::MirPass<'tcx> for LowerIntrinsics {
                             Some(target) => TerminatorKind::Goto { target },
                         }
                     }
-                    sym::write_via_move => {
-                        let target = target.unwrap();
-                        let Ok([ptr, val]) = take_array(args) else {
-                            span_bug!(
-                                terminator.source_info.span,
-                                "Wrong number of arguments for write_via_move intrinsic",
-                            );
-                        };
-                        let derefed_place = if let Some(place) = ptr.node.place()
-                            && let Some(local) = place.as_local()
-                        {
-                            tcx.mk_place_deref(local.into())
-                        } else {
-                            span_bug!(
-                                terminator.source_info.span,
-                                "Only passing a local is supported"
-                            );
-                        };
-                        block.statements.push(Statement::new(
-                            terminator.source_info,
-                            StatementKind::Assign(Box::new((derefed_place, Rvalue::Use(val.node)))),
-                        ));
-                        terminator.kind = TerminatorKind::Goto { target };
-                    }
+                    // `write_via_move` is already lowered during MIR building.
                     sym::discriminant_value => {
                         let target = target.unwrap();
                         let Ok([arg]) = take_array(args) else {
diff --git a/library/alloc/src/alloc.rs b/library/alloc/src/alloc.rs
index 263bb1036d8c..ca038b3995c1 100644
--- a/library/alloc/src/alloc.rs
+++ b/library/alloc/src/alloc.rs
@@ -480,11 +480,15 @@ unsafe impl const Allocator for Global {
 }
 
 /// The allocator for `Box`.
+///
+/// # Safety
+///
+/// `size` and `align` must satisfy the conditions in [`Layout::from_size_align`].
 #[cfg(not(no_global_oom_handling))]
 #[lang = "exchange_malloc"]
 #[inline]
 #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
-unsafe fn exchange_malloc(size: usize, align: usize) -> *mut u8 {
+pub(crate) unsafe fn exchange_malloc(size: usize, align: usize) -> *mut u8 {
     let layout = unsafe { Layout::from_size_align_unchecked(size, align) };
     match Global.allocate(layout) {
         Ok(ptr) => ptr.as_mut_ptr(),
diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs
index 6391a6977b61..1c8e21e3062a 100644
--- a/library/alloc/src/boxed.rs
+++ b/library/alloc/src/boxed.rs
@@ -206,7 +206,7 @@ use core::task::{Context, Poll};
 
 #[cfg(not(no_global_oom_handling))]
 use crate::alloc::handle_alloc_error;
-use crate::alloc::{AllocError, Allocator, Global, Layout};
+use crate::alloc::{AllocError, Allocator, Global, Layout, exchange_malloc};
 use crate::raw_vec::RawVec;
 #[cfg(not(no_global_oom_handling))]
 use crate::str::from_boxed_utf8_unchecked;
@@ -262,7 +262,15 @@ impl Box {
     #[rustc_diagnostic_item = "box_new"]
     #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
     pub fn new(x: T) -> Self {
-        return box_new(x);
+        // SAFETY: the size and align of a valid type `T` are always valid for `Layout`.
+        let ptr = unsafe {
+            exchange_malloc(::SIZE, ::ALIGN)
+        } as *mut T;
+        // Nothing below can panic so we do not have to worry about deallocating `ptr`.
+        // SAFETY: we just allocated the box to store `x`.
+        unsafe { core::intrinsics::write_via_move(ptr, x) };
+        // SAFETY: we just initialized `b`.
+        unsafe { mem::transmute(ptr) }
     }
 
     /// Constructs a new box with uninitialized contents.
diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.tree.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.tree.stderr
index 11eb1ae7ddee..70a96197b00a 100644
--- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.tree.stderr
+++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.tree.stderr
@@ -2,7 +2,7 @@ error: Undefined Behavior: write access through  at ALLOC[0x0] is forbidden
   --> RUSTLIB/core/src/mem/mod.rs:LL:CC
    |
 LL |         crate::intrinsics::write_via_move(dest, src);
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
+   |                                                 ^^^ Undefined Behavior occurred here
    |
    = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental
    = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information
diff --git a/tests/mir-opt/building/write_via_move.box_new.CleanupPostBorrowck.after.mir b/tests/mir-opt/building/write_via_move.box_new.CleanupPostBorrowck.after.mir
new file mode 100644
index 000000000000..6a6e984023b7
--- /dev/null
+++ b/tests/mir-opt/building/write_via_move.box_new.CleanupPostBorrowck.after.mir
@@ -0,0 +1,76 @@
+// MIR for `box_new` after CleanupPostBorrowck
+
+fn box_new(_1: T) -> Box<[T; 1024]> {
+    debug x => _1;
+    let mut _0: std::boxed::Box<[T; 1024]>;
+    let mut _2: std::boxed::Box>;
+    let mut _4: &mut std::mem::MaybeUninit<[T; 1024]>;
+    let mut _5: &mut std::mem::MaybeUninit<[T; 1024]>;
+    let _6: ();
+    let mut _7: *mut [T; 1024];
+    let mut _8: T;
+    let mut _9: std::boxed::Box>;
+    scope 1 {
+        debug b => _2;
+        let _3: *mut [T; 1024];
+        scope 2 {
+            debug ptr => _3;
+        }
+    }
+
+    bb0: {
+        StorageLive(_2);
+        _2 = Box::<[T; 1024]>::new_uninit() -> [return: bb1, unwind: bb7];
+    }
+
+    bb1: {
+        nop;
+        StorageLive(_3);
+        StorageLive(_4);
+        StorageLive(_5);
+        _5 = &mut (*_2);
+        _4 = &mut (*_5);
+        _3 = MaybeUninit::<[T; 1024]>::as_mut_ptr(move _4) -> [return: bb2, unwind: bb6];
+    }
+
+    bb2: {
+        StorageDead(_4);
+        nop;
+        StorageDead(_5);
+        StorageLive(_6);
+        StorageLive(_7);
+        _7 = copy _3;
+        StorageLive(_8);
+        _8 = copy _1;
+        (*_7) = [move _8; 1024];
+        StorageDead(_8);
+        StorageDead(_7);
+        StorageDead(_6);
+        StorageLive(_9);
+        _9 = move _2;
+        _0 = Box::>::assume_init(move _9) -> [return: bb3, unwind: bb5];
+    }
+
+    bb3: {
+        StorageDead(_9);
+        StorageDead(_3);
+        drop(_2) -> [return: bb4, unwind: bb7];
+    }
+
+    bb4: {
+        StorageDead(_2);
+        return;
+    }
+
+    bb5 (cleanup): {
+        drop(_9) -> [return: bb6, unwind terminate(cleanup)];
+    }
+
+    bb6 (cleanup): {
+        drop(_2) -> [return: bb7, unwind terminate(cleanup)];
+    }
+
+    bb7 (cleanup): {
+        resume;
+    }
+}
diff --git a/tests/mir-opt/building/write_via_move.rs b/tests/mir-opt/building/write_via_move.rs
new file mode 100644
index 000000000000..12be592a855c
--- /dev/null
+++ b/tests/mir-opt/building/write_via_move.rs
@@ -0,0 +1,23 @@
+//! Ensure we don't generate unnecessary copys for `write_via_move`.
+//@ compile-flags: -Zmir-opt-level=0
+#![feature(core_intrinsics)]
+
+use std::mem;
+
+// Can't emit `built.after` here as that contains user type annotations which contain DefId that
+// change all the time.
+// EMIT_MIR write_via_move.box_new.CleanupPostBorrowck.after.mir
+// CHECK-LABEL: fn box_new
+#[inline(never)]
+fn box_new(x: T) -> Box<[T; 1024]> {
+    let mut b = Box::new_uninit();
+    let ptr = mem::MaybeUninit::as_mut_ptr(&mut *b);
+    // Ensure the array gets constructed directly into the deref'd pointer.
+    // CHECK: (*[[TEMP1:_.+]]) = [{{(move|copy) _.+}}; 1024];
+    unsafe { std::intrinsics::write_via_move(ptr, [x; 1024]) };
+    unsafe { b.assume_init() }
+}
+
+fn main() {
+    box_new(0);
+}
diff --git a/tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-unwind.diff b/tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-unwind.diff
index 50cf7164028a..f4efcc6c8c62 100644
--- a/tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-unwind.diff
+++ b/tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-unwind.diff
@@ -213,7 +213,7 @@
 +         StorageLive(_42);
 +         _42 = Option::<()>::None;
 +         _35 = copy ((*_37).0: std::option::Option<()>);
-+         ((*_37).0: std::option::Option<()>) = copy _42;
++         ((*_37).0: std::option::Option<()>) = move _42;
 +         StorageDead(_42);
 +         StorageLive(_43);
 +         _43 = discriminant(_35);
diff --git a/tests/mir-opt/lower_intrinsics.rs b/tests/mir-opt/lower_intrinsics.rs
index 6b8c2a790202..e8a770147741 100644
--- a/tests/mir-opt/lower_intrinsics.rs
+++ b/tests/mir-opt/lower_intrinsics.rs
@@ -197,17 +197,6 @@ pub fn read_via_copy_uninhabited(r: &Never) -> Never {
     unsafe { core::intrinsics::read_via_copy(r) }
 }
 
-// EMIT_MIR lower_intrinsics.write_via_move_string.LowerIntrinsics.diff
-pub fn write_via_move_string(r: &mut String, v: String) {
-    // CHECK-LABEL: fn write_via_move_string(
-    // CHECK: [[ptr:_.*]] = &raw mut (*_1);
-    // CHECK: [[tmp:_.*]] = move _2;
-    // CHECK: (*[[ptr]]) = move [[tmp]];
-    // CHECK: return;
-
-    unsafe { core::intrinsics::write_via_move(r, v) }
-}
-
 pub enum Never {}
 
 // EMIT_MIR lower_intrinsics.ptr_offset.LowerIntrinsics.diff
diff --git a/tests/mir-opt/lower_intrinsics.write_via_move_string.LowerIntrinsics.panic-abort.diff b/tests/mir-opt/lower_intrinsics.write_via_move_string.LowerIntrinsics.panic-abort.diff
deleted file mode 100644
index cc9177c90027..000000000000
--- a/tests/mir-opt/lower_intrinsics.write_via_move_string.LowerIntrinsics.panic-abort.diff
+++ /dev/null
@@ -1,31 +0,0 @@
-- // MIR for `write_via_move_string` before LowerIntrinsics
-+ // MIR for `write_via_move_string` after LowerIntrinsics
-  
-  fn write_via_move_string(_1: &mut String, _2: String) -> () {
-      debug r => _1;
-      debug v => _2;
-      let mut _0: ();
-      let mut _3: *mut std::string::String;
-      let mut _4: std::string::String;
-  
-      bb0: {
-          StorageLive(_3);
-          _3 = &raw mut (*_1);
-          StorageLive(_4);
-          _4 = move _2;
--         _0 = write_via_move::(move _3, move _4) -> [return: bb1, unwind unreachable];
-+         (*_3) = move _4;
-+         goto -> bb1;
-      }
-  
-      bb1: {
-          StorageDead(_4);
-          StorageDead(_3);
-          goto -> bb2;
-      }
-  
-      bb2: {
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/lower_intrinsics.write_via_move_string.LowerIntrinsics.panic-unwind.diff b/tests/mir-opt/lower_intrinsics.write_via_move_string.LowerIntrinsics.panic-unwind.diff
deleted file mode 100644
index cc9177c90027..000000000000
--- a/tests/mir-opt/lower_intrinsics.write_via_move_string.LowerIntrinsics.panic-unwind.diff
+++ /dev/null
@@ -1,31 +0,0 @@
-- // MIR for `write_via_move_string` before LowerIntrinsics
-+ // MIR for `write_via_move_string` after LowerIntrinsics
-  
-  fn write_via_move_string(_1: &mut String, _2: String) -> () {
-      debug r => _1;
-      debug v => _2;
-      let mut _0: ();
-      let mut _3: *mut std::string::String;
-      let mut _4: std::string::String;
-  
-      bb0: {
-          StorageLive(_3);
-          _3 = &raw mut (*_1);
-          StorageLive(_4);
-          _4 = move _2;
--         _0 = write_via_move::(move _3, move _4) -> [return: bb1, unwind unreachable];
-+         (*_3) = move _4;
-+         goto -> bb1;
-      }
-  
-      bb1: {
-          StorageDead(_4);
-          StorageDead(_3);
-          goto -> bb2;
-      }
-  
-      bb2: {
-          return;
-      }
-  }
-  
diff --git a/tests/ui/limits/issue-17913.32bit.stderr b/tests/ui/limits/issue-17913.32bit.stderr
index 1311822d0d0c..a5a3f925f069 100644
--- a/tests/ui/limits/issue-17913.32bit.stderr
+++ b/tests/ui/limits/issue-17913.32bit.stderr
@@ -1,19 +1,24 @@
+error[E0080]: values of the type `[&usize; usize::MAX]` are too big for the target architecture
+  --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+   |
+   = note: evaluation of ` as std::mem::SizedTypeProperties>::SIZE` failed here
+
+error[E0080]: values of the type `[&usize; usize::MAX]` are too big for the target architecture
+  --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+   |
+   = note: evaluation of ` as std::mem::SizedTypeProperties>::ALIGN` failed here
+
+note: the above error was encountered while instantiating `fn Box::<[&usize; usize::MAX]>::new_uninit_in`
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
+
 error[E0080]: values of the type `[&usize; usize::MAX]` are too big for the target architecture
   --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
    |
    = note: evaluation of `<[&usize; usize::MAX] as std::mem::SizedTypeProperties>::SIZE` failed here
 
-error[E0080]: values of the type `[&usize; usize::MAX]` are too big for the target architecture
-  --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
-   |
-   = note: evaluation of `<[&usize; usize::MAX] as std::mem::SizedTypeProperties>::ALIGN` failed here
+note: the above error was encountered while instantiating `fn Box::<[&usize; usize::MAX]>::try_new_uninit_in`
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
 
-note: the above error was encountered while instantiating `fn Box::<[&usize; usize::MAX]>::new`
-  --> $DIR/issue-17913.rs:16:21
-   |
-LL |     let a: Box<_> = Box::new([&n; SIZE]);
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0080`.

From 47ca78040a6e37e4a2688f8c5a72c631e8e89c57 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jana=20D=C3=B6nszelmann?= 
Date: Sat, 7 Feb 2026 15:21:35 +0100
Subject: [PATCH 220/265] Port rustc_do_not_const_check to the new attribute
 parser

---
 .../src/attributes/rustc_internal.rs              | 15 +++++++++++++++
 compiler/rustc_attr_parsing/src/context.rs        |  1 +
 .../rustc_const_eval/src/check_consts/check.rs    |  5 +++--
 .../src/check_consts/post_drop_elaboration.rs     |  4 +++-
 .../rustc_const_eval/src/const_eval/machine.rs    |  7 +++++--
 compiler/rustc_hir/src/attrs/data_structures.rs   |  3 +++
 .../rustc_hir/src/attrs/encode_cross_crate.rs     |  1 +
 compiler/rustc_hir_typeck/src/callee.rs           |  4 +++-
 compiler/rustc_passes/src/check_attr.rs           |  2 +-
 9 files changed, 35 insertions(+), 7 deletions(-)

diff --git a/compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs b/compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs
index 2c94a708a90c..40ab0e616752 100644
--- a/compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs
+++ b/compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs
@@ -1178,6 +1178,21 @@ impl SingleAttributeParser for RustcDiagnosticItemParser {
     }
 }
 
+pub(crate) struct RustcDoNotConstCheckParser;
+
+impl NoArgsAttributeParser for RustcDoNotConstCheckParser {
+    const PATH: &[Symbol] = &[sym::rustc_do_not_const_check];
+    const ON_DUPLICATE: OnDuplicate = OnDuplicate::Error;
+    const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
+        Allow(Target::Fn),
+        Allow(Target::Method(MethodKind::Inherent)),
+        Allow(Target::Method(MethodKind::TraitImpl)),
+        Allow(Target::Method(MethodKind::Trait { body: false })),
+        Allow(Target::Method(MethodKind::Trait { body: true })),
+    ]);
+    const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcDoNotConstCheck;
+}
+
 pub(crate) struct RustcSymbolName;
 
 impl SingleAttributeParser for RustcSymbolName {
diff --git a/compiler/rustc_attr_parsing/src/context.rs b/compiler/rustc_attr_parsing/src/context.rs
index 17a92641f10f..7ad74761cf70 100644
--- a/compiler/rustc_attr_parsing/src/context.rs
+++ b/compiler/rustc_attr_parsing/src/context.rs
@@ -274,6 +274,7 @@ attribute_parsers!(
         Single>,
         Single>,
         Single>,
+        Single>,
         Single>,
         Single>,
         Single>,
diff --git a/compiler/rustc_const_eval/src/check_consts/check.rs b/compiler/rustc_const_eval/src/check_consts/check.rs
index 57396b657a3f..41c4274ce4f9 100644
--- a/compiler/rustc_const_eval/src/check_consts/check.rs
+++ b/compiler/rustc_const_eval/src/check_consts/check.rs
@@ -7,9 +7,10 @@ use std::ops::Deref;
 
 use rustc_data_structures::assert_matches;
 use rustc_errors::{Diag, ErrorGuaranteed};
+use rustc_hir::attrs::AttributeKind;
 use rustc_hir::def::DefKind;
 use rustc_hir::def_id::DefId;
-use rustc_hir::{self as hir, LangItem};
+use rustc_hir::{self as hir, LangItem, find_attr};
 use rustc_index::bit_set::DenseBitSet;
 use rustc_infer::infer::TyCtxtInferExt;
 use rustc_middle::mir::visit::Visitor;
@@ -215,7 +216,7 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
             return;
         }
 
-        if !tcx.has_attr(def_id, sym::rustc_do_not_const_check) {
+        if !find_attr!(tcx.get_all_attrs(def_id), AttributeKind::RustcDoNotConstCheck) {
             self.visit_body(body);
         }
 
diff --git a/compiler/rustc_const_eval/src/check_consts/post_drop_elaboration.rs b/compiler/rustc_const_eval/src/check_consts/post_drop_elaboration.rs
index 16e142a85ee6..6189d9321dc0 100644
--- a/compiler/rustc_const_eval/src/check_consts/post_drop_elaboration.rs
+++ b/compiler/rustc_const_eval/src/check_consts/post_drop_elaboration.rs
@@ -1,3 +1,5 @@
+use rustc_hir::attrs::AttributeKind;
+use rustc_hir::find_attr;
 use rustc_middle::mir::visit::Visitor;
 use rustc_middle::mir::{self, BasicBlock, Location};
 use rustc_middle::ty::TyCtxt;
@@ -34,7 +36,7 @@ pub fn check_live_drops<'tcx>(tcx: TyCtxt<'tcx>, body: &mir::Body<'tcx>) {
         return;
     }
 
-    if tcx.has_attr(body.source.def_id(), sym::rustc_do_not_const_check) {
+    if find_attr!(tcx.get_all_attrs(body.source.def_id()), AttributeKind::RustcDoNotConstCheck) {
         return;
     }
 
diff --git a/compiler/rustc_const_eval/src/const_eval/machine.rs b/compiler/rustc_const_eval/src/const_eval/machine.rs
index e017362b8c4b..1c58745e02eb 100644
--- a/compiler/rustc_const_eval/src/const_eval/machine.rs
+++ b/compiler/rustc_const_eval/src/const_eval/machine.rs
@@ -6,8 +6,9 @@ use rustc_abi::{Align, Size};
 use rustc_ast::Mutability;
 use rustc_data_structures::fx::{FxHashMap, FxIndexMap, IndexEntry};
 use rustc_errors::msg;
+use rustc_hir::attrs::AttributeKind;
 use rustc_hir::def_id::{DefId, LocalDefId};
-use rustc_hir::{self as hir, CRATE_HIR_ID, LangItem};
+use rustc_hir::{self as hir, CRATE_HIR_ID, LangItem, find_attr};
 use rustc_middle::mir::AssertMessage;
 use rustc_middle::mir::interpret::{Pointer, ReportedErrorInfo};
 use rustc_middle::query::TyCtxtAt;
@@ -440,7 +441,9 @@ impl<'tcx> interpret::Machine<'tcx> for CompileTimeMachine<'tcx> {
             // sensitive check here. But we can at least rule out functions that are not const at
             // all. That said, we have to allow calling functions inside a `const trait`. These
             // *are* const-checked!
-            if !ecx.tcx.is_const_fn(def) || ecx.tcx.has_attr(def, sym::rustc_do_not_const_check) {
+            if !ecx.tcx.is_const_fn(def)
+                || find_attr!(ecx.tcx.get_all_attrs(def), AttributeKind::RustcDoNotConstCheck)
+            {
                 // We certainly do *not* want to actually call the fn
                 // though, so be sure we return here.
                 throw_unsup_format!("calling non-const function `{}`", instance)
diff --git a/compiler/rustc_hir/src/attrs/data_structures.rs b/compiler/rustc_hir/src/attrs/data_structures.rs
index 3798a586c051..2a11518aaa79 100644
--- a/compiler/rustc_hir/src/attrs/data_structures.rs
+++ b/compiler/rustc_hir/src/attrs/data_structures.rs
@@ -1163,6 +1163,9 @@ pub enum AttributeKind {
     /// Represents `#[rustc_diagnostic_item]`
     RustcDiagnosticItem(Symbol),
 
+    /// Represents `#[rustc_do_not_const_check]`
+    RustcDoNotConstCheck,
+
     /// Represents `#[rustc_dummy]`.
     RustcDummy,
 
diff --git a/compiler/rustc_hir/src/attrs/encode_cross_crate.rs b/compiler/rustc_hir/src/attrs/encode_cross_crate.rs
index d8b8ca90660a..8fe70efc23d6 100644
--- a/compiler/rustc_hir/src/attrs/encode_cross_crate.rs
+++ b/compiler/rustc_hir/src/attrs/encode_cross_crate.rs
@@ -115,6 +115,7 @@ impl AttributeKind {
             RustcDenyExplicitImpl(..) => No,
             RustcDeprecatedSafe2024 { .. } => Yes,
             RustcDiagnosticItem(..) => Yes,
+            RustcDoNotConstCheck => Yes,
             RustcDummy => No,
             RustcDumpDefParents => No,
             RustcDumpItemBounds => No,
diff --git a/compiler/rustc_hir_typeck/src/callee.rs b/compiler/rustc_hir_typeck/src/callee.rs
index 7ad0b85ee53f..77ef8a83bce1 100644
--- a/compiler/rustc_hir_typeck/src/callee.rs
+++ b/compiler/rustc_hir_typeck/src/callee.rs
@@ -914,7 +914,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
         }
 
         // If we have `rustc_do_not_const_check`, do not check `[const]` bounds.
-        if self.has_rustc_attrs && self.tcx.has_attr(self.body_id, sym::rustc_do_not_const_check) {
+        if self.has_rustc_attrs
+            && find_attr!(self.tcx.get_all_attrs(self.body_id), AttributeKind::RustcDoNotConstCheck)
+        {
             return;
         }
 
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs
index 33d45b648cb8..5059c7c1c0be 100644
--- a/compiler/rustc_passes/src/check_attr.rs
+++ b/compiler/rustc_passes/src/check_attr.rs
@@ -310,6 +310,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
                     | AttributeKind::RustcDenyExplicitImpl(..)
                     | AttributeKind::RustcDeprecatedSafe2024 {..}
                     | AttributeKind::RustcDiagnosticItem(..)
+                    | AttributeKind::RustcDoNotConstCheck
                     | AttributeKind::RustcDummy
                     | AttributeKind::RustcDumpDefParents
                     | AttributeKind::RustcDumpItemBounds
@@ -401,7 +402,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
                             | sym::rustc_nonnull_optimization_guaranteed
                             | sym::rustc_inherit_overflow_checks
                             | sym::rustc_on_unimplemented
-                            | sym::rustc_do_not_const_check
                             | sym::rustc_doc_primitive
                             | sym::rustc_layout
                             | sym::rustc_autodiff

From 12e66289778bd712d9fe6268b130b45861d7a58f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jana=20D=C3=B6nszelmann?= 
Date: Sat, 7 Feb 2026 16:01:11 +0100
Subject: [PATCH 221/265] Port rustc_nonnull_optimization_guaranteed to the new
 attribute parser

---
 .../rustc_attr_parsing/src/attributes/rustc_internal.rs  | 9 +++++++++
 compiler/rustc_attr_parsing/src/context.rs               | 1 +
 compiler/rustc_const_eval/src/interpret/call.rs          | 8 ++++++--
 compiler/rustc_hir/src/attrs/data_structures.rs          | 3 +++
 compiler/rustc_hir/src/attrs/encode_cross_crate.rs       | 1 +
 compiler/rustc_lint/src/types.rs                         | 5 +++--
 compiler/rustc_passes/src/check_attr.rs                  | 2 +-
 tests/ui/feature-gates/feature-gate-rustc-attrs-1.rs     | 4 +++-
 8 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs b/compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs
index 40ab0e616752..fa0611bd8358 100644
--- a/compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs
+++ b/compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs
@@ -1193,6 +1193,15 @@ impl NoArgsAttributeParser for RustcDoNotConstCheckParser {
     const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcDoNotConstCheck;
 }
 
+pub(crate) struct RustcNonnullOptimizationGuaranteedParser;
+
+impl NoArgsAttributeParser for RustcNonnullOptimizationGuaranteedParser {
+    const PATH: &[Symbol] = &[sym::rustc_nonnull_optimization_guaranteed];
+    const ON_DUPLICATE: OnDuplicate = OnDuplicate::Error;
+    const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Struct)]);
+    const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcNonnullOptimizationGuaranteed;
+}
+
 pub(crate) struct RustcSymbolName;
 
 impl SingleAttributeParser for RustcSymbolName {
diff --git a/compiler/rustc_attr_parsing/src/context.rs b/compiler/rustc_attr_parsing/src/context.rs
index 7ad74761cf70..1bb6c8aa1866 100644
--- a/compiler/rustc_attr_parsing/src/context.rs
+++ b/compiler/rustc_attr_parsing/src/context.rs
@@ -296,6 +296,7 @@ attribute_parsers!(
         Single>,
         Single>,
         Single>,
+        Single>,
         Single>,
         Single>,
         Single>,
diff --git a/compiler/rustc_const_eval/src/interpret/call.rs b/compiler/rustc_const_eval/src/interpret/call.rs
index b17740f57f78..7076aa94fc57 100644
--- a/compiler/rustc_const_eval/src/interpret/call.rs
+++ b/compiler/rustc_const_eval/src/interpret/call.rs
@@ -7,11 +7,12 @@ use either::{Left, Right};
 use rustc_abi::{self as abi, ExternAbi, FieldIdx, Integer, VariantIdx};
 use rustc_data_structures::assert_matches;
 use rustc_errors::msg;
+use rustc_hir::attrs::AttributeKind;
 use rustc_hir::def_id::DefId;
+use rustc_hir::find_attr;
 use rustc_middle::ty::layout::{IntegerExt, TyAndLayout};
 use rustc_middle::ty::{self, AdtDef, Instance, Ty, VariantDef};
 use rustc_middle::{bug, mir, span_bug};
-use rustc_span::sym;
 use rustc_target::callconv::{ArgAbi, FnAbi, PassMode};
 use tracing::field::Empty;
 use tracing::{info, instrument, trace};
@@ -145,7 +146,10 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
         // Check if the inner type is one of the NPO-guaranteed ones.
         // For that we first unpeel transparent *structs* (but not unions).
         let is_npo = |def: AdtDef<'tcx>| {
-            self.tcx.has_attr(def.did(), sym::rustc_nonnull_optimization_guaranteed)
+            find_attr!(
+                self.tcx.get_all_attrs(def.did()),
+                AttributeKind::RustcNonnullOptimizationGuaranteed
+            )
         };
         let inner = self.unfold_transparent(inner, /* may_unfold */ |def| {
             // Stop at NPO types so that we don't miss that attribute in the check below!
diff --git a/compiler/rustc_hir/src/attrs/data_structures.rs b/compiler/rustc_hir/src/attrs/data_structures.rs
index 2a11518aaa79..41970fb7d35a 100644
--- a/compiler/rustc_hir/src/attrs/data_structures.rs
+++ b/compiler/rustc_hir/src/attrs/data_structures.rs
@@ -1268,6 +1268,9 @@ pub enum AttributeKind {
     /// Represents `#[rustc_non_const_trait_method]`.
     RustcNonConstTraitMethod,
 
+    /// Represents `#[rustc_nonnull_optimization_guaranteed]`.
+    RustcNonnullOptimizationGuaranteed,
+
     /// Represents `#[rustc_nounwind]`
     RustcNounwind,
 
diff --git a/compiler/rustc_hir/src/attrs/encode_cross_crate.rs b/compiler/rustc_hir/src/attrs/encode_cross_crate.rs
index 8fe70efc23d6..c50a5c649ee4 100644
--- a/compiler/rustc_hir/src/attrs/encode_cross_crate.rs
+++ b/compiler/rustc_hir/src/attrs/encode_cross_crate.rs
@@ -149,6 +149,7 @@ impl AttributeKind {
             RustcNoImplicitBounds => No,
             RustcNoMirInline => Yes,
             RustcNonConstTraitMethod => No, // should be reported via other queries like `constness`
+            RustcNonnullOptimizationGuaranteed => Yes,
             RustcNounwind => No,
             RustcObjcClass { .. } => No,
             RustcObjcSelector { .. } => No,
diff --git a/compiler/rustc_lint/src/types.rs b/compiler/rustc_lint/src/types.rs
index 47e1fef8b82e..b5126fffc1c5 100644
--- a/compiler/rustc_lint/src/types.rs
+++ b/compiler/rustc_lint/src/types.rs
@@ -1,7 +1,8 @@
 use std::iter;
 
 use rustc_abi::{BackendRepr, TagEncoding, Variants, WrappingRange};
-use rustc_hir::{Expr, ExprKind, HirId, LangItem};
+use rustc_hir::attrs::AttributeKind;
+use rustc_hir::{Expr, ExprKind, HirId, LangItem, find_attr};
 use rustc_middle::bug;
 use rustc_middle::ty::layout::{LayoutOf, SizeSkeleton};
 use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitableExt};
@@ -686,7 +687,7 @@ pub(crate) fn nonnull_optimization_guaranteed<'tcx>(
     tcx: TyCtxt<'tcx>,
     def: ty::AdtDef<'tcx>,
 ) -> bool {
-    tcx.has_attr(def.did(), sym::rustc_nonnull_optimization_guaranteed)
+    find_attr!(tcx.get_all_attrs(def.did()), AttributeKind::RustcNonnullOptimizationGuaranteed)
 }
 
 /// `repr(transparent)` structs can have a single non-1-ZST field, this function returns that
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs
index 5059c7c1c0be..ec0306371205 100644
--- a/compiler/rustc_passes/src/check_attr.rs
+++ b/compiler/rustc_passes/src/check_attr.rs
@@ -342,6 +342,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
                     | AttributeKind::RustcNoImplicitBounds
                     | AttributeKind::RustcNoMirInline
                     | AttributeKind::RustcNonConstTraitMethod
+                    | AttributeKind::RustcNonnullOptimizationGuaranteed
                     | AttributeKind::RustcNounwind
                     | AttributeKind::RustcObjcClass { .. }
                     | AttributeKind::RustcObjcSelector { .. }
@@ -399,7 +400,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
                             | sym::forbid
                             // internal
                             | sym::default_lib_allocator
-                            | sym::rustc_nonnull_optimization_guaranteed
                             | sym::rustc_inherit_overflow_checks
                             | sym::rustc_on_unimplemented
                             | sym::rustc_doc_primitive
diff --git a/tests/ui/feature-gates/feature-gate-rustc-attrs-1.rs b/tests/ui/feature-gates/feature-gate-rustc-attrs-1.rs
index f3d5bcbd8d78..beddfd87a5e7 100644
--- a/tests/ui/feature-gates/feature-gate-rustc-attrs-1.rs
+++ b/tests/ui/feature-gates/feature-gate-rustc-attrs-1.rs
@@ -5,10 +5,12 @@
 //~| NOTE the `#[rustc_nonnull_optimization_guaranteed]` attribute is an internal implementation detail that will never be stable
 //~| NOTE  the `#[rustc_nonnull_optimization_guaranteed]` attribute is just used to document guaranteed niche optimizations in the standard library
 //~| NOTE the compiler does not even check whether the type indeed is being non-null-optimized; it is your responsibility to ensure that the attribute is only used on types that are optimized
-fn main() {}
+struct Foo {}
 
 #[rustc_variance]
 //~^ ERROR use of an internal attribute [E0658]
 //~| NOTE the `#[rustc_variance]` attribute is an internal implementation detail that will never be stable
 //~| NOTE the `#[rustc_variance]` attribute is used for rustc unit tests
 enum E {}
+
+fn main() {}

From 72c7d8640f98f5ac8a59eb25eee0126ad9570b79 Mon Sep 17 00:00:00 2001
From: Nicholas Nethercote 
Date: Fri, 13 Feb 2026 15:53:06 +1100
Subject: [PATCH 222/265] Remove `rustc_query_system` README file.

It's identical to the one in `rustc_query_impl`.
---
 compiler/rustc_query_system/src/query/README.md | 3 ---
 1 file changed, 3 deletions(-)
 delete mode 100644 compiler/rustc_query_system/src/query/README.md

diff --git a/compiler/rustc_query_system/src/query/README.md b/compiler/rustc_query_system/src/query/README.md
deleted file mode 100644
index 8ec07b9fdeb7..000000000000
--- a/compiler/rustc_query_system/src/query/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-For more information about how the query system works, see the [rustc dev guide].
-
-[rustc dev guide]: https://rustc-dev-guide.rust-lang.org/query.html

From 8d56cfe4c3dfec0a258b8371931c608fce4510bb Mon Sep 17 00:00:00 2001
From: Nicholas Nethercote 
Date: Fri, 13 Feb 2026 15:58:57 +1100
Subject: [PATCH 223/265] Move `QuerySideEffect`.

From `rustc_query_system` to `rustc_middle.` I put it in `graph.rs`,
it's one of two files that uses `QuerySideEffect` and seemed as good as
anywhere else.
---
 Cargo.lock                                    |  3 ---
 compiler/rustc_middle/src/dep_graph/graph.rs  | 18 ++++++++++++++-
 compiler/rustc_middle/src/dep_graph/mod.rs    |  3 ++-
 .../rustc_middle/src/query/on_disk_cache.rs   |  3 +--
 compiler/rustc_query_system/Cargo.toml        |  3 ---
 compiler/rustc_query_system/src/lib.rs        |  1 -
 compiler/rustc_query_system/src/query/mod.rs  | 22 -------------------
 7 files changed, 20 insertions(+), 33 deletions(-)
 delete mode 100644 compiler/rustc_query_system/src/query/mod.rs

diff --git a/Cargo.lock b/Cargo.lock
index 53cac09b7a7a..0afdced031e6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4514,11 +4514,8 @@ dependencies = [
  "rustc_abi",
  "rustc_ast",
  "rustc_data_structures",
- "rustc_errors",
  "rustc_feature",
  "rustc_hir",
- "rustc_macros",
- "rustc_serialize",
  "rustc_session",
  "rustc_span",
  "smallvec",
diff --git a/compiler/rustc_middle/src/dep_graph/graph.rs b/compiler/rustc_middle/src/dep_graph/graph.rs
index 6b9f18a6bfe1..a243bbb34334 100644
--- a/compiler/rustc_middle/src/dep_graph/graph.rs
+++ b/compiler/rustc_middle/src/dep_graph/graph.rs
@@ -16,7 +16,6 @@ use rustc_errors::DiagInner;
 use rustc_index::IndexVec;
 use rustc_macros::{Decodable, Encodable};
 use rustc_query_system::ich::StableHashingContext;
-use rustc_query_system::query::QuerySideEffect;
 use rustc_serialize::opaque::{FileEncodeResult, FileEncoder};
 use rustc_session::Session;
 use tracing::{debug, instrument};
@@ -30,6 +29,23 @@ use crate::dep_graph::edges::EdgesVec;
 use crate::ty::TyCtxt;
 use crate::verify_ich::incremental_verify_ich;
 
+/// Tracks 'side effects' for a particular query.
+/// This struct is saved to disk along with the query result,
+/// and loaded from disk if we mark the query as green.
+/// This allows us to 'replay' changes to global state
+/// that would otherwise only occur if we actually
+/// executed the query method.
+///
+/// Each side effect gets an unique dep node index which is added
+/// as a dependency of the query which had the effect.
+#[derive(Debug, Encodable, Decodable)]
+pub enum QuerySideEffect {
+    /// Stores a diagnostic emitted during query execution.
+    /// This diagnostic will be re-emitted if we mark
+    /// the query as green, as that query will have the side
+    /// effect dep node as a dependency.
+    Diagnostic(DiagInner),
+}
 #[derive(Clone)]
 pub struct DepGraph {
     data: Option>,
diff --git a/compiler/rustc_middle/src/dep_graph/mod.rs b/compiler/rustc_middle/src/dep_graph/mod.rs
index b10f341c71a6..e8b2f86e5718 100644
--- a/compiler/rustc_middle/src/dep_graph/mod.rs
+++ b/compiler/rustc_middle/src/dep_graph/mod.rs
@@ -7,7 +7,8 @@ pub use self::dep_node::{
     label_strs,
 };
 pub use self::graph::{
-    DepGraph, DepGraphData, DepNodeIndex, TaskDepsRef, WorkProduct, WorkProductMap, hash_result,
+    DepGraph, DepGraphData, DepNodeIndex, QuerySideEffect, TaskDepsRef, WorkProduct,
+    WorkProductMap, hash_result,
 };
 use self::graph::{MarkFrame, print_markframe_trace};
 pub use self::query::DepGraphQuery;
diff --git a/compiler/rustc_middle/src/query/on_disk_cache.rs b/compiler/rustc_middle/src/query/on_disk_cache.rs
index 5ef0c2500e7a..e874e7e22b5c 100644
--- a/compiler/rustc_middle/src/query/on_disk_cache.rs
+++ b/compiler/rustc_middle/src/query/on_disk_cache.rs
@@ -11,7 +11,6 @@ use rustc_hir::def_id::{CrateNum, DefId, DefIndex, LOCAL_CRATE, LocalDefId, Stab
 use rustc_hir::definitions::DefPathHash;
 use rustc_index::{Idx, IndexVec};
 use rustc_macros::{Decodable, Encodable};
-use rustc_query_system::query::QuerySideEffect;
 use rustc_serialize::opaque::{FileEncodeResult, FileEncoder, IntEncodedWithFixedSize, MemDecoder};
 use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
 use rustc_session::Session;
@@ -24,7 +23,7 @@ use rustc_span::{
     SourceFile, Span, SpanDecoder, SpanEncoder, StableSourceFileId, Symbol,
 };
 
-use crate::dep_graph::{DepNodeIndex, SerializedDepNodeIndex};
+use crate::dep_graph::{DepNodeIndex, QuerySideEffect, SerializedDepNodeIndex};
 use crate::mir::interpret::{AllocDecodingSession, AllocDecodingState};
 use crate::mir::mono::MonoItem;
 use crate::mir::{self, interpret};
diff --git a/compiler/rustc_query_system/Cargo.toml b/compiler/rustc_query_system/Cargo.toml
index bd12dcbfe0d1..8ea5b6c5487b 100644
--- a/compiler/rustc_query_system/Cargo.toml
+++ b/compiler/rustc_query_system/Cargo.toml
@@ -8,11 +8,8 @@ edition = "2024"
 rustc_abi = { path = "../rustc_abi" }
 rustc_ast = { path = "../rustc_ast" }
 rustc_data_structures = { path = "../rustc_data_structures" }
-rustc_errors = { path = "../rustc_errors" }
 rustc_feature = { path = "../rustc_feature" }
 rustc_hir = { path = "../rustc_hir" }
-rustc_macros = { path = "../rustc_macros" }
-rustc_serialize = { path = "../rustc_serialize" }
 rustc_session = { path = "../rustc_session" }
 rustc_span = { path = "../rustc_span" }
 smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
diff --git a/compiler/rustc_query_system/src/lib.rs b/compiler/rustc_query_system/src/lib.rs
index bb077d02422b..21c8650ea56a 100644
--- a/compiler/rustc_query_system/src/lib.rs
+++ b/compiler/rustc_query_system/src/lib.rs
@@ -5,4 +5,3 @@
 // tidy-alphabetical-end
 
 pub mod ich;
-pub mod query;
diff --git a/compiler/rustc_query_system/src/query/mod.rs b/compiler/rustc_query_system/src/query/mod.rs
deleted file mode 100644
index 87be4358fb8b..000000000000
--- a/compiler/rustc_query_system/src/query/mod.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-use std::fmt::Debug;
-
-use rustc_errors::DiagInner;
-use rustc_macros::{Decodable, Encodable};
-
-/// Tracks 'side effects' for a particular query.
-/// This struct is saved to disk along with the query result,
-/// and loaded from disk if we mark the query as green.
-/// This allows us to 'replay' changes to global state
-/// that would otherwise only occur if we actually
-/// executed the query method.
-///
-/// Each side effect gets an unique dep node index which is added
-/// as a dependency of the query which had the effect.
-#[derive(Debug, Encodable, Decodable)]
-pub enum QuerySideEffect {
-    /// Stores a diagnostic emitted during query execution.
-    /// This diagnostic will be re-emitted if we mark
-    /// the query as green, as that query will have the side
-    /// effect dep node as a dependency.
-    Diagnostic(DiagInner),
-}

From 6a3a3d4f98da0f9f6cba62735ced5ea69505e3a4 Mon Sep 17 00:00:00 2001
From: Ralf Jung 
Date: Mon, 16 Feb 2026 11:08:06 +0100
Subject: [PATCH 224/265] try to make cargo-miri work with bootstrap cargo

---
 src/tools/miri/cargo-miri/src/setup.rs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/tools/miri/cargo-miri/src/setup.rs b/src/tools/miri/cargo-miri/src/setup.rs
index 47c99f939254..76e9e62f5200 100644
--- a/src/tools/miri/cargo-miri/src/setup.rs
+++ b/src/tools/miri/cargo-miri/src/setup.rs
@@ -89,7 +89,10 @@ pub fn setup(
     let cargo_cmd = {
         let mut command = cargo();
         // Allow JSON targets since users do not have a good way to set this flag otherwise.
-        command.arg("-Zjson-target-spec");
+        if env::var("RUSTC_STAGE").is_err() {
+            // ^ is a HACK for bootstrap cargo. FIXME(cfg(bootstrap)) remove the hack.
+            command.arg("-Zjson-target-spec");
+        }
         // Use Miri as rustc to build a libstd compatible with us (and use the right flags).
         // We set ourselves (`cargo-miri`) instead of Miri directly to be able to patch the flags
         // for `libpanic_abort` (usually this is done by bootstrap but we have to do it ourselves).

From 74dd36a934caddbfabe3a44694958e4d3b2c4af6 Mon Sep 17 00:00:00 2001
From: Nicholas Nethercote 
Date: Mon, 16 Feb 2026 21:04:57 +1100
Subject: [PATCH 225/265] Remove `DEP_KIND_DEBUG`.

It's plumbing to work around lack of access to `rustc_middle`, which is
no longer a problem.
---
 compiler/rustc_interface/src/callbacks.rs       | 17 +----------------
 compiler/rustc_middle/src/dep_graph/dep_node.rs | 17 ++++++++---------
 2 files changed, 9 insertions(+), 25 deletions(-)

diff --git a/compiler/rustc_interface/src/callbacks.rs b/compiler/rustc_interface/src/callbacks.rs
index 05ddfd1f107a..114d73220d37 100644
--- a/compiler/rustc_interface/src/callbacks.rs
+++ b/compiler/rustc_interface/src/callbacks.rs
@@ -12,8 +12,7 @@
 use std::fmt;
 
 use rustc_errors::{DiagInner, TRACK_DIAGNOSTIC};
-use rustc_middle::dep_graph::dep_node::default_dep_kind_debug;
-use rustc_middle::dep_graph::{DepKind, DepNode, TaskDepsRef};
+use rustc_middle::dep_graph::{DepNode, TaskDepsRef};
 use rustc_middle::ty::tls;
 
 fn track_span_parent(def_id: rustc_span::def_id::LocalDefId) {
@@ -65,18 +64,6 @@ fn def_id_debug(def_id: rustc_hir::def_id::DefId, f: &mut fmt::Formatter<'_>) ->
     write!(f, ")")
 }
 
-/// This is a callback from `rustc_query_system` as it cannot access the implicit state
-/// in `rustc_middle` otherwise.
-pub fn dep_kind_debug(kind: DepKind, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-    tls::with_opt(|opt_tcx| {
-        if let Some(tcx) = opt_tcx {
-            write!(f, "{}", tcx.dep_kind_vtable(kind).name)
-        } else {
-            default_dep_kind_debug(kind, f)
-        }
-    })
-}
-
 /// This is a callback from `rustc_query_system` as it cannot access the implicit state
 /// in `rustc_middle` otherwise.
 pub fn dep_node_debug(node: DepNode, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
@@ -105,8 +92,6 @@ pub fn dep_node_debug(node: DepNode, f: &mut std::fmt::Formatter<'_>) -> std::fm
 pub fn setup_callbacks() {
     rustc_span::SPAN_TRACK.swap(&(track_span_parent as fn(_)));
     rustc_hir::def_id::DEF_ID_DEBUG.swap(&(def_id_debug as fn(_, &mut fmt::Formatter<'_>) -> _));
-    rustc_middle::dep_graph::dep_node::DEP_KIND_DEBUG
-        .swap(&(dep_kind_debug as fn(_, &mut fmt::Formatter<'_>) -> _));
     rustc_middle::dep_graph::dep_node::DEP_NODE_DEBUG
         .swap(&(dep_node_debug as fn(_, &mut fmt::Formatter<'_>) -> _));
     TRACK_DIAGNOSTIC.swap(&(track_diagnostic as _));
diff --git a/compiler/rustc_middle/src/dep_graph/dep_node.rs b/compiler/rustc_middle/src/dep_graph/dep_node.rs
index 909638b85906..cec2d0e4bbed 100644
--- a/compiler/rustc_middle/src/dep_graph/dep_node.rs
+++ b/compiler/rustc_middle/src/dep_graph/dep_node.rs
@@ -69,7 +69,7 @@ use rustc_span::Symbol;
 
 use super::{FingerprintStyle, SerializedDepNodeIndex};
 use crate::mir::mono::MonoItem;
-use crate::ty::TyCtxt;
+use crate::ty::{TyCtxt, tls};
 
 /// This serves as an index into arrays built by `make_dep_kind_array`.
 #[derive(Clone, Copy, PartialEq, Eq, Hash)]
@@ -114,16 +114,15 @@ impl DepKind {
     pub(crate) const MAX: u16 = DEP_KIND_VARIANTS - 1;
 }
 
-pub fn default_dep_kind_debug(kind: DepKind, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-    f.debug_struct("DepKind").field("variant", &kind.variant).finish()
-}
-
-pub static DEP_KIND_DEBUG: AtomicRef) -> fmt::Result> =
-    AtomicRef::new(&(default_dep_kind_debug as fn(_, &mut fmt::Formatter<'_>) -> _));
-
 impl fmt::Debug for DepKind {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        (*DEP_KIND_DEBUG)(*self, f)
+        tls::with_opt(|opt_tcx| {
+            if let Some(tcx) = opt_tcx {
+                write!(f, "{}", tcx.dep_kind_vtable(*self).name)
+            } else {
+                f.debug_struct("DepKind").field("variant", &self.variant).finish()
+            }
+        })
     }
 }
 

From 47ed4526d9aa208e7a5c9249586d42784ff660da Mon Sep 17 00:00:00 2001
From: Nicholas Nethercote 
Date: Mon, 16 Feb 2026 21:13:40 +1100
Subject: [PATCH 226/265] Remove `DEP_NODE_DEBUG`.

Like the previous commit, it's no longer needed.
---
 compiler/rustc_interface/src/callbacks.rs     | 31 ++-----------------
 .../rustc_middle/src/dep_graph/dep_node.rs    | 27 ++++++++++------
 2 files changed, 21 insertions(+), 37 deletions(-)

diff --git a/compiler/rustc_interface/src/callbacks.rs b/compiler/rustc_interface/src/callbacks.rs
index 114d73220d37..4a1da0f50cc2 100644
--- a/compiler/rustc_interface/src/callbacks.rs
+++ b/compiler/rustc_interface/src/callbacks.rs
@@ -11,8 +11,8 @@
 
 use std::fmt;
 
-use rustc_errors::{DiagInner, TRACK_DIAGNOSTIC};
-use rustc_middle::dep_graph::{DepNode, TaskDepsRef};
+use rustc_errors::DiagInner;
+use rustc_middle::dep_graph::TaskDepsRef;
 use rustc_middle::ty::tls;
 
 fn track_span_parent(def_id: rustc_span::def_id::LocalDefId) {
@@ -64,35 +64,10 @@ fn def_id_debug(def_id: rustc_hir::def_id::DefId, f: &mut fmt::Formatter<'_>) ->
     write!(f, ")")
 }
 
-/// This is a callback from `rustc_query_system` as it cannot access the implicit state
-/// in `rustc_middle` otherwise.
-pub fn dep_node_debug(node: DepNode, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-    write!(f, "{:?}(", node.kind)?;
-
-    tls::with_opt(|opt_tcx| {
-        if let Some(tcx) = opt_tcx {
-            if let Some(def_id) = node.extract_def_id(tcx) {
-                write!(f, "{}", tcx.def_path_debug_str(def_id))?;
-            } else if let Some(ref s) = tcx.dep_graph.dep_node_debug_str(node) {
-                write!(f, "{s}")?;
-            } else {
-                write!(f, "{}", node.hash)?;
-            }
-        } else {
-            write!(f, "{}", node.hash)?;
-        }
-        Ok(())
-    })?;
-
-    write!(f, ")")
-}
-
 /// Sets up the callbacks in prior crates which we want to refer to the
 /// TyCtxt in.
 pub fn setup_callbacks() {
     rustc_span::SPAN_TRACK.swap(&(track_span_parent as fn(_)));
     rustc_hir::def_id::DEF_ID_DEBUG.swap(&(def_id_debug as fn(_, &mut fmt::Formatter<'_>) -> _));
-    rustc_middle::dep_graph::dep_node::DEP_NODE_DEBUG
-        .swap(&(dep_node_debug as fn(_, &mut fmt::Formatter<'_>) -> _));
-    TRACK_DIAGNOSTIC.swap(&(track_diagnostic as _));
+    rustc_errors::TRACK_DIAGNOSTIC.swap(&(track_diagnostic as _));
 }
diff --git a/compiler/rustc_middle/src/dep_graph/dep_node.rs b/compiler/rustc_middle/src/dep_graph/dep_node.rs
index cec2d0e4bbed..099a4613edf6 100644
--- a/compiler/rustc_middle/src/dep_graph/dep_node.rs
+++ b/compiler/rustc_middle/src/dep_graph/dep_node.rs
@@ -58,7 +58,6 @@
 use std::fmt;
 use std::hash::Hash;
 
-use rustc_data_structures::AtomicRef;
 use rustc_data_structures::fingerprint::{Fingerprint, PackedFingerprint};
 use rustc_data_structures::stable_hasher::{HashStable, StableHasher, StableOrd, ToStableHashKey};
 use rustc_hir::def_id::DefId;
@@ -174,16 +173,26 @@ impl DepNode {
     }
 }
 
-pub fn default_dep_node_debug(node: DepNode, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-    f.debug_struct("DepNode").field("kind", &node.kind).field("hash", &node.hash).finish()
-}
-
-pub static DEP_NODE_DEBUG: AtomicRef) -> fmt::Result> =
-    AtomicRef::new(&(default_dep_node_debug as fn(_, &mut fmt::Formatter<'_>) -> _));
-
 impl fmt::Debug for DepNode {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        (*DEP_NODE_DEBUG)(*self, f)
+        write!(f, "{:?}(", self.kind)?;
+
+        tls::with_opt(|opt_tcx| {
+            if let Some(tcx) = opt_tcx {
+                if let Some(def_id) = self.extract_def_id(tcx) {
+                    write!(f, "{}", tcx.def_path_debug_str(def_id))?;
+                } else if let Some(ref s) = tcx.dep_graph.dep_node_debug_str(*self) {
+                    write!(f, "{s}")?;
+                } else {
+                    write!(f, "{}", self.hash)?;
+                }
+            } else {
+                write!(f, "{}", self.hash)?;
+            }
+            Ok(())
+        })?;
+
+        write!(f, ")")
     }
 }
 

From e9288e7e908228fd33e6e4407f36291be2b66f9c Mon Sep 17 00:00:00 2001
From: Nicholas Nethercote 
Date: Fri, 13 Feb 2026 16:02:59 +1100
Subject: [PATCH 227/265] Remove last remnants of `rustc_query_system`.

At this point module `ich` is the only thing left.
---
 Cargo.lock                                       | 16 ----------------
 compiler/rustc_codegen_llvm/Cargo.toml           |  1 -
 compiler/rustc_macros/src/hash_stable.rs         |  2 +-
 compiler/rustc_middle/Cargo.toml                 |  1 -
 compiler/rustc_middle/src/dep_graph/dep_node.rs  |  2 +-
 compiler/rustc_middle/src/dep_graph/graph.rs     |  2 +-
 .../src/ich/hcx.rs                               |  0
 .../src/ich/impls_syntax.rs                      |  2 +-
 .../src/ich/mod.rs                               |  0
 compiler/rustc_middle/src/lib.rs                 |  1 +
 compiler/rustc_middle/src/middle/privacy.rs      |  2 +-
 compiler/rustc_middle/src/mir/mod.rs             |  3 ++-
 compiler/rustc_middle/src/mir/mono.rs            |  2 +-
 compiler/rustc_middle/src/query/caches.rs        |  2 +-
 compiler/rustc_middle/src/query/plumbing.rs      |  5 +----
 compiler/rustc_middle/src/ty/adt.rs              |  2 +-
 compiler/rustc_middle/src/ty/context.rs          |  4 ++--
 compiler/rustc_middle/src/ty/impls_ty.rs         |  2 +-
 compiler/rustc_middle/src/ty/mod.rs              |  2 +-
 compiler/rustc_middle/src/verify_ich.rs          |  2 +-
 compiler/rustc_query_system/Cargo.toml           | 16 ----------------
 compiler/rustc_query_system/src/lib.rs           |  7 -------
 .../builder/cli_paths/snapshots/x_bench.snap     |  1 -
 .../cli_paths/snapshots/x_build_compiler.snap    |  1 -
 .../builder/cli_paths/snapshots/x_check.snap     |  1 -
 .../cli_paths/snapshots/x_check_compiler.snap    |  1 -
 ..._check_compiletest_include_default_paths.snap |  1 -
 .../builder/cli_paths/snapshots/x_clippy.snap    |  1 -
 .../core/builder/cli_paths/snapshots/x_fix.snap  |  1 -
 .../core/builder/cli_paths/snapshots/x_test.snap |  1 -
 .../snapshots/x_test_skip_coverage.snap          |  1 -
 .../cli_paths/snapshots/x_test_skip_tests.snap   |  1 -
 .../snapshots/x_test_skip_tests_etc.snap         |  1 -
 src/bootstrap/src/core/builder/tests.rs          | 14 +++++++-------
 .../queries/incremental-compilation-in-detail.md |  4 ++--
 tests/run-make/short-ice/rmake.rs                |  6 +++---
 tests/ui-fulldeps/hash-stable-is-unstable.rs     |  2 +-
 tests/ui-fulldeps/hash-stable-is-unstable.stderr |  4 ++--
 triagebot.toml                                   |  5 ++---
 39 files changed, 34 insertions(+), 88 deletions(-)
 rename compiler/{rustc_query_system => rustc_middle}/src/ich/hcx.rs (100%)
 rename compiler/{rustc_query_system => rustc_middle}/src/ich/impls_syntax.rs (99%)
 rename compiler/{rustc_query_system => rustc_middle}/src/ich/mod.rs (100%)
 delete mode 100644 compiler/rustc_query_system/Cargo.toml
 delete mode 100644 compiler/rustc_query_system/src/lib.rs

diff --git a/Cargo.lock b/Cargo.lock
index 0afdced031e6..d7d19be42c58 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3640,7 +3640,6 @@ dependencies = [
  "rustc_macros",
  "rustc_metadata",
  "rustc_middle",
- "rustc_query_system",
  "rustc_sanitizers",
  "rustc_session",
  "rustc_span",
@@ -4243,7 +4242,6 @@ dependencies = [
  "rustc_index",
  "rustc_lint_defs",
  "rustc_macros",
- "rustc_query_system",
  "rustc_serialize",
  "rustc_session",
  "rustc_span",
@@ -4507,20 +4505,6 @@ dependencies = [
  "tracing",
 ]
 
-[[package]]
-name = "rustc_query_system"
-version = "0.0.0"
-dependencies = [
- "rustc_abi",
- "rustc_ast",
- "rustc_data_structures",
- "rustc_feature",
- "rustc_hir",
- "rustc_session",
- "rustc_span",
- "smallvec",
-]
-
 [[package]]
 name = "rustc_resolve"
 version = "0.0.0"
diff --git a/compiler/rustc_codegen_llvm/Cargo.toml b/compiler/rustc_codegen_llvm/Cargo.toml
index 90c87494c3c5..0ffff2d331b1 100644
--- a/compiler/rustc_codegen_llvm/Cargo.toml
+++ b/compiler/rustc_codegen_llvm/Cargo.toml
@@ -31,7 +31,6 @@ rustc_llvm = { path = "../rustc_llvm" }
 rustc_macros = { path = "../rustc_macros" }
 rustc_metadata = { path = "../rustc_metadata" }
 rustc_middle = { path = "../rustc_middle" }
-rustc_query_system = { path = "../rustc_query_system" }
 rustc_sanitizers = { path = "../rustc_sanitizers" }
 rustc_session = { path = "../rustc_session" }
 rustc_span = { path = "../rustc_span" }
diff --git a/compiler/rustc_macros/src/hash_stable.rs b/compiler/rustc_macros/src/hash_stable.rs
index a6396ba687d1..fa67adb406ed 100644
--- a/compiler/rustc_macros/src/hash_stable.rs
+++ b/compiler/rustc_macros/src/hash_stable.rs
@@ -96,7 +96,7 @@ fn hash_stable_derive_with_mode(
 
     let context: syn::Type = match mode {
         HashStableMode::Normal => {
-            parse_quote!(::rustc_query_system::ich::StableHashingContext<'__ctx>)
+            parse_quote!(::rustc_middle::ich::StableHashingContext<'__ctx>)
         }
         HashStableMode::Generic | HashStableMode::NoContext => parse_quote!(__CTX),
     };
diff --git a/compiler/rustc_middle/Cargo.toml b/compiler/rustc_middle/Cargo.toml
index 121e77614725..8bad0e291bf8 100644
--- a/compiler/rustc_middle/Cargo.toml
+++ b/compiler/rustc_middle/Cargo.toml
@@ -26,7 +26,6 @@ rustc_hir_pretty = { path = "../rustc_hir_pretty" }
 rustc_index = { path = "../rustc_index" }
 rustc_lint_defs = { path = "../rustc_lint_defs" }
 rustc_macros = { path = "../rustc_macros" }
-rustc_query_system = { path = "../rustc_query_system" }
 rustc_serialize = { path = "../rustc_serialize" }
 rustc_session = { path = "../rustc_session" }
 rustc_span = { path = "../rustc_span" }
diff --git a/compiler/rustc_middle/src/dep_graph/dep_node.rs b/compiler/rustc_middle/src/dep_graph/dep_node.rs
index 099a4613edf6..578277bce593 100644
--- a/compiler/rustc_middle/src/dep_graph/dep_node.rs
+++ b/compiler/rustc_middle/src/dep_graph/dep_node.rs
@@ -63,10 +63,10 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher, StableOrd,
 use rustc_hir::def_id::DefId;
 use rustc_hir::definitions::DefPathHash;
 use rustc_macros::{Decodable, Encodable};
-use rustc_query_system::ich::StableHashingContext;
 use rustc_span::Symbol;
 
 use super::{FingerprintStyle, SerializedDepNodeIndex};
+use crate::ich::StableHashingContext;
 use crate::mir::mono::MonoItem;
 use crate::ty::{TyCtxt, tls};
 
diff --git a/compiler/rustc_middle/src/dep_graph/graph.rs b/compiler/rustc_middle/src/dep_graph/graph.rs
index a243bbb34334..6a19c02bb81b 100644
--- a/compiler/rustc_middle/src/dep_graph/graph.rs
+++ b/compiler/rustc_middle/src/dep_graph/graph.rs
@@ -15,7 +15,6 @@ use rustc_data_structures::{assert_matches, outline};
 use rustc_errors::DiagInner;
 use rustc_index::IndexVec;
 use rustc_macros::{Decodable, Encodable};
-use rustc_query_system::ich::StableHashingContext;
 use rustc_serialize::opaque::{FileEncodeResult, FileEncoder};
 use rustc_session::Session;
 use tracing::{debug, instrument};
@@ -26,6 +25,7 @@ use super::query::DepGraphQuery;
 use super::serialized::{GraphEncoder, SerializedDepGraph, SerializedDepNodeIndex};
 use super::{DepKind, DepNode, HasDepContext, WorkProductId, read_deps, with_deps};
 use crate::dep_graph::edges::EdgesVec;
+use crate::ich::StableHashingContext;
 use crate::ty::TyCtxt;
 use crate::verify_ich::incremental_verify_ich;
 
diff --git a/compiler/rustc_query_system/src/ich/hcx.rs b/compiler/rustc_middle/src/ich/hcx.rs
similarity index 100%
rename from compiler/rustc_query_system/src/ich/hcx.rs
rename to compiler/rustc_middle/src/ich/hcx.rs
diff --git a/compiler/rustc_query_system/src/ich/impls_syntax.rs b/compiler/rustc_middle/src/ich/impls_syntax.rs
similarity index 99%
rename from compiler/rustc_query_system/src/ich/impls_syntax.rs
rename to compiler/rustc_middle/src/ich/impls_syntax.rs
index 5592f6553971..be4e5333c64b 100644
--- a/compiler/rustc_query_system/src/ich/impls_syntax.rs
+++ b/compiler/rustc_middle/src/ich/impls_syntax.rs
@@ -6,7 +6,7 @@ use rustc_span::{SourceFile, Symbol, sym};
 use smallvec::SmallVec;
 use {rustc_ast as ast, rustc_hir as hir};
 
-use crate::ich::StableHashingContext;
+use super::StableHashingContext;
 
 impl<'a> HashStable> for ast::NodeId {
     #[inline]
diff --git a/compiler/rustc_query_system/src/ich/mod.rs b/compiler/rustc_middle/src/ich/mod.rs
similarity index 100%
rename from compiler/rustc_query_system/src/ich/mod.rs
rename to compiler/rustc_middle/src/ich/mod.rs
diff --git a/compiler/rustc_middle/src/lib.rs b/compiler/rustc_middle/src/lib.rs
index 1c4c987aee92..5fa6f10865b5 100644
--- a/compiler/rustc_middle/src/lib.rs
+++ b/compiler/rustc_middle/src/lib.rs
@@ -72,6 +72,7 @@ pub mod arena;
 pub mod error;
 pub mod hir;
 pub mod hooks;
+pub mod ich;
 pub mod infer;
 pub mod lint;
 pub mod metadata;
diff --git a/compiler/rustc_middle/src/middle/privacy.rs b/compiler/rustc_middle/src/middle/privacy.rs
index e3e04c9d1800..0be4c8243d63 100644
--- a/compiler/rustc_middle/src/middle/privacy.rs
+++ b/compiler/rustc_middle/src/middle/privacy.rs
@@ -8,9 +8,9 @@ use rustc_data_structures::fx::{FxIndexMap, IndexEntry};
 use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
 use rustc_hir::def::DefKind;
 use rustc_macros::HashStable;
-use rustc_query_system::ich::StableHashingContext;
 use rustc_span::def_id::{CRATE_DEF_ID, LocalDefId};
 
+use crate::ich::StableHashingContext;
 use crate::ty::{TyCtxt, Visibility};
 
 /// Represents the levels of effective visibility an item can have.
diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs
index 418cdea01660..9d0e4b5e6dfa 100644
--- a/compiler/rustc_middle/src/mir/mod.rs
+++ b/compiler/rustc_middle/src/mir/mod.rs
@@ -911,7 +911,8 @@ pub struct VarBindingIntroduction {
 
 mod binding_form_impl {
     use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
-    use rustc_query_system::ich::StableHashingContext;
+
+    use crate::ich::StableHashingContext;
 
     impl<'a, 'tcx> HashStable> for super::BindingForm<'tcx> {
         fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) {
diff --git a/compiler/rustc_middle/src/mir/mono.rs b/compiler/rustc_middle/src/mir/mono.rs
index 577d226fc9d7..acebf91b1cbf 100644
--- a/compiler/rustc_middle/src/mir/mono.rs
+++ b/compiler/rustc_middle/src/mir/mono.rs
@@ -12,7 +12,6 @@ use rustc_hir::ItemId;
 use rustc_hir::attrs::{InlineAttr, Linkage};
 use rustc_hir::def_id::{CrateNum, DefId, DefIdSet, LOCAL_CRATE};
 use rustc_macros::{HashStable, TyDecodable, TyEncodable};
-use rustc_query_system::ich::StableHashingContext;
 use rustc_session::config::OptLevel;
 use rustc_span::{Span, Symbol};
 use rustc_target::spec::SymbolVisibility;
@@ -20,6 +19,7 @@ use tracing::debug;
 
 use crate::dep_graph::dep_node::{make_compile_codegen_unit, make_compile_mono_item};
 use crate::dep_graph::{DepNode, WorkProduct, WorkProductId};
+use crate::ich::StableHashingContext;
 use crate::middle::codegen_fn_attrs::CodegenFnAttrFlags;
 use crate::ty::{self, GenericArgs, Instance, InstanceKind, SymbolName, Ty, TyCtxt};
 
diff --git a/compiler/rustc_middle/src/query/caches.rs b/compiler/rustc_middle/src/query/caches.rs
index 7424492ddc1f..c1f5e5b67085 100644
--- a/compiler/rustc_middle/src/query/caches.rs
+++ b/compiler/rustc_middle/src/query/caches.rs
@@ -7,10 +7,10 @@ use rustc_data_structures::stable_hasher::HashStable;
 pub use rustc_data_structures::vec_cache::VecCache;
 use rustc_hir::def_id::LOCAL_CRATE;
 use rustc_index::Idx;
-use rustc_query_system::ich::StableHashingContext;
 use rustc_span::def_id::{DefId, DefIndex};
 
 use crate::dep_graph::DepNodeIndex;
+use crate::ich::StableHashingContext;
 
 /// Traits that all query keys must satisfy.
 pub trait QueryCacheKey = Hash + Eq + Copy + Debug + for<'a> HashStable>;
diff --git a/compiler/rustc_middle/src/query/plumbing.rs b/compiler/rustc_middle/src/query/plumbing.rs
index 727e93148251..47b6aea077d1 100644
--- a/compiler/rustc_middle/src/query/plumbing.rs
+++ b/compiler/rustc_middle/src/query/plumbing.rs
@@ -8,12 +8,12 @@ use rustc_data_structures::sync::{AtomicU64, WorkerLocal};
 use rustc_hir::def_id::{DefId, LocalDefId};
 use rustc_hir::hir_id::OwnerId;
 use rustc_macros::HashStable;
-use rustc_query_system::ich::StableHashingContext;
 use rustc_span::{ErrorGuaranteed, Span};
 pub use sealed::IntoQueryParam;
 
 use crate::dep_graph;
 use crate::dep_graph::{DepKind, DepNodeIndex, SerializedDepNodeIndex};
+use crate::ich::StableHashingContext;
 use crate::queries::{
     ExternProviders, PerQueryVTables, Providers, QueryArenas, QueryCaches, QueryEngine, QueryStates,
 };
@@ -102,9 +102,6 @@ pub enum QueryMode {
 }
 
 /// Stores function pointers and other metadata for a particular query.
-///
-/// Used indirectly by query plumbing in `rustc_query_system` via a trait,
-/// and also used directly by query plumbing in `rustc_query_impl`.
 pub struct QueryVTable<'tcx, C: QueryCache> {
     pub name: &'static str,
     pub eval_always: bool,
diff --git a/compiler/rustc_middle/src/ty/adt.rs b/compiler/rustc_middle/src/ty/adt.rs
index 510c546f82a4..242d3742abad 100644
--- a/compiler/rustc_middle/src/ty/adt.rs
+++ b/compiler/rustc_middle/src/ty/adt.rs
@@ -15,7 +15,6 @@ use rustc_hir::def_id::DefId;
 use rustc_hir::{self as hir, LangItem, find_attr};
 use rustc_index::{IndexSlice, IndexVec};
 use rustc_macros::{HashStable, TyDecodable, TyEncodable};
-use rustc_query_system::ich::StableHashingContext;
 use rustc_session::DataTypeKind;
 use rustc_type_ir::solve::AdtDestructorKind;
 use tracing::{debug, info, trace};
@@ -23,6 +22,7 @@ use tracing::{debug, info, trace};
 use super::{
     AsyncDestructor, Destructor, FieldDef, GenericPredicates, Ty, TyCtxt, VariantDef, VariantDiscr,
 };
+use crate::ich::StableHashingContext;
 use crate::mir::interpret::ErrorHandled;
 use crate::ty;
 use crate::ty::util::{Discr, IntTypeExt};
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs
index 430890d5a42d..94a77ce13c14 100644
--- a/compiler/rustc_middle/src/ty/context.rs
+++ b/compiler/rustc_middle/src/ty/context.rs
@@ -39,7 +39,6 @@ use rustc_hir::lang_items::LangItem;
 use rustc_hir::limit::Limit;
 use rustc_hir::{self as hir, HirId, Node, TraitCandidate, find_attr};
 use rustc_index::IndexVec;
-use rustc_query_system::ich::StableHashingContext;
 use rustc_serialize::opaque::{FileEncodeResult, FileEncoder};
 use rustc_session::Session;
 use rustc_session::config::CrateType;
@@ -55,6 +54,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::ich::StableHashingContext;
 use crate::infer::canonical::{CanonicalParamEnvCache, CanonicalVarKind};
 use crate::lint::lint_level;
 use crate::metadata::ModChild;
@@ -1220,7 +1220,7 @@ impl<'tcx> TyCtxt<'tcx> {
     pub fn needs_crate_hash(self) -> bool {
         // Why is the crate hash needed for these configurations?
         // - debug_assertions: for the "fingerprint the result" check in
-        //   `rustc_query_system::query::plumbing::execute_job`.
+        //   `rustc_query_impl::execution::execute_job`.
         // - incremental: for query lookups.
         // - needs_metadata: for putting into crate metadata.
         // - instrument_coverage: for putting into coverage data (see
diff --git a/compiler/rustc_middle/src/ty/impls_ty.rs b/compiler/rustc_middle/src/ty/impls_ty.rs
index 95a1a1bf5bce..f06ce7324d4c 100644
--- a/compiler/rustc_middle/src/ty/impls_ty.rs
+++ b/compiler/rustc_middle/src/ty/impls_ty.rs
@@ -9,9 +9,9 @@ use rustc_data_structures::fx::FxHashMap;
 use rustc_data_structures::stable_hasher::{
     HashStable, HashingControls, StableHasher, ToStableHashKey,
 };
-use rustc_query_system::ich::StableHashingContext;
 use tracing::trace;
 
+use crate::ich::StableHashingContext;
 use crate::middle::region;
 use crate::{mir, ty};
 
diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs
index 036397709925..2c7244187f4f 100644
--- a/compiler/rustc_middle/src/ty/mod.rs
+++ b/compiler/rustc_middle/src/ty/mod.rs
@@ -47,7 +47,6 @@ use rustc_macros::{
     BlobDecodable, Decodable, Encodable, HashStable, TyDecodable, TyEncodable, TypeFoldable,
     TypeVisitable, extension,
 };
-use rustc_query_system::ich::StableHashingContext;
 use rustc_serialize::{Decodable, Encodable};
 pub use rustc_session::lint::RegisteredTools;
 use rustc_span::hygiene::MacroKind;
@@ -112,6 +111,7 @@ pub use self::typeck_results::{
     Rust2024IncompatiblePatInfo, TypeckResults, UserType, UserTypeAnnotationIndex, UserTypeKind,
 };
 use crate::error::{OpaqueHiddenTypeMismatch, TypeMismatchReason};
+use crate::ich::StableHashingContext;
 use crate::metadata::{AmbigModChild, ModChild};
 use crate::middle::privacy::EffectiveVisibilities;
 use crate::mir::{Body, CoroutineLayout, CoroutineSavedLocal, SourceInfo};
diff --git a/compiler/rustc_middle/src/verify_ich.rs b/compiler/rustc_middle/src/verify_ich.rs
index 290786d439d4..ff3c5bb5a9d6 100644
--- a/compiler/rustc_middle/src/verify_ich.rs
+++ b/compiler/rustc_middle/src/verify_ich.rs
@@ -1,10 +1,10 @@
 use std::cell::Cell;
 
 use rustc_data_structures::fingerprint::Fingerprint;
-use rustc_query_system::ich::StableHashingContext;
 use tracing::instrument;
 
 use crate::dep_graph::{DepGraphData, SerializedDepNodeIndex};
+use crate::ich::StableHashingContext;
 use crate::ty::TyCtxt;
 
 #[inline]
diff --git a/compiler/rustc_query_system/Cargo.toml b/compiler/rustc_query_system/Cargo.toml
deleted file mode 100644
index 8ea5b6c5487b..000000000000
--- a/compiler/rustc_query_system/Cargo.toml
+++ /dev/null
@@ -1,16 +0,0 @@
-[package]
-name = "rustc_query_system"
-version = "0.0.0"
-edition = "2024"
-
-[dependencies]
-# tidy-alphabetical-start
-rustc_abi = { path = "../rustc_abi" }
-rustc_ast = { path = "../rustc_ast" }
-rustc_data_structures = { path = "../rustc_data_structures" }
-rustc_feature = { path = "../rustc_feature" }
-rustc_hir = { path = "../rustc_hir" }
-rustc_session = { path = "../rustc_session" }
-rustc_span = { path = "../rustc_span" }
-smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
-# tidy-alphabetical-end
diff --git a/compiler/rustc_query_system/src/lib.rs b/compiler/rustc_query_system/src/lib.rs
deleted file mode 100644
index 21c8650ea56a..000000000000
--- a/compiler/rustc_query_system/src/lib.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-// tidy-alphabetical-start
-#![allow(internal_features)]
-#![cfg_attr(bootstrap, feature(assert_matches))]
-#![feature(min_specialization)]
-// tidy-alphabetical-end
-
-pub mod ich;
diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_bench.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_bench.snap
index 3adf952d66e0..294623f07386 100644
--- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_bench.snap
+++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_bench.snap
@@ -79,7 +79,6 @@ expression: bench
     - Set({bench::compiler/rustc_public})
     - Set({bench::compiler/rustc_public_bridge})
     - Set({bench::compiler/rustc_query_impl})
-    - Set({bench::compiler/rustc_query_system})
     - Set({bench::compiler/rustc_resolve})
     - Set({bench::compiler/rustc_sanitizers})
     - Set({bench::compiler/rustc_serialize})
diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_compiler.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_compiler.snap
index 1d6e63696b06..d5da908c8a44 100644
--- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_compiler.snap
+++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_compiler.snap
@@ -61,7 +61,6 @@ expression: build compiler
     - Set({build::compiler/rustc_public})
     - Set({build::compiler/rustc_public_bridge})
     - Set({build::compiler/rustc_query_impl})
-    - Set({build::compiler/rustc_query_system})
     - Set({build::compiler/rustc_resolve})
     - Set({build::compiler/rustc_sanitizers})
     - Set({build::compiler/rustc_serialize})
diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check.snap
index 6fc2e190290e..242a2272b4d1 100644
--- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check.snap
+++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check.snap
@@ -63,7 +63,6 @@ expression: check
     - Set({check::compiler/rustc_public})
     - Set({check::compiler/rustc_public_bridge})
     - Set({check::compiler/rustc_query_impl})
-    - Set({check::compiler/rustc_query_system})
     - Set({check::compiler/rustc_resolve})
     - Set({check::compiler/rustc_sanitizers})
     - Set({check::compiler/rustc_serialize})
diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiler.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiler.snap
index c0456f7f84d3..dab86b792127 100644
--- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiler.snap
+++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiler.snap
@@ -63,7 +63,6 @@ expression: check compiler
     - Set({check::compiler/rustc_public})
     - Set({check::compiler/rustc_public_bridge})
     - Set({check::compiler/rustc_query_impl})
-    - Set({check::compiler/rustc_query_system})
     - Set({check::compiler/rustc_resolve})
     - Set({check::compiler/rustc_sanitizers})
     - Set({check::compiler/rustc_serialize})
diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiletest_include_default_paths.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiletest_include_default_paths.snap
index 10f36ffa6748..e43d5380a398 100644
--- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiletest_include_default_paths.snap
+++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiletest_include_default_paths.snap
@@ -63,7 +63,6 @@ expression: check compiletest --include-default-paths
     - Set({check::compiler/rustc_public})
     - Set({check::compiler/rustc_public_bridge})
     - Set({check::compiler/rustc_query_impl})
-    - Set({check::compiler/rustc_query_system})
     - Set({check::compiler/rustc_resolve})
     - Set({check::compiler/rustc_sanitizers})
     - Set({check::compiler/rustc_serialize})
diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_clippy.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_clippy.snap
index 492a10d3862a..827f2f8b60ac 100644
--- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_clippy.snap
+++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_clippy.snap
@@ -78,7 +78,6 @@ expression: clippy
     - Set({clippy::compiler/rustc_public})
     - Set({clippy::compiler/rustc_public_bridge})
     - Set({clippy::compiler/rustc_query_impl})
-    - Set({clippy::compiler/rustc_query_system})
     - Set({clippy::compiler/rustc_resolve})
     - Set({clippy::compiler/rustc_sanitizers})
     - Set({clippy::compiler/rustc_serialize})
diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_fix.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_fix.snap
index 41889cd12480..d380cb416acf 100644
--- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_fix.snap
+++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_fix.snap
@@ -63,7 +63,6 @@ expression: fix
     - Set({fix::compiler/rustc_public})
     - Set({fix::compiler/rustc_public_bridge})
     - Set({fix::compiler/rustc_query_impl})
-    - Set({fix::compiler/rustc_query_system})
     - Set({fix::compiler/rustc_resolve})
     - Set({fix::compiler/rustc_sanitizers})
     - Set({fix::compiler/rustc_serialize})
diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test.snap
index 51e2c270e3ba..ac2f315d39d9 100644
--- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test.snap
+++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test.snap
@@ -129,7 +129,6 @@ expression: test
     - Set({test::compiler/rustc_public})
     - Set({test::compiler/rustc_public_bridge})
     - Set({test::compiler/rustc_query_impl})
-    - Set({test::compiler/rustc_query_system})
     - Set({test::compiler/rustc_resolve})
     - Set({test::compiler/rustc_sanitizers})
     - Set({test::compiler/rustc_serialize})
diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage.snap
index bc828c162bb0..09adbb0041ae 100644
--- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage.snap
+++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage.snap
@@ -128,7 +128,6 @@ expression: test --skip=coverage
     - Set({test::compiler/rustc_public})
     - Set({test::compiler/rustc_public_bridge})
     - Set({test::compiler/rustc_query_impl})
-    - Set({test::compiler/rustc_query_system})
     - Set({test::compiler/rustc_resolve})
     - Set({test::compiler/rustc_sanitizers})
     - Set({test::compiler/rustc_serialize})
diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests.snap
index ceb910e4cb36..b5fccfcb966b 100644
--- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests.snap
+++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests.snap
@@ -92,7 +92,6 @@ expression: test --skip=tests
     - Set({test::compiler/rustc_public})
     - Set({test::compiler/rustc_public_bridge})
     - Set({test::compiler/rustc_query_impl})
-    - Set({test::compiler/rustc_query_system})
     - Set({test::compiler/rustc_resolve})
     - Set({test::compiler/rustc_sanitizers})
     - Set({test::compiler/rustc_serialize})
diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests_etc.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests_etc.snap
index f0e8f1aee2c7..9ad8914f58e3 100644
--- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests_etc.snap
+++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests_etc.snap
@@ -72,7 +72,6 @@ expression: test --skip=tests --skip=coverage-map --skip=coverage-run --skip=lib
     - Set({test::compiler/rustc_public})
     - Set({test::compiler/rustc_public_bridge})
     - Set({test::compiler/rustc_query_impl})
-    - Set({test::compiler/rustc_query_system})
     - Set({test::compiler/rustc_resolve})
     - Set({test::compiler/rustc_sanitizers})
     - Set({test::compiler/rustc_serialize})
diff --git a/src/bootstrap/src/core/builder/tests.rs b/src/bootstrap/src/core/builder/tests.rs
index 61db494c8c18..002fb32dcf0c 100644
--- a/src/bootstrap/src/core/builder/tests.rs
+++ b/src/bootstrap/src/core/builder/tests.rs
@@ -1815,7 +1815,7 @@ mod snapshot {
         insta::assert_snapshot!(
             ctx.config("check")
                 .path("compiler")
-                .render_steps(), @"[check] rustc 0  -> rustc 1  (74 crates)");
+                .render_steps(), @"[check] rustc 0  -> rustc 1  (73 crates)");
     }
 
     #[test]
@@ -1841,7 +1841,7 @@ mod snapshot {
             ctx.config("check")
                 .path("compiler")
                 .stage(1)
-                .render_steps(), @"[check] rustc 0  -> rustc 1  (74 crates)");
+                .render_steps(), @"[check] rustc 0  -> rustc 1  (73 crates)");
     }
 
     #[test]
@@ -1851,11 +1851,11 @@ mod snapshot {
             ctx.config("check")
                 .path("compiler")
                 .stage(2)
-                .render_steps(), @r"
+                .render_steps(), @"
         [build] llvm 
         [build] rustc 0  -> rustc 1 
         [build] rustc 1  -> std 1 
-        [check] rustc 1  -> rustc 2  (74 crates)
+        [check] rustc 1  -> rustc 2  (73 crates)
         ");
     }
 
@@ -1866,12 +1866,12 @@ mod snapshot {
             ctx.config("check")
                 .targets(&[TEST_TRIPLE_1])
                 .hosts(&[TEST_TRIPLE_1])
-                .render_steps(), @r"
+                .render_steps(), @"
         [build] llvm 
         [build] rustc 0  -> rustc 1 
         [build] rustc 1  -> std 1 
         [check] rustc 1  -> std 1 
-        [check] rustc 1  -> rustc 2  (74 crates)
+        [check] rustc 1  -> rustc 2  (73 crates)
         [check] rustc 1  -> rustc 2 
         [check] rustc 1  -> Rustdoc 2 
         [check] rustc 1  -> rustc_codegen_cranelift 2 
@@ -1967,7 +1967,7 @@ mod snapshot {
             ctx.config("check")
                 .paths(&["library", "compiler"])
                 .args(&args)
-                .render_steps(), @"[check] rustc 0  -> rustc 1  (74 crates)");
+                .render_steps(), @"[check] rustc 0  -> rustc 1  (73 crates)");
     }
 
     #[test]
diff --git a/src/doc/rustc-dev-guide/src/queries/incremental-compilation-in-detail.md b/src/doc/rustc-dev-guide/src/queries/incremental-compilation-in-detail.md
index 46e38832e64d..cab9f6871f7c 100644
--- a/src/doc/rustc-dev-guide/src/queries/incremental-compilation-in-detail.md
+++ b/src/doc/rustc-dev-guide/src/queries/incremental-compilation-in-detail.md
@@ -178,7 +178,7 @@ fn try_mark_green(tcx, current_node) -> bool {
 
 > NOTE:
 > The actual implementation can be found in
-> [`compiler/rustc_query_system/src/dep_graph/graph.rs`][try_mark_green]
+> [`compiler/rustc_middle/src/dep_graph/graph.rs`][try_mark_green]
 
 By using red-green marking we can avoid the devastating cumulative effect of
 having false positives during change detection. Whenever a query is executed
@@ -534,4 +534,4 @@ information.
 
 
 [query-model]: ./query-evaluation-model-in-detail.html
-[try_mark_green]: https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_query_system/dep_graph/graph.rs.html
+[try_mark_green]: https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_middle/dep_graph/graph.rs.html
diff --git a/tests/run-make/short-ice/rmake.rs b/tests/run-make/short-ice/rmake.rs
index 4fc183a8c74e..043f880abcf7 100644
--- a/tests/run-make/short-ice/rmake.rs
+++ b/tests/run-make/short-ice/rmake.rs
@@ -31,10 +31,10 @@ fn main() {
     let output_bt_full = &concat_stderr_stdout(&rustc_bt_full);
 
     // Count how many lines of output mention symbols or paths in
-    // `rustc_query_system` or `rustc_query_impl`, which are the kinds of
+    // `rustc_query_impl`, which are the kinds of
     // stack frames we want to be omitting in short backtraces.
-    let rustc_query_count_short = count_lines_with(output_bt_short, "rustc_query_");
-    let rustc_query_count_full = count_lines_with(output_bt_full, "rustc_query_");
+    let rustc_query_count_short = count_lines_with(output_bt_short, "rustc_query_impl");
+    let rustc_query_count_full = count_lines_with(output_bt_full, "rustc_query_impl");
 
     // Dump both outputs in full to make debugging easier, especially on CI.
     // Use `--no-capture --force-rerun` to view output even when the test is passing.
diff --git a/tests/ui-fulldeps/hash-stable-is-unstable.rs b/tests/ui-fulldeps/hash-stable-is-unstable.rs
index 7f62b6044104..a3dfd7e85ba6 100644
--- a/tests/ui-fulldeps/hash-stable-is-unstable.rs
+++ b/tests/ui-fulldeps/hash-stable-is-unstable.rs
@@ -7,7 +7,7 @@ extern crate rustc_macros;
 //~^ ERROR use of unstable library feature `rustc_private`
 //~| NOTE: see issue #27812  for more information
 //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
-extern crate rustc_query_system;
+extern crate rustc_middle;
 //~^ ERROR use of unstable library feature `rustc_private`
 //~| NOTE: see issue #27812  for more information
 //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
diff --git a/tests/ui-fulldeps/hash-stable-is-unstable.stderr b/tests/ui-fulldeps/hash-stable-is-unstable.stderr
index e7740d744b4f..7c69e8f5e631 100644
--- a/tests/ui-fulldeps/hash-stable-is-unstable.stderr
+++ b/tests/ui-fulldeps/hash-stable-is-unstable.stderr
@@ -21,8 +21,8 @@ LL | extern crate rustc_macros;
 error[E0658]: use of unstable library feature `rustc_private`: this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?
   --> $DIR/hash-stable-is-unstable.rs:10:1
    |
-LL | extern crate rustc_query_system;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern crate rustc_middle;
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #27812  for more information
    = help: add `#![feature(rustc_private)]` to the crate attributes to enable
diff --git a/triagebot.toml b/triagebot.toml
index c9d6c1a730b7..6c6daac9cf3b 100644
--- a/triagebot.toml
+++ b/triagebot.toml
@@ -540,7 +540,6 @@ trigger_files = [
 
 [autolabel."A-query-system"]
 trigger_files = [
-    "compiler/rustc_query_system",
     "compiler/rustc_query_impl",
     "compiler/rustc_macros/src/query.rs"
 ]
@@ -1557,8 +1556,10 @@ dep-bumps = [
 "/compiler/rustc_codegen_llvm/src/debuginfo" =           ["compiler", "debuginfo"]
 "/compiler/rustc_codegen_ssa" =                          ["compiler", "codegen"]
 "/compiler/rustc_middle/src/dep_graph" =                 ["compiler", "incremental", "query-system"]
+"/compiler/rustc_middle/src/ich" =                       ["compiler", "incremental", "query-system"]
 "/compiler/rustc_middle/src/mir" =                       ["compiler", "mir"]
 "/compiler/rustc_middle/src/traits" =                    ["compiler", "types"]
+"/compiler/rustc_middle/src/query" =                     ["compiler", "query-system"]
 "/compiler/rustc_middle/src/ty" =                        ["compiler", "types"]
 "/compiler/rustc_const_eval/src/interpret" =             ["compiler", "mir"]
 "/compiler/rustc_mir_build/src/builder" =                ["compiler", "mir"]
@@ -1567,8 +1568,6 @@ dep-bumps = [
 "/compiler/rustc_parse" =                                ["compiler", "parser"]
 "/compiler/rustc_parse/src/lexer" =                      ["compiler", "lexer"]
 "/compiler/rustc_query_impl" =                           ["compiler", "query-system"]
-"/compiler/rustc_query_system" =                         ["compiler", "query-system"]
-"/compiler/rustc_query_system/src/ich" =                 ["compiler", "incremental", "query-system"]
 "/compiler/rustc_trait_selection" =                      ["compiler", "types"]
 "/compiler/rustc_traits" =                               ["compiler", "types"]
 "/compiler/rustc_type_ir" =                              ["compiler", "types"]

From b541f1b1983da61eeef8c90edc230edb4eb2581c Mon Sep 17 00:00:00 2001
From: Vadim Petrochenkov 
Date: Mon, 16 Feb 2026 15:32:00 +0300
Subject: [PATCH 228/265] resolve: Disable an assert that no longer holds

---
 compiler/rustc_resolve/src/imports.rs         |  5 ++++-
 tests/ui/imports/overwrite-different-vis-3.rs | 14 ++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 tests/ui/imports/overwrite-different-vis-3.rs

diff --git a/compiler/rustc_resolve/src/imports.rs b/compiler/rustc_resolve/src/imports.rs
index 4e7622d08462..0991ba5a2de1 100644
--- a/compiler/rustc_resolve/src/imports.rs
+++ b/compiler/rustc_resolve/src/imports.rs
@@ -371,6 +371,8 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
         // - A glob decl is overwritten by its clone after setting ambiguity in it.
         //   FIXME: avoid this by removing `warn_ambiguity`, or by triggering glob re-fetch
         //   with the same decl in some way.
+        // - A glob decl is overwritten by a glob decl with larger visibility.
+        //   FIXME: avoid this by updating this visibility in place.
         // - A glob decl is overwritten by a glob decl re-fetching an
         //   overwritten decl from other module (the recursive case).
         // Here we are detecting all such re-fetches and overwrite old decls
@@ -384,7 +386,8 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
             // FIXME: reenable the asserts when `warn_ambiguity` is removed (#149195).
             // assert_ne!(old_deep_decl, deep_decl);
             // assert!(old_deep_decl.is_glob_import());
-            assert!(!deep_decl.is_glob_import());
+            // FIXME: reenable the assert when visibility is updated in place.
+            // assert!(!deep_decl.is_glob_import());
             if old_glob_decl.ambiguity.get().is_some() && glob_decl.ambiguity.get().is_none() {
                 // Do not lose glob ambiguities when re-fetching the glob.
                 glob_decl.ambiguity.set_unchecked(old_glob_decl.ambiguity.get());
diff --git a/tests/ui/imports/overwrite-different-vis-3.rs b/tests/ui/imports/overwrite-different-vis-3.rs
new file mode 100644
index 000000000000..f45c5cdfb3ab
--- /dev/null
+++ b/tests/ui/imports/overwrite-different-vis-3.rs
@@ -0,0 +1,14 @@
+// Regression test for issue #152606.
+
+//@ check-pass
+
+mod outer {
+    mod inner {
+        use super::*; // should go before the ambiguous glob imports
+    }
+
+    use crate::*;
+    pub use crate::*;
+}
+
+fn main() {}

From 8e9a79091f6f62a232bca3e86fb58eac0611d18a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mateusz=20Miku=C5=82a?= 
Date: Sun, 15 Feb 2026 17:37:15 +0100
Subject: [PATCH 229/265] Add LLVM lib location to the linker search paths

---
 compiler/rustc_metadata/src/native_libs.rs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/compiler/rustc_metadata/src/native_libs.rs b/compiler/rustc_metadata/src/native_libs.rs
index b160b3fe9bb3..182ed433bb4f 100644
--- a/compiler/rustc_metadata/src/native_libs.rs
+++ b/compiler/rustc_metadata/src/native_libs.rs
@@ -61,6 +61,8 @@ pub fn walk_native_lib_search_dirs(
     // library directory instead of the self-contained directories.
     // Sanitizer libraries have the same issue and are also linked by name on Apple targets.
     // The targets here should be in sync with `copy_third_party_objects` in bootstrap.
+    // Finally there is shared LLVM library, which unlike compiler libraries, is linked by the name,
+    // therefore requiring the search path for the linker.
     // FIXME: implement `-Clink-self-contained=+/-unwind,+/-sanitizers`, move the shipped libunwind
     // and sanitizers to self-contained directory, and stop adding this search path.
     // FIXME: On AIX this also has the side-effect of making the list of library search paths
@@ -71,6 +73,9 @@ pub fn walk_native_lib_search_dirs(
         || sess.target.os == Os::Fuchsia
         || sess.target.is_like_aix
         || sess.target.is_like_darwin && !sess.sanitizers().is_empty()
+        || sess.target.os == Os::Windows
+            && sess.target.env == Env::Gnu
+            && sess.target.abi == Abi::Llvm
     {
         f(&sess.target_tlib_path.dir, false)?;
     }

From 1d1280aae1e31b9ae9325fddc0c57ffc5074f434 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mateusz=20Miku=C5=82a?= 
Date: Wed, 28 Jan 2026 21:10:05 +0100
Subject: [PATCH 230/265] Build shared LLVM lib for windows-gnullvm

---
 src/ci/github-actions/jobs.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml
index 6e07ffc43bc2..9fa9577189f1 100644
--- a/src/ci/github-actions/jobs.yml
+++ b/src/ci/github-actions/jobs.yml
@@ -691,6 +691,7 @@ auto:
         --target=aarch64-pc-windows-gnullvm,i686-pc-windows-gnullvm
         --enable-full-tools
         --enable-profiler
+        --enable-llvm-link-shared
       DIST_REQUIRE_ALL_TOOLS: 1
       CODEGEN_BACKENDS: llvm,cranelift
       CC_i686_pc_windows_gnullvm: i686-w64-mingw32-clang
@@ -703,6 +704,7 @@ auto:
         --build=x86_64-pc-windows-gnullvm
         --enable-full-tools
         --enable-profiler
+        --enable-llvm-link-shared
       DIST_REQUIRE_ALL_TOOLS: 1
       CODEGEN_BACKENDS: llvm,cranelift
     <<: *job-windows

From 3b5874e570e78d74b43d2b9a849b7d3d03c24ef0 Mon Sep 17 00:00:00 2001
From: Folkert de Vries 
Date: Sat, 14 Feb 2026 00:45:59 +0100
Subject: [PATCH 231/265] Improve `VaList` stdlib docs

---
 library/core/src/ffi/va_list.rs | 52 +++++++++++++++++++++++++++------
 1 file changed, 43 insertions(+), 9 deletions(-)

diff --git a/library/core/src/ffi/va_list.rs b/library/core/src/ffi/va_list.rs
index d0f155316a10..10e8aee89d25 100644
--- a/library/core/src/ffi/va_list.rs
+++ b/library/core/src/ffi/va_list.rs
@@ -183,7 +183,44 @@ crate::cfg_select! {
     }
 }
 
-/// A variable argument list, equivalent to `va_list` in C.
+/// A variable argument list, ABI-compatible with `va_list` in C.
+///
+/// This type is created in c-variadic functions when `...` is desugared. A `VaList`
+/// is automatically initialized (equivalent to calling `va_start` in C).
+///
+/// ```
+/// #![feature(c_variadic)]
+///
+/// use std::ffi::VaList;
+///
+/// /// # Safety
+/// /// Must be passed at least `count` arguments of type `i32`.
+/// unsafe extern "C" fn my_func(count: u32, ap: ...) -> i32 {
+///     unsafe { vmy_func(count, ap) }
+/// }
+///
+/// /// # Safety
+/// /// Must be passed at least `count` arguments of type `i32`.
+/// unsafe fn vmy_func(count: u32, mut ap: VaList<'_>) -> i32 {
+///     let mut sum = 0;
+///     for _ in 0..count {
+///         sum += unsafe { ap.arg::() };
+///     }
+///     sum
+/// }
+///
+/// assert_eq!(unsafe { my_func(1, 42i32) }, 42);
+/// assert_eq!(unsafe { my_func(3, 42i32, -7i32, 20i32) }, 55);
+/// ```
+///
+/// The [`VaList::arg`] method can be used to read an argument from the list. This method
+/// automatically advances the `VaList` to the next argument. The C equivalent is `va_arg`.
+///
+/// Cloning a `VaList` performs the equivalent of C `va_copy`, producing an independent cursor
+/// that arguments can be read from without affecting the original. Dropping a `VaList` performs
+/// the equivalent of C `va_end`.
+///
+/// This can be used across an FFI boundary, and fully matches the platform's `va_list`.
 #[repr(transparent)]
 #[lang = "va_list"]
 pub struct VaList<'a> {
@@ -276,20 +313,17 @@ unsafe impl VaArgSafe for *mut T {}
 unsafe impl VaArgSafe for *const T {}
 
 impl<'f> VaList<'f> {
-    /// Advance to and read the next variable argument.
+    /// Read an argument from the variable argument list, and advance to the next argument.
+    ///
+    /// Only types that implement [`VaArgSafe`] can be read from a variable argument list.
     ///
     /// # Safety
     ///
-    /// This function is only sound to call when:
-    ///
-    /// - there is a next variable argument available.
-    /// - the next argument's type must be ABI-compatible with the type `T`.
-    /// - the next argument must have a properly initialized value of type `T`.
+    /// This function is only sound to call when there is another argument to read, and that
+    /// argument is a properly initialized value of the type `T`.
     ///
     /// Calling this function with an incompatible type, an invalid value, or when there
     /// are no more variable arguments, is unsound.
-    ///
-    /// [valid]: https://doc.rust-lang.org/nightly/nomicon/what-unsafe-does.html
     #[inline]
     pub unsafe fn arg(&mut self) -> T {
         // SAFETY: the caller must uphold the safety contract for `va_arg`.

From 33a8dc10cf4efe91874cf02dc24afb55448bcc09 Mon Sep 17 00:00:00 2001
From: Daria Sukhonina 
Date: Mon, 16 Feb 2026 17:49:42 +0300
Subject: [PATCH 232/265] Fix wrong par_slice implementation

---
 compiler/rustc_data_structures/src/sync/parallel.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/rustc_data_structures/src/sync/parallel.rs b/compiler/rustc_data_structures/src/sync/parallel.rs
index 23f5cbc43452..2ab4a7f75b6b 100644
--- a/compiler/rustc_data_structures/src/sync/parallel.rs
+++ b/compiler/rustc_data_structures/src/sync/parallel.rs
@@ -133,7 +133,7 @@ fn par_slice(
     rustc_thread_pool::scope(|s| {
         let proof = items.derive(());
         let group_size = std::cmp::max(items.len() / 128, 1);
-        for group in items.chunks_exact_mut(group_size) {
+        for group in items.chunks_mut(group_size) {
             let group = proof.derive(group);
             s.spawn(|_| {
                 let mut group = group;

From 5e65109f219f56b94544efdacf527bc2146a7f91 Mon Sep 17 00:00:00 2001
From: Ralf Jung 
Date: Sun, 26 Oct 2025 11:04:37 +0100
Subject: [PATCH 233/265] add write_box_via_move intrinsic and use it for vec!

This allows us to get rid of box_new entirely
---
 .../example/mini_core.rs                      |   5 -
 .../rustc_codegen_gcc/example/mini_core.rs    |   5 -
 .../src/check_consts/check.rs                 |   7 -
 .../rustc_const_eval/src/check_consts/ops.rs  |  12 --
 compiler/rustc_const_eval/src/errors.rs       |  25 ---
 .../src/error_codes/E0010.md                  |   4 +-
 compiler/rustc_error_codes/src/lib.rs         |   3 +-
 compiler/rustc_hir/src/lang_items.rs          |   1 -
 .../rustc_hir_analysis/src/check/intrinsic.rs |  11 +-
 .../src/fn_ctxt/suggestions.rs                |   1 +
 compiler/rustc_middle/src/thir.rs             |   4 -
 compiler/rustc_middle/src/thir/visit.rs       |   1 -
 .../src/builder/expr/as_place.rs              |   1 -
 .../src/builder/expr/as_rvalue.rs             |  60 -------
 .../src/builder/expr/category.rs              |   1 -
 .../rustc_mir_build/src/builder/expr/into.rs  | 102 +++++++++---
 .../rustc_mir_build/src/check_unsafety.rs     |   1 -
 compiler/rustc_mir_build/src/thir/cx/expr.rs  |  20 +--
 .../src/thir/pattern/check_match.rs           |   1 -
 compiler/rustc_mir_build/src/thir/print.rs    |   5 -
 compiler/rustc_span/src/symbol.rs             |   2 +-
 compiler/rustc_ty_utils/src/consts.rs         |   2 -
 compiler/rustc_ty_utils/src/errors.rs         |   2 -
 library/alloc/src/alloc.rs                    |  17 --
 library/alloc/src/boxed.rs                    |  61 ++++++--
 library/alloc/src/intrinsics.rs               |  15 ++
 library/alloc/src/lib.rs                      |   1 +
 library/alloc/src/macros.rs                   |  14 +-
 src/tools/miri/tests/pass/vec.rs              |  19 +++
 src/tools/miri/tests/pass/vec.stack.stderr    |   5 +
 src/tools/miri/tests/pass/vec.tree.stderr     |   5 +
 src/tools/tidy/src/issues.txt                 |   1 -
 .../item-collection/opaque-return-impls.rs    |   1 -
 .../mir-opt/box_expr.main.ElaborateDrops.diff |  89 -----------
 tests/mir-opt/box_expr.rs                     |  39 -----
 ..._by_subslice.CleanupPostBorrowck.after.mir |  68 ++++++++
 ...e_out.move_out_by_subslice.built.after.mir |  99 ------------
 ...out_from_end.CleanupPostBorrowck.after.mir |  68 ++++++++
 ...move_out.move_out_from_end.built.after.mir |  99 ------------
 .../building/uniform_array_move_out.rs        |  11 +-
 ...move.box_new.CleanupPostBorrowck.after.mir |  58 +++++++
 tests/mir-opt/building/write_box_via_move.rs  |  29 ++++
 ...ve.vec_macro.CleanupPostBorrowck.after.mir |  37 +++++
 .../boxes.main.GVN.panic-abort.diff           |  59 -------
 .../boxes.main.GVN.panic-unwind.diff          |  63 --------
 tests/mir-opt/const_prop/boxes.rs             |  17 --
 ...ng_operand.test.GVN.32bit.panic-abort.diff | 146 +++++++++---------
 ...ng_operand.test.GVN.64bit.panic-abort.diff | 146 +++++++++---------
 ...y.run2-{closure#0}.Inline.panic-abort.diff |   2 +-
 tests/mir-opt/issue_62289.rs                  |   6 +-
 ....test.ElaborateDrops.after.panic-abort.mir | 119 ++++++++++++++
 ...test.ElaborateDrops.after.panic-unwind.mir | 119 ++++++++++++++
 ...test.ElaborateDrops.before.panic-abort.mir | 108 -------------
 ...est.ElaborateDrops.before.panic-unwind.mir | 108 -------------
 ...ated_loop.PreCodegen.after.panic-abort.mir | 118 +++++++-------
 tests/ui/coercion/vec-macro-coercions.rs      |  12 ++
 .../min_const_fn/bad_const_fn_body_ice.rs     |   4 +-
 .../min_const_fn/bad_const_fn_body_ice.stderr |  21 +--
 tests/ui/coroutine/issue-105084.rs            |   8 +-
 tests/ui/coroutine/issue-105084.stderr        |  16 +-
 tests/ui/error-codes/E0010-teach.rs           |   7 -
 tests/ui/error-codes/E0010-teach.stderr       |  20 ---
 tests/ui/error-codes/E0010.rs                 |   5 -
 tests/ui/error-codes/E0010.stderr             |  18 ---
 tests/ui/impl-trait/where-allowed.stderr      |  16 +-
 tests/ui/limits/issue-17913.32bit.stderr      |  27 ++--
 tests/ui/macros/vec-macro-in-pattern.rs       |   2 +-
 tests/ui/macros/vec-macro-in-pattern.stderr   |  12 +-
 .../nll/borrowck-annotate-static-lifetime.rs  |   5 -
 .../borrowck-annotate-static-lifetime.stderr  |  12 --
 tests/ui/nll/user-annotations/patterns.rs     |   5 +
 tests/ui/nll/user-annotations/patterns.stderr |  29 ++--
 ...djust-mode-unimplemented-for-constblock.rs |   2 +-
 ...t-mode-unimplemented-for-constblock.stderr |  12 +-
 ...d => vec-macro-outlives-issue-15480.fixed} |   0
 ...0.rs => vec-macro-outlives-issue-15480.rs} |   0
 ... => vec-macro-outlives-issue-15480.stderr} |   2 +-
 tests/ui/statics/check-values-constraints.rs  |  28 ++--
 .../statics/check-values-constraints.stderr   | 113 +++++++++-----
 tests/ui/unpretty/box.rs                      |   8 -
 tests/ui/unpretty/box.stdout                  |  90 -----------
 81 files changed, 1097 insertions(+), 1400 deletions(-)
 create mode 100644 library/alloc/src/intrinsics.rs
 create mode 100644 src/tools/miri/tests/pass/vec.stack.stderr
 create mode 100644 src/tools/miri/tests/pass/vec.tree.stderr
 delete mode 100644 tests/mir-opt/box_expr.main.ElaborateDrops.diff
 delete mode 100644 tests/mir-opt/box_expr.rs
 create mode 100644 tests/mir-opt/building/uniform_array_move_out.move_out_by_subslice.CleanupPostBorrowck.after.mir
 delete mode 100644 tests/mir-opt/building/uniform_array_move_out.move_out_by_subslice.built.after.mir
 create mode 100644 tests/mir-opt/building/uniform_array_move_out.move_out_from_end.CleanupPostBorrowck.after.mir
 delete mode 100644 tests/mir-opt/building/uniform_array_move_out.move_out_from_end.built.after.mir
 create mode 100644 tests/mir-opt/building/write_box_via_move.box_new.CleanupPostBorrowck.after.mir
 create mode 100644 tests/mir-opt/building/write_box_via_move.rs
 create mode 100644 tests/mir-opt/building/write_box_via_move.vec_macro.CleanupPostBorrowck.after.mir
 delete mode 100644 tests/mir-opt/const_prop/boxes.main.GVN.panic-abort.diff
 delete mode 100644 tests/mir-opt/const_prop/boxes.main.GVN.panic-unwind.diff
 delete mode 100644 tests/mir-opt/const_prop/boxes.rs
 create mode 100644 tests/mir-opt/issue_62289.test.ElaborateDrops.after.panic-abort.mir
 create mode 100644 tests/mir-opt/issue_62289.test.ElaborateDrops.after.panic-unwind.mir
 delete mode 100644 tests/mir-opt/issue_62289.test.ElaborateDrops.before.panic-abort.mir
 delete mode 100644 tests/mir-opt/issue_62289.test.ElaborateDrops.before.panic-unwind.mir
 create mode 100644 tests/ui/coercion/vec-macro-coercions.rs
 delete mode 100644 tests/ui/error-codes/E0010-teach.rs
 delete mode 100644 tests/ui/error-codes/E0010-teach.stderr
 delete mode 100644 tests/ui/error-codes/E0010.rs
 delete mode 100644 tests/ui/error-codes/E0010.stderr
 delete mode 100644 tests/ui/nll/borrowck-annotate-static-lifetime.rs
 delete mode 100644 tests/ui/nll/borrowck-annotate-static-lifetime.stderr
 rename tests/ui/span/{issue-15480.fixed => vec-macro-outlives-issue-15480.fixed} (100%)
 rename tests/ui/span/{issue-15480.rs => vec-macro-outlives-issue-15480.rs} (100%)
 rename tests/ui/span/{issue-15480.stderr => vec-macro-outlives-issue-15480.stderr} (92%)
 delete mode 100644 tests/ui/unpretty/box.rs
 delete mode 100644 tests/ui/unpretty/box.stdout

diff --git a/compiler/rustc_codegen_cranelift/example/mini_core.rs b/compiler/rustc_codegen_cranelift/example/mini_core.rs
index 301547cadaf7..5293b458d8c4 100644
--- a/compiler/rustc_codegen_cranelift/example/mini_core.rs
+++ b/compiler/rustc_codegen_cranelift/example/mini_core.rs
@@ -622,11 +622,6 @@ impl Deref for Box {
     }
 }
 
-#[lang = "exchange_malloc"]
-unsafe fn allocate(size: usize, _align: usize) -> *mut u8 {
-    unsafe { libc::malloc(size) }
-}
-
 #[lang = "drop"]
 pub trait Drop {
     fn drop(&mut self);
diff --git a/compiler/rustc_codegen_gcc/example/mini_core.rs b/compiler/rustc_codegen_gcc/example/mini_core.rs
index 0aba44a88c5a..2e165cc3c129 100644
--- a/compiler/rustc_codegen_gcc/example/mini_core.rs
+++ b/compiler/rustc_codegen_gcc/example/mini_core.rs
@@ -628,11 +628,6 @@ impl Deref for Box {
     }
 }
 
-#[lang = "exchange_malloc"]
-unsafe fn allocate(size: usize, _align: usize) -> *mut u8 {
-    libc::malloc(size)
-}
-
 #[lang = "drop"]
 pub trait Drop {
     fn drop(&mut self);
diff --git a/compiler/rustc_const_eval/src/check_consts/check.rs b/compiler/rustc_const_eval/src/check_consts/check.rs
index 57396b657a3f..14aac4c8927e 100644
--- a/compiler/rustc_const_eval/src/check_consts/check.rs
+++ b/compiler/rustc_const_eval/src/check_consts/check.rs
@@ -845,13 +845,6 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
                     return;
                 }
 
-                // This can be called on stable via the `vec!` macro.
-                if tcx.is_lang_item(callee, LangItem::ExchangeMalloc) {
-                    self.check_op(ops::HeapAllocation);
-                    // Allow this call, skip all the checks below.
-                    return;
-                }
-
                 // Intrinsics are language primitives, not regular calls, so treat them separately.
                 if let Some(intrinsic) = tcx.intrinsic(callee) {
                     if !tcx.is_const_fn(callee) {
diff --git a/compiler/rustc_const_eval/src/check_consts/ops.rs b/compiler/rustc_const_eval/src/check_consts/ops.rs
index 5b62ba8c1605..dd86146610cb 100644
--- a/compiler/rustc_const_eval/src/check_consts/ops.rs
+++ b/compiler/rustc_const_eval/src/check_consts/ops.rs
@@ -540,18 +540,6 @@ impl<'tcx> NonConstOp<'tcx> for Coroutine {
     }
 }
 
-#[derive(Debug)]
-pub(crate) struct HeapAllocation;
-impl<'tcx> NonConstOp<'tcx> for HeapAllocation {
-    fn build_error(&self, ccx: &ConstCx<'_, 'tcx>, span: Span) -> Diag<'tcx> {
-        ccx.dcx().create_err(errors::UnallowedHeapAllocations {
-            span,
-            kind: ccx.const_kind(),
-            teach: ccx.tcx.sess.teach(E0010),
-        })
-    }
-}
-
 #[derive(Debug)]
 pub(crate) struct InlineAsm;
 impl<'tcx> NonConstOp<'tcx> for InlineAsm {
diff --git a/compiler/rustc_const_eval/src/errors.rs b/compiler/rustc_const_eval/src/errors.rs
index b477c998a278..67d1e49d2398 100644
--- a/compiler/rustc_const_eval/src/errors.rs
+++ b/compiler/rustc_const_eval/src/errors.rs
@@ -289,31 +289,6 @@ pub(crate) struct UnallowedOpInConstContext {
     pub msg: String,
 }
 
-#[derive(Diagnostic)]
-#[diag(r#"allocations are not allowed in {$kind ->
-    [const] constant
-    [static] static
-    [const_fn] constant function
-    *[other] {""}
-}s"#, code = E0010)]
-pub(crate) struct UnallowedHeapAllocations {
-    #[primary_span]
-    #[label(
-        r#"allocation not allowed in {$kind ->
-            [const] constant
-            [static] static
-            [const_fn] constant function
-            *[other] {""}
-        }s"#
-    )]
-    pub span: Span,
-    pub kind: ConstContext,
-    #[note(
-        "the runtime heap is not yet available at compile-time, so no runtime heap allocations can be created"
-    )]
-    pub teach: bool,
-}
-
 #[derive(Diagnostic)]
 #[diag(r#"inline assembly is not allowed in {$kind ->
     [const] constant
diff --git a/compiler/rustc_error_codes/src/error_codes/E0010.md b/compiler/rustc_error_codes/src/error_codes/E0010.md
index f03f8a6605f6..3ede08ee8f62 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0010.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0010.md
@@ -1,9 +1,11 @@
+#### Note: this error code is no longer emitted by the compiler.
+
 The value of statics and constants must be known at compile time, and they live
 for the entire lifetime of a program. Creating a boxed value allocates memory on
 the heap at runtime, and therefore cannot be done at compile time.
 
 Erroneous code example:
 
-```compile_fail,E0010
+```ignore (no longer emitted)
 const CON : Vec = vec![1, 2, 3];
 ```
diff --git a/compiler/rustc_error_codes/src/lib.rs b/compiler/rustc_error_codes/src/lib.rs
index 65f1780885ad..0537ba23de94 100644
--- a/compiler/rustc_error_codes/src/lib.rs
+++ b/compiler/rustc_error_codes/src/lib.rs
@@ -20,7 +20,8 @@
 //
 // Do *not* remove entries from this list. Instead, just add a note to the corresponding markdown
 // file saying that this error is not emitted by the compiler any more (see E0001.md for an
-// example), and remove all code examples that do not build any more.
+// example), and remove all code examples that do not build any more by marking them
+// with `ignore (no longer emitted)`.
 #[macro_export]
 #[rustfmt::skip]
 macro_rules! error_codes {
diff --git a/compiler/rustc_hir/src/lang_items.rs b/compiler/rustc_hir/src/lang_items.rs
index 0325fd2ceab9..f57b1a9c8dea 100644
--- a/compiler/rustc_hir/src/lang_items.rs
+++ b/compiler/rustc_hir/src/lang_items.rs
@@ -320,7 +320,6 @@ language_item_table! {
     FormatArgument,          sym::format_argument,     format_argument,            Target::Struct,         GenericRequirement::None;
     FormatArguments,         sym::format_arguments,    format_arguments,           Target::Struct,         GenericRequirement::None;
 
-    ExchangeMalloc,          sym::exchange_malloc,     exchange_malloc_fn,         Target::Fn,             GenericRequirement::None;
     DropInPlace,             sym::drop_in_place,       drop_in_place_fn,           Target::Fn,             GenericRequirement::Minimum(1);
     AllocLayout,             sym::alloc_layout,        alloc_layout,               Target::Struct,         GenericRequirement::None;
 
diff --git a/compiler/rustc_hir_analysis/src/check/intrinsic.rs b/compiler/rustc_hir_analysis/src/check/intrinsic.rs
index 6946d1a70040..5669b6793add 100644
--- a/compiler/rustc_hir_analysis/src/check/intrinsic.rs
+++ b/compiler/rustc_hir_analysis/src/check/intrinsic.rs
@@ -77,7 +77,6 @@ fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId) -> hi
         | sym::autodiff
         | sym::bitreverse
         | sym::black_box
-        | sym::box_new
         | sym::breakpoint
         | sym::bswap
         | sym::caller_location
@@ -223,6 +222,7 @@ fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId) -> hi
         | sym::wrapping_add
         | sym::wrapping_mul
         | sym::wrapping_sub
+        | sym::write_box_via_move
         // tidy-alphabetical-end
         => hir::Safety::Safe,
         _ => hir::Safety::Unsafe,
@@ -584,6 +584,13 @@ pub(crate) fn check_intrinsic_type(
         sym::write_via_move => {
             (1, 0, vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], tcx.types.unit)
         }
+        sym::write_box_via_move => {
+            let t = param(0);
+            let maybe_uninit_t = Ty::new_maybe_uninit(tcx, t);
+            let box_mu_t = Ty::new_box(tcx, maybe_uninit_t);
+
+            (1, 0, vec![box_mu_t, param(0)], box_mu_t)
+        }
 
         sym::typed_swap_nonoverlapping => {
             (1, 0, vec![Ty::new_mut_ptr(tcx, param(0)); 2], tcx.types.unit)
@@ -689,8 +696,6 @@ pub(crate) fn check_intrinsic_type(
 
         sym::ub_checks | sym::overflow_checks => (0, 0, Vec::new(), tcx.types.bool),
 
-        sym::box_new => (1, 0, vec![param(0)], Ty::new_box(tcx, param(0))),
-
         // contract_check_requires::(C) -> bool, where C: impl Fn() -> bool
         sym::contract_check_requires => (1, 0, vec![param(0)], tcx.types.unit),
         sym::contract_check_ensures => {
diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs
index 735e684500fe..cb786808aa46 100644
--- a/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs
+++ b/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs
@@ -3110,6 +3110,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                     {
                         let deref_kind = if checked_ty.is_box() {
                             // detect Box::new(..)
+                            // FIXME: use `box_new` diagnostic item instead?
                             if let ExprKind::Call(box_new, [_]) = expr.kind
                                 && let ExprKind::Path(qpath) = &box_new.kind
                                 && let Res::Def(DefKind::AssocFn, fn_id) =
diff --git a/compiler/rustc_middle/src/thir.rs b/compiler/rustc_middle/src/thir.rs
index 5e8031403565..18456e763078 100644
--- a/compiler/rustc_middle/src/thir.rs
+++ b/compiler/rustc_middle/src/thir.rs
@@ -268,10 +268,6 @@ pub enum ExprKind<'tcx> {
         hir_id: HirId,
         value: ExprId,
     },
-    /// A `box ` expression.
-    Box {
-        value: ExprId,
-    },
     /// An `if` expression.
     If {
         if_then_scope: region::Scope,
diff --git a/compiler/rustc_middle/src/thir/visit.rs b/compiler/rustc_middle/src/thir/visit.rs
index 8e0e3aa294b8..c17e15513cdf 100644
--- a/compiler/rustc_middle/src/thir/visit.rs
+++ b/compiler/rustc_middle/src/thir/visit.rs
@@ -48,7 +48,6 @@ pub fn walk_expr<'thir, 'tcx: 'thir, V: Visitor<'thir, 'tcx>>(
     let Expr { kind, ty: _, temp_scope_id: _, span: _ } = expr;
     match *kind {
         Scope { value, region_scope: _, hir_id: _ } => visitor.visit_expr(&visitor.thir()[value]),
-        Box { value } => visitor.visit_expr(&visitor.thir()[value]),
         If { cond, then, else_opt, if_then_scope: _ } => {
             visitor.visit_expr(&visitor.thir()[cond]);
             visitor.visit_expr(&visitor.thir()[then]);
diff --git a/compiler/rustc_mir_build/src/builder/expr/as_place.rs b/compiler/rustc_mir_build/src/builder/expr/as_place.rs
index 172dbf7c31b5..7930a1a1e55f 100644
--- a/compiler/rustc_mir_build/src/builder/expr/as_place.rs
+++ b/compiler/rustc_mir_build/src/builder/expr/as_place.rs
@@ -552,7 +552,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
             | ExprKind::Unary { .. }
             | ExprKind::Binary { .. }
             | ExprKind::LogicalOp { .. }
-            | ExprKind::Box { .. }
             | ExprKind::Cast { .. }
             | ExprKind::Use { .. }
             | ExprKind::NeverToAny { .. }
diff --git a/compiler/rustc_mir_build/src/builder/expr/as_rvalue.rs b/compiler/rustc_mir_build/src/builder/expr/as_rvalue.rs
index 8de79ab2531f..0f206c1f01ec 100644
--- a/compiler/rustc_mir_build/src/builder/expr/as_rvalue.rs
+++ b/compiler/rustc_mir_build/src/builder/expr/as_rvalue.rs
@@ -1,7 +1,6 @@
 //! See docs in `build/expr/mod.rs`.
 
 use rustc_abi::FieldIdx;
-use rustc_hir::lang_items::LangItem;
 use rustc_index::{Idx, IndexVec};
 use rustc_middle::bug;
 use rustc_middle::middle::region::{self, TempLifetime};
@@ -124,65 +123,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
                 }
                 block.and(Rvalue::UnaryOp(op, arg))
             }
-            ExprKind::Box { value } => {
-                let value_ty = this.thir[value].ty;
-                let tcx = this.tcx;
-                let source_info = this.source_info(expr_span);
-
-                let size = tcx.require_lang_item(LangItem::SizeOf, expr_span);
-                let size = Operand::unevaluated_constant(tcx, size, &[value_ty.into()], expr_span);
-
-                let align = tcx.require_lang_item(LangItem::AlignOf, expr_span);
-                let align =
-                    Operand::unevaluated_constant(tcx, align, &[value_ty.into()], expr_span);
-
-                // malloc some memory of suitable size and align:
-                let exchange_malloc = Operand::function_handle(
-                    tcx,
-                    tcx.require_lang_item(LangItem::ExchangeMalloc, expr_span),
-                    [],
-                    expr_span,
-                );
-                let storage = this.temp(Ty::new_mut_ptr(tcx, tcx.types.u8), expr_span);
-                let success = this.cfg.start_new_block();
-                this.cfg.terminate(
-                    block,
-                    source_info,
-                    TerminatorKind::Call {
-                        func: exchange_malloc,
-                        args: [
-                            Spanned { node: size, span: DUMMY_SP },
-                            Spanned { node: align, span: DUMMY_SP },
-                        ]
-                        .into(),
-                        destination: storage,
-                        target: Some(success),
-                        unwind: UnwindAction::Continue,
-                        call_source: CallSource::Misc,
-                        fn_span: expr_span,
-                    },
-                );
-                this.diverge_from(block);
-                block = success;
-
-                let result = this.local_decls.push(LocalDecl::new(expr.ty, expr_span));
-                this.cfg
-                    .push(block, Statement::new(source_info, StatementKind::StorageLive(result)));
-                if let Some(scope) = scope.temp_lifetime {
-                    // schedule a shallow free of that memory, lest we unwind:
-                    this.schedule_drop_storage_and_value(expr_span, scope, result);
-                }
-
-                // Transmute `*mut u8` to the box (thus far, uninitialized):
-                let box_ = Rvalue::ShallowInitBox(Operand::Move(storage), value_ty);
-                this.cfg.push_assign(block, source_info, Place::from(result), box_);
-
-                // initialize the box contents:
-                block = this
-                    .expr_into_dest(this.tcx.mk_place_deref(Place::from(result)), block, value)
-                    .into_block();
-                block.and(Rvalue::Use(Operand::Move(Place::from(result))))
-            }
             ExprKind::Cast { source } => {
                 let source_expr = &this.thir[source];
 
diff --git a/compiler/rustc_mir_build/src/builder/expr/category.rs b/compiler/rustc_mir_build/src/builder/expr/category.rs
index 1464b5e560bf..5404d9800c3f 100644
--- a/compiler/rustc_mir_build/src/builder/expr/category.rs
+++ b/compiler/rustc_mir_build/src/builder/expr/category.rs
@@ -64,7 +64,6 @@ impl Category {
             | ExprKind::Closure { .. }
             | ExprKind::Unary { .. }
             | ExprKind::Binary { .. }
-            | ExprKind::Box { .. }
             | ExprKind::Cast { .. }
             | ExprKind::PointerCoercion { .. }
             | ExprKind::Repeat { .. }
diff --git a/compiler/rustc_mir_build/src/builder/expr/into.rs b/compiler/rustc_mir_build/src/builder/expr/into.rs
index 230b4d97f14f..34fd9fc7ac63 100644
--- a/compiler/rustc_mir_build/src/builder/expr/into.rs
+++ b/compiler/rustc_mir_build/src/builder/expr/into.rs
@@ -1,5 +1,6 @@
 //! See docs in build/expr/mod.rs
 
+use rustc_abi::FieldIdx;
 use rustc_ast::{AsmMacro, InlineAsmOptions};
 use rustc_data_structures::fx::FxHashMap;
 use rustc_data_structures::stack::ensure_sufficient_stack;
@@ -366,30 +367,96 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
                     None
                 })
             }
-            // The `write_via_move` intrinsic needs to be special-cased very early to avoid
-            // introducing unnecessary copies that can be hard to remove again later:
-            // `write_via_move(ptr, val)` becomes `*ptr = val` but without any dropping.
+            // Some intrinsics are handled here because they desperately want to avoid introducing
+            // unnecessary copies.
             ExprKind::Call { ty, fun, ref args, .. }
-                if let ty::FnDef(def_id, _generic_args) = ty.kind()
+                if let ty::FnDef(def_id, generic_args) = ty.kind()
                     && let Some(intrinsic) = this.tcx.intrinsic(def_id)
-                    && intrinsic.name == sym::write_via_move =>
+                    && matches!(intrinsic.name, sym::write_via_move | sym::write_box_via_move) =>
             {
                 // We still have to evaluate the callee expression as normal (but we don't care
                 // about its result).
                 let _fun = unpack!(block = this.as_local_operand(block, fun));
-                // The destination must have unit type (so we don't actually have to store anything
-                // into it).
-                assert!(destination.ty(&this.local_decls, this.tcx).ty.is_unit());
 
-                // Compile this to an assignment of the argument into the destination.
-                let [ptr, val] = **args else {
-                    span_bug!(expr_span, "invalid write_via_move call")
-                };
-                let Some(ptr) = unpack!(block = this.as_local_operand(block, ptr)).place() else {
-                    span_bug!(expr_span, "invalid write_via_move call")
-                };
-                let ptr_deref = ptr.project_deeper(&[ProjectionElem::Deref], this.tcx);
-                this.expr_into_dest(ptr_deref, block, val)
+                match intrinsic.name {
+                    sym::write_via_move => {
+                        // `write_via_move(ptr, val)` becomes `*ptr = val` but without any dropping.
+
+                        // The destination must have unit type (so we don't actually have to store anything
+                        // into it).
+                        assert!(destination.ty(&this.local_decls, this.tcx).ty.is_unit());
+
+                        // Compile this to an assignment of the argument into the destination.
+                        let [ptr, val] = **args else {
+                            span_bug!(expr_span, "invalid write_via_move call")
+                        };
+                        let Some(ptr) = unpack!(block = this.as_local_operand(block, ptr)).place()
+                        else {
+                            span_bug!(expr_span, "invalid write_via_move call")
+                        };
+                        let ptr_deref = ptr.project_deeper(&[ProjectionElem::Deref], this.tcx);
+                        this.expr_into_dest(ptr_deref, block, val)
+                    }
+                    sym::write_box_via_move => {
+                        // The signature is:
+                        // `fn write_box_via_move(b: Box>, val: T) -> Box>`.
+                        // `write_box_via_move(b, val)` becomes
+                        // ```
+                        // (*b).value.value.value = val;
+                        // b
+                        // ```
+                        // One crucial aspect of this lowering is that the generated code must
+                        // cause the borrow checker to enforce that `val` lives sufficiently
+                        // long to be stored in `b`. The above lowering does this; anything that
+                        // involves a `*const T` or a `NonNull` does not as those are covariant.
+                        let tcx = this.tcx;
+
+                        // Extract the operands, compile `b`.
+                        let [b, val] = **args else {
+                            span_bug!(expr_span, "invalid init_box_via_move call")
+                        };
+                        let Some(b) = unpack!(block = this.as_local_operand(block, b)).place()
+                        else {
+                            span_bug!(expr_span, "invalid init_box_via_move call")
+                        };
+
+                        // Helper to project to a field of an ADT.
+                        let place_project_field = |place: Place<'tcx>, idx: FieldIdx| {
+                            let ty = place.ty(&this.local_decls, tcx).ty;
+                            let ty::Adt(adt, args) = ty.kind() else {
+                                panic!("projecting to field of non-ADT {ty}")
+                            };
+                            let field = &adt.non_enum_variant().fields[idx];
+                            let field_ty = field.ty(tcx, args);
+                            place.project_deeper(&[ProjectionElem::Field(idx, field_ty)], tcx)
+                        };
+
+                        // `b` is a `Box>`.
+                        let place = b.project_deeper(&[ProjectionElem::Deref], tcx);
+                        // Current type: `MaybeUninit`. Field #1 is `ManuallyDrop`.
+                        let place = place_project_field(place, FieldIdx::from_u32(1));
+                        // Current type: `ManuallyDrop`. Field #0 is `MaybeDangling`.
+                        let place = place_project_field(place, FieldIdx::ZERO);
+                        // Current type: `MaybeDangling`. Field #0 is `T`.
+                        let place = place_project_field(place, FieldIdx::ZERO);
+                        // Sanity check.
+                        assert_eq!(place.ty(&this.local_decls, tcx).ty, generic_args.type_at(0));
+
+                        // Store `val` into place.
+                        unpack!(block = this.expr_into_dest(place, block, val));
+
+                        // Return `b`
+                        this.cfg.push_assign(
+                            block,
+                            source_info,
+                            destination,
+                            // Move from `b` so that does not get dropped any more.
+                            Rvalue::Use(Operand::Move(b)),
+                        );
+                        block.unit()
+                    }
+                    _ => rustc_middle::bug!(),
+                }
             }
             ExprKind::Call { ty: _, fun, ref args, from_hir_call, fn_span } => {
                 let fun = unpack!(block = this.as_local_operand(block, fun));
@@ -795,7 +862,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
             // these are the cases that are more naturally handled by some other mode
             ExprKind::Unary { .. }
             | ExprKind::Binary { .. }
-            | ExprKind::Box { .. }
             | ExprKind::Cast { .. }
             | ExprKind::PointerCoercion { .. }
             | ExprKind::Repeat { .. }
diff --git a/compiler/rustc_mir_build/src/check_unsafety.rs b/compiler/rustc_mir_build/src/check_unsafety.rs
index 7bced8168bd1..48c512339ce1 100644
--- a/compiler/rustc_mir_build/src/check_unsafety.rs
+++ b/compiler/rustc_mir_build/src/check_unsafety.rs
@@ -449,7 +449,6 @@ impl<'a, 'tcx> Visitor<'a, 'tcx> for UnsafetyVisitor<'a, 'tcx> {
             | ExprKind::LoopMatch { .. }
             | ExprKind::Let { .. }
             | ExprKind::Match { .. }
-            | ExprKind::Box { .. }
             | ExprKind::If { .. }
             | ExprKind::InlineAsm { .. }
             | ExprKind::LogicalOp { .. }
diff --git a/compiler/rustc_mir_build/src/thir/cx/expr.rs b/compiler/rustc_mir_build/src/thir/cx/expr.rs
index 0117a10e3a8c..fa3f89dfc4fc 100644
--- a/compiler/rustc_mir_build/src/thir/cx/expr.rs
+++ b/compiler/rustc_mir_build/src/thir/cx/expr.rs
@@ -20,7 +20,7 @@ use rustc_middle::ty::{
     self, AdtKind, GenericArgs, InlineConstArgs, InlineConstArgsParts, ScalarInt, Ty, UpvarArgs,
 };
 use rustc_middle::{bug, span_bug};
-use rustc_span::{Span, sym};
+use rustc_span::Span;
 use tracing::{debug, info, instrument, trace};
 
 use crate::errors::*;
@@ -385,24 +385,6 @@ impl<'tcx> ThirBuildCx<'tcx> {
                         from_hir_call: true,
                         fn_span: expr.span,
                     }
-                } else if let ty::FnDef(def_id, _) = self.typeck_results.expr_ty(fun).kind()
-                    && let Some(intrinsic) = self.tcx.intrinsic(def_id)
-                    && intrinsic.name == sym::box_new
-                {
-                    // We don't actually evaluate `fun` here, so make sure that doesn't miss any side-effects.
-                    if !matches!(fun.kind, hir::ExprKind::Path(_)) {
-                        span_bug!(
-                            expr.span,
-                            "`box_new` intrinsic can only be called via path expression"
-                        );
-                    }
-                    let value = &args[0];
-                    return Expr {
-                        temp_scope_id: expr.hir_id.local_id,
-                        ty: expr_ty,
-                        span: expr.span,
-                        kind: ExprKind::Box { value: self.mirror_expr(value) },
-                    };
                 } else {
                     // Tuple-like ADTs are represented as ExprKind::Call. We convert them here.
                     let adt_data = if let hir::ExprKind::Path(ref qpath) = fun.kind
diff --git a/compiler/rustc_mir_build/src/thir/pattern/check_match.rs b/compiler/rustc_mir_build/src/thir/pattern/check_match.rs
index 56a5aff41d8b..e5b94ab763a1 100644
--- a/compiler/rustc_mir_build/src/thir/pattern/check_match.rs
+++ b/compiler/rustc_mir_build/src/thir/pattern/check_match.rs
@@ -342,7 +342,6 @@ impl<'p, 'tcx> MatchVisitor<'p, 'tcx> {
             | Binary { .. }
             | Block { .. }
             | Borrow { .. }
-            | Box { .. }
             | Call { .. }
             | ByUse { .. }
             | Closure { .. }
diff --git a/compiler/rustc_mir_build/src/thir/print.rs b/compiler/rustc_mir_build/src/thir/print.rs
index db8b2518981d..6905f5c34caa 100644
--- a/compiler/rustc_mir_build/src/thir/print.rs
+++ b/compiler/rustc_mir_build/src/thir/print.rs
@@ -223,11 +223,6 @@ impl<'a, 'tcx> ThirPrinter<'a, 'tcx> {
                 self.print_expr(*value, depth_lvl + 2);
                 print_indented!(self, "}", depth_lvl);
             }
-            Box { value } => {
-                print_indented!(self, "Box {", depth_lvl);
-                self.print_expr(*value, depth_lvl + 1);
-                print_indented!(self, "}", depth_lvl);
-            }
             If { if_then_scope, cond, then, else_opt } => {
                 print_indented!(self, "If {", depth_lvl);
                 print_indented!(self, format!("if_then_scope: {:?}", if_then_scope), depth_lvl + 1);
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index bf3d28a65440..37fff4a248ef 100644
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
@@ -990,7 +990,6 @@ symbols! {
         exact_div,
         except,
         exception_handling: "exception-handling",
-        exchange_malloc,
         exclusive_range_pattern,
         exhaustive_integer_patterns,
         exhaustive_patterns,
@@ -2541,6 +2540,7 @@ symbols! {
         wrapping_rem_euclid,
         wrapping_sub,
         wreg,
+        write_box_via_move,
         write_bytes,
         write_fmt,
         write_macro,
diff --git a/compiler/rustc_ty_utils/src/consts.rs b/compiler/rustc_ty_utils/src/consts.rs
index 0edbe9624c4b..1d444079f896 100644
--- a/compiler/rustc_ty_utils/src/consts.rs
+++ b/compiler/rustc_ty_utils/src/consts.rs
@@ -174,7 +174,6 @@ fn recurse_build<'tcx>(
         | ExprKind::LoopMatch { .. } => {
             error(GenericConstantTooComplexSub::LoopNotSupported(node.span))?
         }
-        ExprKind::Box { .. } => error(GenericConstantTooComplexSub::BoxNotSupported(node.span))?,
         ExprKind::ByUse { .. } => {
             error(GenericConstantTooComplexSub::ByUseNotSupported(node.span))?
         }
@@ -260,7 +259,6 @@ impl<'a, 'tcx> IsThirPolymorphic<'a, 'tcx> {
                 count.has_non_region_param()
             }
             thir::ExprKind::Scope { .. }
-            | thir::ExprKind::Box { .. }
             | thir::ExprKind::If { .. }
             | thir::ExprKind::Call { .. }
             | thir::ExprKind::ByUse { .. }
diff --git a/compiler/rustc_ty_utils/src/errors.rs b/compiler/rustc_ty_utils/src/errors.rs
index ccea5a49bd7c..07a2c844a717 100644
--- a/compiler/rustc_ty_utils/src/errors.rs
+++ b/compiler/rustc_ty_utils/src/errors.rs
@@ -51,8 +51,6 @@ pub(crate) enum GenericConstantTooComplexSub {
     YieldNotSupported(#[primary_span] Span),
     #[label("loops and loop control flow are not supported in generic constants")]
     LoopNotSupported(#[primary_span] Span),
-    #[label("allocations are not allowed in generic constants")]
-    BoxNotSupported(#[primary_span] Span),
     #[label("unsupported binary operation in generic constants")]
     BinaryNotSupported(#[primary_span] Span),
     #[label(".use is not allowed in generic constants")]
diff --git a/library/alloc/src/alloc.rs b/library/alloc/src/alloc.rs
index ca038b3995c1..8fbd4b612bde 100644
--- a/library/alloc/src/alloc.rs
+++ b/library/alloc/src/alloc.rs
@@ -479,23 +479,6 @@ unsafe impl const Allocator for Global {
     }
 }
 
-/// The allocator for `Box`.
-///
-/// # Safety
-///
-/// `size` and `align` must satisfy the conditions in [`Layout::from_size_align`].
-#[cfg(not(no_global_oom_handling))]
-#[lang = "exchange_malloc"]
-#[inline]
-#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
-pub(crate) unsafe fn exchange_malloc(size: usize, align: usize) -> *mut u8 {
-    let layout = unsafe { Layout::from_size_align_unchecked(size, align) };
-    match Global.allocate(layout) {
-        Ok(ptr) => ptr.as_mut_ptr(),
-        Err(_) => handle_alloc_error(layout),
-    }
-}
-
 // # Allocation error handler
 
 #[cfg(not(no_global_oom_handling))]
diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs
index 1c8e21e3062a..5d36a6c463ea 100644
--- a/library/alloc/src/boxed.rs
+++ b/library/alloc/src/boxed.rs
@@ -206,7 +206,7 @@ use core::task::{Context, Poll};
 
 #[cfg(not(no_global_oom_handling))]
 use crate::alloc::handle_alloc_error;
-use crate::alloc::{AllocError, Allocator, Global, Layout, exchange_malloc};
+use crate::alloc::{AllocError, Allocator, Global, Layout};
 use crate::raw_vec::RawVec;
 #[cfg(not(no_global_oom_handling))]
 use crate::str::from_boxed_utf8_unchecked;
@@ -236,14 +236,34 @@ pub struct Box<
     #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
 >(Unique, A);
 
-/// Constructs a `Box` by calling the `exchange_malloc` lang item and moving the argument into
-/// the newly allocated memory. This is an intrinsic to avoid unnecessary copies.
+/// Monomorphic function for allocating an uninit `Box`.
 ///
-/// This is the surface syntax for `box ` expressions.
+/// # Safety
+///
+/// size and align need to be safe for `Layout::from_size_align_unchecked`.
+#[inline]
+#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
+#[cfg(not(no_global_oom_handling))]
+unsafe fn box_new_uninit(size: usize, align: usize) -> *mut u8 {
+    let layout = unsafe { Layout::from_size_align_unchecked(size, align) };
+    match Global.allocate(layout) {
+        Ok(ptr) => ptr.as_mut_ptr(),
+        Err(_) => handle_alloc_error(layout),
+    }
+}
+
+/// Helper for `vec!`.
+///
+/// This is unsafe, but has to be marked as safe or else we couldn't use it in `vec!`.
 #[doc(hidden)]
-#[rustc_intrinsic]
 #[unstable(feature = "liballoc_internals", issue = "none")]
-pub fn box_new(x: T) -> Box;
+#[inline(always)]
+#[cfg(not(no_global_oom_handling))]
+pub fn box_assume_init_into_vec_unsafe(
+    b: Box>,
+) -> crate::vec::Vec {
+    unsafe { (b.assume_init() as Box<[T]>).into_vec() }
+}
 
 impl Box {
     /// Allocates memory on the heap and then places `x` into it.
@@ -262,9 +282,10 @@ impl Box {
     #[rustc_diagnostic_item = "box_new"]
     #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
     pub fn new(x: T) -> Self {
-        // SAFETY: the size and align of a valid type `T` are always valid for `Layout`.
+        // This is `Box::new_uninit` but inlined to avoid build time regressions.
+        // SAFETY: The size and align of a valid type `T` are always valid for `Layout`.
         let ptr = unsafe {
-            exchange_malloc(::SIZE, ::ALIGN)
+            box_new_uninit(::SIZE, ::ALIGN)
         } as *mut T;
         // Nothing below can panic so we do not have to worry about deallocating `ptr`.
         // SAFETY: we just allocated the box to store `x`.
@@ -288,9 +309,21 @@ impl Box {
     #[cfg(not(no_global_oom_handling))]
     #[stable(feature = "new_uninit", since = "1.82.0")]
     #[must_use]
-    #[inline]
+    #[inline(always)]
+    #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
     pub fn new_uninit() -> Box> {
-        Self::new_uninit_in(Global)
+        // This is the same as `Self::new_uninit_in(Global)`, but manually inlined (just like
+        // `Box::new`).
+
+        // SAFETY:
+        // - The size and align of a valid type `T` are always valid for `Layout`.
+        // - If `allocate` succeeds, the returned pointer exactly matches what `Box` needs.
+        unsafe {
+            mem::transmute(box_new_uninit(
+                ::SIZE,
+                ::ALIGN,
+            ))
+        }
     }
 
     /// Constructs a new `Box` with uninitialized contents, with the memory
@@ -1150,10 +1183,12 @@ impl Box, A> {
     /// assert_eq!(*five, 5)
     /// ```
     #[stable(feature = "new_uninit", since = "1.82.0")]
-    #[inline]
+    #[inline(always)]
     pub unsafe fn assume_init(self) -> Box {
-        let (raw, alloc) = Box::into_raw_with_allocator(self);
-        unsafe { Box::from_raw_in(raw as *mut T, alloc) }
+        // This is used in the `vec!` macro, so we optimize for minimal IR generation
+        // even in debug builds.
+        // SAFETY: `Box` and `Box>` have the same layout.
+        unsafe { core::intrinsics::transmute_unchecked(self) }
     }
 
     /// Writes the value and converts to `Box`.
diff --git a/library/alloc/src/intrinsics.rs b/library/alloc/src/intrinsics.rs
new file mode 100644
index 000000000000..a1e358e077cb
--- /dev/null
+++ b/library/alloc/src/intrinsics.rs
@@ -0,0 +1,15 @@
+//! Intrinsics that cannot be moved to `core` because they depend on `alloc` types.
+#![unstable(feature = "liballoc_internals", issue = "none")]
+
+use core::mem::MaybeUninit;
+
+use crate::boxed::Box;
+
+/// Writes `x` into `b`.
+///
+/// This is needed for `vec!`, which can't afford any extra copies of the argument (or else debug
+/// builds regress), has to be written fully as a call chain without `let` (or else this breaks inference
+/// of e.g. unsizing coercions), and can't use an `unsafe` block as that would then also
+/// include the user-provided `$x`.
+#[rustc_intrinsic]
+pub fn write_box_via_move(b: Box>, x: T) -> Box>;
diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs
index 3d94554281d4..04ca6403fe83 100644
--- a/library/alloc/src/lib.rs
+++ b/library/alloc/src/lib.rs
@@ -224,6 +224,7 @@ pub mod collections;
 #[cfg(all(not(no_rc), not(no_sync), not(no_global_oom_handling)))]
 pub mod ffi;
 pub mod fmt;
+pub mod intrinsics;
 #[cfg(not(no_rc))]
 pub mod rc;
 pub mod slice;
diff --git a/library/alloc/src/macros.rs b/library/alloc/src/macros.rs
index 1e6e2ae8c367..b99107fb345a 100644
--- a/library/alloc/src/macros.rs
+++ b/library/alloc/src/macros.rs
@@ -47,10 +47,16 @@ macro_rules! vec {
         $crate::vec::from_elem($elem, $n)
     );
     ($($x:expr),+ $(,)?) => (
-        <[_]>::into_vec(
-            // Using the intrinsic produces a dramatic improvement in stack usage for
-            // unoptimized programs using this code path to construct large Vecs.
-            $crate::boxed::box_new([$($x),+])
+        // Using `write_box_via_move` produces a dramatic improvement in stack usage for unoptimized
+        // programs using this code path to construct large Vecs. We can't use `write_via_move`
+        // because this entire invocation has to remain a call chain without `let` bindings, or else
+        // inference and temporary lifetimes change and things break (see `vec-macro-rvalue-scope`,
+        // `vec-macro-coercions`, and `autoderef-vec-box-fn-36786` tests).
+        //
+        // `box_assume_init_into_vec_unsafe` isn't actually safe but the way we use it here is. We
+        // can't use an unsafe block as that would also wrap `$x`.
+        $crate::boxed::box_assume_init_into_vec_unsafe(
+            $crate::intrinsics::write_box_via_move($crate::boxed::Box::new_uninit(), [$($x),+])
         )
     );
 }
diff --git a/src/tools/miri/tests/pass/vec.rs b/src/tools/miri/tests/pass/vec.rs
index 8b1b1e143b16..879479bf21bb 100644
--- a/src/tools/miri/tests/pass/vec.rs
+++ b/src/tools/miri/tests/pass/vec.rs
@@ -178,6 +178,24 @@ fn extract_if() {
     }
 }
 
+fn vec_macro_cleanup() {
+    // Ensure memory gets deallocated when control flow leaves the `vec!` macro.
+    #[allow(unreachable_code)]
+    loop {
+        let _v = vec![Box::new(0), break];
+    }
+
+    fn panic() -> T {
+        panic!()
+    }
+    // Ensure all memory gets deallocated on a panic: the `Box` we construct, and the `Box`
+    // constructed inside `vec!` to eventually turn into a `Vec`.
+    std::panic::catch_unwind(|| {
+        let _v = vec![Box::new(0), panic()];
+    })
+    .unwrap_err();
+}
+
 fn main() {
     assert_eq!(vec_reallocate().len(), 5);
 
@@ -209,4 +227,5 @@ fn main() {
     reverse();
     miri_issue_2759();
     extract_if();
+    vec_macro_cleanup();
 }
diff --git a/src/tools/miri/tests/pass/vec.stack.stderr b/src/tools/miri/tests/pass/vec.stack.stderr
new file mode 100644
index 000000000000..8c6112f0dc4d
--- /dev/null
+++ b/src/tools/miri/tests/pass/vec.stack.stderr
@@ -0,0 +1,5 @@
+
+thread 'main' ($TID) panicked at tests/pass/vec.rs:LL:CC:
+explicit panic
+note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
+note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
diff --git a/src/tools/miri/tests/pass/vec.tree.stderr b/src/tools/miri/tests/pass/vec.tree.stderr
new file mode 100644
index 000000000000..8c6112f0dc4d
--- /dev/null
+++ b/src/tools/miri/tests/pass/vec.tree.stderr
@@ -0,0 +1,5 @@
+
+thread 'main' ($TID) panicked at tests/pass/vec.rs:LL:CC:
+explicit panic
+note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
+note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
diff --git a/src/tools/tidy/src/issues.txt b/src/tools/tidy/src/issues.txt
index 295cf228815e..9c176e9fffa1 100644
--- a/src/tools/tidy/src/issues.txt
+++ b/src/tools/tidy/src/issues.txt
@@ -2450,7 +2450,6 @@ ui/single-use-lifetime/issue-107998.rs
 ui/single-use-lifetime/issue-117965.rs
 ui/span/issue-107353.rs
 ui/span/issue-11925.rs
-ui/span/issue-15480.rs
 ui/span/issue-23338-locals-die-before-temps-of-body.rs
 ui/span/issue-23729.rs
 ui/span/issue-23827.rs
diff --git a/tests/codegen-units/item-collection/opaque-return-impls.rs b/tests/codegen-units/item-collection/opaque-return-impls.rs
index 54ab656c53db..a3f649a80e32 100644
--- a/tests/codegen-units/item-collection/opaque-return-impls.rs
+++ b/tests/codegen-units/item-collection/opaque-return-impls.rs
@@ -42,7 +42,6 @@ pub fn foo2() -> Box {
 }
 
 //~ MONO_ITEM fn ::test_func2
-//~ MONO_ITEM fn alloc::alloc::exchange_malloc
 //~ MONO_ITEM fn foo2
 //~ MONO_ITEM fn std::alloc::Global::alloc_impl_runtime
 //~ MONO_ITEM fn std::boxed::Box::::new
diff --git a/tests/mir-opt/box_expr.main.ElaborateDrops.diff b/tests/mir-opt/box_expr.main.ElaborateDrops.diff
deleted file mode 100644
index 4fa77cf82d81..000000000000
--- a/tests/mir-opt/box_expr.main.ElaborateDrops.diff
+++ /dev/null
@@ -1,89 +0,0 @@
-- // MIR for `main` before ElaborateDrops
-+ // MIR for `main` after ElaborateDrops
-  
-  fn main() -> () {
-      let mut _0: ();
-      let _1: std::boxed::Box;
-      let mut _2: *mut u8;
-      let mut _3: std::boxed::Box;
-      let _4: ();
-      let mut _5: std::boxed::Box;
-+     let mut _6: &mut std::boxed::Box;
-+     let mut _7: ();
-+     let mut _8: *const S;
-      scope 1 {
-          debug x => _1;
-      }
-  
-      bb0: {
-          StorageLive(_1);
-          _2 = alloc::alloc::exchange_malloc(const ::SIZE, const ::ALIGN) -> [return: bb1, unwind continue];
-      }
-  
-      bb1: {
-          StorageLive(_3);
-          _3 = ShallowInitBox(move _2, S);
-          (*_3) = S::new() -> [return: bb2, unwind: bb8];
-      }
-  
-      bb2: {
-          _1 = move _3;
--         drop(_3) -> [return: bb3, unwind continue];
-+         goto -> bb3;
-      }
-  
-      bb3: {
-          StorageDead(_3);
-          StorageLive(_4);
-          StorageLive(_5);
-          _5 = move _1;
-          _4 = std::mem::drop::>(move _5) -> [return: bb4, unwind: bb6];
-      }
-  
-      bb4: {
-          StorageDead(_5);
-          StorageDead(_4);
-          _0 = const ();
--         drop(_1) -> [return: bb5, unwind continue];
-+         goto -> bb5;
-      }
-  
-      bb5: {
-          StorageDead(_1);
-          return;
-      }
-  
-      bb6 (cleanup): {
--         drop(_5) -> [return: bb7, unwind terminate(cleanup)];
-+         goto -> bb7;
-      }
-  
-      bb7 (cleanup): {
--         drop(_1) -> [return: bb9, unwind terminate(cleanup)];
-+         goto -> bb9;
-      }
-  
-      bb8 (cleanup): {
--         drop(_3) -> [return: bb9, unwind terminate(cleanup)];
-+         goto -> bb12;
-      }
-  
-      bb9 (cleanup): {
-          resume;
-+     }
-+ 
-+     bb10 (cleanup): {
-+         _6 = &mut _3;
-+         _7 =  as Drop>::drop(move _6) -> [return: bb9, unwind terminate(cleanup)];
-+     }
-+ 
-+     bb11 (cleanup): {
-+         goto -> bb10;
-+     }
-+ 
-+     bb12 (cleanup): {
-+         _8 = copy ((_3.0: std::ptr::Unique).0: std::ptr::NonNull) as *const S (Transmute);
-+         goto -> bb11;
-      }
-  }
-  
diff --git a/tests/mir-opt/box_expr.rs b/tests/mir-opt/box_expr.rs
deleted file mode 100644
index dbb07a028a93..000000000000
--- a/tests/mir-opt/box_expr.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-//@ test-mir-pass: ElaborateDrops
-//@ needs-unwind
-
-#![feature(rustc_attrs, liballoc_internals)]
-
-// EMIT_MIR box_expr.main.ElaborateDrops.diff
-fn main() {
-    // CHECK-LABEL: fn main(
-    // CHECK:   [[ptr:_.*]] = move {{_.*}} as *const S (Transmute);
-    // CHECK:   [[nonnull:_.*]] = NonNull:: { pointer: move [[ptr]] };
-    // CHECK:   [[unique:_.*]] = std::ptr::Unique:: { pointer: move [[nonnull]], _marker: const PhantomData:: };
-    // CHECK:   [[box:_.*]] = Box::(move [[unique]], const std::alloc::Global);
-    // CHECK:   [[ptr:_.*]] = copy (([[box]].0: std::ptr::Unique).0: std::ptr::NonNull) as *const S (Transmute);
-    // CHECK:   (*[[ptr]]) = S::new() -> [return: [[ret:bb.*]], unwind: [[unwind:bb.*]]];
-    // CHECK: [[ret]]: {
-    // CHECK:   [[box2:_.*]] = move [[box]];
-    // CHECK:   [[box3:_.*]] = move [[box2]];
-    // CHECK:   std::mem::drop::>(move [[box3]])
-    // CHECK: [[unwind]] (cleanup): {
-    // CHECK:   [[boxref:_.*]] = &mut [[box]];
-    // CHECK:    as Drop>::drop(move [[boxref]])
-
-    let x = std::boxed::box_new(S::new());
-    drop(x);
-}
-
-struct S;
-
-impl S {
-    fn new() -> Self {
-        S
-    }
-}
-
-impl Drop for S {
-    fn drop(&mut self) {
-        println!("splat!");
-    }
-}
diff --git a/tests/mir-opt/building/uniform_array_move_out.move_out_by_subslice.CleanupPostBorrowck.after.mir b/tests/mir-opt/building/uniform_array_move_out.move_out_by_subslice.CleanupPostBorrowck.after.mir
new file mode 100644
index 000000000000..17756938b889
--- /dev/null
+++ b/tests/mir-opt/building/uniform_array_move_out.move_out_by_subslice.CleanupPostBorrowck.after.mir
@@ -0,0 +1,68 @@
+// MIR for `move_out_by_subslice` after CleanupPostBorrowck
+
+fn move_out_by_subslice() -> () {
+    let mut _0: ();
+    let _1: [std::boxed::Box; 2];
+    let mut _2: std::boxed::Box;
+    let mut _3: std::boxed::Box;
+    scope 1 {
+        debug a => _1;
+        let _4: [std::boxed::Box; 2];
+        scope 2 {
+            debug _y => _4;
+        }
+    }
+
+    bb0: {
+        StorageLive(_1);
+        StorageLive(_2);
+        _2 = Box::::new(const 1_i32) -> [return: bb1, unwind: bb9];
+    }
+
+    bb1: {
+        StorageLive(_3);
+        _3 = Box::::new(const 2_i32) -> [return: bb2, unwind: bb8];
+    }
+
+    bb2: {
+        _1 = [move _2, move _3];
+        drop(_3) -> [return: bb3, unwind: bb8];
+    }
+
+    bb3: {
+        StorageDead(_3);
+        drop(_2) -> [return: bb4, unwind: bb9];
+    }
+
+    bb4: {
+        StorageDead(_2);
+        nop;
+        PlaceMention(_1);
+        StorageLive(_4);
+        _4 = move _1[0..2];
+        _0 = const ();
+        drop(_4) -> [return: bb5, unwind: bb7];
+    }
+
+    bb5: {
+        StorageDead(_4);
+        drop(_1) -> [return: bb6, unwind: bb9];
+    }
+
+    bb6: {
+        StorageDead(_1);
+        return;
+    }
+
+    bb7 (cleanup): {
+        drop(_1) -> [return: bb9, unwind terminate(cleanup)];
+    }
+
+    bb8 (cleanup): {
+        drop(_2) -> [return: bb9, unwind terminate(cleanup)];
+    }
+
+    bb9 (cleanup): {
+        resume;
+    }
+}
diff --git a/tests/mir-opt/building/uniform_array_move_out.move_out_by_subslice.built.after.mir b/tests/mir-opt/building/uniform_array_move_out.move_out_by_subslice.built.after.mir
deleted file mode 100644
index 839bdeca86a8..000000000000
--- a/tests/mir-opt/building/uniform_array_move_out.move_out_by_subslice.built.after.mir
+++ /dev/null
@@ -1,99 +0,0 @@
-// MIR for `move_out_by_subslice` after built
-
-fn move_out_by_subslice() -> () {
-    let mut _0: ();
-    let _1: [std::boxed::Box; 2];
-    let mut _2: std::boxed::Box;
-    let mut _3: *mut u8;
-    let mut _4: std::boxed::Box;
-    let mut _5: std::boxed::Box;
-    let mut _6: *mut u8;
-    let mut _7: std::boxed::Box;
-    scope 1 {
-        debug a => _1;
-        let _8: [std::boxed::Box; 2];
-        scope 2 {
-            debug _y => _8;
-        }
-    }
-
-    bb0: {
-        StorageLive(_1);
-        StorageLive(_2);
-        _3 = alloc::alloc::exchange_malloc(const ::SIZE, const ::ALIGN) -> [return: bb1, unwind: bb13];
-    }
-
-    bb1: {
-        StorageLive(_4);
-        _4 = ShallowInitBox(move _3, i32);
-        (*_4) = const 1_i32;
-        _2 = move _4;
-        drop(_4) -> [return: bb2, unwind: bb12];
-    }
-
-    bb2: {
-        StorageDead(_4);
-        StorageLive(_5);
-        _6 = alloc::alloc::exchange_malloc(const ::SIZE, const ::ALIGN) -> [return: bb3, unwind: bb12];
-    }
-
-    bb3: {
-        StorageLive(_7);
-        _7 = ShallowInitBox(move _6, i32);
-        (*_7) = const 2_i32;
-        _5 = move _7;
-        drop(_7) -> [return: bb4, unwind: bb11];
-    }
-
-    bb4: {
-        StorageDead(_7);
-        _1 = [move _2, move _5];
-        drop(_5) -> [return: bb5, unwind: bb12];
-    }
-
-    bb5: {
-        StorageDead(_5);
-        drop(_2) -> [return: bb6, unwind: bb13];
-    }
-
-    bb6: {
-        StorageDead(_2);
-        FakeRead(ForLet(None), _1);
-        PlaceMention(_1);
-        StorageLive(_8);
-        _8 = move _1[0..2];
-        _0 = const ();
-        drop(_8) -> [return: bb8, unwind: bb10];
-    }
-
-    bb7: {
-        FakeRead(ForMatchedPlace(None), _1);
-        unreachable;
-    }
-
-    bb8: {
-        StorageDead(_8);
-        drop(_1) -> [return: bb9, unwind: bb13];
-    }
-
-    bb9: {
-        StorageDead(_1);
-        return;
-    }
-
-    bb10 (cleanup): {
-        drop(_1) -> [return: bb13, unwind terminate(cleanup)];
-    }
-
-    bb11 (cleanup): {
-        drop(_5) -> [return: bb12, unwind terminate(cleanup)];
-    }
-
-    bb12 (cleanup): {
-        drop(_2) -> [return: bb13, unwind terminate(cleanup)];
-    }
-
-    bb13 (cleanup): {
-        resume;
-    }
-}
diff --git a/tests/mir-opt/building/uniform_array_move_out.move_out_from_end.CleanupPostBorrowck.after.mir b/tests/mir-opt/building/uniform_array_move_out.move_out_from_end.CleanupPostBorrowck.after.mir
new file mode 100644
index 000000000000..79e0f0af0dbc
--- /dev/null
+++ b/tests/mir-opt/building/uniform_array_move_out.move_out_from_end.CleanupPostBorrowck.after.mir
@@ -0,0 +1,68 @@
+// MIR for `move_out_from_end` after CleanupPostBorrowck
+
+fn move_out_from_end() -> () {
+    let mut _0: ();
+    let _1: [std::boxed::Box; 2];
+    let mut _2: std::boxed::Box;
+    let mut _3: std::boxed::Box;
+    scope 1 {
+        debug a => _1;
+        let _4: std::boxed::Box;
+        scope 2 {
+            debug _y => _4;
+        }
+    }
+
+    bb0: {
+        StorageLive(_1);
+        StorageLive(_2);
+        _2 = Box::::new(const 1_i32) -> [return: bb1, unwind: bb9];
+    }
+
+    bb1: {
+        StorageLive(_3);
+        _3 = Box::::new(const 2_i32) -> [return: bb2, unwind: bb8];
+    }
+
+    bb2: {
+        _1 = [move _2, move _3];
+        drop(_3) -> [return: bb3, unwind: bb8];
+    }
+
+    bb3: {
+        StorageDead(_3);
+        drop(_2) -> [return: bb4, unwind: bb9];
+    }
+
+    bb4: {
+        StorageDead(_2);
+        nop;
+        PlaceMention(_1);
+        StorageLive(_4);
+        _4 = move _1[1 of 2];
+        _0 = const ();
+        drop(_4) -> [return: bb5, unwind: bb7];
+    }
+
+    bb5: {
+        StorageDead(_4);
+        drop(_1) -> [return: bb6, unwind: bb9];
+    }
+
+    bb6: {
+        StorageDead(_1);
+        return;
+    }
+
+    bb7 (cleanup): {
+        drop(_1) -> [return: bb9, unwind terminate(cleanup)];
+    }
+
+    bb8 (cleanup): {
+        drop(_2) -> [return: bb9, unwind terminate(cleanup)];
+    }
+
+    bb9 (cleanup): {
+        resume;
+    }
+}
diff --git a/tests/mir-opt/building/uniform_array_move_out.move_out_from_end.built.after.mir b/tests/mir-opt/building/uniform_array_move_out.move_out_from_end.built.after.mir
deleted file mode 100644
index 7fda69c7500a..000000000000
--- a/tests/mir-opt/building/uniform_array_move_out.move_out_from_end.built.after.mir
+++ /dev/null
@@ -1,99 +0,0 @@
-// MIR for `move_out_from_end` after built
-
-fn move_out_from_end() -> () {
-    let mut _0: ();
-    let _1: [std::boxed::Box; 2];
-    let mut _2: std::boxed::Box;
-    let mut _3: *mut u8;
-    let mut _4: std::boxed::Box;
-    let mut _5: std::boxed::Box;
-    let mut _6: *mut u8;
-    let mut _7: std::boxed::Box;
-    scope 1 {
-        debug a => _1;
-        let _8: std::boxed::Box;
-        scope 2 {
-            debug _y => _8;
-        }
-    }
-
-    bb0: {
-        StorageLive(_1);
-        StorageLive(_2);
-        _3 = alloc::alloc::exchange_malloc(const ::SIZE, const ::ALIGN) -> [return: bb1, unwind: bb13];
-    }
-
-    bb1: {
-        StorageLive(_4);
-        _4 = ShallowInitBox(move _3, i32);
-        (*_4) = const 1_i32;
-        _2 = move _4;
-        drop(_4) -> [return: bb2, unwind: bb12];
-    }
-
-    bb2: {
-        StorageDead(_4);
-        StorageLive(_5);
-        _6 = alloc::alloc::exchange_malloc(const ::SIZE, const ::ALIGN) -> [return: bb3, unwind: bb12];
-    }
-
-    bb3: {
-        StorageLive(_7);
-        _7 = ShallowInitBox(move _6, i32);
-        (*_7) = const 2_i32;
-        _5 = move _7;
-        drop(_7) -> [return: bb4, unwind: bb11];
-    }
-
-    bb4: {
-        StorageDead(_7);
-        _1 = [move _2, move _5];
-        drop(_5) -> [return: bb5, unwind: bb12];
-    }
-
-    bb5: {
-        StorageDead(_5);
-        drop(_2) -> [return: bb6, unwind: bb13];
-    }
-
-    bb6: {
-        StorageDead(_2);
-        FakeRead(ForLet(None), _1);
-        PlaceMention(_1);
-        StorageLive(_8);
-        _8 = move _1[1 of 2];
-        _0 = const ();
-        drop(_8) -> [return: bb8, unwind: bb10];
-    }
-
-    bb7: {
-        FakeRead(ForMatchedPlace(None), _1);
-        unreachable;
-    }
-
-    bb8: {
-        StorageDead(_8);
-        drop(_1) -> [return: bb9, unwind: bb13];
-    }
-
-    bb9: {
-        StorageDead(_1);
-        return;
-    }
-
-    bb10 (cleanup): {
-        drop(_1) -> [return: bb13, unwind terminate(cleanup)];
-    }
-
-    bb11 (cleanup): {
-        drop(_5) -> [return: bb12, unwind terminate(cleanup)];
-    }
-
-    bb12 (cleanup): {
-        drop(_2) -> [return: bb13, unwind terminate(cleanup)];
-    }
-
-    bb13 (cleanup): {
-        resume;
-    }
-}
diff --git a/tests/mir-opt/building/uniform_array_move_out.rs b/tests/mir-opt/building/uniform_array_move_out.rs
index 36245273fe1c..573e64f26dcb 100644
--- a/tests/mir-opt/building/uniform_array_move_out.rs
+++ b/tests/mir-opt/building/uniform_array_move_out.rs
@@ -1,16 +1,17 @@
 //@ compile-flags: -Zmir-opt-level=0
 // skip-filecheck
-#![feature(liballoc_internals, rustc_attrs)]
 
-// EMIT_MIR uniform_array_move_out.move_out_from_end.built.after.mir
+// Can't emit `built.after` here as that contains user type annotations which contain DefId that
+// change all the time.
+// EMIT_MIR uniform_array_move_out.move_out_from_end.CleanupPostBorrowck.after.mir
 fn move_out_from_end() {
-    let a = [std::boxed::box_new(1), std::boxed::box_new(2)];
+    let a = [Box::new(1), Box::new(2)];
     let [.., _y] = a;
 }
 
-// EMIT_MIR uniform_array_move_out.move_out_by_subslice.built.after.mir
+// EMIT_MIR uniform_array_move_out.move_out_by_subslice.CleanupPostBorrowck.after.mir
 fn move_out_by_subslice() {
-    let a = [std::boxed::box_new(1), std::boxed::box_new(2)];
+    let a = [Box::new(1), Box::new(2)];
     let [_y @ ..] = a;
 }
 
diff --git a/tests/mir-opt/building/write_box_via_move.box_new.CleanupPostBorrowck.after.mir b/tests/mir-opt/building/write_box_via_move.box_new.CleanupPostBorrowck.after.mir
new file mode 100644
index 000000000000..0050151e89b1
--- /dev/null
+++ b/tests/mir-opt/building/write_box_via_move.box_new.CleanupPostBorrowck.after.mir
@@ -0,0 +1,58 @@
+// MIR for `box_new` after CleanupPostBorrowck
+
+fn box_new(_1: T) -> Box<[T; 1024]> {
+    debug x => _1;
+    let mut _0: std::boxed::Box<[T; 1024]>;
+    let mut _2: std::boxed::Box>;
+    let mut _3: std::boxed::Box>;
+    let mut _4: std::boxed::Box>;
+    let mut _5: T;
+    scope 1 {
+        debug b => _2;
+    }
+
+    bb0: {
+        StorageLive(_2);
+        _2 = Box::<[T; 1024]>::new_uninit() -> [return: bb1, unwind: bb7];
+    }
+
+    bb1: {
+        nop;
+        StorageLive(_3);
+        StorageLive(_4);
+        _4 = move _2;
+        StorageLive(_5);
+        _5 = copy _1;
+        ((((*_4).1: std::mem::ManuallyDrop<[T; 1024]>).0: std::mem::MaybeDangling<[T; 1024]>).0: [T; 1024]) = [move _5; 1024];
+        StorageDead(_5);
+        _3 = move _4;
+        drop(_4) -> [return: bb2, unwind: bb5];
+    }
+
+    bb2: {
+        StorageDead(_4);
+        _0 = Box::>::assume_init(move _3) -> [return: bb3, unwind: bb5];
+    }
+
+    bb3: {
+        StorageDead(_3);
+        drop(_2) -> [return: bb4, unwind: bb7];
+    }
+
+    bb4: {
+        StorageDead(_2);
+        return;
+    }
+
+    bb5 (cleanup): {
+        drop(_3) -> [return: bb6, unwind terminate(cleanup)];
+    }
+
+    bb6 (cleanup): {
+        drop(_2) -> [return: bb7, unwind terminate(cleanup)];
+    }
+
+    bb7 (cleanup): {
+        resume;
+    }
+}
diff --git a/tests/mir-opt/building/write_box_via_move.rs b/tests/mir-opt/building/write_box_via_move.rs
new file mode 100644
index 000000000000..011bcf21522c
--- /dev/null
+++ b/tests/mir-opt/building/write_box_via_move.rs
@@ -0,0 +1,29 @@
+//! Ensure we don't generate unnecessary copys for `write_via_move`.
+//@ compile-flags: -Zmir-opt-level=0
+#![feature(liballoc_internals)]
+
+extern crate alloc;
+
+// Can't emit `built.after` here as that contains user type annotations which contain DefId that
+// change all the time.
+// EMIT_MIR write_box_via_move.box_new.CleanupPostBorrowck.after.mir
+// CHECK-LABEL: fn box_new
+#[inline(never)]
+fn box_new(x: T) -> Box<[T; 1024]> {
+    let mut b = Box::new_uninit();
+    // Ensure the array gets constructed directly into the deref'd pointer.
+    // CHECK: (*[[TEMP1:_.+]]) = [{{(move|copy) _.+}}; 1024];
+    unsafe { alloc::intrinsics::write_box_via_move(b, [x; 1024]).assume_init() }
+}
+
+// EMIT_MIR write_box_via_move.vec_macro.CleanupPostBorrowck.after.mir
+// CHECK-LABEL: fn vec_macro
+fn vec_macro() -> Vec {
+    // CHECK: (*[[TEMP1:_.+]]) = [const 0_i32, const 1_i32,
+    vec![0, 1, 2, 3, 4, 5, 6, 7]
+}
+
+fn main() {
+    box_new(0);
+    vec_macro();
+}
diff --git a/tests/mir-opt/building/write_box_via_move.vec_macro.CleanupPostBorrowck.after.mir b/tests/mir-opt/building/write_box_via_move.vec_macro.CleanupPostBorrowck.after.mir
new file mode 100644
index 000000000000..2410e4d31b48
--- /dev/null
+++ b/tests/mir-opt/building/write_box_via_move.vec_macro.CleanupPostBorrowck.after.mir
@@ -0,0 +1,37 @@
+// MIR for `vec_macro` after CleanupPostBorrowck
+
+fn vec_macro() -> Vec {
+    let mut _0: std::vec::Vec;
+    let mut _1: std::boxed::Box>;
+    let mut _2: std::boxed::Box>;
+
+    bb0: {
+        StorageLive(_1);
+        StorageLive(_2);
+        _2 = Box::<[i32; 8]>::new_uninit() -> [return: bb1, unwind: bb5];
+    }
+
+    bb1: {
+        ((((*_2).1: std::mem::ManuallyDrop<[i32; 8]>).0: std::mem::MaybeDangling<[i32; 8]>).0: [i32; 8]) = [const 0_i32, const 1_i32, const 2_i32, const 3_i32, const 4_i32, const 5_i32, const 6_i32, const 7_i32];
+        _1 = move _2;
+        drop(_2) -> [return: bb2, unwind: bb4];
+    }
+
+    bb2: {
+        StorageDead(_2);
+        _0 = std::boxed::box_assume_init_into_vec_unsafe::(move _1) -> [return: bb3, unwind: bb4];
+    }
+
+    bb3: {
+        StorageDead(_1);
+        return;
+    }
+
+    bb4 (cleanup): {
+        drop(_1) -> [return: bb5, unwind terminate(cleanup)];
+    }
+
+    bb5 (cleanup): {
+        resume;
+    }
+}
diff --git a/tests/mir-opt/const_prop/boxes.main.GVN.panic-abort.diff b/tests/mir-opt/const_prop/boxes.main.GVN.panic-abort.diff
deleted file mode 100644
index ecc4b35ebcb6..000000000000
--- a/tests/mir-opt/const_prop/boxes.main.GVN.panic-abort.diff
+++ /dev/null
@@ -1,59 +0,0 @@
-- // MIR for `main` before GVN
-+ // MIR for `main` after GVN
-  
-  fn main() -> () {
-      let mut _0: ();
-      let _1: i32;
-      let mut _2: i32;
-      let mut _3: std::boxed::Box;
-      let mut _4: *mut u8;
-      let mut _5: std::boxed::Box;
-      let mut _6: *const i32;
-      let mut _7: std::ptr::NonNull;
-      let mut _8: std::ptr::Unique;
-      let mut _9: *const i32;
-      let mut _10: *const i32;
-      scope 1 {
-          debug x => _1;
-      }
-  
-      bb0: {
-          StorageLive(_1);
--         StorageLive(_2);
-+         nop;
-          StorageLive(_3);
-          _4 = alloc::alloc::exchange_malloc(const ::SIZE, const ::ALIGN) -> [return: bb1, unwind unreachable];
-      }
-  
-      bb1: {
-          StorageLive(_5);
--         _6 = move _4 as *const i32 (Transmute);
--         _7 = NonNull:: { pointer: move _6 };
--         _8 = std::ptr::Unique:: { pointer: move _7, _marker: const PhantomData:: };
-+         _6 = copy _4 as *const i32 (PtrToPtr);
-+         _7 = NonNull:: { pointer: copy _6 };
-+         _8 = std::ptr::Unique:: { pointer: copy _7, _marker: const PhantomData:: };
-          _5 = Box::(move _8, const std::alloc::Global);
--         _9 = copy ((_5.0: std::ptr::Unique).0: std::ptr::NonNull) as *const i32 (Transmute);
--         (*_9) = const 42_i32;
-+         _9 = copy _6;
-+         (*_6) = const 42_i32;
-          _3 = move _5;
-          StorageDead(_5);
-          _10 = copy ((_3.0: std::ptr::Unique).0: std::ptr::NonNull) as *const i32 (Transmute);
-          _2 = copy (*_10);
--         _1 = Add(move _2, const 0_i32);
--         StorageDead(_2);
-+         _1 = copy _2;
-+         nop;
-          drop(_3) -> [return: bb2, unwind unreachable];
-      }
-  
-      bb2: {
-          StorageDead(_3);
-          _0 = const ();
-          StorageDead(_1);
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/const_prop/boxes.main.GVN.panic-unwind.diff b/tests/mir-opt/const_prop/boxes.main.GVN.panic-unwind.diff
deleted file mode 100644
index aba1a4f1df47..000000000000
--- a/tests/mir-opt/const_prop/boxes.main.GVN.panic-unwind.diff
+++ /dev/null
@@ -1,63 +0,0 @@
-- // MIR for `main` before GVN
-+ // MIR for `main` after GVN
-  
-  fn main() -> () {
-      let mut _0: ();
-      let _1: i32;
-      let mut _2: i32;
-      let mut _3: std::boxed::Box;
-      let mut _4: *mut u8;
-      let mut _5: std::boxed::Box;
-      let mut _6: *const i32;
-      let mut _7: std::ptr::NonNull;
-      let mut _8: std::ptr::Unique;
-      let mut _9: *const i32;
-      let mut _10: *const i32;
-      scope 1 {
-          debug x => _1;
-      }
-  
-      bb0: {
-          StorageLive(_1);
--         StorageLive(_2);
-+         nop;
-          StorageLive(_3);
-          _4 = alloc::alloc::exchange_malloc(const ::SIZE, const ::ALIGN) -> [return: bb1, unwind continue];
-      }
-  
-      bb1: {
-          StorageLive(_5);
--         _6 = move _4 as *const i32 (Transmute);
--         _7 = NonNull:: { pointer: move _6 };
--         _8 = std::ptr::Unique:: { pointer: move _7, _marker: const PhantomData:: };
-+         _6 = copy _4 as *const i32 (PtrToPtr);
-+         _7 = NonNull:: { pointer: copy _6 };
-+         _8 = std::ptr::Unique:: { pointer: copy _7, _marker: const PhantomData:: };
-          _5 = Box::(move _8, const std::alloc::Global);
--         _9 = copy ((_5.0: std::ptr::Unique).0: std::ptr::NonNull) as *const i32 (Transmute);
--         (*_9) = const 42_i32;
-+         _9 = copy _6;
-+         (*_6) = const 42_i32;
-          _3 = move _5;
-          StorageDead(_5);
-          _10 = copy ((_3.0: std::ptr::Unique).0: std::ptr::NonNull) as *const i32 (Transmute);
-          _2 = copy (*_10);
--         _1 = Add(move _2, const 0_i32);
--         StorageDead(_2);
-+         _1 = copy _2;
-+         nop;
-          drop(_3) -> [return: bb2, unwind: bb3];
-      }
-  
-      bb2: {
-          StorageDead(_3);
-          _0 = const ();
-          StorageDead(_1);
-          return;
-      }
-  
-      bb3 (cleanup): {
-          resume;
-      }
-  }
-  
diff --git a/tests/mir-opt/const_prop/boxes.rs b/tests/mir-opt/const_prop/boxes.rs
deleted file mode 100644
index a192d6b4133a..000000000000
--- a/tests/mir-opt/const_prop/boxes.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-//@ test-mir-pass: GVN
-//@ compile-flags: -O
-// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
-
-#![feature(rustc_attrs, liballoc_internals)]
-
-// Note: this test verifies that we, in fact, do not const prop `#[rustc_box]`
-
-// EMIT_MIR boxes.main.GVN.diff
-fn main() {
-    // CHECK-LABEL: fn main(
-    // CHECK: debug x => [[x:_.*]];
-    // CHECK: (*{{_.*}}) = const 42_i32;
-    // CHECK: [[tmp:_.*]] = copy (*{{_.*}});
-    // CHECK: [[x]] = copy [[tmp]];
-    let x = *(std::boxed::box_new(42)) + 0;
-}
diff --git a/tests/mir-opt/dont_reset_cast_kind_without_updating_operand.test.GVN.32bit.panic-abort.diff b/tests/mir-opt/dont_reset_cast_kind_without_updating_operand.test.GVN.32bit.panic-abort.diff
index f3ccc66cdc95..7d722f7f5fdf 100644
--- a/tests/mir-opt/dont_reset_cast_kind_without_updating_operand.test.GVN.32bit.panic-abort.diff
+++ b/tests/mir-opt/dont_reset_cast_kind_without_updating_operand.test.GVN.32bit.panic-abort.diff
@@ -11,9 +11,9 @@
       let mut _9: *const [()];
       let mut _10: std::boxed::Box<()>;
       let mut _11: *const ();
-      let mut _16: usize;
-      let mut _17: usize;
-      let mut _26: usize;
+      let mut _14: usize;
+      let mut _15: usize;
+      let mut _24: usize;
       scope 1 {
           debug vp_ctx => _1;
           let _5: *const ();
@@ -26,49 +26,49 @@
                   scope 4 {
                       debug _x => _8;
                   }
-                  scope 19 (inlined foo) {
-                      let mut _27: *const [()];
+                  scope 20 (inlined foo) {
+                      let mut _25: *const [()];
                   }
               }
-              scope 17 (inlined slice_from_raw_parts::<()>) {
-                  scope 18 (inlined std::ptr::from_raw_parts::<[()], ()>) {
+              scope 18 (inlined slice_from_raw_parts::<()>) {
+                  scope 19 (inlined std::ptr::from_raw_parts::<[()], ()>) {
                   }
               }
           }
       }
       scope 5 (inlined Box::<()>::new) {
-          let mut _12: *mut u8;
-          let mut _13: *const ();
-          let mut _14: std::ptr::NonNull<()>;
-          let mut _15: std::ptr::Unique<()>;
-          scope 6 (inlined alloc::alloc::exchange_malloc) {
-              let _18: std::alloc::Layout;
-              let mut _19: std::result::Result, std::alloc::AllocError>;
-              let mut _20: isize;
-              let mut _22: !;
-              scope 7 {
-                  let _21: std::ptr::NonNull<[u8]>;
-                  scope 8 {
-                      scope 12 (inlined NonNull::<[u8]>::as_mut_ptr) {
-                          scope 13 (inlined NonNull::<[u8]>::as_non_null_ptr) {
-                              scope 14 (inlined NonNull::<[u8]>::cast::) {
-                                  let mut _25: *mut [u8];
-                                  scope 15 (inlined NonNull::<[u8]>::as_ptr) {
+          let mut _12: *mut ();
+          let mut _13: *mut u8;
+          scope 6 {
+          }
+          scope 7 (inlined boxed::box_new_uninit) {
+              let _16: std::alloc::Layout;
+              let mut _17: std::result::Result, std::alloc::AllocError>;
+              let mut _18: isize;
+              let mut _20: !;
+              scope 8 {
+                  let _19: std::ptr::NonNull<[u8]>;
+                  scope 9 {
+                      scope 13 (inlined NonNull::<[u8]>::as_mut_ptr) {
+                          scope 14 (inlined NonNull::<[u8]>::as_non_null_ptr) {
+                              scope 15 (inlined NonNull::<[u8]>::cast::) {
+                                  let mut _23: *mut [u8];
+                                  scope 16 (inlined NonNull::<[u8]>::as_ptr) {
                                   }
                               }
                           }
-                          scope 16 (inlined NonNull::::as_ptr) {
+                          scope 17 (inlined NonNull::::as_ptr) {
                           }
                       }
                   }
-                  scope 10 (inlined ::allocate) {
-                      scope 11 (inlined std::alloc::Global::alloc_impl) {
+                  scope 11 (inlined ::allocate) {
+                      scope 12 (inlined std::alloc::Global::alloc_impl) {
                       }
                   }
               }
-              scope 9 (inlined #[track_caller] Layout::from_size_align_unchecked) {
-                  let _23: ();
-                  let mut _24: std::ptr::Alignment;
+              scope 10 (inlined #[track_caller] Layout::from_size_align_unchecked) {
+                  let _21: ();
+                  let mut _22: std::ptr::Alignment;
               }
           }
       }
@@ -83,18 +83,16 @@
           StorageLive(_12);
           StorageLive(_13);
           StorageLive(_14);
+-         _14 = const <() as std::mem::SizedTypeProperties>::SIZE;
++         _14 = const 0_usize;
           StorageLive(_15);
+-         _15 = const <() as std::mem::SizedTypeProperties>::ALIGN;
++         _15 = const 1_usize;
           StorageLive(_16);
--         _16 = const <() as std::mem::SizedTypeProperties>::SIZE;
-+         _16 = const 0_usize;
-          StorageLive(_17);
--         _17 = const <() as std::mem::SizedTypeProperties>::ALIGN;
-+         _17 = const 1_usize;
           StorageLive(_18);
+          StorageLive(_19);
           StorageLive(_20);
           StorageLive(_21);
-          StorageLive(_22);
-          StorageLive(_23);
           switchInt(UbChecks) -> [0: bb6, otherwise: bb5];
       }
   
@@ -109,35 +107,31 @@
       }
   
       bb3: {
--         _22 = handle_alloc_error(move _18) -> unwind unreachable;
-+         _22 = handle_alloc_error(const Layout {{ size: 0_usize, align: std::ptr::Alignment {{ _inner_repr_trick: std::ptr::alignment::AlignmentEnum::_Align1Shl0 }} }}) -> unwind unreachable;
+-         _20 = handle_alloc_error(move _16) -> unwind unreachable;
++         _20 = handle_alloc_error(const Layout {{ size: 0_usize, align: std::ptr::Alignment {{ _inner_repr_trick: std::ptr::alignment::AlignmentEnum::_Align1Shl0 }} }}) -> unwind unreachable;
       }
   
       bb4: {
-          _21 = copy ((_19 as Ok).0: std::ptr::NonNull<[u8]>);
--         StorageLive(_25);
+          _19 = copy ((_17 as Ok).0: std::ptr::NonNull<[u8]>);
+-         StorageLive(_23);
 +         nop;
-          _25 = copy _21 as *mut [u8] (Transmute);
-          _12 = copy _25 as *mut u8 (PtrToPtr);
--         StorageDead(_25);
+          _23 = copy _19 as *mut [u8] (Transmute);
+          _13 = copy _23 as *mut u8 (PtrToPtr);
+-         StorageDead(_23);
 +         nop;
-          StorageDead(_19);
-          StorageDead(_23);
-          StorageDead(_22);
+          StorageDead(_17);
           StorageDead(_21);
           StorageDead(_20);
+          StorageDead(_19);
           StorageDead(_18);
-          StorageDead(_17);
           StorageDead(_16);
--         _13 = copy _12 as *const () (PtrToPtr);
-+         _13 = copy _25 as *const () (PtrToPtr);
-          _14 = NonNull::<()> { pointer: copy _13 };
-          _15 = std::ptr::Unique::<()> { pointer: copy _14, _marker: const PhantomData::<()> };
-          _3 = Box::<()>(move _15, const std::alloc::Global);
--         (*_13) = move _4;
-+         (*_13) = const ();
           StorageDead(_15);
           StorageDead(_14);
+-         _12 = copy _13 as *mut () (PtrToPtr);
+-         (*_12) = move _4;
++         _12 = copy _23 as *mut () (PtrToPtr);
++         (*_12) = const ();
+          _3 = copy _13 as std::boxed::Box<()> (Transmute);
           StorageDead(_13);
           StorageDead(_12);
           StorageDead(_4);
@@ -153,21 +147,21 @@
 +         nop;
           StorageLive(_7);
           _7 = copy _5;
-          StorageLive(_26);
-          _26 = const 1_usize;
--         _6 = *const [()] from (copy _7, copy _26);
+          StorageLive(_24);
+          _24 = const 1_usize;
+-         _6 = *const [()] from (copy _7, copy _24);
 +         _6 = *const [()] from (copy _5, const 1_usize);
-          StorageDead(_26);
+          StorageDead(_24);
           StorageDead(_7);
           StorageLive(_8);
           StorageLive(_9);
           _9 = copy _6;
-          StorageLive(_27);
--         _27 = copy _9;
+          StorageLive(_25);
+-         _25 = copy _9;
 -         _8 = copy _9 as *mut () (PtrToPtr);
-+         _27 = copy _6;
++         _25 = copy _6;
 +         _8 = copy _5 as *mut () (PtrToPtr);
-          StorageDead(_27);
+          StorageDead(_25);
           StorageDead(_9);
           _0 = const ();
           StorageDead(_8);
@@ -179,25 +173,25 @@
       }
   
       bb5: {
--         _23 = Layout::from_size_align_unchecked::precondition_check(copy _16, copy _17) -> [return: bb6, unwind unreachable];
-+         _23 = Layout::from_size_align_unchecked::precondition_check(const 0_usize, const 1_usize) -> [return: bb6, unwind unreachable];
+-         _21 = Layout::from_size_align_unchecked::precondition_check(copy _14, copy _15) -> [return: bb6, unwind unreachable];
++         _21 = Layout::from_size_align_unchecked::precondition_check(const 0_usize, const 1_usize) -> [return: bb6, unwind unreachable];
       }
   
       bb6: {
-          StorageLive(_24);
--         _24 = copy _17 as std::ptr::Alignment (Transmute);
--         _18 = Layout { size: copy _16, align: move _24 };
-+         _24 = const std::ptr::Alignment {{ _inner_repr_trick: std::ptr::alignment::AlignmentEnum::_Align1Shl0 }};
-+         _18 = const Layout {{ size: 0_usize, align: std::ptr::Alignment {{ _inner_repr_trick: std::ptr::alignment::AlignmentEnum::_Align1Shl0 }} }};
-          StorageDead(_24);
-          StorageLive(_19);
--         _19 = std::alloc::Global::alloc_impl_runtime(copy _18, const false) -> [return: bb7, unwind unreachable];
-+         _19 = std::alloc::Global::alloc_impl_runtime(const Layout {{ size: 0_usize, align: std::ptr::Alignment {{ _inner_repr_trick: std::ptr::alignment::AlignmentEnum::_Align1Shl0 }} }}, const false) -> [return: bb7, unwind unreachable];
+          StorageLive(_22);
+-         _22 = copy _15 as std::ptr::Alignment (Transmute);
+-         _16 = Layout { size: copy _14, align: move _22 };
++         _22 = const std::ptr::Alignment {{ _inner_repr_trick: std::ptr::alignment::AlignmentEnum::_Align1Shl0 }};
++         _16 = const Layout {{ size: 0_usize, align: std::ptr::Alignment {{ _inner_repr_trick: std::ptr::alignment::AlignmentEnum::_Align1Shl0 }} }};
+          StorageDead(_22);
+          StorageLive(_17);
+-         _17 = std::alloc::Global::alloc_impl_runtime(copy _16, const false) -> [return: bb7, unwind unreachable];
++         _17 = std::alloc::Global::alloc_impl_runtime(const Layout {{ size: 0_usize, align: std::ptr::Alignment {{ _inner_repr_trick: std::ptr::alignment::AlignmentEnum::_Align1Shl0 }} }}, const false) -> [return: bb7, unwind unreachable];
       }
   
       bb7: {
-          _20 = discriminant(_19);
-          switchInt(move _20) -> [0: bb4, 1: bb3, otherwise: bb2];
+          _18 = discriminant(_17);
+          switchInt(move _18) -> [0: bb4, 1: bb3, otherwise: bb2];
       }
 + }
 + 
diff --git a/tests/mir-opt/dont_reset_cast_kind_without_updating_operand.test.GVN.64bit.panic-abort.diff b/tests/mir-opt/dont_reset_cast_kind_without_updating_operand.test.GVN.64bit.panic-abort.diff
index f8d781bb706f..d5134f734782 100644
--- a/tests/mir-opt/dont_reset_cast_kind_without_updating_operand.test.GVN.64bit.panic-abort.diff
+++ b/tests/mir-opt/dont_reset_cast_kind_without_updating_operand.test.GVN.64bit.panic-abort.diff
@@ -11,9 +11,9 @@
       let mut _9: *const [()];
       let mut _10: std::boxed::Box<()>;
       let mut _11: *const ();
-      let mut _16: usize;
-      let mut _17: usize;
-      let mut _26: usize;
+      let mut _14: usize;
+      let mut _15: usize;
+      let mut _24: usize;
       scope 1 {
           debug vp_ctx => _1;
           let _5: *const ();
@@ -26,49 +26,49 @@
                   scope 4 {
                       debug _x => _8;
                   }
-                  scope 19 (inlined foo) {
-                      let mut _27: *const [()];
+                  scope 20 (inlined foo) {
+                      let mut _25: *const [()];
                   }
               }
-              scope 17 (inlined slice_from_raw_parts::<()>) {
-                  scope 18 (inlined std::ptr::from_raw_parts::<[()], ()>) {
+              scope 18 (inlined slice_from_raw_parts::<()>) {
+                  scope 19 (inlined std::ptr::from_raw_parts::<[()], ()>) {
                   }
               }
           }
       }
       scope 5 (inlined Box::<()>::new) {
-          let mut _12: *mut u8;
-          let mut _13: *const ();
-          let mut _14: std::ptr::NonNull<()>;
-          let mut _15: std::ptr::Unique<()>;
-          scope 6 (inlined alloc::alloc::exchange_malloc) {
-              let _18: std::alloc::Layout;
-              let mut _19: std::result::Result, std::alloc::AllocError>;
-              let mut _20: isize;
-              let mut _22: !;
-              scope 7 {
-                  let _21: std::ptr::NonNull<[u8]>;
-                  scope 8 {
-                      scope 12 (inlined NonNull::<[u8]>::as_mut_ptr) {
-                          scope 13 (inlined NonNull::<[u8]>::as_non_null_ptr) {
-                              scope 14 (inlined NonNull::<[u8]>::cast::) {
-                                  let mut _25: *mut [u8];
-                                  scope 15 (inlined NonNull::<[u8]>::as_ptr) {
+          let mut _12: *mut ();
+          let mut _13: *mut u8;
+          scope 6 {
+          }
+          scope 7 (inlined boxed::box_new_uninit) {
+              let _16: std::alloc::Layout;
+              let mut _17: std::result::Result, std::alloc::AllocError>;
+              let mut _18: isize;
+              let mut _20: !;
+              scope 8 {
+                  let _19: std::ptr::NonNull<[u8]>;
+                  scope 9 {
+                      scope 13 (inlined NonNull::<[u8]>::as_mut_ptr) {
+                          scope 14 (inlined NonNull::<[u8]>::as_non_null_ptr) {
+                              scope 15 (inlined NonNull::<[u8]>::cast::) {
+                                  let mut _23: *mut [u8];
+                                  scope 16 (inlined NonNull::<[u8]>::as_ptr) {
                                   }
                               }
                           }
-                          scope 16 (inlined NonNull::::as_ptr) {
+                          scope 17 (inlined NonNull::::as_ptr) {
                           }
                       }
                   }
-                  scope 10 (inlined ::allocate) {
-                      scope 11 (inlined std::alloc::Global::alloc_impl) {
+                  scope 11 (inlined ::allocate) {
+                      scope 12 (inlined std::alloc::Global::alloc_impl) {
                       }
                   }
               }
-              scope 9 (inlined #[track_caller] Layout::from_size_align_unchecked) {
-                  let _23: ();
-                  let mut _24: std::ptr::Alignment;
+              scope 10 (inlined #[track_caller] Layout::from_size_align_unchecked) {
+                  let _21: ();
+                  let mut _22: std::ptr::Alignment;
               }
           }
       }
@@ -83,18 +83,16 @@
           StorageLive(_12);
           StorageLive(_13);
           StorageLive(_14);
+-         _14 = const <() as std::mem::SizedTypeProperties>::SIZE;
++         _14 = const 0_usize;
           StorageLive(_15);
+-         _15 = const <() as std::mem::SizedTypeProperties>::ALIGN;
++         _15 = const 1_usize;
           StorageLive(_16);
--         _16 = const <() as std::mem::SizedTypeProperties>::SIZE;
-+         _16 = const 0_usize;
-          StorageLive(_17);
--         _17 = const <() as std::mem::SizedTypeProperties>::ALIGN;
-+         _17 = const 1_usize;
           StorageLive(_18);
+          StorageLive(_19);
           StorageLive(_20);
           StorageLive(_21);
-          StorageLive(_22);
-          StorageLive(_23);
           switchInt(UbChecks) -> [0: bb6, otherwise: bb5];
       }
   
@@ -109,35 +107,31 @@
       }
   
       bb3: {
--         _22 = handle_alloc_error(move _18) -> unwind unreachable;
-+         _22 = handle_alloc_error(const Layout {{ size: 0_usize, align: std::ptr::Alignment {{ _inner_repr_trick: std::ptr::alignment::AlignmentEnum::_Align1Shl0 }} }}) -> unwind unreachable;
+-         _20 = handle_alloc_error(move _16) -> unwind unreachable;
++         _20 = handle_alloc_error(const Layout {{ size: 0_usize, align: std::ptr::Alignment {{ _inner_repr_trick: std::ptr::alignment::AlignmentEnum::_Align1Shl0 }} }}) -> unwind unreachable;
       }
   
       bb4: {
-          _21 = copy ((_19 as Ok).0: std::ptr::NonNull<[u8]>);
--         StorageLive(_25);
+          _19 = copy ((_17 as Ok).0: std::ptr::NonNull<[u8]>);
+-         StorageLive(_23);
 +         nop;
-          _25 = copy _21 as *mut [u8] (Transmute);
-          _12 = copy _25 as *mut u8 (PtrToPtr);
--         StorageDead(_25);
+          _23 = copy _19 as *mut [u8] (Transmute);
+          _13 = copy _23 as *mut u8 (PtrToPtr);
+-         StorageDead(_23);
 +         nop;
-          StorageDead(_19);
-          StorageDead(_23);
-          StorageDead(_22);
+          StorageDead(_17);
           StorageDead(_21);
           StorageDead(_20);
+          StorageDead(_19);
           StorageDead(_18);
-          StorageDead(_17);
           StorageDead(_16);
--         _13 = copy _12 as *const () (PtrToPtr);
-+         _13 = copy _25 as *const () (PtrToPtr);
-          _14 = NonNull::<()> { pointer: copy _13 };
-          _15 = std::ptr::Unique::<()> { pointer: copy _14, _marker: const PhantomData::<()> };
-          _3 = Box::<()>(move _15, const std::alloc::Global);
--         (*_13) = move _4;
-+         (*_13) = const ();
           StorageDead(_15);
           StorageDead(_14);
+-         _12 = copy _13 as *mut () (PtrToPtr);
+-         (*_12) = move _4;
++         _12 = copy _23 as *mut () (PtrToPtr);
++         (*_12) = const ();
+          _3 = copy _13 as std::boxed::Box<()> (Transmute);
           StorageDead(_13);
           StorageDead(_12);
           StorageDead(_4);
@@ -153,21 +147,21 @@
 +         nop;
           StorageLive(_7);
           _7 = copy _5;
-          StorageLive(_26);
-          _26 = const 1_usize;
--         _6 = *const [()] from (copy _7, copy _26);
+          StorageLive(_24);
+          _24 = const 1_usize;
+-         _6 = *const [()] from (copy _7, copy _24);
 +         _6 = *const [()] from (copy _5, const 1_usize);
-          StorageDead(_26);
+          StorageDead(_24);
           StorageDead(_7);
           StorageLive(_8);
           StorageLive(_9);
           _9 = copy _6;
-          StorageLive(_27);
--         _27 = copy _9;
+          StorageLive(_25);
+-         _25 = copy _9;
 -         _8 = copy _9 as *mut () (PtrToPtr);
-+         _27 = copy _6;
++         _25 = copy _6;
 +         _8 = copy _5 as *mut () (PtrToPtr);
-          StorageDead(_27);
+          StorageDead(_25);
           StorageDead(_9);
           _0 = const ();
           StorageDead(_8);
@@ -179,25 +173,25 @@
       }
   
       bb5: {
--         _23 = Layout::from_size_align_unchecked::precondition_check(copy _16, copy _17) -> [return: bb6, unwind unreachable];
-+         _23 = Layout::from_size_align_unchecked::precondition_check(const 0_usize, const 1_usize) -> [return: bb6, unwind unreachable];
+-         _21 = Layout::from_size_align_unchecked::precondition_check(copy _14, copy _15) -> [return: bb6, unwind unreachable];
++         _21 = Layout::from_size_align_unchecked::precondition_check(const 0_usize, const 1_usize) -> [return: bb6, unwind unreachable];
       }
   
       bb6: {
-          StorageLive(_24);
--         _24 = copy _17 as std::ptr::Alignment (Transmute);
--         _18 = Layout { size: copy _16, align: move _24 };
-+         _24 = const std::ptr::Alignment {{ _inner_repr_trick: std::ptr::alignment::AlignmentEnum::_Align1Shl0 }};
-+         _18 = const Layout {{ size: 0_usize, align: std::ptr::Alignment {{ _inner_repr_trick: std::ptr::alignment::AlignmentEnum::_Align1Shl0 }} }};
-          StorageDead(_24);
-          StorageLive(_19);
--         _19 = std::alloc::Global::alloc_impl_runtime(copy _18, const false) -> [return: bb7, unwind unreachable];
-+         _19 = std::alloc::Global::alloc_impl_runtime(const Layout {{ size: 0_usize, align: std::ptr::Alignment {{ _inner_repr_trick: std::ptr::alignment::AlignmentEnum::_Align1Shl0 }} }}, const false) -> [return: bb7, unwind unreachable];
+          StorageLive(_22);
+-         _22 = copy _15 as std::ptr::Alignment (Transmute);
+-         _16 = Layout { size: copy _14, align: move _22 };
++         _22 = const std::ptr::Alignment {{ _inner_repr_trick: std::ptr::alignment::AlignmentEnum::_Align1Shl0 }};
++         _16 = const Layout {{ size: 0_usize, align: std::ptr::Alignment {{ _inner_repr_trick: std::ptr::alignment::AlignmentEnum::_Align1Shl0 }} }};
+          StorageDead(_22);
+          StorageLive(_17);
+-         _17 = std::alloc::Global::alloc_impl_runtime(copy _16, const false) -> [return: bb7, unwind unreachable];
++         _17 = std::alloc::Global::alloc_impl_runtime(const Layout {{ size: 0_usize, align: std::ptr::Alignment {{ _inner_repr_trick: std::ptr::alignment::AlignmentEnum::_Align1Shl0 }} }}, const false) -> [return: bb7, unwind unreachable];
       }
   
       bb7: {
-          _20 = discriminant(_19);
-          switchInt(move _20) -> [0: bb4, 1: bb3, otherwise: bb2];
+          _18 = discriminant(_17);
+          switchInt(move _18) -> [0: bb4, 1: bb3, otherwise: bb2];
       }
 + }
 + 
diff --git a/tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-abort.diff b/tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-abort.diff
index 9f4d085e19d1..440675826dd5 100644
--- a/tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-abort.diff
+++ b/tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-abort.diff
@@ -202,7 +202,7 @@
 +         StorageLive(_42);
 +         _42 = Option::<()>::None;
 +         _35 = copy ((*_37).0: std::option::Option<()>);
-+         ((*_37).0: std::option::Option<()>) = copy _42;
++         ((*_37).0: std::option::Option<()>) = move _42;
 +         StorageDead(_42);
 +         StorageLive(_43);
 +         _43 = discriminant(_35);
diff --git a/tests/mir-opt/issue_62289.rs b/tests/mir-opt/issue_62289.rs
index d020c2cedca0..6db2ec2a3719 100644
--- a/tests/mir-opt/issue_62289.rs
+++ b/tests/mir-opt/issue_62289.rs
@@ -5,9 +5,9 @@
 
 #![feature(rustc_attrs, liballoc_internals)]
 
-// EMIT_MIR issue_62289.test.ElaborateDrops.before.mir
-fn test() -> Option> {
-    Some(std::boxed::box_new(None?))
+// EMIT_MIR issue_62289.test.ElaborateDrops.after.mir
+fn test() -> Option> {
+    Some(vec![None?])
 }
 
 fn main() {
diff --git a/tests/mir-opt/issue_62289.test.ElaborateDrops.after.panic-abort.mir b/tests/mir-opt/issue_62289.test.ElaborateDrops.after.panic-abort.mir
new file mode 100644
index 000000000000..968334753db4
--- /dev/null
+++ b/tests/mir-opt/issue_62289.test.ElaborateDrops.after.panic-abort.mir
@@ -0,0 +1,119 @@
+// MIR for `test` after ElaborateDrops
+
+fn test() -> Option> {
+    let mut _0: std::option::Option>;
+    let mut _1: std::vec::Vec;
+    let mut _2: std::boxed::Box>;
+    let mut _3: std::boxed::Box>;
+    let mut _4: u32;
+    let mut _5: std::ops::ControlFlow, u32>;
+    let mut _6: std::option::Option;
+    let mut _7: isize;
+    let _8: std::option::Option;
+    let mut _9: !;
+    let mut _10: std::option::Option;
+    let _11: u32;
+    scope 1 {
+        debug residual => _8;
+        scope 2 {
+        }
+    }
+    scope 3 {
+        debug val => _11;
+        scope 4 {
+        }
+    }
+
+    bb0: {
+        StorageLive(_1);
+        StorageLive(_2);
+        StorageLive(_3);
+        _3 = Box::<[u32; 1]>::new_uninit() -> [return: bb1, unwind: bb14];
+    }
+
+    bb1: {
+        StorageLive(_4);
+        StorageLive(_5);
+        StorageLive(_6);
+        _6 = Option::::None;
+        _5 =  as Try>::branch(move _6) -> [return: bb2, unwind: bb13];
+    }
+
+    bb2: {
+        StorageDead(_6);
+        PlaceMention(_5);
+        _7 = discriminant(_5);
+        switchInt(move _7) -> [0: bb4, 1: bb5, otherwise: bb3];
+    }
+
+    bb3: {
+        unreachable;
+    }
+
+    bb4: {
+        StorageLive(_11);
+        _11 = copy ((_5 as Continue).0: u32);
+        _4 = copy _11;
+        StorageDead(_11);
+        ((((*_3).1: std::mem::ManuallyDrop<[u32; 1]>).0: std::mem::MaybeDangling<[u32; 1]>).0: [u32; 1]) = [move _4];
+        StorageDead(_4);
+        _2 = move _3;
+        goto -> bb7;
+    }
+
+    bb5: {
+        StorageLive(_8);
+        _8 = copy ((_5 as Break).0: std::option::Option);
+        StorageLive(_10);
+        _10 = copy _8;
+        _0 = > as FromResidual>>::from_residual(move _10) -> [return: bb6, unwind: bb13];
+    }
+
+    bb6: {
+        StorageDead(_10);
+        StorageDead(_8);
+        StorageDead(_4);
+        drop(_3) -> [return: bb10, unwind: bb14];
+    }
+
+    bb7: {
+        StorageDead(_3);
+        _1 = std::boxed::box_assume_init_into_vec_unsafe::(move _2) -> [return: bb8, unwind: bb12];
+    }
+
+    bb8: {
+        StorageDead(_2);
+        _0 = Option::>::Some(move _1);
+        goto -> bb9;
+    }
+
+    bb9: {
+        StorageDead(_1);
+        StorageDead(_5);
+        goto -> bb11;
+    }
+
+    bb10: {
+        StorageDead(_3);
+        StorageDead(_2);
+        StorageDead(_1);
+        StorageDead(_5);
+        goto -> bb11;
+    }
+
+    bb11: {
+        return;
+    }
+
+    bb12 (cleanup): {
+        goto -> bb14;
+    }
+
+    bb13 (cleanup): {
+        drop(_3) -> [return: bb14, unwind terminate(cleanup)];
+    }
+
+    bb14 (cleanup): {
+        resume;
+    }
+}
diff --git a/tests/mir-opt/issue_62289.test.ElaborateDrops.after.panic-unwind.mir b/tests/mir-opt/issue_62289.test.ElaborateDrops.after.panic-unwind.mir
new file mode 100644
index 000000000000..1fc75018c862
--- /dev/null
+++ b/tests/mir-opt/issue_62289.test.ElaborateDrops.after.panic-unwind.mir
@@ -0,0 +1,119 @@
+// MIR for `test` after ElaborateDrops
+
+fn test() -> Option> {
+    let mut _0: std::option::Option>;
+    let mut _1: std::vec::Vec;
+    let mut _2: std::boxed::Box>;
+    let mut _3: std::boxed::Box>;
+    let mut _4: u32;
+    let mut _5: std::ops::ControlFlow, u32>;
+    let mut _6: std::option::Option;
+    let mut _7: isize;
+    let _8: std::option::Option;
+    let mut _9: !;
+    let mut _10: std::option::Option;
+    let _11: u32;
+    scope 1 {
+        debug residual => _8;
+        scope 2 {
+        }
+    }
+    scope 3 {
+        debug val => _11;
+        scope 4 {
+        }
+    }
+
+    bb0: {
+        StorageLive(_1);
+        StorageLive(_2);
+        StorageLive(_3);
+        _3 = Box::<[u32; 1]>::new_uninit() -> [return: bb1, unwind continue];
+    }
+
+    bb1: {
+        StorageLive(_4);
+        StorageLive(_5);
+        StorageLive(_6);
+        _6 = Option::::None;
+        _5 =  as Try>::branch(move _6) -> [return: bb2, unwind: bb13];
+    }
+
+    bb2: {
+        StorageDead(_6);
+        PlaceMention(_5);
+        _7 = discriminant(_5);
+        switchInt(move _7) -> [0: bb4, 1: bb5, otherwise: bb3];
+    }
+
+    bb3: {
+        unreachable;
+    }
+
+    bb4: {
+        StorageLive(_11);
+        _11 = copy ((_5 as Continue).0: u32);
+        _4 = copy _11;
+        StorageDead(_11);
+        ((((*_3).1: std::mem::ManuallyDrop<[u32; 1]>).0: std::mem::MaybeDangling<[u32; 1]>).0: [u32; 1]) = [move _4];
+        StorageDead(_4);
+        _2 = move _3;
+        goto -> bb7;
+    }
+
+    bb5: {
+        StorageLive(_8);
+        _8 = copy ((_5 as Break).0: std::option::Option);
+        StorageLive(_10);
+        _10 = copy _8;
+        _0 = > as FromResidual>>::from_residual(move _10) -> [return: bb6, unwind: bb13];
+    }
+
+    bb6: {
+        StorageDead(_10);
+        StorageDead(_8);
+        StorageDead(_4);
+        drop(_3) -> [return: bb10, unwind: bb14];
+    }
+
+    bb7: {
+        StorageDead(_3);
+        _1 = std::boxed::box_assume_init_into_vec_unsafe::(move _2) -> [return: bb8, unwind: bb12];
+    }
+
+    bb8: {
+        StorageDead(_2);
+        _0 = Option::>::Some(move _1);
+        goto -> bb9;
+    }
+
+    bb9: {
+        StorageDead(_1);
+        StorageDead(_5);
+        goto -> bb11;
+    }
+
+    bb10: {
+        StorageDead(_3);
+        StorageDead(_2);
+        StorageDead(_1);
+        StorageDead(_5);
+        goto -> bb11;
+    }
+
+    bb11: {
+        return;
+    }
+
+    bb12 (cleanup): {
+        goto -> bb14;
+    }
+
+    bb13 (cleanup): {
+        drop(_3) -> [return: bb14, unwind terminate(cleanup)];
+    }
+
+    bb14 (cleanup): {
+        resume;
+    }
+}
diff --git a/tests/mir-opt/issue_62289.test.ElaborateDrops.before.panic-abort.mir b/tests/mir-opt/issue_62289.test.ElaborateDrops.before.panic-abort.mir
deleted file mode 100644
index c46549c5742f..000000000000
--- a/tests/mir-opt/issue_62289.test.ElaborateDrops.before.panic-abort.mir
+++ /dev/null
@@ -1,108 +0,0 @@
-// MIR for `test` before ElaborateDrops
-
-fn test() -> Option> {
-    let mut _0: std::option::Option>;
-    let mut _1: std::boxed::Box;
-    let mut _2: *mut u8;
-    let mut _3: std::boxed::Box;
-    let mut _4: std::ops::ControlFlow, u32>;
-    let mut _5: std::option::Option;
-    let mut _6: isize;
-    let _7: std::option::Option;
-    let mut _8: !;
-    let mut _9: std::option::Option;
-    let _10: u32;
-    scope 1 {
-        debug residual => _7;
-        scope 2 {
-        }
-    }
-    scope 3 {
-        debug val => _10;
-        scope 4 {
-        }
-    }
-
-    bb0: {
-        StorageLive(_1);
-        _2 = alloc::alloc::exchange_malloc(const ::SIZE, const ::ALIGN) -> [return: bb1, unwind: bb13];
-    }
-
-    bb1: {
-        StorageLive(_3);
-        _3 = ShallowInitBox(move _2, u32);
-        StorageLive(_4);
-        StorageLive(_5);
-        _5 = Option::::None;
-        _4 =  as Try>::branch(move _5) -> [return: bb2, unwind: bb12];
-    }
-
-    bb2: {
-        StorageDead(_5);
-        PlaceMention(_4);
-        _6 = discriminant(_4);
-        switchInt(move _6) -> [0: bb4, 1: bb5, otherwise: bb3];
-    }
-
-    bb3: {
-        unreachable;
-    }
-
-    bb4: {
-        StorageLive(_10);
-        _10 = copy ((_4 as Continue).0: u32);
-        (*_3) = copy _10;
-        StorageDead(_10);
-        _1 = move _3;
-        drop(_3) -> [return: bb7, unwind: bb11];
-    }
-
-    bb5: {
-        StorageLive(_7);
-        _7 = copy ((_4 as Break).0: std::option::Option);
-        StorageLive(_9);
-        _9 = copy _7;
-        _0 = > as FromResidual>>::from_residual(move _9) -> [return: bb6, unwind: bb12];
-    }
-
-    bb6: {
-        StorageDead(_9);
-        StorageDead(_7);
-        drop(_3) -> [return: bb9, unwind: bb13];
-    }
-
-    bb7: {
-        StorageDead(_3);
-        _0 = Option::>::Some(move _1);
-        drop(_1) -> [return: bb8, unwind: bb13];
-    }
-
-    bb8: {
-        StorageDead(_1);
-        StorageDead(_4);
-        goto -> bb10;
-    }
-
-    bb9: {
-        StorageDead(_3);
-        StorageDead(_1);
-        StorageDead(_4);
-        goto -> bb10;
-    }
-
-    bb10: {
-        return;
-    }
-
-    bb11 (cleanup): {
-        drop(_1) -> [return: bb13, unwind terminate(cleanup)];
-    }
-
-    bb12 (cleanup): {
-        drop(_3) -> [return: bb13, unwind terminate(cleanup)];
-    }
-
-    bb13 (cleanup): {
-        resume;
-    }
-}
diff --git a/tests/mir-opt/issue_62289.test.ElaborateDrops.before.panic-unwind.mir b/tests/mir-opt/issue_62289.test.ElaborateDrops.before.panic-unwind.mir
deleted file mode 100644
index 9f26debdbb6d..000000000000
--- a/tests/mir-opt/issue_62289.test.ElaborateDrops.before.panic-unwind.mir
+++ /dev/null
@@ -1,108 +0,0 @@
-// MIR for `test` before ElaborateDrops
-
-fn test() -> Option> {
-    let mut _0: std::option::Option>;
-    let mut _1: std::boxed::Box;
-    let mut _2: *mut u8;
-    let mut _3: std::boxed::Box;
-    let mut _4: std::ops::ControlFlow, u32>;
-    let mut _5: std::option::Option;
-    let mut _6: isize;
-    let _7: std::option::Option;
-    let mut _8: !;
-    let mut _9: std::option::Option;
-    let _10: u32;
-    scope 1 {
-        debug residual => _7;
-        scope 2 {
-        }
-    }
-    scope 3 {
-        debug val => _10;
-        scope 4 {
-        }
-    }
-
-    bb0: {
-        StorageLive(_1);
-        _2 = alloc::alloc::exchange_malloc(const ::SIZE, const ::ALIGN) -> [return: bb1, unwind continue];
-    }
-
-    bb1: {
-        StorageLive(_3);
-        _3 = ShallowInitBox(move _2, u32);
-        StorageLive(_4);
-        StorageLive(_5);
-        _5 = Option::::None;
-        _4 =  as Try>::branch(move _5) -> [return: bb2, unwind: bb12];
-    }
-
-    bb2: {
-        StorageDead(_5);
-        PlaceMention(_4);
-        _6 = discriminant(_4);
-        switchInt(move _6) -> [0: bb4, 1: bb5, otherwise: bb3];
-    }
-
-    bb3: {
-        unreachable;
-    }
-
-    bb4: {
-        StorageLive(_10);
-        _10 = copy ((_4 as Continue).0: u32);
-        (*_3) = copy _10;
-        StorageDead(_10);
-        _1 = move _3;
-        drop(_3) -> [return: bb7, unwind: bb11];
-    }
-
-    bb5: {
-        StorageLive(_7);
-        _7 = copy ((_4 as Break).0: std::option::Option);
-        StorageLive(_9);
-        _9 = copy _7;
-        _0 = > as FromResidual>>::from_residual(move _9) -> [return: bb6, unwind: bb12];
-    }
-
-    bb6: {
-        StorageDead(_9);
-        StorageDead(_7);
-        drop(_3) -> [return: bb9, unwind continue];
-    }
-
-    bb7: {
-        StorageDead(_3);
-        _0 = Option::>::Some(move _1);
-        drop(_1) -> [return: bb8, unwind continue];
-    }
-
-    bb8: {
-        StorageDead(_1);
-        StorageDead(_4);
-        goto -> bb10;
-    }
-
-    bb9: {
-        StorageDead(_3);
-        StorageDead(_1);
-        StorageDead(_4);
-        goto -> bb10;
-    }
-
-    bb10: {
-        return;
-    }
-
-    bb11 (cleanup): {
-        drop(_1) -> [return: bb13, unwind terminate(cleanup)];
-    }
-
-    bb12 (cleanup): {
-        drop(_3) -> [return: bb13, unwind terminate(cleanup)];
-    }
-
-    bb13 (cleanup): {
-        resume;
-    }
-}
diff --git a/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-abort.mir
index f72611b7cb8e..f8898d65133a 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-abort.mir
@@ -5,33 +5,36 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
     debug f => _2;
     let mut _0: ();
     let mut _10: usize;
-    let mut _28: std::option::Option<(usize, &T)>;
-    let mut _31: &impl Fn(usize, &T);
-    let mut _32: (usize, &T);
-    let _33: ();
+    let mut _31: std::option::Option<(usize, &T)>;
+    let mut _34: &impl Fn(usize, &T);
+    let mut _35: (usize, &T);
+    let _36: ();
     scope 1 {
         debug (((iter: Enumerate>).0: std::slice::Iter<'_, T>).0: std::ptr::NonNull) => _6;
         debug (((iter: Enumerate>).0: std::slice::Iter<'_, T>).1: *const T) => _9;
         debug (((iter: Enumerate>).0: std::slice::Iter<'_, T>).2: std::marker::PhantomData<&T>) => const ZeroSized: PhantomData<&T>;
         debug ((iter: Enumerate>).1: usize) => _10;
-        let _29: usize;
-        let _30: &T;
+        let _32: usize;
+        let _33: &T;
         scope 2 {
-            debug i => _29;
-            debug x => _30;
+            debug i => _32;
+            debug x => _33;
         }
         scope 18 (inlined > as Iterator>::next) {
-            let mut _23: std::option::Option<&T>;
-            let mut _26: (usize, bool);
-            let mut _27: (usize, &T);
+            let mut _21: std::option::Option;
+            let mut _26: std::option::Option<&T>;
+            let mut _29: (usize, bool);
+            let mut _30: (usize, &T);
             scope 19 {
-                let _25: usize;
+                let _28: usize;
                 scope 24 {
                 }
             }
             scope 20 {
                 scope 21 {
                     scope 27 (inlined  as FromResidual>>::from_residual) {
+                        let mut _20: isize;
+                        let mut _22: bool;
                     }
                 }
             }
@@ -40,7 +43,7 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
                 }
             }
             scope 25 (inlined  as Try>::branch) {
-                let _24: &T;
+                let _27: &T;
                 scope 26 {
                 }
             }
@@ -49,8 +52,8 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
                 let _11: std::ptr::NonNull;
                 let _13: std::ptr::NonNull;
                 let mut _16: bool;
-                let mut _20: usize;
-                let _22: &T;
+                let mut _23: usize;
+                let _25: &T;
                 scope 29 {
                     let _12: *const T;
                     scope 30 {
@@ -84,7 +87,7 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
                             }
                         }
                         scope 43 (inlined NonNull::::as_ref::<'_>) {
-                            let _21: *const T;
+                            let _24: *const T;
                             scope 44 (inlined NonNull::::as_ptr) {
                             }
                             scope 45 (inlined std::ptr::mut_ptr::::cast_const) {
@@ -169,16 +172,16 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
     }
 
     bb4: {
+        StorageLive(_31);
         StorageLive(_28);
-        StorageLive(_25);
+        StorageLive(_29);
         StorageLive(_26);
-        StorageLive(_23);
         StorageLive(_11);
         StorageLive(_12);
         StorageLive(_19);
-        StorageLive(_20);
+        StorageLive(_23);
         StorageLive(_13);
-        StorageLive(_22);
+        StorageLive(_25);
         _11 = copy _6;
         _12 = copy _9;
         switchInt(const ::IS_ZST) -> [0: bb5, otherwise: bb8];
@@ -224,16 +227,23 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
     }
 
     bb10: {
-        StorageDead(_22);
+        StorageDead(_25);
         StorageDead(_13);
-        StorageDead(_20);
+        StorageDead(_23);
         StorageDead(_19);
         StorageDead(_12);
         StorageDead(_11);
-        StorageDead(_23);
         StorageDead(_26);
-        StorageDead(_25);
+        StorageLive(_20);
+        StorageLive(_22);
+        _20 = discriminant(_21);
+        _22 = Eq(copy _20, const 0_isize);
+        assume(move _22);
+        StorageDead(_22);
+        StorageDead(_20);
+        StorageDead(_29);
         StorageDead(_28);
+        StorageDead(_31);
         StorageDead(_10);
         drop(_2) -> [return: bb11, unwind unreachable];
     }
@@ -243,51 +253,51 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
     }
 
     bb12: {
-        _20 = SubUnchecked(copy _19, const 1_usize);
-        _9 = copy _20 as *const T (Transmute);
+        _23 = SubUnchecked(copy _19, const 1_usize);
+        _9 = copy _23 as *const T (Transmute);
         goto -> bb13;
     }
 
     bb13: {
-        StorageLive(_21);
-        _21 = copy _11 as *const T (Transmute);
-        _22 = &(*_21);
-        StorageDead(_21);
-        _23 = Option::<&T>::Some(copy _22);
-        StorageDead(_22);
+        StorageLive(_24);
+        _24 = copy _11 as *const T (Transmute);
+        _25 = &(*_24);
+        StorageDead(_24);
+        _26 = Option::<&T>::Some(copy _25);
+        StorageDead(_25);
         StorageDead(_13);
-        StorageDead(_20);
+        StorageDead(_23);
         StorageDead(_19);
         StorageDead(_12);
         StorageDead(_11);
-        _24 = copy ((_23 as Some).0: &T);
-        StorageDead(_23);
-        _25 = copy _10;
-        _26 = AddWithOverflow(copy _10, const 1_usize);
-        assert(!move (_26.1: bool), "attempt to compute `{} + {}`, which would overflow", copy _10, const 1_usize) -> [success: bb14, unwind unreachable];
+        _27 = copy ((_26 as Some).0: &T);
+        StorageDead(_26);
+        _28 = copy _10;
+        _29 = AddWithOverflow(copy _10, const 1_usize);
+        assert(!move (_29.1: bool), "attempt to compute `{} + {}`, which would overflow", copy _10, const 1_usize) -> [success: bb14, unwind unreachable];
     }
 
     bb14: {
-        _10 = move (_26.0: usize);
-        StorageLive(_27);
-        _27 = (copy _25, copy _24);
-        _28 = Option::<(usize, &T)>::Some(move _27);
-        StorageDead(_27);
-        StorageDead(_26);
-        StorageDead(_25);
-        _29 = copy (((_28 as Some).0: (usize, &T)).0: usize);
-        _30 = copy (((_28 as Some).0: (usize, &T)).1: &T);
-        StorageLive(_31);
-        _31 = &_2;
-        StorageLive(_32);
-        _32 = (copy _29, copy _30);
-        _33 = >::call(move _31, move _32) -> [return: bb15, unwind unreachable];
+        _10 = move (_29.0: usize);
+        StorageLive(_30);
+        _30 = (copy _28, copy _27);
+        _31 = Option::<(usize, &T)>::Some(move _30);
+        StorageDead(_30);
+        StorageDead(_29);
+        StorageDead(_28);
+        _32 = copy (((_31 as Some).0: (usize, &T)).0: usize);
+        _33 = copy (((_31 as Some).0: (usize, &T)).1: &T);
+        StorageLive(_34);
+        _34 = &_2;
+        StorageLive(_35);
+        _35 = (copy _32, copy _33);
+        _36 = >::call(move _34, move _35) -> [return: bb15, unwind unreachable];
     }
 
     bb15: {
-        StorageDead(_32);
+        StorageDead(_35);
+        StorageDead(_34);
         StorageDead(_31);
-        StorageDead(_28);
         goto -> bb4;
     }
 }
diff --git a/tests/ui/coercion/vec-macro-coercions.rs b/tests/ui/coercion/vec-macro-coercions.rs
new file mode 100644
index 000000000000..f7dfd4324796
--- /dev/null
+++ b/tests/ui/coercion/vec-macro-coercions.rs
@@ -0,0 +1,12 @@
+//@ check-pass
+
+fn main() {
+    let functions = &vec![
+        |x: i32| -> i32 { x + 3 },
+        |x: i32| -> i32 { x + 3 },
+    ];
+
+    let string = String::new();
+    let a = vec![&string, "abc"];
+    let b = vec!["abc", &string];
+}
diff --git a/tests/ui/consts/min_const_fn/bad_const_fn_body_ice.rs b/tests/ui/consts/min_const_fn/bad_const_fn_body_ice.rs
index 6a6b0e666e1c..74e0a36560b0 100644
--- a/tests/ui/consts/min_const_fn/bad_const_fn_body_ice.rs
+++ b/tests/ui/consts/min_const_fn/bad_const_fn_body_ice.rs
@@ -1,7 +1,7 @@
 const fn foo(a: i32) -> Vec {
     vec![1, 2, 3]
-    //~^ ERROR allocations are not allowed
-    //~| ERROR cannot call non-const method
+    //~^ ERROR cannot call non-const
+    //~| ERROR cannot call non-const
 }
 
 fn main() {}
diff --git a/tests/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr b/tests/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr
index f6ddb19f9634..a7e8fdf37ae2 100644
--- a/tests/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr
+++ b/tests/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr
@@ -1,10 +1,4 @@
-error[E0010]: allocations are not allowed in constant functions
-  --> $DIR/bad_const_fn_body_ice.rs:2:5
-   |
-LL |     vec![1, 2, 3]
-   |     ^^^^^^^^^^^^^ allocation not allowed in constant functions
-
-error[E0015]: cannot call non-const method `slice::::into_vec::` in constant functions
+error[E0015]: cannot call non-const associated function `Box::<[i32; 3]>::new_uninit` in constant functions
   --> $DIR/bad_const_fn_body_ice.rs:2:5
    |
 LL |     vec![1, 2, 3]
@@ -12,7 +6,16 @@ LL |     vec![1, 2, 3]
    |
    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
 
+error[E0015]: cannot call non-const function `std::boxed::box_assume_init_into_vec_unsafe::` in constant functions
+  --> $DIR/bad_const_fn_body_ice.rs:2:5
+   |
+LL |     vec![1, 2, 3]
+   |     ^^^^^^^^^^^^^
+   |
+note: function `box_assume_init_into_vec_unsafe` is not const
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
+   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
+
 error: aborting due to 2 previous errors
 
-Some errors have detailed explanations: E0010, E0015.
-For more information about an error, try `rustc --explain E0010`.
+For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/coroutine/issue-105084.rs b/tests/ui/coroutine/issue-105084.rs
index 4e9f6ee3a595..9dd3df5ce341 100644
--- a/tests/ui/coroutine/issue-105084.rs
+++ b/tests/ui/coroutine/issue-105084.rs
@@ -15,11 +15,11 @@ fn main() {
     let mut g = #[coroutine]
     || {
         // This is desuraged as 4 stages:
-        // - allocate a `*mut u8` with `exchange_malloc`;
-        // - create a Box that is ignored for trait computations;
+        // - `vec!` macro
+        // - `write_via_move`
         // - compute fields (and yields);
         // - assign to `t`.
-        let t = std::boxed::box_new((5, yield));
+        let t = vec![(5, yield)];
         drop(t);
     };
 
@@ -30,7 +30,7 @@ fn main() {
     // As it is not taken into account for trait computation,
     // the coroutine is `Copy`.
     let mut h = copy(g);
-    //~^ ERROR the trait bound `Box<(i32, ())>: Copy` is not satisfied in
+    //~^ ERROR the trait bound `Box>: Copy` is not satisfied in
 
     // We now have 2 boxes with the same backing allocation:
     // one inside `g` and one inside `h`.
diff --git a/tests/ui/coroutine/issue-105084.stderr b/tests/ui/coroutine/issue-105084.stderr
index a69d20e607a4..208636bfa6a8 100644
--- a/tests/ui/coroutine/issue-105084.stderr
+++ b/tests/ui/coroutine/issue-105084.stderr
@@ -1,20 +1,20 @@
-error[E0277]: the trait bound `Box<(i32, ())>: Copy` is not satisfied in `{coroutine@$DIR/issue-105084.rs:16:5: 16:7}`
+error[E0277]: the trait bound `Box>: Copy` is not satisfied in `{coroutine@$DIR/issue-105084.rs:16:5: 16:7}`
   --> $DIR/issue-105084.rs:32:17
    |
 LL |     || {
    |     -- within this `{coroutine@$DIR/issue-105084.rs:16:5: 16:7}`
 ...
 LL |     let mut h = copy(g);
-   |                 ^^^^^^^ within `{coroutine@$DIR/issue-105084.rs:16:5: 16:7}`, the trait `Copy` is not implemented for `Box<(i32, ())>`
+   |                 ^^^^^^^ within `{coroutine@$DIR/issue-105084.rs:16:5: 16:7}`, the trait `Copy` is not implemented for `Box>`
    |
 note: coroutine does not implement `Copy` as this value is used across a yield
-  --> $DIR/issue-105084.rs:22:41
+  --> $DIR/issue-105084.rs:22:26
    |
-LL |         let t = std::boxed::box_new((5, yield));
-   |                 ------------------------^^^^^--
-   |                 |                       |
-   |                 |                       yield occurs here, with `std::boxed::box_new((5, yield))` maybe used later
-   |                 has type `Box<(i32, ())>` which does not implement `Copy`
+LL |         let t = vec![(5, yield)];
+   |                 ---------^^^^^--
+   |                 |        |
+   |                 |        yield occurs here, with the value maybe used later
+   |                 has type `Box>` which does not implement `Copy`
 note: required by a bound in `copy`
   --> $DIR/issue-105084.rs:10:12
    |
diff --git a/tests/ui/error-codes/E0010-teach.rs b/tests/ui/error-codes/E0010-teach.rs
deleted file mode 100644
index 0eef24783873..000000000000
--- a/tests/ui/error-codes/E0010-teach.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-//@ compile-flags: -Z teach
-
-#![allow(warnings)]
-
-const CON: Vec = vec![1, 2, 3]; //~ ERROR E0010
-//~| ERROR cannot call non-const method
-fn main() {}
diff --git a/tests/ui/error-codes/E0010-teach.stderr b/tests/ui/error-codes/E0010-teach.stderr
deleted file mode 100644
index b035cf343e95..000000000000
--- a/tests/ui/error-codes/E0010-teach.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error[E0010]: allocations are not allowed in constants
-  --> $DIR/E0010-teach.rs:5:23
-   |
-LL | const CON: Vec = vec![1, 2, 3];
-   |                       ^^^^^^^^^^^^^ allocation not allowed in constants
-   |
-   = note: the runtime heap is not yet available at compile-time, so no runtime heap allocations can be created
-
-error[E0015]: cannot call non-const method `slice::::into_vec::` in constants
-  --> $DIR/E0010-teach.rs:5:23
-   |
-LL | const CON: Vec = vec![1, 2, 3];
-   |                       ^^^^^^^^^^^^^
-   |
-   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0010, E0015.
-For more information about an error, try `rustc --explain E0010`.
diff --git a/tests/ui/error-codes/E0010.rs b/tests/ui/error-codes/E0010.rs
deleted file mode 100644
index edb96714dd32..000000000000
--- a/tests/ui/error-codes/E0010.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-#![allow(warnings)]
-
-const CON: Vec = vec![1, 2, 3]; //~ ERROR E0010
-//~| ERROR cannot call non-const method
-fn main() {}
diff --git a/tests/ui/error-codes/E0010.stderr b/tests/ui/error-codes/E0010.stderr
deleted file mode 100644
index d08b7f90afb4..000000000000
--- a/tests/ui/error-codes/E0010.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-error[E0010]: allocations are not allowed in constants
-  --> $DIR/E0010.rs:3:23
-   |
-LL | const CON: Vec = vec![1, 2, 3];
-   |                       ^^^^^^^^^^^^^ allocation not allowed in constants
-
-error[E0015]: cannot call non-const method `slice::::into_vec::` in constants
-  --> $DIR/E0010.rs:3:23
-   |
-LL | const CON: Vec = vec![1, 2, 3];
-   |                       ^^^^^^^^^^^^^
-   |
-   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0010, E0015.
-For more information about an error, try `rustc --explain E0010`.
diff --git a/tests/ui/impl-trait/where-allowed.stderr b/tests/ui/impl-trait/where-allowed.stderr
index 1a8d6509e137..2d97215de3bb 100644
--- a/tests/ui/impl-trait/where-allowed.stderr
+++ b/tests/ui/impl-trait/where-allowed.stderr
@@ -390,14 +390,6 @@ LL | fn in_impl_Fn_return_in_return() -> &'static impl Fn() -> impl Debug { pani
            - impl Fn for Exclusive
              where F: Sync, F: Fn, Args: std::marker::Tuple;
 
-error[E0118]: no nominal type found for inherent implementation
-  --> $DIR/where-allowed.rs:241:1
-   |
-LL | impl T {}
-   | ^^^^^^^^^^^^^^^^^^^^^^ impl requires a nominal type
-   |
-   = note: either implement a trait on it or create a newtype to wrap it instead
-
 error: unconstrained opaque type
   --> $DIR/where-allowed.rs:122:16
    |
@@ -414,6 +406,14 @@ LL | type InTypeAlias = impl Debug;
    |
    = note: `InTypeAlias` must be used in combination with a concrete type within the same crate
 
+error[E0118]: no nominal type found for inherent implementation
+  --> $DIR/where-allowed.rs:241:1
+   |
+LL | impl T {}
+   | ^^^^^^^^^^^^^^^^^^^^^^ impl requires a nominal type
+   |
+   = note: either implement a trait on it or create a newtype to wrap it instead
+
 error: aborting due to 48 previous errors
 
 Some errors have detailed explanations: E0053, E0118, E0283, E0562, E0658, E0666.
diff --git a/tests/ui/limits/issue-17913.32bit.stderr b/tests/ui/limits/issue-17913.32bit.stderr
index a5a3f925f069..1311822d0d0c 100644
--- a/tests/ui/limits/issue-17913.32bit.stderr
+++ b/tests/ui/limits/issue-17913.32bit.stderr
@@ -1,24 +1,19 @@
-error[E0080]: values of the type `[&usize; usize::MAX]` are too big for the target architecture
-  --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
-   |
-   = note: evaluation of ` as std::mem::SizedTypeProperties>::SIZE` failed here
-
-error[E0080]: values of the type `[&usize; usize::MAX]` are too big for the target architecture
-  --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
-   |
-   = note: evaluation of ` as std::mem::SizedTypeProperties>::ALIGN` failed here
-
-note: the above error was encountered while instantiating `fn Box::<[&usize; usize::MAX]>::new_uninit_in`
-  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
-
 error[E0080]: values of the type `[&usize; usize::MAX]` are too big for the target architecture
   --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
    |
    = note: evaluation of `<[&usize; usize::MAX] as std::mem::SizedTypeProperties>::SIZE` failed here
 
-note: the above error was encountered while instantiating `fn Box::<[&usize; usize::MAX]>::try_new_uninit_in`
-  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
+error[E0080]: values of the type `[&usize; usize::MAX]` are too big for the target architecture
+  --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+   |
+   = note: evaluation of `<[&usize; usize::MAX] as std::mem::SizedTypeProperties>::ALIGN` failed here
 
-error: aborting due to 3 previous errors
+note: the above error was encountered while instantiating `fn Box::<[&usize; usize::MAX]>::new`
+  --> $DIR/issue-17913.rs:16:21
+   |
+LL |     let a: Box<_> = Box::new([&n; SIZE]);
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/macros/vec-macro-in-pattern.rs b/tests/ui/macros/vec-macro-in-pattern.rs
index 9b9a1edf54c9..0e9cb087f66a 100644
--- a/tests/ui/macros/vec-macro-in-pattern.rs
+++ b/tests/ui/macros/vec-macro-in-pattern.rs
@@ -6,7 +6,7 @@ fn main() {
     match Some(vec![42]) {
         Some(vec![43]) => {} //~ ERROR expected a pattern, found a function call
         //~| ERROR found associated function
-        //~| ERROR usage of qualified paths in this context is experimental
+        //~| ERROR expected a pattern, found a function call
         _ => {}
     }
 }
diff --git a/tests/ui/macros/vec-macro-in-pattern.stderr b/tests/ui/macros/vec-macro-in-pattern.stderr
index e5723efc0b2d..38e4aebb8f48 100644
--- a/tests/ui/macros/vec-macro-in-pattern.stderr
+++ b/tests/ui/macros/vec-macro-in-pattern.stderr
@@ -6,17 +6,15 @@ LL |         Some(vec![43]) => {}
    |
    = note: function calls are not allowed in patterns: 
 
-error[E0658]: usage of qualified paths in this context is experimental
+error[E0532]: expected a pattern, found a function call
   --> $DIR/vec-macro-in-pattern.rs:7:14
    |
 LL |         Some(vec![43]) => {}
-   |              ^^^^^^^^
+   |              ^^^^^^^^ not a tuple struct or tuple variant
    |
-   = note: see issue #86935  for more information
-   = help: add `#![feature(more_qualified_paths)]` to the crate attributes to enable
-   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+   = note: function calls are not allowed in patterns: 
 
-error[E0164]: expected tuple struct or tuple variant, found associated function `<[_]>::into_vec`
+error[E0164]: expected tuple struct or tuple variant, found associated function `::alloc::boxed::Box::new_uninit`
   --> $DIR/vec-macro-in-pattern.rs:7:14
    |
 LL |         Some(vec![43]) => {}
@@ -26,5 +24,5 @@ LL |         Some(vec![43]) => {}
 
 error: aborting due to 3 previous errors
 
-Some errors have detailed explanations: E0164, E0532, E0658.
+Some errors have detailed explanations: E0164, E0532.
 For more information about an error, try `rustc --explain E0164`.
diff --git a/tests/ui/nll/borrowck-annotate-static-lifetime.rs b/tests/ui/nll/borrowck-annotate-static-lifetime.rs
deleted file mode 100644
index 9d849db9b4f3..000000000000
--- a/tests/ui/nll/borrowck-annotate-static-lifetime.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-//! regression test for issue 
-fn main() {
-    let _vec: Vec<&'static String> = vec![&String::new()];
-    //~^ ERROR temporary value dropped while borrowed [E0716]
-}
diff --git a/tests/ui/nll/borrowck-annotate-static-lifetime.stderr b/tests/ui/nll/borrowck-annotate-static-lifetime.stderr
deleted file mode 100644
index 9cb9007d9131..000000000000
--- a/tests/ui/nll/borrowck-annotate-static-lifetime.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0716]: temporary value dropped while borrowed
-  --> $DIR/borrowck-annotate-static-lifetime.rs:3:44
-   |
-LL |     let _vec: Vec<&'static String> = vec![&String::new()];
-   |               --------------------         ^^^^^^^^^^^^^ - temporary value is freed at the end of this statement
-   |               |                            |
-   |               |                            creates a temporary value which is freed while still in use
-   |               type annotation requires that borrow lasts for `'static`
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/nll/user-annotations/patterns.rs b/tests/ui/nll/user-annotations/patterns.rs
index 1f635d7f50cd..07f78430f67c 100644
--- a/tests/ui/nll/user-annotations/patterns.rs
+++ b/tests/ui/nll/user-annotations/patterns.rs
@@ -70,6 +70,11 @@ fn underscore_with_initializer() {
     //~^ ERROR temporary value dropped while borrowed [E0716]
 }
 
+fn issue_47184() {
+    let _vec: Vec<&'static String> = vec![&String::new()];
+    //~^ ERROR temporary value dropped while borrowed [E0716]
+}
+
 fn pair_underscores_with_initializer() {
     let x = 22;
     let (_, _): (&'static u32, u32) = (&x, 44); //~ ERROR
diff --git a/tests/ui/nll/user-annotations/patterns.stderr b/tests/ui/nll/user-annotations/patterns.stderr
index 8bb714f1d0cd..325af6a52a0e 100644
--- a/tests/ui/nll/user-annotations/patterns.stderr
+++ b/tests/ui/nll/user-annotations/patterns.stderr
@@ -111,8 +111,17 @@ LL |     let (_a, b): (Vec<&'static String>, _) = (vec![&String::new()], 44);
    |                  |                                  creates a temporary value which is freed while still in use
    |                  type annotation requires that borrow lasts for `'static`
 
+error[E0716]: temporary value dropped while borrowed
+  --> $DIR/patterns.rs:74:44
+   |
+LL |     let _vec: Vec<&'static String> = vec![&String::new()];
+   |               --------------------         ^^^^^^^^^^^^^ - temporary value is freed at the end of this statement
+   |               |                            |
+   |               |                            creates a temporary value which is freed while still in use
+   |               type annotation requires that borrow lasts for `'static`
+
 error[E0597]: `x` does not live long enough
-  --> $DIR/patterns.rs:75:40
+  --> $DIR/patterns.rs:80:40
    |
 LL |     let x = 22;
    |         - binding `x` declared here
@@ -124,7 +133,7 @@ LL | }
    | - `x` dropped here while still borrowed
 
 error[E0597]: `x` does not live long enough
-  --> $DIR/patterns.rs:80:40
+  --> $DIR/patterns.rs:85:40
    |
 LL |     let x = 22;
    |         - binding `x` declared here
@@ -136,7 +145,7 @@ LL | }
    | - `x` dropped here while still borrowed
 
 error[E0597]: `x` does not live long enough
-  --> $DIR/patterns.rs:85:69
+  --> $DIR/patterns.rs:90:69
    |
 LL |     let x = 22;
    |         - binding `x` declared here
@@ -148,7 +157,7 @@ LL | }
    | - `x` dropped here while still borrowed
 
 error[E0597]: `x` does not live long enough
-  --> $DIR/patterns.rs:90:69
+  --> $DIR/patterns.rs:95:69
    |
 LL |     let x = 22;
    |         - binding `x` declared here
@@ -160,7 +169,7 @@ LL | }
    | - `x` dropped here while still borrowed
 
 error[E0597]: `x` does not live long enough
-  --> $DIR/patterns.rs:98:17
+  --> $DIR/patterns.rs:103:17
    |
 LL |     let x = 22;
    |         - binding `x` declared here
@@ -173,7 +182,7 @@ LL | }
    | - `x` dropped here while still borrowed
 
 error: lifetime may not live long enough
-  --> $DIR/patterns.rs:111:5
+  --> $DIR/patterns.rs:116:5
    |
 LL | fn static_to_a_to_static_through_variable<'a>(x: &'a u32) -> &'static u32 {
    |                                           -- lifetime `'a` defined here
@@ -182,7 +191,7 @@ LL |     y
    |     ^ returning this value requires that `'a` must outlive `'static`
 
 error: lifetime may not live long enough
-  --> $DIR/patterns.rs:123:5
+  --> $DIR/patterns.rs:128:5
    |
 LL | fn static_to_a_to_static_through_tuple<'a>(x: &'a u32) -> &'static u32 {
    |                                        -- lifetime `'a` defined here
@@ -191,7 +200,7 @@ LL |     y
    |     ^ returning this value requires that `'a` must outlive `'static`
 
 error: lifetime may not live long enough
-  --> $DIR/patterns.rs:128:5
+  --> $DIR/patterns.rs:133:5
    |
 LL | fn static_to_a_to_static_through_struct<'a>(_x: &'a u32) -> &'static u32 {
    |                                         -- lifetime `'a` defined here
@@ -200,14 +209,14 @@ LL |     y
    |     ^ returning this value requires that `'a` must outlive `'static`
 
 error: lifetime may not live long enough
-  --> $DIR/patterns.rs:132:18
+  --> $DIR/patterns.rs:137:18
    |
 LL | fn a_to_static_then_static<'a>(x: &'a u32) -> &'static u32 {
    |                            -- lifetime `'a` defined here
 LL |     let (y, _z): (&'static u32, u32) = (x, 44);
    |                  ^^^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
 
-error: aborting due to 19 previous errors
+error: aborting due to 20 previous errors
 
 Some errors have detailed explanations: E0597, E0716.
 For more information about an error, try `rustc --explain E0597`.
diff --git a/tests/ui/pattern/deref-patterns/ice-adjust-mode-unimplemented-for-constblock.rs b/tests/ui/pattern/deref-patterns/ice-adjust-mode-unimplemented-for-constblock.rs
index fac8684ef094..fbc742aa8477 100644
--- a/tests/ui/pattern/deref-patterns/ice-adjust-mode-unimplemented-for-constblock.rs
+++ b/tests/ui/pattern/deref-patterns/ice-adjust-mode-unimplemented-for-constblock.rs
@@ -4,7 +4,7 @@
 fn main() {
     let vec![const { vec![] }]: Vec = vec![];
     //~^ ERROR expected a pattern, found a function call
-    //~| ERROR usage of qualified paths in this context is experimental
+    //~| ERROR expected a pattern, found a function call
     //~| ERROR expected tuple struct or tuple variant
     //~| ERROR arbitrary expressions aren't allowed in patterns
 }
diff --git a/tests/ui/pattern/deref-patterns/ice-adjust-mode-unimplemented-for-constblock.stderr b/tests/ui/pattern/deref-patterns/ice-adjust-mode-unimplemented-for-constblock.stderr
index 40615633ea48..48728acbc291 100644
--- a/tests/ui/pattern/deref-patterns/ice-adjust-mode-unimplemented-for-constblock.stderr
+++ b/tests/ui/pattern/deref-patterns/ice-adjust-mode-unimplemented-for-constblock.stderr
@@ -6,15 +6,13 @@ LL |     let vec![const { vec![] }]: Vec = vec![];
    |
    = note: function calls are not allowed in patterns: 
 
-error[E0658]: usage of qualified paths in this context is experimental
+error[E0532]: expected a pattern, found a function call
   --> $DIR/ice-adjust-mode-unimplemented-for-constblock.rs:5:9
    |
 LL |     let vec![const { vec![] }]: Vec = vec![];
-   |         ^^^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^^^^ not a tuple struct or tuple variant
    |
-   = note: see issue #86935  for more information
-   = help: add `#![feature(more_qualified_paths)]` to the crate attributes to enable
-   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+   = note: function calls are not allowed in patterns: 
 
 error: arbitrary expressions aren't allowed in patterns
   --> $DIR/ice-adjust-mode-unimplemented-for-constblock.rs:5:14
@@ -24,7 +22,7 @@ LL |     let vec![const { vec![] }]: Vec = vec![];
    |
    = help: use a named `const`-item or an `if`-guard (`x if x == const { ... }`) instead
 
-error[E0164]: expected tuple struct or tuple variant, found associated function `<[_]>::into_vec`
+error[E0164]: expected tuple struct or tuple variant, found associated function `::alloc::boxed::Box::new_uninit`
   --> $DIR/ice-adjust-mode-unimplemented-for-constblock.rs:5:9
    |
 LL |     let vec![const { vec![] }]: Vec = vec![];
@@ -34,5 +32,5 @@ LL |     let vec![const { vec![] }]: Vec = vec![];
 
 error: aborting due to 4 previous errors
 
-Some errors have detailed explanations: E0164, E0532, E0658.
+Some errors have detailed explanations: E0164, E0532.
 For more information about an error, try `rustc --explain E0164`.
diff --git a/tests/ui/span/issue-15480.fixed b/tests/ui/span/vec-macro-outlives-issue-15480.fixed
similarity index 100%
rename from tests/ui/span/issue-15480.fixed
rename to tests/ui/span/vec-macro-outlives-issue-15480.fixed
diff --git a/tests/ui/span/issue-15480.rs b/tests/ui/span/vec-macro-outlives-issue-15480.rs
similarity index 100%
rename from tests/ui/span/issue-15480.rs
rename to tests/ui/span/vec-macro-outlives-issue-15480.rs
diff --git a/tests/ui/span/issue-15480.stderr b/tests/ui/span/vec-macro-outlives-issue-15480.stderr
similarity index 92%
rename from tests/ui/span/issue-15480.stderr
rename to tests/ui/span/vec-macro-outlives-issue-15480.stderr
index 45a5d7dfbecb..7fa9b374ad88 100644
--- a/tests/ui/span/issue-15480.stderr
+++ b/tests/ui/span/vec-macro-outlives-issue-15480.stderr
@@ -1,5 +1,5 @@
 error[E0716]: temporary value dropped while borrowed
-  --> $DIR/issue-15480.rs:6:10
+  --> $DIR/vec-macro-outlives-issue-15480.rs:6:10
    |
 LL |         &id(3)
    |          ^^^^^ creates a temporary value which is freed while still in use
diff --git a/tests/ui/statics/check-values-constraints.rs b/tests/ui/statics/check-values-constraints.rs
index 9df76b5c1497..c62abd75a304 100644
--- a/tests/ui/statics/check-values-constraints.rs
+++ b/tests/ui/statics/check-values-constraints.rs
@@ -79,8 +79,8 @@ static STATIC10: UnsafeStruct = UnsafeStruct;
 struct MyOwned;
 
 static STATIC11: Vec = vec![MyOwned];
-//~^ ERROR allocations are not allowed in statics
-//~^^ ERROR cannot call non-const
+//~^ ERROR cannot call non-const function
+//~| ERROR cannot call non-const
 
 static mut STATIC12: UnsafeStruct = UnsafeStruct;
 
@@ -93,29 +93,29 @@ static mut STATIC14: SafeStruct = SafeStruct {
 };
 
 static STATIC15: &'static [Vec] = &[
-    vec![MyOwned], //~ ERROR allocations are not allowed in statics
-    //~^ ERROR cannot call non-const
-    vec![MyOwned], //~ ERROR allocations are not allowed in statics
-                   //~^ ERROR cannot call non-const
+    vec![MyOwned], //~ ERROR cannot call non-const function
+    //~| ERROR cannot call non-const
+    vec![MyOwned], //~ ERROR cannot call non-const function
+                   //~| ERROR cannot call non-const
 ];
 
 static STATIC16: (&'static Vec, &'static Vec) = (
-    &vec![MyOwned], //~ ERROR allocations are not allowed in statics
-    //~^ ERROR cannot call non-const
-    &vec![MyOwned], //~ ERROR allocations are not allowed in statics
-                    //~^ ERROR cannot call non-const
+    &vec![MyOwned], //~ ERROR cannot call non-const function
+    //~| ERROR cannot call non-const
+    &vec![MyOwned], //~ ERROR cannot call non-const function
+                    //~| ERROR cannot call non-const
 );
 
 static mut STATIC17: SafeEnum = SafeEnum::Variant1;
 
 static STATIC19: Vec = vec![3];
-//~^ ERROR allocations are not allowed in statics
-//~^^ ERROR cannot call non-const
+//~^ ERROR cannot call non-const function
+//~| ERROR cannot call non-const
 
 pub fn main() {
     let y = {
-        static x: Vec = vec![3]; //~ ERROR allocations are not allowed in statics
-        //~^ ERROR cannot call non-const
+        static x: Vec = vec![3]; //~ ERROR cannot call non-const function
+        //~| ERROR cannot call non-const
         x
         //~^ ERROR cannot move out of static
     };
diff --git a/tests/ui/statics/check-values-constraints.stderr b/tests/ui/statics/check-values-constraints.stderr
index 082dd3490603..94d2b8ce8064 100644
--- a/tests/ui/statics/check-values-constraints.stderr
+++ b/tests/ui/statics/check-values-constraints.stderr
@@ -11,13 +11,7 @@ LL | |     }
 LL |   };
    |   - value is dropped here
 
-error[E0010]: allocations are not allowed in statics
-  --> $DIR/check-values-constraints.rs:81:33
-   |
-LL | static STATIC11: Vec = vec![MyOwned];
-   |                                 ^^^^^^^^^^^^^ allocation not allowed in statics
-
-error[E0015]: cannot call non-const method `slice::::into_vec::` in statics
+error[E0015]: cannot call non-const associated function `Box::<[MyOwned; 1]>::new_uninit` in statics
   --> $DIR/check-values-constraints.rs:81:33
    |
 LL | static STATIC11: Vec = vec![MyOwned];
@@ -26,6 +20,17 @@ LL | static STATIC11: Vec = vec![MyOwned];
    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
 
+error[E0015]: cannot call non-const function `std::boxed::box_assume_init_into_vec_unsafe::` in statics
+  --> $DIR/check-values-constraints.rs:81:33
+   |
+LL | static STATIC11: Vec = vec![MyOwned];
+   |                                 ^^^^^^^^^^^^^
+   |
+note: function `box_assume_init_into_vec_unsafe` is not const
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
+   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+
 error[E0015]: cannot call non-const method `::to_string` in statics
   --> $DIR/check-values-constraints.rs:92:38
    |
@@ -42,13 +47,7 @@ note: method `to_string` is not const because trait `ToString` is not const
    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
 
-error[E0010]: allocations are not allowed in statics
-  --> $DIR/check-values-constraints.rs:96:5
-   |
-LL |     vec![MyOwned],
-   |     ^^^^^^^^^^^^^ allocation not allowed in statics
-
-error[E0015]: cannot call non-const method `slice::::into_vec::` in statics
+error[E0015]: cannot call non-const associated function `Box::<[MyOwned; 1]>::new_uninit` in statics
   --> $DIR/check-values-constraints.rs:96:5
    |
 LL |     vec![MyOwned],
@@ -57,13 +56,18 @@ LL |     vec![MyOwned],
    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
 
-error[E0010]: allocations are not allowed in statics
-  --> $DIR/check-values-constraints.rs:98:5
+error[E0015]: cannot call non-const function `std::boxed::box_assume_init_into_vec_unsafe::` in statics
+  --> $DIR/check-values-constraints.rs:96:5
    |
 LL |     vec![MyOwned],
-   |     ^^^^^^^^^^^^^ allocation not allowed in statics
+   |     ^^^^^^^^^^^^^
+   |
+note: function `box_assume_init_into_vec_unsafe` is not const
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
+   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
 
-error[E0015]: cannot call non-const method `slice::::into_vec::` in statics
+error[E0015]: cannot call non-const associated function `Box::<[MyOwned; 1]>::new_uninit` in statics
   --> $DIR/check-values-constraints.rs:98:5
    |
 LL |     vec![MyOwned],
@@ -72,13 +76,18 @@ LL |     vec![MyOwned],
    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
 
-error[E0010]: allocations are not allowed in statics
-  --> $DIR/check-values-constraints.rs:103:6
+error[E0015]: cannot call non-const function `std::boxed::box_assume_init_into_vec_unsafe::` in statics
+  --> $DIR/check-values-constraints.rs:98:5
    |
-LL |     &vec![MyOwned],
-   |      ^^^^^^^^^^^^^ allocation not allowed in statics
+LL |     vec![MyOwned],
+   |     ^^^^^^^^^^^^^
+   |
+note: function `box_assume_init_into_vec_unsafe` is not const
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
+   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
 
-error[E0015]: cannot call non-const method `slice::::into_vec::` in statics
+error[E0015]: cannot call non-const associated function `Box::<[MyOwned; 1]>::new_uninit` in statics
   --> $DIR/check-values-constraints.rs:103:6
    |
 LL |     &vec![MyOwned],
@@ -87,13 +96,18 @@ LL |     &vec![MyOwned],
    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
 
-error[E0010]: allocations are not allowed in statics
-  --> $DIR/check-values-constraints.rs:105:6
+error[E0015]: cannot call non-const function `std::boxed::box_assume_init_into_vec_unsafe::` in statics
+  --> $DIR/check-values-constraints.rs:103:6
    |
 LL |     &vec![MyOwned],
-   |      ^^^^^^^^^^^^^ allocation not allowed in statics
+   |      ^^^^^^^^^^^^^
+   |
+note: function `box_assume_init_into_vec_unsafe` is not const
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
+   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
 
-error[E0015]: cannot call non-const method `slice::::into_vec::` in statics
+error[E0015]: cannot call non-const associated function `Box::<[MyOwned; 1]>::new_uninit` in statics
   --> $DIR/check-values-constraints.rs:105:6
    |
 LL |     &vec![MyOwned],
@@ -102,13 +116,18 @@ LL |     &vec![MyOwned],
    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
 
-error[E0010]: allocations are not allowed in statics
-  --> $DIR/check-values-constraints.rs:111:31
+error[E0015]: cannot call non-const function `std::boxed::box_assume_init_into_vec_unsafe::` in statics
+  --> $DIR/check-values-constraints.rs:105:6
    |
-LL | static STATIC19: Vec = vec![3];
-   |                               ^^^^^^^ allocation not allowed in statics
+LL |     &vec![MyOwned],
+   |      ^^^^^^^^^^^^^
+   |
+note: function `box_assume_init_into_vec_unsafe` is not const
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
+   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
 
-error[E0015]: cannot call non-const method `slice::::into_vec::` in statics
+error[E0015]: cannot call non-const associated function `Box::<[isize; 1]>::new_uninit` in statics
   --> $DIR/check-values-constraints.rs:111:31
    |
 LL | static STATIC19: Vec = vec![3];
@@ -117,13 +136,18 @@ LL | static STATIC19: Vec = vec![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(|| ...)`
 
-error[E0010]: allocations are not allowed in statics
-  --> $DIR/check-values-constraints.rs:117:32
+error[E0015]: cannot call non-const function `std::boxed::box_assume_init_into_vec_unsafe::` in statics
+  --> $DIR/check-values-constraints.rs:111:31
    |
-LL |         static x: Vec = vec![3];
-   |                                ^^^^^^^ allocation not allowed in statics
+LL | static STATIC19: Vec = vec![3];
+   |                               ^^^^^^^
+   |
+note: function `box_assume_init_into_vec_unsafe` is not const
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
+   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
 
-error[E0015]: cannot call non-const method `slice::::into_vec::` in statics
+error[E0015]: cannot call non-const associated function `Box::<[isize; 1]>::new_uninit` in statics
   --> $DIR/check-values-constraints.rs:117:32
    |
 LL |         static x: Vec = vec![3];
@@ -132,6 +156,17 @@ LL |         static x: Vec = vec![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(|| ...)`
 
+error[E0015]: cannot call non-const function `std::boxed::box_assume_init_into_vec_unsafe::` in statics
+  --> $DIR/check-values-constraints.rs:117:32
+   |
+LL |         static x: Vec = vec![3];
+   |                                ^^^^^^^
+   |
+note: function `box_assume_init_into_vec_unsafe` is not const
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
+   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+
 error[E0507]: cannot move out of static item `x`
   --> $DIR/check-values-constraints.rs:119:9
    |
@@ -149,5 +184,5 @@ LL |         x.clone()
 
 error: aborting due to 17 previous errors
 
-Some errors have detailed explanations: E0010, E0015, E0493, E0507.
-For more information about an error, try `rustc --explain E0010`.
+Some errors have detailed explanations: E0015, E0493, E0507.
+For more information about an error, try `rustc --explain E0015`.
diff --git a/tests/ui/unpretty/box.rs b/tests/ui/unpretty/box.rs
deleted file mode 100644
index 83fdeff7a179..000000000000
--- a/tests/ui/unpretty/box.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-//@ compile-flags: -Zunpretty=thir-tree
-//@ check-pass
-
-#![feature(liballoc_internals)]
-
-fn main() {
-    let _ = std::boxed::box_new(1);
-}
diff --git a/tests/ui/unpretty/box.stdout b/tests/ui/unpretty/box.stdout
deleted file mode 100644
index 2576a2aa125d..000000000000
--- a/tests/ui/unpretty/box.stdout
+++ /dev/null
@@ -1,90 +0,0 @@
-DefId(0:3 ~ box[efb9]::main):
-params: [
-]
-body:
-    Expr {
-        ty: ()
-        temp_scope_id: 11
-        span: $DIR/box.rs:6:11: 8:2 (#0)
-        kind: 
-            Scope {
-                region_scope: Node(11)
-                hir_id: HirId(DefId(0:3 ~ box[efb9]::main).11)
-                value:
-                    Expr {
-                        ty: ()
-                        temp_scope_id: 11
-                        span: $DIR/box.rs:6:11: 8:2 (#0)
-                        kind: 
-                            Block {
-                                targeted_by_break: false
-                                span: $DIR/box.rs:6:11: 8:2 (#0)
-                                region_scope: Node(1)
-                                safety_mode: Safe
-                                stmts: [
-                                    Stmt {
-                                        kind: Let {
-                                            remainder_scope: Remainder { block: 1, first_statement_index: 0}
-                                            init_scope: Node(2)
-                                            pattern: 
-                                                Pat {
-                                                    ty: std::boxed::Box
-                                                    span: $DIR/box.rs:7:9: 7:10 (#0)
-                                                    kind: PatKind {
-                                                        Wild
-                                                    }
-                                                }
-                                            ,
-                                            initializer: Some(
-                                                Expr {
-                                                    ty: std::boxed::Box
-                                                    temp_scope_id: 3
-                                                    span: $DIR/box.rs:7:13: 7:35 (#0)
-                                                    kind: 
-                                                        Scope {
-                                                            region_scope: Node(3)
-                                                            hir_id: HirId(DefId(0:3 ~ box[efb9]::main).3)
-                                                            value:
-                                                                Expr {
-                                                                    ty: std::boxed::Box
-                                                                    temp_scope_id: 3
-                                                                    span: $DIR/box.rs:7:13: 7:35 (#0)
-                                                                    kind: 
-                                                                        Box {
-                                                                            Expr {
-                                                                                ty: i32
-                                                                                temp_scope_id: 8
-                                                                                span: $DIR/box.rs:7:33: 7:34 (#0)
-                                                                                kind: 
-                                                                                    Scope {
-                                                                                        region_scope: Node(8)
-                                                                                        hir_id: HirId(DefId(0:3 ~ box[efb9]::main).8)
-                                                                                        value:
-                                                                                            Expr {
-                                                                                                ty: i32
-                                                                                                temp_scope_id: 8
-                                                                                                span: $DIR/box.rs:7:33: 7:34 (#0)
-                                                                                                kind: 
-                                                                                                    Literal( lit: Spanned { node: Int(Pu128(1), Unsuffixed), span: $DIR/box.rs:7:33: 7:34 (#0) }, neg: false)
-
-                                                                                            }
-                                                                                    }
-                                                                            }
-                                                                        }
-                                                                }
-                                                        }
-                                                }
-                                            )
-                                            else_block: None
-                                            hir_id: HirId(DefId(0:3 ~ box[efb9]::main).9)
-                                            span: $DIR/box.rs:7:5: 7:35 (#0)
-                                        }
-                                    }
-                                ]
-                                expr: []
-                            }
-                    }
-            }
-    }
-
-

From e5ed8643b6983ff7ddbc3cb2a8712edb65115a87 Mon Sep 17 00:00:00 2001
From: Ralf Jung 
Date: Sun, 9 Nov 2025 12:55:51 +0100
Subject: [PATCH 234/265] adjust clippy to fix some of the issues

---
 compiler/rustc_span/src/symbol.rs             |  1 -
 library/alloc/src/boxed.rs                    |  1 +
 library/alloc/src/slice.rs                    |  1 -
 src/tools/clippy/clippy_utils/src/higher.rs   |  8 ++--
 src/tools/clippy/clippy_utils/src/sym.rs      |  1 +
 .../clippy/tests/ui/manual_map_option.fixed   |  5 +--
 .../clippy/tests/ui/manual_map_option.rs      |  1 +
 .../clippy/tests/ui/manual_map_option.stderr  | 18 ++++++--
 src/tools/clippy/tests/ui/or_fun_call.fixed   |  6 +--
 src/tools/clippy/tests/ui/or_fun_call.rs      |  6 +--
 .../tests/ui/unwrap_or_else_default.fixed     |  3 +-
 .../clippy/tests/ui/unwrap_or_else_default.rs |  1 -
 .../tests/ui/unwrap_or_else_default.stderr    | 42 ++++++++-----------
 13 files changed, 47 insertions(+), 47 deletions(-)

diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index 37fff4a248ef..6ed487cd7efa 100644
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
@@ -2181,7 +2181,6 @@ symbols! {
         slice_from_raw_parts_mut,
         slice_from_ref,
         slice_get_unchecked,
-        slice_into_vec,
         slice_iter,
         slice_len_fn,
         slice_patterns,
diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs
index 5d36a6c463ea..221375baa2b6 100644
--- a/library/alloc/src/boxed.rs
+++ b/library/alloc/src/boxed.rs
@@ -259,6 +259,7 @@ unsafe fn box_new_uninit(size: usize, align: usize) -> *mut u8 {
 #[unstable(feature = "liballoc_internals", issue = "none")]
 #[inline(always)]
 #[cfg(not(no_global_oom_handling))]
+#[rustc_diagnostic_item = "box_assume_init_into_vec_unsafe"]
 pub fn box_assume_init_into_vec_unsafe(
     b: Box>,
 ) -> crate::vec::Vec {
diff --git a/library/alloc/src/slice.rs b/library/alloc/src/slice.rs
index cc8d80aee456..39e72e383eac 100644
--- a/library/alloc/src/slice.rs
+++ b/library/alloc/src/slice.rs
@@ -477,7 +477,6 @@ impl [T] {
     #[rustc_allow_incoherent_impl]
     #[stable(feature = "rust1", since = "1.0.0")]
     #[inline]
-    #[rustc_diagnostic_item = "slice_into_vec"]
     pub fn into_vec(self: Box) -> Vec {
         unsafe {
             let len = self.len();
diff --git a/src/tools/clippy/clippy_utils/src/higher.rs b/src/tools/clippy/clippy_utils/src/higher.rs
index 7d6787fec295..9c0b136e02b5 100644
--- a/src/tools/clippy/clippy_utils/src/higher.rs
+++ b/src/tools/clippy/clippy_utils/src/higher.rs
@@ -297,12 +297,12 @@ impl<'a> VecArgs<'a> {
                     // `vec![elem; size]` case
                     Some(VecArgs::Repeat(elem, size))
                 },
-                (sym::slice_into_vec, [slice])
-                    if let ExprKind::Call(_, [arg]) = slice.kind
-                        && let ExprKind::Array(args) = arg.kind =>
+                (sym::box_assume_init_into_vec_unsafe, [write_box_via_move])
+                    if let ExprKind::Call(_, [_box, elems]) = write_box_via_move.kind
+                        && let ExprKind::Array(elems) = elems.kind =>
                 {
                     // `vec![a, b, c]` case
-                    Some(VecArgs::Vec(args))
+                    Some(VecArgs::Vec(elems))
                 },
                 (sym::vec_new, []) => Some(VecArgs::Vec(&[])),
                 _ => None,
diff --git a/src/tools/clippy/clippy_utils/src/sym.rs b/src/tools/clippy/clippy_utils/src/sym.rs
index e0b03ae4f7b2..bd99525a86fb 100644
--- a/src/tools/clippy/clippy_utils/src/sym.rs
+++ b/src/tools/clippy/clippy_utils/src/sym.rs
@@ -91,6 +91,7 @@ generate! {
     author,
     borrow,
     borrow_mut,
+    box_assume_init_into_vec_unsafe,
     build_hasher,
     by_ref,
     bytes,
diff --git a/src/tools/clippy/tests/ui/manual_map_option.fixed b/src/tools/clippy/tests/ui/manual_map_option.fixed
index 3586979ab358..e007f7d47b24 100644
--- a/src/tools/clippy/tests/ui/manual_map_option.fixed
+++ b/src/tools/clippy/tests/ui/manual_map_option.fixed
@@ -113,10 +113,7 @@ fn main() {
     }
 
     // #6811
-    match Some(0) {
-        Some(x) => Some(vec![x]),
-        None => None,
-    };
+    Some(0).map(|x| vec![x]);
 
     // Don't lint, coercion
     let x: Option> = match Some(()) {
diff --git a/src/tools/clippy/tests/ui/manual_map_option.rs b/src/tools/clippy/tests/ui/manual_map_option.rs
index 40133748d459..8aa51bab6f83 100644
--- a/src/tools/clippy/tests/ui/manual_map_option.rs
+++ b/src/tools/clippy/tests/ui/manual_map_option.rs
@@ -183,6 +183,7 @@ fn main() {
 
     // #6811
     match Some(0) {
+        //~^ manual_map
         Some(x) => Some(vec![x]),
         None => None,
     };
diff --git a/src/tools/clippy/tests/ui/manual_map_option.stderr b/src/tools/clippy/tests/ui/manual_map_option.stderr
index 486379c1e5f3..7d00c1757bb3 100644
--- a/src/tools/clippy/tests/ui/manual_map_option.stderr
+++ b/src/tools/clippy/tests/ui/manual_map_option.stderr
@@ -173,7 +173,17 @@ LL | |     };
    | |_____^ help: try: `Some((String::new(), "test")).as_ref().map(|(x, y)| (y, x))`
 
 error: manual implementation of `Option::map`
-  --> tests/ui/manual_map_option.rs:196:5
+  --> tests/ui/manual_map_option.rs:185:5
+   |
+LL | /     match Some(0) {
+LL | |
+LL | |         Some(x) => Some(vec![x]),
+LL | |         None => None,
+LL | |     };
+   | |_____^ help: try: `Some(0).map(|x| vec![x])`
+
+error: manual implementation of `Option::map`
+  --> tests/ui/manual_map_option.rs:197:5
    |
 LL | /     match option_env!("") {
 LL | |
@@ -183,7 +193,7 @@ LL | |     };
    | |_____^ help: try: `option_env!("").map(String::from)`
 
 error: manual implementation of `Option::map`
-  --> tests/ui/manual_map_option.rs:217:12
+  --> tests/ui/manual_map_option.rs:218:12
    |
 LL |       } else if let Some(x) = Some(0) {
    |  ____________^
@@ -195,7 +205,7 @@ LL | |     };
    | |_____^ help: try: `{ Some(0).map(|x| x + 1) }`
 
 error: manual implementation of `Option::map`
-  --> tests/ui/manual_map_option.rs:226:12
+  --> tests/ui/manual_map_option.rs:227:12
    |
 LL |       } else if let Some(x) = Some(0) {
    |  ____________^
@@ -206,5 +216,5 @@ LL | |         None
 LL | |     };
    | |_____^ help: try: `{ Some(0).map(|x| x + 1) }`
 
-error: aborting due to 20 previous errors
+error: aborting due to 21 previous errors
 
diff --git a/src/tools/clippy/tests/ui/or_fun_call.fixed b/src/tools/clippy/tests/ui/or_fun_call.fixed
index 314da0804a5f..0d6f2aefa8a8 100644
--- a/src/tools/clippy/tests/ui/or_fun_call.fixed
+++ b/src/tools/clippy/tests/ui/or_fun_call.fixed
@@ -53,7 +53,7 @@ fn or_fun_call() {
     with_constructor.unwrap_or_else(make);
     //~^ or_fun_call
 
-    let with_new = Some(vec![1]);
+    let with_new: Option> = Some(vec![1]);
     with_new.unwrap_or_default();
     //~^ unwrap_or_default
 
@@ -101,7 +101,7 @@ fn or_fun_call() {
     real_default.unwrap_or_default();
     //~^ unwrap_or_default
 
-    let with_vec = Some(vec![1]);
+    let with_vec: Option> = Some(vec![1]);
     with_vec.unwrap_or_default();
     //~^ unwrap_or_default
 
@@ -329,7 +329,7 @@ mod lazy {
             }
         }
 
-        let with_new = Some(vec![1]);
+        let with_new: Option> = Some(vec![1]);
         with_new.unwrap_or_default();
         //~^ unwrap_or_default
 
diff --git a/src/tools/clippy/tests/ui/or_fun_call.rs b/src/tools/clippy/tests/ui/or_fun_call.rs
index 2a19614026ec..e1946847698b 100644
--- a/src/tools/clippy/tests/ui/or_fun_call.rs
+++ b/src/tools/clippy/tests/ui/or_fun_call.rs
@@ -53,7 +53,7 @@ fn or_fun_call() {
     with_constructor.unwrap_or(make());
     //~^ or_fun_call
 
-    let with_new = Some(vec![1]);
+    let with_new: Option> = Some(vec![1]);
     with_new.unwrap_or(Vec::new());
     //~^ unwrap_or_default
 
@@ -101,7 +101,7 @@ fn or_fun_call() {
     real_default.unwrap_or(::default());
     //~^ unwrap_or_default
 
-    let with_vec = Some(vec![1]);
+    let with_vec: Option> = Some(vec![1]);
     with_vec.unwrap_or(Vec::new());
     //~^ unwrap_or_default
 
@@ -329,7 +329,7 @@ mod lazy {
             }
         }
 
-        let with_new = Some(vec![1]);
+        let with_new: Option> = Some(vec![1]);
         with_new.unwrap_or_else(Vec::new);
         //~^ unwrap_or_default
 
diff --git a/src/tools/clippy/tests/ui/unwrap_or_else_default.fixed b/src/tools/clippy/tests/ui/unwrap_or_else_default.fixed
index 561cbce473de..5cf529fe0143 100644
--- a/src/tools/clippy/tests/ui/unwrap_or_else_default.fixed
+++ b/src/tools/clippy/tests/ui/unwrap_or_else_default.fixed
@@ -43,8 +43,7 @@ fn unwrap_or_else_default() {
     with_enum.unwrap_or_else(Enum::A);
 
     let with_new = Some(vec![1]);
-    with_new.unwrap_or_default();
-    //~^ unwrap_or_default
+    with_new.unwrap_or_else(Vec::new);
 
     let with_err: Result<_, ()> = Ok(vec![1]);
     with_err.unwrap_or_else(make);
diff --git a/src/tools/clippy/tests/ui/unwrap_or_else_default.rs b/src/tools/clippy/tests/ui/unwrap_or_else_default.rs
index 8389be964fe6..e49ff13e1f2f 100644
--- a/src/tools/clippy/tests/ui/unwrap_or_else_default.rs
+++ b/src/tools/clippy/tests/ui/unwrap_or_else_default.rs
@@ -44,7 +44,6 @@ fn unwrap_or_else_default() {
 
     let with_new = Some(vec![1]);
     with_new.unwrap_or_else(Vec::new);
-    //~^ unwrap_or_default
 
     let with_err: Result<_, ()> = Ok(vec![1]);
     with_err.unwrap_or_else(make);
diff --git a/src/tools/clippy/tests/ui/unwrap_or_else_default.stderr b/src/tools/clippy/tests/ui/unwrap_or_else_default.stderr
index a001f7e46add..610f20fa62b1 100644
--- a/src/tools/clippy/tests/ui/unwrap_or_else_default.stderr
+++ b/src/tools/clippy/tests/ui/unwrap_or_else_default.stderr
@@ -1,101 +1,95 @@
 error: use of `unwrap_or_else` to construct default value
-  --> tests/ui/unwrap_or_else_default.rs:46:14
+  --> tests/ui/unwrap_or_else_default.rs:60:23
    |
-LL |     with_new.unwrap_or_else(Vec::new);
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
+LL |     with_real_default.unwrap_or_else(::default);
+   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
    |
    = note: `-D clippy::unwrap-or-default` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::unwrap_or_default)]`
 
 error: use of `unwrap_or_else` to construct default value
-  --> tests/ui/unwrap_or_else_default.rs:61:23
-   |
-LL |     with_real_default.unwrap_or_else(::default);
-   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
-
-error: use of `unwrap_or_else` to construct default value
-  --> tests/ui/unwrap_or_else_default.rs:65:24
+  --> tests/ui/unwrap_or_else_default.rs:64:24
    |
 LL |     with_default_trait.unwrap_or_else(Default::default);
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
 
 error: use of `unwrap_or_else` to construct default value
-  --> tests/ui/unwrap_or_else_default.rs:69:23
+  --> tests/ui/unwrap_or_else_default.rs:68:23
    |
 LL |     with_default_type.unwrap_or_else(u64::default);
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
 
 error: use of `unwrap_or_else` to construct default value
-  --> tests/ui/unwrap_or_else_default.rs:73:23
+  --> tests/ui/unwrap_or_else_default.rs:72:23
    |
 LL |     with_default_type.unwrap_or_else(Vec::new);
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
 
 error: use of `unwrap_or_else` to construct default value
-  --> tests/ui/unwrap_or_else_default.rs:77:18
+  --> tests/ui/unwrap_or_else_default.rs:76:18
    |
 LL |     empty_string.unwrap_or_else(|| "".to_string());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
 
 error: use of `unwrap_or_else` to construct default value
-  --> tests/ui/unwrap_or_else_default.rs:82:12
+  --> tests/ui/unwrap_or_else_default.rs:81:12
    |
 LL |     option.unwrap_or_else(Vec::new).push(1);
    |            ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
 
 error: use of `unwrap_or_else` to construct default value
-  --> tests/ui/unwrap_or_else_default.rs:86:12
+  --> tests/ui/unwrap_or_else_default.rs:85:12
    |
 LL |     option.unwrap_or_else(Vec::new).push(1);
    |            ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
 
 error: use of `unwrap_or_else` to construct default value
-  --> tests/ui/unwrap_or_else_default.rs:90:12
+  --> tests/ui/unwrap_or_else_default.rs:89:12
    |
 LL |     option.unwrap_or_else(Vec::new).push(1);
    |            ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
 
 error: use of `unwrap_or_else` to construct default value
-  --> tests/ui/unwrap_or_else_default.rs:94:12
+  --> tests/ui/unwrap_or_else_default.rs:93:12
    |
 LL |     option.unwrap_or_else(Vec::new).push(1);
    |            ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
 
 error: use of `unwrap_or_else` to construct default value
-  --> tests/ui/unwrap_or_else_default.rs:98:12
+  --> tests/ui/unwrap_or_else_default.rs:97:12
    |
 LL |     option.unwrap_or_else(Vec::new).push(1);
    |            ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
 
 error: use of `unwrap_or_else` to construct default value
-  --> tests/ui/unwrap_or_else_default.rs:102:12
+  --> tests/ui/unwrap_or_else_default.rs:101:12
    |
 LL |     option.unwrap_or_else(Vec::new).push(1);
    |            ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
 
 error: use of `unwrap_or_else` to construct default value
-  --> tests/ui/unwrap_or_else_default.rs:106:12
+  --> tests/ui/unwrap_or_else_default.rs:105:12
    |
 LL |     option.unwrap_or_else(Vec::new).push(1);
    |            ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
 
 error: use of `unwrap_or_else` to construct default value
-  --> tests/ui/unwrap_or_else_default.rs:110:12
+  --> tests/ui/unwrap_or_else_default.rs:109:12
    |
 LL |     option.unwrap_or_else(Vec::new).push(1);
    |            ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
 
 error: use of `unwrap_or_else` to construct default value
-  --> tests/ui/unwrap_or_else_default.rs:127:12
+  --> tests/ui/unwrap_or_else_default.rs:126:12
    |
 LL |     option.unwrap_or_else(Vec::new).push(1);
    |            ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
 
 error: use of `or_insert_with` to construct default value
-  --> tests/ui/unwrap_or_else_default.rs:145:32
+  --> tests/ui/unwrap_or_else_default.rs:144:32
    |
 LL |     let _ = inner_map.entry(0).or_insert_with(Default::default);
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
 
-error: aborting due to 16 previous errors
+error: aborting due to 15 previous errors
 

From 0df1764e60e4ca63d5aeb4c78e1f4b3bf8ff3709 Mon Sep 17 00:00:00 2001
From: Ralf Jung 
Date: Sat, 7 Feb 2026 19:11:38 +0100
Subject: [PATCH 235/265] add helper to project to a field of a place

---
 compiler/rustc_middle/src/mir/statement.rs    | 16 ++++++++++++++
 .../rustc_mir_build/src/builder/expr/into.rs  | 22 +++++--------------
 2 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/compiler/rustc_middle/src/mir/statement.rs b/compiler/rustc_middle/src/mir/statement.rs
index 973ceccc67f9..b1cb89bd3713 100644
--- a/compiler/rustc_middle/src/mir/statement.rs
+++ b/compiler/rustc_middle/src/mir/statement.rs
@@ -432,6 +432,22 @@ impl<'tcx> Place<'tcx> {
         self.as_ref().project_deeper(more_projections, tcx)
     }
 
+    /// Return a place that projects to a field of the current place.
+    ///
+    /// The type of the current place must be an ADT.
+    pub fn project_to_field(
+        self,
+        idx: FieldIdx,
+        local_decls: &impl HasLocalDecls<'tcx>,
+        tcx: TyCtxt<'tcx>,
+    ) -> Self {
+        let ty = self.ty(local_decls, tcx).ty;
+        let ty::Adt(adt, args) = ty.kind() else { panic!("projecting to field of non-ADT {ty}") };
+        let field = &adt.non_enum_variant().fields[idx];
+        let field_ty = field.ty(tcx, args);
+        self.project_deeper(&[ProjectionElem::Field(idx, field_ty)], tcx)
+    }
+
     pub fn ty_from(
         local: Local,
         projection: &[PlaceElem<'tcx>],
diff --git a/compiler/rustc_mir_build/src/builder/expr/into.rs b/compiler/rustc_mir_build/src/builder/expr/into.rs
index 34fd9fc7ac63..e8427b5d6e1e 100644
--- a/compiler/rustc_mir_build/src/builder/expr/into.rs
+++ b/compiler/rustc_mir_build/src/builder/expr/into.rs
@@ -409,7 +409,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
                         // cause the borrow checker to enforce that `val` lives sufficiently
                         // long to be stored in `b`. The above lowering does this; anything that
                         // involves a `*const T` or a `NonNull` does not as those are covariant.
-                        let tcx = this.tcx;
 
                         // Extract the operands, compile `b`.
                         let [b, val] = **args else {
@@ -419,28 +418,19 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
                         else {
                             span_bug!(expr_span, "invalid init_box_via_move call")
                         };
-
-                        // Helper to project to a field of an ADT.
-                        let place_project_field = |place: Place<'tcx>, idx: FieldIdx| {
-                            let ty = place.ty(&this.local_decls, tcx).ty;
-                            let ty::Adt(adt, args) = ty.kind() else {
-                                panic!("projecting to field of non-ADT {ty}")
-                            };
-                            let field = &adt.non_enum_variant().fields[idx];
-                            let field_ty = field.ty(tcx, args);
-                            place.project_deeper(&[ProjectionElem::Field(idx, field_ty)], tcx)
-                        };
+                        let tcx = this.tcx;
+                        let decls = &this.local_decls;
 
                         // `b` is a `Box>`.
                         let place = b.project_deeper(&[ProjectionElem::Deref], tcx);
                         // Current type: `MaybeUninit`. Field #1 is `ManuallyDrop`.
-                        let place = place_project_field(place, FieldIdx::from_u32(1));
+                        let place = place.project_to_field(FieldIdx::from_u32(1), decls, tcx);
                         // Current type: `ManuallyDrop`. Field #0 is `MaybeDangling`.
-                        let place = place_project_field(place, FieldIdx::ZERO);
+                        let place = place.project_to_field(FieldIdx::ZERO, decls, tcx);
                         // Current type: `MaybeDangling`. Field #0 is `T`.
-                        let place = place_project_field(place, FieldIdx::ZERO);
+                        let place = place.project_to_field(FieldIdx::ZERO, decls, tcx);
                         // Sanity check.
-                        assert_eq!(place.ty(&this.local_decls, tcx).ty, generic_args.type_at(0));
+                        assert_eq!(place.ty(decls, tcx).ty, generic_args.type_at(0));
 
                         // Store `val` into place.
                         unpack!(block = this.expr_into_dest(place, block, val));

From b4e645fe5af113f6ec072e04d55b7eb742e236ca Mon Sep 17 00:00:00 2001
From: Eric Huss 
Date: Sun, 15 Feb 2026 11:10:23 -0800
Subject: [PATCH 236/265] Support JSON target specs in bootstrap

JSON target specs were destabilized in
https://github.com/rust-lang/rust/pull/150151 and
https://github.com/rust-lang/rust/pull/151534. However, this broke
trying to build rustc itself with a JSON target spec. This is because in
a few places bootstrap is manually calling `rustc` without the ability
for the user to provide additional flags (primarily,
`-Zunstable-options` to enable JSON targets).

There's a few different ways to fix this. One would be to change these
calls to `rustc` to include flags provided by the user (such as
`RUSTFLAGS_NOT_BOOTSTRAP`). Just to keep things simple, this PR proposes
to just unconditionally pass `-Zunstable-options`.

Another consideration here is how maintainable this is. A possible
improvement here would be to have a function somewhere
(BootstrapCommand, TargetSelection, free function) that would handle
appropriately adding the `--target` flag. For example, that's what cargo
does in
[`CompileKind::add_target_arg`](https://github.com/rust-lang/cargo/blob/592058c7ce08a2ba2628b01e7dc4ce1e72b6bdff/src/cargo/core/compiler/compile_kind.rs#L144-L154).

I have only tested building the compiler and a few tools like rustdoc. I
have not tested doing things like building other tools, running tests,
etc.

This would be much easier if there was a Docker image for testing the
use case of building rustc with a custom target spec (and even better if
that ran in CI).

After the next beta branch, using target JSON specs will become more
cumbersome because target specs with the `.json` extension will now
require passing `-Zjson-target-spec` (from
https://github.com/rust-lang/cargo/pull/16557). This does not affect
target specs without the `.json` extension (such as those from
RUST_TARGET_PATH). From my testing, it should be sufficient to pass
`CARGOFLAGS_NOT_BOOTSTRAP="-Zjson-target-spec"`. I think that should be
fine, since this is not a particularly common use case AFAIK. We could
extend bootstrap to auto-detect if the target is a file path, and pass
`-Zjson-target-spec` appropriately. I tried something similar in
https://github.com/ehuss/rust/commit/f0bdd354835a0993febaf1de214cda2abd9a8500,
which could be adapted if desired.

It would be nice if all of this is documented somewhere.
https://rustc-dev-guide.rust-lang.org/building/new-target.html does not
really say how to build the compiler with a custom json target.

Fixes https://github.com/rust-lang/rust/issues/151729
---
 src/bootstrap/src/core/build_steps/compile.rs | 3 +++
 src/bootstrap/src/core/builder/cargo.rs       | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
index adba8f19894a..46d05b9d5d2f 100644
--- a/src/bootstrap/src/core/build_steps/compile.rs
+++ b/src/bootstrap/src/core/build_steps/compile.rs
@@ -543,6 +543,9 @@ pub fn std_cargo(
         // `MACOSX_DEPLOYMENT_TARGET`, `IPHONEOS_DEPLOYMENT_TARGET`, etc.
         let mut cmd = builder.rustc_cmd(cargo.compiler());
         cmd.arg("--target").arg(target.rustc_target_arg());
+        // FIXME(#152709): -Zunstable-options is to handle JSON targets.
+        // Remove when JSON targets are stabilized.
+        cmd.arg("-Zunstable-options").env("RUSTC_BOOTSTRAP", "1");
         cmd.arg("--print=deployment-target");
         let output = cmd.run_capture_stdout(builder).stdout();
 
diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs
index e3fa826c45af..6612ae5f19b4 100644
--- a/src/bootstrap/src/core/builder/cargo.rs
+++ b/src/bootstrap/src/core/builder/cargo.rs
@@ -773,6 +773,10 @@ impl Builder<'_> {
                         .rustc_cmd(compiler)
                         .arg("--target")
                         .arg(target.rustc_target_arg())
+                        // FIXME(#152709): -Zunstable-options is to handle JSON targets.
+                        // Remove when JSON targets are stabilized.
+                        .arg("-Zunstable-options")
+                        .env("RUSTC_BOOTSTRAP", "1")
                         .arg("--print=file-names")
                         .arg("--crate-type=proc-macro")
                         .arg("-")

From 3099121bb5fb7cd3d29ffbc4acced9e356dc5ad9 Mon Sep 17 00:00:00 2001
From: Eric Huss 
Date: Mon, 16 Feb 2026 10:47:35 -0800
Subject: [PATCH 237/265] Rework explanation of CLI lint level flags

I think the previous wording as either wrong or confusing. I would
consider the CLI flags at a *lower* ranking, since source attributes are
able to override the CLI flag.
---
 src/doc/rustc/src/lints/levels.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/doc/rustc/src/lints/levels.md b/src/doc/rustc/src/lints/levels.md
index 09b55da741d6..5b23ac9e09c1 100644
--- a/src/doc/rustc/src/lints/levels.md
+++ b/src/doc/rustc/src/lints/levels.md
@@ -393,7 +393,7 @@ Here’s how these different lint controls interact:
     warning: 1 warning emitted
    ```
 
-3. [CLI level flags](#via-compiler-flag) take precedence over attributes.
+3. [CLI level flags](#via-compiler-flag) override the default level of a lint. They essentially behave like crate-level attributes. Attributes within the source code take precedence over CLI flags, except for `-F`/`--forbid`, which cannot be overridden.
 
    The order of the flags matter; flags on the right take precedence over earlier flags.
 

From 7e14260fd1f4a9bea9d6078428cd18b58c7b93d9 Mon Sep 17 00:00:00 2001
From: lcnr 
Date: Mon, 16 Feb 2026 19:35:43 +0000
Subject: [PATCH 238/265] `probe_op` silence ambiguity errors if tainted

see the `proc-macro/quote/not-repeatable.rs` test for a case where this is useful
---
 compiler/rustc_hir_typeck/src/method/probe.rs |  1 +
 .../ui/methods/call_method_unknown_pointee.rs | 43 ++++++++++++-------
 .../call_method_unknown_pointee.stderr        | 20 ++++-----
 .../methods/call_method_unknown_referent.rs   | 16 ++++---
 .../call_method_unknown_referent.stderr       |  4 +-
 tests/ui/proc-macro/quote/not-repeatable.rs   |  1 -
 .../ui/proc-macro/quote/not-repeatable.stderr | 11 +----
 tests/ui/typeck/issue-13853.rs                |  2 +-
 tests/ui/typeck/issue-13853.stderr            | 12 ++----
 9 files changed, 57 insertions(+), 53 deletions(-)

diff --git a/compiler/rustc_hir_typeck/src/method/probe.rs b/compiler/rustc_hir_typeck/src/method/probe.rs
index 2a92a4b48edc..e9802a99c1c2 100644
--- a/compiler/rustc_hir_typeck/src/method/probe.rs
+++ b/compiler/rustc_hir_typeck/src/method/probe.rs
@@ -490,6 +490,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                     .unwrap_or_else(|_| span_bug!(span, "instantiating {:?} failed?", ty));
                 let ty = self.resolve_vars_if_possible(ty.value);
                 let guar = match *ty.kind() {
+                    _ if let Some(guar) = self.tainted_by_errors() => guar,
                     ty::Infer(ty::TyVar(_)) => {
                         // We want to get the variable name that the method
                         // is being called on. If it is a method call.
diff --git a/tests/ui/methods/call_method_unknown_pointee.rs b/tests/ui/methods/call_method_unknown_pointee.rs
index a144e855ae3c..8927576239a8 100644
--- a/tests/ui/methods/call_method_unknown_pointee.rs
+++ b/tests/ui/methods/call_method_unknown_pointee.rs
@@ -3,26 +3,39 @@
 // tests that the pointee type of a raw pointer must be known to call methods on it
 // see also: `tests/ui/editions/edition-raw-pointer-method-2018.rs`
 
-fn main() {
-    let val = 1_u32;
-    let ptr = &val as *const u32;
+fn a() {
+    let ptr = &1u32 as *const u32;
     unsafe {
         let _a: i32 = (ptr as *const _).read();
         //~^ ERROR type annotations needed
+    }
+}
+
+fn b() {
+    let ptr = &1u32 as *const u32;
+    unsafe {
         let b = ptr as *const _;
         //~^ ERROR type annotations needed
         let _b: u8 = b.read();
-        let _c = (ptr as *const u8).read(); // we know the type here
-    }
-
-    let mut val = 2_u32;
-    let ptr = &mut val as *mut u32;
-    unsafe {
-        let _a: i32 = (ptr as *mut _).read();
-        //~^ ERROR type annotations needed
-        let b = ptr as *mut _;
-        //~^ ERROR type annotations needed
-        b.write(10);
-        (ptr as *mut i32).write(1000); // we know the type here
     }
 }
+
+
+fn c() {
+    let ptr = &mut 2u32 as *mut u32;
+    unsafe {
+        let _c: i32 = (ptr as *mut _).read();
+        //~^ ERROR type annotations needed
+    }
+}
+
+fn d() {
+    let ptr = &mut 2u32 as *mut u32;
+    unsafe {
+        let d = ptr as *mut _;
+        //~^ ERROR type annotations needed
+        let _d: u8 = d.read();
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/methods/call_method_unknown_pointee.stderr b/tests/ui/methods/call_method_unknown_pointee.stderr
index e20c6f8e8a17..c123533b51bc 100644
--- a/tests/ui/methods/call_method_unknown_pointee.stderr
+++ b/tests/ui/methods/call_method_unknown_pointee.stderr
@@ -1,5 +1,5 @@
 error[E0282]: type annotations needed
-  --> $DIR/call_method_unknown_pointee.rs:10:23
+  --> $DIR/call_method_unknown_pointee.rs:9:23
    |
 LL |         let _a: i32 = (ptr as *const _).read();
    |                       ^^^^^^^^^^^^^^^^^ ---- cannot call a method on a raw pointer with an unknown pointee type
@@ -7,7 +7,7 @@ LL |         let _a: i32 = (ptr as *const _).read();
    |                       cannot infer type
 
 error[E0282]: type annotations needed for `*const _`
-  --> $DIR/call_method_unknown_pointee.rs:12:13
+  --> $DIR/call_method_unknown_pointee.rs:17:13
    |
 LL |         let b = ptr as *const _;
    |             ^
@@ -21,25 +21,25 @@ LL |         let b: *const _ = ptr as *const _;
    |              ++++++++++
 
 error[E0282]: type annotations needed
-  --> $DIR/call_method_unknown_pointee.rs:21:23
+  --> $DIR/call_method_unknown_pointee.rs:27:23
    |
-LL |         let _a: i32 = (ptr as *mut _).read();
+LL |         let _c: i32 = (ptr as *mut _).read();
    |                       ^^^^^^^^^^^^^^^ ---- cannot call a method on a raw pointer with an unknown pointee type
    |                       |
    |                       cannot infer type
 
 error[E0282]: type annotations needed for `*mut _`
-  --> $DIR/call_method_unknown_pointee.rs:23:13
+  --> $DIR/call_method_unknown_pointee.rs:35:13
    |
-LL |         let b = ptr as *mut _;
+LL |         let d = ptr as *mut _;
    |             ^
 LL |
-LL |         b.write(10);
-   |           ----- cannot call a method on a raw pointer with an unknown pointee type
+LL |         let _d: u8 = d.read();
+   |                        ---- cannot call a method on a raw pointer with an unknown pointee type
    |
-help: consider giving `b` an explicit type, where the placeholders `_` are specified
+help: consider giving `d` an explicit type, where the placeholders `_` are specified
    |
-LL |         let b: *mut _ = ptr as *mut _;
+LL |         let d: *mut _ = ptr as *mut _;
    |              ++++++++
 
 error: aborting due to 4 previous errors
diff --git a/tests/ui/methods/call_method_unknown_referent.rs b/tests/ui/methods/call_method_unknown_referent.rs
index b26ecc74175b..54b8653a2109 100644
--- a/tests/ui/methods/call_method_unknown_referent.rs
+++ b/tests/ui/methods/call_method_unknown_referent.rs
@@ -14,20 +14,22 @@ impl SmartPtr {
     fn foo(&self) {}
 }
 
-fn main() {
-    let val = 1_u32;
-    let ptr = &val;
+fn a() {
+    let ptr = &1u32;
     let _a: i32 = (ptr as &_).read();
     //~^ ERROR type annotations needed
+}
 
+fn b() {
     // Same again, but with a smart pointer type
-    let val2 = 1_u32;
-    let rc = std::rc::Rc::new(val2);
+    let rc = std::rc::Rc::new(1u32);
     let _b = (rc as std::rc::Rc<_>).read();
     //~^ ERROR type annotations needed
+}
 
+fn c() {
     // Same again, but with a smart pointer type
-    let ptr = SmartPtr(val);
+    let ptr = SmartPtr(1u32);
 
     // We can call unambiguous outer-type methods on this
     (ptr as SmartPtr<_>).foo();
@@ -46,3 +48,5 @@ fn main() {
     let _c = (ptr as SmartPtr<_>).read();
     //~^ ERROR no method named `read` found for struct `SmartPtr`
 }
+
+fn main() {}
diff --git a/tests/ui/methods/call_method_unknown_referent.stderr b/tests/ui/methods/call_method_unknown_referent.stderr
index 35c7d9caf3ef..92fb32b987df 100644
--- a/tests/ui/methods/call_method_unknown_referent.stderr
+++ b/tests/ui/methods/call_method_unknown_referent.stderr
@@ -1,5 +1,5 @@
 error[E0282]: type annotations needed
-  --> $DIR/call_method_unknown_referent.rs:20:19
+  --> $DIR/call_method_unknown_referent.rs:19:19
    |
 LL |     let _a: i32 = (ptr as &_).read();
    |                   ^^^^^^^^^^^ cannot infer type
@@ -11,7 +11,7 @@ LL |     let _b = (rc as std::rc::Rc<_>).read();
    |              ^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
 
 error[E0599]: no method named `read` found for struct `SmartPtr` in the current scope
-  --> $DIR/call_method_unknown_referent.rs:46:35
+  --> $DIR/call_method_unknown_referent.rs:48:35
    |
 LL | struct SmartPtr(T);
    | ------------------ method `read` not found for this struct
diff --git a/tests/ui/proc-macro/quote/not-repeatable.rs b/tests/ui/proc-macro/quote/not-repeatable.rs
index 373f0e74dbda..55ba1669f1b1 100644
--- a/tests/ui/proc-macro/quote/not-repeatable.rs
+++ b/tests/ui/proc-macro/quote/not-repeatable.rs
@@ -10,5 +10,4 @@ fn main() {
     let ip = Ipv4Addr;
     let _ = quote! { $($ip)* };
     //~^ ERROR the method `quote_into_iter` exists for struct `Ipv4Addr`, but its trait bounds were not satisfied
-    //~| ERROR type annotations needed
 }
diff --git a/tests/ui/proc-macro/quote/not-repeatable.stderr b/tests/ui/proc-macro/quote/not-repeatable.stderr
index 6a867350a3b3..611da37f3a1f 100644
--- a/tests/ui/proc-macro/quote/not-repeatable.stderr
+++ b/tests/ui/proc-macro/quote/not-repeatable.stderr
@@ -20,13 +20,6 @@ note: the traits `Iterator` and `ToTokens` must be implemented
   --> $SRC_DIR/proc_macro/src/to_tokens.rs:LL:COL
   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
 
-error[E0282]: type annotations needed
-  --> $DIR/not-repeatable.rs:11:25
-   |
-LL |     let _ = quote! { $($ip)* };
-   |                         ^^ cannot infer type
+error: aborting due to 1 previous error
 
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0282, E0599.
-For more information about an error, try `rustc --explain E0282`.
+For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/typeck/issue-13853.rs b/tests/ui/typeck/issue-13853.rs
index ed44d5062614..ac9886d2e724 100644
--- a/tests/ui/typeck/issue-13853.rs
+++ b/tests/ui/typeck/issue-13853.rs
@@ -25,7 +25,7 @@ impl Node for Stuff {
 
 fn iterate>(graph: &G) {
     for node in graph.iter() { //~ ERROR no method named `iter` found
-        node.zomg(); //~ ERROR type annotations needed
+        node.zomg();
     }
 }
 
diff --git a/tests/ui/typeck/issue-13853.stderr b/tests/ui/typeck/issue-13853.stderr
index 4a39b404770d..45363c87d29d 100644
--- a/tests/ui/typeck/issue-13853.stderr
+++ b/tests/ui/typeck/issue-13853.stderr
@@ -17,12 +17,6 @@ error[E0599]: no method named `iter` found for reference `&G` in the current sco
 LL |     for node in graph.iter() {
    |                       ^^^^ method not found in `&G`
 
-error[E0282]: type annotations needed
-  --> $DIR/issue-13853.rs:28:9
-   |
-LL |         node.zomg();
-   |         ^^^^ cannot infer type
-
 error[E0308]: mismatched types
   --> $DIR/issue-13853.rs:37:13
    |
@@ -43,7 +37,7 @@ help: consider borrowing here
 LL |     iterate(&graph);
    |             +
 
-error: aborting due to 4 previous errors
+error: aborting due to 3 previous errors
 
-Some errors have detailed explanations: E0282, E0308, E0599.
-For more information about an error, try `rustc --explain E0282`.
+Some errors have detailed explanations: E0308, E0599.
+For more information about an error, try `rustc --explain E0308`.

From 8081e86c94119a99c8ed2462edee58f412e661b9 Mon Sep 17 00:00:00 2001
From: Oscar Bray 
Date: Mon, 16 Feb 2026 19:42:12 +0000
Subject: [PATCH 239/265] Port #![default_lib_allocator] to the new attribute
 parser

---
 .../rustc_attr_parsing/src/attributes/crate_level.rs     | 9 +++++++++
 compiler/rustc_attr_parsing/src/context.rs               | 1 +
 compiler/rustc_hir/src/attrs/data_structures.rs          | 3 +++
 compiler/rustc_hir/src/attrs/encode_cross_crate.rs       | 1 +
 compiler/rustc_metadata/src/rmeta/encoder.rs             | 5 +----
 compiler/rustc_passes/src/check_attr.rs                  | 2 +-
 6 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/compiler/rustc_attr_parsing/src/attributes/crate_level.rs b/compiler/rustc_attr_parsing/src/attributes/crate_level.rs
index bdfe7bfb8f1f..3b3bbf4f0c8a 100644
--- a/compiler/rustc_attr_parsing/src/attributes/crate_level.rs
+++ b/compiler/rustc_attr_parsing/src/attributes/crate_level.rs
@@ -292,3 +292,12 @@ impl NoArgsAttributeParser for RustcNoImplicitBoundsParser {
     const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Crate)]);
     const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcNoImplicitBounds;
 }
+
+pub(crate) struct DefaultLibAllocatorParser;
+
+impl NoArgsAttributeParser for DefaultLibAllocatorParser {
+    const PATH: &[Symbol] = &[sym::default_lib_allocator];
+    const ON_DUPLICATE: OnDuplicate = OnDuplicate::Warn;
+    const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Crate)]);
+    const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::DefaultLibAllocator;
+}
diff --git a/compiler/rustc_attr_parsing/src/context.rs b/compiler/rustc_attr_parsing/src/context.rs
index 1bb6c8aa1866..a0c672778ac1 100644
--- a/compiler/rustc_attr_parsing/src/context.rs
+++ b/compiler/rustc_attr_parsing/src/context.rs
@@ -235,6 +235,7 @@ attribute_parsers!(
         Single>,
         Single>,
         Single>,
+        Single>,
         Single>,
         Single>,
         Single>,
diff --git a/compiler/rustc_hir/src/attrs/data_structures.rs b/compiler/rustc_hir/src/attrs/data_structures.rs
index 41970fb7d35a..b8f3c898ed07 100644
--- a/compiler/rustc_hir/src/attrs/data_structures.rs
+++ b/compiler/rustc_hir/src/attrs/data_structures.rs
@@ -897,6 +897,9 @@ pub enum AttributeKind {
     /// Represents `#[debugger_visualizer]`.
     DebuggerVisualizer(ThinVec),
 
+    /// Represents `#![default_lib_allocator]`
+    DefaultLibAllocator,
+
     /// Represents [`#[deprecated]`](https://doc.rust-lang.org/stable/reference/attributes/diagnostics.html#the-deprecated-attribute).
     Deprecation { deprecation: Deprecation, span: Span },
 
diff --git a/compiler/rustc_hir/src/attrs/encode_cross_crate.rs b/compiler/rustc_hir/src/attrs/encode_cross_crate.rs
index c50a5c649ee4..86eafb984121 100644
--- a/compiler/rustc_hir/src/attrs/encode_cross_crate.rs
+++ b/compiler/rustc_hir/src/attrs/encode_cross_crate.rs
@@ -35,6 +35,7 @@ impl AttributeKind {
             CrateType(_) => No,
             CustomMir(_, _, _) => Yes,
             DebuggerVisualizer(..) => No,
+            DefaultLibAllocator => No,
             Deprecation { .. } => Yes,
             DoNotRecommend { .. } => Yes,
             Doc(_) => Yes,
diff --git a/compiler/rustc_metadata/src/rmeta/encoder.rs b/compiler/rustc_metadata/src/rmeta/encoder.rs
index 3a85b0a05052..a3d8b07fb1d9 100644
--- a/compiler/rustc_metadata/src/rmeta/encoder.rs
+++ b/compiler/rustc_metadata/src/rmeta/encoder.rs
@@ -734,10 +734,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
                 has_global_allocator: tcx.has_global_allocator(LOCAL_CRATE),
                 has_alloc_error_handler: tcx.has_alloc_error_handler(LOCAL_CRATE),
                 has_panic_handler: tcx.has_panic_handler(LOCAL_CRATE),
-                has_default_lib_allocator: ast::attr::contains_name(
-                    attrs,
-                    sym::default_lib_allocator,
-                ),
+                has_default_lib_allocator: find_attr!(attrs, AttributeKind::DefaultLibAllocator),
                 externally_implementable_items,
                 proc_macro_data,
                 debugger_visualizers,
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs
index ec0306371205..11c9ee9d61ae 100644
--- a/compiler/rustc_passes/src/check_attr.rs
+++ b/compiler/rustc_passes/src/check_attr.rs
@@ -246,6 +246,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
                     | AttributeKind::CrateName { .. }
                     | AttributeKind::CrateType(..)
                     | AttributeKind::DebuggerVisualizer(..)
+                    | AttributeKind::DefaultLibAllocator
                     // `#[doc]` is actually a lot more than just doc comments, so is checked below
                     | AttributeKind::DocComment {..}
                     | AttributeKind::EiiDeclaration { .. }
@@ -399,7 +400,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
                             | sym::deny
                             | sym::forbid
                             // internal
-                            | sym::default_lib_allocator
                             | sym::rustc_inherit_overflow_checks
                             | sym::rustc_on_unimplemented
                             | sym::rustc_doc_primitive

From 67799c97393c82a6fd378e460cfd3996fc461020 Mon Sep 17 00:00:00 2001
From: okaneco <47607823+okaneco@users.noreply.github.com>
Date: Wed, 11 Feb 2026 21:27:51 -0500
Subject: [PATCH 240/265] core: Implement feature
 `float_exact_integer_constants`

Implement accepted ACP for `MAX_EXACT_INTEGER` and `MIN_EXACT_INTEGER`
on `f16`, `f32`, `f64`, and `f128`
Add tests to `coretests/tests/floats/mod.rs`
Disable doc tests for i586 since float<->int casts return incorrect
results
---
 library/core/src/num/f128.rs          | 64 ++++++++++++++++++
 library/core/src/num/f16.rs           | 64 ++++++++++++++++++
 library/core/src/num/f32.rs           | 58 +++++++++++++++++
 library/core/src/num/f64.rs           | 58 +++++++++++++++++
 library/coretests/tests/floats/mod.rs | 93 +++++++++++++++++++++++++++
 library/coretests/tests/lib.rs        |  1 +
 6 files changed, 338 insertions(+)

diff --git a/library/core/src/num/f128.rs b/library/core/src/num/f128.rs
index d114b821655b..03bc5f20d7e9 100644
--- a/library/core/src/num/f128.rs
+++ b/library/core/src/num/f128.rs
@@ -275,6 +275,70 @@ impl f128 {
     #[unstable(feature = "f128", issue = "116909")]
     pub const NEG_INFINITY: f128 = -1.0_f128 / 0.0_f128;
 
+    /// Maximum integer that can be represented exactly in an [`f128`] value,
+    /// with no other integer converting to the same floating point value.
+    ///
+    /// For an integer `x` which satisfies `MIN_EXACT_INTEGER <= x <= MAX_EXACT_INTEGER`,
+    /// there is a "one-to-one" mapping between [`i128`] and [`f128`] values.
+    /// `MAX_EXACT_INTEGER + 1` also converts losslessly to [`f128`] and back to
+    /// [`i128`], but `MAX_EXACT_INTEGER + 2` converts to the same [`f128`] value
+    /// (and back to `MAX_EXACT_INTEGER + 1` as an integer) so there is not a
+    /// "one-to-one" mapping.
+    ///
+    /// [`MAX_EXACT_INTEGER`]: f128::MAX_EXACT_INTEGER
+    /// [`MIN_EXACT_INTEGER`]: f128::MIN_EXACT_INTEGER
+    /// ```
+    /// #![feature(f128)]
+    /// #![feature(float_exact_integer_constants)]
+    /// # // FIXME(#152635): Float rounding on `i586` does not adhere to IEEE 754
+    /// # #[cfg(not(all(target_arch = "x86", not(target_feature = "sse"))))] {
+    /// # #[cfg(target_has_reliable_f128)] {
+    /// let max_exact_int = f128::MAX_EXACT_INTEGER;
+    /// assert_eq!(max_exact_int, max_exact_int as f128 as i128);
+    /// assert_eq!(max_exact_int + 1, (max_exact_int + 1) as f128 as i128);
+    /// assert_ne!(max_exact_int + 2, (max_exact_int + 2) as f128 as i128);
+    ///
+    /// // Beyond `f128::MAX_EXACT_INTEGER`, multiple integers can map to one float value
+    /// assert_eq!((max_exact_int + 1) as f128, (max_exact_int + 2) as f128);
+    /// # }}
+    /// ```
+    // #[unstable(feature = "f128", issue = "116909")]
+    #[unstable(feature = "float_exact_integer_constants", issue = "152466")]
+    pub const MAX_EXACT_INTEGER: i128 = (1 << Self::MANTISSA_DIGITS) - 1;
+
+    /// Minimum integer that can be represented exactly in an [`f128`] value,
+    /// with no other integer converting to the same floating point value.
+    ///
+    /// For an integer `x` which satisfies `MIN_EXACT_INTEGER <= x <= MAX_EXACT_INTEGER`,
+    /// there is a "one-to-one" mapping between [`i128`] and [`f128`] values.
+    /// `MAX_EXACT_INTEGER + 1` also converts losslessly to [`f128`] and back to
+    /// [`i128`], but `MAX_EXACT_INTEGER + 2` converts to the same [`f128`] value
+    /// (and back to `MAX_EXACT_INTEGER + 1` as an integer) so there is not a
+    /// "one-to-one" mapping.
+    ///
+    /// This constant is equivalent to `-MAX_EXACT_INTEGER`.
+    ///
+    /// [`MAX_EXACT_INTEGER`]: f128::MAX_EXACT_INTEGER
+    /// [`MIN_EXACT_INTEGER`]: f128::MIN_EXACT_INTEGER
+    /// ```
+    /// #![feature(f128)]
+    /// #![feature(float_exact_integer_constants)]
+    /// # // FIXME(#152635): Float rounding on `i586` does not adhere to IEEE 754
+    /// # #[cfg(not(all(target_arch = "x86", not(target_feature = "sse"))))] {
+    /// # #[cfg(target_has_reliable_f128)] {
+    /// let min_exact_int = f128::MIN_EXACT_INTEGER;
+    /// assert_eq!(min_exact_int, min_exact_int as f128 as i128);
+    /// assert_eq!(min_exact_int - 1, (min_exact_int - 1) as f128 as i128);
+    /// assert_ne!(min_exact_int - 2, (min_exact_int - 2) as f128 as i128);
+    ///
+    /// // Below `f128::MIN_EXACT_INTEGER`, multiple integers can map to one float value
+    /// assert_eq!((min_exact_int - 1) as f128, (min_exact_int - 2) as f128);
+    /// # }}
+    /// ```
+    // #[unstable(feature = "f128", issue = "116909")]
+    #[unstable(feature = "float_exact_integer_constants", issue = "152466")]
+    pub const MIN_EXACT_INTEGER: i128 = -Self::MAX_EXACT_INTEGER;
+
     /// Sign bit
     pub(crate) const SIGN_MASK: u128 = 0x8000_0000_0000_0000_0000_0000_0000_0000;
 
diff --git a/library/core/src/num/f16.rs b/library/core/src/num/f16.rs
index 373225c5806c..ef937fccb47f 100644
--- a/library/core/src/num/f16.rs
+++ b/library/core/src/num/f16.rs
@@ -269,6 +269,70 @@ impl f16 {
     #[unstable(feature = "f16", issue = "116909")]
     pub const NEG_INFINITY: f16 = -1.0_f16 / 0.0_f16;
 
+    /// Maximum integer that can be represented exactly in an [`f16`] value,
+    /// with no other integer converting to the same floating point value.
+    ///
+    /// For an integer `x` which satisfies `MIN_EXACT_INTEGER <= x <= MAX_EXACT_INTEGER`,
+    /// there is a "one-to-one" mapping between [`i16`] and [`f16`] values.
+    /// `MAX_EXACT_INTEGER + 1` also converts losslessly to [`f16`] and back to
+    /// [`i16`], but `MAX_EXACT_INTEGER + 2` converts to the same [`f16`] value
+    /// (and back to `MAX_EXACT_INTEGER + 1` as an integer) so there is not a
+    /// "one-to-one" mapping.
+    ///
+    /// [`MAX_EXACT_INTEGER`]: f16::MAX_EXACT_INTEGER
+    /// [`MIN_EXACT_INTEGER`]: f16::MIN_EXACT_INTEGER
+    /// ```
+    /// #![feature(f16)]
+    /// #![feature(float_exact_integer_constants)]
+    /// # // FIXME(#152635): Float rounding on `i586` does not adhere to IEEE 754
+    /// # #[cfg(not(all(target_arch = "x86", not(target_feature = "sse"))))] {
+    /// # #[cfg(target_has_reliable_f16)] {
+    /// let max_exact_int = f16::MAX_EXACT_INTEGER;
+    /// assert_eq!(max_exact_int, max_exact_int as f16 as i16);
+    /// assert_eq!(max_exact_int + 1, (max_exact_int + 1) as f16 as i16);
+    /// assert_ne!(max_exact_int + 2, (max_exact_int + 2) as f16 as i16);
+    ///
+    /// // Beyond `f16::MAX_EXACT_INTEGER`, multiple integers can map to one float value
+    /// assert_eq!((max_exact_int + 1) as f16, (max_exact_int + 2) as f16);
+    /// # }}
+    /// ```
+    // #[unstable(feature = "f16", issue = "116909")]
+    #[unstable(feature = "float_exact_integer_constants", issue = "152466")]
+    pub const MAX_EXACT_INTEGER: i16 = (1 << Self::MANTISSA_DIGITS) - 1;
+
+    /// Minimum integer that can be represented exactly in an [`f16`] value,
+    /// with no other integer converting to the same floating point value.
+    ///
+    /// For an integer `x` which satisfies `MIN_EXACT_INTEGER <= x <= MAX_EXACT_INTEGER`,
+    /// there is a "one-to-one" mapping between [`i16`] and [`f16`] values.
+    /// `MAX_EXACT_INTEGER + 1` also converts losslessly to [`f16`] and back to
+    /// [`i16`], but `MAX_EXACT_INTEGER + 2` converts to the same [`f16`] value
+    /// (and back to `MAX_EXACT_INTEGER + 1` as an integer) so there is not a
+    /// "one-to-one" mapping.
+    ///
+    /// This constant is equivalent to `-MAX_EXACT_INTEGER`.
+    ///
+    /// [`MAX_EXACT_INTEGER`]: f16::MAX_EXACT_INTEGER
+    /// [`MIN_EXACT_INTEGER`]: f16::MIN_EXACT_INTEGER
+    /// ```
+    /// #![feature(f16)]
+    /// #![feature(float_exact_integer_constants)]
+    /// # // FIXME(#152635): Float rounding on `i586` does not adhere to IEEE 754
+    /// # #[cfg(not(all(target_arch = "x86", not(target_feature = "sse"))))] {
+    /// # #[cfg(target_has_reliable_f16)] {
+    /// let min_exact_int = f16::MIN_EXACT_INTEGER;
+    /// assert_eq!(min_exact_int, min_exact_int as f16 as i16);
+    /// assert_eq!(min_exact_int - 1, (min_exact_int - 1) as f16 as i16);
+    /// assert_ne!(min_exact_int - 2, (min_exact_int - 2) as f16 as i16);
+    ///
+    /// // Below `f16::MIN_EXACT_INTEGER`, multiple integers can map to one float value
+    /// assert_eq!((min_exact_int - 1) as f16, (min_exact_int - 2) as f16);
+    /// # }}
+    /// ```
+    // #[unstable(feature = "f16", issue = "116909")]
+    #[unstable(feature = "float_exact_integer_constants", issue = "152466")]
+    pub const MIN_EXACT_INTEGER: i16 = -Self::MAX_EXACT_INTEGER;
+
     /// Sign bit
     pub(crate) const SIGN_MASK: u16 = 0x8000;
 
diff --git a/library/core/src/num/f32.rs b/library/core/src/num/f32.rs
index f3c7961931a1..aac81d48c1b4 100644
--- a/library/core/src/num/f32.rs
+++ b/library/core/src/num/f32.rs
@@ -513,6 +513,64 @@ impl f32 {
     #[stable(feature = "assoc_int_consts", since = "1.43.0")]
     pub const NEG_INFINITY: f32 = -1.0_f32 / 0.0_f32;
 
+    /// Maximum integer that can be represented exactly in an [`f32`] value,
+    /// with no other integer converting to the same floating point value.
+    ///
+    /// For an integer `x` which satisfies `MIN_EXACT_INTEGER <= x <= MAX_EXACT_INTEGER`,
+    /// there is a "one-to-one" mapping between [`i32`] and [`f32`] values.
+    /// `MAX_EXACT_INTEGER + 1` also converts losslessly to [`f32`] and back to
+    /// [`i32`], but `MAX_EXACT_INTEGER + 2` converts to the same [`f32`] value
+    /// (and back to `MAX_EXACT_INTEGER + 1` as an integer) so there is not a
+    /// "one-to-one" mapping.
+    ///
+    /// [`MAX_EXACT_INTEGER`]: f32::MAX_EXACT_INTEGER
+    /// [`MIN_EXACT_INTEGER`]: f32::MIN_EXACT_INTEGER
+    /// ```
+    /// #![feature(float_exact_integer_constants)]
+    /// # // FIXME(#152635): Float rounding on `i586` does not adhere to IEEE 754
+    /// # #[cfg(not(all(target_arch = "x86", not(target_feature = "sse"))))] {
+    /// let max_exact_int = f32::MAX_EXACT_INTEGER;
+    /// assert_eq!(max_exact_int, max_exact_int as f32 as i32);
+    /// assert_eq!(max_exact_int + 1, (max_exact_int + 1) as f32 as i32);
+    /// assert_ne!(max_exact_int + 2, (max_exact_int + 2) as f32 as i32);
+    ///
+    /// // Beyond `f32::MAX_EXACT_INTEGER`, multiple integers can map to one float value
+    /// assert_eq!((max_exact_int + 1) as f32, (max_exact_int + 2) as f32);
+    /// # }
+    /// ```
+    #[unstable(feature = "float_exact_integer_constants", issue = "152466")]
+    pub const MAX_EXACT_INTEGER: i32 = (1 << Self::MANTISSA_DIGITS) - 1;
+
+    /// Minimum integer that can be represented exactly in an [`f32`] value,
+    /// with no other integer converting to the same floating point value.
+    ///
+    /// For an integer `x` which satisfies `MIN_EXACT_INTEGER <= x <= MAX_EXACT_INTEGER`,
+    /// there is a "one-to-one" mapping between [`i32`] and [`f32`] values.
+    /// `MAX_EXACT_INTEGER + 1` also converts losslessly to [`f32`] and back to
+    /// [`i32`], but `MAX_EXACT_INTEGER + 2` converts to the same [`f32`] value
+    /// (and back to `MAX_EXACT_INTEGER + 1` as an integer) so there is not a
+    /// "one-to-one" mapping.
+    ///
+    /// This constant is equivalent to `-MAX_EXACT_INTEGER`.
+    ///
+    /// [`MAX_EXACT_INTEGER`]: f32::MAX_EXACT_INTEGER
+    /// [`MIN_EXACT_INTEGER`]: f32::MIN_EXACT_INTEGER
+    /// ```
+    /// #![feature(float_exact_integer_constants)]
+    /// # // FIXME(#152635): Float rounding on `i586` does not adhere to IEEE 754
+    /// # #[cfg(not(all(target_arch = "x86", not(target_feature = "sse"))))] {
+    /// let min_exact_int = f32::MIN_EXACT_INTEGER;
+    /// assert_eq!(min_exact_int, min_exact_int as f32 as i32);
+    /// assert_eq!(min_exact_int - 1, (min_exact_int - 1) as f32 as i32);
+    /// assert_ne!(min_exact_int - 2, (min_exact_int - 2) as f32 as i32);
+    ///
+    /// // Below `f32::MIN_EXACT_INTEGER`, multiple integers can map to one float value
+    /// assert_eq!((min_exact_int - 1) as f32, (min_exact_int - 2) as f32);
+    /// # }
+    /// ```
+    #[unstable(feature = "float_exact_integer_constants", issue = "152466")]
+    pub const MIN_EXACT_INTEGER: i32 = -Self::MAX_EXACT_INTEGER;
+
     /// Sign bit
     pub(crate) const SIGN_MASK: u32 = 0x8000_0000;
 
diff --git a/library/core/src/num/f64.rs b/library/core/src/num/f64.rs
index a6fd3b1cb5d0..bacf429e77fa 100644
--- a/library/core/src/num/f64.rs
+++ b/library/core/src/num/f64.rs
@@ -512,6 +512,64 @@ impl f64 {
     #[stable(feature = "assoc_int_consts", since = "1.43.0")]
     pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
 
+    /// Maximum integer that can be represented exactly in an [`f64`] value,
+    /// with no other integer converting to the same floating point value.
+    ///
+    /// For an integer `x` which satisfies `MIN_EXACT_INTEGER <= x <= MAX_EXACT_INTEGER`,
+    /// there is a "one-to-one" mapping between [`i64`] and [`f64`] values.
+    /// `MAX_EXACT_INTEGER + 1` also converts losslessly to [`f64`] and back to
+    /// [`i64`], but `MAX_EXACT_INTEGER + 2` converts to the same [`f64`] value
+    /// (and back to `MAX_EXACT_INTEGER + 1` as an integer) so there is not a
+    /// "one-to-one" mapping.
+    ///
+    /// [`MAX_EXACT_INTEGER`]: f64::MAX_EXACT_INTEGER
+    /// [`MIN_EXACT_INTEGER`]: f64::MIN_EXACT_INTEGER
+    /// ```
+    /// #![feature(float_exact_integer_constants)]
+    /// # // FIXME(#152635): Float rounding on `i586` does not adhere to IEEE 754
+    /// # #[cfg(not(all(target_arch = "x86", not(target_feature = "sse"))))] {
+    /// let max_exact_int = f64::MAX_EXACT_INTEGER;
+    /// assert_eq!(max_exact_int, max_exact_int as f64 as i64);
+    /// assert_eq!(max_exact_int + 1, (max_exact_int + 1) as f64 as i64);
+    /// assert_ne!(max_exact_int + 2, (max_exact_int + 2) as f64 as i64);
+    ///
+    /// // Beyond `f64::MAX_EXACT_INTEGER`, multiple integers can map to one float value
+    /// assert_eq!((max_exact_int + 1) as f64, (max_exact_int + 2) as f64);
+    /// # }
+    /// ```
+    #[unstable(feature = "float_exact_integer_constants", issue = "152466")]
+    pub const MAX_EXACT_INTEGER: i64 = (1 << Self::MANTISSA_DIGITS) - 1;
+
+    /// Minimum integer that can be represented exactly in an [`f64`] value,
+    /// with no other integer converting to the same floating point value.
+    ///
+    /// For an integer `x` which satisfies `MIN_EXACT_INTEGER <= x <= MAX_EXACT_INTEGER`,
+    /// there is a "one-to-one" mapping between [`i64`] and [`f64`] values.
+    /// `MAX_EXACT_INTEGER + 1` also converts losslessly to [`f64`] and back to
+    /// [`i64`], but `MAX_EXACT_INTEGER + 2` converts to the same [`f64`] value
+    /// (and back to `MAX_EXACT_INTEGER + 1` as an integer) so there is not a
+    /// "one-to-one" mapping.
+    ///
+    /// This constant is equivalent to `-MAX_EXACT_INTEGER`.
+    ///
+    /// [`MAX_EXACT_INTEGER`]: f64::MAX_EXACT_INTEGER
+    /// [`MIN_EXACT_INTEGER`]: f64::MIN_EXACT_INTEGER
+    /// ```
+    /// #![feature(float_exact_integer_constants)]
+    /// # // FIXME(#152635): Float rounding on `i586` does not adhere to IEEE 754
+    /// # #[cfg(not(all(target_arch = "x86", not(target_feature = "sse"))))] {
+    /// let min_exact_int = f64::MIN_EXACT_INTEGER;
+    /// assert_eq!(min_exact_int, min_exact_int as f64 as i64);
+    /// assert_eq!(min_exact_int - 1, (min_exact_int - 1) as f64 as i64);
+    /// assert_ne!(min_exact_int - 2, (min_exact_int - 2) as f64 as i64);
+    ///
+    /// // Below `f64::MIN_EXACT_INTEGER`, multiple integers can map to one float value
+    /// assert_eq!((min_exact_int - 1) as f64, (min_exact_int - 2) as f64);
+    /// # }
+    /// ```
+    #[unstable(feature = "float_exact_integer_constants", issue = "152466")]
+    pub const MIN_EXACT_INTEGER: i64 = -Self::MAX_EXACT_INTEGER;
+
     /// Sign bit
     pub(crate) const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
 
diff --git a/library/coretests/tests/floats/mod.rs b/library/coretests/tests/floats/mod.rs
index c61961f8584e..b729cdf8458d 100644
--- a/library/coretests/tests/floats/mod.rs
+++ b/library/coretests/tests/floats/mod.rs
@@ -5,6 +5,8 @@ trait TestableFloat: Sized {
     const BITS: u32;
     /// Unsigned int with the same size, for converting to/from bits.
     type Int;
+    /// Signed int with the same size.
+    type SInt;
     /// Set the default tolerance for float comparison based on the type.
     const APPROX: Self;
     /// Allow looser tolerance for f32 on miri
@@ -61,6 +63,7 @@ trait TestableFloat: Sized {
 impl TestableFloat for f16 {
     const BITS: u32 = 16;
     type Int = u16;
+    type SInt = i16;
     const APPROX: Self = 1e-3;
     const POWF_APPROX: Self = 5e-1;
     const _180_TO_RADIANS_APPROX: Self = 1e-2;
@@ -101,6 +104,7 @@ impl TestableFloat for f16 {
 impl TestableFloat for f32 {
     const BITS: u32 = 32;
     type Int = u32;
+    type SInt = i32;
     const APPROX: Self = 1e-6;
     /// Miri adds some extra errors to float functions; make sure the tests still pass.
     /// These values are purely used as a canary to test against and are thus not a stable guarantee Rust provides.
@@ -143,6 +147,7 @@ impl TestableFloat for f32 {
 impl TestableFloat for f64 {
     const BITS: u32 = 64;
     type Int = u64;
+    type SInt = i64;
     const APPROX: Self = 1e-6;
     const GAMMA_APPROX_LOOSE: Self = 1e-4;
     const LNGAMMA_APPROX_LOOSE: Self = 1e-4;
@@ -170,6 +175,7 @@ impl TestableFloat for f64 {
 impl TestableFloat for f128 {
     const BITS: u32 = 128;
     type Int = u128;
+    type SInt = i128;
     const APPROX: Self = 1e-9;
     const EXP_APPROX: Self = 1e-12;
     const LN_APPROX: Self = 1e-12;
@@ -2003,6 +2009,93 @@ float_test! {
     }
 }
 
+// Test the `float_exact_integer_constants` feature
+float_test! {
+    name: max_exact_integer_constant,
+    attrs: {
+        f16: #[cfg(any(miri, target_has_reliable_f16))],
+        f128: #[cfg(any(miri, target_has_reliable_f128))],
+    },
+    test {
+        // The maximum integer that converts to a unique floating point
+        // value.
+        const MAX_EXACT_INTEGER: ::SInt = Float::MAX_EXACT_INTEGER;
+
+        let max_minus_one = (MAX_EXACT_INTEGER - 1) as Float as ::SInt;
+        let max_plus_one = (MAX_EXACT_INTEGER + 1) as Float as ::SInt;
+        let max_plus_two = (MAX_EXACT_INTEGER + 2) as Float as ::SInt;
+
+        // This does an extra round trip back to float for the second operand in
+        // order to print the results if there is a mismatch
+        assert_biteq!((MAX_EXACT_INTEGER - 1) as Float, max_minus_one as Float);
+        assert_biteq!(MAX_EXACT_INTEGER as Float, MAX_EXACT_INTEGER as Float as ::SInt as Float);
+        assert_biteq!((MAX_EXACT_INTEGER + 1) as Float, max_plus_one as Float);
+        // The first non-unique conversion, where `max_plus_two` roundtrips to
+        // `max_plus_one`
+        assert_biteq!((MAX_EXACT_INTEGER + 1) as Float, (MAX_EXACT_INTEGER + 2) as Float);
+        assert_biteq!((MAX_EXACT_INTEGER + 2) as Float, max_plus_one as Float);
+        assert_biteq!((MAX_EXACT_INTEGER + 2) as Float, max_plus_two as Float);
+
+        // Lossless roundtrips, for integers
+        assert!(MAX_EXACT_INTEGER - 1 == max_minus_one);
+        assert!(MAX_EXACT_INTEGER == MAX_EXACT_INTEGER as Float as ::SInt);
+        assert!(MAX_EXACT_INTEGER + 1 == max_plus_one);
+        // The first non-unique conversion, where `max_plus_two` roundtrips to
+        // one less than the starting value
+        assert!(MAX_EXACT_INTEGER + 2 != max_plus_two);
+
+        // max-1 | max+0 | max+1 | max+2
+        // After roundtripping, +1 and +2 will equal each other
+        assert!(max_minus_one != MAX_EXACT_INTEGER);
+        assert!(MAX_EXACT_INTEGER != max_plus_one);
+        assert!(max_plus_one == max_plus_two);
+    }
+}
+
+float_test! {
+    name: min_exact_integer_constant,
+    attrs: {
+        f16: #[cfg(any(miri, target_has_reliable_f16))],
+        f128: #[cfg(any(miri, target_has_reliable_f128))],
+    },
+    test {
+        // The minimum integer that converts to a unique floating point
+        // value.
+        const MIN_EXACT_INTEGER: ::SInt = Float::MIN_EXACT_INTEGER;
+
+        // Same logic as the `max` test, but we work our way leftward
+        // across the number line from (min_exact + 1) to (min_exact - 2).
+        let min_plus_one = (MIN_EXACT_INTEGER + 1) as Float as ::SInt;
+        let min_minus_one = (MIN_EXACT_INTEGER - 1) as Float as ::SInt;
+        let min_minus_two = (MIN_EXACT_INTEGER - 2) as Float as ::SInt;
+
+        // This does an extra round trip back to float for the second operand in
+        // order to print the results if there is a mismatch
+        assert_biteq!((MIN_EXACT_INTEGER + 1) as Float, min_plus_one as Float);
+        assert_biteq!(MIN_EXACT_INTEGER as Float, MIN_EXACT_INTEGER as Float as ::SInt as Float);
+        assert_biteq!((MIN_EXACT_INTEGER - 1) as Float, min_minus_one as Float);
+        // The first non-unique conversion, which roundtrips to one
+        // greater than the starting value.
+        assert_biteq!((MIN_EXACT_INTEGER - 1) as Float, (MIN_EXACT_INTEGER - 2) as Float);
+        assert_biteq!((MIN_EXACT_INTEGER - 2) as Float, min_minus_one as Float);
+        assert_biteq!((MIN_EXACT_INTEGER - 2) as Float, min_minus_two as Float);
+
+        // Lossless roundtrips, for integers
+        assert!(MIN_EXACT_INTEGER + 1 == min_plus_one);
+        assert!(MIN_EXACT_INTEGER == MIN_EXACT_INTEGER as Float as ::SInt);
+        assert!(MIN_EXACT_INTEGER - 1 == min_minus_one);
+        // The first non-unique conversion, which roundtrips to one
+        // greater than the starting value.
+        assert!(MIN_EXACT_INTEGER - 2 != min_minus_two);
+
+        // min-2 | min-1 | min | min+1
+        // After roundtripping, -2 and -1 will equal each other.
+        assert!(min_plus_one != MIN_EXACT_INTEGER);
+        assert!(MIN_EXACT_INTEGER != min_minus_one);
+        assert!(min_minus_one == min_minus_two);
+    }
+}
+
 // FIXME(f128): Uncomment and adapt these tests once the From<{u64,i64}> impls are added.
 // float_test! {
 //     name: from_u64_i64,
diff --git a/library/coretests/tests/lib.rs b/library/coretests/tests/lib.rs
index 34732741a21c..85ee7cff6826 100644
--- a/library/coretests/tests/lib.rs
+++ b/library/coretests/tests/lib.rs
@@ -53,6 +53,7 @@
 #![feature(f128)]
 #![feature(float_algebraic)]
 #![feature(float_bits_const)]
+#![feature(float_exact_integer_constants)]
 #![feature(float_gamma)]
 #![feature(float_minimum_maximum)]
 #![feature(flt2dec)]

From 7be024fc06538914615971c2c5b2c964dde5551f Mon Sep 17 00:00:00 2001
From: okaneco <47607823+okaneco@users.noreply.github.com>
Date: Thu, 12 Feb 2026 15:38:13 -0500
Subject: [PATCH 241/265] [cg_clif]: Fix codegen of f128 to i128 casts

Correct name for intrinsic that converts f128 to u128
Use `to_signed` instead of `from_signed` to ensure proper intrinsic
selected for u128/i128
---
 compiler/rustc_codegen_cranelift/src/codegen_f16_f128.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/rustc_codegen_cranelift/src/codegen_f16_f128.rs b/compiler/rustc_codegen_cranelift/src/codegen_f16_f128.rs
index 86bff32dc623..d8977657e305 100644
--- a/compiler/rustc_codegen_cranelift/src/codegen_f16_f128.rs
+++ b/compiler/rustc_codegen_cranelift/src/codegen_f16_f128.rs
@@ -208,7 +208,7 @@ pub(crate) fn codegen_cast(
         let ret_ty = if to_ty.bits() < 32 { types::I32 } else { to_ty };
         let name = format!(
             "__fix{sign}tf{size}i",
-            sign = if from_signed { "" } else { "un" },
+            sign = if to_signed { "" } else { "uns" },
             size = match ret_ty {
                 types::I32 => 's',
                 types::I64 => 'd',

From e8b0e6b990707fce4693a26819a1df4006fdb684 Mon Sep 17 00:00:00 2001
From: Kivooeo 
Date: Fri, 13 Feb 2026 21:17:53 +0000
Subject: [PATCH 242/265] add regression test

---
 .../resolve/exported-macro-in-mod-147958.rs   | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 tests/ui/resolve/exported-macro-in-mod-147958.rs

diff --git a/tests/ui/resolve/exported-macro-in-mod-147958.rs b/tests/ui/resolve/exported-macro-in-mod-147958.rs
new file mode 100644
index 000000000000..5003c410b692
--- /dev/null
+++ b/tests/ui/resolve/exported-macro-in-mod-147958.rs
@@ -0,0 +1,21 @@
+//! Regression test for 
+
+//@ check-pass
+
+#![feature(decl_macro)]
+
+macro_rules! exported {
+    () => {
+        #[macro_export]
+        macro_rules! exported {
+            () => {};
+        }
+    };
+}
+use inner1::*;
+exported!();
+mod inner1 {
+    pub macro exported() {}
+}
+
+fn main() {}

From 18a707fc8e8126917c74982954b07b1adacdde6b Mon Sep 17 00:00:00 2001
From: Jubilee Young 
Date: Mon, 16 Feb 2026 17:41:30 -0800
Subject: [PATCH 243/265] Revert "Fix an ICE in the vtable iteration for a
 trait reference"

The ICE fix appears to be unsound, causing a miscompilation involving
`dyn Trait` and `async {}` which induces segfaults in safe Rust code.
As the patch only hid an ICE, it does not seem worth the risk.

This reverts commit 8afd63610b0a261d3c39e24140c6a87d3bff075c, reversing
changes made to 19122c03c7bea6bde1dfa5c81fca5810953d9f39.
---
 .../src/traits/vtable.rs                      |  8 ++++--
 .../135470.rs}                                |  6 +----
 tests/crashes/137190-2.rs                     | 18 +++++++++++++
 tests/crashes/137190-3.rs                     | 10 ++++++++
 .../vtable-unsatisfied-supertrait-generics.rs | 25 -------------------
 ...ble-unsatisfied-supertrait-generics.stderr | 20 ---------------
 .../coercion/vtable-unsatisfied-supertrait.rs | 16 ------------
 .../vtable-unsatisfied-supertrait.stderr      | 20 ---------------
 8 files changed, 35 insertions(+), 88 deletions(-)
 rename tests/{ui/coercion/vtable-impossible-predicates-async.rs => crashes/135470.rs} (79%)
 create mode 100644 tests/crashes/137190-2.rs
 create mode 100644 tests/crashes/137190-3.rs
 delete mode 100644 tests/ui/coercion/vtable-unsatisfied-supertrait-generics.rs
 delete mode 100644 tests/ui/coercion/vtable-unsatisfied-supertrait-generics.stderr
 delete mode 100644 tests/ui/coercion/vtable-unsatisfied-supertrait.rs
 delete mode 100644 tests/ui/coercion/vtable-unsatisfied-supertrait.stderr

diff --git a/compiler/rustc_trait_selection/src/traits/vtable.rs b/compiler/rustc_trait_selection/src/traits/vtable.rs
index 825c06883a54..539c1d3a35ba 100644
--- a/compiler/rustc_trait_selection/src/traits/vtable.rs
+++ b/compiler/rustc_trait_selection/src/traits/vtable.rs
@@ -12,7 +12,7 @@ use rustc_span::DUMMY_SP;
 use smallvec::{SmallVec, smallvec};
 use tracing::debug;
 
-use crate::traits::is_vtable_safe_method;
+use crate::traits::{impossible_predicates, is_vtable_safe_method};
 
 #[derive(Clone, Debug)]
 pub enum VtblSegment<'tcx> {
@@ -271,7 +271,11 @@ fn vtable_entries<'tcx>(
                     // do not hold for this particular set of type parameters.
                     // Note that this method could then never be called, so we
                     // do not want to try and codegen it, in that case (see #23435).
-                    if tcx.instantiate_and_check_impossible_predicates((def_id, args)) {
+                    let predicates = tcx.predicates_of(def_id).instantiate_own(tcx, args);
+                    if impossible_predicates(
+                        tcx,
+                        predicates.map(|(predicate, _)| predicate).collect(),
+                    ) {
                         debug!("vtable_entries: predicates do not hold");
                         return VtblEntry::Vacant;
                     }
diff --git a/tests/ui/coercion/vtable-impossible-predicates-async.rs b/tests/crashes/135470.rs
similarity index 79%
rename from tests/ui/coercion/vtable-impossible-predicates-async.rs
rename to tests/crashes/135470.rs
index fe6aa9843fc6..efa017b5457c 100644
--- a/tests/ui/coercion/vtable-impossible-predicates-async.rs
+++ b/tests/crashes/135470.rs
@@ -1,8 +1,4 @@
-// Regression test for #135470.
-// Verify that we don't ICE when building vtable entries
-// for a blanket impl involving async and impossible predicates.
-
-//@ check-pass
+//@ known-bug: #135470
 //@ compile-flags: -Copt-level=0
 //@ edition: 2021
 
diff --git a/tests/crashes/137190-2.rs b/tests/crashes/137190-2.rs
new file mode 100644
index 000000000000..0c68b5aa4a51
--- /dev/null
+++ b/tests/crashes/137190-2.rs
@@ -0,0 +1,18 @@
+//@ known-bug: #137190
+trait Supertrait {
+    fn method(&self) {}
+}
+
+trait Trait

: Supertrait<()> {} + +impl

Trait

for () {} + +const fn upcast

(x: &dyn Trait

) -> &dyn Supertrait<()> { + x +} + +const fn foo() -> &'static dyn Supertrait<()> { + upcast::<()>(&()) +} + +const _: &'static dyn Supertrait<()> = foo(); diff --git a/tests/crashes/137190-3.rs b/tests/crashes/137190-3.rs new file mode 100644 index 000000000000..88ae88e11bcd --- /dev/null +++ b/tests/crashes/137190-3.rs @@ -0,0 +1,10 @@ +//@ known-bug: #137190 +trait Supertrait { + fn method(&self) {} +} + +trait Trait: Supertrait {} + +impl Trait for () {} + +const _: &dyn Supertrait = &() as &dyn Trait as &dyn Supertrait; diff --git a/tests/ui/coercion/vtable-unsatisfied-supertrait-generics.rs b/tests/ui/coercion/vtable-unsatisfied-supertrait-generics.rs deleted file mode 100644 index 41e603fc0a0a..000000000000 --- a/tests/ui/coercion/vtable-unsatisfied-supertrait-generics.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Regression test for #137190. -// Variant of vtable-unsatisfied-supertrait.rs with generic traits. -// Verify that we don't ICE when building vtable entries -// for a generic trait whose supertrait is not implemented. - -//@ compile-flags: --crate-type lib - -trait Supertrait { - fn method(&self) {} -} - -trait Trait

: Supertrait<()> {} - -impl

Trait

for () {} -//~^ ERROR the trait bound `(): Supertrait<()>` is not satisfied - -const fn upcast

(x: &dyn Trait

) -> &dyn Supertrait<()> { - x -} - -const fn foo() -> &'static dyn Supertrait<()> { - upcast::<()>(&()) -} - -const _: &'static dyn Supertrait<()> = foo(); diff --git a/tests/ui/coercion/vtable-unsatisfied-supertrait-generics.stderr b/tests/ui/coercion/vtable-unsatisfied-supertrait-generics.stderr deleted file mode 100644 index a485d2d53953..000000000000 --- a/tests/ui/coercion/vtable-unsatisfied-supertrait-generics.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0277]: the trait bound `(): Supertrait<()>` is not satisfied - --> $DIR/vtable-unsatisfied-supertrait-generics.rs:14:22 - | -LL | impl

Trait

for () {} - | ^^ the trait `Supertrait<()>` is not implemented for `()` - | -help: this trait has no implementations, consider adding one - --> $DIR/vtable-unsatisfied-supertrait-generics.rs:8:1 - | -LL | trait Supertrait { - | ^^^^^^^^^^^^^^^^^^^ -note: required by a bound in `Trait` - --> $DIR/vtable-unsatisfied-supertrait-generics.rs:12:17 - | -LL | trait Trait

: Supertrait<()> {} - | ^^^^^^^^^^^^^^ required by this bound in `Trait` - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/coercion/vtable-unsatisfied-supertrait.rs b/tests/ui/coercion/vtable-unsatisfied-supertrait.rs deleted file mode 100644 index 26a83d2fb066..000000000000 --- a/tests/ui/coercion/vtable-unsatisfied-supertrait.rs +++ /dev/null @@ -1,16 +0,0 @@ -// Regression test for #137190. -// Verify that we don't ICE when building vtable entries -// for a trait whose supertrait is not implemented. - -//@ compile-flags: --crate-type lib - -trait Supertrait { - fn method(&self) {} -} - -trait Trait: Supertrait {} - -impl Trait for () {} -//~^ ERROR the trait bound `(): Supertrait` is not satisfied - -const _: &dyn Supertrait = &() as &dyn Trait as &dyn Supertrait; diff --git a/tests/ui/coercion/vtable-unsatisfied-supertrait.stderr b/tests/ui/coercion/vtable-unsatisfied-supertrait.stderr deleted file mode 100644 index 7df2c95c7fac..000000000000 --- a/tests/ui/coercion/vtable-unsatisfied-supertrait.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0277]: the trait bound `(): Supertrait` is not satisfied - --> $DIR/vtable-unsatisfied-supertrait.rs:13:16 - | -LL | impl Trait for () {} - | ^^ the trait `Supertrait` is not implemented for `()` - | -help: this trait has no implementations, consider adding one - --> $DIR/vtable-unsatisfied-supertrait.rs:7:1 - | -LL | trait Supertrait { - | ^^^^^^^^^^^^^^^^ -note: required by a bound in `Trait` - --> $DIR/vtable-unsatisfied-supertrait.rs:11:14 - | -LL | trait Trait: Supertrait {} - | ^^^^^^^^^^ required by this bound in `Trait` - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0277`. From 52b19f7dda198e0e9df00efabd02cb2937d4fc85 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Mon, 16 Feb 2026 20:56:23 +0100 Subject: [PATCH 244/265] compiler: Don't mark `SingleUseConsts` MIR pass as "required for soundness" Because: * Something like it did not exist before PR 107404 * That it is not run our mir-opt-level 0 indicates that it is not required for soundness * Its `MirPass::can_be_overridden()` is unchanged and thus returns true, indicating that it is not a required MIR pass. * No test fails in PR 151426 that stops enabling by default in non-optimized builds As can be seen from the updated test `tests/mir-opt/optimize_none.rs`, this means that `#[optimize(none)]` functions become even less optimized. As expected and as desired. --- compiler/rustc_mir_transform/src/single_use_consts.rs | 2 +- tests/mir-opt/optimize_none.rs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_mir_transform/src/single_use_consts.rs b/compiler/rustc_mir_transform/src/single_use_consts.rs index 02caa92ad3fc..6d33736d64ec 100644 --- a/compiler/rustc_mir_transform/src/single_use_consts.rs +++ b/compiler/rustc_mir_transform/src/single_use_consts.rs @@ -85,7 +85,7 @@ impl<'tcx> crate::MirPass<'tcx> for SingleUseConsts { } fn is_required(&self) -> bool { - true + false } } diff --git a/tests/mir-opt/optimize_none.rs b/tests/mir-opt/optimize_none.rs index a5b541bd2b62..99efcc35e595 100644 --- a/tests/mir-opt/optimize_none.rs +++ b/tests/mir-opt/optimize_none.rs @@ -15,13 +15,14 @@ pub fn add_noopt() -> i32 { #[optimize(none)] pub fn const_branch() -> i32 { // CHECK-LABEL: fn const_branch( - // CHECK: switchInt(const true) -> [0: [[FALSE:bb[0-9]+]], otherwise: [[TRUE:bb[0-9]+]]]; + // CHECK: [[BOOL:_[0-9]+]] = const true; + // CHECK: switchInt(move [[BOOL]]) -> [0: [[BB_FALSE:bb[0-9]+]], otherwise: [[BB_TRUE:bb[0-9]+]]]; // CHECK-NEXT: } - // CHECK: [[FALSE]]: { + // CHECK: [[BB_FALSE]]: { // CHECK-NEXT: _0 = const 0 // CHECK-NEXT: goto // CHECK-NEXT: } - // CHECK: [[TRUE]]: { + // CHECK: [[BB_TRUE]]: { // CHECK-NEXT: _0 = const 1 // CHECK-NEXT: goto // CHECK-NEXT: } From fbb34d8c753fd10d387056b2ce0d4d58370b8191 Mon Sep 17 00:00:00 2001 From: Zalathar Date: Sun, 15 Feb 2026 18:42:52 +1100 Subject: [PATCH 245/265] Remove wrapper struct `QueryCtxt` This struct was only wrapping `TyCtxt` in order to implement traits that were removed by RUST-152636. This commit also slightly simplifies the signature of `execute_job_incr`, by having it call `tcx.dep_graph.data()` internally. --- compiler/rustc_interface/src/interface.rs | 4 +- compiler/rustc_interface/src/util.rs | 5 +- compiler/rustc_query_impl/src/execution.rs | 181 +++++++++--------- compiler/rustc_query_impl/src/job.rs | 10 +- compiler/rustc_query_impl/src/lib.rs | 22 +-- compiler/rustc_query_impl/src/plumbing.rs | 204 +++++++++------------ 6 files changed, 203 insertions(+), 223 deletions(-) diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs index 34c064362168..2c3afcc7a036 100644 --- a/compiler/rustc_interface/src/interface.rs +++ b/compiler/rustc_interface/src/interface.rs @@ -16,7 +16,7 @@ use rustc_parse::lexer::StripTokens; use rustc_parse::new_parser_from_source_str; use rustc_parse::parser::Recovery; use rustc_parse::parser::attr::AllowLeadingUnsafe; -use rustc_query_impl::{QueryCtxt, print_query_stack}; +use rustc_query_impl::print_query_stack; use rustc_session::config::{self, Cfg, CheckCfg, ExpectedValues, Input, OutFileName}; use rustc_session::parse::ParseSess; use rustc_session::{CompilerIO, EarlyDiagCtxt, Session, lint}; @@ -556,7 +556,7 @@ pub fn try_print_query_stack( let all_frames = ty::tls::with_context_opt(|icx| { if let Some(icx) = icx { ty::print::with_no_queries!(print_query_stack( - QueryCtxt::new(icx.tcx), + icx.tcx, icx.query, dcx, limit_frames, diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs index 613b3c64efed..08e40116b47c 100644 --- a/compiler/rustc_interface/src/util.rs +++ b/compiler/rustc_interface/src/util.rs @@ -18,6 +18,7 @@ use rustc_data_structures::sync; use rustc_metadata::{DylibError, EncodedMetadata, load_symbol_from_dylib}; use rustc_middle::dep_graph::{WorkProduct, WorkProductId}; use rustc_middle::ty::{CurrentGcx, TyCtxt}; +use rustc_query_impl::collect_active_jobs_from_all_queries; use rustc_session::config::{ Cfg, CrateType, OutFileName, OutputFilenames, OutputTypes, Sysroot, host_tuple, }; @@ -184,7 +185,7 @@ pub(crate) fn run_in_thread_pool_with_globals< use rustc_data_structures::defer; use rustc_data_structures::sync::FromDyn; use rustc_middle::ty::tls; - use rustc_query_impl::{QueryCtxt, break_query_cycles}; + use rustc_query_impl::break_query_cycles; let thread_stack_size = init_stack_size(thread_builder_diag); @@ -253,7 +254,7 @@ internal compiler error: query cycle handler thread panicked, aborting process"; || { // Ensure there were no errors collecting all active jobs. // We need the complete map to ensure we find a cycle to break. - QueryCtxt::new(tcx).collect_active_jobs_from_all_queries(false).expect( + collect_active_jobs_from_all_queries(tcx, false).expect( "failed to collect active queries in deadlock handler", ) }, diff --git a/compiler/rustc_query_impl/src/execution.rs b/compiler/rustc_query_impl/src/execution.rs index 826a794bc8fa..e9996054211b 100644 --- a/compiler/rustc_query_impl/src/execution.rs +++ b/compiler/rustc_query_impl/src/execution.rs @@ -5,7 +5,7 @@ use rustc_data_structures::hash_table::{Entry, HashTable}; use rustc_data_structures::stack::ensure_sufficient_stack; use rustc_data_structures::{outline, sharded, sync}; use rustc_errors::{Diag, FatalError, StashKey}; -use rustc_middle::dep_graph::{DepGraphData, DepNodeKey, HasDepContext}; +use rustc_middle::dep_graph::{DepGraphData, DepNodeKey}; use rustc_middle::query::{ ActiveKeyStatus, CycleError, CycleErrorHandling, QueryCache, QueryJob, QueryJobId, QueryLatch, QueryMode, QueryStackDeferred, QueryStackFrame, QueryState, @@ -16,7 +16,10 @@ use rustc_span::{DUMMY_SP, Span}; use crate::dep_graph::{DepNode, DepNodeIndex}; use crate::job::{QueryJobInfo, QueryJobMap, find_cycle_in_stack, report_cycle}; -use crate::{QueryCtxt, QueryFlags, SemiDynamicQueryDispatcher}; +use crate::plumbing::{ + collect_active_jobs_from_all_queries, current_query_job, next_job_id, start_query, +}; +use crate::{QueryFlags, SemiDynamicQueryDispatcher}; #[inline] fn equivalent_key(k: &K) -> impl Fn(&(K, V)) -> bool + '_ { @@ -101,32 +104,32 @@ where #[inline(never)] fn mk_cycle<'tcx, C: QueryCache, const FLAGS: QueryFlags>( query: SemiDynamicQueryDispatcher<'tcx, C, FLAGS>, - qcx: QueryCtxt<'tcx>, + tcx: TyCtxt<'tcx>, cycle_error: CycleError, ) -> C::Value { - let error = report_cycle(qcx.tcx.sess, &cycle_error); - handle_cycle_error(query, qcx, &cycle_error, error) + let error = report_cycle(tcx.sess, &cycle_error); + handle_cycle_error(query, tcx, &cycle_error, error) } fn handle_cycle_error<'tcx, C: QueryCache, const FLAGS: QueryFlags>( query: SemiDynamicQueryDispatcher<'tcx, C, FLAGS>, - qcx: QueryCtxt<'tcx>, + tcx: TyCtxt<'tcx>, cycle_error: &CycleError, error: Diag<'_>, ) -> C::Value { match query.cycle_error_handling() { CycleErrorHandling::Error => { let guar = error.emit(); - query.value_from_cycle_error(qcx.tcx, cycle_error, guar) + query.value_from_cycle_error(tcx, cycle_error, guar) } CycleErrorHandling::Fatal => { error.emit(); - qcx.tcx.dcx().abort_if_errors(); + tcx.dcx().abort_if_errors(); unreachable!() } CycleErrorHandling::DelayBug => { let guar = error.delay_as_bug(); - query.value_from_cycle_error(qcx.tcx, cycle_error, guar) + query.value_from_cycle_error(tcx, cycle_error, guar) } CycleErrorHandling::Stash => { let guar = if let Some(root) = cycle_error.cycle.first() @@ -136,7 +139,7 @@ fn handle_cycle_error<'tcx, C: QueryCache, const FLAGS: QueryFlags>( } else { error.emit() }; - query.value_from_cycle_error(qcx.tcx, cycle_error, guar) + query.value_from_cycle_error(tcx, cycle_error, guar) } } } @@ -207,25 +210,24 @@ where #[inline(never)] fn cycle_error<'tcx, C: QueryCache, const FLAGS: QueryFlags>( query: SemiDynamicQueryDispatcher<'tcx, C, FLAGS>, - qcx: QueryCtxt<'tcx>, + tcx: TyCtxt<'tcx>, try_execute: QueryJobId, span: Span, ) -> (C::Value, Option) { // Ensure there was no errors collecting all active jobs. // We need the complete map to ensure we find a cycle to break. - let job_map = qcx - .collect_active_jobs_from_all_queries(false) + let job_map = collect_active_jobs_from_all_queries(tcx, false) .ok() .expect("failed to collect active queries"); - let error = find_cycle_in_stack(try_execute, job_map, &qcx.current_query_job(), span); - (mk_cycle(query, qcx, error.lift()), None) + let error = find_cycle_in_stack(try_execute, job_map, ¤t_query_job(tcx), span); + (mk_cycle(query, tcx, error.lift()), None) } #[inline(always)] fn wait_for_query<'tcx, C: QueryCache, const FLAGS: QueryFlags>( query: SemiDynamicQueryDispatcher<'tcx, C, FLAGS>, - qcx: QueryCtxt<'tcx>, + tcx: TyCtxt<'tcx>, span: Span, key: C::Key, latch: QueryLatch<'tcx>, @@ -234,20 +236,20 @@ fn wait_for_query<'tcx, C: QueryCache, const FLAGS: QueryFlags>( // For parallel queries, we'll block and wait until the query running // in another thread has completed. Record how long we wait in the // self-profiler. - let query_blocked_prof_timer = qcx.tcx.prof.query_blocked(); + let query_blocked_prof_timer = tcx.prof.query_blocked(); // With parallel queries we might just have to wait on some other // thread. - let result = latch.wait_on(qcx.tcx, current, span); + let result = latch.wait_on(tcx, current, span); match result { Ok(()) => { - let Some((v, index)) = query.query_cache(qcx).lookup(&key) else { + let Some((v, index)) = query.query_cache(tcx).lookup(&key) else { outline(|| { // We didn't find the query result in the query cache. Check if it was // poisoned due to a panic instead. let key_hash = sharded::make_hash(&key); - let shard = query.query_state(qcx).active.lock_shard_by_hash(key_hash); + let shard = query.query_state(tcx).active.lock_shard_by_hash(key_hash); match shard.find(key_hash, equivalent_key(&key)) { // The query we waited on panicked. Continue unwinding here. Some((_, ActiveKeyStatus::Poisoned)) => FatalError.raise(), @@ -259,24 +261,24 @@ fn wait_for_query<'tcx, C: QueryCache, const FLAGS: QueryFlags>( }) }; - qcx.tcx.prof.query_cache_hit(index.into()); + tcx.prof.query_cache_hit(index.into()); query_blocked_prof_timer.finish_with_query_invocation_id(index.into()); (v, Some(index)) } - Err(cycle) => (mk_cycle(query, qcx, cycle.lift()), None), + Err(cycle) => (mk_cycle(query, tcx, cycle.lift()), None), } } #[inline(never)] fn try_execute_query<'tcx, C: QueryCache, const FLAGS: QueryFlags, const INCR: bool>( query: SemiDynamicQueryDispatcher<'tcx, C, FLAGS>, - qcx: QueryCtxt<'tcx>, + tcx: TyCtxt<'tcx>, span: Span, key: C::Key, dep_node: Option, ) -> (C::Value, Option) { - let state = query.query_state(qcx); + let state = query.query_state(tcx); let key_hash = sharded::make_hash(&key); let mut state_lock = state.active.lock_shard_by_hash(key_hash); @@ -286,27 +288,27 @@ fn try_execute_query<'tcx, C: QueryCache, const FLAGS: QueryFlags, const INCR: b // re-executing the query since `try_start` only checks that the query is not currently // executing, but another thread may have already completed the query and stores it result // in the query cache. - if qcx.tcx.sess.threads() > 1 { - if let Some((value, index)) = query.query_cache(qcx).lookup(&key) { - qcx.tcx.prof.query_cache_hit(index.into()); + if tcx.sess.threads() > 1 { + if let Some((value, index)) = query.query_cache(tcx).lookup(&key) { + tcx.prof.query_cache_hit(index.into()); return (value, Some(index)); } } - let current_job_id = qcx.current_query_job(); + let current_job_id = current_query_job(tcx); match state_lock.entry(key_hash, equivalent_key(&key), |(k, _)| sharded::make_hash(k)) { Entry::Vacant(entry) => { // Nothing has computed or is computing the query, so we start a new job and insert it in the // state map. - let id = qcx.next_job_id(); + let id = next_job_id(tcx); let job = QueryJob::new(id, span, current_job_id); entry.insert((key, ActiveKeyStatus::Started(job))); // Drop the lock before we start executing the query drop(state_lock); - execute_job::(query, qcx, state, key, key_hash, id, dep_node) + execute_job::(query, tcx, state, key, key_hash, id, dep_node) } Entry::Occupied(mut entry) => { match &mut entry.get_mut().1 { @@ -318,7 +320,7 @@ fn try_execute_query<'tcx, C: QueryCache, const FLAGS: QueryFlags, const INCR: b // Only call `wait_for_query` if we're using a Rayon thread pool // as it will attempt to mark the worker thread as blocked. - return wait_for_query(query, qcx, span, key, latch, current_job_id); + return wait_for_query(query, tcx, span, key, latch, current_job_id); } let id = job.id; @@ -326,7 +328,7 @@ fn try_execute_query<'tcx, C: QueryCache, const FLAGS: QueryFlags, const INCR: b // If we are single-threaded we know that we have cycle error, // so we just return the error. - cycle_error(query, qcx, id, span) + cycle_error(query, tcx, id, span) } ActiveKeyStatus::Poisoned => FatalError.raise(), } @@ -337,7 +339,7 @@ fn try_execute_query<'tcx, C: QueryCache, const FLAGS: QueryFlags, const INCR: b #[inline(always)] fn execute_job<'tcx, C: QueryCache, const FLAGS: QueryFlags, const INCR: bool>( query: SemiDynamicQueryDispatcher<'tcx, C, FLAGS>, - qcx: QueryCtxt<'tcx>, + tcx: TyCtxt<'tcx>, state: &'tcx QueryState<'tcx, C::Key>, key: C::Key, key_hash: u64, @@ -348,16 +350,16 @@ fn execute_job<'tcx, C: QueryCache, const FLAGS: QueryFlags, const INCR: bool>( // panic occurs while executing the query (or any intermediate plumbing). let job_guard = ActiveJobGuard { state, key, key_hash }; - debug_assert_eq!(qcx.tcx.dep_graph.is_fully_enabled(), INCR); + debug_assert_eq!(tcx.dep_graph.is_fully_enabled(), INCR); // Delegate to another function to actually execute the query job. let (result, dep_node_index) = if INCR { - execute_job_incr(query, qcx, qcx.tcx.dep_graph.data().unwrap(), key, dep_node, id) + execute_job_incr(query, tcx, key, dep_node, id) } else { - execute_job_non_incr(query, qcx, key, id) + execute_job_non_incr(query, tcx, key, id) }; - let cache = query.query_cache(qcx); + let cache = query.query_cache(tcx); if query.feedable() { // We should not compute queries that also got a value via feeding. // This can't happen, as query feeding adds the very dependencies to the fed query @@ -373,7 +375,7 @@ fn execute_job<'tcx, C: QueryCache, const FLAGS: QueryFlags, const INCR: bool>( ); }; - let (old_hash, new_hash) = qcx.dep_context().with_stable_hashing_context(|mut hcx| { + let (old_hash, new_hash) = tcx.with_stable_hashing_context(|mut hcx| { (hasher(&mut hcx, &cached_result), hasher(&mut hcx, &result)) }); let formatter = query.format_value(); @@ -381,7 +383,7 @@ fn execute_job<'tcx, C: QueryCache, const FLAGS: QueryFlags, const INCR: bool>( // We have an inconsistency. This can happen if one of the two // results is tainted by errors. assert!( - qcx.tcx.dcx().has_errors().is_some(), + tcx.dcx().has_errors().is_some(), "Computed query value for {:?}({:?}) is inconsistent with fed value,\n\ computed={:#?}\nfed={:#?}", query.dep_kind(), @@ -403,22 +405,22 @@ fn execute_job<'tcx, C: QueryCache, const FLAGS: QueryFlags, const INCR: bool>( #[inline(always)] fn execute_job_non_incr<'tcx, C: QueryCache, const FLAGS: QueryFlags>( query: SemiDynamicQueryDispatcher<'tcx, C, FLAGS>, - qcx: QueryCtxt<'tcx>, + tcx: TyCtxt<'tcx>, key: C::Key, job_id: QueryJobId, ) -> (C::Value, DepNodeIndex) { - debug_assert!(!qcx.tcx.dep_graph.is_fully_enabled()); + debug_assert!(!tcx.dep_graph.is_fully_enabled()); // Fingerprint the key, just to assert that it doesn't // have anything we don't consider hashable if cfg!(debug_assertions) { - let _ = key.to_fingerprint(qcx.tcx); + let _ = key.to_fingerprint(tcx); } - let prof_timer = qcx.tcx.prof.query_provider(); + let prof_timer = tcx.prof.query_provider(); // Call the query provider. - let result = qcx.start_query(job_id, query.depth_limit(), || query.invoke_provider(qcx, key)); - let dep_node_index = qcx.tcx.dep_graph.next_virtual_depnode_index(); + let result = start_query(tcx, job_id, query.depth_limit(), || query.invoke_provider(tcx, key)); + let dep_node_index = tcx.dep_graph.next_virtual_depnode_index(); prof_timer.finish_with_query_invocation_id(dep_node_index.into()); // Similarly, fingerprint the result to assert that @@ -426,7 +428,7 @@ fn execute_job_non_incr<'tcx, C: QueryCache, const FLAGS: QueryFlags>( if cfg!(debug_assertions) && let Some(hash_result) = query.hash_result() { - qcx.dep_context().with_stable_hashing_context(|mut hcx| { + tcx.with_stable_hashing_context(|mut hcx| { hash_result(&mut hcx, &result); }); } @@ -437,44 +439,45 @@ fn execute_job_non_incr<'tcx, C: QueryCache, const FLAGS: QueryFlags>( #[inline(always)] fn execute_job_incr<'tcx, C: QueryCache, const FLAGS: QueryFlags>( query: SemiDynamicQueryDispatcher<'tcx, C, FLAGS>, - qcx: QueryCtxt<'tcx>, - dep_graph_data: &DepGraphData, + tcx: TyCtxt<'tcx>, key: C::Key, mut dep_node_opt: Option, job_id: QueryJobId, ) -> (C::Value, DepNodeIndex) { + let dep_graph_data = + tcx.dep_graph.data().expect("should always be present in incremental mode"); + if !query.anon() && !query.eval_always() { // `to_dep_node` is expensive for some `DepKind`s. - let dep_node = dep_node_opt.get_or_insert_with(|| query.construct_dep_node(qcx.tcx, &key)); + let dep_node = dep_node_opt.get_or_insert_with(|| query.construct_dep_node(tcx, &key)); // The diagnostics for this query will be promoted to the current session during // `try_mark_green()`, so we can ignore them here. - if let Some(ret) = qcx.start_query(job_id, false, || { - try_load_from_disk_and_cache_in_memory(query, dep_graph_data, qcx, &key, dep_node) + if let Some(ret) = start_query(tcx, job_id, false, || { + try_load_from_disk_and_cache_in_memory(query, dep_graph_data, tcx, &key, dep_node) }) { return ret; } } - let prof_timer = qcx.tcx.prof.query_provider(); + let prof_timer = tcx.prof.query_provider(); - let (result, dep_node_index) = qcx.start_query(job_id, query.depth_limit(), || { + let (result, dep_node_index) = start_query(tcx, job_id, query.depth_limit(), || { if query.anon() { // Call the query provider inside an anon task. - return dep_graph_data.with_anon_task_inner(qcx.tcx, query.dep_kind(), || { - query.invoke_provider(qcx, key) - }); + return dep_graph_data + .with_anon_task_inner(tcx, query.dep_kind(), || query.invoke_provider(tcx, key)); } // `to_dep_node` is expensive for some `DepKind`s. - let dep_node = dep_node_opt.unwrap_or_else(|| query.construct_dep_node(qcx.tcx, &key)); + let dep_node = dep_node_opt.unwrap_or_else(|| query.construct_dep_node(tcx, &key)); // Call the query provider. dep_graph_data.with_task( dep_node, - (qcx, query), + (tcx, query), key, - |(qcx, query), key| query.invoke_provider(qcx, key), + |(tcx, query), key| query.invoke_provider(tcx, key), query.hash_result(), ) }); @@ -488,21 +491,21 @@ fn execute_job_incr<'tcx, C: QueryCache, const FLAGS: QueryFlags>( fn try_load_from_disk_and_cache_in_memory<'tcx, C: QueryCache, const FLAGS: QueryFlags>( query: SemiDynamicQueryDispatcher<'tcx, C, FLAGS>, dep_graph_data: &DepGraphData, - qcx: QueryCtxt<'tcx>, + tcx: TyCtxt<'tcx>, key: &C::Key, dep_node: &DepNode, ) -> Option<(C::Value, DepNodeIndex)> { // Note this function can be called concurrently from the same query // We must ensure that this is handled correctly. - let (prev_dep_node_index, dep_node_index) = dep_graph_data.try_mark_green(qcx.tcx, dep_node)?; + let (prev_dep_node_index, dep_node_index) = dep_graph_data.try_mark_green(tcx, dep_node)?; debug_assert!(dep_graph_data.is_index_green(prev_dep_node_index)); // First we try to load the result from the on-disk cache. // Some things are never cached on disk. - if let Some(result) = query.try_load_from_disk(qcx, key, prev_dep_node_index, dep_node_index) { - if std::intrinsics::unlikely(qcx.tcx.sess.opts.unstable_opts.query_dep_graph) { + if let Some(result) = query.try_load_from_disk(tcx, key, prev_dep_node_index, dep_node_index) { + if std::intrinsics::unlikely(tcx.sess.opts.unstable_opts.query_dep_graph) { dep_graph_data.mark_debug_loaded_from_disk(*dep_node) } @@ -516,10 +519,10 @@ fn try_load_from_disk_and_cache_in_memory<'tcx, C: QueryCache, const FLAGS: Quer // give us some coverage of potential bugs though. let try_verify = prev_fingerprint.split().1.as_u64().is_multiple_of(32); if std::intrinsics::unlikely( - try_verify || qcx.tcx.sess.opts.unstable_opts.incremental_verify_ich, + try_verify || tcx.sess.opts.unstable_opts.incremental_verify_ich, ) { incremental_verify_ich( - qcx.tcx, + tcx, dep_graph_data, &result, prev_dep_node_index, @@ -534,25 +537,25 @@ fn try_load_from_disk_and_cache_in_memory<'tcx, C: QueryCache, const FLAGS: Quer // We always expect to find a cached result for things that // can be forced from `DepNode`. debug_assert!( - !query.will_cache_on_disk_for_key(qcx.tcx, key) - || !qcx.tcx.fingerprint_style(dep_node.kind).reconstructible(), + !query.will_cache_on_disk_for_key(tcx, key) + || !tcx.fingerprint_style(dep_node.kind).reconstructible(), "missing on-disk cache entry for {dep_node:?}" ); // Sanity check for the logic in `ensure`: if the node is green and the result loadable, // we should actually be able to load it. debug_assert!( - !query.is_loadable_from_disk(qcx, key, prev_dep_node_index), + !query.is_loadable_from_disk(tcx, key, prev_dep_node_index), "missing on-disk cache entry for loadable {dep_node:?}" ); // We could not load a result from the on-disk cache, so // recompute. - let prof_timer = qcx.tcx.prof.query_provider(); + let prof_timer = tcx.prof.query_provider(); // The dep-graph for this computation is already in-place. // Call the query provider. - let result = qcx.tcx.dep_graph.with_ignore(|| query.invoke_provider(qcx, *key)); + let result = tcx.dep_graph.with_ignore(|| query.invoke_provider(tcx, *key)); prof_timer.finish_with_query_invocation_id(dep_node_index.into()); @@ -566,7 +569,7 @@ fn try_load_from_disk_and_cache_in_memory<'tcx, C: QueryCache, const FLAGS: Quer // See issue #82920 for an example of a miscompilation that would get turned into // an ICE by this check incremental_verify_ich( - qcx.tcx, + tcx, dep_graph_data, &result, prev_dep_node_index, @@ -588,7 +591,7 @@ fn try_load_from_disk_and_cache_in_memory<'tcx, C: QueryCache, const FLAGS: Quer #[inline(never)] fn ensure_must_run<'tcx, C: QueryCache, const FLAGS: QueryFlags>( query: SemiDynamicQueryDispatcher<'tcx, C, FLAGS>, - qcx: QueryCtxt<'tcx>, + tcx: TyCtxt<'tcx>, key: &C::Key, check_cache: bool, ) -> (bool, Option) { @@ -599,10 +602,10 @@ fn ensure_must_run<'tcx, C: QueryCache, const FLAGS: QueryFlags>( // Ensuring an anonymous query makes no sense assert!(!query.anon()); - let dep_node = query.construct_dep_node(qcx.tcx, key); + let dep_node = query.construct_dep_node(tcx, key); - let dep_graph = &qcx.tcx.dep_graph; - let serialized_dep_node_index = match dep_graph.try_mark_green(qcx.tcx, &dep_node) { + let dep_graph = &tcx.dep_graph; + let serialized_dep_node_index = match dep_graph.try_mark_green(tcx, &dep_node) { None => { // A None return from `try_mark_green` means that this is either // a new dep node or that the dep node has already been marked red. @@ -614,7 +617,7 @@ fn ensure_must_run<'tcx, C: QueryCache, const FLAGS: QueryFlags>( } Some((serialized_dep_node_index, dep_node_index)) => { dep_graph.read_index(dep_node_index); - qcx.tcx.prof.query_cache_hit(dep_node_index.into()); + tcx.prof.query_cache_hit(dep_node_index.into()); serialized_dep_node_index } }; @@ -624,34 +627,34 @@ fn ensure_must_run<'tcx, C: QueryCache, const FLAGS: QueryFlags>( return (false, None); } - let loadable = query.is_loadable_from_disk(qcx, key, serialized_dep_node_index); + let loadable = query.is_loadable_from_disk(tcx, key, serialized_dep_node_index); (!loadable, Some(dep_node)) } #[inline(always)] pub(super) fn get_query_non_incr<'tcx, C: QueryCache, const FLAGS: QueryFlags>( query: SemiDynamicQueryDispatcher<'tcx, C, FLAGS>, - qcx: QueryCtxt<'tcx>, + tcx: TyCtxt<'tcx>, span: Span, key: C::Key, ) -> C::Value { - debug_assert!(!qcx.tcx.dep_graph.is_fully_enabled()); + debug_assert!(!tcx.dep_graph.is_fully_enabled()); - ensure_sufficient_stack(|| try_execute_query::(query, qcx, span, key, None).0) + ensure_sufficient_stack(|| try_execute_query::(query, tcx, span, key, None).0) } #[inline(always)] pub(super) fn get_query_incr<'tcx, C: QueryCache, const FLAGS: QueryFlags>( query: SemiDynamicQueryDispatcher<'tcx, C, FLAGS>, - qcx: QueryCtxt<'tcx>, + tcx: TyCtxt<'tcx>, span: Span, key: C::Key, mode: QueryMode, ) -> Option { - debug_assert!(qcx.tcx.dep_graph.is_fully_enabled()); + debug_assert!(tcx.dep_graph.is_fully_enabled()); let dep_node = if let QueryMode::Ensure { check_cache } = mode { - let (must_run, dep_node) = ensure_must_run(query, qcx, &key, check_cache); + let (must_run, dep_node) = ensure_must_run(query, tcx, &key, check_cache); if !must_run { return None; } @@ -661,30 +664,30 @@ pub(super) fn get_query_incr<'tcx, C: QueryCache, const FLAGS: QueryFlags>( }; let (result, dep_node_index) = ensure_sufficient_stack(|| { - try_execute_query::(query, qcx, span, key, dep_node) + try_execute_query::(query, tcx, span, key, dep_node) }); if let Some(dep_node_index) = dep_node_index { - qcx.tcx.dep_graph.read_index(dep_node_index) + tcx.dep_graph.read_index(dep_node_index) } Some(result) } pub(crate) fn force_query<'tcx, C: QueryCache, const FLAGS: QueryFlags>( query: SemiDynamicQueryDispatcher<'tcx, C, FLAGS>, - qcx: QueryCtxt<'tcx>, + tcx: TyCtxt<'tcx>, key: C::Key, dep_node: DepNode, ) { // We may be concurrently trying both execute and force a query. // Ensure that only one of them runs the query. - if let Some((_, index)) = query.query_cache(qcx).lookup(&key) { - qcx.tcx.prof.query_cache_hit(index.into()); + if let Some((_, index)) = query.query_cache(tcx).lookup(&key) { + tcx.prof.query_cache_hit(index.into()); return; } debug_assert!(!query.anon()); ensure_sufficient_stack(|| { - try_execute_query::(query, qcx, DUMMY_SP, key, Some(dep_node)) + try_execute_query::(query, tcx, DUMMY_SP, key, Some(dep_node)) }); } diff --git a/compiler/rustc_query_impl/src/job.rs b/compiler/rustc_query_impl/src/job.rs index dfe3278df764..1256b514edb5 100644 --- a/compiler/rustc_query_impl/src/job.rs +++ b/compiler/rustc_query_impl/src/job.rs @@ -10,10 +10,11 @@ use rustc_middle::query::{ CycleError, QueryInfo, QueryJob, QueryJobId, QueryLatch, QueryStackDeferred, QueryStackFrame, QueryWaiter, }; +use rustc_middle::ty::TyCtxt; use rustc_session::Session; use rustc_span::{DUMMY_SP, Span}; -use crate::QueryCtxt; +use crate::plumbing::collect_active_jobs_from_all_queries; /// Map from query job IDs to job information collected by /// `collect_active_jobs_from_all_queries`. @@ -384,7 +385,7 @@ pub fn break_query_cycles<'tcx>( } pub fn print_query_stack<'tcx>( - qcx: QueryCtxt<'tcx>, + tcx: TyCtxt<'tcx>, mut current_query: Option, dcx: DiagCtxtHandle<'_>, limit_frames: Option, @@ -397,8 +398,7 @@ pub fn print_query_stack<'tcx>( let mut count_total = 0; // Make use of a partial query job map if we fail to take locks collecting active queries. - let job_map: QueryJobMap<'_> = qcx - .collect_active_jobs_from_all_queries(false) + let job_map: QueryJobMap<'_> = collect_active_jobs_from_all_queries(tcx, false) .unwrap_or_else(|partial_job_map| partial_job_map); if let Some(ref mut file) = file { @@ -425,7 +425,7 @@ pub fn print_query_stack<'tcx>( file, "#{} [{}] {}", count_total, - qcx.tcx.dep_kind_vtable(query_info.frame.dep_kind).name, + tcx.dep_kind_vtable(query_info.frame.dep_kind).name, query_extra.description ); } diff --git a/compiler/rustc_query_impl/src/lib.rs b/compiler/rustc_query_impl/src/lib.rs index 6a4171afe4bc..8731414eb04e 100644 --- a/compiler/rustc_query_impl/src/lib.rs +++ b/compiler/rustc_query_impl/src/lib.rs @@ -26,7 +26,7 @@ use rustc_span::{ErrorGuaranteed, Span}; pub use crate::dep_kind_vtables::make_dep_kind_vtables; pub use crate::job::{QueryJobMap, break_query_cycles, print_query_stack}; -pub use crate::plumbing::{QueryCtxt, query_key_hash_verify_all}; +pub use crate::plumbing::{collect_active_jobs_from_all_queries, query_key_hash_verify_all}; use crate::plumbing::{encode_all_query_results, try_mark_green}; use crate::profiling_support::QueryKeyStringCache; pub use crate::profiling_support::alloc_self_profile_query_strings; @@ -89,11 +89,11 @@ impl<'tcx, C: QueryCache, const FLAGS: QueryFlags> SemiDynamicQueryDispatcher<'t // Don't use this method to access query results, instead use the methods on TyCtxt. #[inline(always)] - fn query_state(self, qcx: QueryCtxt<'tcx>) -> &'tcx QueryState<'tcx, C::Key> { + fn query_state(self, tcx: TyCtxt<'tcx>) -> &'tcx QueryState<'tcx, C::Key> { // Safety: // This is just manually doing the subfield referencing through pointer math. unsafe { - &*(&qcx.tcx.query_system.states as *const QueryStates<'tcx>) + &*(&tcx.query_system.states as *const QueryStates<'tcx>) .byte_add(self.vtable.query_state) .cast::>() } @@ -101,11 +101,11 @@ impl<'tcx, C: QueryCache, const FLAGS: QueryFlags> SemiDynamicQueryDispatcher<'t // Don't use this method to access query results, instead use the methods on TyCtxt. #[inline(always)] - fn query_cache(self, qcx: QueryCtxt<'tcx>) -> &'tcx C { + fn query_cache(self, tcx: TyCtxt<'tcx>) -> &'tcx C { // Safety: // This is just manually doing the subfield referencing through pointer math. unsafe { - &*(&qcx.tcx.query_system.caches as *const QueryCaches<'tcx>) + &*(&tcx.query_system.caches as *const QueryCaches<'tcx>) .byte_add(self.vtable.query_cache) .cast::() } @@ -121,30 +121,30 @@ impl<'tcx, C: QueryCache, const FLAGS: QueryFlags> SemiDynamicQueryDispatcher<'t /// Calls the actual provider function for this query. /// See [`QueryVTable::invoke_provider_fn`] for more details. #[inline(always)] - fn invoke_provider(self, qcx: QueryCtxt<'tcx>, key: C::Key) -> C::Value { - (self.vtable.invoke_provider_fn)(qcx.tcx, key) + fn invoke_provider(self, tcx: TyCtxt<'tcx>, key: C::Key) -> C::Value { + (self.vtable.invoke_provider_fn)(tcx, key) } #[inline(always)] fn try_load_from_disk( self, - qcx: QueryCtxt<'tcx>, + tcx: TyCtxt<'tcx>, key: &C::Key, prev_index: SerializedDepNodeIndex, index: DepNodeIndex, ) -> Option { // `?` will return None immediately for queries that never cache to disk. - self.vtable.try_load_from_disk_fn?(qcx.tcx, key, prev_index, index) + self.vtable.try_load_from_disk_fn?(tcx, key, prev_index, index) } #[inline] fn is_loadable_from_disk( self, - qcx: QueryCtxt<'tcx>, + tcx: TyCtxt<'tcx>, key: &C::Key, index: SerializedDepNodeIndex, ) -> bool { - self.vtable.is_loadable_from_disk_fn.map_or(false, |f| f(qcx.tcx, key, index)) + self.vtable.is_loadable_from_disk_fn.map_or(false, |f| f(tcx, key, index)) } /// Synthesize an error value to let compilation continue after a cycle. diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs index 030ea29a2a6b..00f6a7fcf916 100644 --- a/compiler/rustc_query_impl/src/plumbing.rs +++ b/compiler/rustc_query_impl/src/plumbing.rs @@ -15,7 +15,7 @@ use rustc_middle::bug; #[expect(unused_imports, reason = "used by doc comments")] use rustc_middle::dep_graph::DepKindVTable; use rustc_middle::dep_graph::{ - self, DepNode, DepNodeIndex, DepNodeKey, HasDepContext, SerializedDepNodeIndex, dep_kinds, + self, DepNode, DepNodeIndex, DepNodeKey, SerializedDepNodeIndex, dep_kinds, }; use rustc_middle::query::on_disk_cache::{ AbsoluteBytePos, CacheDecoder, CacheEncoder, EncodedDepNodeIndex, @@ -36,115 +36,91 @@ use crate::execution::{all_inactive, force_query}; use crate::job::{QueryJobMap, find_dep_kind_root}; use crate::{QueryDispatcherUnerased, QueryFlags, SemiDynamicQueryDispatcher}; -#[derive(Copy, Clone)] -pub struct QueryCtxt<'tcx> { - pub tcx: TyCtxt<'tcx>, +fn depth_limit_error<'tcx>(tcx: TyCtxt<'tcx>, job: QueryJobId) { + let job_map = + collect_active_jobs_from_all_queries(tcx, true).expect("failed to collect active queries"); + let (info, depth) = find_dep_kind_root(job, job_map); + + let suggested_limit = match tcx.recursion_limit() { + Limit(0) => Limit(2), + limit => limit * 2, + }; + + tcx.sess.dcx().emit_fatal(QueryOverflow { + span: info.job.span, + note: QueryOverflowNote { desc: info.frame.info.extract().description, depth }, + suggested_limit, + crate_name: tcx.crate_name(LOCAL_CRATE), + }); } -impl<'tcx> QueryCtxt<'tcx> { - #[inline] - pub fn new(tcx: TyCtxt<'tcx>) -> Self { - QueryCtxt { tcx } - } - - fn depth_limit_error(self, job: QueryJobId) { - let job_map = self - .collect_active_jobs_from_all_queries(true) - .expect("failed to collect active queries"); - let (info, depth) = find_dep_kind_root(job, job_map); - - let suggested_limit = match self.tcx.recursion_limit() { - Limit(0) => Limit(2), - limit => limit * 2, - }; - - self.tcx.sess.dcx().emit_fatal(QueryOverflow { - span: info.job.span, - note: QueryOverflowNote { desc: info.frame.info.extract().description, depth }, - suggested_limit, - crate_name: self.tcx.crate_name(LOCAL_CRATE), - }); - } - - #[inline] - pub(crate) fn next_job_id(self) -> QueryJobId { - QueryJobId( - NonZero::new( - self.tcx.query_system.jobs.fetch_add(1, std::sync::atomic::Ordering::Relaxed), - ) +#[inline] +pub(crate) fn next_job_id<'tcx>(tcx: TyCtxt<'tcx>) -> QueryJobId { + QueryJobId( + NonZero::new(tcx.query_system.jobs.fetch_add(1, std::sync::atomic::Ordering::Relaxed)) .unwrap(), - ) - } + ) +} - #[inline] - pub(crate) fn current_query_job(self) -> Option { - tls::with_related_context(self.tcx, |icx| icx.query) - } +#[inline] +pub(crate) fn current_query_job<'tcx>(tcx: TyCtxt<'tcx>) -> Option { + tls::with_related_context(tcx, |icx| icx.query) +} - /// Executes a job by changing the `ImplicitCtxt` to point to the - /// new query job while it executes. - #[inline(always)] - pub(crate) fn start_query( - self, - token: QueryJobId, - depth_limit: bool, - compute: impl FnOnce() -> R, - ) -> R { - // The `TyCtxt` stored in TLS has the same global interner lifetime - // as `self`, so we use `with_related_context` to relate the 'tcx lifetimes - // when accessing the `ImplicitCtxt`. - tls::with_related_context(self.tcx, move |current_icx| { - if depth_limit - && !self.tcx.recursion_limit().value_within_limit(current_icx.query_depth) - { - self.depth_limit_error(token); - } - - // Update the `ImplicitCtxt` to point to our new query job. - let new_icx = ImplicitCtxt { - tcx: self.tcx, - query: Some(token), - query_depth: current_icx.query_depth + depth_limit as usize, - task_deps: current_icx.task_deps, - }; - - // Use the `ImplicitCtxt` while we execute the query. - tls::enter_context(&new_icx, compute) - }) - } - - /// Returns a map of currently active query jobs, collected from all queries. - /// - /// If `require_complete` is `true`, this function locks all shards of the - /// query results to produce a complete map, which always returns `Ok`. - /// Otherwise, it may return an incomplete map as an error if any shard - /// lock cannot be acquired. - /// - /// Prefer passing `false` to `require_complete` to avoid potential deadlocks, - /// especially when called from within a deadlock handler, unless a - /// complete map is needed and no deadlock is possible at this call site. - pub fn collect_active_jobs_from_all_queries( - self, - require_complete: bool, - ) -> Result, QueryJobMap<'tcx>> { - let mut job_map_out = QueryJobMap::default(); - let mut complete = true; - - for gather_fn in crate::PER_QUERY_GATHER_ACTIVE_JOBS_FNS.iter() { - if gather_fn(self.tcx, require_complete, &mut job_map_out).is_none() { - complete = false; - } +/// Executes a job by changing the `ImplicitCtxt` to point to the +/// new query job while it executes. +#[inline(always)] +pub(crate) fn start_query<'tcx, R>( + tcx: TyCtxt<'tcx>, + token: QueryJobId, + depth_limit: bool, + compute: impl FnOnce() -> R, +) -> R { + // The `TyCtxt` stored in TLS has the same global interner lifetime + // as `self`, so we use `with_related_context` to relate the 'tcx lifetimes + // when accessing the `ImplicitCtxt`. + tls::with_related_context(tcx, move |current_icx| { + if depth_limit && !tcx.recursion_limit().value_within_limit(current_icx.query_depth) { + depth_limit_error(tcx, token); } - if complete { Ok(job_map_out) } else { Err(job_map_out) } - } + // Update the `ImplicitCtxt` to point to our new query job. + let new_icx = ImplicitCtxt { + tcx, + query: Some(token), + query_depth: current_icx.query_depth + depth_limit as usize, + task_deps: current_icx.task_deps, + }; + + // Use the `ImplicitCtxt` while we execute the query. + tls::enter_context(&new_icx, compute) + }) } -impl<'tcx> HasDepContext<'tcx> for QueryCtxt<'tcx> { - #[inline] - fn dep_context(&self) -> TyCtxt<'tcx> { - self.tcx +/// Returns a map of currently active query jobs, collected from all queries. +/// +/// If `require_complete` is `true`, this function locks all shards of the +/// query results to produce a complete map, which always returns `Ok`. +/// Otherwise, it may return an incomplete map as an error if any shard +/// lock cannot be acquired. +/// +/// Prefer passing `false` to `require_complete` to avoid potential deadlocks, +/// especially when called from within a deadlock handler, unless a +/// complete map is needed and no deadlock is possible at this call site. +pub fn collect_active_jobs_from_all_queries<'tcx>( + tcx: TyCtxt<'tcx>, + require_complete: bool, +) -> Result, QueryJobMap<'tcx>> { + let mut job_map_out = QueryJobMap::default(); + let mut complete = true; + + for gather_fn in crate::PER_QUERY_GATHER_ACTIVE_JOBS_FNS.iter() { + if gather_fn(tcx, require_complete, &mut job_map_out).is_none() { + complete = false; + } } + + if complete { Ok(job_map_out) } else { Err(job_map_out) } } pub(super) fn try_mark_green<'tcx>(tcx: TyCtxt<'tcx>, dep_node: &dep_graph::DepNode) -> bool { @@ -361,19 +337,19 @@ where pub(crate) fn encode_query_results<'a, 'tcx, Q, C: QueryCache, const FLAGS: QueryFlags>( query: SemiDynamicQueryDispatcher<'tcx, C, FLAGS>, - qcx: QueryCtxt<'tcx>, + tcx: TyCtxt<'tcx>, encoder: &mut CacheEncoder<'a, 'tcx>, query_result_index: &mut EncodedDepNodeIndex, ) where Q: QueryDispatcherUnerased<'tcx, C, FLAGS>, Q::UnerasedValue: Encodable>, { - let _timer = qcx.tcx.prof.generic_activity_with_arg("encode_query_results_for", query.name()); + let _timer = tcx.prof.generic_activity_with_arg("encode_query_results_for", query.name()); - assert!(all_inactive(query.query_state(qcx))); - let cache = query.query_cache(qcx); + assert!(all_inactive(query.query_state(tcx))); + let cache = query.query_cache(tcx); cache.iter(&mut |key, value, dep_node| { - if query.will_cache_on_disk_for_key(qcx.tcx, key) { + if query.will_cache_on_disk_for_key(tcx, key) { let dep_node = SerializedDepNodeIndex::new(dep_node.index()); // Record position of the cache entry. @@ -388,14 +364,14 @@ pub(crate) fn encode_query_results<'a, 'tcx, Q, C: QueryCache, const FLAGS: Quer pub(crate) fn query_key_hash_verify<'tcx, C: QueryCache, const FLAGS: QueryFlags>( query: SemiDynamicQueryDispatcher<'tcx, C, FLAGS>, - qcx: QueryCtxt<'tcx>, + tcx: TyCtxt<'tcx>, ) { - let _timer = qcx.tcx.prof.generic_activity_with_arg("query_key_hash_verify_for", query.name()); + let _timer = tcx.prof.generic_activity_with_arg("query_key_hash_verify_for", query.name()); - let cache = query.query_cache(qcx); + let cache = query.query_cache(tcx); let mut map = UnordMap::with_capacity(cache.len()); cache.iter(&mut |key, _, _| { - let node = DepNode::construct(qcx.tcx, query.dep_kind(), key); + let node = DepNode::construct(tcx, query.dep_kind(), key); if let Some(other_key) = map.insert(node, *key) { bug!( "query key:\n\ @@ -487,7 +463,7 @@ pub(crate) fn force_from_dep_node_inner<'tcx, C: QueryCache, const FLAGS: QueryF ); if let Some(key) = C::Key::recover(tcx, &dep_node) { - force_query(query, QueryCtxt::new(tcx), key, dep_node); + force_query(query, tcx, key, dep_node); true } else { false @@ -525,7 +501,7 @@ macro_rules! define_queries { let _guard = tracing::span!(tracing::Level::TRACE, stringify!($name), ?key).entered(); execution::get_query_incr( QueryType::query_dispatcher(tcx), - QueryCtxt::new(tcx), + tcx, span, key, mode @@ -545,7 +521,7 @@ macro_rules! define_queries { ) -> Option>> { Some(execution::get_query_non_incr( QueryType::query_dispatcher(tcx), - QueryCtxt::new(tcx), + tcx, span, key, )) @@ -729,7 +705,7 @@ macro_rules! define_queries { _ > ( query_impl::$name::QueryType::query_dispatcher(tcx), - QueryCtxt::new(tcx), + tcx, encoder, query_result_index, ) @@ -739,7 +715,7 @@ macro_rules! define_queries { pub(crate) fn query_key_hash_verify<'tcx>(tcx: TyCtxt<'tcx>) { $crate::plumbing::query_key_hash_verify( query_impl::$name::QueryType::query_dispatcher(tcx), - QueryCtxt::new(tcx), + tcx, ) } })*} From db58395a6b79f373595ebe26d6a130583c54fce8 Mon Sep 17 00:00:00 2001 From: Zalathar Date: Mon, 16 Feb 2026 10:54:52 +1100 Subject: [PATCH 246/265] Don't use `HasDepContext` in `DepGraph::with_task` The need for a `HasDepContext` impl on tuples can be avoided by passing the query vtable as part of an argument tuple instead. --- compiler/rustc_middle/src/dep_graph/graph.rs | 72 ++++++++------------ compiler/rustc_middle/src/dep_graph/mod.rs | 6 -- compiler/rustc_query_impl/src/execution.rs | 6 +- compiler/rustc_query_impl/src/lib.rs | 15 ++++ 4 files changed, 46 insertions(+), 53 deletions(-) diff --git a/compiler/rustc_middle/src/dep_graph/graph.rs b/compiler/rustc_middle/src/dep_graph/graph.rs index 6a19c02bb81b..265ee76b31b0 100644 --- a/compiler/rustc_middle/src/dep_graph/graph.rs +++ b/compiler/rustc_middle/src/dep_graph/graph.rs @@ -268,17 +268,17 @@ impl DepGraph { } #[inline(always)] - pub fn with_task<'tcx, Ctxt: HasDepContext<'tcx>, A: Debug, R>( + pub fn with_task<'tcx, A: Debug, R>( &self, - key: DepNode, - cx: Ctxt, - arg: A, - task: fn(Ctxt, A) -> R, + dep_node: DepNode, + tcx: TyCtxt<'tcx>, + task_arg: A, + task_fn: fn(tcx: TyCtxt<'tcx>, task_arg: A) -> R, hash_result: Option, &R) -> Fingerprint>, ) -> (R, DepNodeIndex) { match self.data() { - Some(data) => data.with_task(key, cx, arg, task, hash_result), - None => (task(cx, arg), self.next_virtual_depnode_index()), + Some(data) => data.with_task(dep_node, tcx, task_arg, task_fn, hash_result), + None => (task_fn(tcx, task_arg), self.next_virtual_depnode_index()), } } @@ -310,33 +310,21 @@ impl DepGraphData { /// prevent implicit 'leaks' of tracked state into the task (which /// could then be read without generating correct edges in the /// dep-graph -- see the [rustc dev guide] for more details on - /// the dep-graph). To this end, the task function gets exactly two - /// pieces of state: the context `cx` and an argument `arg`. Both - /// of these bits of state must be of some type that implements - /// `DepGraphSafe` and hence does not leak. + /// the dep-graph). /// - /// The choice of two arguments is not fundamental. One argument - /// would work just as well, since multiple values can be - /// collected using tuples. However, using two arguments works out - /// to be quite convenient, since it is common to need a context - /// (`cx`) and some argument (e.g., a `DefId` identifying what - /// item to process). - /// - /// For cases where you need some other number of arguments: - /// - /// - If you only need one argument, just use `()` for the `arg` - /// parameter. - /// - If you need 3+ arguments, use a tuple for the - /// `arg` parameter. + /// Therefore, the task function takes a `TyCtxt`, plus exactly one + /// additional argument, `task_arg`. The additional argument type can be + /// `()` if no argument is needed, or a tuple if multiple arguments are + /// needed. /// /// [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/queries/incremental-compilation.html #[inline(always)] - pub fn with_task<'tcx, Ctxt: HasDepContext<'tcx>, A: Debug, R>( + pub fn with_task<'tcx, A: Debug, R>( &self, - key: DepNode, - cx: Ctxt, - arg: A, - task: fn(Ctxt, A) -> R, + dep_node: DepNode, + tcx: TyCtxt<'tcx>, + task_arg: A, + task_fn: fn(tcx: TyCtxt<'tcx>, task_arg: A) -> R, hash_result: Option, &R) -> Fingerprint>, ) -> (R, DepNodeIndex) { // If the following assertion triggers, it can have two reasons: @@ -344,32 +332,28 @@ impl DepGraphData { // in `DepGraph::try_mark_green()`. // 2. Two distinct query keys get mapped to the same `DepNode` // (see for example #48923). - self.assert_dep_node_not_yet_allocated_in_current_session( - cx.dep_context().sess, - &key, - || { - format!( - "forcing query with already existing `DepNode`\n\ - - query-key: {arg:?}\n\ - - dep-node: {key:?}" - ) - }, - ); + self.assert_dep_node_not_yet_allocated_in_current_session(tcx.sess, &dep_node, || { + format!( + "forcing query with already existing `DepNode`\n\ + - query-key: {task_arg:?}\n\ + - dep-node: {dep_node:?}" + ) + }); - let with_deps = |task_deps| with_deps(task_deps, || task(cx, arg)); - let (result, edges) = if cx.dep_context().is_eval_always(key.kind) { + let with_deps = |task_deps| with_deps(task_deps, || task_fn(tcx, task_arg)); + let (result, edges) = if tcx.is_eval_always(dep_node.kind) { (with_deps(TaskDepsRef::EvalAlways), EdgesVec::new()) } else { let task_deps = Lock::new(TaskDeps::new( #[cfg(debug_assertions)] - Some(key), + Some(dep_node), 0, )); (with_deps(TaskDepsRef::Allow(&task_deps)), task_deps.into_inner().reads) }; let dep_node_index = - self.hash_result_and_alloc_node(cx.dep_context(), key, edges, &result, hash_result); + self.hash_result_and_alloc_node(tcx, dep_node, edges, &result, hash_result); (result, dep_node_index) } diff --git a/compiler/rustc_middle/src/dep_graph/mod.rs b/compiler/rustc_middle/src/dep_graph/mod.rs index e8b2f86e5718..3815158c66f1 100644 --- a/compiler/rustc_middle/src/dep_graph/mod.rs +++ b/compiler/rustc_middle/src/dep_graph/mod.rs @@ -35,12 +35,6 @@ impl<'tcx> HasDepContext<'tcx> for TyCtxt<'tcx> { } } -impl<'tcx, T: HasDepContext<'tcx>, Q: Copy> HasDepContext<'tcx> for (T, Q) { - fn dep_context(&self) -> TyCtxt<'tcx> { - self.0.dep_context() - } -} - /// Describes the contents of the fingerprint generated by a given query. /// /// This is mainly for determining whether and how we can reconstruct a key diff --git a/compiler/rustc_query_impl/src/execution.rs b/compiler/rustc_query_impl/src/execution.rs index e9996054211b..80bdc5626ec8 100644 --- a/compiler/rustc_query_impl/src/execution.rs +++ b/compiler/rustc_query_impl/src/execution.rs @@ -475,9 +475,9 @@ fn execute_job_incr<'tcx, C: QueryCache, const FLAGS: QueryFlags>( // Call the query provider. dep_graph_data.with_task( dep_node, - (tcx, query), - key, - |(tcx, query), key| query.invoke_provider(tcx, key), + tcx, + (query, key), + |tcx, (query, key)| query.invoke_provider(tcx, key), query.hash_result(), ) }); diff --git a/compiler/rustc_query_impl/src/lib.rs b/compiler/rustc_query_impl/src/lib.rs index 8731414eb04e..b4a64686728f 100644 --- a/compiler/rustc_query_impl/src/lib.rs +++ b/compiler/rustc_query_impl/src/lib.rs @@ -9,6 +9,7 @@ #![feature(try_blocks)] // tidy-alphabetical-end +use std::fmt; use std::marker::ConstParamTy; use rustc_data_structures::sync::AtomicU64; @@ -76,6 +77,20 @@ impl<'tcx, C: QueryCache, const FLAGS: QueryFlags> Clone } } +impl<'tcx, C: QueryCache, const FLAGS: QueryFlags> fmt::Debug + for SemiDynamicQueryDispatcher<'tcx, C, FLAGS> +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + // When debug-printing a query dispatcher (e.g. for ICE or tracing), + // just print the query name to know what query we're dealing with. + // The other fields and flags are probably just unhelpful noise. + // + // If there is need for a more detailed dump of all flags and fields, + // consider writing a separate dump method and calling it explicitly. + f.write_str(self.name()) + } +} + impl<'tcx, C: QueryCache, const FLAGS: QueryFlags> SemiDynamicQueryDispatcher<'tcx, C, FLAGS> { #[inline(always)] fn name(self) -> &'static str { From 25d5cd2eb02bc2efd9386e13fd82dcf70a7b165d Mon Sep 17 00:00:00 2001 From: Zalathar Date: Sun, 15 Feb 2026 19:35:32 +1100 Subject: [PATCH 247/265] Remove unnecessary trait `HasDepContext` --- compiler/rustc_middle/src/dep_graph/graph.rs | 9 +++------ compiler/rustc_middle/src/dep_graph/mod.rs | 10 ---------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/compiler/rustc_middle/src/dep_graph/graph.rs b/compiler/rustc_middle/src/dep_graph/graph.rs index 265ee76b31b0..5257ec4abef2 100644 --- a/compiler/rustc_middle/src/dep_graph/graph.rs +++ b/compiler/rustc_middle/src/dep_graph/graph.rs @@ -23,7 +23,7 @@ use {super::debug::EdgeFilter, std::env}; use super::query::DepGraphQuery; use super::serialized::{GraphEncoder, SerializedDepGraph, SerializedDepNodeIndex}; -use super::{DepKind, DepNode, HasDepContext, WorkProductId, read_deps, with_deps}; +use super::{DepKind, DepNode, WorkProductId, read_deps, with_deps}; use crate::dep_graph::edges::EdgesVec; use crate::ich::StableHashingContext; use crate::ty::TyCtxt; @@ -938,7 +938,7 @@ impl DepGraphData { // We failed to mark it green, so we try to force the query. debug!("trying to force dependency {dep_dep_node:?}"); - if !tcx.dep_context().try_force_from_dep_node(*dep_dep_node, parent_dep_node_index, frame) { + if !tcx.try_force_from_dep_node(*dep_dep_node, parent_dep_node_index, frame) { // The DepNode could not be forced. debug!("dependency {dep_dep_node:?} could not be forced"); return None; @@ -985,10 +985,7 @@ impl DepGraphData { let frame = MarkFrame { index: prev_dep_node_index, parent: frame }; // We never try to mark eval_always nodes as green - debug_assert!( - !tcx.dep_context() - .is_eval_always(self.previous.index_to_node(prev_dep_node_index).kind) - ); + debug_assert!(!tcx.is_eval_always(self.previous.index_to_node(prev_dep_node_index).kind)); let prev_deps = self.previous.edge_targets_from(prev_dep_node_index); diff --git a/compiler/rustc_middle/src/dep_graph/mod.rs b/compiler/rustc_middle/src/dep_graph/mod.rs index 3815158c66f1..4b1faeb7d209 100644 --- a/compiler/rustc_middle/src/dep_graph/mod.rs +++ b/compiler/rustc_middle/src/dep_graph/mod.rs @@ -25,16 +25,6 @@ mod graph; mod query; mod serialized; -pub trait HasDepContext<'tcx>: Copy { - fn dep_context(&self) -> TyCtxt<'tcx>; -} - -impl<'tcx> HasDepContext<'tcx> for TyCtxt<'tcx> { - fn dep_context(&self) -> TyCtxt<'tcx> { - *self - } -} - /// Describes the contents of the fingerprint generated by a given query. /// /// This is mainly for determining whether and how we can reconstruct a key From cbfa215893bbe80d773d97cfd2e450805137a155 Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Tue, 17 Feb 2026 16:33:21 +0900 Subject: [PATCH 248/265] fix ICE in suggest_param_env_shadowing with incompatible args remove comments --- .../src/error_reporting/infer/mod.rs | 3 +++ ...t-param-env-shadowing-incompatible-args.rs | 18 +++++++++++++++++ ...ram-env-shadowing-incompatible-args.stderr | 20 +++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 tests/ui/associated-types/suggest-param-env-shadowing-incompatible-args.rs create mode 100644 tests/ui/associated-types/suggest-param-env-shadowing-incompatible-args.stderr diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs index 2b2f9a07890f..9f0f7981efc8 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs @@ -301,6 +301,9 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { let rebased_args = alias.args.rebase_onto(tcx, trait_def_id, impl_substs); let impl_item_def_id = leaf_def.item.def_id; + if !tcx.check_args_compatible(impl_item_def_id, rebased_args) { + return false; + } let impl_assoc_ty = tcx.type_of(impl_item_def_id).instantiate(tcx, rebased_args); self.infcx.can_eq(param_env, impl_assoc_ty, concrete) diff --git a/tests/ui/associated-types/suggest-param-env-shadowing-incompatible-args.rs b/tests/ui/associated-types/suggest-param-env-shadowing-incompatible-args.rs new file mode 100644 index 000000000000..4a3ccc287f7f --- /dev/null +++ b/tests/ui/associated-types/suggest-param-env-shadowing-incompatible-args.rs @@ -0,0 +1,18 @@ +//@ compile-flags: -Znext-solver=globally + +// Regression test for https://github.com/rust-lang/rust/issues/152684. + +#![feature(associated_type_defaults)] + +trait Foo { + type Assoc = T; + //~^ ERROR defaults for generic parameters are not allowed here + fn foo() -> Self::Assoc; +} +impl Foo for () { + fn foo() -> Self::Assoc { + [] //~ ERROR mismatched types + } +} + +fn main() {} diff --git a/tests/ui/associated-types/suggest-param-env-shadowing-incompatible-args.stderr b/tests/ui/associated-types/suggest-param-env-shadowing-incompatible-args.stderr new file mode 100644 index 000000000000..c40123324248 --- /dev/null +++ b/tests/ui/associated-types/suggest-param-env-shadowing-incompatible-args.stderr @@ -0,0 +1,20 @@ +error: defaults for generic parameters are not allowed here + --> $DIR/suggest-param-env-shadowing-incompatible-args.rs:8:16 + | +LL | type Assoc = T; + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/suggest-param-env-shadowing-incompatible-args.rs:14:9 + | +LL | fn foo() -> Self::Assoc { + | ----------- expected `<() as Foo>::Assoc` because of return type +LL | [] + | ^^ expected `u8`, found `[_; 0]` + | + = note: expected type `u8` + found array `[_; 0]` + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0308`. From 28fc413c8fba1ef0c5e2162c2ad8d7eeb1089317 Mon Sep 17 00:00:00 2001 From: cyrgani Date: Tue, 17 Feb 2026 08:45:08 +0000 Subject: [PATCH 249/265] remove `#![allow(stable_features)]` from most tests --- library/std/tests/volatile-fat-ptr.rs | 2 -- tests/ui/array-slice-vec/array_const_index-2.rs | 3 --- tests/ui/array-slice-vec/slice-of-zero-size-elements.rs | 4 ---- tests/ui/borrowck/fsu-moves-and-copies.rs | 2 -- tests/ui/cfg/crt-static-off-works.rs | 4 ---- tests/ui/consts/const-fn.rs | 4 ---- tests/ui/consts/issue-29914.rs | 4 ---- tests/ui/dropck/cleanup-arm-conditional.rs | 4 ---- tests/ui/dst/dst-coerce-rc.rs | 3 --- tests/ui/enum-discriminant/discriminant_value.rs | 3 +-- tests/ui/functions-closures/parallel-codegen-closures.rs | 3 --- tests/ui/inference/iterator-sum-array-15673.rs | 3 --- tests/ui/issues/issue-20644.rs | 4 ---- tests/ui/issues/issue-21634.rs | 3 --- tests/ui/issues/issue-29663.rs | 2 -- tests/ui/issues/issue-34780.rs | 2 -- tests/ui/issues/issue-42956.rs | 2 -- tests/ui/iterators/iter-cloned-type-inference.rs | 4 ---- tests/ui/iterators/iterator-type-inference-sum-15673.rs | 3 --- tests/ui/macros/macro-lifetime-used-with-labels.rs | 1 - tests/ui/macros/parse-complex-macro-invoc-op.rs | 4 ---- tests/ui/methods/method-normalize-bounds-issue-20604.rs | 3 --- tests/ui/mir/mir_fat_ptr_drop.rs | 3 --- tests/ui/no_std/no-core-with-explicit-std-core.rs | 3 +-- tests/ui/overloaded/overloaded-autoderef.rs | 1 - tests/ui/overloaded/overloaded-index-autoderef.rs | 2 -- tests/ui/panics/panic-handler-chain-update-hook.rs | 3 --- tests/ui/panics/panic-handler-chain.rs | 3 --- tests/ui/panics/panic-handler-flail-wildly.rs | 3 --- tests/ui/panics/panic-handler-set-twice.rs | 3 --- tests/ui/repr/align-with-extern-c-fn.rs | 3 --- tests/ui/simd/target-feature-mixup.rs | 3 +-- tests/ui/target-feature/target-feature-detection.rs | 3 --- tests/ui/threads-sendsync/tls-init-on-init.rs | 2 -- tests/ui/threads-sendsync/tls-try-with.rs | 2 -- tests/ui/use/use.rs | 4 +--- 36 files changed, 4 insertions(+), 101 deletions(-) diff --git a/library/std/tests/volatile-fat-ptr.rs b/library/std/tests/volatile-fat-ptr.rs index b00277e7a411..406eb7c80afb 100644 --- a/library/std/tests/volatile-fat-ptr.rs +++ b/library/std/tests/volatile-fat-ptr.rs @@ -1,5 +1,3 @@ -#![allow(stable_features)] - use std::ptr::{read_volatile, write_volatile}; #[test] diff --git a/tests/ui/array-slice-vec/array_const_index-2.rs b/tests/ui/array-slice-vec/array_const_index-2.rs index 30338e0ab87c..8dcfc294aae5 100644 --- a/tests/ui/array-slice-vec/array_const_index-2.rs +++ b/tests/ui/array-slice-vec/array_const_index-2.rs @@ -1,8 +1,5 @@ //@ run-pass #![allow(dead_code)] -#![allow(stable_features)] - -#![feature(const_indexing)] fn main() { const ARR: [i32; 6] = [42, 43, 44, 45, 46, 47]; diff --git a/tests/ui/array-slice-vec/slice-of-zero-size-elements.rs b/tests/ui/array-slice-vec/slice-of-zero-size-elements.rs index 7aa8a251fec5..ea7d8f8be2bf 100644 --- a/tests/ui/array-slice-vec/slice-of-zero-size-elements.rs +++ b/tests/ui/array-slice-vec/slice-of-zero-size-elements.rs @@ -1,10 +1,6 @@ //@ run-pass -#![allow(stable_features)] - //@ compile-flags: -C debug-assertions -#![feature(iter_to_slice)] - use std::slice; fn foo(v: &[T]) -> Option<&[T]> { diff --git a/tests/ui/borrowck/fsu-moves-and-copies.rs b/tests/ui/borrowck/fsu-moves-and-copies.rs index 397e4199bc05..6576fb51a5d2 100644 --- a/tests/ui/borrowck/fsu-moves-and-copies.rs +++ b/tests/ui/borrowck/fsu-moves-and-copies.rs @@ -1,11 +1,9 @@ //@ run-pass #![allow(non_camel_case_types)] -#![allow(stable_features)] // Issue 4691: Ensure that functional-struct-updates operates // correctly and moves rather than copy when appropriate. -#![feature(core)] struct ncint { v: isize } fn ncint(v: isize) -> ncint { ncint { v: v } } diff --git a/tests/ui/cfg/crt-static-off-works.rs b/tests/ui/cfg/crt-static-off-works.rs index 1d77dba24b1c..520d139915cc 100644 --- a/tests/ui/cfg/crt-static-off-works.rs +++ b/tests/ui/cfg/crt-static-off-works.rs @@ -1,10 +1,6 @@ //@ run-pass - -#![allow(stable_features)] //@ compile-flags:-C target-feature=-crt-static -Z unstable-options //@ ignore-musl - requires changing the linker which is hard -#![feature(cfg_target_feature)] - #[cfg(not(target_feature = "crt-static"))] fn main() {} diff --git a/tests/ui/consts/const-fn.rs b/tests/ui/consts/const-fn.rs index aa9c478ea633..34aaeac6462d 100644 --- a/tests/ui/consts/const-fn.rs +++ b/tests/ui/consts/const-fn.rs @@ -1,10 +1,6 @@ //@ run-pass -#![allow(stable_features)] - // A very basic test of const fn functionality. -#![feature(const_indexing)] - const fn add(x: u32, y: u32) -> u32 { x + y } diff --git a/tests/ui/consts/issue-29914.rs b/tests/ui/consts/issue-29914.rs index 7897733c7238..36a82f5b9501 100644 --- a/tests/ui/consts/issue-29914.rs +++ b/tests/ui/consts/issue-29914.rs @@ -1,8 +1,4 @@ //@ run-pass -#![allow(stable_features)] - -#![feature(const_indexing)] - const ARR: [usize; 5] = [5, 4, 3, 2, 1]; fn main() { diff --git a/tests/ui/dropck/cleanup-arm-conditional.rs b/tests/ui/dropck/cleanup-arm-conditional.rs index 31331f24d6f6..7afbf9595da5 100644 --- a/tests/ui/dropck/cleanup-arm-conditional.rs +++ b/tests/ui/dropck/cleanup-arm-conditional.rs @@ -1,13 +1,9 @@ //@ run-pass -#![allow(stable_features)] #![allow(unused_imports)] // Test that cleanup scope for temporaries created in a match // arm is confined to the match arm itself. - -#![feature(os)] - use std::os; struct Test { x: isize } diff --git a/tests/ui/dst/dst-coerce-rc.rs b/tests/ui/dst/dst-coerce-rc.rs index 5ec7853a8e82..490cfaca7de9 100644 --- a/tests/ui/dst/dst-coerce-rc.rs +++ b/tests/ui/dst/dst-coerce-rc.rs @@ -1,10 +1,7 @@ //@ run-pass #![allow(unused_variables)] -#![allow(stable_features)] // Test a very simple custom DST coercion. -#![feature(core, rc_weak)] - use std::cell::RefCell; use std::rc::{Rc, Weak}; diff --git a/tests/ui/enum-discriminant/discriminant_value.rs b/tests/ui/enum-discriminant/discriminant_value.rs index 0d6b9166c26a..dc3d9cb83cca 100644 --- a/tests/ui/enum-discriminant/discriminant_value.rs +++ b/tests/ui/enum-discriminant/discriminant_value.rs @@ -1,6 +1,5 @@ //@ run-pass -#![allow(stable_features)] -#![feature(core, core_intrinsics)] +#![feature(core_intrinsics)] extern crate core; use core::intrinsics::discriminant_value; diff --git a/tests/ui/functions-closures/parallel-codegen-closures.rs b/tests/ui/functions-closures/parallel-codegen-closures.rs index 1842ac4db606..8628376c7334 100644 --- a/tests/ui/functions-closures/parallel-codegen-closures.rs +++ b/tests/ui/functions-closures/parallel-codegen-closures.rs @@ -1,15 +1,12 @@ //@ run-pass #![allow(dead_code)] #![allow(unused_variables)] -#![allow(stable_features)] // Tests parallel codegen - this can fail if the symbol for the anonymous // closure in `sum` pollutes the second codegen unit from the first. //@ compile-flags: -C codegen_units=2 -#![feature(iter_arith)] - mod a { fn foo() { let x = ["a", "bob", "c"]; diff --git a/tests/ui/inference/iterator-sum-array-15673.rs b/tests/ui/inference/iterator-sum-array-15673.rs index c3d94415affd..b8d9fd994218 100644 --- a/tests/ui/inference/iterator-sum-array-15673.rs +++ b/tests/ui/inference/iterator-sum-array-15673.rs @@ -1,9 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/15673 //@ run-pass -#![allow(stable_features)] - -#![feature(iter_arith)] fn main() { let x: [u64; 3] = [1, 2, 3]; diff --git a/tests/ui/issues/issue-20644.rs b/tests/ui/issues/issue-20644.rs index 5f7e4054f776..09a2ee7217c3 100644 --- a/tests/ui/issues/issue-20644.rs +++ b/tests/ui/issues/issue-20644.rs @@ -1,14 +1,10 @@ //@ build-pass #![allow(dead_code)] #![allow(unused_imports)] -#![allow(stable_features)] // A reduced version of the rustbook ice. The problem this encountered // had to do with codegen ignoring binders. - -#![feature(os)] - use std::iter; use std::os; use std::fs::File; diff --git a/tests/ui/issues/issue-21634.rs b/tests/ui/issues/issue-21634.rs index 270a893474ad..475a33eca58e 100644 --- a/tests/ui/issues/issue-21634.rs +++ b/tests/ui/issues/issue-21634.rs @@ -1,7 +1,4 @@ //@ run-pass -#![allow(stable_features)] - -#![feature(cfg_target_feature)] #[cfg(any(not(target_arch = "x86"), target_feature = "sse2"))] fn main() { diff --git a/tests/ui/issues/issue-29663.rs b/tests/ui/issues/issue-29663.rs index ed512f14f4ce..9f7de6b72e11 100644 --- a/tests/ui/issues/issue-29663.rs +++ b/tests/ui/issues/issue-29663.rs @@ -1,8 +1,6 @@ //@ run-pass -#![allow(stable_features)] // write_volatile causes an LLVM assert with composite types -#![feature(volatile)] use std::ptr::{read_volatile, write_volatile}; #[derive(Debug, Eq, PartialEq)] diff --git a/tests/ui/issues/issue-34780.rs b/tests/ui/issues/issue-34780.rs index ee5cc0750dce..4470e3af682b 100644 --- a/tests/ui/issues/issue-34780.rs +++ b/tests/ui/issues/issue-34780.rs @@ -1,6 +1,4 @@ //@ check-pass -#![allow(stable_features)] -#![feature(associated_consts)] use std::marker::PhantomData; diff --git a/tests/ui/issues/issue-42956.rs b/tests/ui/issues/issue-42956.rs index a124ca84f3c3..5d6d4249a7d8 100644 --- a/tests/ui/issues/issue-42956.rs +++ b/tests/ui/issues/issue-42956.rs @@ -1,7 +1,5 @@ //@ check-pass #![allow(dead_code)] -#![allow(stable_features)] -#![feature(associated_consts)] impl A for i32 { type Foo = u32; diff --git a/tests/ui/iterators/iter-cloned-type-inference.rs b/tests/ui/iterators/iter-cloned-type-inference.rs index 10f955881188..3957c99cea32 100644 --- a/tests/ui/iterators/iter-cloned-type-inference.rs +++ b/tests/ui/iterators/iter-cloned-type-inference.rs @@ -1,11 +1,7 @@ //@ run-pass -#![allow(stable_features)] - // Test to see that the element type of .cloned() can be inferred // properly. Previously this would fail to deduce the type of `sum`. -#![feature(iter_arith)] - fn square_sum(v: &[i64]) -> i64 { let sum: i64 = v.iter().cloned().sum(); sum * sum diff --git a/tests/ui/iterators/iterator-type-inference-sum-15673.rs b/tests/ui/iterators/iterator-type-inference-sum-15673.rs index aee027927f2f..4b75503df10e 100644 --- a/tests/ui/iterators/iterator-type-inference-sum-15673.rs +++ b/tests/ui/iterators/iterator-type-inference-sum-15673.rs @@ -1,8 +1,5 @@ // https://github.com/rust-lang/rust/issues/15673 //@ run-pass -#![allow(stable_features)] - -#![feature(iter_arith)] fn main() { let x: [u64; 3] = [1, 2, 3]; diff --git a/tests/ui/macros/macro-lifetime-used-with-labels.rs b/tests/ui/macros/macro-lifetime-used-with-labels.rs index 3b51b8050b34..4489ca6b681b 100644 --- a/tests/ui/macros/macro-lifetime-used-with-labels.rs +++ b/tests/ui/macros/macro-lifetime-used-with-labels.rs @@ -1,5 +1,4 @@ //@ run-pass -#![allow(stable_features)] #![allow(unused_labels)] #![allow(unreachable_code)] diff --git a/tests/ui/macros/parse-complex-macro-invoc-op.rs b/tests/ui/macros/parse-complex-macro-invoc-op.rs index 27ead36f69d8..2c384bdb42ef 100644 --- a/tests/ui/macros/parse-complex-macro-invoc-op.rs +++ b/tests/ui/macros/parse-complex-macro-invoc-op.rs @@ -3,14 +3,10 @@ #![allow(dead_code)] #![allow(unused_assignments)] #![allow(unused_variables)] -#![allow(stable_features)] #![allow(dropping_copy_types)] // Test parsing binary operators after macro invocations. - -#![feature(macro_rules)] - macro_rules! id { ($e: expr) => { $e } } diff --git a/tests/ui/methods/method-normalize-bounds-issue-20604.rs b/tests/ui/methods/method-normalize-bounds-issue-20604.rs index ea18fe14d157..9f20f99b97fc 100644 --- a/tests/ui/methods/method-normalize-bounds-issue-20604.rs +++ b/tests/ui/methods/method-normalize-bounds-issue-20604.rs @@ -1,7 +1,6 @@ //@ run-pass #![allow(dead_code)] #![allow(unused_variables)] -#![allow(stable_features)] // Test that we handle projection types which wind up important for // resolving methods. This test was reduced from a larger example; the @@ -10,8 +9,6 @@ // type projection. -#![feature(associated_types)] - trait Hasher { type Output; fn finish(&self) -> Self::Output; diff --git a/tests/ui/mir/mir_fat_ptr_drop.rs b/tests/ui/mir/mir_fat_ptr_drop.rs index ff6a0d70881f..b832d5a4ce9f 100644 --- a/tests/ui/mir/mir_fat_ptr_drop.rs +++ b/tests/ui/mir/mir_fat_ptr_drop.rs @@ -1,10 +1,7 @@ //@ run-pass #![allow(unused_variables)] -#![allow(stable_features)] // test that ordinary fat pointer operations work. - -#![feature(braced_empty_structs)] #![feature(rustc_attrs)] use std::sync::atomic; diff --git a/tests/ui/no_std/no-core-with-explicit-std-core.rs b/tests/ui/no_std/no-core-with-explicit-std-core.rs index 3940bcb3aa4f..6e8e41adca07 100644 --- a/tests/ui/no_std/no-core-with-explicit-std-core.rs +++ b/tests/ui/no_std/no-core-with-explicit-std-core.rs @@ -6,8 +6,7 @@ //@ run-pass -#![allow(stable_features)] -#![feature(no_core, core)] +#![feature(no_core)] #![no_core] extern crate core; diff --git a/tests/ui/overloaded/overloaded-autoderef.rs b/tests/ui/overloaded/overloaded-autoderef.rs index a7a07449ca89..c1a715dd2e9f 100644 --- a/tests/ui/overloaded/overloaded-autoderef.rs +++ b/tests/ui/overloaded/overloaded-autoderef.rs @@ -1,6 +1,5 @@ //@ run-pass #![allow(unused_variables)] -#![allow(stable_features)] use std::cell::RefCell; use std::rc::Rc; diff --git a/tests/ui/overloaded/overloaded-index-autoderef.rs b/tests/ui/overloaded/overloaded-index-autoderef.rs index ab49826e9dfc..3709bb0b5cd5 100644 --- a/tests/ui/overloaded/overloaded-index-autoderef.rs +++ b/tests/ui/overloaded/overloaded-index-autoderef.rs @@ -1,6 +1,4 @@ //@ run-pass -#![allow(stable_features)] - // Test overloaded indexing combined with autoderef. use std::ops::{Index, IndexMut}; diff --git a/tests/ui/panics/panic-handler-chain-update-hook.rs b/tests/ui/panics/panic-handler-chain-update-hook.rs index 2ae79ad236ef..b75c21c8b3b2 100644 --- a/tests/ui/panics/panic-handler-chain-update-hook.rs +++ b/tests/ui/panics/panic-handler-chain-update-hook.rs @@ -1,11 +1,8 @@ //@ run-pass //@ needs-unwind -#![allow(stable_features)] - //@ needs-threads //@ ignore-backends: gcc -#![feature(std_panic)] #![feature(panic_update_hook)] use std::sync::atomic::{AtomicUsize, Ordering}; diff --git a/tests/ui/panics/panic-handler-chain.rs b/tests/ui/panics/panic-handler-chain.rs index cc591c1d9992..49b76834ffe9 100644 --- a/tests/ui/panics/panic-handler-chain.rs +++ b/tests/ui/panics/panic-handler-chain.rs @@ -2,9 +2,6 @@ //@ needs-unwind //@ needs-threads //@ ignore-backends: gcc -#![allow(stable_features)] - -#![feature(std_panic)] use std::sync::atomic::{AtomicUsize, Ordering}; use std::panic; diff --git a/tests/ui/panics/panic-handler-flail-wildly.rs b/tests/ui/panics/panic-handler-flail-wildly.rs index d5f5195d3812..b44a388caad3 100644 --- a/tests/ui/panics/panic-handler-flail-wildly.rs +++ b/tests/ui/panics/panic-handler-flail-wildly.rs @@ -1,14 +1,11 @@ //@ run-pass //@ needs-unwind -#![allow(stable_features)] #![allow(unused_must_use)] //@ needs-threads //@ ignore-backends: gcc -#![feature(std_panic)] - use std::panic; use std::thread; diff --git a/tests/ui/panics/panic-handler-set-twice.rs b/tests/ui/panics/panic-handler-set-twice.rs index ca4ed65f5683..aa40187f08ca 100644 --- a/tests/ui/panics/panic-handler-set-twice.rs +++ b/tests/ui/panics/panic-handler-set-twice.rs @@ -1,9 +1,6 @@ //@ run-pass //@ needs-unwind #![allow(unused_variables)] -#![allow(stable_features)] - -#![feature(std_panic)] //@ needs-threads //@ ignore-backends: gcc diff --git a/tests/ui/repr/align-with-extern-c-fn.rs b/tests/ui/repr/align-with-extern-c-fn.rs index 4d17d1e8816f..a695f4bffe94 100644 --- a/tests/ui/repr/align-with-extern-c-fn.rs +++ b/tests/ui/repr/align-with-extern-c-fn.rs @@ -1,12 +1,9 @@ //@ run-pass -#![allow(stable_features)] #![allow(unused_variables)] // #45662 -#![feature(repr_align)] - #[repr(align(16))] pub struct A(#[allow(dead_code)] i64); diff --git a/tests/ui/simd/target-feature-mixup.rs b/tests/ui/simd/target-feature-mixup.rs index 014a9966f5cb..5f599f38fb92 100644 --- a/tests/ui/simd/target-feature-mixup.rs +++ b/tests/ui/simd/target-feature-mixup.rs @@ -1,13 +1,12 @@ //@ run-pass #![allow(unused_variables)] -#![allow(stable_features)] #![allow(overflowing_literals)] //@ needs-subprocess //@ ignore-fuchsia must translate zircon signal to SIGILL, FIXME (#58590) //@ ignore-backends: gcc -#![feature(repr_simd, target_feature, cfg_target_feature)] +#![feature(repr_simd)] #[path = "../../auxiliary/minisimd.rs"] mod minisimd; diff --git a/tests/ui/target-feature/target-feature-detection.rs b/tests/ui/target-feature/target-feature-detection.rs index 41fc24691312..9a9102bf7d54 100644 --- a/tests/ui/target-feature/target-feature-detection.rs +++ b/tests/ui/target-feature/target-feature-detection.rs @@ -4,9 +4,6 @@ //@ run-pass //@ ignore-i586 (no SSE2) -#![allow(stable_features)] -#![feature(cfg_target_feature)] - fn main() { if cfg!(any(target_arch = "x86", target_arch = "x86_64")) { assert!( diff --git a/tests/ui/threads-sendsync/tls-init-on-init.rs b/tests/ui/threads-sendsync/tls-init-on-init.rs index 1cae19aae86c..d7c110e80e85 100644 --- a/tests/ui/threads-sendsync/tls-init-on-init.rs +++ b/tests/ui/threads-sendsync/tls-init-on-init.rs @@ -1,7 +1,5 @@ //@ run-pass -#![allow(stable_features)] //@ needs-threads -#![feature(thread_local_try_with)] use std::sync::atomic::{AtomicUsize, Ordering}; use std::thread; diff --git a/tests/ui/threads-sendsync/tls-try-with.rs b/tests/ui/threads-sendsync/tls-try-with.rs index 04071e77daa4..1d0c5de7d87f 100644 --- a/tests/ui/threads-sendsync/tls-try-with.rs +++ b/tests/ui/threads-sendsync/tls-try-with.rs @@ -1,7 +1,5 @@ //@ run-pass -#![allow(stable_features)] //@ needs-threads -#![feature(thread_local_try_with)] use std::thread; diff --git a/tests/ui/use/use.rs b/tests/ui/use/use.rs index 25b8e529c432..c6b6724ef7c1 100644 --- a/tests/ui/use/use.rs +++ b/tests/ui/use/use.rs @@ -1,9 +1,7 @@ //@ run-pass -#![allow(stable_features)] - #![allow(unused_imports)] -#![feature(no_core, core)] +#![feature(no_core)] #![no_core] extern crate std; From 0c8d2b40e39b4638d86126bd6072b2488ca141c7 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 17 Feb 2026 10:57:34 +0100 Subject: [PATCH 250/265] Update `sysinfo` version to `0.38.2` --- Cargo.lock | 12 ++++++------ src/bootstrap/Cargo.lock | 12 ++++++------ src/bootstrap/Cargo.toml | 2 +- src/tools/opt-dist/Cargo.toml | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d7d19be42c58..aa0bc0164e22 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2652,9 +2652,9 @@ dependencies = [ [[package]] name = "objc2-core-foundation" -version = "0.3.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" dependencies = [ "bitflags", ] @@ -2667,9 +2667,9 @@ checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" [[package]] name = "objc2-io-kit" -version = "0.3.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" +checksum = "71c1c64d6120e51cd86033f67176b1cb66780c2efe34dec55176f77befd93c0a" dependencies = [ "libc", "objc2-core-foundation", @@ -5354,9 +5354,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.38.0" +version = "0.38.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe840c5b1afe259a5657392a4dbb74473a14c8db999c3ec2f4ae812e028a94da" +checksum = "1efc19935b4b66baa6f654ac7924c192f55b175c00a7ab72410fc24284dacda8" dependencies = [ "libc", "objc2-core-foundation", diff --git a/src/bootstrap/Cargo.lock b/src/bootstrap/Cargo.lock index 960f003992fb..f9499d9927f2 100644 --- a/src/bootstrap/Cargo.lock +++ b/src/bootstrap/Cargo.lock @@ -472,18 +472,18 @@ dependencies = [ [[package]] name = "objc2-core-foundation" -version = "0.3.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" dependencies = [ "bitflags", ] [[package]] name = "objc2-io-kit" -version = "0.3.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" +checksum = "71c1c64d6120e51cd86033f67176b1cb66780c2efe34dec55176f77befd93c0a" dependencies = [ "libc", "objc2-core-foundation", @@ -743,9 +743,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.38.0" +version = "0.38.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe840c5b1afe259a5657392a4dbb74473a14c8db999c3ec2f4ae812e028a94da" +checksum = "1efc19935b4b66baa6f654ac7924c192f55b175c00a7ab72410fc24284dacda8" dependencies = [ "libc", "memchr", diff --git a/src/bootstrap/Cargo.toml b/src/bootstrap/Cargo.toml index 008e0d37642b..0019e9e6d92e 100644 --- a/src/bootstrap/Cargo.toml +++ b/src/bootstrap/Cargo.toml @@ -57,7 +57,7 @@ walkdir = "2.4" xz2 = "0.1" # Dependencies needed by the build-metrics feature -sysinfo = { version = "0.38.0", default-features = false, optional = true, features = ["system"] } +sysinfo = { version = "0.38.2", default-features = false, optional = true, features = ["system"] } # Dependencies needed by the `tracing` feature chrono = { version = "0.4", default-features = false, optional = true, features = ["now", "std"] } diff --git a/src/tools/opt-dist/Cargo.toml b/src/tools/opt-dist/Cargo.toml index 9ca1729e2e8b..b6547eff007b 100644 --- a/src/tools/opt-dist/Cargo.toml +++ b/src/tools/opt-dist/Cargo.toml @@ -10,7 +10,7 @@ log = "0.4" anyhow = "1" humantime = "2" humansize = "2" -sysinfo = { version = "0.38.0", default-features = false, features = ["disk"] } +sysinfo = { version = "0.38.2", default-features = false, features = ["disk"] } fs_extra = "1" camino = "1" tar = "0.4" From e0d9d470df00ecbe07bb5ddfec2ab6083aa3025f Mon Sep 17 00:00:00 2001 From: reddevilmidzy Date: Tue, 17 Feb 2026 10:18:08 +0000 Subject: [PATCH 251/265] Fix invalid `mut T` suggestion for `&mut T` in missing lifetime error * Find ref prefix span for owned suggestions * Improve missing lifetime suggestions for `&mut str` --- .../rustc_resolve/src/late/diagnostics.rs | 78 ++++++++-- .../ui/lifetimes/mut-ref-owned-suggestion.rs | 29 ++++ .../lifetimes/mut-ref-owned-suggestion.stderr | 137 ++++++++++++++++++ 3 files changed, 231 insertions(+), 13 deletions(-) create mode 100644 tests/ui/lifetimes/mut-ref-owned-suggestion.rs create mode 100644 tests/ui/lifetimes/mut-ref-owned-suggestion.stderr diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index c5d15dcc91af..82fd46c14e05 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -3837,25 +3837,32 @@ impl<'ast, 'ra, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> { "instead, you are more likely to want" }; let mut owned_sugg = lt.kind == MissingLifetimeKind::Ampersand; + let mut sugg_is_str_to_string = false; let mut sugg = vec![(lt.span, String::new())]; if let Some((kind, _span)) = self.diag_metadata.current_function && let FnKind::Fn(_, _, ast::Fn { sig, .. }) = kind - && let ast::FnRetTy::Ty(ty) = &sig.decl.output { let mut lt_finder = LifetimeFinder { lifetime: lt.span, found: None, seen: vec![] }; - lt_finder.visit_ty(&ty); - - if let [Ty { span, kind: TyKind::Ref(_, mut_ty), .. }] = - <_finder.seen[..] - { - // We might have a situation like - // fn g(mut x: impl Iterator) -> Option<&'_ ()> - // but `lt.span` only points at `'_`, so to suggest `-> Option<()>` - // we need to find a more accurate span to end up with - // fn g<'a>(mut x: impl Iterator) -> Option<()> - sugg = vec![(span.with_hi(mut_ty.ty.span.lo()), String::new())]; - owned_sugg = true; + for param in &sig.decl.inputs { + lt_finder.visit_ty(¶m.ty); + } + if let ast::FnRetTy::Ty(ret_ty) = &sig.decl.output { + lt_finder.visit_ty(ret_ty); + let mut ret_lt_finder = + LifetimeFinder { lifetime: lt.span, found: None, seen: vec![] }; + ret_lt_finder.visit_ty(ret_ty); + if let [Ty { span, kind: TyKind::Ref(_, mut_ty), .. }] = + &ret_lt_finder.seen[..] + { + // We might have a situation like + // fn g(mut x: impl Iterator) -> Option<&'_ ()> + // but `lt.span` only points at `'_`, so to suggest `-> Option<()>` + // we need to find a more accurate span to end up with + // fn g<'a>(mut x: impl Iterator) -> Option<()> + sugg = vec![(span.with_hi(mut_ty.ty.span.lo()), String::new())]; + owned_sugg = true; + } } if let Some(ty) = lt_finder.found { if let TyKind::Path(None, path) = &ty.kind { @@ -3875,6 +3882,7 @@ impl<'ast, 'ra, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> { lt.span.with_hi(ty.span.hi()), "String".to_string(), )]; + sugg_is_str_to_string = true; } Some(Res::PrimTy(..)) => {} Some(Res::Def( @@ -3901,6 +3909,7 @@ impl<'ast, 'ra, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> { lt.span.with_hi(ty.span.hi()), "String".to_string(), )]; + sugg_is_str_to_string = true; } Res::PrimTy(..) => {} Res::Def( @@ -3935,6 +3944,12 @@ impl<'ast, 'ra, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> { } } if owned_sugg { + if let Some(span) = + self.find_ref_prefix_span_for_owned_suggestion(lt.span) + && !sugg_is_str_to_string + { + sugg = vec![(span, String::new())]; + } err.multipart_suggestion_verbose( format!("{pre} to return an owned value"), sugg, @@ -3961,6 +3976,23 @@ impl<'ast, 'ra, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> { } } } + + fn find_ref_prefix_span_for_owned_suggestion(&self, lifetime: Span) -> Option { + let mut finder = RefPrefixSpanFinder { lifetime, span: None }; + if let Some(item) = self.diag_metadata.current_item { + finder.visit_item(item); + } else if let Some((kind, _span)) = self.diag_metadata.current_function + && let FnKind::Fn(_, _, ast::Fn { sig, .. }) = kind + { + for param in &sig.decl.inputs { + finder.visit_ty(¶m.ty); + } + if let ast::FnRetTy::Ty(ret_ty) = &sig.decl.output { + finder.visit_ty(ret_ty); + } + } + finder.span + } } fn mk_where_bound_predicate( @@ -4058,6 +4090,26 @@ impl<'ast> Visitor<'ast> for LifetimeFinder<'ast> { } } +struct RefPrefixSpanFinder { + lifetime: Span, + span: Option, +} + +impl<'ast> Visitor<'ast> for RefPrefixSpanFinder { + fn visit_ty(&mut self, t: &'ast Ty) { + if self.span.is_some() { + return; + } + if let TyKind::Ref(_, mut_ty) | TyKind::PinnedRef(_, mut_ty) = &t.kind + && t.span.lo() == self.lifetime.lo() + { + self.span = Some(t.span.with_hi(mut_ty.ty.span.lo())); + return; + } + walk_ty(self, t); + } +} + /// Shadowing involving a label is only a warning for historical reasons. //FIXME: make this a proper lint. pub(super) fn signal_label_shadowing(sess: &Session, orig: Span, shadower: Ident) { diff --git a/tests/ui/lifetimes/mut-ref-owned-suggestion.rs b/tests/ui/lifetimes/mut-ref-owned-suggestion.rs new file mode 100644 index 000000000000..ae5e8f6658b6 --- /dev/null +++ b/tests/ui/lifetimes/mut-ref-owned-suggestion.rs @@ -0,0 +1,29 @@ +//! Regression test for +//! Tests that `&mut T` suggests `T`, not `mut T`, `&mut str` suggests `String`, not `str`, +//! when recommending an owned value. +fn with_fn(_f: impl Fn() -> &mut ()) {} +//~^ ERROR: missing lifetime specifier + +fn with_ref_mut_str(_f: impl Fn() -> &mut str) {} +//~^ ERROR: missing lifetime specifier + +fn with_fn_has_return(_f: impl Fn() -> &mut ()) -> i32 { + //~^ ERROR: missing lifetime specifier + 2 +} + +fn with_dyn(_f: Box &mut i32>) {} +//~^ ERROR: missing lifetime specifier + +fn trait_bound &mut i32>(_f: F) {} +//~^ ERROR: missing lifetime specifier + +fn nested_result(_f: impl Fn() -> Result<&mut i32, ()>) {} +//~^ ERROR: missing lifetime specifier + +struct Holder &mut i32> { + //~^ ERROR: missing lifetime specifier + f: F, +} + +fn main() {} diff --git a/tests/ui/lifetimes/mut-ref-owned-suggestion.stderr b/tests/ui/lifetimes/mut-ref-owned-suggestion.stderr new file mode 100644 index 000000000000..a3e58331342a --- /dev/null +++ b/tests/ui/lifetimes/mut-ref-owned-suggestion.stderr @@ -0,0 +1,137 @@ +error[E0106]: missing lifetime specifier + --> $DIR/mut-ref-owned-suggestion.rs:4:29 + | +LL | fn with_fn(_f: impl Fn() -> &mut ()) {} + | ^ expected named lifetime parameter + | + = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from +help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static` + | +LL | fn with_fn(_f: impl Fn() -> &'static mut ()) {} + | +++++++ +help: instead, you are more likely to want to return an owned value + | +LL - fn with_fn(_f: impl Fn() -> &mut ()) {} +LL + fn with_fn(_f: impl Fn() -> ()) {} + | + +error[E0106]: missing lifetime specifier + --> $DIR/mut-ref-owned-suggestion.rs:7:38 + | +LL | fn with_ref_mut_str(_f: impl Fn() -> &mut str) {} + | ^ expected named lifetime parameter + | + = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from +help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static` + | +LL | fn with_ref_mut_str(_f: impl Fn() -> &'static mut str) {} + | +++++++ +help: instead, you are more likely to want to return an owned value + | +LL - fn with_ref_mut_str(_f: impl Fn() -> &mut str) {} +LL + fn with_ref_mut_str(_f: impl Fn() -> String) {} + | + +error[E0106]: missing lifetime specifier + --> $DIR/mut-ref-owned-suggestion.rs:10:40 + | +LL | fn with_fn_has_return(_f: impl Fn() -> &mut ()) -> i32 { + | ^ expected named lifetime parameter + | + = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from + = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html +help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static` + | +LL | fn with_fn_has_return(_f: impl Fn() -> &'static mut ()) -> i32 { + | +++++++ +help: consider making the bound lifetime-generic with a new `'a` lifetime + | +LL - fn with_fn_has_return(_f: impl Fn() -> &mut ()) -> i32 { +LL + fn with_fn_has_return(_f: impl for<'a> Fn() -> &'a ()) -> i32 { + | +help: consider introducing a named lifetime parameter + | +LL - fn with_fn_has_return(_f: impl Fn() -> &mut ()) -> i32 { +LL + fn with_fn_has_return<'a>(_f: impl Fn() -> &'a ()) -> i32 { + | +help: alternatively, you might want to return an owned value + | +LL - fn with_fn_has_return(_f: impl Fn() -> &mut ()) -> i32 { +LL + fn with_fn_has_return(_f: impl Fn() -> ()) -> i32 { + | + +error[E0106]: missing lifetime specifier + --> $DIR/mut-ref-owned-suggestion.rs:15:33 + | +LL | fn with_dyn(_f: Box &mut i32>) {} + | ^ expected named lifetime parameter + | + = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from +help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static` + | +LL | fn with_dyn(_f: Box &'static mut i32>) {} + | +++++++ +help: instead, you are more likely to want to return an owned value + | +LL - fn with_dyn(_f: Box &mut i32>) {} +LL + fn with_dyn(_f: Box i32>) {} + | + +error[E0106]: missing lifetime specifier + --> $DIR/mut-ref-owned-suggestion.rs:18:27 + | +LL | fn trait_bound &mut i32>(_f: F) {} + | ^ expected named lifetime parameter + | + = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from +help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static` + | +LL | fn trait_bound &'static mut i32>(_f: F) {} + | +++++++ +help: instead, you are more likely to want to change the argument to be borrowed... + | +LL | fn trait_bound &mut i32>(_f: &F) {} + | + +help: ...or alternatively, you might want to return an owned value + | +LL - fn trait_bound &mut i32>(_f: F) {} +LL + fn trait_bound i32>(_f: F) {} + | + +error[E0106]: missing lifetime specifier + --> $DIR/mut-ref-owned-suggestion.rs:21:42 + | +LL | fn nested_result(_f: impl Fn() -> Result<&mut i32, ()>) {} + | ^ expected named lifetime parameter + | + = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from +help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static` + | +LL | fn nested_result(_f: impl Fn() -> Result<&'static mut i32, ()>) {} + | +++++++ +help: instead, you are more likely to want to return an owned value + | +LL - fn nested_result(_f: impl Fn() -> Result<&mut i32, ()>) {} +LL + fn nested_result(_f: impl Fn() -> Result) {} + | + +error[E0106]: missing lifetime specifier + --> $DIR/mut-ref-owned-suggestion.rs:24:26 + | +LL | struct Holder &mut i32> { + | ^ expected named lifetime parameter + | + = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from +help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static` + | +LL | struct Holder &'static mut i32> { + | +++++++ +help: instead, you are more likely to want to return an owned value + | +LL - struct Holder &mut i32> { +LL + struct Holder i32> { + | + +error: aborting due to 7 previous errors + +For more information about this error, try `rustc --explain E0106`. From 609fde856937601e1615185f1b48795080fa13ee Mon Sep 17 00:00:00 2001 From: cyrgani Date: Tue, 17 Feb 2026 10:54:04 +0000 Subject: [PATCH 252/265] remove the `issue_5723_bootstrap` feature --- compiler/rustc_feature/src/accepted.rs | 3 --- compiler/rustc_feature/src/removed.rs | 3 +++ tests/ui/regions/regions-bound-lists-feature-gate-2.rs | 3 --- tests/ui/regions/regions-bound-lists-feature-gate.rs | 3 --- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs index 43032bf938c0..521168d4d851 100644 --- a/compiler/rustc_feature/src/accepted.rs +++ b/compiler/rustc_feature/src/accepted.rs @@ -25,9 +25,6 @@ declare_features! ( // feature-group-start: for testing purposes // ------------------------------------------------------------------------- - /// A temporary feature gate used to enable parser extensions needed - /// to bootstrap fix for #5723. - (accepted, issue_5723_bootstrap, "1.0.0", None), /// These are used to test this portion of the compiler, /// they don't actually mean anything. (accepted, test_accepted_feature, "1.0.0", None), diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs index 71a735cd8cc7..f8501ba3da29 100644 --- a/compiler/rustc_feature/src/removed.rs +++ b/compiler/rustc_feature/src/removed.rs @@ -172,6 +172,9 @@ declare_features! ( /// Allow anonymous constants from an inline `const` block in pattern position (removed, inline_const_pat, "1.88.0", Some(76001), Some("removed due to implementation concerns as it requires significant refactorings"), 138492), + /// A temporary feature gate used to enable parser extensions needed + /// to bootstrap fix for #5723. + (removed, issue_5723_bootstrap, "CURRENT_RUSTC_VERSION", None, None), /// Lazily evaluate constants. This allows constants to depend on type parameters. (removed, lazy_normalization_consts, "1.56.0", Some(72219), Some("superseded by `generic_const_exprs`"), 88369), /// Changes `impl Trait` to capture all lifetimes in scope. diff --git a/tests/ui/regions/regions-bound-lists-feature-gate-2.rs b/tests/ui/regions/regions-bound-lists-feature-gate-2.rs index f4f27a4456df..6cdae0d49081 100644 --- a/tests/ui/regions/regions-bound-lists-feature-gate-2.rs +++ b/tests/ui/regions/regions-bound-lists-feature-gate-2.rs @@ -1,8 +1,5 @@ //@ run-pass #![allow(dead_code)] -#![allow(stable_features)] - -#![feature(issue_5723_bootstrap)] trait Foo { fn dummy(&self) { } diff --git a/tests/ui/regions/regions-bound-lists-feature-gate.rs b/tests/ui/regions/regions-bound-lists-feature-gate.rs index 1bc2b7dd03ef..23878f5b406f 100644 --- a/tests/ui/regions/regions-bound-lists-feature-gate.rs +++ b/tests/ui/regions/regions-bound-lists-feature-gate.rs @@ -1,9 +1,6 @@ //@ run-pass #![allow(dead_code)] #![allow(unused_variables)] -#![allow(stable_features)] - -#![feature(issue_5723_bootstrap)] trait Foo { fn dummy(&self) { } From 6d4b1b38e76c0858c8e98f89afa37535261749ca Mon Sep 17 00:00:00 2001 From: Camille Gillot Date: Wed, 15 Oct 2025 23:08:15 +0000 Subject: [PATCH 253/265] Remove ShallowInitBox. --- compiler/rustc_borrowck/src/lib.rs | 3 +- .../src/polonius/legacy/loan_invalidations.rs | 5 +- compiler/rustc_borrowck/src/type_check/mod.rs | 12 ---- compiler/rustc_codegen_cranelift/src/base.rs | 1 - compiler/rustc_codegen_ssa/src/mir/rvalue.rs | 1 - .../src/check_consts/check.rs | 2 - .../src/check_consts/qualifs.rs | 3 +- .../src/check_consts/resolver.rs | 1 - .../rustc_const_eval/src/interpret/step.rs | 6 -- compiler/rustc_middle/src/mir/pretty.rs | 4 -- compiler/rustc_middle/src/mir/statement.rs | 17 ----- compiler/rustc_middle/src/mir/syntax.rs | 7 -- compiler/rustc_middle/src/mir/visit.rs | 5 -- .../src/impls/borrowed_locals.rs | 1 - .../src/move_paths/builder.rs | 11 +-- .../src/dataflow_const_prop.rs | 1 - .../src/elaborate_box_derefs.rs | 68 +------------------ compiler/rustc_mir_transform/src/gvn.rs | 2 +- .../src/known_panics_lint.rs | 3 - compiler/rustc_mir_transform/src/lint.rs | 1 - .../rustc_mir_transform/src/promote_consts.rs | 2 - compiler/rustc_mir_transform/src/validate.rs | 8 --- compiler/rustc_public/src/mir/body.rs | 8 --- compiler/rustc_public/src/mir/pretty.rs | 1 - compiler/rustc_public/src/mir/visit.rs | 4 -- .../src/unstable/convert/stable/mir.rs | 3 - .../clippy_utils/src/qualify_min_const_fn.rs | 1 - 27 files changed, 8 insertions(+), 173 deletions(-) diff --git a/compiler/rustc_borrowck/src/lib.rs b/compiler/rustc_borrowck/src/lib.rs index 2e6c1dceef98..7a5eb28940e4 100644 --- a/compiler/rustc_borrowck/src/lib.rs +++ b/compiler/rustc_borrowck/src/lib.rs @@ -1544,8 +1544,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> { Rvalue::Use(operand) | Rvalue::Repeat(operand, _) | Rvalue::UnaryOp(_ /*un_op*/, operand) - | Rvalue::Cast(_ /*cast_kind*/, operand, _ /*ty*/) - | Rvalue::ShallowInitBox(operand, _ /*ty*/) => { + | Rvalue::Cast(_ /*cast_kind*/, operand, _ /*ty*/) => { self.consume_operand(location, (operand, span), state) } diff --git a/compiler/rustc_borrowck/src/polonius/legacy/loan_invalidations.rs b/compiler/rustc_borrowck/src/polonius/legacy/loan_invalidations.rs index 99567da92ffe..439aa1a91e06 100644 --- a/compiler/rustc_borrowck/src/polonius/legacy/loan_invalidations.rs +++ b/compiler/rustc_borrowck/src/polonius/legacy/loan_invalidations.rs @@ -297,8 +297,9 @@ impl<'a, 'tcx> LoanInvalidationsGenerator<'a, 'tcx> { Rvalue::Use(operand) | Rvalue::Repeat(operand, _) | Rvalue::UnaryOp(_ /*un_op*/, operand) - | Rvalue::Cast(_ /*cast_kind*/, operand, _ /*ty*/) - | Rvalue::ShallowInitBox(operand, _ /*ty*/) => self.consume_operand(location, operand), + | Rvalue::Cast(_ /*cast_kind*/, operand, _ /*ty*/) => { + self.consume_operand(location, operand) + } &Rvalue::Discriminant(place) => { self.access_place( diff --git a/compiler/rustc_borrowck/src/type_check/mod.rs b/compiler/rustc_borrowck/src/type_check/mod.rs index 7d34d7c88e62..2935559147b7 100644 --- a/compiler/rustc_borrowck/src/type_check/mod.rs +++ b/compiler/rustc_borrowck/src/type_check/mod.rs @@ -1004,17 +1004,6 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> { } } - Rvalue::ShallowInitBox(_operand, ty) => { - let trait_ref = - ty::TraitRef::new(tcx, tcx.require_lang_item(LangItem::Sized, span), [*ty]); - - self.prove_trait_ref( - trait_ref, - location.to_locations(), - ConstraintCategory::SizedBound, - ); - } - Rvalue::Cast(cast_kind, op, ty) => { match *cast_kind { CastKind::PointerCoercion( @@ -2231,7 +2220,6 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { | Rvalue::Ref(..) | Rvalue::RawPtr(..) | Rvalue::Cast(..) - | Rvalue::ShallowInitBox(..) | Rvalue::BinaryOp(..) | Rvalue::CopyForDeref(..) | Rvalue::UnaryOp(..) diff --git a/compiler/rustc_codegen_cranelift/src/base.rs b/compiler/rustc_codegen_cranelift/src/base.rs index 1a916c876824..e4865ece63b6 100644 --- a/compiler/rustc_codegen_cranelift/src/base.rs +++ b/compiler/rustc_codegen_cranelift/src/base.rs @@ -902,7 +902,6 @@ fn codegen_stmt<'tcx>(fx: &mut FunctionCx<'_, '_, 'tcx>, cur_block: Block, stmt: lval.write_cvalue_transmute(fx, operand); } Rvalue::CopyForDeref(_) => bug!("`CopyForDeref` in codegen"), - Rvalue::ShallowInitBox(..) => bug!("`ShallowInitBox` in codegen"), } } StatementKind::StorageLive(_) diff --git a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs index ca8c8dd06ba6..2cb96c4ec0f5 100644 --- a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs +++ b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs @@ -710,7 +710,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { OperandRef { val: operand.val, layout, move_annotation: None } } mir::Rvalue::CopyForDeref(_) => bug!("`CopyForDeref` in codegen"), - mir::Rvalue::ShallowInitBox(..) => bug!("`ShallowInitBox` in codegen"), } } diff --git a/compiler/rustc_const_eval/src/check_consts/check.rs b/compiler/rustc_const_eval/src/check_consts/check.rs index 564f67e5b1e4..9c9a921bd62d 100644 --- a/compiler/rustc_const_eval/src/check_consts/check.rs +++ b/compiler/rustc_const_eval/src/check_consts/check.rs @@ -646,8 +646,6 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> { Rvalue::Cast(_, _, _) => {} - Rvalue::ShallowInitBox(_, _) => {} - Rvalue::UnaryOp(op, operand) => { let ty = operand.ty(self.body, self.tcx); match op { diff --git a/compiler/rustc_const_eval/src/check_consts/qualifs.rs b/compiler/rustc_const_eval/src/check_consts/qualifs.rs index 462254f064cf..1fbd0cd23405 100644 --- a/compiler/rustc_const_eval/src/check_consts/qualifs.rs +++ b/compiler/rustc_const_eval/src/check_consts/qualifs.rs @@ -237,8 +237,7 @@ where Rvalue::Use(operand) | Rvalue::Repeat(operand, _) | Rvalue::UnaryOp(_, operand) - | Rvalue::Cast(_, operand, _) - | Rvalue::ShallowInitBox(operand, _) => in_operand::(cx, in_local, operand), + | Rvalue::Cast(_, operand, _) => in_operand::(cx, in_local, operand), Rvalue::BinaryOp(_, box (lhs, rhs)) => { in_operand::(cx, in_local, lhs) || in_operand::(cx, in_local, rhs) diff --git a/compiler/rustc_const_eval/src/check_consts/resolver.rs b/compiler/rustc_const_eval/src/check_consts/resolver.rs index d4cc21996aea..044b8b091b8d 100644 --- a/compiler/rustc_const_eval/src/check_consts/resolver.rs +++ b/compiler/rustc_const_eval/src/check_consts/resolver.rs @@ -192,7 +192,6 @@ where } mir::Rvalue::Cast(..) - | mir::Rvalue::ShallowInitBox(..) | mir::Rvalue::Use(..) | mir::Rvalue::CopyForDeref(..) | mir::Rvalue::ThreadLocalRef(..) diff --git a/compiler/rustc_const_eval/src/interpret/step.rs b/compiler/rustc_const_eval/src/interpret/step.rs index 4aa9030cfe61..0dd17f109be3 100644 --- a/compiler/rustc_const_eval/src/interpret/step.rs +++ b/compiler/rustc_const_eval/src/interpret/step.rs @@ -249,12 +249,6 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { self.write_immediate(*val, &dest)?; } - ShallowInitBox(ref operand, _) => { - let src = self.eval_operand(operand, None)?; - let v = self.read_immediate(&src)?; - self.write_immediate(*v, &dest)?; - } - Cast(cast_kind, ref operand, cast_ty) => { let src = self.eval_operand(operand, None)?; let cast_ty = diff --git a/compiler/rustc_middle/src/mir/pretty.rs b/compiler/rustc_middle/src/mir/pretty.rs index 2e6e96b4d8a8..e5fe01781e96 100644 --- a/compiler/rustc_middle/src/mir/pretty.rs +++ b/compiler/rustc_middle/src/mir/pretty.rs @@ -1237,10 +1237,6 @@ impl<'tcx> Debug for Rvalue<'tcx> { } } - ShallowInitBox(ref place, ref ty) => { - with_no_trimmed_paths!(write!(fmt, "ShallowInitBox({place:?}, {ty})")) - } - WrapUnsafeBinder(ref op, ty) => { with_no_trimmed_paths!(write!(fmt, "wrap_binder!({op:?}; {ty})")) } diff --git a/compiler/rustc_middle/src/mir/statement.rs b/compiler/rustc_middle/src/mir/statement.rs index b1cb89bd3713..48dcef298d66 100644 --- a/compiler/rustc_middle/src/mir/statement.rs +++ b/compiler/rustc_middle/src/mir/statement.rs @@ -747,11 +747,6 @@ impl<'tcx> ConstOperand<'tcx> { /////////////////////////////////////////////////////////////////////////// // Rvalues -pub enum RvalueInitializationState { - Shallow, - Deep, -} - impl<'tcx> Rvalue<'tcx> { /// Returns true if rvalue can be safely removed when the result is unused. #[inline] @@ -786,7 +781,6 @@ impl<'tcx> Rvalue<'tcx> { | Rvalue::UnaryOp(_, _) | Rvalue::Discriminant(_) | Rvalue::Aggregate(_, _) - | Rvalue::ShallowInitBox(_, _) | Rvalue::WrapUnsafeBinder(_, _) => true, } } @@ -833,21 +827,10 @@ impl<'tcx> Rvalue<'tcx> { } AggregateKind::RawPtr(ty, mutability) => Ty::new_ptr(tcx, ty, mutability), }, - Rvalue::ShallowInitBox(_, ty) => Ty::new_box(tcx, ty), Rvalue::CopyForDeref(ref place) => place.ty(local_decls, tcx).ty, Rvalue::WrapUnsafeBinder(_, ty) => ty, } } - - #[inline] - /// Returns `true` if this rvalue is deeply initialized (most rvalues) or - /// whether its only shallowly initialized (`Rvalue::Box`). - pub fn initialization_state(&self) -> RvalueInitializationState { - match *self { - Rvalue::ShallowInitBox(_, _) => RvalueInitializationState::Shallow, - _ => RvalueInitializationState::Deep, - } - } } impl BorrowKind { diff --git a/compiler/rustc_middle/src/mir/syntax.rs b/compiler/rustc_middle/src/mir/syntax.rs index 6ec874fb15f7..35f67460f51c 100644 --- a/compiler/rustc_middle/src/mir/syntax.rs +++ b/compiler/rustc_middle/src/mir/syntax.rs @@ -1458,13 +1458,6 @@ pub enum Rvalue<'tcx> { /// coroutine lowering, `Coroutine` aggregate kinds are disallowed too. Aggregate(Box>, IndexVec>), - /// Transmutes a `*mut u8` into shallow-initialized `Box`. - /// - /// This is different from a normal transmute because dataflow analysis will treat the box as - /// initialized but its content as uninitialized. Like other pointer casts, this in general - /// affects alias analysis. - ShallowInitBox(Operand<'tcx>, Ty<'tcx>), - /// A CopyForDeref is equivalent to a read from a place at the /// codegen level, but is treated specially by drop elaboration. When such a read happens, it /// is guaranteed (via nature of the mir_opt `Derefer` in rustc_mir_transform/src/deref_separator) diff --git a/compiler/rustc_middle/src/mir/visit.rs b/compiler/rustc_middle/src/mir/visit.rs index 07a36aef4320..16a8743a6d67 100644 --- a/compiler/rustc_middle/src/mir/visit.rs +++ b/compiler/rustc_middle/src/mir/visit.rs @@ -810,11 +810,6 @@ macro_rules! make_mir_visitor { } } - Rvalue::ShallowInitBox(operand, ty) => { - self.visit_operand(operand, location); - self.visit_ty($(& $mutability)? *ty, TyContext::Location(location)); - } - Rvalue::WrapUnsafeBinder(op, ty) => { self.visit_operand(op, location); self.visit_ty($(& $mutability)? *ty, TyContext::Location(location)); diff --git a/compiler/rustc_mir_dataflow/src/impls/borrowed_locals.rs b/compiler/rustc_mir_dataflow/src/impls/borrowed_locals.rs index 4b2c52ad7999..d5548266aa01 100644 --- a/compiler/rustc_mir_dataflow/src/impls/borrowed_locals.rs +++ b/compiler/rustc_mir_dataflow/src/impls/borrowed_locals.rs @@ -86,7 +86,6 @@ where Rvalue::Cast(..) | Rvalue::Ref(_, BorrowKind::Fake(_), _) - | Rvalue::ShallowInitBox(..) | Rvalue::Use(..) | Rvalue::ThreadLocalRef(..) | Rvalue::Repeat(..) diff --git a/compiler/rustc_mir_dataflow/src/move_paths/builder.rs b/compiler/rustc_mir_dataflow/src/move_paths/builder.rs index ced9bd735ba2..224abf6901b3 100644 --- a/compiler/rustc_mir_dataflow/src/move_paths/builder.rs +++ b/compiler/rustc_mir_dataflow/src/move_paths/builder.rs @@ -391,15 +391,7 @@ impl<'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> MoveDataBuilder<'a, 'tcx, F> { } StatementKind::Assign(box (place, rval)) => { self.create_move_path(*place); - if let RvalueInitializationState::Shallow = rval.initialization_state() { - // Box starts out uninitialized - need to create a separate - // move-path for the interior so it will be separate from - // the exterior. - self.create_move_path(self.tcx.mk_place_deref(*place)); - self.gather_init(place.as_ref(), InitKind::Shallow); - } else { - self.gather_init(place.as_ref(), InitKind::Deep); - } + self.gather_init(place.as_ref(), InitKind::Deep); self.gather_rvalue(rval); } StatementKind::FakeRead(box (_, place)) => { @@ -435,7 +427,6 @@ impl<'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> MoveDataBuilder<'a, 'tcx, F> { Rvalue::Use(ref operand) | Rvalue::Repeat(ref operand, _) | Rvalue::Cast(_, ref operand, _) - | Rvalue::ShallowInitBox(ref operand, _) | Rvalue::UnaryOp(_, ref operand) | Rvalue::WrapUnsafeBinder(ref operand, _) => self.gather_operand(operand), Rvalue::BinaryOp(ref _binop, box (ref lhs, ref rhs)) => { diff --git a/compiler/rustc_mir_transform/src/dataflow_const_prop.rs b/compiler/rustc_mir_transform/src/dataflow_const_prop.rs index 604f1da1a3ab..93da4f3a0a81 100644 --- a/compiler/rustc_mir_transform/src/dataflow_const_prop.rs +++ b/compiler/rustc_mir_transform/src/dataflow_const_prop.rs @@ -467,7 +467,6 @@ impl<'a, 'tcx> ConstAnalysis<'a, 'tcx> { Rvalue::Discriminant(place) => state.get_discr(place.as_ref(), &self.map), Rvalue::Use(operand) => return self.handle_operand(operand, state), Rvalue::CopyForDeref(_) => bug!("`CopyForDeref` in runtime MIR"), - Rvalue::ShallowInitBox(..) => bug!("`ShallowInitBox` in runtime MIR"), Rvalue::Ref(..) | Rvalue::RawPtr(..) => { // We don't track such places. return ValueOrPlace::TOP; diff --git a/compiler/rustc_mir_transform/src/elaborate_box_derefs.rs b/compiler/rustc_mir_transform/src/elaborate_box_derefs.rs index 808be19cbd81..68c47ec4c192 100644 --- a/compiler/rustc_mir_transform/src/elaborate_box_derefs.rs +++ b/compiler/rustc_mir_transform/src/elaborate_box_derefs.rs @@ -1,12 +1,8 @@ //! This pass transforms derefs of Box into a deref of the pointer inside Box. //! //! Box is not actually a pointer so it is incorrect to dereference it directly. -//! -//! `ShallowInitBox` being a device for drop elaboration to understand deferred assignment to box -//! contents, we do not need this any more on runtime MIR. -use rustc_abi::{FieldIdx, VariantIdx}; -use rustc_index::{IndexVec, indexvec}; +use rustc_abi::FieldIdx; use rustc_middle::mir::visit::MutVisitor; use rustc_middle::mir::*; use rustc_middle::span_bug; @@ -89,68 +85,6 @@ impl<'a, 'tcx> MutVisitor<'tcx> for ElaborateBoxDerefVisitor<'a, 'tcx> { self.super_place(place, context, location); } - - fn visit_statement(&mut self, stmt: &mut Statement<'tcx>, location: Location) { - self.super_statement(stmt, location); - - let tcx = self.tcx; - let source_info = stmt.source_info; - - if let StatementKind::Assign(box (_, ref mut rvalue)) = stmt.kind - && let Rvalue::ShallowInitBox(ref mut mutptr_to_u8, pointee) = *rvalue - && let ty::Adt(box_adt, box_args) = Ty::new_box(tcx, pointee).kind() - { - let args = tcx.mk_args(&[pointee.into()]); - let (unique_ty, nonnull_ty, ptr_ty) = - build_ptr_tys(tcx, pointee, self.unique_def, self.nonnull_def); - let adt_kind = |def: ty::AdtDef<'tcx>, args| { - Box::new(AggregateKind::Adt(def.did(), VariantIdx::ZERO, args, None, None)) - }; - let zst = |ty| { - Operand::Constant(Box::new(ConstOperand { - span: source_info.span, - user_ty: None, - const_: Const::zero_sized(ty), - })) - }; - - let constptr = self.patch.new_temp(ptr_ty, source_info.span); - self.patch.add_assign( - location, - constptr.into(), - Rvalue::Cast(CastKind::Transmute, mutptr_to_u8.clone(), ptr_ty), - ); - - let nonnull = self.patch.new_temp(nonnull_ty, source_info.span); - self.patch.add_assign( - location, - nonnull.into(), - Rvalue::Aggregate( - adt_kind(self.nonnull_def, args), - indexvec![Operand::Move(constptr.into())], - ), - ); - - let unique = self.patch.new_temp(unique_ty, source_info.span); - let phantomdata_ty = - self.unique_def.non_enum_variant().fields[FieldIdx::ONE].ty(tcx, args); - self.patch.add_assign( - location, - unique.into(), - Rvalue::Aggregate( - adt_kind(self.unique_def, args), - indexvec![Operand::Move(nonnull.into()), zst(phantomdata_ty)], - ), - ); - - let global_alloc_ty = - box_adt.non_enum_variant().fields[FieldIdx::ONE].ty(tcx, box_args); - *rvalue = Rvalue::Aggregate( - adt_kind(*box_adt, box_args), - indexvec![Operand::Move(unique.into()), zst(global_alloc_ty)], - ); - } - } } pub(super) struct ElaborateBoxDerefs; diff --git a/compiler/rustc_mir_transform/src/gvn.rs b/compiler/rustc_mir_transform/src/gvn.rs index 6507a5194add..4e38b9dd6534 100644 --- a/compiler/rustc_mir_transform/src/gvn.rs +++ b/compiler/rustc_mir_transform/src/gvn.rs @@ -1069,7 +1069,7 @@ impl<'body, 'a, 'tcx> VnState<'body, 'a, 'tcx> { // Unsupported values. Rvalue::ThreadLocalRef(..) => return None, - Rvalue::CopyForDeref(_) | Rvalue::ShallowInitBox(..) => { + Rvalue::CopyForDeref(_) => { bug!("forbidden in runtime MIR: {rvalue:?}") } }; diff --git a/compiler/rustc_mir_transform/src/known_panics_lint.rs b/compiler/rustc_mir_transform/src/known_panics_lint.rs index caaf300a88d6..873f6a01ec36 100644 --- a/compiler/rustc_mir_transform/src/known_panics_lint.rs +++ b/compiler/rustc_mir_transform/src/known_panics_lint.rs @@ -443,7 +443,6 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> { | Rvalue::CopyForDeref(..) | Rvalue::Repeat(..) | Rvalue::Cast(..) - | Rvalue::ShallowInitBox(..) | Rvalue::Discriminant(..) | Rvalue::WrapUnsafeBinder(..) => {} } @@ -605,8 +604,6 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> { Ref(..) | RawPtr(..) => return None, - ShallowInitBox(..) => return None, - Cast(ref kind, ref value, to) => match kind { CastKind::IntToInt | CastKind::IntToFloat => { let value = self.eval_operand(value)?; diff --git a/compiler/rustc_mir_transform/src/lint.rs b/compiler/rustc_mir_transform/src/lint.rs index 88297a4efef7..b8b1b930bc41 100644 --- a/compiler/rustc_mir_transform/src/lint.rs +++ b/compiler/rustc_mir_transform/src/lint.rs @@ -85,7 +85,6 @@ impl<'a, 'tcx> Visitor<'tcx> for Lint<'a, 'tcx> { | Rvalue::Repeat(..) | Rvalue::Aggregate(..) | Rvalue::Cast(..) - | Rvalue::ShallowInitBox(..) | Rvalue::WrapUnsafeBinder(..) => true, Rvalue::ThreadLocalRef(..) | Rvalue::UnaryOp(..) diff --git a/compiler/rustc_mir_transform/src/promote_consts.rs b/compiler/rustc_mir_transform/src/promote_consts.rs index 3d1537b95efa..fb880caf876e 100644 --- a/compiler/rustc_mir_transform/src/promote_consts.rs +++ b/compiler/rustc_mir_transform/src/promote_consts.rs @@ -449,8 +449,6 @@ impl<'tcx> Validator<'_, 'tcx> { self.validate_operand(operand)?; } - Rvalue::ShallowInitBox(_, _) => return Err(Unpromotable), - Rvalue::UnaryOp(op, operand) => { match op { // These operations can never fail. diff --git a/compiler/rustc_mir_transform/src/validate.rs b/compiler/rustc_mir_transform/src/validate.rs index 1afdb4639a0c..78c161ebd58c 100644 --- a/compiler/rustc_mir_transform/src/validate.rs +++ b/compiler/rustc_mir_transform/src/validate.rs @@ -1259,14 +1259,6 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> { } } } - Rvalue::ShallowInitBox(operand, _) => { - if self.body.phase >= MirPhase::Runtime(RuntimePhase::Initial) { - self.fail(location, format!("ShallowInitBox after ElaborateBoxDerefs")) - } - - let a = operand.ty(&self.body.local_decls, self.tcx); - check_kinds!(a, "Cannot shallow init type {:?}", ty::RawPtr(..)); - } Rvalue::Cast(kind, operand, target_type) => { let op_ty = operand.ty(self.body, self.tcx); match kind { diff --git a/compiler/rustc_public/src/mir/body.rs b/compiler/rustc_public/src/mir/body.rs index e81b32ec9acf..51757c582722 100644 --- a/compiler/rustc_public/src/mir/body.rs +++ b/compiler/rustc_public/src/mir/body.rs @@ -567,13 +567,6 @@ pub enum Rvalue { /// [#74836]: https://github.com/rust-lang/rust/issues/74836 Repeat(Operand, TyConst), - /// Transmutes a `*mut u8` into shallow-initialized `Box`. - /// - /// This is different from a normal transmute because dataflow analysis will treat the box as - /// initialized but its content as uninitialized. Like other pointer casts, this in general - /// affects alias analysis. - ShallowInitBox(Operand, Ty), - /// Creates a pointer/reference to the given thread local. /// /// The yielded type is a `*mut T` if the static is mutable, otherwise if the static is extern a @@ -651,7 +644,6 @@ impl Rvalue { } AggregateKind::RawPtr(ty, mutability) => Ok(Ty::new_ptr(ty, mutability)), }, - Rvalue::ShallowInitBox(_, ty) => Ok(Ty::new_box(*ty)), Rvalue::CopyForDeref(place) => place.ty(locals), } } diff --git a/compiler/rustc_public/src/mir/pretty.rs b/compiler/rustc_public/src/mir/pretty.rs index 5ba72965cb29..bf2655e9a789 100644 --- a/compiler/rustc_public/src/mir/pretty.rs +++ b/compiler/rustc_public/src/mir/pretty.rs @@ -383,7 +383,6 @@ fn pretty_rvalue(writer: &mut W, rval: &Rvalue) -> io::Result<()> { Rvalue::Repeat(op, cnst) => { write!(writer, "[{}; {}]", pretty_operand(op), pretty_ty_const(cnst)) } - Rvalue::ShallowInitBox(_, _) => Ok(()), Rvalue::ThreadLocalRef(item) => { write!(writer, "thread_local_ref{item:?}") } diff --git a/compiler/rustc_public/src/mir/visit.rs b/compiler/rustc_public/src/mir/visit.rs index 678205171ecf..e1d9cf31036e 100644 --- a/compiler/rustc_public/src/mir/visit.rs +++ b/compiler/rustc_public/src/mir/visit.rs @@ -277,10 +277,6 @@ macro_rules! make_mir_visitor { self.visit_operand(op, location); self.visit_ty_const(constant, location); } - Rvalue::ShallowInitBox(op, ty) => { - self.visit_ty(ty, location); - self.visit_operand(op, location) - } Rvalue::ThreadLocalRef(_) => {} Rvalue::UnaryOp(_, op) | Rvalue::Use(op) => { self.visit_operand(op, location); diff --git a/compiler/rustc_public/src/unstable/convert/stable/mir.rs b/compiler/rustc_public/src/unstable/convert/stable/mir.rs index a77808cfb275..d25751c81f3f 100644 --- a/compiler/rustc_public/src/unstable/convert/stable/mir.rs +++ b/compiler/rustc_public/src/unstable/convert/stable/mir.rs @@ -240,9 +240,6 @@ impl<'tcx> Stable<'tcx> for mir::Rvalue<'tcx> { let operands = operands.iter().map(|op| op.stable(tables, cx)).collect(); crate::mir::Rvalue::Aggregate(agg_kind.stable(tables, cx), operands) } - ShallowInitBox(op, ty) => { - crate::mir::Rvalue::ShallowInitBox(op.stable(tables, cx), ty.stable(tables, cx)) - } CopyForDeref(place) => crate::mir::Rvalue::CopyForDeref(place.stable(tables, cx)), WrapUnsafeBinder(..) => todo!("FIXME(unsafe_binders):"), } diff --git a/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs b/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs index 06220f91c745..1484b8c8bcc4 100644 --- a/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs +++ b/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs @@ -194,7 +194,6 @@ fn check_rvalue<'tcx>( )) } }, - Rvalue::ShallowInitBox(_, _) => Ok(()), Rvalue::UnaryOp(_, operand) => { let ty = operand.ty(body, cx.tcx); if ty.is_integral() || ty.is_bool() { From 28c8d71544ec8e98ea5f17850cb9156bcc330307 Mon Sep 17 00:00:00 2001 From: sgasho Date: Wed, 11 Feb 2026 17:54:00 +0900 Subject: [PATCH 254/265] Implement opt-bisect-limit for mir --- .../rustc_mir_transform/src/pass_manager.rs | 57 +++++++++ compiler/rustc_session/src/options.rs | 3 + compiler/rustc_session/src/session.rs | 9 +- tests/run-make/mir-opt-bisect-limit/main.rs | 11 ++ tests/run-make/mir-opt-bisect-limit/rmake.rs | 119 ++++++++++++++++++ 5 files changed, 198 insertions(+), 1 deletion(-) create mode 100644 tests/run-make/mir-opt-bisect-limit/main.rs create mode 100644 tests/run-make/mir-opt-bisect-limit/rmake.rs diff --git a/compiler/rustc_mir_transform/src/pass_manager.rs b/compiler/rustc_mir_transform/src/pass_manager.rs index e225c31881f8..a08136416543 100644 --- a/compiler/rustc_mir_transform/src/pass_manager.rs +++ b/compiler/rustc_mir_transform/src/pass_manager.rs @@ -1,5 +1,6 @@ use std::cell::RefCell; use std::collections::hash_map::Entry; +use std::sync::atomic::Ordering; use rustc_data_structures::fx::{FxHashMap, FxIndexSet}; use rustc_middle::mir::{Body, MirDumper, MirPhase, RuntimePhase}; @@ -285,6 +286,19 @@ fn run_passes_inner<'tcx>( continue; }; + if is_optimization_stage(body, phase_change, optimizations) + && let Some(limit) = &tcx.sess.opts.unstable_opts.mir_opt_bisect_limit + { + if limited_by_opt_bisect( + tcx, + tcx.def_path_debug_str(body.source.def_id()), + *limit, + *pass, + ) { + continue; + } + } + let dumper = if pass.is_mir_dump_enabled() && let Some(dumper) = MirDumper::new(tcx, pass_name, body) { @@ -356,3 +370,46 @@ pub(super) fn dump_mir_for_phase_change<'tcx>(tcx: TyCtxt<'tcx>, body: &Body<'tc dumper.set_show_pass_num().set_disambiguator(&"after").dump_mir(body) } } + +fn is_optimization_stage( + body: &Body<'_>, + phase_change: Option, + optimizations: Optimizations, +) -> bool { + optimizations == Optimizations::Allowed + && body.phase == MirPhase::Runtime(RuntimePhase::PostCleanup) + && phase_change == Some(MirPhase::Runtime(RuntimePhase::Optimized)) +} + +fn limited_by_opt_bisect<'tcx, P>( + tcx: TyCtxt<'tcx>, + def_path: String, + limit: usize, + pass: &P, +) -> bool +where + P: MirPass<'tcx> + ?Sized, +{ + let current_opt_bisect_count = + tcx.sess.mir_opt_bisect_eval_count.fetch_add(1, Ordering::Relaxed); + + let can_run = current_opt_bisect_count < limit; + + if can_run { + eprintln!( + "BISECT: running pass ({}) {} on {}", + current_opt_bisect_count + 1, + pass.name(), + def_path + ); + } else { + eprintln!( + "BISECT: NOT running pass ({}) {} on {}", + current_opt_bisect_count + 1, + pass.name(), + def_path + ); + } + + !can_run +} diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index 9219b5a7e8ac..69f9ad9aa361 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -2481,6 +2481,9 @@ options! { mir_include_spans: MirIncludeSpans = (MirIncludeSpans::default(), parse_mir_include_spans, [UNTRACKED], "include extra comments in mir pretty printing, like line numbers and statement indices, \ details about types, etc. (boolean for all passes, 'nll' to enable in NLL MIR only, default: 'nll')"), + mir_opt_bisect_limit: Option = (None, parse_opt_number, [TRACKED], + "limit the number of MIR optimization pass executions (global across all bodies). \ + Pass executions after this limit are skipped and reported. (default: no limit)"), #[rustc_lint_opt_deny_field_access("use `Session::mir_opt_level` instead of this field")] mir_opt_level: Option = (None, parse_opt_number, [TRACKED], "MIR optimization level (0-4; default: 1 in non optimized builds and 2 in optimized builds)"), diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index bb22e4a8db04..427f3e7fa508 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -2,7 +2,7 @@ use std::any::Any; use std::path::PathBuf; use std::str::FromStr; use std::sync::Arc; -use std::sync::atomic::AtomicBool; +use std::sync::atomic::{AtomicBool, AtomicUsize}; use std::{env, io}; use rand::{RngCore, rng}; @@ -161,6 +161,12 @@ pub struct Session { /// Does the codegen backend support ThinLTO? pub thin_lto_supported: bool, + + /// Global per-session counter for MIR optimization pass applications. + /// + /// Used by `-Zmir-opt-bisect-limit` to assign an index to each + /// optimization-pass execution candidate during this compilation. + pub mir_opt_bisect_eval_count: AtomicUsize, } #[derive(Clone, Copy)] @@ -1101,6 +1107,7 @@ pub fn build_session( invocation_temp, replaced_intrinsics: FxHashSet::default(), // filled by `run_compiler` thin_lto_supported: true, // filled by `run_compiler` + mir_opt_bisect_eval_count: AtomicUsize::new(0), }; validate_commandline_args_with_session_available(&sess); diff --git a/tests/run-make/mir-opt-bisect-limit/main.rs b/tests/run-make/mir-opt-bisect-limit/main.rs new file mode 100644 index 000000000000..674275b10fcd --- /dev/null +++ b/tests/run-make/mir-opt-bisect-limit/main.rs @@ -0,0 +1,11 @@ +#![crate_type = "lib"] +#![no_std] + +#[inline(never)] +pub fn callee(x: u64) -> u64 { + x.wrapping_mul(3).wrapping_add(7) +} + +pub fn caller(a: u64, b: u64) -> u64 { + callee(a) + callee(b) +} diff --git a/tests/run-make/mir-opt-bisect-limit/rmake.rs b/tests/run-make/mir-opt-bisect-limit/rmake.rs new file mode 100644 index 000000000000..fa77cb7d8c35 --- /dev/null +++ b/tests/run-make/mir-opt-bisect-limit/rmake.rs @@ -0,0 +1,119 @@ +use std::path::Path; + +use run_make_support::{CompletedProcess, rfs, rustc}; + +struct Case { + name: &'static str, + flags: &'static [&'static str], + expect_inline_dump: bool, + expect_running: ExpectedCount, + expect_not_running: ExpectedCount, +} + +enum ExpectedCount { + Exactly(usize), + AtLeastOne, + Zero, +} + +fn main() { + let cases = [ + Case { + name: "limit0", + flags: &["-Zmir-opt-bisect-limit=0"], + expect_inline_dump: false, + expect_running: ExpectedCount::Exactly(0), + expect_not_running: ExpectedCount::AtLeastOne, + }, + Case { + name: "limit1", + flags: &["-Zmir-opt-bisect-limit=1"], + expect_inline_dump: false, + expect_running: ExpectedCount::Exactly(1), + expect_not_running: ExpectedCount::AtLeastOne, + }, + Case { + name: "huge_limit", + flags: &["-Zmir-opt-bisect-limit=1000000000"], + expect_inline_dump: true, + expect_running: ExpectedCount::AtLeastOne, + expect_not_running: ExpectedCount::Zero, + }, + Case { + name: "limit0_with_force_enable_inline", + flags: &["-Zmir-opt-bisect-limit=0", "-Zmir-enable-passes=+Inline"], + expect_inline_dump: false, + expect_running: ExpectedCount::Exactly(0), + expect_not_running: ExpectedCount::AtLeastOne, + }, + ]; + + for case in cases { + let (inline_dumped, running_count, not_running_count, output) = + compile_case(case.name, case.flags); + + assert_eq!( + inline_dumped, case.expect_inline_dump, + "{}: unexpected Inline dump presence", + case.name + ); + + assert_expected_count( + running_count, + case.expect_running, + &format!("{}: running count", case.name), + ); + assert_expected_count( + not_running_count, + case.expect_not_running, + &format!("{}: NOT running count", case.name), + ); + } +} + +fn compile_case(dump_dir: &str, extra_flags: &[&str]) -> (bool, usize, usize, CompletedProcess) { + if Path::new(dump_dir).exists() { + rfs::remove_dir_all(dump_dir); + } + rfs::create_dir_all(dump_dir); + + let mut cmd = rustc(); + cmd.input("main.rs") + .arg("--emit=mir") + .arg("-Zmir-opt-level=2") + .arg("-Copt-level=2") + .arg("-Zthreads=1") + .arg("-Zdump-mir=Inline") + .arg(format!("-Zdump-mir-dir={dump_dir}")); + + for &flag in extra_flags { + cmd.arg(flag); + } + + let output = cmd.run(); + let (running_count, not_running_count) = bisect_line_counts(&output); + (has_inline_dump_file(dump_dir), running_count, not_running_count, output) +} + +fn assert_expected_count(actual: usize, expected: ExpectedCount, context: &str) { + match expected { + ExpectedCount::Exactly(n) => assert_eq!(actual, n, "{context}"), + ExpectedCount::AtLeastOne => assert!(actual > 0, "{context}"), + ExpectedCount::Zero => assert_eq!(actual, 0, "{context}"), + } +} + +fn has_inline_dump_file(dir: &str) -> bool { + rfs::read_dir(dir) + .flatten() + .any(|entry| entry.file_name().to_string_lossy().contains(".Inline.")) +} + +fn bisect_line_counts(output: &CompletedProcess) -> (usize, usize) { + let stderr = output.stderr_utf8(); + let running_count = + stderr.lines().filter(|line| line.starts_with("BISECT: running pass (")).count(); + let not_running_count = + stderr.lines().filter(|line| line.starts_with("BISECT: NOT running pass (")).count(); + (running_count, not_running_count) +} From f5421609d6acd3512b5d06eb2e7d93437432cdd5 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 17 Feb 2026 15:13:58 +0100 Subject: [PATCH 255/265] Miri: recursive validity: also recurse into Boxes --- compiler/rustc_const_eval/src/interpret/validity.rs | 7 +------ .../fail/validity/recursive-validity-box-bool.rs | 8 ++++++++ .../validity/recursive-validity-box-bool.stderr | 13 +++++++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 src/tools/miri/tests/fail/validity/recursive-validity-box-bool.rs create mode 100644 src/tools/miri/tests/fail/validity/recursive-validity-box-bool.stderr diff --git a/compiler/rustc_const_eval/src/interpret/validity.rs b/compiler/rustc_const_eval/src/interpret/validity.rs index 5d8ae42f5ecc..6fc8d5ef8f96 100644 --- a/compiler/rustc_const_eval/src/interpret/validity.rs +++ b/compiler/rustc_const_eval/src/interpret/validity.rs @@ -647,13 +647,8 @@ impl<'rt, 'tcx, M: Machine<'tcx>> ValidityVisitor<'rt, 'tcx, M> { } } else { // This is not CTFE, so it's Miri with recursive checking. - // FIXME: we do *not* check behind boxes, since creating a new box first creates it uninitialized - // and then puts the value in there, so briefly we have a box with uninit contents. - // FIXME: should we also skip `UnsafeCell` behind shared references? Currently that is not + // FIXME: should we also `UnsafeCell` behind shared references? Currently that is not // needed since validation reads bypass Stacked Borrows and data race checks. - if matches!(ptr_kind, PointerKind::Box) { - return interp_ok(()); - } } let path = &self.path; ref_tracking.track(place, || { diff --git a/src/tools/miri/tests/fail/validity/recursive-validity-box-bool.rs b/src/tools/miri/tests/fail/validity/recursive-validity-box-bool.rs new file mode 100644 index 000000000000..dee2c9aad2c7 --- /dev/null +++ b/src/tools/miri/tests/fail/validity/recursive-validity-box-bool.rs @@ -0,0 +1,8 @@ +//@compile-flags: -Zmiri-recursive-validation + +fn main() { + let x = 3u8; + let xref = &x; + let xref_wrong_type: Box = unsafe { std::mem::transmute(xref) }; //~ERROR: encountered 0x03, but expected a boolean + let _val = *xref_wrong_type; +} diff --git a/src/tools/miri/tests/fail/validity/recursive-validity-box-bool.stderr b/src/tools/miri/tests/fail/validity/recursive-validity-box-bool.stderr new file mode 100644 index 000000000000..d658909efd93 --- /dev/null +++ b/src/tools/miri/tests/fail/validity/recursive-validity-box-bool.stderr @@ -0,0 +1,13 @@ +error: Undefined Behavior: constructing invalid value at .: encountered 0x03, but expected a boolean + --> tests/fail/validity/recursive-validity-box-bool.rs:LL:CC + | +LL | let xref_wrong_type: Box = unsafe { std::mem::transmute(xref) }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here + | + = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior + = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + +note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace + +error: aborting due to 1 previous error + From c73b3d20c669aba4d10f5681e954e4a5b8b41d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Tue, 12 Aug 2025 22:27:45 +0000 Subject: [PATCH 256/265] Unify wording of resolve error Remove "failed to resolve" and use the same format we use in other resolution errors "cannot find `name`". ``` error[E0433]: cannot find `nonexistent` in `existent` --> $DIR/custom_attr_multisegment_error.rs:5:13 | LL | #[existent::nonexistent] | ^^^^^^^^^^^ could not find `nonexistent` in `existent` ``` --- .../rustc_resolve/src/build_reduced_graph.rs | 12 +- compiler/rustc_resolve/src/diagnostics.rs | 80 ++++++--- compiler/rustc_resolve/src/ident.rs | 41 ++++- compiler/rustc_resolve/src/imports.rs | 4 +- compiler/rustc_resolve/src/late.rs | 4 +- compiler/rustc_resolve/src/lib.rs | 17 +- compiler/rustc_resolve/src/macros.rs | 48 ++++-- .../ui/crashes/unreachable-array-or-slice.rs | 2 +- .../crashes/unreachable-array-or-slice.stderr | 2 +- src/tools/miri/tests/fail/rustc-error2.rs | 2 +- src/tools/miri/tests/fail/rustc-error2.stderr | 2 +- .../nightly.err | 2 +- .../issue-149402-suggest-unresolve/stable.err | 2 +- .../intra-doc/unresolved-import-recovery.rs | 2 +- .../unresolved-import-recovery.stderr | 2 +- tests/rustdoc-ui/issues/issue-61732.rs | 2 +- tests/rustdoc-ui/issues/issue-61732.stderr | 2 +- .../diagnostic-derive-inline.rs | 2 +- .../subdiagnostic-derive-inline.rs | 8 + .../subdiagnostic-derive-inline.stderr | 160 +++++++++--------- tests/ui/asm/naked-invalid-attr.rs | 2 +- tests/ui/asm/naked-invalid-attr.stderr | 2 +- .../ui/attributes/builtin-attribute-prefix.rs | 4 +- .../builtin-attribute-prefix.stderr | 4 +- tests/ui/attributes/check-builtin-attr-ice.rs | 6 +- .../attributes/check-builtin-attr-ice.stderr | 6 +- tests/ui/attributes/check-cfg_attr-ice.rs | 26 +-- tests/ui/attributes/check-cfg_attr-ice.stderr | 26 +-- .../custom_attr_multisegment_error.rs | 2 +- .../custom_attr_multisegment_error.stderr | 2 +- .../field-attributes-vis-unresolved.rs | 4 +- .../field-attributes-vis-unresolved.stderr | 4 +- tests/ui/attributes/illegal-macro-use.rs | 8 +- tests/ui/attributes/illegal-macro-use.stderr | 8 +- tests/ui/attributes/use-doc-alias-name.rs | 4 +- tests/ui/attributes/use-doc-alias-name.stderr | 4 +- ...T-struct-pattern-box-pattern-ice-121463.rs | 4 +- ...ruct-pattern-box-pattern-ice-121463.stderr | 4 +- tests/ui/cfg/diagnostics-cross-crate.rs | 2 +- tests/ui/cfg/diagnostics-cross-crate.stderr | 2 +- tests/ui/cfg/diagnostics-reexport-2.rs | 10 +- tests/ui/cfg/diagnostics-reexport-2.stderr | 10 +- tests/ui/cfg/diagnostics-same-crate.rs | 2 +- tests/ui/cfg/diagnostics-same-crate.stderr | 2 +- .../ui/coherence/conflicting-impl-with-err.rs | 4 +- .../conflicting-impl-with-err.stderr | 4 +- ...icates-of-no-entry-found-for-key-119275.rs | 2 +- ...es-of-no-entry-found-for-key-119275.stderr | 2 +- tests/ui/const-generics/issues/issue-82956.rs | 2 +- .../const-generics/issues/issue-82956.stderr | 2 +- .../consts/const_refs_to_static-ice-121413.rs | 2 +- .../const_refs_to_static-ice-121413.stderr | 2 +- tests/ui/delegation/bad-resolve.rs | 2 +- tests/ui/delegation/bad-resolve.stderr | 6 +- tests/ui/delegation/glob-bad-path.rs | 2 +- tests/ui/delegation/glob-bad-path.stderr | 2 +- tests/ui/delegation/impl-reuse-bad-path.rs | 2 +- .../ui/delegation/impl-reuse-bad-path.stderr | 2 +- tests/ui/derived-errors/issue-31997-1.stderr | 2 +- .../dollar-crate/dollar-crate-is-keyword-2.rs | 12 +- .../dollar-crate-is-keyword-2.stderr | 12 +- tests/ui/eii/privacy2.rs | 2 +- tests/ui/eii/privacy2.stderr | 2 +- tests/ui/enum/assoc-fn-call-on-variant.rs | 3 +- tests/ui/enum/assoc-fn-call-on-variant.stderr | 2 +- tests/ui/error-codes/E0433.stderr | 2 +- tests/ui/extern-flag/multiple-opts.rs | 2 +- tests/ui/extern-flag/multiple-opts.stderr | 2 +- tests/ui/extern-flag/noprelude.rs | 2 +- tests/ui/extern-flag/noprelude.stderr | 2 +- tests/ui/extern/extern-macro.rs | 2 +- tests/ui/extern/extern-macro.stderr | 4 +- .../feature-gate-extern_absolute_paths.rs | 2 +- .../feature-gate-extern_absolute_paths.stderr | 2 +- tests/ui/foreign/stashed-issue-121451.rs | 2 +- tests/ui/foreign/stashed-issue-121451.stderr | 2 +- .../equality-bound.rs | 2 +- .../equality-bound.stderr | 2 +- .../extern-prelude-from-opaque-fail-2018.rs | 4 +- ...xtern-prelude-from-opaque-fail-2018.stderr | 4 +- .../extern-prelude-from-opaque-fail.rs | 4 +- .../extern-prelude-from-opaque-fail.stderr | 4 +- tests/ui/hygiene/no_implicit_prelude.rs | 2 +- tests/ui/hygiene/no_implicit_prelude.stderr | 2 +- tests/ui/impl-trait/issues/issue-72911.rs | 4 +- tests/ui/impl-trait/issues/issue-72911.stderr | 4 +- .../impl-trait/stashed-diag-issue-121504.rs | 2 +- .../stashed-diag-issue-121504.stderr | 2 +- .../absolute-paths-in-nested-use-groups.rs | 9 +- ...absolute-paths-in-nested-use-groups.stderr | 20 +-- .../extern-prelude-extern-crate-fail.rs | 2 +- .../extern-prelude-extern-crate-fail.stderr | 2 +- .../nested-import-root-symbol-150103.rs | 4 +- .../nested-import-root-symbol-150103.stderr | 6 +- ...est-import-issue-120074.edition2015.stderr | 2 +- ...est-import-issue-120074.edition2021.stderr | 23 --- ...uggest-import-issue-120074.post2015.stderr | 2 +- .../ui/imports/suggest-import-issue-120074.rs | 2 +- tests/ui/imports/tool-mod-child.rs | 4 +- tests/ui/imports/tool-mod-child.stderr | 4 +- tests/ui/issues/issue-38857.rs | 4 +- tests/ui/issues/issue-38857.stderr | 2 +- tests/ui/issues/issue-46101.rs | 4 +- tests/ui/issues/issue-46101.stderr | 8 +- .../ui/keyword/keyword-super-as-identifier.rs | 2 +- .../keyword-super-as-identifier.stderr | 2 +- tests/ui/keyword/keyword-super.rs | 2 +- tests/ui/keyword/keyword-super.stderr | 2 +- tests/ui/lifetimes/issue-97194.rs | 6 +- tests/ui/lifetimes/issue-97194.stderr | 2 +- .../ice-array-into-iter-lint-issue-121532.rs | 2 +- ...e-array-into-iter-lint-issue-121532.stderr | 2 +- .../ui/macros/builtin-prelude-no-accidents.rs | 6 +- .../builtin-prelude-no-accidents.stderr | 6 +- tests/ui/macros/builtin-std-paths-fail.rs | 32 ++-- tests/ui/macros/builtin-std-paths-fail.stderr | 32 ++-- .../compile_error_macro-suppress-errors.rs | 2 +- ...compile_error_macro-suppress-errors.stderr | 2 +- tests/ui/macros/macro-inner-attributes.rs | 8 +- tests/ui/macros/macro-inner-attributes.stderr | 2 +- tests/ui/macros/macro-path-prelude-fail-1.rs | 6 +- .../macros/macro-path-prelude-fail-1.stderr | 6 +- tests/ui/macros/macro-path-prelude-fail-2.rs | 2 +- .../macros/macro-path-prelude-fail-2.stderr | 4 +- .../ui/macros/macro_path_as_generic_bound.rs | 2 +- .../macros/macro_path_as_generic_bound.stderr | 2 +- tests/ui/macros/meta-item-absolute-path.rs | 4 +- .../ui/macros/meta-item-absolute-path.stderr | 4 +- tests/ui/mir/issue-121103.rs | 6 +- tests/ui/mir/issue-121103.stderr | 4 +- tests/ui/modules/super-at-crate-root.rs | 2 +- tests/ui/modules/super-at-crate-root.stderr | 2 +- ...onst-param-decl-on-type-instead-of-impl.rs | 2 +- ...-param-decl-on-type-instead-of-impl.stderr | 2 +- tests/ui/parser/dyn-trait-compatibility.rs | 2 +- .../ui/parser/dyn-trait-compatibility.stderr | 2 +- tests/ui/parser/mod_file_not_exist.rs | 9 +- tests/ui/parser/mod_file_not_exist.stderr | 4 +- tests/ui/parser/mod_file_not_exist_windows.rs | 2 +- .../parser/mod_file_not_exist_windows.stderr | 2 +- tests/ui/pattern/pattern-error-continue.rs | 2 +- .../ui/pattern/pattern-error-continue.stderr | 2 +- tests/ui/privacy/restricted/test.rs | 2 +- tests/ui/privacy/restricted/test.stderr | 2 +- tests/ui/privacy/unreachable-issue-121455.rs | 3 +- .../privacy/unreachable-issue-121455.stderr | 2 +- tests/ui/proc-macro/amputate-span.stderr | 4 +- tests/ui/resolve/112590-2.fixed | 10 +- tests/ui/resolve/112590-2.rs | 10 +- tests/ui/resolve/112590-2.stderr | 10 +- tests/ui/resolve/bad-module.rs | 4 +- tests/ui/resolve/bad-module.stderr | 4 +- tests/ui/resolve/editions-crate-root-2015.rs | 8 +- .../resolve/editions-crate-root-2015.stderr | 4 +- tests/ui/resolve/editions-crate-root-2018.rs | 8 +- .../resolve/editions-crate-root-2018.stderr | 4 +- .../ui/resolve/export-fully-qualified-2018.rs | 3 +- .../export-fully-qualified-2018.stderr | 2 +- tests/ui/resolve/export-fully-qualified.rs | 2 +- .../ui/resolve/export-fully-qualified.stderr | 2 +- tests/ui/resolve/extern-prelude-fail.rs | 2 +- tests/ui/resolve/extern-prelude-fail.stderr | 2 +- .../function-module-ambiguity-error-71406.rs | 3 +- ...nction-module-ambiguity-error-71406.stderr | 2 +- tests/ui/resolve/impl-items-vis-unresolved.rs | 2 +- .../resolve/impl-items-vis-unresolved.stderr | 2 +- tests/ui/resolve/issue-101749-2.rs | 2 +- tests/ui/resolve/issue-101749-2.stderr | 2 +- tests/ui/resolve/issue-101749.fixed | 2 +- tests/ui/resolve/issue-101749.rs | 2 +- tests/ui/resolve/issue-101749.stderr | 2 +- tests/ui/resolve/issue-109250.rs | 2 +- tests/ui/resolve/issue-109250.stderr | 2 +- tests/ui/resolve/issue-117920.rs | 2 +- tests/ui/resolve/issue-117920.stderr | 2 +- tests/ui/resolve/issue-24968.rs | 4 +- tests/ui/resolve/issue-24968.stderr | 4 +- tests/ui/resolve/issue-81508.rs | 4 +- tests/ui/resolve/issue-81508.stderr | 4 +- tests/ui/resolve/issue-82156.rs | 2 +- tests/ui/resolve/issue-82156.stderr | 2 +- tests/ui/resolve/issue-82865.rs | 2 +- tests/ui/resolve/issue-82865.stderr | 2 +- tests/ui/resolve/missing-in-namespace.rs | 2 +- tests/ui/resolve/missing-in-namespace.stderr | 2 +- tests/ui/resolve/prelude-order.rs | 4 +- tests/ui/resolve/prelude-order.stderr | 4 +- tests/ui/resolve/resolve-bad-visibility.rs | 4 +- .../ui/resolve/resolve-bad-visibility.stderr | 4 +- .../ui/resolve/resolve-variant-assoc-item.rs | 4 +- .../resolve/resolve-variant-assoc-item.stderr | 4 +- tests/ui/resolve/tool-import.rs | 3 +- tests/ui/resolve/tool-import.stderr | 2 +- .../typo-suggestion-mistyped-in-path.rs | 8 +- .../typo-suggestion-mistyped-in-path.stderr | 8 +- .../resolve/unresolved-module-error-33293.rs | 2 +- .../unresolved-module-error-33293.stderr | 2 +- .../resolve/unresolved-segments-visibility.rs | 3 +- .../unresolved-segments-visibility.stderr | 2 +- tests/ui/resolve/use_suggestion.rs | 4 +- tests/ui/resolve/use_suggestion.stderr | 4 +- tests/ui/resolve/visibility-indeterminate.rs | 2 +- .../resolve/visibility-indeterminate.stderr | 2 +- .../crate-path-non-absolute.rs | 4 +- .../crate-path-non-absolute.stderr | 8 +- .../non-existent-2.rs | 2 +- .../non-existent-2.stderr | 2 +- .../portable-intrinsics-arent-exposed.stderr | 2 +- tests/ui/span/visibility-ty-params.rs | 2 +- tests/ui/span/visibility-ty-params.stderr | 2 +- ...-std-import-order-issue-83564.no_std.fixed | 2 +- ...std-import-order-issue-83564.no_std.stderr | 2 +- .../core-std-import-order-issue-83564.rs | 2 +- ...ore-std-import-order-issue-83564.std.fixed | 2 +- ...re-std-import-order-issue-83564.std.stderr | 2 +- tests/ui/suggestions/crate-or-module-typo.rs | 6 +- .../suggestions/crate-or-module-typo.stderr | 6 +- tests/ui/suggestions/issue-103112.rs | 2 +- tests/ui/suggestions/issue-103112.stderr | 2 +- .../issue-112590-suggest-import.rs | 7 +- .../issue-112590-suggest-import.stderr | 6 +- .../suggest-tryinto-edition-change.rs | 6 +- .../suggest-tryinto-edition-change.stderr | 6 +- .../ui/suggestions/undeclared-module-alloc.rs | 2 +- .../undeclared-module-alloc.stderr | 2 +- .../tool-attributes-shadowing.rs | 2 +- .../tool-attributes-shadowing.stderr | 2 +- tests/ui/tool-attributes/unknown-tool-name.rs | 3 +- .../tool-attributes/unknown-tool-name.stderr | 2 +- .../bound/unknown-assoc-with-const-arg.rs | 2 +- .../bound/unknown-assoc-with-const-arg.stderr | 2 +- .../traits/const-traits/issue-102156.stderr | 4 +- .../ui/type-alias/issue-62263-self-in-atb.rs | 2 +- .../type-alias/issue-62263-self-in-atb.stderr | 2 +- .../type-alias/issue-62305-self-assoc-ty.rs | 2 +- .../issue-62305-self-assoc-ty.stderr | 2 +- tests/ui/type/type-path-err-node-types.rs | 2 +- tests/ui/type/type-path-err-node-types.stderr | 2 +- tests/ui/typeck/issue-120856.rs | 6 +- tests/ui/typeck/issue-120856.stderr | 4 +- ...-sugg-unresolved-expr.cargo-invoked.stderr | 2 +- ...hod-sugg-unresolved-expr.only-rustc.stderr | 2 +- .../path-to-method-sugg-unresolved-expr.rs | 2 +- tests/ui/use/use-path-segment-kw.rs | 44 ++--- tests/ui/use/use-path-segment-kw.stderr | 88 +++++----- tests/ui/use/use-self-type.rs | 2 +- tests/ui/use/use-self-type.stderr | 2 +- tests/ui/use/use-super-global-path.rs | 7 +- tests/ui/use/use-super-global-path.stderr | 14 +- 249 files changed, 778 insertions(+), 666 deletions(-) delete mode 100644 tests/ui/imports/suggest-import-issue-120074.edition2021.stderr diff --git a/compiler/rustc_resolve/src/build_reduced_graph.rs b/compiler/rustc_resolve/src/build_reduced_graph.rs index f0dffd8829da..d050ec01e042 100644 --- a/compiler/rustc_resolve/src/build_reduced_graph.rs +++ b/compiler/rustc_resolve/src/build_reduced_graph.rs @@ -469,9 +469,15 @@ impl<'a, 'ra, 'tcx> BuildReducedGraphVisitor<'a, 'ra, 'tcx> { PathResult::NonModule(partial_res) => { expected_found_error(partial_res.expect_full_res()) } - PathResult::Failed { span, label, suggestion, .. } => { - Err(VisResolutionError::FailedToResolve(span, label, suggestion)) - } + PathResult::Failed { + span, label, suggestion, message, segment_name, .. + } => Err(VisResolutionError::FailedToResolve( + span, + segment_name, + label, + suggestion, + message, + )), PathResult::Indeterminate => Err(VisResolutionError::Indeterminate(path.span)), } } diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index ac6188c2c152..0a6b55c79e85 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -899,9 +899,8 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { ResolutionError::SelfImportOnlyInImportListWithNonEmptyPrefix => { self.dcx().create_err(errs::SelfImportOnlyInImportListWithNonEmptyPrefix { span }) } - ResolutionError::FailedToResolve { segment, label, suggestion, module } => { - let mut err = - struct_span_code_err!(self.dcx(), span, E0433, "failed to resolve: {label}"); + ResolutionError::FailedToResolve { segment, label, suggestion, module, message } => { + let mut err = struct_span_code_err!(self.dcx(), span, E0433, "{message}"); err.span_label(span, label); if let Some((suggestions, msg, applicability)) = suggestion { @@ -912,13 +911,11 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { err.multipart_suggestion(msg, suggestions, applicability); } - if let Some(segment) = segment { - let module = match module { - Some(ModuleOrUniformRoot::Module(m)) if let Some(id) = m.opt_def_id() => id, - _ => CRATE_DEF_ID.to_def_id(), - }; - self.find_cfg_stripped(&mut err, &segment, module); - } + let module = match module { + Some(ModuleOrUniformRoot::Module(m)) if let Some(id) = m.opt_def_id() => id, + _ => CRATE_DEF_ID.to_def_id(), + }; + self.find_cfg_stripped(&mut err, &segment, module); err } @@ -1108,10 +1105,17 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { VisResolutionError::AncestorOnly(span) => { self.dcx().create_err(errs::AncestorOnly(span)) } - VisResolutionError::FailedToResolve(span, label, suggestion) => self.into_struct_error( - span, - ResolutionError::FailedToResolve { segment: None, label, suggestion, module: None }, - ), + VisResolutionError::FailedToResolve(span, segment, label, suggestion, message) => self + .into_struct_error( + span, + ResolutionError::FailedToResolve { + segment, + label, + suggestion, + module: None, + message, + }, + ), VisResolutionError::ExpectedFound(span, path_str, res) => { self.dcx().create_err(errs::ExpectedModuleFound { span, res, path_str }) } @@ -2438,13 +2442,25 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { failed_segment_idx: usize, ident: Ident, diag_metadata: Option<&DiagMetadata<'_>>, - ) -> (String, Option) { + ) -> (String, String, Option) { let is_last = failed_segment_idx == path.len() - 1; let ns = if is_last { opt_ns.unwrap_or(TypeNS) } else { TypeNS }; let module_res = match module { Some(ModuleOrUniformRoot::Module(module)) => module.res(), _ => None, }; + let scope = match &path[..failed_segment_idx] { + [.., prev] => { + if prev.ident.name == kw::PathRoot { + format!("the crate root") + } else { + format!("`{}`", prev.ident) + } + } + _ => format!("this scope"), + }; + let message = format!("cannot find `{ident}` in {scope}"); + if module_res == self.graph_root.res() { let is_mod = |res| matches!(res, Res::Def(DefKind::Mod, _)); let mut candidates = self.lookup_import_candidates(ident, TypeNS, parent_scope, is_mod); @@ -2462,6 +2478,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { Path { segments, span: Span::default(), tokens: None } }; ( + message, String::from("unresolved import"), Some(( vec![(ident.span, pprust::path_to_string(&path))], @@ -2471,6 +2488,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { ) } else if ident.name == sym::core { ( + message, format!("you might be missing crate `{ident}`"), Some(( vec![(ident.span, "std".to_string())], @@ -2479,9 +2497,14 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { )), ) } else if ident.name == kw::Underscore { - (format!("`_` is not a valid crate or module name"), None) + ( + "invalid crate or module name `_`".to_string(), + "`_` is not a valid crate or module name".to_string(), + None, + ) } else if self.tcx.sess.is_rust_2015() { ( + format!("cannot find module or crate `{ident}` in {scope}"), format!("use of unresolved module or unlinked crate `{ident}`"), Some(( vec![( @@ -2490,8 +2513,9 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { )], if was_invoked_from_cargo() { format!( - "if you wanted to use a crate named `{ident}`, use `cargo add {ident}` \ - to add it to your `Cargo.toml` and import it in your code", + "if you wanted to use a crate named `{ident}`, use `cargo add \ + {ident}` to add it to your `Cargo.toml` and import it in your \ + code", ) } else { format!( @@ -2503,7 +2527,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { )), ) } else { - (format!("could not find `{ident}` in the crate root"), None) + (message, format!("could not find `{ident}` in the crate root"), None) } } else if failed_segment_idx > 0 { let parent = path[failed_segment_idx - 1].ident.name; @@ -2569,15 +2593,16 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { ); }; } - (msg, None) + (message, msg, None) } else if ident.name == kw::SelfUpper { // As mentioned above, `opt_ns` being `None` indicates a module path in import. // We can use this to improve a confusing error for, e.g. `use Self::Variant` in an // impl if opt_ns.is_none() { - ("`Self` cannot be used in imports".to_string(), None) + (message, "`Self` cannot be used in imports".to_string(), None) } else { ( + message, "`Self` is only available in impls, traits, and type definitions".to_string(), None, ) @@ -2632,7 +2657,8 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { ) }); - (format!("use of undeclared type `{ident}`"), suggestion) + let message = format!("cannot find type `{ident}` in {scope}"); + (message, format!("use of undeclared type `{ident}`"), suggestion) } else { let mut suggestion = None; if ident.name == sym::alloc { @@ -2663,7 +2689,8 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { ignore_import, ) { let descr = binding.res().descr(); - (format!("{descr} `{ident}` is not a crate or module"), suggestion) + let message = format!("cannot find module or crate `{ident}` in {scope}"); + (message, format!("{descr} `{ident}` is not a crate or module"), suggestion) } else { let suggestion = if suggestion.is_some() { suggestion @@ -2685,7 +2712,12 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { Applicability::MaybeIncorrect, )) }; - (format!("use of unresolved module or unlinked crate `{ident}`"), suggestion) + let message = format!("cannot find module or crate `{ident}` in {scope}"); + ( + message, + format!("use of unresolved module or unlinked crate `{ident}`"), + suggestion, + ) } } } diff --git a/compiler/rustc_resolve/src/ident.rs b/compiler/rustc_resolve/src/ident.rs index d4d373d82064..5d413bc6daab 100644 --- a/compiler/rustc_resolve/src/ident.rs +++ b/compiler/rustc_resolve/src/ident.rs @@ -1775,7 +1775,13 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { finalize.is_some(), module_had_parse_errors, module, - || ("there are too many leading `super` keywords".to_string(), None), + || { + ( + "too many leading `super` keywords".to_string(), + "there are too many leading `super` keywords".to_string(), + None, + ) + }, ); } if segment_idx == 0 { @@ -1823,16 +1829,24 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { module, || { let name_str = if name == kw::PathRoot { - "crate root".to_string() + "the crate root".to_string() } else { format!("`{name}`") }; - let label = if segment_idx == 1 && path[0].ident.name == kw::PathRoot { - format!("global paths cannot start with {name_str}") + let (message, label) = if segment_idx == 1 + && path[0].ident.name == kw::PathRoot + { + ( + format!("global paths cannot start with {name_str}"), + "cannot start with this".to_string(), + ) } else { - format!("{name_str} in paths can only be used in start position") + ( + format!("{name_str} in paths can only be used in start position"), + "can only be used in path start position".to_string(), + ) }; - (label, None) + (message, label, None) }, ); } @@ -1948,7 +1962,20 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { res.article(), res.descr() ); - (label, None) + let scope = match &path[..segment_idx] { + [.., prev] => { + if prev.ident.name == kw::PathRoot { + format!("the crate root") + } else { + format!("`{}`", prev.ident) + } + } + _ => format!("this scope"), + }; + // FIXME: reword, as the reason we expected a module is because of + // the following path segment. + let message = format!("cannot find module `{ident}` in {scope}"); + (message, label, None) }, ); } diff --git a/compiler/rustc_resolve/src/imports.rs b/compiler/rustc_resolve/src/imports.rs index 4e7622d08462..6fa0e6fdbb3b 100644 --- a/compiler/rustc_resolve/src/imports.rs +++ b/compiler/rustc_resolve/src/imports.rs @@ -1042,16 +1042,18 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { suggestion, module, error_implied_by_parse_error: _, + message, } => { if no_ambiguity { assert!(import.imported_module.get().is_none()); self.report_error( span, ResolutionError::FailedToResolve { - segment: Some(segment_name), + segment: segment_name, label, suggestion, module, + message, }, ); } diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index 0b92792611a1..13a4166e00c1 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -4890,14 +4890,16 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> { module, segment_name, error_implied_by_parse_error: _, + message, } => { return Err(respan( span, ResolutionError::FailedToResolve { - segment: Some(segment_name), + segment: segment_name, label, suggestion, module, + message, }, )); } diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index ff1c30458a98..b0271c2737c0 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -280,10 +280,11 @@ enum ResolutionError<'ra> { SelfImportOnlyInImportListWithNonEmptyPrefix, /// Error E0433: failed to resolve. FailedToResolve { - segment: Option, + segment: Symbol, label: String, suggestion: Option, module: Option>, + message: String, }, /// Error E0434: can't capture dynamic environment in a fn item. CannotCaptureDynamicEnvironmentInFnItem, @@ -342,7 +343,7 @@ enum ResolutionError<'ra> { enum VisResolutionError<'a> { Relative2018(Span, &'a ast::Path), AncestorOnly(Span), - FailedToResolve(Span, String, Option), + FailedToResolve(Span, Symbol, String, Option, String), ExpectedFound(Span, String, Res), Indeterminate(Span), ModuleOnly(Span), @@ -486,6 +487,7 @@ enum PathResult<'ra> { /// The segment name of target segment_name: Symbol, error_implied_by_parse_error: bool, + message: String, }, } @@ -496,10 +498,14 @@ impl<'ra> PathResult<'ra> { finalize: bool, error_implied_by_parse_error: bool, module: Option>, - label_and_suggestion: impl FnOnce() -> (String, Option), + label_and_suggestion: impl FnOnce() -> (String, String, Option), ) -> PathResult<'ra> { - let (label, suggestion) = - if finalize { label_and_suggestion() } else { (String::new(), None) }; + let (message, label, suggestion) = if finalize { + label_and_suggestion() + } else { + // FIXME: this output isn't actually present in the test suite. + (format!("cannot find `{ident}` in this scope"), String::new(), None) + }; PathResult::Failed { span: ident.span, segment_name: ident.name, @@ -508,6 +514,7 @@ impl<'ra> PathResult<'ra> { is_error_from_last_segment, module, error_implied_by_parse_error, + message, } } } diff --git a/compiler/rustc_resolve/src/macros.rs b/compiler/rustc_resolve/src/macros.rs index e0973271da52..99cd48524154 100644 --- a/compiler/rustc_resolve/src/macros.rs +++ b/compiler/rustc_resolve/src/macros.rs @@ -908,10 +908,10 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { ), path_res @ (PathResult::NonModule(..) | PathResult::Failed { .. }) => { let mut suggestion = None; - let (span, label, module, segment) = - if let PathResult::Failed { span, label, module, segment_name, .. } = - path_res - { + let (span, message, label, module, segment) = match path_res { + PathResult::Failed { + span, label, module, segment_name, message, .. + } => { // try to suggest if it's not a macro, maybe a function if let PathResult::NonModule(partial_res) = self .cm() @@ -930,26 +930,52 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { Applicability::MaybeIncorrect, )); } - (span, label, module, segment_name) - } else { + (span, message, label, module, segment_name) + } + PathResult::NonModule(partial_res) => { + let found_an = partial_res.base_res().article(); + let found_descr = partial_res.base_res().descr(); + let scope = match &path[..partial_res.unresolved_segments()] { + [.., prev] => { + format!("{found_descr} `{}`", prev.ident) + } + _ => found_descr.to_string(), + }; + let expected_an = kind.article(); + let expected_descr = kind.descr(); + let expected_name = path[partial_res.unresolved_segments()].ident; + ( path_span, format!( - "partially resolved path in {} {}", - kind.article(), - kind.descr() + "cannot find {expected_descr} `{expected_name}` in {scope}" ), + match partial_res.base_res() { + Res::Def( + DefKind::Mod | DefKind::Macro(..) | DefKind::ExternCrate, + _, + ) => format!( + "partially resolved path in {expected_an} {expected_descr}", + ), + _ => format!( + "{expected_an} {expected_descr} can't exist within \ + {found_an} {found_descr}" + ), + }, None, path.last().map(|segment| segment.ident.name).unwrap(), ) - }; + } + _ => unreachable!(), + }; self.report_error( span, ResolutionError::FailedToResolve { - segment: Some(segment), + segment, label, suggestion, module, + message, }, ); } diff --git a/src/tools/clippy/tests/ui/crashes/unreachable-array-or-slice.rs b/src/tools/clippy/tests/ui/crashes/unreachable-array-or-slice.rs index bc2e9aa92ce1..b4f5bdb315f2 100644 --- a/src/tools/clippy/tests/ui/crashes/unreachable-array-or-slice.rs +++ b/src/tools/clippy/tests/ui/crashes/unreachable-array-or-slice.rs @@ -2,7 +2,7 @@ struct Foo(isize, isize, isize, isize); pub fn main() { let Self::anything_here_kills_it(a, b, ..) = Foo(5, 5, 5, 5); - //~^ ERROR: failed to resolve + //~^ ERROR: cannot find `Self` in this scope match [5, 5, 5, 5] { [..] => {}, } diff --git a/src/tools/clippy/tests/ui/crashes/unreachable-array-or-slice.stderr b/src/tools/clippy/tests/ui/crashes/unreachable-array-or-slice.stderr index 9e0d3b934b80..6d7926ec9ad1 100644 --- a/src/tools/clippy/tests/ui/crashes/unreachable-array-or-slice.stderr +++ b/src/tools/clippy/tests/ui/crashes/unreachable-array-or-slice.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions +error[E0433]: cannot find `Self` in this scope --> tests/ui/crashes/unreachable-array-or-slice.rs:4:9 | LL | let Self::anything_here_kills_it(a, b, ..) = Foo(5, 5, 5, 5); diff --git a/src/tools/miri/tests/fail/rustc-error2.rs b/src/tools/miri/tests/fail/rustc-error2.rs index ec42fd17e892..07ebe0adfe52 100644 --- a/src/tools/miri/tests/fail/rustc-error2.rs +++ b/src/tools/miri/tests/fail/rustc-error2.rs @@ -4,7 +4,7 @@ struct Struct(T); impl std::ops::Deref for Struct { type Target = dyn Fn(T); fn deref(&self) -> &assert_mem_uninitialized_valid::Target { - //~^ERROR: use of unresolved module or unlinked crate + //~^ERROR: cannot find module or crate `assert_mem_uninitialized_valid` in this scope unimplemented!() } } diff --git a/src/tools/miri/tests/fail/rustc-error2.stderr b/src/tools/miri/tests/fail/rustc-error2.stderr index 62e3f392ea9d..4d1ad9d4e6ed 100644 --- a/src/tools/miri/tests/fail/rustc-error2.stderr +++ b/src/tools/miri/tests/fail/rustc-error2.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `assert_mem_uninitialized_valid` +error[E0433]: cannot find module or crate `assert_mem_uninitialized_valid` in this scope --> tests/fail/rustc-error2.rs:LL:CC | LL | fn deref(&self) -> &assert_mem_uninitialized_valid::Target { diff --git a/tests/run-make/issue-149402-suggest-unresolve/nightly.err b/tests/run-make/issue-149402-suggest-unresolve/nightly.err index 8659f0170df3..8e122e3da388 100644 --- a/tests/run-make/issue-149402-suggest-unresolve/nightly.err +++ b/tests/run-make/issue-149402-suggest-unresolve/nightly.err @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of undeclared type `Complete` +error[E0433]: cannot find type `Complete` in this scope --> foo.rs:3:12 | 3 | x.push(Complete::Item { name: "hello" }); diff --git a/tests/run-make/issue-149402-suggest-unresolve/stable.err b/tests/run-make/issue-149402-suggest-unresolve/stable.err index 6e82fe1a67ea..f980d4548f64 100644 --- a/tests/run-make/issue-149402-suggest-unresolve/stable.err +++ b/tests/run-make/issue-149402-suggest-unresolve/stable.err @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of undeclared type `Complete` +error[E0433]: cannot find type `Complete` in this scope --> foo.rs:3:12 | 3 | x.push(Complete::Item { name: "hello" }); diff --git a/tests/rustdoc-ui/intra-doc/unresolved-import-recovery.rs b/tests/rustdoc-ui/intra-doc/unresolved-import-recovery.rs index c71e5bee12ea..290b087916c2 100644 --- a/tests/rustdoc-ui/intra-doc/unresolved-import-recovery.rs +++ b/tests/rustdoc-ui/intra-doc/unresolved-import-recovery.rs @@ -1,6 +1,6 @@ // Regression test for issue #95879. -use unresolved_crate::module::Name; //~ ERROR failed to resolve +use unresolved_crate::module::Name; //~ ERROR cannot find /// [Name] pub struct S; diff --git a/tests/rustdoc-ui/intra-doc/unresolved-import-recovery.stderr b/tests/rustdoc-ui/intra-doc/unresolved-import-recovery.stderr index dcdd230c25a1..cbbf7a7f23e7 100644 --- a/tests/rustdoc-ui/intra-doc/unresolved-import-recovery.stderr +++ b/tests/rustdoc-ui/intra-doc/unresolved-import-recovery.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `unresolved_crate` +error[E0433]: cannot find module or crate `unresolved_crate` in the crate root --> $DIR/unresolved-import-recovery.rs:3:5 | LL | use unresolved_crate::module::Name; diff --git a/tests/rustdoc-ui/issues/issue-61732.rs b/tests/rustdoc-ui/issues/issue-61732.rs index d5d9ad5e4637..b375298ea40e 100644 --- a/tests/rustdoc-ui/issues/issue-61732.rs +++ b/tests/rustdoc-ui/issues/issue-61732.rs @@ -1,4 +1,4 @@ // This previously triggered an ICE. pub(in crate::r#mod) fn main() {} -//~^ ERROR failed to resolve: use of unresolved module or unlinked crate `r#mod` +//~^ ERROR cannot find module or crate `r#mod` in `crate` diff --git a/tests/rustdoc-ui/issues/issue-61732.stderr b/tests/rustdoc-ui/issues/issue-61732.stderr index c4e6997ab74d..49d5bfc9a2f0 100644 --- a/tests/rustdoc-ui/issues/issue-61732.stderr +++ b/tests/rustdoc-ui/issues/issue-61732.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `r#mod` +error[E0433]: cannot find module or crate `r#mod` in `crate` --> $DIR/issue-61732.rs:3:15 | LL | pub(in crate::r#mod) fn main() {} diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs index fa2b6e907a26..759a9412f769 100644 --- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs +++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs @@ -137,7 +137,7 @@ struct MessageWrongType { struct InvalidPathFieldAttr { #[nonsense] //~^ ERROR `#[nonsense]` is not a valid attribute - //~^^ ERROR cannot find attribute `nonsense` in this scope + //~| ERROR cannot find attribute `nonsense` in this scope foo: String, } diff --git a/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive-inline.rs b/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive-inline.rs index c7636bca80b5..2aed4fa9465c 100644 --- a/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive-inline.rs +++ b/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive-inline.rs @@ -90,6 +90,14 @@ struct G { var: String, } +#[derive(Subdiagnostic)] +#[label("...")] +struct H { + #[primary_span] + span: Span, + var: String, +} + #[derive(Subdiagnostic)] #[label(slug = 4)] //~^ ERROR no nested attribute expected here diff --git a/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive-inline.stderr b/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive-inline.stderr index 90e0c285ee74..8e634bf78797 100644 --- a/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive-inline.stderr +++ b/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive-inline.stderr @@ -35,109 +35,109 @@ LL | #[label(bug = "...")] | ^ error: derive(Diagnostic): no nested attribute expected here - --> $DIR/subdiagnostic-derive-inline.rs:94:9 + --> $DIR/subdiagnostic-derive-inline.rs:102:9 | LL | #[label(slug = 4)] | ^^^^ error: derive(Diagnostic): diagnostic message must be first argument of a `#[label(...)]` attribute - --> $DIR/subdiagnostic-derive-inline.rs:94:1 + --> $DIR/subdiagnostic-derive-inline.rs:102:1 | LL | #[label(slug = 4)] | ^ error: derive(Diagnostic): no nested attribute expected here - --> $DIR/subdiagnostic-derive-inline.rs:104:9 + --> $DIR/subdiagnostic-derive-inline.rs:112:9 | LL | #[label(slug("..."))] | ^^^^ error: derive(Diagnostic): diagnostic message must be first argument of a `#[label(...)]` attribute - --> $DIR/subdiagnostic-derive-inline.rs:104:1 + --> $DIR/subdiagnostic-derive-inline.rs:112:1 | LL | #[label(slug("..."))] | ^ error: derive(Diagnostic): diagnostic message must be first argument of a `#[label(...)]` attribute - --> $DIR/subdiagnostic-derive-inline.rs:114:1 + --> $DIR/subdiagnostic-derive-inline.rs:122:1 | LL | #[label()] | ^ error: derive(Diagnostic): no nested attribute expected here - --> $DIR/subdiagnostic-derive-inline.rs:123:28 + --> $DIR/subdiagnostic-derive-inline.rs:131:28 | LL | #[label("example message", code = "...")] | ^^^^ error: derive(Diagnostic): no nested attribute expected here - --> $DIR/subdiagnostic-derive-inline.rs:132:28 + --> $DIR/subdiagnostic-derive-inline.rs:140:28 | LL | #[label("example message", applicability = "machine-applicable")] | ^^^^^^^^^^^^^ error: derive(Diagnostic): unsupported type attribute for subdiagnostic enum - --> $DIR/subdiagnostic-derive-inline.rs:141:1 + --> $DIR/subdiagnostic-derive-inline.rs:149:1 | LL | #[foo] | ^ error: derive(Diagnostic): `#[bar]` is not a valid attribute - --> $DIR/subdiagnostic-derive-inline.rs:155:5 + --> $DIR/subdiagnostic-derive-inline.rs:163:5 | LL | #[bar] | ^ error: derive(Diagnostic): `#[bar = ...]` is not a valid attribute - --> $DIR/subdiagnostic-derive-inline.rs:167:5 + --> $DIR/subdiagnostic-derive-inline.rs:175:5 | LL | #[bar = "..."] | ^ error: derive(Diagnostic): `#[bar = ...]` is not a valid attribute - --> $DIR/subdiagnostic-derive-inline.rs:179:5 + --> $DIR/subdiagnostic-derive-inline.rs:187:5 | LL | #[bar = 4] | ^ error: derive(Diagnostic): `#[bar(...)]` is not a valid attribute - --> $DIR/subdiagnostic-derive-inline.rs:191:5 + --> $DIR/subdiagnostic-derive-inline.rs:199:5 | LL | #[bar("...")] | ^ error: derive(Diagnostic): no nested attribute expected here - --> $DIR/subdiagnostic-derive-inline.rs:203:13 + --> $DIR/subdiagnostic-derive-inline.rs:211:13 | LL | #[label(code = "...")] | ^^^^ error: derive(Diagnostic): diagnostic message must be first argument of a `#[label(...)]` attribute - --> $DIR/subdiagnostic-derive-inline.rs:203:5 + --> $DIR/subdiagnostic-derive-inline.rs:211:5 | LL | #[label(code = "...")] | ^ error: derive(Diagnostic): the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan` - --> $DIR/subdiagnostic-derive-inline.rs:232:5 + --> $DIR/subdiagnostic-derive-inline.rs:240:5 | LL | #[primary_span] | ^ error: derive(Diagnostic): label without `#[primary_span]` field - --> $DIR/subdiagnostic-derive-inline.rs:229:1 + --> $DIR/subdiagnostic-derive-inline.rs:237:1 | LL | #[label("example message")] | ^ error: derive(Diagnostic): `#[applicability]` is only valid on suggestions - --> $DIR/subdiagnostic-derive-inline.rs:242:5 + --> $DIR/subdiagnostic-derive-inline.rs:250:5 | LL | #[applicability] | ^ error: derive(Diagnostic): `#[bar]` is not a valid attribute - --> $DIR/subdiagnostic-derive-inline.rs:252:5 + --> $DIR/subdiagnostic-derive-inline.rs:260:5 | LL | #[bar] | ^ @@ -145,13 +145,13 @@ LL | #[bar] = help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes error: derive(Diagnostic): `#[bar = ...]` is not a valid attribute - --> $DIR/subdiagnostic-derive-inline.rs:263:5 + --> $DIR/subdiagnostic-derive-inline.rs:271:5 | LL | #[bar = "..."] | ^ error: derive(Diagnostic): `#[bar(...)]` is not a valid attribute - --> $DIR/subdiagnostic-derive-inline.rs:274:5 + --> $DIR/subdiagnostic-derive-inline.rs:282:5 | LL | #[bar("...")] | ^ @@ -159,7 +159,7 @@ LL | #[bar("...")] = help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes error: unexpected unsupported untagged union - --> $DIR/subdiagnostic-derive-inline.rs:290:1 + --> $DIR/subdiagnostic-derive-inline.rs:298:1 | LL | / union AC { LL | | @@ -169,97 +169,97 @@ LL | | } | |_^ error: expected this path to be an identifier - --> $DIR/subdiagnostic-derive-inline.rs:305:28 + --> $DIR/subdiagnostic-derive-inline.rs:313:28 | LL | #[label("example message", no_crate::example)] | ^^^^^^^^^^^^^^^^^ error: derive(Diagnostic): attribute specified multiple times - --> $DIR/subdiagnostic-derive-inline.rs:318:5 + --> $DIR/subdiagnostic-derive-inline.rs:326:5 | LL | #[primary_span] | ^ | note: previously specified here - --> $DIR/subdiagnostic-derive-inline.rs:315:5 + --> $DIR/subdiagnostic-derive-inline.rs:323:5 | LL | #[primary_span] | ^ error: derive(Diagnostic): subdiagnostic kind not specified - --> $DIR/subdiagnostic-derive-inline.rs:324:8 + --> $DIR/subdiagnostic-derive-inline.rs:332:8 | LL | struct AG { | ^^ error: derive(Diagnostic): attribute specified multiple times - --> $DIR/subdiagnostic-derive-inline.rs:361:47 + --> $DIR/subdiagnostic-derive-inline.rs:369:47 | LL | #[suggestion("example message", code = "...", code = "...")] | ^^^^ | note: previously specified here - --> $DIR/subdiagnostic-derive-inline.rs:361:33 + --> $DIR/subdiagnostic-derive-inline.rs:369:33 | LL | #[suggestion("example message", code = "...", code = "...")] | ^^^^ error: derive(Diagnostic): attribute specified multiple times - --> $DIR/subdiagnostic-derive-inline.rs:379:5 + --> $DIR/subdiagnostic-derive-inline.rs:387:5 | LL | #[applicability] | ^ | note: previously specified here - --> $DIR/subdiagnostic-derive-inline.rs:376:5 + --> $DIR/subdiagnostic-derive-inline.rs:384:5 | LL | #[applicability] | ^ error: derive(Diagnostic): the `#[applicability]` attribute can only be applied to fields of type `Applicability` - --> $DIR/subdiagnostic-derive-inline.rs:389:5 + --> $DIR/subdiagnostic-derive-inline.rs:397:5 | LL | #[applicability] | ^ error: derive(Diagnostic): suggestion without `code = "..."` - --> $DIR/subdiagnostic-derive-inline.rs:402:1 + --> $DIR/subdiagnostic-derive-inline.rs:410:1 | LL | #[suggestion("example message")] | ^ error: derive(Diagnostic): invalid applicability - --> $DIR/subdiagnostic-derive-inline.rs:412:63 + --> $DIR/subdiagnostic-derive-inline.rs:420:63 | LL | #[suggestion("example message", code = "...", applicability = "foo")] | ^^^^^ error: derive(Diagnostic): suggestion without `#[primary_span]` field - --> $DIR/subdiagnostic-derive-inline.rs:430:1 + --> $DIR/subdiagnostic-derive-inline.rs:438:1 | LL | #[suggestion("example message", code = "...")] | ^ error: derive(Diagnostic): unsupported type attribute for subdiagnostic enum - --> $DIR/subdiagnostic-derive-inline.rs:444:1 + --> $DIR/subdiagnostic-derive-inline.rs:452:1 | LL | #[label] | ^ error: derive(Diagnostic): `var` doesn't refer to a field on this type - --> $DIR/subdiagnostic-derive-inline.rs:464:40 + --> $DIR/subdiagnostic-derive-inline.rs:472:40 | LL | #[suggestion("example message", code = "{var}", applicability = "machine-applicable")] | ^^^^^^^ error: derive(Diagnostic): `var` doesn't refer to a field on this type - --> $DIR/subdiagnostic-derive-inline.rs:483:44 + --> $DIR/subdiagnostic-derive-inline.rs:491:44 | LL | #[suggestion("example message", code = "{var}", applicability = "machine-applicable")] | ^^^^^^^ error: derive(Diagnostic): `#[suggestion_part]` is not a valid attribute - --> $DIR/subdiagnostic-derive-inline.rs:506:5 + --> $DIR/subdiagnostic-derive-inline.rs:514:5 | LL | #[suggestion_part] | ^ @@ -267,7 +267,7 @@ LL | #[suggestion_part] = help: `#[suggestion_part(...)]` is only valid in multipart suggestions, use `#[primary_span]` instead error: derive(Diagnostic): `#[suggestion_part(...)]` is not a valid attribute - --> $DIR/subdiagnostic-derive-inline.rs:509:5 + --> $DIR/subdiagnostic-derive-inline.rs:517:5 | LL | #[suggestion_part(code = "...")] | ^ @@ -275,13 +275,13 @@ LL | #[suggestion_part(code = "...")] = help: `#[suggestion_part(...)]` is only valid in multipart suggestions error: derive(Diagnostic): suggestion without `#[primary_span]` field - --> $DIR/subdiagnostic-derive-inline.rs:503:1 + --> $DIR/subdiagnostic-derive-inline.rs:511:1 | LL | #[suggestion("example message", code = "...")] | ^ error: derive(Diagnostic): invalid nested attribute - --> $DIR/subdiagnostic-derive-inline.rs:518:43 + --> $DIR/subdiagnostic-derive-inline.rs:526:43 | LL | #[multipart_suggestion("example message", code = "...", applicability = "machine-applicable")] | ^^^^ @@ -289,25 +289,25 @@ LL | #[multipart_suggestion("example message", code = "...", applicability = "ma = help: only `style` and `applicability` are valid nested attributes error: derive(Diagnostic): multipart suggestion without any `#[suggestion_part(...)]` fields - --> $DIR/subdiagnostic-derive-inline.rs:518:1 + --> $DIR/subdiagnostic-derive-inline.rs:526:1 | LL | #[multipart_suggestion("example message", code = "...", applicability = "machine-applicable")] | ^ error: derive(Diagnostic): `#[suggestion_part(...)]` attribute without `code = "..."` - --> $DIR/subdiagnostic-derive-inline.rs:528:5 + --> $DIR/subdiagnostic-derive-inline.rs:536:5 | LL | #[suggestion_part] | ^ error: derive(Diagnostic): `#[suggestion_part(...)]` attribute without `code = "..."` - --> $DIR/subdiagnostic-derive-inline.rs:536:5 + --> $DIR/subdiagnostic-derive-inline.rs:544:5 | LL | #[suggestion_part()] | ^ error: derive(Diagnostic): `#[primary_span]` is not a valid attribute - --> $DIR/subdiagnostic-derive-inline.rs:545:5 + --> $DIR/subdiagnostic-derive-inline.rs:553:5 | LL | #[primary_span] | ^ @@ -315,127 +315,127 @@ LL | #[primary_span] = help: multipart suggestions use one or more `#[suggestion_part]`s rather than one `#[primary_span]` error: derive(Diagnostic): multipart suggestion without any `#[suggestion_part(...)]` fields - --> $DIR/subdiagnostic-derive-inline.rs:542:1 + --> $DIR/subdiagnostic-derive-inline.rs:550:1 | LL | #[multipart_suggestion("example message")] | ^ error: derive(Diagnostic): `#[suggestion_part(...)]` attribute without `code = "..."` - --> $DIR/subdiagnostic-derive-inline.rs:553:5 + --> $DIR/subdiagnostic-derive-inline.rs:561:5 | LL | #[suggestion_part] | ^ error: derive(Diagnostic): `#[suggestion_part(...)]` attribute without `code = "..."` - --> $DIR/subdiagnostic-derive-inline.rs:556:5 + --> $DIR/subdiagnostic-derive-inline.rs:564:5 | LL | #[suggestion_part()] | ^ error: derive(Diagnostic): `code` is the only valid nested attribute - --> $DIR/subdiagnostic-derive-inline.rs:559:23 + --> $DIR/subdiagnostic-derive-inline.rs:567:23 | LL | #[suggestion_part(foo = "bar")] | ^^^ error: derive(Diagnostic): the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan` - --> $DIR/subdiagnostic-derive-inline.rs:563:5 + --> $DIR/subdiagnostic-derive-inline.rs:571:5 | LL | #[suggestion_part(code = "...")] | ^ error: derive(Diagnostic): the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan` - --> $DIR/subdiagnostic-derive-inline.rs:566:5 + --> $DIR/subdiagnostic-derive-inline.rs:574:5 | LL | #[suggestion_part()] | ^ error: expected `,` - --> $DIR/subdiagnostic-derive-inline.rs:559:27 + --> $DIR/subdiagnostic-derive-inline.rs:567:27 | LL | #[suggestion_part(foo = "bar")] | ^ error: derive(Diagnostic): attribute specified multiple times - --> $DIR/subdiagnostic-derive-inline.rs:574:37 + --> $DIR/subdiagnostic-derive-inline.rs:582:37 | LL | #[suggestion_part(code = "...", code = ",,,")] | ^^^^ | note: previously specified here - --> $DIR/subdiagnostic-derive-inline.rs:574:23 + --> $DIR/subdiagnostic-derive-inline.rs:582:23 | LL | #[suggestion_part(code = "...", code = ",,,")] | ^^^^ error: derive(Diagnostic): `#[applicability]` has no effect if all `#[suggestion]`/`#[multipart_suggestion]` attributes have a static `applicability = "..."` - --> $DIR/subdiagnostic-derive-inline.rs:603:5 + --> $DIR/subdiagnostic-derive-inline.rs:611:5 | LL | #[applicability] | ^ error: derive(Diagnostic): expected exactly one string literal for `code = ...` - --> $DIR/subdiagnostic-derive-inline.rs:651:28 + --> $DIR/subdiagnostic-derive-inline.rs:659:28 | LL | #[suggestion_part(code("foo"))] | ^^^^^ error: unexpected token, expected `)` - --> $DIR/subdiagnostic-derive-inline.rs:651:28 + --> $DIR/subdiagnostic-derive-inline.rs:659:28 | LL | #[suggestion_part(code("foo"))] | ^^^^^ error: derive(Diagnostic): expected exactly one string literal for `code = ...` - --> $DIR/subdiagnostic-derive-inline.rs:661:28 + --> $DIR/subdiagnostic-derive-inline.rs:669:28 | LL | #[suggestion_part(code("foo", "bar"))] | ^^^^^ error: unexpected token, expected `)` - --> $DIR/subdiagnostic-derive-inline.rs:661:28 + --> $DIR/subdiagnostic-derive-inline.rs:669:28 | LL | #[suggestion_part(code("foo", "bar"))] | ^^^^^ error: derive(Diagnostic): expected exactly one string literal for `code = ...` - --> $DIR/subdiagnostic-derive-inline.rs:671:28 + --> $DIR/subdiagnostic-derive-inline.rs:679:28 | LL | #[suggestion_part(code(3))] | ^ error: unexpected token, expected `)` - --> $DIR/subdiagnostic-derive-inline.rs:671:28 + --> $DIR/subdiagnostic-derive-inline.rs:679:28 | LL | #[suggestion_part(code(3))] | ^ error: derive(Diagnostic): expected exactly one string literal for `code = ...` - --> $DIR/subdiagnostic-derive-inline.rs:681:28 + --> $DIR/subdiagnostic-derive-inline.rs:689:28 | LL | #[suggestion_part(code())] | ^ error: expected string literal - --> $DIR/subdiagnostic-derive-inline.rs:690:30 + --> $DIR/subdiagnostic-derive-inline.rs:698:30 | LL | #[suggestion_part(code = 3)] | ^ error: derive(Diagnostic): attribute specified multiple times - --> $DIR/subdiagnostic-derive-inline.rs:732:1 + --> $DIR/subdiagnostic-derive-inline.rs:740:1 | LL | #[suggestion("example message", code = "", style = "hidden", style = "normal")] | ^ | note: previously specified here - --> $DIR/subdiagnostic-derive-inline.rs:732:1 + --> $DIR/subdiagnostic-derive-inline.rs:740:1 | LL | #[suggestion("example message", code = "", style = "hidden", style = "normal")] | ^ error: derive(Diagnostic): `#[suggestion_hidden(...)]` is not a valid attribute - --> $DIR/subdiagnostic-derive-inline.rs:741:1 + --> $DIR/subdiagnostic-derive-inline.rs:749:1 | LL | #[suggestion_hidden("example message", code = "")] | ^ @@ -443,7 +443,7 @@ LL | #[suggestion_hidden("example message", code = "")] = help: Use `#[suggestion(..., style = "hidden")]` instead error: derive(Diagnostic): `#[suggestion_hidden(...)]` is not a valid attribute - --> $DIR/subdiagnostic-derive-inline.rs:749:1 + --> $DIR/subdiagnostic-derive-inline.rs:757:1 | LL | #[suggestion_hidden("example message", code = "", style = "normal")] | ^ @@ -451,7 +451,7 @@ LL | #[suggestion_hidden("example message", code = "", style = "normal")] = help: Use `#[suggestion(..., style = "hidden")]` instead error: derive(Diagnostic): invalid suggestion style - --> $DIR/subdiagnostic-derive-inline.rs:757:52 + --> $DIR/subdiagnostic-derive-inline.rs:765:52 | LL | #[suggestion("example message", code = "", style = "foo")] | ^^^^^ @@ -459,25 +459,25 @@ LL | #[suggestion("example message", code = "", style = "foo")] = help: valid styles are `normal`, `short`, `hidden`, `verbose` and `tool-only` error: expected string literal - --> $DIR/subdiagnostic-derive-inline.rs:765:52 + --> $DIR/subdiagnostic-derive-inline.rs:773:52 | LL | #[suggestion("example message", code = "", style = 42)] | ^^ error: expected `=` - --> $DIR/subdiagnostic-derive-inline.rs:773:49 + --> $DIR/subdiagnostic-derive-inline.rs:781:49 | LL | #[suggestion("example message", code = "", style)] | ^ error: expected `=` - --> $DIR/subdiagnostic-derive-inline.rs:781:49 + --> $DIR/subdiagnostic-derive-inline.rs:789:49 | LL | #[suggestion("example message", code = "", style("foo"))] | ^ error: derive(Diagnostic): `#[primary_span]` is not a valid attribute - --> $DIR/subdiagnostic-derive-inline.rs:792:5 + --> $DIR/subdiagnostic-derive-inline.rs:800:5 | LL | #[primary_span] | ^ @@ -486,7 +486,7 @@ LL | #[primary_span] = help: to create a suggestion with multiple spans, use `#[multipart_suggestion]` instead error: derive(Diagnostic): suggestion without `#[primary_span]` field - --> $DIR/subdiagnostic-derive-inline.rs:789:1 + --> $DIR/subdiagnostic-derive-inline.rs:797:1 | LL | #[suggestion("example message", code = "")] | ^ @@ -498,49 +498,49 @@ LL | #[foo] | ^^^ error: cannot find attribute `foo` in this scope - --> $DIR/subdiagnostic-derive-inline.rs:141:3 + --> $DIR/subdiagnostic-derive-inline.rs:149:3 | LL | #[foo] | ^^^ error: cannot find attribute `bar` in this scope - --> $DIR/subdiagnostic-derive-inline.rs:155:7 + --> $DIR/subdiagnostic-derive-inline.rs:163:7 | LL | #[bar] | ^^^ error: cannot find attribute `bar` in this scope - --> $DIR/subdiagnostic-derive-inline.rs:167:7 + --> $DIR/subdiagnostic-derive-inline.rs:175:7 | LL | #[bar = "..."] | ^^^ error: cannot find attribute `bar` in this scope - --> $DIR/subdiagnostic-derive-inline.rs:179:7 + --> $DIR/subdiagnostic-derive-inline.rs:187:7 | LL | #[bar = 4] | ^^^ error: cannot find attribute `bar` in this scope - --> $DIR/subdiagnostic-derive-inline.rs:191:7 + --> $DIR/subdiagnostic-derive-inline.rs:199:7 | LL | #[bar("...")] | ^^^ error: cannot find attribute `bar` in this scope - --> $DIR/subdiagnostic-derive-inline.rs:252:7 + --> $DIR/subdiagnostic-derive-inline.rs:260:7 | LL | #[bar] | ^^^ error: cannot find attribute `bar` in this scope - --> $DIR/subdiagnostic-derive-inline.rs:263:7 + --> $DIR/subdiagnostic-derive-inline.rs:271:7 | LL | #[bar = "..."] | ^^^ error: cannot find attribute `bar` in this scope - --> $DIR/subdiagnostic-derive-inline.rs:274:7 + --> $DIR/subdiagnostic-derive-inline.rs:282:7 | LL | #[bar("...")] | ^^^ diff --git a/tests/ui/asm/naked-invalid-attr.rs b/tests/ui/asm/naked-invalid-attr.rs index eba7cf01b7b2..d020fae41cf9 100644 --- a/tests/ui/asm/naked-invalid-attr.rs +++ b/tests/ui/asm/naked-invalid-attr.rs @@ -56,7 +56,7 @@ fn main() { // Check that the path of an attribute without a name is printed correctly (issue #140082) #[::a] //~^ ERROR attribute incompatible with `#[unsafe(naked)]` -//~| ERROR failed to resolve: use of unresolved module or unlinked crate `a` +//~| ERROR cannot find module or crate `a` in the crate root #[unsafe(naked)] extern "C" fn issue_140082() { naked_asm!("") diff --git a/tests/ui/asm/naked-invalid-attr.stderr b/tests/ui/asm/naked-invalid-attr.stderr index a6348923277d..9962cbafc37f 100644 --- a/tests/ui/asm/naked-invalid-attr.stderr +++ b/tests/ui/asm/naked-invalid-attr.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `a` +error[E0433]: cannot find module or crate `a` in the crate root --> $DIR/naked-invalid-attr.rs:57:5 | LL | #[::a] diff --git a/tests/ui/attributes/builtin-attribute-prefix.rs b/tests/ui/attributes/builtin-attribute-prefix.rs index d184c6d008df..02af7f536f86 100644 --- a/tests/ui/attributes/builtin-attribute-prefix.rs +++ b/tests/ui/attributes/builtin-attribute-prefix.rs @@ -1,8 +1,8 @@ // Regression test for https://github.com/rust-lang/rust/issues/143789 #[must_use::skip] -//~^ ERROR failed to resolve: use of unresolved module or unlinked crate `must_use` +//~^ ERROR: cannot find module or crate `must_use` fn main() { } // Regression test for https://github.com/rust-lang/rust/issues/137590 struct S(#[stable::skip] u8, u16, u32); -//~^ ERROR failed to resolve: use of unresolved module or unlinked crate `stable` +//~^ ERROR: cannot find module or crate `stable` diff --git a/tests/ui/attributes/builtin-attribute-prefix.stderr b/tests/ui/attributes/builtin-attribute-prefix.stderr index a16080c003fb..a3e6c2e0172b 100644 --- a/tests/ui/attributes/builtin-attribute-prefix.stderr +++ b/tests/ui/attributes/builtin-attribute-prefix.stderr @@ -1,10 +1,10 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `stable` +error[E0433]: cannot find module or crate `stable` in this scope --> $DIR/builtin-attribute-prefix.rs:7:12 | LL | struct S(#[stable::skip] u8, u16, u32); | ^^^^^^ use of unresolved module or unlinked crate `stable` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `must_use` +error[E0433]: cannot find module or crate `must_use` in this scope --> $DIR/builtin-attribute-prefix.rs:2:3 | LL | #[must_use::skip] diff --git a/tests/ui/attributes/check-builtin-attr-ice.rs b/tests/ui/attributes/check-builtin-attr-ice.rs index 811210e2ccaf..bf4e3492f709 100644 --- a/tests/ui/attributes/check-builtin-attr-ice.rs +++ b/tests/ui/attributes/check-builtin-attr-ice.rs @@ -43,11 +43,11 @@ struct Foo { #[should_panic::skip] - //~^ ERROR failed to resolve + //~^ ERROR cannot find pub field: u8, #[should_panic::a::b::c] - //~^ ERROR failed to resolve + //~^ ERROR cannot find pub field2: u8, } @@ -55,6 +55,6 @@ fn foo() {} fn main() { #[deny::skip] - //~^ ERROR failed to resolve + //~^ ERROR cannot find foo(); } diff --git a/tests/ui/attributes/check-builtin-attr-ice.stderr b/tests/ui/attributes/check-builtin-attr-ice.stderr index 07bbe01898a7..35c97a05918e 100644 --- a/tests/ui/attributes/check-builtin-attr-ice.stderr +++ b/tests/ui/attributes/check-builtin-attr-ice.stderr @@ -1,16 +1,16 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `should_panic` +error[E0433]: cannot find module or crate `should_panic` in this scope --> $DIR/check-builtin-attr-ice.rs:45:7 | LL | #[should_panic::skip] | ^^^^^^^^^^^^ use of unresolved module or unlinked crate `should_panic` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `should_panic` +error[E0433]: cannot find module or crate `should_panic` in this scope --> $DIR/check-builtin-attr-ice.rs:49:7 | LL | #[should_panic::a::b::c] | ^^^^^^^^^^^^ use of unresolved module or unlinked crate `should_panic` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `deny` +error[E0433]: cannot find module or crate `deny` in this scope --> $DIR/check-builtin-attr-ice.rs:57:7 | LL | #[deny::skip] diff --git a/tests/ui/attributes/check-cfg_attr-ice.rs b/tests/ui/attributes/check-cfg_attr-ice.rs index 5bf8baab1414..5fb3f2798ba7 100644 --- a/tests/ui/attributes/check-cfg_attr-ice.rs +++ b/tests/ui/attributes/check-cfg_attr-ice.rs @@ -10,27 +10,27 @@ #![crate_type = "lib"] #[cfg_attr::no_such_thing] -//~^ ERROR failed to resolve +//~^ ERROR cannot find mod we_are_no_strangers_to_love {} #[cfg_attr::no_such_thing] -//~^ ERROR failed to resolve +//~^ ERROR cannot find struct YouKnowTheRules { #[cfg_attr::no_such_thing] - //~^ ERROR failed to resolve + //~^ ERROR cannot find and_so_do_i: u8, } #[cfg_attr::no_such_thing] -//~^ ERROR failed to resolve +//~^ ERROR cannot find fn a_full_commitment() { #[cfg_attr::no_such_thing] - //~^ ERROR failed to resolve + //~^ ERROR cannot find let is_what_i_am_thinking_of = (); } #[cfg_attr::no_such_thing] -//~^ ERROR failed to resolve +//~^ ERROR cannot find union AnyOtherGuy { owo: () } @@ -39,30 +39,30 @@ struct This; #[cfg_attr(FALSE, doc = "you wouldn't get this")] impl From for This { #[cfg_attr::no_such_thing] - //~^ ERROR failed to resolve + //~^ ERROR cannot find fn from(#[cfg_attr::no_such_thing] any_other_guy: AnyOtherGuy) -> This { - //~^ ERROR failed to resolve + //~^ ERROR cannot find #[cfg_attr::no_such_thing] //~^ ERROR attributes on expressions are experimental - //~| ERROR failed to resolve + //~| ERROR cannot find unreachable!() } } #[cfg_attr::no_such_thing] -//~^ ERROR failed to resolve +//~^ ERROR cannot find enum NeverGonna { #[cfg_attr::no_such_thing] - //~^ ERROR failed to resolve + //~^ ERROR cannot find GiveYouUp(#[cfg_attr::no_such_thing] u8), - //~^ ERROR failed to resolve + //~^ ERROR cannot find LetYouDown { #![cfg_attr::no_such_thing] //~^ ERROR an inner attribute is not permitted in this context never_gonna: (), round_around: (), #[cfg_attr::no_such_thing] - //~^ ERROR failed to resolve + //~^ ERROR cannot find and_desert_you: (), }, } diff --git a/tests/ui/attributes/check-cfg_attr-ice.stderr b/tests/ui/attributes/check-cfg_attr-ice.stderr index bed3150bdc2f..65476e2f76b6 100644 --- a/tests/ui/attributes/check-cfg_attr-ice.stderr +++ b/tests/ui/attributes/check-cfg_attr-ice.stderr @@ -17,79 +17,79 @@ LL | #[cfg_attr::no_such_thing] = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr` +error[E0433]: cannot find module or crate `cfg_attr` in this scope --> $DIR/check-cfg_attr-ice.rs:52:3 | LL | #[cfg_attr::no_such_thing] | ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr` +error[E0433]: cannot find module or crate `cfg_attr` in this scope --> $DIR/check-cfg_attr-ice.rs:55:7 | LL | #[cfg_attr::no_such_thing] | ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr` +error[E0433]: cannot find module or crate `cfg_attr` in this scope --> $DIR/check-cfg_attr-ice.rs:57:17 | LL | GiveYouUp(#[cfg_attr::no_such_thing] u8), | ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr` +error[E0433]: cannot find module or crate `cfg_attr` in this scope --> $DIR/check-cfg_attr-ice.rs:64:11 | LL | #[cfg_attr::no_such_thing] | ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr` +error[E0433]: cannot find module or crate `cfg_attr` in this scope --> $DIR/check-cfg_attr-ice.rs:41:7 | LL | #[cfg_attr::no_such_thing] | ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr` +error[E0433]: cannot find module or crate `cfg_attr` in this scope --> $DIR/check-cfg_attr-ice.rs:43:15 | LL | fn from(#[cfg_attr::no_such_thing] any_other_guy: AnyOtherGuy) -> This { | ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr` +error[E0433]: cannot find module or crate `cfg_attr` in this scope --> $DIR/check-cfg_attr-ice.rs:45:11 | LL | #[cfg_attr::no_such_thing] | ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr` +error[E0433]: cannot find module or crate `cfg_attr` in this scope --> $DIR/check-cfg_attr-ice.rs:32:3 | LL | #[cfg_attr::no_such_thing] | ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr` +error[E0433]: cannot find module or crate `cfg_attr` in this scope --> $DIR/check-cfg_attr-ice.rs:24:3 | LL | #[cfg_attr::no_such_thing] | ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr` +error[E0433]: cannot find module or crate `cfg_attr` in this scope --> $DIR/check-cfg_attr-ice.rs:27:7 | LL | #[cfg_attr::no_such_thing] | ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr` +error[E0433]: cannot find module or crate `cfg_attr` in this scope --> $DIR/check-cfg_attr-ice.rs:16:3 | LL | #[cfg_attr::no_such_thing] | ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr` +error[E0433]: cannot find module or crate `cfg_attr` in this scope --> $DIR/check-cfg_attr-ice.rs:19:7 | LL | #[cfg_attr::no_such_thing] | ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr` +error[E0433]: cannot find module or crate `cfg_attr` in this scope --> $DIR/check-cfg_attr-ice.rs:12:3 | LL | #[cfg_attr::no_such_thing] diff --git a/tests/ui/attributes/custom_attr_multisegment_error.rs b/tests/ui/attributes/custom_attr_multisegment_error.rs index 1045282c3a33..f42c35ffea13 100644 --- a/tests/ui/attributes/custom_attr_multisegment_error.rs +++ b/tests/ui/attributes/custom_attr_multisegment_error.rs @@ -2,5 +2,5 @@ mod existent {} -#[existent::nonexistent] //~ ERROR failed to resolve: could not find `nonexistent` in `existent` +#[existent::nonexistent] //~ ERROR cannot find `nonexistent` in `existent` fn main() {} diff --git a/tests/ui/attributes/custom_attr_multisegment_error.stderr b/tests/ui/attributes/custom_attr_multisegment_error.stderr index 02bed225d53e..8066fc74de4b 100644 --- a/tests/ui/attributes/custom_attr_multisegment_error.stderr +++ b/tests/ui/attributes/custom_attr_multisegment_error.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: could not find `nonexistent` in `existent` +error[E0433]: cannot find `nonexistent` in `existent` --> $DIR/custom_attr_multisegment_error.rs:5:13 | LL | #[existent::nonexistent] diff --git a/tests/ui/attributes/field-attributes-vis-unresolved.rs b/tests/ui/attributes/field-attributes-vis-unresolved.rs index be710a3cd744..bcdabe42fcc2 100644 --- a/tests/ui/attributes/field-attributes-vis-unresolved.rs +++ b/tests/ui/attributes/field-attributes-vis-unresolved.rs @@ -15,12 +15,12 @@ mod internal { struct S { #[rustfmt::skip] - pub(in nonexistent) field: u8 //~ ERROR failed to resolve + pub(in nonexistent) field: u8 //~ ERROR cannot find } struct Z( #[rustfmt::skip] - pub(in nonexistent) u8 //~ ERROR failed to resolve + pub(in nonexistent) u8 //~ ERROR cannot find ); fn main() {} diff --git a/tests/ui/attributes/field-attributes-vis-unresolved.stderr b/tests/ui/attributes/field-attributes-vis-unresolved.stderr index 1ebfde4cd67e..f1148385d8a1 100644 --- a/tests/ui/attributes/field-attributes-vis-unresolved.stderr +++ b/tests/ui/attributes/field-attributes-vis-unresolved.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nonexistent` +error[E0433]: cannot find module or crate `nonexistent` in the crate root --> $DIR/field-attributes-vis-unresolved.rs:18:12 | LL | pub(in nonexistent) field: u8 @@ -9,7 +9,7 @@ help: you might be missing a crate named `nonexistent`, add it to your project a LL + extern crate nonexistent; | -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nonexistent` +error[E0433]: cannot find module or crate `nonexistent` in the crate root --> $DIR/field-attributes-vis-unresolved.rs:23:12 | LL | pub(in nonexistent) u8 diff --git a/tests/ui/attributes/illegal-macro-use.rs b/tests/ui/attributes/illegal-macro-use.rs index 5a567107a6e2..e16a223c75ff 100644 --- a/tests/ui/attributes/illegal-macro-use.rs +++ b/tests/ui/attributes/illegal-macro-use.rs @@ -1,15 +1,15 @@ // issue#140255 -#[macro_use::a] //~ ERROR failed to resolve: use of unresolved module or unlinked crate `macro_use` +#[macro_use::a] //~ ERROR cannot find fn f0() {} -#[macro_use::a::b] //~ ERROR failed to resolve: use of unresolved module or unlinked crate `macro_use` +#[macro_use::a::b] //~ ERROR cannot find fn f1() {} -#[macro_escape::a] //~ ERROR failed to resolve: use of unresolved module or unlinked crate `macro_escape` +#[macro_escape::a] //~ ERROR cannot find fn f2() {} -#[macro_escape::a::b] //~ ERROR failed to resolve: use of unresolved module or unlinked crate `macro_escape` +#[macro_escape::a::b] //~ ERROR cannot find fn f3() {} fn main() {} diff --git a/tests/ui/attributes/illegal-macro-use.stderr b/tests/ui/attributes/illegal-macro-use.stderr index fa6bb83d588a..13c9f05ccd66 100644 --- a/tests/ui/attributes/illegal-macro-use.stderr +++ b/tests/ui/attributes/illegal-macro-use.stderr @@ -1,22 +1,22 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `macro_escape` +error[E0433]: cannot find module or crate `macro_escape` in this scope --> $DIR/illegal-macro-use.rs:12:3 | LL | #[macro_escape::a::b] | ^^^^^^^^^^^^ use of unresolved module or unlinked crate `macro_escape` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `macro_escape` +error[E0433]: cannot find module or crate `macro_escape` in this scope --> $DIR/illegal-macro-use.rs:9:3 | LL | #[macro_escape::a] | ^^^^^^^^^^^^ use of unresolved module or unlinked crate `macro_escape` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `macro_use` +error[E0433]: cannot find module or crate `macro_use` in this scope --> $DIR/illegal-macro-use.rs:6:3 | LL | #[macro_use::a::b] | ^^^^^^^^^ use of unresolved module or unlinked crate `macro_use` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `macro_use` +error[E0433]: cannot find module or crate `macro_use` in this scope --> $DIR/illegal-macro-use.rs:3:3 | LL | #[macro_use::a] diff --git a/tests/ui/attributes/use-doc-alias-name.rs b/tests/ui/attributes/use-doc-alias-name.rs index 1fc9199b6e38..4d27249b89a7 100644 --- a/tests/ui/attributes/use-doc-alias-name.rs +++ b/tests/ui/attributes/use-doc-alias-name.rs @@ -42,7 +42,7 @@ fn main() { //~| HELP: `S5` has a name defined in the doc alias attribute as `DocAliasS5` not_exist_module::DocAliasS1; - //~^ ERROR: use of unresolved module or unlinked crate `not_exist_module` + //~^ ERROR: cannot find module or crate `not_exist_module` //~| HELP: you might be missing a crate named `not_exist_module` use_doc_alias_name_extern::DocAliasS1; @@ -50,7 +50,7 @@ fn main() { //~| HELP: `S1` has a name defined in the doc alias attribute as `DocAliasS1` m::n::DocAliasX::y::S6; - //~^ ERROR: could not find `DocAliasX` in `n` + //~^ ERROR: cannot find `DocAliasX` in `n` //~| HELP: `x` has a name defined in the doc alias attribute as `DocAliasX` m::n::x::y::DocAliasS6; diff --git a/tests/ui/attributes/use-doc-alias-name.stderr b/tests/ui/attributes/use-doc-alias-name.stderr index 07f4865e4152..3b4a0a919b17 100644 --- a/tests/ui/attributes/use-doc-alias-name.stderr +++ b/tests/ui/attributes/use-doc-alias-name.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: could not find `DocAliasX` in `n` +error[E0433]: cannot find `DocAliasX` in `n` --> $DIR/use-doc-alias-name.rs:52:11 | LL | m::n::DocAliasX::y::S6; @@ -136,7 +136,7 @@ LL - doc_alias_f2(); LL + f(); | -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `not_exist_module` +error[E0433]: cannot find module or crate `not_exist_module` in this scope --> $DIR/use-doc-alias-name.rs:44:5 | LL | not_exist_module::DocAliasS1; diff --git a/tests/ui/borrowck/non-ADT-struct-pattern-box-pattern-ice-121463.rs b/tests/ui/borrowck/non-ADT-struct-pattern-box-pattern-ice-121463.rs index cf927e34fb41..48466af50481 100644 --- a/tests/ui/borrowck/non-ADT-struct-pattern-box-pattern-ice-121463.rs +++ b/tests/ui/borrowck/non-ADT-struct-pattern-box-pattern-ice-121463.rs @@ -4,9 +4,9 @@ fn main() { let mut a = E::StructVar { boxed: Box::new(5_i32) }; - //~^ ERROR failed to resolve: use of undeclared type `E` + //~^ ERROR cannot find type `E` match a { E::StructVar { box boxed } => { } - //~^ ERROR failed to resolve: use of undeclared type `E` + //~^ ERROR cannot find type `E` } } diff --git a/tests/ui/borrowck/non-ADT-struct-pattern-box-pattern-ice-121463.stderr b/tests/ui/borrowck/non-ADT-struct-pattern-box-pattern-ice-121463.stderr index ae5c67eae9a6..7be9ed27db0e 100644 --- a/tests/ui/borrowck/non-ADT-struct-pattern-box-pattern-ice-121463.stderr +++ b/tests/ui/borrowck/non-ADT-struct-pattern-box-pattern-ice-121463.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of undeclared type `E` +error[E0433]: cannot find type `E` in this scope --> $DIR/non-ADT-struct-pattern-box-pattern-ice-121463.rs:6:17 | LL | let mut a = E::StructVar { boxed: Box::new(5_i32) }; @@ -9,7 +9,7 @@ help: a trait with a similar name exists LL | let mut a = Eq::StructVar { boxed: Box::new(5_i32) }; | + -error[E0433]: failed to resolve: use of undeclared type `E` +error[E0433]: cannot find type `E` in this scope --> $DIR/non-ADT-struct-pattern-box-pattern-ice-121463.rs:9:9 | LL | E::StructVar { box boxed } => { } diff --git a/tests/ui/cfg/diagnostics-cross-crate.rs b/tests/ui/cfg/diagnostics-cross-crate.rs index f959332c817f..c5d8dcdc62f0 100644 --- a/tests/ui/cfg/diagnostics-cross-crate.rs +++ b/tests/ui/cfg/diagnostics-cross-crate.rs @@ -14,7 +14,7 @@ fn main() { // The module isn't found - we would like to get a diagnostic, but currently don't due to // the awkward way the resolver diagnostics are currently implemented. - cfged_out::inner::doesnt_exist::hello(); //~ ERROR failed to resolve + cfged_out::inner::doesnt_exist::hello(); //~ ERROR cannot find //~^ NOTE could not find `doesnt_exist` in `inner` //~| NOTE found an item that was configured out diff --git a/tests/ui/cfg/diagnostics-cross-crate.stderr b/tests/ui/cfg/diagnostics-cross-crate.stderr index 658e5a442bda..15e60cc43a3c 100644 --- a/tests/ui/cfg/diagnostics-cross-crate.stderr +++ b/tests/ui/cfg/diagnostics-cross-crate.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: could not find `doesnt_exist` in `inner` +error[E0433]: cannot find `doesnt_exist` in `inner` --> $DIR/diagnostics-cross-crate.rs:17:23 | LL | cfged_out::inner::doesnt_exist::hello(); diff --git a/tests/ui/cfg/diagnostics-reexport-2.rs b/tests/ui/cfg/diagnostics-reexport-2.rs index f66b9ed99ee6..bef832517061 100644 --- a/tests/ui/cfg/diagnostics-reexport-2.rs +++ b/tests/ui/cfg/diagnostics-reexport-2.rs @@ -40,22 +40,22 @@ mod reexport32 { fn main() { reexport::gated::foo(); - //~^ ERROR failed to resolve: could not find `gated` in `reexport` + //~^ ERROR cannot find //~| NOTE could not find `gated` in `reexport` reexport2::gated::foo(); - //~^ ERROR failed to resolve: could not find `gated` in `reexport2` + //~^ ERROR cannot find //~| NOTE could not find `gated` in `reexport2` reexport30::gated::foo(); - //~^ ERROR failed to resolve: could not find `gated` in `reexport30` + //~^ ERROR cannot find //~| NOTE could not find `gated` in `reexport30` reexport31::gated::foo(); - //~^ ERROR failed to resolve: could not find `gated` in `reexport31` + //~^ ERROR cannot find //~| NOTE could not find `gated` in `reexport31` reexport32::gated::foo(); - //~^ ERROR failed to resolve: could not find `gated` in `reexport32` + //~^ ERROR cannot find //~| NOTE could not find `gated` in `reexport32` } diff --git a/tests/ui/cfg/diagnostics-reexport-2.stderr b/tests/ui/cfg/diagnostics-reexport-2.stderr index 713cffce65b6..a79c623856ff 100644 --- a/tests/ui/cfg/diagnostics-reexport-2.stderr +++ b/tests/ui/cfg/diagnostics-reexport-2.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: could not find `gated` in `reexport` +error[E0433]: cannot find `gated` in `reexport` --> $DIR/diagnostics-reexport-2.rs:42:15 | LL | reexport::gated::foo(); @@ -13,7 +13,7 @@ LL | #[cfg(false)] LL | pub mod gated { | ^^^^^ -error[E0433]: failed to resolve: could not find `gated` in `reexport2` +error[E0433]: cannot find `gated` in `reexport2` --> $DIR/diagnostics-reexport-2.rs:46:16 | LL | reexport2::gated::foo(); @@ -28,7 +28,7 @@ LL | #[cfg(false)] LL | pub mod gated { | ^^^^^ -error[E0433]: failed to resolve: could not find `gated` in `reexport30` +error[E0433]: cannot find `gated` in `reexport30` --> $DIR/diagnostics-reexport-2.rs:50:17 | LL | reexport30::gated::foo(); @@ -43,7 +43,7 @@ LL | #[cfg(false)] LL | pub mod gated { | ^^^^^ -error[E0433]: failed to resolve: could not find `gated` in `reexport31` +error[E0433]: cannot find `gated` in `reexport31` --> $DIR/diagnostics-reexport-2.rs:54:17 | LL | reexport31::gated::foo(); @@ -58,7 +58,7 @@ LL | #[cfg(false)] LL | pub mod gated { | ^^^^^ -error[E0433]: failed to resolve: could not find `gated` in `reexport32` +error[E0433]: cannot find `gated` in `reexport32` --> $DIR/diagnostics-reexport-2.rs:58:17 | LL | reexport32::gated::foo(); diff --git a/tests/ui/cfg/diagnostics-same-crate.rs b/tests/ui/cfg/diagnostics-same-crate.rs index 29209d5f3eaa..40babaa3d4c9 100644 --- a/tests/ui/cfg/diagnostics-same-crate.rs +++ b/tests/ui/cfg/diagnostics-same-crate.rs @@ -50,7 +50,7 @@ fn main() { //~| NOTE not found in `inner` // The module isn't found - we get a diagnostic. - inner::doesnt_exist::hello(); //~ ERROR failed to resolve + inner::doesnt_exist::hello(); //~ ERROR cannot find //~| NOTE could not find `doesnt_exist` in `inner` // It should find the one in the right module, not the wrong one. diff --git a/tests/ui/cfg/diagnostics-same-crate.stderr b/tests/ui/cfg/diagnostics-same-crate.stderr index a8d789e61d1a..c20542e19eaf 100644 --- a/tests/ui/cfg/diagnostics-same-crate.stderr +++ b/tests/ui/cfg/diagnostics-same-crate.stderr @@ -28,7 +28,7 @@ LL | #[cfg(false)] LL | pub mod doesnt_exist { | ^^^^^^^^^^^^ -error[E0433]: failed to resolve: could not find `doesnt_exist` in `inner` +error[E0433]: cannot find `doesnt_exist` in `inner` --> $DIR/diagnostics-same-crate.rs:53:12 | LL | inner::doesnt_exist::hello(); diff --git a/tests/ui/coherence/conflicting-impl-with-err.rs b/tests/ui/coherence/conflicting-impl-with-err.rs index 3e0234b874d7..49219b4c4a35 100644 --- a/tests/ui/coherence/conflicting-impl-with-err.rs +++ b/tests/ui/coherence/conflicting-impl-with-err.rs @@ -1,8 +1,8 @@ struct ErrorKind; struct Error(ErrorKind); -impl From for Error { //~ ERROR failed to resolve - fn from(_: nope::Thing) -> Self { //~ ERROR failed to resolve +impl From for Error { //~ ERROR cannot find + fn from(_: nope::Thing) -> Self { //~ ERROR cannot find unimplemented!() } } diff --git a/tests/ui/coherence/conflicting-impl-with-err.stderr b/tests/ui/coherence/conflicting-impl-with-err.stderr index 75a201797b55..706798bb0000 100644 --- a/tests/ui/coherence/conflicting-impl-with-err.stderr +++ b/tests/ui/coherence/conflicting-impl-with-err.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nope` +error[E0433]: cannot find module or crate `nope` in this scope --> $DIR/conflicting-impl-with-err.rs:4:11 | LL | impl From for Error { @@ -6,7 +6,7 @@ LL | impl From for Error { | = help: you might be missing a crate named `nope` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nope` +error[E0433]: cannot find module or crate `nope` in this scope --> $DIR/conflicting-impl-with-err.rs:5:16 | LL | fn from(_: nope::Thing) -> Self { diff --git a/tests/ui/const-generics/generic_const_exprs/ice-predicates-of-no-entry-found-for-key-119275.rs b/tests/ui/const-generics/generic_const_exprs/ice-predicates-of-no-entry-found-for-key-119275.rs index 9f20cf085794..c08d36f4d9ff 100644 --- a/tests/ui/const-generics/generic_const_exprs/ice-predicates-of-no-entry-found-for-key-119275.rs +++ b/tests/ui/const-generics/generic_const_exprs/ice-predicates-of-no-entry-found-for-key-119275.rs @@ -11,7 +11,7 @@ where //~^ ERROR only lifetime parameters can be used in this context //~| ERROR defaults for generic parameters are not allowed in `for<...>` binders //~| ERROR defaults for generic parameters are not allowed in `for<...>` binders - //~| ERROR failed to resolve: use of undeclared type `COT` + //~| ERROR cannot find //~| ERROR the name `N` is already used for a generic parameter in this item's generic parameters { } diff --git a/tests/ui/const-generics/generic_const_exprs/ice-predicates-of-no-entry-found-for-key-119275.stderr b/tests/ui/const-generics/generic_const_exprs/ice-predicates-of-no-entry-found-for-key-119275.stderr index 8e9b5b03d14e..de81c021b829 100644 --- a/tests/ui/const-generics/generic_const_exprs/ice-predicates-of-no-entry-found-for-key-119275.stderr +++ b/tests/ui/const-generics/generic_const_exprs/ice-predicates-of-no-entry-found-for-key-119275.stderr @@ -43,7 +43,7 @@ error: defaults for generic parameters are not allowed in `for<...>` binders LL | for [(); COT::BYTES]:, | ^^^^^^^ -error[E0433]: failed to resolve: use of undeclared type `COT` +error[E0433]: cannot find type `COT` in this scope --> $DIR/ice-predicates-of-no-entry-found-for-key-119275.rs:10:43 | LL | for [(); COT::BYTES]:, diff --git a/tests/ui/const-generics/issues/issue-82956.rs b/tests/ui/const-generics/issues/issue-82956.rs index 983717170c34..8586c39a717a 100644 --- a/tests/ui/const-generics/issues/issue-82956.rs +++ b/tests/ui/const-generics/issues/issue-82956.rs @@ -24,7 +24,7 @@ where fn pop(self) -> (Self::Newlen, Self::Output) { let mut iter = IntoIter::new(self); - //~^ ERROR: failed to resolve: use of undeclared type `IntoIter` + //~^ ERROR: cannot find let end = iter.next_back().unwrap(); let new = [(); N - 1].map(move |()| iter.next().unwrap()); (new, end) diff --git a/tests/ui/const-generics/issues/issue-82956.stderr b/tests/ui/const-generics/issues/issue-82956.stderr index beb801496115..a3d5572d5474 100644 --- a/tests/ui/const-generics/issues/issue-82956.stderr +++ b/tests/ui/const-generics/issues/issue-82956.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of undeclared type `IntoIter` +error[E0433]: cannot find type `IntoIter` in this scope --> $DIR/issue-82956.rs:26:24 | LL | let mut iter = IntoIter::new(self); diff --git a/tests/ui/consts/const_refs_to_static-ice-121413.rs b/tests/ui/consts/const_refs_to_static-ice-121413.rs index cc368d971c05..27d5d8600b4b 100644 --- a/tests/ui/consts/const_refs_to_static-ice-121413.rs +++ b/tests/ui/consts/const_refs_to_static-ice-121413.rs @@ -7,7 +7,7 @@ const REF_INTERIOR_MUT: &usize = { //~^ HELP consider importing this struct static FOO: Sync = AtomicUsize::new(0); - //~^ ERROR failed to resolve: use of undeclared type `AtomicUsize` + //~^ ERROR cannot find //~| WARN trait objects without an explicit `dyn` are deprecated //~| ERROR the size for values of type `(dyn Sync + 'static)` cannot be known at compilation time //~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! diff --git a/tests/ui/consts/const_refs_to_static-ice-121413.stderr b/tests/ui/consts/const_refs_to_static-ice-121413.stderr index 89429d83b205..150b8cb079e7 100644 --- a/tests/ui/consts/const_refs_to_static-ice-121413.stderr +++ b/tests/ui/consts/const_refs_to_static-ice-121413.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of undeclared type `AtomicUsize` +error[E0433]: cannot find type `AtomicUsize` in this scope --> $DIR/const_refs_to_static-ice-121413.rs:9:24 | LL | static FOO: Sync = AtomicUsize::new(0); diff --git a/tests/ui/delegation/bad-resolve.rs b/tests/ui/delegation/bad-resolve.rs index 861f2b15da20..79acaec021a6 100644 --- a/tests/ui/delegation/bad-resolve.rs +++ b/tests/ui/delegation/bad-resolve.rs @@ -40,7 +40,7 @@ impl Trait for S { } mod prefix {} -reuse unresolved_prefix::{a, b, c}; //~ ERROR use of unresolved module or unlinked crate +reuse unresolved_prefix::{a, b, c}; //~ ERROR cannot find module or crate `unresolved_prefix` reuse prefix::{self, super, crate}; //~ ERROR `crate` in paths can only be used in start position fn main() {} diff --git a/tests/ui/delegation/bad-resolve.stderr b/tests/ui/delegation/bad-resolve.stderr index 4c015c226b18..6fde0bb13877 100644 --- a/tests/ui/delegation/bad-resolve.stderr +++ b/tests/ui/delegation/bad-resolve.stderr @@ -91,7 +91,7 @@ LL | type Type; LL | impl Trait for S { | ^^^^^^^^^^^^^^^^ missing `Type` in implementation -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `unresolved_prefix` +error[E0433]: cannot find module or crate `unresolved_prefix` in this scope --> $DIR/bad-resolve.rs:43:7 | LL | reuse unresolved_prefix::{a, b, c}; @@ -99,11 +99,11 @@ LL | reuse unresolved_prefix::{a, b, c}; | = help: you might be missing a crate named `unresolved_prefix` -error[E0433]: failed to resolve: `crate` in paths can only be used in start position +error[E0433]: `crate` in paths can only be used in start position --> $DIR/bad-resolve.rs:44:29 | LL | reuse prefix::{self, super, crate}; - | ^^^^^ `crate` in paths can only be used in start position + | ^^^^^ can only be used in path start position error: aborting due to 12 previous errors diff --git a/tests/ui/delegation/glob-bad-path.rs b/tests/ui/delegation/glob-bad-path.rs index 4ac9d68e8dd1..067cb651777e 100644 --- a/tests/ui/delegation/glob-bad-path.rs +++ b/tests/ui/delegation/glob-bad-path.rs @@ -5,7 +5,7 @@ trait Trait {} struct S; impl Trait for u8 { - reuse unresolved::*; //~ ERROR failed to resolve: use of unresolved module or unlinked crate `unresolved` + reuse unresolved::*; //~ ERROR cannot find module or crate `unresolved` reuse S::*; //~ ERROR expected trait, found struct `S` } diff --git a/tests/ui/delegation/glob-bad-path.stderr b/tests/ui/delegation/glob-bad-path.stderr index 15d9ca412033..7e92bc045bbd 100644 --- a/tests/ui/delegation/glob-bad-path.stderr +++ b/tests/ui/delegation/glob-bad-path.stderr @@ -4,7 +4,7 @@ error: expected trait, found struct `S` LL | reuse S::*; | ^ not a trait -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `unresolved` +error[E0433]: cannot find module or crate `unresolved` in this scope --> $DIR/glob-bad-path.rs:8:11 | LL | reuse unresolved::*; diff --git a/tests/ui/delegation/impl-reuse-bad-path.rs b/tests/ui/delegation/impl-reuse-bad-path.rs index 19eb51153468..656be5d79d9b 100644 --- a/tests/ui/delegation/impl-reuse-bad-path.rs +++ b/tests/ui/delegation/impl-reuse-bad-path.rs @@ -4,7 +4,7 @@ mod unresolved { struct S; reuse impl unresolved for S { self.0 } - //~^ ERROR failed to resolve: use of unresolved module or unlinked crate `unresolved` + //~^ ERROR cannot find module or crate `unresolved` in this scope //~| ERROR cannot find trait `unresolved` in this scope trait T {} diff --git a/tests/ui/delegation/impl-reuse-bad-path.stderr b/tests/ui/delegation/impl-reuse-bad-path.stderr index 5fadd719ae4d..bf486260c669 100644 --- a/tests/ui/delegation/impl-reuse-bad-path.stderr +++ b/tests/ui/delegation/impl-reuse-bad-path.stderr @@ -16,7 +16,7 @@ error: expected trait, found module `TraitModule` LL | reuse impl TraitModule for S { self.0 } | ^^^^^^^^^^^ not a trait -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `unresolved` +error[E0433]: cannot find module or crate `unresolved` in this scope --> $DIR/impl-reuse-bad-path.rs:6:16 | LL | reuse impl unresolved for S { self.0 } diff --git a/tests/ui/derived-errors/issue-31997-1.stderr b/tests/ui/derived-errors/issue-31997-1.stderr index 40485027a660..2fb830ac41fc 100644 --- a/tests/ui/derived-errors/issue-31997-1.stderr +++ b/tests/ui/derived-errors/issue-31997-1.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of undeclared type `HashMap` +error[E0433]: cannot find type `HashMap` in this scope --> $DIR/issue-31997-1.rs:20:19 | LL | let mut map = HashMap::new(); diff --git a/tests/ui/dollar-crate/dollar-crate-is-keyword-2.rs b/tests/ui/dollar-crate/dollar-crate-is-keyword-2.rs index bbab6f877487..b007425bd375 100644 --- a/tests/ui/dollar-crate/dollar-crate-is-keyword-2.rs +++ b/tests/ui/dollar-crate/dollar-crate-is-keyword-2.rs @@ -2,12 +2,18 @@ mod a {} macro_rules! m { () => { - use a::$crate; //~ ERROR unresolved import `a::$crate` - use a::$crate::b; //~ ERROR `$crate` in paths can only be used in start position - type A = a::$crate; //~ ERROR `$crate` in paths can only be used in start position + use a::$crate; //~ ERROR: unresolved import `a::$crate` + //~^ NOTE: no `$crate` in `a` + use a::$crate::b; //~ ERROR: `$crate` in paths can only be used in start position + //~^ NOTE: can only be used in path start position + type A = a::$crate; //~ ERROR: `$crate` in paths can only be used in start position + //~^ NOTE: can only be used in path start position } } m!(); +//~^ NOTE: in this expansion +//~| NOTE: in this expansion +//~| NOTE: in this expansion fn main() {} diff --git a/tests/ui/dollar-crate/dollar-crate-is-keyword-2.stderr b/tests/ui/dollar-crate/dollar-crate-is-keyword-2.stderr index d46029710d6f..fc49e4c3dc3d 100644 --- a/tests/ui/dollar-crate/dollar-crate-is-keyword-2.stderr +++ b/tests/ui/dollar-crate/dollar-crate-is-keyword-2.stderr @@ -1,8 +1,8 @@ -error[E0433]: failed to resolve: `$crate` in paths can only be used in start position - --> $DIR/dollar-crate-is-keyword-2.rs:6:16 +error[E0433]: `$crate` in paths can only be used in start position + --> $DIR/dollar-crate-is-keyword-2.rs:7:16 | LL | use a::$crate::b; - | ^^^^^^ `$crate` in paths can only be used in start position + | ^^^^^^ can only be used in path start position ... LL | m!(); | ---- in this macro invocation @@ -20,11 +20,11 @@ LL | m!(); | = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0433]: failed to resolve: `$crate` in paths can only be used in start position - --> $DIR/dollar-crate-is-keyword-2.rs:7:21 +error[E0433]: `$crate` in paths can only be used in start position + --> $DIR/dollar-crate-is-keyword-2.rs:9:21 | LL | type A = a::$crate; - | ^^^^^^ `$crate` in paths can only be used in start position + | ^^^^^^ can only be used in path start position ... LL | m!(); | ---- in this macro invocation diff --git a/tests/ui/eii/privacy2.rs b/tests/ui/eii/privacy2.rs index e3f1f8c863da..c11061f311ed 100644 --- a/tests/ui/eii/privacy2.rs +++ b/tests/ui/eii/privacy2.rs @@ -13,7 +13,7 @@ fn eii1_impl(x: u64) { println!("{x:?}") } -#[codegen::eii3] //~ ERROR failed to resolve: could not find `eii3` in `codegen` +#[codegen::eii3] //~ ERROR cannot find `eii3` in `codegen` fn eii3_impl(x: u64) { println!("{x:?}") } diff --git a/tests/ui/eii/privacy2.stderr b/tests/ui/eii/privacy2.stderr index 9f4fd6a071c9..f0a04bf63561 100644 --- a/tests/ui/eii/privacy2.stderr +++ b/tests/ui/eii/privacy2.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: could not find `eii3` in `codegen` +error[E0433]: cannot find `eii3` in `codegen` --> $DIR/privacy2.rs:16:12 | LL | #[codegen::eii3] diff --git a/tests/ui/enum/assoc-fn-call-on-variant.rs b/tests/ui/enum/assoc-fn-call-on-variant.rs index 0886e7dcd8d8..c85d00eb0de8 100644 --- a/tests/ui/enum/assoc-fn-call-on-variant.rs +++ b/tests/ui/enum/assoc-fn-call-on-variant.rs @@ -12,5 +12,6 @@ impl E { } fn main() { - E::A::f(); //~ ERROR failed to resolve: `A` is a variant, not a module + E::A::f(); //~ ERROR cannot find module `A` in `E` + //~^ NOTE: `A` is a variant, not a module } diff --git a/tests/ui/enum/assoc-fn-call-on-variant.stderr b/tests/ui/enum/assoc-fn-call-on-variant.stderr index ee75870ad394..ab7049e22f4b 100644 --- a/tests/ui/enum/assoc-fn-call-on-variant.stderr +++ b/tests/ui/enum/assoc-fn-call-on-variant.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: `A` is a variant, not a module +error[E0433]: cannot find module `A` in `E` --> $DIR/assoc-fn-call-on-variant.rs:15:8 | LL | E::A::f(); diff --git a/tests/ui/error-codes/E0433.stderr b/tests/ui/error-codes/E0433.stderr index 1ac8c3ebc4d4..e1e09045e0dc 100644 --- a/tests/ui/error-codes/E0433.stderr +++ b/tests/ui/error-codes/E0433.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of undeclared type `NonExistingMap` +error[E0433]: cannot find type `NonExistingMap` in this scope --> $DIR/E0433.rs:2:15 | LL | let map = NonExistingMap::new(); diff --git a/tests/ui/extern-flag/multiple-opts.rs b/tests/ui/extern-flag/multiple-opts.rs index 091064a070c3..5ba9ff96ac35 100644 --- a/tests/ui/extern-flag/multiple-opts.rs +++ b/tests/ui/extern-flag/multiple-opts.rs @@ -16,5 +16,5 @@ pub mod m { } fn main() { - somedep::somefun(); //~ ERROR failed to resolve + somedep::somefun(); //~ ERROR cannot find } diff --git a/tests/ui/extern-flag/multiple-opts.stderr b/tests/ui/extern-flag/multiple-opts.stderr index d0f38bad94c6..698565626e3a 100644 --- a/tests/ui/extern-flag/multiple-opts.stderr +++ b/tests/ui/extern-flag/multiple-opts.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `somedep` +error[E0433]: cannot find module or crate `somedep` in this scope --> $DIR/multiple-opts.rs:19:5 | LL | somedep::somefun(); diff --git a/tests/ui/extern-flag/noprelude.rs b/tests/ui/extern-flag/noprelude.rs index 4af617a1d628..12425f3fb8d9 100644 --- a/tests/ui/extern-flag/noprelude.rs +++ b/tests/ui/extern-flag/noprelude.rs @@ -3,5 +3,5 @@ //@ edition:2018 fn main() { - somedep::somefun(); //~ ERROR failed to resolve + somedep::somefun(); //~ ERROR cannot find } diff --git a/tests/ui/extern-flag/noprelude.stderr b/tests/ui/extern-flag/noprelude.stderr index fbd84956f66d..4d8553085ae8 100644 --- a/tests/ui/extern-flag/noprelude.stderr +++ b/tests/ui/extern-flag/noprelude.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `somedep` +error[E0433]: cannot find module or crate `somedep` in this scope --> $DIR/noprelude.rs:6:5 | LL | somedep::somefun(); diff --git a/tests/ui/extern/extern-macro.rs b/tests/ui/extern/extern-macro.rs index ab974e628ff1..cfb4f76f59c7 100644 --- a/tests/ui/extern/extern-macro.rs +++ b/tests/ui/extern/extern-macro.rs @@ -2,5 +2,5 @@ fn main() { enum Foo {} - let _ = Foo::bar!(); //~ ERROR failed to resolve: partially resolved path in a macro + let _ = Foo::bar!(); //~ ERROR cannot find macro `bar` in enum `Foo` } diff --git a/tests/ui/extern/extern-macro.stderr b/tests/ui/extern/extern-macro.stderr index e4d767f0e864..83628846de77 100644 --- a/tests/ui/extern/extern-macro.stderr +++ b/tests/ui/extern/extern-macro.stderr @@ -1,8 +1,8 @@ -error[E0433]: failed to resolve: partially resolved path in a macro +error[E0433]: cannot find macro `bar` in enum `Foo` --> $DIR/extern-macro.rs:5:13 | LL | let _ = Foo::bar!(); - | ^^^^^^^^ partially resolved path in a macro + | ^^^^^^^^ a macro can't exist within an enum error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-extern_absolute_paths.rs b/tests/ui/feature-gates/feature-gate-extern_absolute_paths.rs index e52a2140e86d..ea51ae0edca5 100644 --- a/tests/ui/feature-gates/feature-gate-extern_absolute_paths.rs +++ b/tests/ui/feature-gates/feature-gate-extern_absolute_paths.rs @@ -2,5 +2,5 @@ use core::default; //~ ERROR unresolved import `core` fn main() { - let _: u8 = ::core::default::Default(); //~ ERROR failed to resolve + let _: u8 = ::core::default::Default(); //~ ERROR cannot find } diff --git a/tests/ui/feature-gates/feature-gate-extern_absolute_paths.stderr b/tests/ui/feature-gates/feature-gate-extern_absolute_paths.stderr index dd78501de718..4f073e4fe228 100644 --- a/tests/ui/feature-gates/feature-gate-extern_absolute_paths.stderr +++ b/tests/ui/feature-gates/feature-gate-extern_absolute_paths.stderr @@ -7,7 +7,7 @@ LL | use core::default; | you might be missing crate `core` | help: try using `std` instead of `core`: `std` -error[E0433]: failed to resolve: you might be missing crate `core` +error[E0433]: cannot find `core` in the crate root --> $DIR/feature-gate-extern_absolute_paths.rs:5:19 | LL | let _: u8 = ::core::default::Default(); diff --git a/tests/ui/foreign/stashed-issue-121451.rs b/tests/ui/foreign/stashed-issue-121451.rs index 77a736739bfa..f71e9dd8cc4e 100644 --- a/tests/ui/foreign/stashed-issue-121451.rs +++ b/tests/ui/foreign/stashed-issue-121451.rs @@ -1,4 +1,4 @@ extern "C" fn _f() -> libc::uintptr_t {} -//~^ ERROR failed to resolve +//~^ ERROR cannot find fn main() {} diff --git a/tests/ui/foreign/stashed-issue-121451.stderr b/tests/ui/foreign/stashed-issue-121451.stderr index 31dd3b4fb5e8..8a84d5e918ee 100644 --- a/tests/ui/foreign/stashed-issue-121451.stderr +++ b/tests/ui/foreign/stashed-issue-121451.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `libc` +error[E0433]: cannot find module or crate `libc` in this scope --> $DIR/stashed-issue-121451.rs:1:23 | LL | extern "C" fn _f() -> libc::uintptr_t {} diff --git a/tests/ui/generic-associated-types/equality-bound.rs b/tests/ui/generic-associated-types/equality-bound.rs index be05181f5d09..c136a6d4bdf2 100644 --- a/tests/ui/generic-associated-types/equality-bound.rs +++ b/tests/ui/generic-associated-types/equality-bound.rs @@ -8,7 +8,7 @@ fn sum2(i: I) -> i32 where I::Item = i32 { } fn sum3(i: J) -> i32 where I::Item = i32 { //~^ ERROR equality constraints are not yet supported in `where` clauses -//~| ERROR failed to resolve: use of undeclared type `I` +//~| ERROR cannot find type `I` panic!() } diff --git a/tests/ui/generic-associated-types/equality-bound.stderr b/tests/ui/generic-associated-types/equality-bound.stderr index 265c86ac5bb6..0ceb5e329ab3 100644 --- a/tests/ui/generic-associated-types/equality-bound.stderr +++ b/tests/ui/generic-associated-types/equality-bound.stderr @@ -200,7 +200,7 @@ LL - fn from_iter(_: T) -> Self where T::Item = A, T: IntoIterator, LL + fn from_iter(_: T) -> Self where T::Item = K, T: IntoIterator, | -error[E0433]: failed to resolve: use of undeclared type `I` +error[E0433]: cannot find type `I` in this scope --> $DIR/equality-bound.rs:9:41 | LL | fn sum3(i: J) -> i32 where I::Item = i32 { diff --git a/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.rs b/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.rs index 71c33674b37f..60355c22bb30 100644 --- a/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.rs +++ b/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.rs @@ -10,7 +10,7 @@ macro a() { mod u { // Late resolution. fn f() { my_core::mem::drop(0); } - //~^ ERROR failed to resolve: use of unresolved module or unlinked crate `my_core` + //~^ ERROR cannot find } } @@ -23,7 +23,7 @@ mod v { mod u { // Late resolution. fn f() { my_core::mem::drop(0); } - //~^ ERROR failed to resolve: use of unresolved module or unlinked crate `my_core` + //~^ ERROR cannot find } fn main() {} diff --git a/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.stderr b/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.stderr index 87ef07c27f5b..db1a56d7d816 100644 --- a/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.stderr +++ b/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.stderr @@ -15,7 +15,7 @@ LL | a!(); | = note: this error originates in the macro `a` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `my_core` +error[E0433]: cannot find module or crate `my_core` in this scope --> $DIR/extern-prelude-from-opaque-fail-2018.rs:12:18 | LL | fn f() { my_core::mem::drop(0); } @@ -29,7 +29,7 @@ LL | a!(); std::mem = note: this error originates in the macro `a` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `my_core` +error[E0433]: cannot find module or crate `my_core` in this scope --> $DIR/extern-prelude-from-opaque-fail-2018.rs:25:14 | LL | fn f() { my_core::mem::drop(0); } diff --git a/tests/ui/hygiene/extern-prelude-from-opaque-fail.rs b/tests/ui/hygiene/extern-prelude-from-opaque-fail.rs index 8265b73cc565..8f75ba1434a1 100644 --- a/tests/ui/hygiene/extern-prelude-from-opaque-fail.rs +++ b/tests/ui/hygiene/extern-prelude-from-opaque-fail.rs @@ -10,7 +10,7 @@ macro a() { mod u { // Late resolution. fn f() { my_core::mem::drop(0); } - //~^ ERROR failed to resolve: use of unresolved module or unlinked crate `my_core` + //~^ ERROR cannot find } } @@ -23,7 +23,7 @@ mod v { mod u { // Late resolution. fn f() { my_core::mem::drop(0); } - //~^ ERROR failed to resolve: use of unresolved module or unlinked crate `my_core` + //~^ ERROR cannot find } fn main() {} diff --git a/tests/ui/hygiene/extern-prelude-from-opaque-fail.stderr b/tests/ui/hygiene/extern-prelude-from-opaque-fail.stderr index d36bc9130953..f3a43fa0127c 100644 --- a/tests/ui/hygiene/extern-prelude-from-opaque-fail.stderr +++ b/tests/ui/hygiene/extern-prelude-from-opaque-fail.stderr @@ -15,7 +15,7 @@ LL | a!(); | = note: this error originates in the macro `a` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `my_core` +error[E0433]: cannot find module or crate `my_core` in this scope --> $DIR/extern-prelude-from-opaque-fail.rs:12:18 | LL | fn f() { my_core::mem::drop(0); } @@ -29,7 +29,7 @@ LL | a!(); my_core::mem = note: this error originates in the macro `a` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `my_core` +error[E0433]: cannot find module or crate `my_core` in this scope --> $DIR/extern-prelude-from-opaque-fail.rs:25:14 | LL | fn f() { my_core::mem::drop(0); } diff --git a/tests/ui/hygiene/no_implicit_prelude.rs b/tests/ui/hygiene/no_implicit_prelude.rs index 8145212fe309..bfe7a6a44614 100644 --- a/tests/ui/hygiene/no_implicit_prelude.rs +++ b/tests/ui/hygiene/no_implicit_prelude.rs @@ -9,7 +9,7 @@ mod foo { #[no_implicit_prelude] mod bar { pub macro m() { - Vec::new(); //~ ERROR failed to resolve + Vec::new(); //~ ERROR cannot find ().clone() //~ ERROR no method named `clone` found } fn f() { diff --git a/tests/ui/hygiene/no_implicit_prelude.stderr b/tests/ui/hygiene/no_implicit_prelude.stderr index 0606fe501386..5461ee527b88 100644 --- a/tests/ui/hygiene/no_implicit_prelude.stderr +++ b/tests/ui/hygiene/no_implicit_prelude.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of undeclared type `Vec` +error[E0433]: cannot find type `Vec` in this scope --> $DIR/no_implicit_prelude.rs:12:9 | LL | fn f() { ::bar::m!(); } diff --git a/tests/ui/impl-trait/issues/issue-72911.rs b/tests/ui/impl-trait/issues/issue-72911.rs index 63f4898f4306..b105860ba651 100644 --- a/tests/ui/impl-trait/issues/issue-72911.rs +++ b/tests/ui/impl-trait/issues/issue-72911.rs @@ -9,12 +9,12 @@ pub fn gather_all() -> impl Iterator { } fn gather_from_file(dir_entry: &foo::MissingItem) -> impl Iterator { - //~^ ERROR: failed to resolve + //~^ ERROR: cannot find unimplemented!() } fn lint_files() -> impl Iterator { - //~^ ERROR: failed to resolve + //~^ ERROR: cannot find unimplemented!() } diff --git a/tests/ui/impl-trait/issues/issue-72911.stderr b/tests/ui/impl-trait/issues/issue-72911.stderr index 063b7f68dc02..1333f608ead1 100644 --- a/tests/ui/impl-trait/issues/issue-72911.stderr +++ b/tests/ui/impl-trait/issues/issue-72911.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `foo` +error[E0433]: cannot find module or crate `foo` in this scope --> $DIR/issue-72911.rs:11:33 | LL | fn gather_from_file(dir_entry: &foo::MissingItem) -> impl Iterator { @@ -6,7 +6,7 @@ LL | fn gather_from_file(dir_entry: &foo::MissingItem) -> impl Iterator $DIR/issue-72911.rs:16:41 | LL | fn lint_files() -> impl Iterator { diff --git a/tests/ui/impl-trait/stashed-diag-issue-121504.rs b/tests/ui/impl-trait/stashed-diag-issue-121504.rs index 84686ba4f7d3..ee2cd1ee816f 100644 --- a/tests/ui/impl-trait/stashed-diag-issue-121504.rs +++ b/tests/ui/impl-trait/stashed-diag-issue-121504.rs @@ -4,7 +4,7 @@ trait MyTrait { async fn foo(self) -> (Self, i32); } -impl MyTrait for xyz::T { //~ ERROR failed to resolve: use of unresolved module or unlinked crate `xyz` +impl MyTrait for xyz::T { //~ ERROR cannot find module or crate `xyz` async fn foo(self, key: i32) -> (u32, i32) { (self, key) } diff --git a/tests/ui/impl-trait/stashed-diag-issue-121504.stderr b/tests/ui/impl-trait/stashed-diag-issue-121504.stderr index 41c6cc425558..f973e6c9dc42 100644 --- a/tests/ui/impl-trait/stashed-diag-issue-121504.stderr +++ b/tests/ui/impl-trait/stashed-diag-issue-121504.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `xyz` +error[E0433]: cannot find module or crate `xyz` in this scope --> $DIR/stashed-diag-issue-121504.rs:7:18 | LL | impl MyTrait for xyz::T { diff --git a/tests/ui/imports/absolute-paths-in-nested-use-groups.rs b/tests/ui/imports/absolute-paths-in-nested-use-groups.rs index 96b5131674c7..9a8c9aab7282 100644 --- a/tests/ui/imports/absolute-paths-in-nested-use-groups.rs +++ b/tests/ui/imports/absolute-paths-in-nested-use-groups.rs @@ -3,9 +3,12 @@ mod foo {} use foo::{ - ::bar, //~ ERROR crate root in paths can only be used in start position - super::bar, //~ ERROR `super` in paths can only be used in start position - self::bar, //~ ERROR `self` in paths can only be used in start position + ::bar, + //~^ ERROR: crate root in paths can only be used in start position + super::bar, + //~^ ERROR: `super` in paths can only be used in start position + self::bar, + //~^ ERROR: `self` in paths can only be used in start position }; fn main() {} diff --git a/tests/ui/imports/absolute-paths-in-nested-use-groups.stderr b/tests/ui/imports/absolute-paths-in-nested-use-groups.stderr index e41590ac45ee..ff951ad7489c 100644 --- a/tests/ui/imports/absolute-paths-in-nested-use-groups.stderr +++ b/tests/ui/imports/absolute-paths-in-nested-use-groups.stderr @@ -1,20 +1,20 @@ -error[E0433]: failed to resolve: crate root in paths can only be used in start position +error[E0433]: the crate root in paths can only be used in start position --> $DIR/absolute-paths-in-nested-use-groups.rs:6:5 | LL | ::bar, - | ^ crate root in paths can only be used in start position + | ^ can only be used in path start position -error[E0433]: failed to resolve: `super` in paths can only be used in start position - --> $DIR/absolute-paths-in-nested-use-groups.rs:7:5 - | -LL | super::bar, - | ^^^^^ `super` in paths can only be used in start position - -error[E0433]: failed to resolve: `self` in paths can only be used in start position +error[E0433]: `super` in paths can only be used in start position --> $DIR/absolute-paths-in-nested-use-groups.rs:8:5 | +LL | super::bar, + | ^^^^^ can only be used in path start position + +error[E0433]: `self` in paths can only be used in start position + --> $DIR/absolute-paths-in-nested-use-groups.rs:10:5 + | LL | self::bar, - | ^^^^ `self` in paths can only be used in start position + | ^^^^ can only be used in path start position error: aborting due to 3 previous errors diff --git a/tests/ui/imports/extern-prelude-extern-crate-fail.rs b/tests/ui/imports/extern-prelude-extern-crate-fail.rs index 84751ecc02b6..7412706dcf39 100644 --- a/tests/ui/imports/extern-prelude-extern-crate-fail.rs +++ b/tests/ui/imports/extern-prelude-extern-crate-fail.rs @@ -7,7 +7,7 @@ mod n { mod m { fn check() { - two_macros::m!(); //~ ERROR failed to resolve: use of unresolved module or unlinked crate `two_macros` + two_macros::m!(); //~ ERROR cannot find } } diff --git a/tests/ui/imports/extern-prelude-extern-crate-fail.stderr b/tests/ui/imports/extern-prelude-extern-crate-fail.stderr index ec53730afa02..42735ff90c90 100644 --- a/tests/ui/imports/extern-prelude-extern-crate-fail.stderr +++ b/tests/ui/imports/extern-prelude-extern-crate-fail.stderr @@ -9,7 +9,7 @@ LL | define_std_as_non_existent!(); | = note: this error originates in the macro `define_std_as_non_existent` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `two_macros` +error[E0433]: cannot find module or crate `two_macros` in this scope --> $DIR/extern-prelude-extern-crate-fail.rs:10:9 | LL | two_macros::m!(); diff --git a/tests/ui/imports/nested-import-root-symbol-150103.rs b/tests/ui/imports/nested-import-root-symbol-150103.rs index 066ed37d8bbb..7e126d8188c7 100644 --- a/tests/ui/imports/nested-import-root-symbol-150103.rs +++ b/tests/ui/imports/nested-import-root-symbol-150103.rs @@ -3,11 +3,11 @@ // caused by `{{root}}` appearing in diagnostic suggestions mod A { - use Iuse::{ ::Fish }; //~ ERROR failed to resolve: use of unresolved module or unlinked crate + use Iuse::{ ::Fish }; //~ ERROR cannot find module or crate `Iuse` in the crate root } mod B { - use A::{::Fish}; //~ ERROR failed to resolve: crate root in paths can only be used in start position + use A::{::Fish}; //~ ERROR the crate root in paths can only be used in start position } fn main() {} diff --git a/tests/ui/imports/nested-import-root-symbol-150103.stderr b/tests/ui/imports/nested-import-root-symbol-150103.stderr index be8b8c12d218..e5240ceef268 100644 --- a/tests/ui/imports/nested-import-root-symbol-150103.stderr +++ b/tests/ui/imports/nested-import-root-symbol-150103.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `Iuse` +error[E0433]: cannot find module or crate `Iuse` in the crate root --> $DIR/nested-import-root-symbol-150103.rs:6:9 | LL | use Iuse::{ ::Fish }; @@ -9,11 +9,11 @@ help: you might be missing a crate named `Iuse`, add it to your project and impo LL + extern crate Iuse; | -error[E0433]: failed to resolve: crate root in paths can only be used in start position +error[E0433]: the crate root in paths can only be used in start position --> $DIR/nested-import-root-symbol-150103.rs:10:13 | LL | use A::{::Fish}; - | ^ crate root in paths can only be used in start position + | ^ can only be used in path start position error: aborting due to 2 previous errors diff --git a/tests/ui/imports/suggest-import-issue-120074.edition2015.stderr b/tests/ui/imports/suggest-import-issue-120074.edition2015.stderr index 91fad1fb3099..b079471e809c 100644 --- a/tests/ui/imports/suggest-import-issue-120074.edition2015.stderr +++ b/tests/ui/imports/suggest-import-issue-120074.edition2015.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: unresolved import +error[E0433]: cannot find `bar` in `crate` --> $DIR/suggest-import-issue-120074.rs:14:35 | LL | println!("Hello, {}!", crate::bar::do_the_thing); diff --git a/tests/ui/imports/suggest-import-issue-120074.edition2021.stderr b/tests/ui/imports/suggest-import-issue-120074.edition2021.stderr deleted file mode 100644 index 91fad1fb3099..000000000000 --- a/tests/ui/imports/suggest-import-issue-120074.edition2021.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0433]: failed to resolve: unresolved import - --> $DIR/suggest-import-issue-120074.rs:14:35 - | -LL | println!("Hello, {}!", crate::bar::do_the_thing); - | ^^^ unresolved import - | -help: a similar path exists - | -LL | println!("Hello, {}!", crate::foo::bar::do_the_thing); - | +++++ -help: consider importing this module - | -LL + use foo::bar; - | -help: if you import `bar`, refer to it directly - | -LL - println!("Hello, {}!", crate::bar::do_the_thing); -LL + println!("Hello, {}!", bar::do_the_thing); - | - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0433`. diff --git a/tests/ui/imports/suggest-import-issue-120074.post2015.stderr b/tests/ui/imports/suggest-import-issue-120074.post2015.stderr index f334fb31a3dc..045a7df3feea 100644 --- a/tests/ui/imports/suggest-import-issue-120074.post2015.stderr +++ b/tests/ui/imports/suggest-import-issue-120074.post2015.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: unresolved import +error[E0433]: cannot find `bar` in `crate` --> $DIR/suggest-import-issue-120074.rs:14:35 | LL | println!("Hello, {}!", crate::bar::do_the_thing); diff --git a/tests/ui/imports/suggest-import-issue-120074.rs b/tests/ui/imports/suggest-import-issue-120074.rs index 4ca0d52b1f3e..27027405f4de 100644 --- a/tests/ui/imports/suggest-import-issue-120074.rs +++ b/tests/ui/imports/suggest-import-issue-120074.rs @@ -11,5 +11,5 @@ pub mod foo { } fn main() { - println!("Hello, {}!", crate::bar::do_the_thing); //~ ERROR failed to resolve: unresolved import + println!("Hello, {}!", crate::bar::do_the_thing); //~ ERROR cannot find `bar` in `crate` } diff --git a/tests/ui/imports/tool-mod-child.rs b/tests/ui/imports/tool-mod-child.rs index c0978046719a..6f67d200c2d7 100644 --- a/tests/ui/imports/tool-mod-child.rs +++ b/tests/ui/imports/tool-mod-child.rs @@ -1,8 +1,8 @@ //@ edition:2015 use clippy::a; //~ ERROR unresolved import `clippy` -use clippy::a::b; //~ ERROR failed to resolve: use of unresolved module or unlinked crate `clippy` +use clippy::a::b; //~ ERROR cannot find use rustdoc::a; //~ ERROR unresolved import `rustdoc` -use rustdoc::a::b; //~ ERROR failed to resolve: use of unresolved module or unlinked crate `rustdoc` +use rustdoc::a::b; //~ ERROR cannot find fn main() {} diff --git a/tests/ui/imports/tool-mod-child.stderr b/tests/ui/imports/tool-mod-child.stderr index 3e216c492d34..babb5e21cbf7 100644 --- a/tests/ui/imports/tool-mod-child.stderr +++ b/tests/ui/imports/tool-mod-child.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `clippy` +error[E0433]: cannot find module or crate `clippy` in the crate root --> $DIR/tool-mod-child.rs:3:5 | LL | use clippy::a::b; @@ -20,7 +20,7 @@ help: you might be missing a crate named `clippy`, add it to your project and im LL + extern crate clippy; | -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `rustdoc` +error[E0433]: cannot find module or crate `rustdoc` in the crate root --> $DIR/tool-mod-child.rs:6:5 | LL | use rustdoc::a::b; diff --git a/tests/ui/issues/issue-38857.rs b/tests/ui/issues/issue-38857.rs index 81d881c100bb..63a0af759a3d 100644 --- a/tests/ui/issues/issue-38857.rs +++ b/tests/ui/issues/issue-38857.rs @@ -1,5 +1,5 @@ fn main() { let a = std::sys::imp::process::process_common::StdioPipes { ..panic!() }; - //~^ ERROR failed to resolve: could not find `imp` in `sys` [E0433] - //~^^ ERROR module `sys` is private [E0603] + //~^ ERROR: cannot find `imp` in `sys` [E0433] + //~| ERROR: module `sys` is private [E0603] } diff --git a/tests/ui/issues/issue-38857.stderr b/tests/ui/issues/issue-38857.stderr index 4d505784b865..85a0c266ac65 100644 --- a/tests/ui/issues/issue-38857.stderr +++ b/tests/ui/issues/issue-38857.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: could not find `imp` in `sys` +error[E0433]: cannot find `imp` in `sys` --> $DIR/issue-38857.rs:2:23 | LL | let a = std::sys::imp::process::process_common::StdioPipes { ..panic!() }; diff --git a/tests/ui/issues/issue-46101.rs b/tests/ui/issues/issue-46101.rs index ab3d30d401f0..86b06f7c61d0 100644 --- a/tests/ui/issues/issue-46101.rs +++ b/tests/ui/issues/issue-46101.rs @@ -1,6 +1,6 @@ trait Foo {} -#[derive(Foo::Anything)] //~ ERROR failed to resolve: partially resolved path in a derive macro - //~| ERROR failed to resolve: partially resolved path in a derive macro +#[derive(Foo::Anything)] //~ ERROR cannot find + //~| ERROR cannot find struct S; fn main() {} diff --git a/tests/ui/issues/issue-46101.stderr b/tests/ui/issues/issue-46101.stderr index a0cdd5d5f053..1dada87d72d6 100644 --- a/tests/ui/issues/issue-46101.stderr +++ b/tests/ui/issues/issue-46101.stderr @@ -1,14 +1,14 @@ -error[E0433]: failed to resolve: partially resolved path in a derive macro +error[E0433]: cannot find derive macro `Anything` in trait `Foo` --> $DIR/issue-46101.rs:2:10 | LL | #[derive(Foo::Anything)] - | ^^^^^^^^^^^^^ partially resolved path in a derive macro + | ^^^^^^^^^^^^^ a derive macro can't exist within a trait -error[E0433]: failed to resolve: partially resolved path in a derive macro +error[E0433]: cannot find derive macro `Anything` in trait `Foo` --> $DIR/issue-46101.rs:2:10 | LL | #[derive(Foo::Anything)] - | ^^^^^^^^^^^^^ partially resolved path in a derive macro + | ^^^^^^^^^^^^^ a derive macro can't exist within a trait | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` diff --git a/tests/ui/keyword/keyword-super-as-identifier.rs b/tests/ui/keyword/keyword-super-as-identifier.rs index 02c1b27b08a9..0aeb224e183b 100644 --- a/tests/ui/keyword/keyword-super-as-identifier.rs +++ b/tests/ui/keyword/keyword-super-as-identifier.rs @@ -1,3 +1,3 @@ fn main() { - let super = 22; //~ ERROR failed to resolve: there are too many leading `super` keywords + let super = 22; //~ ERROR too many leading `super` keywords } diff --git a/tests/ui/keyword/keyword-super-as-identifier.stderr b/tests/ui/keyword/keyword-super-as-identifier.stderr index bfb27c143ff7..d8609c6bcbe8 100644 --- a/tests/ui/keyword/keyword-super-as-identifier.stderr +++ b/tests/ui/keyword/keyword-super-as-identifier.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: there are too many leading `super` keywords +error[E0433]: too many leading `super` keywords --> $DIR/keyword-super-as-identifier.rs:2:9 | LL | let super = 22; diff --git a/tests/ui/keyword/keyword-super.rs b/tests/ui/keyword/keyword-super.rs index c121a6c1050e..c21149a846fe 100644 --- a/tests/ui/keyword/keyword-super.rs +++ b/tests/ui/keyword/keyword-super.rs @@ -1,3 +1,3 @@ fn main() { - let super: isize; //~ ERROR failed to resolve: there are too many leading `super` keywords + let super: isize; //~ ERROR: too many leading `super` keywords } diff --git a/tests/ui/keyword/keyword-super.stderr b/tests/ui/keyword/keyword-super.stderr index bf595442c3b8..69af7da09376 100644 --- a/tests/ui/keyword/keyword-super.stderr +++ b/tests/ui/keyword/keyword-super.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: there are too many leading `super` keywords +error[E0433]: too many leading `super` keywords --> $DIR/keyword-super.rs:2:9 | LL | let super: isize; diff --git a/tests/ui/lifetimes/issue-97194.rs b/tests/ui/lifetimes/issue-97194.rs index 5f3560dbe946..5e7c3683d209 100644 --- a/tests/ui/lifetimes/issue-97194.rs +++ b/tests/ui/lifetimes/issue-97194.rs @@ -1,8 +1,8 @@ extern "C" { fn bget(&self, index: [usize; Self::DIM]) -> bool { - //~^ ERROR incorrect function inside `extern` block - //~| ERROR `self` parameter is only allowed in associated functions - //~| ERROR failed to resolve: `Self` + //~^ ERROR: incorrect function inside `extern` block + //~| ERROR: `self` parameter is only allowed in associated functions + //~| ERROR: cannot find `Self` type T<'a> = &'a str; } } diff --git a/tests/ui/lifetimes/issue-97194.stderr b/tests/ui/lifetimes/issue-97194.stderr index 345e21cb2507..c7e318f7390a 100644 --- a/tests/ui/lifetimes/issue-97194.stderr +++ b/tests/ui/lifetimes/issue-97194.stderr @@ -22,7 +22,7 @@ LL | fn bget(&self, index: [usize; Self::DIM]) -> bool { | = note: associated functions are those in `impl` or `trait` definitions -error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions +error[E0433]: cannot find `Self` in this scope --> $DIR/issue-97194.rs:2:35 | LL | fn bget(&self, index: [usize; Self::DIM]) -> bool { diff --git a/tests/ui/lint/ice-array-into-iter-lint-issue-121532.rs b/tests/ui/lint/ice-array-into-iter-lint-issue-121532.rs index 92cab01fe48c..d095903ec03a 100644 --- a/tests/ui/lint/ice-array-into-iter-lint-issue-121532.rs +++ b/tests/ui/lint/ice-array-into-iter-lint-issue-121532.rs @@ -4,7 +4,7 @@ // Typeck fails for the arg type as // `Self` makes no sense here -fn func(a: Self::ItemsIterator) { //~ ERROR failed to resolve: `Self` is only available in impls, traits, and type definitions +fn func(a: Self::ItemsIterator) { //~ ERROR cannot find `Self` a.into_iter(); } diff --git a/tests/ui/lint/ice-array-into-iter-lint-issue-121532.stderr b/tests/ui/lint/ice-array-into-iter-lint-issue-121532.stderr index 73ceddae940b..1a0eaba92375 100644 --- a/tests/ui/lint/ice-array-into-iter-lint-issue-121532.stderr +++ b/tests/ui/lint/ice-array-into-iter-lint-issue-121532.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions +error[E0433]: cannot find `Self` in this scope --> $DIR/ice-array-into-iter-lint-issue-121532.rs:7:12 | LL | fn func(a: Self::ItemsIterator) { diff --git a/tests/ui/macros/builtin-prelude-no-accidents.rs b/tests/ui/macros/builtin-prelude-no-accidents.rs index 9bebcb75526f..bffe3776b7b4 100644 --- a/tests/ui/macros/builtin-prelude-no-accidents.rs +++ b/tests/ui/macros/builtin-prelude-no-accidents.rs @@ -2,7 +2,7 @@ // because macros with the same names are in prelude. fn main() { - env::current_dir; //~ ERROR use of unresolved module or unlinked crate `env` - type A = panic::PanicInfo; //~ ERROR use of unresolved module or unlinked crate `panic` - type B = vec::Vec; //~ ERROR use of unresolved module or unlinked crate `vec` + env::current_dir; //~ ERROR cannot find module or crate `env` + type A = panic::PanicInfo; //~ ERROR cannot find module or crate `panic` + type B = vec::Vec; //~ ERROR cannot find module or crate `vec` } diff --git a/tests/ui/macros/builtin-prelude-no-accidents.stderr b/tests/ui/macros/builtin-prelude-no-accidents.stderr index 8c7095a6aedf..3cc322373afb 100644 --- a/tests/ui/macros/builtin-prelude-no-accidents.stderr +++ b/tests/ui/macros/builtin-prelude-no-accidents.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `env` +error[E0433]: cannot find module or crate `env` in this scope --> $DIR/builtin-prelude-no-accidents.rs:5:5 | LL | env::current_dir; @@ -10,7 +10,7 @@ help: consider importing this module LL + use std::env; | -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `panic` +error[E0433]: cannot find module or crate `panic` in this scope --> $DIR/builtin-prelude-no-accidents.rs:6:14 | LL | type A = panic::PanicInfo; @@ -22,7 +22,7 @@ help: consider importing this module LL + use std::panic; | -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `vec` +error[E0433]: cannot find module or crate `vec` in this scope --> $DIR/builtin-prelude-no-accidents.rs:7:14 | LL | type B = vec::Vec; diff --git a/tests/ui/macros/builtin-std-paths-fail.rs b/tests/ui/macros/builtin-std-paths-fail.rs index c1a4e32a6dcb..fd51c42ff37f 100644 --- a/tests/ui/macros/builtin-std-paths-fail.rs +++ b/tests/ui/macros/builtin-std-paths-fail.rs @@ -1,25 +1,25 @@ #[derive( - core::RustcDecodable, //~ ERROR could not find `RustcDecodable` in `core` - //~| ERROR could not find `RustcDecodable` in `core` - core::RustcDecodable, //~ ERROR could not find `RustcDecodable` in `core` - //~| ERROR could not find `RustcDecodable` in `core` + core::RustcDecodable, //~ ERROR cannot find `RustcDecodable` in `core` + //~| ERROR cannot find `RustcDecodable` in `core` + core::RustcDecodable, //~ ERROR cannot find `RustcDecodable` in `core` + //~| ERROR cannot find `RustcDecodable` in `core` )] -#[core::bench] //~ ERROR could not find `bench` in `core` -#[core::global_allocator] //~ ERROR could not find `global_allocator` in `core` -#[core::test_case] //~ ERROR could not find `test_case` in `core` -#[core::test] //~ ERROR could not find `test` in `core` +#[core::bench] //~ ERROR cannot find `bench` in `core` +#[core::global_allocator] //~ ERROR cannot find `global_allocator` in `core` +#[core::test_case] //~ ERROR cannot find `test_case` in `core` +#[core::test] //~ ERROR cannot find `test` in `core` struct Core; #[derive( - std::RustcDecodable, //~ ERROR could not find `RustcDecodable` in `std` - //~| ERROR could not find `RustcDecodable` in `std` - std::RustcDecodable, //~ ERROR could not find `RustcDecodable` in `std` - //~| ERROR could not find `RustcDecodable` in `std` + std::RustcDecodable, //~ ERROR cannot find `RustcDecodable` in `std` + //~| ERROR cannot find `RustcDecodable` in `std` + std::RustcDecodable, //~ ERROR cannot find `RustcDecodable` in `std` + //~| ERROR cannot find `RustcDecodable` in `std` )] -#[std::bench] //~ ERROR could not find `bench` in `std` -#[std::global_allocator] //~ ERROR could not find `global_allocator` in `std` -#[std::test_case] //~ ERROR could not find `test_case` in `std` -#[std::test] //~ ERROR could not find `test` in `std` +#[std::bench] //~ ERROR cannot find `bench` in `std` +#[std::global_allocator] //~ ERROR cannot find `global_allocator` in `std` +#[std::test_case] //~ ERROR cannot find `test_case` in `std` +#[std::test] //~ ERROR cannot find `test` in `std` struct Std; fn main() {} diff --git a/tests/ui/macros/builtin-std-paths-fail.stderr b/tests/ui/macros/builtin-std-paths-fail.stderr index 85d2bd2132f2..247e3f172a3c 100644 --- a/tests/ui/macros/builtin-std-paths-fail.stderr +++ b/tests/ui/macros/builtin-std-paths-fail.stderr @@ -1,16 +1,16 @@ -error[E0433]: failed to resolve: could not find `RustcDecodable` in `core` +error[E0433]: cannot find `RustcDecodable` in `core` --> $DIR/builtin-std-paths-fail.rs:2:11 | LL | core::RustcDecodable, | ^^^^^^^^^^^^^^ could not find `RustcDecodable` in `core` -error[E0433]: failed to resolve: could not find `RustcDecodable` in `core` +error[E0433]: cannot find `RustcDecodable` in `core` --> $DIR/builtin-std-paths-fail.rs:4:11 | LL | core::RustcDecodable, | ^^^^^^^^^^^^^^ could not find `RustcDecodable` in `core` -error[E0433]: failed to resolve: could not find `RustcDecodable` in `core` +error[E0433]: cannot find `RustcDecodable` in `core` --> $DIR/builtin-std-paths-fail.rs:2:11 | LL | core::RustcDecodable, @@ -18,7 +18,7 @@ LL | core::RustcDecodable, | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error[E0433]: failed to resolve: could not find `RustcDecodable` in `core` +error[E0433]: cannot find `RustcDecodable` in `core` --> $DIR/builtin-std-paths-fail.rs:4:11 | LL | core::RustcDecodable, @@ -26,43 +26,43 @@ LL | core::RustcDecodable, | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error[E0433]: failed to resolve: could not find `bench` in `core` +error[E0433]: cannot find `bench` in `core` --> $DIR/builtin-std-paths-fail.rs:7:9 | LL | #[core::bench] | ^^^^^ could not find `bench` in `core` -error[E0433]: failed to resolve: could not find `global_allocator` in `core` +error[E0433]: cannot find `global_allocator` in `core` --> $DIR/builtin-std-paths-fail.rs:8:9 | LL | #[core::global_allocator] | ^^^^^^^^^^^^^^^^ could not find `global_allocator` in `core` -error[E0433]: failed to resolve: could not find `test_case` in `core` +error[E0433]: cannot find `test_case` in `core` --> $DIR/builtin-std-paths-fail.rs:9:9 | LL | #[core::test_case] | ^^^^^^^^^ could not find `test_case` in `core` -error[E0433]: failed to resolve: could not find `test` in `core` +error[E0433]: cannot find `test` in `core` --> $DIR/builtin-std-paths-fail.rs:10:9 | LL | #[core::test] | ^^^^ could not find `test` in `core` -error[E0433]: failed to resolve: could not find `RustcDecodable` in `std` +error[E0433]: cannot find `RustcDecodable` in `std` --> $DIR/builtin-std-paths-fail.rs:14:10 | LL | std::RustcDecodable, | ^^^^^^^^^^^^^^ could not find `RustcDecodable` in `std` -error[E0433]: failed to resolve: could not find `RustcDecodable` in `std` +error[E0433]: cannot find `RustcDecodable` in `std` --> $DIR/builtin-std-paths-fail.rs:16:10 | LL | std::RustcDecodable, | ^^^^^^^^^^^^^^ could not find `RustcDecodable` in `std` -error[E0433]: failed to resolve: could not find `RustcDecodable` in `std` +error[E0433]: cannot find `RustcDecodable` in `std` --> $DIR/builtin-std-paths-fail.rs:14:10 | LL | std::RustcDecodable, @@ -70,7 +70,7 @@ LL | std::RustcDecodable, | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error[E0433]: failed to resolve: could not find `RustcDecodable` in `std` +error[E0433]: cannot find `RustcDecodable` in `std` --> $DIR/builtin-std-paths-fail.rs:16:10 | LL | std::RustcDecodable, @@ -78,25 +78,25 @@ LL | std::RustcDecodable, | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error[E0433]: failed to resolve: could not find `bench` in `std` +error[E0433]: cannot find `bench` in `std` --> $DIR/builtin-std-paths-fail.rs:19:8 | LL | #[std::bench] | ^^^^^ could not find `bench` in `std` -error[E0433]: failed to resolve: could not find `global_allocator` in `std` +error[E0433]: cannot find `global_allocator` in `std` --> $DIR/builtin-std-paths-fail.rs:20:8 | LL | #[std::global_allocator] | ^^^^^^^^^^^^^^^^ could not find `global_allocator` in `std` -error[E0433]: failed to resolve: could not find `test_case` in `std` +error[E0433]: cannot find `test_case` in `std` --> $DIR/builtin-std-paths-fail.rs:21:8 | LL | #[std::test_case] | ^^^^^^^^^ could not find `test_case` in `std` -error[E0433]: failed to resolve: could not find `test` in `std` +error[E0433]: cannot find `test` in `std` --> $DIR/builtin-std-paths-fail.rs:22:8 | LL | #[std::test] diff --git a/tests/ui/macros/compile_error_macro-suppress-errors.rs b/tests/ui/macros/compile_error_macro-suppress-errors.rs index b2b6a8ae0088..e1c2248035e9 100644 --- a/tests/ui/macros/compile_error_macro-suppress-errors.rs +++ b/tests/ui/macros/compile_error_macro-suppress-errors.rs @@ -36,5 +36,5 @@ fn main() { //~^ ERROR: cannot find function `some_function` in module `another_module` let _: another_module::SomeType = another_module::Hello::new(); //~^ ERROR: cannot find type `SomeType` in module `another_module` - //~^^ ERROR: failed to resolve: could not find `Hello` in `another_module` + //~| ERROR: cannot find `Hello` in `another_module` } diff --git a/tests/ui/macros/compile_error_macro-suppress-errors.stderr b/tests/ui/macros/compile_error_macro-suppress-errors.stderr index 73b156359624..bda1deb9c413 100644 --- a/tests/ui/macros/compile_error_macro-suppress-errors.stderr +++ b/tests/ui/macros/compile_error_macro-suppress-errors.stderr @@ -16,7 +16,7 @@ error[E0432]: unresolved import `crate::another_module::NotExist` LL | use crate::another_module::NotExist; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `NotExist` in `another_module` -error[E0433]: failed to resolve: could not find `Hello` in `another_module` +error[E0433]: cannot find `Hello` in `another_module` --> $DIR/compile_error_macro-suppress-errors.rs:37:55 | LL | let _: another_module::SomeType = another_module::Hello::new(); diff --git a/tests/ui/macros/macro-inner-attributes.rs b/tests/ui/macros/macro-inner-attributes.rs index 1a832ca9b0c4..fc69f2e4cebe 100644 --- a/tests/ui/macros/macro-inner-attributes.rs +++ b/tests/ui/macros/macro-inner-attributes.rs @@ -4,8 +4,8 @@ macro_rules! test { ($nm:ident, #[$a:meta], $i:item) => (mod $nm { #![$a] $i }); } -test!(a, - #[cfg(false)], +test!(a, //~ NOTE: found an item that was configured out + #[cfg(false)], //~ NOTE: the item is gated here pub fn bar() { }); test!(b, @@ -14,7 +14,7 @@ test!(b, #[rustc_dummy] fn main() { - a::bar(); - //~^ ERROR failed to resolve: use of unresolved module or unlinked crate `a` + a::bar(); //~ ERROR: cannot find module or crate `a` + //~^ NOTE: use of unresolved module or unlinked crate `a` b::bar(); } diff --git a/tests/ui/macros/macro-inner-attributes.stderr b/tests/ui/macros/macro-inner-attributes.stderr index 3c043c38abb5..5523dda33c32 100644 --- a/tests/ui/macros/macro-inner-attributes.stderr +++ b/tests/ui/macros/macro-inner-attributes.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `a` +error[E0433]: cannot find module or crate `a` in this scope --> $DIR/macro-inner-attributes.rs:17:5 | LL | a::bar(); diff --git a/tests/ui/macros/macro-path-prelude-fail-1.rs b/tests/ui/macros/macro-path-prelude-fail-1.rs index d93792bdfe38..a077ef0c6632 100644 --- a/tests/ui/macros/macro-path-prelude-fail-1.rs +++ b/tests/ui/macros/macro-path-prelude-fail-1.rs @@ -1,7 +1,9 @@ mod m { fn check() { - Vec::clone!(); //~ ERROR failed to resolve: `Vec` is a struct, not a module - u8::clone!(); //~ ERROR failed to resolve: `u8` is a builtin type, not a module + Vec::clone!(); //~ ERROR cannot find + //~^ NOTE `Vec` is a struct, not a module + u8::clone!(); //~ ERROR cannot find + //~^ NOTE `u8` is a builtin type, not a module } } diff --git a/tests/ui/macros/macro-path-prelude-fail-1.stderr b/tests/ui/macros/macro-path-prelude-fail-1.stderr index f8377ffb3555..0332b18992eb 100644 --- a/tests/ui/macros/macro-path-prelude-fail-1.stderr +++ b/tests/ui/macros/macro-path-prelude-fail-1.stderr @@ -1,11 +1,11 @@ -error[E0433]: failed to resolve: `Vec` is a struct, not a module +error[E0433]: cannot find module `Vec` in this scope --> $DIR/macro-path-prelude-fail-1.rs:3:9 | LL | Vec::clone!(); | ^^^ `Vec` is a struct, not a module -error[E0433]: failed to resolve: `u8` is a builtin type, not a module - --> $DIR/macro-path-prelude-fail-1.rs:4:9 +error[E0433]: cannot find module `u8` in this scope + --> $DIR/macro-path-prelude-fail-1.rs:5:9 | LL | u8::clone!(); | ^^ `u8` is a builtin type, not a module diff --git a/tests/ui/macros/macro-path-prelude-fail-2.rs b/tests/ui/macros/macro-path-prelude-fail-2.rs index 816a3c4ccc00..f359f34e4fd1 100644 --- a/tests/ui/macros/macro-path-prelude-fail-2.rs +++ b/tests/ui/macros/macro-path-prelude-fail-2.rs @@ -1,6 +1,6 @@ mod m { fn check() { - Result::Ok!(); //~ ERROR failed to resolve: partially resolved path in a macro + Result::Ok!(); //~ ERROR cannot find } } diff --git a/tests/ui/macros/macro-path-prelude-fail-2.stderr b/tests/ui/macros/macro-path-prelude-fail-2.stderr index 87646031cdb8..e1ea8cbc60ec 100644 --- a/tests/ui/macros/macro-path-prelude-fail-2.stderr +++ b/tests/ui/macros/macro-path-prelude-fail-2.stderr @@ -1,8 +1,8 @@ -error[E0433]: failed to resolve: partially resolved path in a macro +error[E0433]: cannot find macro `Ok` in enum `Result` --> $DIR/macro-path-prelude-fail-2.rs:3:9 | LL | Result::Ok!(); - | ^^^^^^^^^^ partially resolved path in a macro + | ^^^^^^^^^^ a macro can't exist within an enum error: aborting due to 1 previous error diff --git a/tests/ui/macros/macro_path_as_generic_bound.rs b/tests/ui/macros/macro_path_as_generic_bound.rs index 663f85688ec9..d720752f4ca5 100644 --- a/tests/ui/macros/macro_path_as_generic_bound.rs +++ b/tests/ui/macros/macro_path_as_generic_bound.rs @@ -4,6 +4,6 @@ macro_rules! foo(($t:path) => { impl Foo for T {} }); -foo!(m::m2::A); //~ ERROR failed to resolve +foo!(m::m2::A); //~ ERROR cannot find fn main() {} diff --git a/tests/ui/macros/macro_path_as_generic_bound.stderr b/tests/ui/macros/macro_path_as_generic_bound.stderr index 9fe4ad27aa05..c4454ff23e6a 100644 --- a/tests/ui/macros/macro_path_as_generic_bound.stderr +++ b/tests/ui/macros/macro_path_as_generic_bound.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `m` +error[E0433]: cannot find module or crate `m` in this scope --> $DIR/macro_path_as_generic_bound.rs:7:6 | LL | foo!(m::m2::A); diff --git a/tests/ui/macros/meta-item-absolute-path.rs b/tests/ui/macros/meta-item-absolute-path.rs index e677016cff82..429d259ae2c4 100644 --- a/tests/ui/macros/meta-item-absolute-path.rs +++ b/tests/ui/macros/meta-item-absolute-path.rs @@ -1,6 +1,6 @@ //@ edition:2015 -#[derive(::Absolute)] //~ ERROR failed to resolve - //~| ERROR failed to resolve +#[derive(::Absolute)] //~ ERROR cannot find + //~| ERROR cannot find struct S; fn main() {} diff --git a/tests/ui/macros/meta-item-absolute-path.stderr b/tests/ui/macros/meta-item-absolute-path.stderr index 93c442036ce2..9a9d90ca3f44 100644 --- a/tests/ui/macros/meta-item-absolute-path.stderr +++ b/tests/ui/macros/meta-item-absolute-path.stderr @@ -1,10 +1,10 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `Absolute` +error[E0433]: cannot find module or crate `Absolute` in the crate root --> $DIR/meta-item-absolute-path.rs:2:12 | LL | #[derive(::Absolute)] | ^^^^^^^^ use of unresolved module or unlinked crate `Absolute` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `Absolute` +error[E0433]: cannot find module or crate `Absolute` in the crate root --> $DIR/meta-item-absolute-path.rs:2:12 | LL | #[derive(::Absolute)] diff --git a/tests/ui/mir/issue-121103.rs b/tests/ui/mir/issue-121103.rs index 247c644c5bb1..4a3d3f5590f3 100644 --- a/tests/ui/mir/issue-121103.rs +++ b/tests/ui/mir/issue-121103.rs @@ -1,3 +1,5 @@ fn main(_: as lib2::TypeFn>::Output) {} -//~^ ERROR failed to resolve: use of unresolved module or unlinked crate `lib2` -//~| ERROR failed to resolve: use of unresolved module or unlinked crate `lib2` +//~^ ERROR: cannot find +//~| ERROR: cannot find +//~| NOTE: use of unresolved module or unlinked crate `lib2` +//~| NOTE: use of unresolved module or unlinked crate `lib2` diff --git a/tests/ui/mir/issue-121103.stderr b/tests/ui/mir/issue-121103.stderr index 3565f6f0cdef..236a3cbc5806 100644 --- a/tests/ui/mir/issue-121103.stderr +++ b/tests/ui/mir/issue-121103.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `lib2` +error[E0433]: cannot find module or crate `lib2` in this scope --> $DIR/issue-121103.rs:1:38 | LL | fn main(_: as lib2::TypeFn>::Output) {} @@ -6,7 +6,7 @@ LL | fn main(_: as lib2::TypeFn>::Output) {} | = help: you might be missing a crate named `lib2` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `lib2` +error[E0433]: cannot find module or crate `lib2` in this scope --> $DIR/issue-121103.rs:1:13 | LL | fn main(_: as lib2::TypeFn>::Output) {} diff --git a/tests/ui/modules/super-at-crate-root.rs b/tests/ui/modules/super-at-crate-root.rs index d605dc0cccb3..0aac3a087570 100644 --- a/tests/ui/modules/super-at-crate-root.rs +++ b/tests/ui/modules/super-at-crate-root.rs @@ -1,6 +1,6 @@ //! Check that `super` keyword used at the crate root (top-level) results in a compilation error //! as there is no parent module to resolve. -use super::f; //~ ERROR there are too many leading `super` keywords +use super::f; //~ ERROR too many leading `super` keywords fn main() {} diff --git a/tests/ui/modules/super-at-crate-root.stderr b/tests/ui/modules/super-at-crate-root.stderr index 027987088646..cb3855cc033d 100644 --- a/tests/ui/modules/super-at-crate-root.stderr +++ b/tests/ui/modules/super-at-crate-root.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: there are too many leading `super` keywords +error[E0433]: too many leading `super` keywords --> $DIR/super-at-crate-root.rs:4:5 | LL | use super::f; diff --git a/tests/ui/parser/const-param-decl-on-type-instead-of-impl.rs b/tests/ui/parser/const-param-decl-on-type-instead-of-impl.rs index 3876fb41d23f..764c1c2a3210 100644 --- a/tests/ui/parser/const-param-decl-on-type-instead-of-impl.rs +++ b/tests/ui/parser/const-param-decl-on-type-instead-of-impl.rs @@ -11,5 +11,5 @@ fn banana(a: >::BAR) {} fn chaenomeles() { path::path::Struct::() //~^ ERROR unexpected `const` parameter declaration - //~| ERROR failed to resolve: use of unresolved module or unlinked crate `path` + //~| ERROR cannot find module or crate `path` } diff --git a/tests/ui/parser/const-param-decl-on-type-instead-of-impl.stderr b/tests/ui/parser/const-param-decl-on-type-instead-of-impl.stderr index db7c76dc1aa9..7aba69a0cf5a 100644 --- a/tests/ui/parser/const-param-decl-on-type-instead-of-impl.stderr +++ b/tests/ui/parser/const-param-decl-on-type-instead-of-impl.stderr @@ -22,7 +22,7 @@ error: unexpected `const` parameter declaration LL | path::path::Struct::() | ^^^^^^^^^^^^^^ expected a `const` expression, not a parameter declaration -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `path` +error[E0433]: cannot find module or crate `path` in this scope --> $DIR/const-param-decl-on-type-instead-of-impl.rs:12:5 | LL | path::path::Struct::() diff --git a/tests/ui/parser/dyn-trait-compatibility.rs b/tests/ui/parser/dyn-trait-compatibility.rs index c6e84284fbec..dd01b6e19d05 100644 --- a/tests/ui/parser/dyn-trait-compatibility.rs +++ b/tests/ui/parser/dyn-trait-compatibility.rs @@ -3,7 +3,7 @@ type A0 = dyn; //~^ ERROR cannot find type `dyn` in this scope type A1 = dyn::dyn; -//~^ ERROR use of unresolved module or unlinked crate `dyn` +//~^ ERROR cannot find module or crate `dyn` in this scope type A2 = dyn; //~^ ERROR cannot find type `dyn` in this scope //~| ERROR cannot find type `dyn` in this scope diff --git a/tests/ui/parser/dyn-trait-compatibility.stderr b/tests/ui/parser/dyn-trait-compatibility.stderr index d15bf3c97f65..233b22123d31 100644 --- a/tests/ui/parser/dyn-trait-compatibility.stderr +++ b/tests/ui/parser/dyn-trait-compatibility.stderr @@ -40,7 +40,7 @@ error[E0425]: cannot find type `dyn` in this scope LL | type A3 = dyn<::dyn>; | ^^^ not found in this scope -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `dyn` +error[E0433]: cannot find module or crate `dyn` in this scope --> $DIR/dyn-trait-compatibility.rs:5:11 | LL | type A1 = dyn::dyn; diff --git a/tests/ui/parser/mod_file_not_exist.rs b/tests/ui/parser/mod_file_not_exist.rs index 49ce44982ab9..ba89a8c2c1fb 100644 --- a/tests/ui/parser/mod_file_not_exist.rs +++ b/tests/ui/parser/mod_file_not_exist.rs @@ -1,8 +1,9 @@ -mod not_a_real_file; //~ ERROR file not found for module `not_a_real_file` -//~^ HELP to create the module `not_a_real_file`, create file +mod not_a_real_file; +//~^ ERROR: file not found for module `not_a_real_file` +//~| HELP: to create the module `not_a_real_file`, create file fn main() { assert_eq!(mod_file_aux::bar(), 10); - //~^ ERROR failed to resolve: use of unresolved module or unlinked crate `mod_file_aux` - //~| HELP you might be missing a crate named `mod_file_aux` + //~^ ERROR: cannot find module or crate `mod_file_aux` + //~| HELP: you might be missing a crate named `mod_file_aux` } diff --git a/tests/ui/parser/mod_file_not_exist.stderr b/tests/ui/parser/mod_file_not_exist.stderr index d9e4e8f31f5f..83fff7161cae 100644 --- a/tests/ui/parser/mod_file_not_exist.stderr +++ b/tests/ui/parser/mod_file_not_exist.stderr @@ -7,8 +7,8 @@ LL | mod not_a_real_file; = help: to create the module `not_a_real_file`, create file "$DIR/not_a_real_file.rs" or "$DIR/not_a_real_file/mod.rs" = note: if there is a `mod not_a_real_file` elsewhere in the crate already, import it with `use crate::...` instead -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `mod_file_aux` - --> $DIR/mod_file_not_exist.rs:5:16 +error[E0433]: cannot find module or crate `mod_file_aux` in this scope + --> $DIR/mod_file_not_exist.rs:6:16 | LL | assert_eq!(mod_file_aux::bar(), 10); | ^^^^^^^^^^^^ use of unresolved module or unlinked crate `mod_file_aux` diff --git a/tests/ui/parser/mod_file_not_exist_windows.rs b/tests/ui/parser/mod_file_not_exist_windows.rs index bb74684d9944..b0b65ae8c759 100644 --- a/tests/ui/parser/mod_file_not_exist_windows.rs +++ b/tests/ui/parser/mod_file_not_exist_windows.rs @@ -5,6 +5,6 @@ mod not_a_real_file; //~ ERROR file not found for module `not_a_real_file` fn main() { assert_eq!(mod_file_aux::bar(), 10); - //~^ ERROR failed to resolve: use of unresolved module or unlinked crate `mod_file_aux` + //~^ ERROR cannot find module or crate `mod_file_aux` in this scope //~| HELP you might be missing a crate named `mod_file_aux` } diff --git a/tests/ui/parser/mod_file_not_exist_windows.stderr b/tests/ui/parser/mod_file_not_exist_windows.stderr index 03c762d0ef2d..95c6c1c92e64 100644 --- a/tests/ui/parser/mod_file_not_exist_windows.stderr +++ b/tests/ui/parser/mod_file_not_exist_windows.stderr @@ -7,7 +7,7 @@ LL | mod not_a_real_file; = help: to create the module `not_a_real_file`, create file "$DIR/not_a_real_file.rs" or "$DIR/not_a_real_file/mod.rs" = note: if there is a `mod not_a_real_file` elsewhere in the crate already, import it with `use crate::...` instead -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `mod_file_aux` +error[E0433]: cannot find module or crate `mod_file_aux` in this scope --> $DIR/mod_file_not_exist_windows.rs:7:16 | LL | assert_eq!(mod_file_aux::bar(), 10); diff --git a/tests/ui/pattern/pattern-error-continue.rs b/tests/ui/pattern/pattern-error-continue.rs index 664d4e80ef56..56c3fa1dda7d 100644 --- a/tests/ui/pattern/pattern-error-continue.rs +++ b/tests/ui/pattern/pattern-error-continue.rs @@ -32,6 +32,6 @@ fn main() { //~| NOTE expected `char`, found `bool` match () { - E::V => {} //~ ERROR failed to resolve: use of undeclared type `E` + E::V => {} //~ ERROR cannot find type `E` } } diff --git a/tests/ui/pattern/pattern-error-continue.stderr b/tests/ui/pattern/pattern-error-continue.stderr index de90d99a0ff1..5068f2800617 100644 --- a/tests/ui/pattern/pattern-error-continue.stderr +++ b/tests/ui/pattern/pattern-error-continue.stderr @@ -52,7 +52,7 @@ note: function defined here LL | fn f(_c: char) {} | ^ -------- -error[E0433]: failed to resolve: use of undeclared type `E` +error[E0433]: cannot find type `E` in this scope --> $DIR/pattern-error-continue.rs:35:9 | LL | E::V => {} diff --git a/tests/ui/privacy/restricted/test.rs b/tests/ui/privacy/restricted/test.rs index 82432b4db509..26018fbb01a6 100644 --- a/tests/ui/privacy/restricted/test.rs +++ b/tests/ui/privacy/restricted/test.rs @@ -48,6 +48,6 @@ fn main() { } mod pathological { - pub(in bad::path) mod m1 {} //~ ERROR failed to resolve: use of unresolved module or unlinked crate `bad` + pub(in bad::path) mod m1 {} //~ ERROR: cannot find module or crate `bad` pub(in foo) mod m2 {} //~ ERROR visibilities can only be restricted to ancestor modules } diff --git a/tests/ui/privacy/restricted/test.stderr b/tests/ui/privacy/restricted/test.stderr index 8d7925cf99fc..ae56e0bf7844 100644 --- a/tests/ui/privacy/restricted/test.stderr +++ b/tests/ui/privacy/restricted/test.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `bad` +error[E0433]: cannot find module or crate `bad` in the crate root --> $DIR/test.rs:51:12 | LL | pub(in bad::path) mod m1 {} diff --git a/tests/ui/privacy/unreachable-issue-121455.rs b/tests/ui/privacy/unreachable-issue-121455.rs index 5da30d6ed639..c1822034eb19 100644 --- a/tests/ui/privacy/unreachable-issue-121455.rs +++ b/tests/ui/privacy/unreachable-issue-121455.rs @@ -1,5 +1,6 @@ fn test(s: &Self::Id) { -//~^ ERROR failed to resolve: `Self` is only available in impls, traits, and type definitions +//~^ ERROR: cannot find `Self` +//~| NOTE: `Self` is only available in impls, traits, and type definitions match &s[0..3] {} } diff --git a/tests/ui/privacy/unreachable-issue-121455.stderr b/tests/ui/privacy/unreachable-issue-121455.stderr index 864e950a98eb..fe4c38081b74 100644 --- a/tests/ui/privacy/unreachable-issue-121455.stderr +++ b/tests/ui/privacy/unreachable-issue-121455.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions +error[E0433]: cannot find `Self` in this scope --> $DIR/unreachable-issue-121455.rs:1:13 | LL | fn test(s: &Self::Id) { diff --git a/tests/ui/proc-macro/amputate-span.stderr b/tests/ui/proc-macro/amputate-span.stderr index aa797339be46..bd2f39edec4f 100644 --- a/tests/ui/proc-macro/amputate-span.stderr +++ b/tests/ui/proc-macro/amputate-span.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of undeclared type `Command` +error[E0433]: cannot find type `Command` in this scope --> $DIR/amputate-span.rs:49:5 | LL | Command::new("git"); @@ -9,7 +9,7 @@ help: consider importing this struct LL + use std::process::Command; | -error[E0433]: failed to resolve: use of undeclared type `Command` +error[E0433]: cannot find type `Command` in this scope --> $DIR/amputate-span.rs:63:9 | LL | Command::new("git"); diff --git a/tests/ui/resolve/112590-2.fixed b/tests/ui/resolve/112590-2.fixed index bbc8d4b2954a..2bda2197d6d4 100644 --- a/tests/ui/resolve/112590-2.fixed +++ b/tests/ui/resolve/112590-2.fixed @@ -16,7 +16,7 @@ mod u { use foo::bar::baz::MyVec; fn _a() { - let _: Vec = MyVec::new(); //~ ERROR failed to resolve + let _: Vec = MyVec::new(); //~ ERROR cannot find } } @@ -24,12 +24,12 @@ mod v { use foo::bar::baz::MyVec; fn _b() { - let _: Vec = MyVec::new(); //~ ERROR failed to resolve + let _: Vec = MyVec::new(); //~ ERROR cannot find } } fn main() { - let _t: Vec = Vec::new(); //~ ERROR failed to resolve - type _B = vec::Vec::; //~ ERROR failed to resolve - let _t = AtomicBool::new(true); //~ ERROR failed to resolve + let _t: Vec = Vec::new(); //~ ERROR cannot find + type _B = vec::Vec::; //~ ERROR cannot find + let _t = AtomicBool::new(true); //~ ERROR cannot find } diff --git a/tests/ui/resolve/112590-2.rs b/tests/ui/resolve/112590-2.rs index 97d0b0bf2a94..a458ff501f97 100644 --- a/tests/ui/resolve/112590-2.rs +++ b/tests/ui/resolve/112590-2.rs @@ -10,18 +10,18 @@ mod foo { mod u { fn _a() { - let _: Vec = super::foo::baf::baz::MyVec::new(); //~ ERROR failed to resolve + let _: Vec = super::foo::baf::baz::MyVec::new(); //~ ERROR cannot find } } mod v { fn _b() { - let _: Vec = fox::bar::baz::MyVec::new(); //~ ERROR failed to resolve + let _: Vec = fox::bar::baz::MyVec::new(); //~ ERROR cannot find } } fn main() { - let _t: Vec = vec::new(); //~ ERROR failed to resolve - type _B = vec::Vec::; //~ ERROR failed to resolve - let _t = std::sync_error::atomic::AtomicBool::new(true); //~ ERROR failed to resolve + let _t: Vec = vec::new(); //~ ERROR cannot find + type _B = vec::Vec::; //~ ERROR cannot find + let _t = std::sync_error::atomic::AtomicBool::new(true); //~ ERROR cannot find } diff --git a/tests/ui/resolve/112590-2.stderr b/tests/ui/resolve/112590-2.stderr index d6f4a8f22a45..8569dd0c3fa0 100644 --- a/tests/ui/resolve/112590-2.stderr +++ b/tests/ui/resolve/112590-2.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: could not find `baf` in `foo` +error[E0433]: cannot find `baf` in `foo` --> $DIR/112590-2.rs:13:39 | LL | let _: Vec = super::foo::baf::baz::MyVec::new(); @@ -14,7 +14,7 @@ LL - let _: Vec = super::foo::baf::baz::MyVec::new(); LL + let _: Vec = MyVec::new(); | -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `fox` +error[E0433]: cannot find module or crate `fox` in this scope --> $DIR/112590-2.rs:19:27 | LL | let _: Vec = fox::bar::baz::MyVec::new(); @@ -31,7 +31,7 @@ LL - let _: Vec = fox::bar::baz::MyVec::new(); LL + let _: Vec = MyVec::new(); | -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `vec` +error[E0433]: cannot find module or crate `vec` in this scope --> $DIR/112590-2.rs:25:15 | LL | type _B = vec::Vec::; @@ -43,7 +43,7 @@ help: consider importing this module LL + use std::vec; | -error[E0433]: failed to resolve: could not find `sync_error` in `std` +error[E0433]: cannot find `sync_error` in `std` --> $DIR/112590-2.rs:26:19 | LL | let _t = std::sync_error::atomic::AtomicBool::new(true); @@ -59,7 +59,7 @@ LL - let _t = std::sync_error::atomic::AtomicBool::new(true); LL + let _t = AtomicBool::new(true); | -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `vec` +error[E0433]: cannot find module or crate `vec` in this scope --> $DIR/112590-2.rs:24:24 | LL | let _t: Vec = vec::new(); diff --git a/tests/ui/resolve/bad-module.rs b/tests/ui/resolve/bad-module.rs index 9fe06ab0f52e..0d59222e746f 100644 --- a/tests/ui/resolve/bad-module.rs +++ b/tests/ui/resolve/bad-module.rs @@ -1,7 +1,7 @@ fn main() { let foo = thing::len(Vec::new()); - //~^ ERROR failed to resolve: use of unresolved module or unlinked crate `thing` + //~^ ERROR cannot find module or crate `thing` let foo = foo::bar::baz(); - //~^ ERROR failed to resolve: use of unresolved module or unlinked crate `foo` + //~^ ERROR cannot find module or crate `foo` } diff --git a/tests/ui/resolve/bad-module.stderr b/tests/ui/resolve/bad-module.stderr index 0f597e126fdc..82c93ca973d1 100644 --- a/tests/ui/resolve/bad-module.stderr +++ b/tests/ui/resolve/bad-module.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `foo` +error[E0433]: cannot find module or crate `foo` in this scope --> $DIR/bad-module.rs:5:15 | LL | let foo = foo::bar::baz(); @@ -6,7 +6,7 @@ LL | let foo = foo::bar::baz(); | = help: you might be missing a crate named `foo` -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `thing` +error[E0433]: cannot find module or crate `thing` in this scope --> $DIR/bad-module.rs:2:15 | LL | let foo = thing::len(Vec::new()); diff --git a/tests/ui/resolve/editions-crate-root-2015.rs b/tests/ui/resolve/editions-crate-root-2015.rs index a2e19bfdf1c5..163984b4e8f7 100644 --- a/tests/ui/resolve/editions-crate-root-2015.rs +++ b/tests/ui/resolve/editions-crate-root-2015.rs @@ -2,17 +2,17 @@ mod inner { fn global_inner(_: ::nonexistant::Foo) { - //~^ ERROR failed to resolve: use of unresolved module or unlinked crate `nonexistant` + //~^ ERROR: cannot find module or crate `nonexistant` } fn crate_inner(_: crate::nonexistant::Foo) { - //~^ ERROR failed to resolve: use of unresolved module or unlinked crate `nonexistant` + //~^ ERROR: cannot find module or crate `nonexistant` } fn bare_global(_: ::nonexistant) { - //~^ ERROR cannot find type `nonexistant` in the crate root + //~^ ERROR: cannot find type `nonexistant` in the crate root } fn bare_crate(_: crate::nonexistant) { - //~^ ERROR cannot find type `nonexistant` in the crate root + //~^ ERROR: cannot find type `nonexistant` in the crate root } } diff --git a/tests/ui/resolve/editions-crate-root-2015.stderr b/tests/ui/resolve/editions-crate-root-2015.stderr index 989ee547a7c6..a4002349387a 100644 --- a/tests/ui/resolve/editions-crate-root-2015.stderr +++ b/tests/ui/resolve/editions-crate-root-2015.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nonexistant` +error[E0433]: cannot find module or crate `nonexistant` in the crate root --> $DIR/editions-crate-root-2015.rs:4:26 | LL | fn global_inner(_: ::nonexistant::Foo) { @@ -9,7 +9,7 @@ help: you might be missing a crate named `nonexistant`, add it to your project a LL + extern crate nonexistant; | -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nonexistant` +error[E0433]: cannot find module or crate `nonexistant` in `crate` --> $DIR/editions-crate-root-2015.rs:7:30 | LL | fn crate_inner(_: crate::nonexistant::Foo) { diff --git a/tests/ui/resolve/editions-crate-root-2018.rs b/tests/ui/resolve/editions-crate-root-2018.rs index 0e964d20f9c0..c07f617455ef 100644 --- a/tests/ui/resolve/editions-crate-root-2018.rs +++ b/tests/ui/resolve/editions-crate-root-2018.rs @@ -2,17 +2,17 @@ mod inner { fn global_inner(_: ::nonexistant::Foo) { - //~^ ERROR failed to resolve: could not find `nonexistant` in the list of imported crates + //~^ ERROR: cannot find `nonexistant` } fn crate_inner(_: crate::nonexistant::Foo) { - //~^ ERROR failed to resolve: could not find `nonexistant` in the crate root + //~^ ERROR: cannot find `nonexistant` } fn bare_global(_: ::nonexistant) { - //~^ ERROR cannot find crate `nonexistant` in the list of imported crates + //~^ ERROR: cannot find crate `nonexistant` } fn bare_crate(_: crate::nonexistant) { - //~^ ERROR cannot find type `nonexistant` in the crate root + //~^ ERROR: cannot find type `nonexistant` in the crate root } } diff --git a/tests/ui/resolve/editions-crate-root-2018.stderr b/tests/ui/resolve/editions-crate-root-2018.stderr index 1bcef3396199..c7ce93670051 100644 --- a/tests/ui/resolve/editions-crate-root-2018.stderr +++ b/tests/ui/resolve/editions-crate-root-2018.stderr @@ -1,10 +1,10 @@ -error[E0433]: failed to resolve: could not find `nonexistant` in the list of imported crates +error[E0433]: cannot find `nonexistant` in the crate root --> $DIR/editions-crate-root-2018.rs:4:26 | LL | fn global_inner(_: ::nonexistant::Foo) { | ^^^^^^^^^^^ could not find `nonexistant` in the list of imported crates -error[E0433]: failed to resolve: could not find `nonexistant` in the crate root +error[E0433]: cannot find `nonexistant` in `crate` --> $DIR/editions-crate-root-2018.rs:7:30 | LL | fn crate_inner(_: crate::nonexistant::Foo) { diff --git a/tests/ui/resolve/export-fully-qualified-2018.rs b/tests/ui/resolve/export-fully-qualified-2018.rs index ce78b64bf256..a6121c2e800c 100644 --- a/tests/ui/resolve/export-fully-qualified-2018.rs +++ b/tests/ui/resolve/export-fully-qualified-2018.rs @@ -5,7 +5,8 @@ // want to change eventually. mod foo { - pub fn bar() { foo::baz(); } //~ ERROR failed to resolve: use of unresolved module or unlinked crate `foo` + pub fn bar() { foo::baz(); } //~ ERROR: cannot find + //~^ NOTE: use of unresolved module or unlinked crate `foo` fn baz() { } } diff --git a/tests/ui/resolve/export-fully-qualified-2018.stderr b/tests/ui/resolve/export-fully-qualified-2018.stderr index a985669b8b41..25c9e6fbdab9 100644 --- a/tests/ui/resolve/export-fully-qualified-2018.stderr +++ b/tests/ui/resolve/export-fully-qualified-2018.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `foo` +error[E0433]: cannot find module or crate `foo` in this scope --> $DIR/export-fully-qualified-2018.rs:8:20 | LL | pub fn bar() { foo::baz(); } diff --git a/tests/ui/resolve/export-fully-qualified.rs b/tests/ui/resolve/export-fully-qualified.rs index 0be3b81ebb8f..db0570d64f26 100644 --- a/tests/ui/resolve/export-fully-qualified.rs +++ b/tests/ui/resolve/export-fully-qualified.rs @@ -5,7 +5,7 @@ // want to change eventually. mod foo { - pub fn bar() { foo::baz(); } //~ ERROR failed to resolve: use of unresolved module or unlinked crate `foo` + pub fn bar() { foo::baz(); } //~ ERROR cannot find module or crate `foo` fn baz() { } } diff --git a/tests/ui/resolve/export-fully-qualified.stderr b/tests/ui/resolve/export-fully-qualified.stderr index e65483e57eb5..f8433dcfb892 100644 --- a/tests/ui/resolve/export-fully-qualified.stderr +++ b/tests/ui/resolve/export-fully-qualified.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `foo` +error[E0433]: cannot find module or crate `foo` in this scope --> $DIR/export-fully-qualified.rs:8:20 | LL | pub fn bar() { foo::baz(); } diff --git a/tests/ui/resolve/extern-prelude-fail.rs b/tests/ui/resolve/extern-prelude-fail.rs index 7d0df03e57bb..d86ee9550b33 100644 --- a/tests/ui/resolve/extern-prelude-fail.rs +++ b/tests/ui/resolve/extern-prelude-fail.rs @@ -6,5 +6,5 @@ fn main() { use extern_prelude::S; //~ ERROR unresolved import `extern_prelude` - let s = ::extern_prelude::S; //~ ERROR failed to resolve + let s = ::extern_prelude::S; //~ ERROR cannot find module or crate `extern_prelude` } diff --git a/tests/ui/resolve/extern-prelude-fail.stderr b/tests/ui/resolve/extern-prelude-fail.stderr index b9668154f446..a6192051e95a 100644 --- a/tests/ui/resolve/extern-prelude-fail.stderr +++ b/tests/ui/resolve/extern-prelude-fail.stderr @@ -9,7 +9,7 @@ help: you might be missing a crate named `extern_prelude`, add it to your projec LL + extern crate extern_prelude; | -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `extern_prelude` +error[E0433]: cannot find module or crate `extern_prelude` in the crate root --> $DIR/extern-prelude-fail.rs:9:15 | LL | let s = ::extern_prelude::S; diff --git a/tests/ui/resolve/function-module-ambiguity-error-71406.rs b/tests/ui/resolve/function-module-ambiguity-error-71406.rs index a7964de9ba5e..21163e3486b4 100644 --- a/tests/ui/resolve/function-module-ambiguity-error-71406.rs +++ b/tests/ui/resolve/function-module-ambiguity-error-71406.rs @@ -3,5 +3,6 @@ use std::sync::mpsc; fn main() { let (tx, rx) = mpsc::channel::new(1); - //~^ ERROR expected type, found function `channel` in `mpsc` + //~^ ERROR: cannot find `channel` + //~| NOTE: expected type, found function `channel` in `mpsc` } diff --git a/tests/ui/resolve/function-module-ambiguity-error-71406.stderr b/tests/ui/resolve/function-module-ambiguity-error-71406.stderr index c25bafa0a5dd..e5b00f294f3c 100644 --- a/tests/ui/resolve/function-module-ambiguity-error-71406.stderr +++ b/tests/ui/resolve/function-module-ambiguity-error-71406.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: expected type, found function `channel` in `mpsc` +error[E0433]: cannot find `channel` in `mpsc` --> $DIR/function-module-ambiguity-error-71406.rs:5:26 | LL | let (tx, rx) = mpsc::channel::new(1); diff --git a/tests/ui/resolve/impl-items-vis-unresolved.rs b/tests/ui/resolve/impl-items-vis-unresolved.rs index 1494c1cf9680..bbdc8170d4f6 100644 --- a/tests/ui/resolve/impl-items-vis-unresolved.rs +++ b/tests/ui/resolve/impl-items-vis-unresolved.rs @@ -19,7 +19,7 @@ pub struct RawFloatState; impl RawFloatState { perftools_inline! { pub(super) fn new() {} - //~^ ERROR failed to resolve: there are too many leading `super` keywords + //~^ ERROR: too many leading `super` keywords } } diff --git a/tests/ui/resolve/impl-items-vis-unresolved.stderr b/tests/ui/resolve/impl-items-vis-unresolved.stderr index cccffdcbf541..e433cb607cda 100644 --- a/tests/ui/resolve/impl-items-vis-unresolved.stderr +++ b/tests/ui/resolve/impl-items-vis-unresolved.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: there are too many leading `super` keywords +error[E0433]: too many leading `super` keywords --> $DIR/impl-items-vis-unresolved.rs:21:13 | LL | pub(super) fn new() {} diff --git a/tests/ui/resolve/issue-101749-2.rs b/tests/ui/resolve/issue-101749-2.rs index 636ff07c71ce..60846713f63f 100644 --- a/tests/ui/resolve/issue-101749-2.rs +++ b/tests/ui/resolve/issue-101749-2.rs @@ -12,5 +12,5 @@ fn main() { let rect = Rectangle::new(3, 4); // `area` is not implemented for `Rectangle`, so this should not suggest let _ = rect::area(); - //~^ ERROR failed to resolve: use of unresolved module or unlinked crate `rect` + //~^ ERROR: cannot find module or crate `rect` } diff --git a/tests/ui/resolve/issue-101749-2.stderr b/tests/ui/resolve/issue-101749-2.stderr index 96a20b4bf5a0..f8ed9ceb830d 100644 --- a/tests/ui/resolve/issue-101749-2.stderr +++ b/tests/ui/resolve/issue-101749-2.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `rect` +error[E0433]: cannot find module or crate `rect` in this scope --> $DIR/issue-101749-2.rs:14:13 | LL | let _ = rect::area(); diff --git a/tests/ui/resolve/issue-101749.fixed b/tests/ui/resolve/issue-101749.fixed index 3244ad7a0313..ebd6533fe0e0 100644 --- a/tests/ui/resolve/issue-101749.fixed +++ b/tests/ui/resolve/issue-101749.fixed @@ -15,5 +15,5 @@ impl Rectangle { fn main() { let rect = Rectangle::new(3, 4); let _ = rect.area(); - //~^ ERROR failed to resolve: use of unresolved module or unlinked crate `rect` + //~^ ERROR: cannot find module or crate `rect` } diff --git a/tests/ui/resolve/issue-101749.rs b/tests/ui/resolve/issue-101749.rs index c977df41d2f5..4c1a2e0f4403 100644 --- a/tests/ui/resolve/issue-101749.rs +++ b/tests/ui/resolve/issue-101749.rs @@ -15,5 +15,5 @@ impl Rectangle { fn main() { let rect = Rectangle::new(3, 4); let _ = rect::area(); - //~^ ERROR failed to resolve: use of unresolved module or unlinked crate `rect` + //~^ ERROR: cannot find module or crate `rect` } diff --git a/tests/ui/resolve/issue-101749.stderr b/tests/ui/resolve/issue-101749.stderr index 09e800ec7c31..8a508f590161 100644 --- a/tests/ui/resolve/issue-101749.stderr +++ b/tests/ui/resolve/issue-101749.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `rect` +error[E0433]: cannot find module or crate `rect` in this scope --> $DIR/issue-101749.rs:17:13 | LL | let _ = rect::area(); diff --git a/tests/ui/resolve/issue-109250.rs b/tests/ui/resolve/issue-109250.rs index 68e33f693cef..99fcae9647bf 100644 --- a/tests/ui/resolve/issue-109250.rs +++ b/tests/ui/resolve/issue-109250.rs @@ -1,3 +1,3 @@ fn main() { //~ HELP consider importing - HashMap::new; //~ ERROR failed to resolve: use of undeclared type `HashMap` + HashMap::new; //~ ERROR cannot find type `HashMap` } diff --git a/tests/ui/resolve/issue-109250.stderr b/tests/ui/resolve/issue-109250.stderr index ad6cc6986229..d631232f73bf 100644 --- a/tests/ui/resolve/issue-109250.stderr +++ b/tests/ui/resolve/issue-109250.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of undeclared type `HashMap` +error[E0433]: cannot find type `HashMap` in this scope --> $DIR/issue-109250.rs:2:5 | LL | HashMap::new; diff --git a/tests/ui/resolve/issue-117920.rs b/tests/ui/resolve/issue-117920.rs index 928f194c59c3..6fbc412001f5 100644 --- a/tests/ui/resolve/issue-117920.rs +++ b/tests/ui/resolve/issue-117920.rs @@ -1,6 +1,6 @@ #![crate_type = "lib"] -use super::A; //~ ERROR failed to resolve +use super::A; //~ ERROR too many leading `super` keywords mod b { pub trait A {} diff --git a/tests/ui/resolve/issue-117920.stderr b/tests/ui/resolve/issue-117920.stderr index c4528d467e9f..810c2c06efe7 100644 --- a/tests/ui/resolve/issue-117920.stderr +++ b/tests/ui/resolve/issue-117920.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: there are too many leading `super` keywords +error[E0433]: too many leading `super` keywords --> $DIR/issue-117920.rs:3:5 | LL | use super::A; diff --git a/tests/ui/resolve/issue-24968.rs b/tests/ui/resolve/issue-24968.rs index 19e16abcee3c..22f5ea520467 100644 --- a/tests/ui/resolve/issue-24968.rs +++ b/tests/ui/resolve/issue-24968.rs @@ -19,12 +19,12 @@ const FOO: Self = 0; //~^ ERROR cannot find type `Self` const FOO2: u32 = Self::bar(); -//~^ ERROR failed to resolve: `Self` +//~^ ERROR cannot find `Self` static FOO_S: Self = 0; //~^ ERROR cannot find type `Self` static FOO_S2: u32 = Self::bar(); -//~^ ERROR failed to resolve: `Self` +//~^ ERROR cannot find `Self` fn main() {} diff --git a/tests/ui/resolve/issue-24968.stderr b/tests/ui/resolve/issue-24968.stderr index 82f5a1d5b57b..ce8ded2714f4 100644 --- a/tests/ui/resolve/issue-24968.stderr +++ b/tests/ui/resolve/issue-24968.stderr @@ -39,13 +39,13 @@ LL | static FOO_S: Self = 0; | | | `Self` not allowed in a static item -error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions +error[E0433]: cannot find `Self` in this scope --> $DIR/issue-24968.rs:21:19 | LL | const FOO2: u32 = Self::bar(); | ^^^^ `Self` is only available in impls, traits, and type definitions -error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions +error[E0433]: cannot find `Self` in this scope --> $DIR/issue-24968.rs:27:22 | LL | static FOO_S2: u32 = Self::bar(); diff --git a/tests/ui/resolve/issue-81508.rs b/tests/ui/resolve/issue-81508.rs index 23605cd2fd91..96d5f52feba0 100644 --- a/tests/ui/resolve/issue-81508.rs +++ b/tests/ui/resolve/issue-81508.rs @@ -8,7 +8,7 @@ fn main() { let Baz: &str = ""; - println!("{}", Baz::Bar); //~ ERROR: failed to resolve: use of undeclared type `Baz` + println!("{}", Baz::Bar); //~ ERROR: cannot find type `Baz` } #[allow(non_upper_case_globals)] @@ -17,6 +17,6 @@ pub const Foo: &str = ""; mod submod { use super::Foo; fn function() { - println!("{}", Foo::Bar); //~ ERROR: failed to resolve: use of undeclared type `Foo` + println!("{}", Foo::Bar); //~ ERROR: cannot find type `Foo` } } diff --git a/tests/ui/resolve/issue-81508.stderr b/tests/ui/resolve/issue-81508.stderr index 7258174ba89b..4e8d98989c3c 100644 --- a/tests/ui/resolve/issue-81508.stderr +++ b/tests/ui/resolve/issue-81508.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of undeclared type `Baz` +error[E0433]: cannot find type `Baz` in this scope --> $DIR/issue-81508.rs:11:20 | LL | let Baz: &str = ""; @@ -7,7 +7,7 @@ LL | LL | println!("{}", Baz::Bar); | ^^^ use of undeclared type `Baz` -error[E0433]: failed to resolve: use of undeclared type `Foo` +error[E0433]: cannot find type `Foo` in this scope --> $DIR/issue-81508.rs:20:24 | LL | use super::Foo; diff --git a/tests/ui/resolve/issue-82156.rs b/tests/ui/resolve/issue-82156.rs index 6215259e4865..fc6840faf636 100644 --- a/tests/ui/resolve/issue-82156.rs +++ b/tests/ui/resolve/issue-82156.rs @@ -1,3 +1,3 @@ fn main() { - super(); //~ ERROR failed to resolve: there are too many leading `super` keywords + super(); //~ ERROR: too many leading `super` keywords } diff --git a/tests/ui/resolve/issue-82156.stderr b/tests/ui/resolve/issue-82156.stderr index 3894b9573a45..6fe0d4c4ea15 100644 --- a/tests/ui/resolve/issue-82156.stderr +++ b/tests/ui/resolve/issue-82156.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: there are too many leading `super` keywords +error[E0433]: too many leading `super` keywords --> $DIR/issue-82156.rs:2:5 | LL | super(); diff --git a/tests/ui/resolve/issue-82865.rs b/tests/ui/resolve/issue-82865.rs index 30084b133e0f..545ca63e0b82 100644 --- a/tests/ui/resolve/issue-82865.rs +++ b/tests/ui/resolve/issue-82865.rs @@ -3,7 +3,7 @@ #![feature(decl_macro)] -use x::y::z; //~ ERROR: failed to resolve: use of unresolved module or unlinked crate `x` +use x::y::z; //~ ERROR: cannot find module or crate `x` macro mac () { Box::z //~ ERROR: no function or associated item diff --git a/tests/ui/resolve/issue-82865.stderr b/tests/ui/resolve/issue-82865.stderr index c9184bafd4c9..90059ad5a965 100644 --- a/tests/ui/resolve/issue-82865.stderr +++ b/tests/ui/resolve/issue-82865.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `x` +error[E0433]: cannot find module or crate `x` in the crate root --> $DIR/issue-82865.rs:6:5 | LL | use x::y::z; diff --git a/tests/ui/resolve/missing-in-namespace.rs b/tests/ui/resolve/missing-in-namespace.rs index e1dedb072b77..f54d478eb03a 100644 --- a/tests/ui/resolve/missing-in-namespace.rs +++ b/tests/ui/resolve/missing-in-namespace.rs @@ -1,4 +1,4 @@ fn main() { let _map = std::hahmap::HashMap::new(); - //~^ ERROR failed to resolve: could not find `hahmap` in `std + //~^ ERROR: cannot find `hahmap` in `std } diff --git a/tests/ui/resolve/missing-in-namespace.stderr b/tests/ui/resolve/missing-in-namespace.stderr index 35585e4240a2..cefcc097b1db 100644 --- a/tests/ui/resolve/missing-in-namespace.stderr +++ b/tests/ui/resolve/missing-in-namespace.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: could not find `hahmap` in `std` +error[E0433]: cannot find `hahmap` in `std` --> $DIR/missing-in-namespace.rs:2:21 | LL | let _map = std::hahmap::HashMap::new(); diff --git a/tests/ui/resolve/prelude-order.rs b/tests/ui/resolve/prelude-order.rs index c6683bdff22a..9bc3793dbf20 100644 --- a/tests/ui/resolve/prelude-order.rs +++ b/tests/ui/resolve/prelude-order.rs @@ -59,7 +59,7 @@ extern crate macro_helpers as _; /* lang and libs implicitly in scope */ // tool/extern -> extern -#[type_ns::inner] //~ ERROR could not find `inner` in `type_ns` +#[type_ns::inner] //~ ERROR cannot find `inner` in `type_ns` fn t1() {} // tool/lang -> tool @@ -71,7 +71,7 @@ fn t2() {} fn t3() {} // extern/lang -> extern -#[usize::inner] //~ ERROR could not find `inner` in `usize` +#[usize::inner] //~ ERROR cannot find `inner` in `usize` fn e1() {} // NOTE: testing with `-> usize` isn't valid, crates aren't considered in that scope // (unless they have generic arguments, for some reason.) diff --git a/tests/ui/resolve/prelude-order.stderr b/tests/ui/resolve/prelude-order.stderr index 4dad39fb6d24..c7929bf74d51 100644 --- a/tests/ui/resolve/prelude-order.stderr +++ b/tests/ui/resolve/prelude-order.stderr @@ -1,10 +1,10 @@ -error[E0433]: failed to resolve: could not find `inner` in `type_ns` +error[E0433]: cannot find `inner` in `type_ns` --> $DIR/prelude-order.rs:62:12 | LL | #[type_ns::inner] | ^^^^^ could not find `inner` in `type_ns` -error[E0433]: failed to resolve: could not find `inner` in `usize` +error[E0433]: cannot find `inner` in `usize` --> $DIR/prelude-order.rs:74:10 | LL | #[usize::inner] diff --git a/tests/ui/resolve/resolve-bad-visibility.rs b/tests/ui/resolve/resolve-bad-visibility.rs index 81635611fca9..55e381e8be1a 100644 --- a/tests/ui/resolve/resolve-bad-visibility.rs +++ b/tests/ui/resolve/resolve-bad-visibility.rs @@ -5,8 +5,8 @@ trait Tr {} pub(in E) struct S; //~ ERROR expected module, found enum `E` pub(in Tr) struct Z; //~ ERROR expected module, found trait `Tr` pub(in std::vec) struct F; //~ ERROR visibilities can only be restricted to ancestor modules -pub(in nonexistent) struct G; //~ ERROR failed to resolve -pub(in too_soon) struct H; //~ ERROR failed to resolve +pub(in nonexistent) struct G; //~ ERROR cannot find +pub(in too_soon) struct H; //~ ERROR cannot find // Visibilities are resolved eagerly without waiting for modules becoming fully populated. // Visibilities can only use ancestor modules legally which are always available in time, diff --git a/tests/ui/resolve/resolve-bad-visibility.stderr b/tests/ui/resolve/resolve-bad-visibility.stderr index c7bbdfbd2495..4530757c3de5 100644 --- a/tests/ui/resolve/resolve-bad-visibility.stderr +++ b/tests/ui/resolve/resolve-bad-visibility.stderr @@ -16,7 +16,7 @@ error[E0742]: visibilities can only be restricted to ancestor modules LL | pub(in std::vec) struct F; | ^^^^^^^^ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nonexistent` +error[E0433]: cannot find module or crate `nonexistent` in the crate root --> $DIR/resolve-bad-visibility.rs:8:8 | LL | pub(in nonexistent) struct G; @@ -27,7 +27,7 @@ help: you might be missing a crate named `nonexistent`, add it to your project a LL + extern crate nonexistent; | -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `too_soon` +error[E0433]: cannot find module or crate `too_soon` in the crate root --> $DIR/resolve-bad-visibility.rs:9:8 | LL | pub(in too_soon) struct H; diff --git a/tests/ui/resolve/resolve-variant-assoc-item.rs b/tests/ui/resolve/resolve-variant-assoc-item.rs index 7671dddc819b..edf97daa172a 100644 --- a/tests/ui/resolve/resolve-variant-assoc-item.rs +++ b/tests/ui/resolve/resolve-variant-assoc-item.rs @@ -3,6 +3,6 @@ enum E { V } use E::V; fn main() { - E::V::associated_item; //~ ERROR failed to resolve: `V` is a variant, not a module - V::associated_item; //~ ERROR failed to resolve: `V` is a variant, not a module + E::V::associated_item; //~ ERROR: cannot find + V::associated_item; //~ ERROR: cannot find } diff --git a/tests/ui/resolve/resolve-variant-assoc-item.stderr b/tests/ui/resolve/resolve-variant-assoc-item.stderr index 5528bb2495b5..460cea2dfb91 100644 --- a/tests/ui/resolve/resolve-variant-assoc-item.stderr +++ b/tests/ui/resolve/resolve-variant-assoc-item.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: `V` is a variant, not a module +error[E0433]: cannot find module `V` in `E` --> $DIR/resolve-variant-assoc-item.rs:6:8 | LL | E::V::associated_item; @@ -10,7 +10,7 @@ LL - E::V::associated_item; LL + E::associated_item; | -error[E0433]: failed to resolve: `V` is a variant, not a module +error[E0433]: cannot find module `V` in this scope --> $DIR/resolve-variant-assoc-item.rs:7:5 | LL | V::associated_item; diff --git a/tests/ui/resolve/tool-import.rs b/tests/ui/resolve/tool-import.rs index 951505b92a0b..bc34a64e7f93 100644 --- a/tests/ui/resolve/tool-import.rs +++ b/tests/ui/resolve/tool-import.rs @@ -1,7 +1,8 @@ //@ edition: 2018 use clippy::time::Instant; -//~^ ERROR `clippy` is a tool module +//~^ ERROR: cannot find module `clippy` +//~| NOTE: `clippy` is a tool module fn main() { Instant::now(); diff --git a/tests/ui/resolve/tool-import.stderr b/tests/ui/resolve/tool-import.stderr index b070439d72b7..02e4432fd9e5 100644 --- a/tests/ui/resolve/tool-import.stderr +++ b/tests/ui/resolve/tool-import.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: `clippy` is a tool module, not a module +error[E0433]: cannot find module `clippy` in this scope --> $DIR/tool-import.rs:3:5 | LL | use clippy::time::Instant; diff --git a/tests/ui/resolve/typo-suggestion-mistyped-in-path.rs b/tests/ui/resolve/typo-suggestion-mistyped-in-path.rs index 188e2ca7f113..706564dc9b21 100644 --- a/tests/ui/resolve/typo-suggestion-mistyped-in-path.rs +++ b/tests/ui/resolve/typo-suggestion-mistyped-in-path.rs @@ -25,18 +25,18 @@ fn main() { //~| NOTE function or associated item not found in `Struct` Struc::foo(); - //~^ ERROR failed to resolve: use of undeclared type `Struc` + //~^ ERROR cannot find type `Struc` //~| NOTE use of undeclared type `Struc` modul::foo(); - //~^ ERROR failed to resolve: use of unresolved module or unlinked crate `modul` + //~^ ERROR cannot find module or crate `modul` //~| NOTE use of unresolved module or unlinked crate `modul` module::Struc::foo(); - //~^ ERROR failed to resolve: could not find `Struc` in `module` + //~^ ERROR cannot find `Struc` in `module` //~| NOTE could not find `Struc` in `module` Trai::foo(); - //~^ ERROR failed to resolve: use of undeclared type `Trai` + //~^ ERROR cannot find type `Trai` //~| NOTE use of undeclared type `Trai` } diff --git a/tests/ui/resolve/typo-suggestion-mistyped-in-path.stderr b/tests/ui/resolve/typo-suggestion-mistyped-in-path.stderr index fef1f52b86b7..b1afa703eb03 100644 --- a/tests/ui/resolve/typo-suggestion-mistyped-in-path.stderr +++ b/tests/ui/resolve/typo-suggestion-mistyped-in-path.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: could not find `Struc` in `module` +error[E0433]: cannot find `Struc` in `module` --> $DIR/typo-suggestion-mistyped-in-path.rs:35:13 | LL | module::Struc::foo(); @@ -24,7 +24,7 @@ LL - Struct::fob(); LL + Struct::foo(); | -error[E0433]: failed to resolve: use of undeclared type `Struc` +error[E0433]: cannot find type `Struc` in this scope --> $DIR/typo-suggestion-mistyped-in-path.rs:27:5 | LL | Struc::foo(); @@ -35,7 +35,7 @@ help: a struct with a similar name exists LL | Struct::foo(); | + -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `modul` +error[E0433]: cannot find module or crate `modul` in this scope --> $DIR/typo-suggestion-mistyped-in-path.rs:31:5 | LL | modul::foo(); @@ -46,7 +46,7 @@ help: there is a crate or module with a similar name LL | module::foo(); | + -error[E0433]: failed to resolve: use of undeclared type `Trai` +error[E0433]: cannot find type `Trai` in this scope --> $DIR/typo-suggestion-mistyped-in-path.rs:39:5 | LL | Trai::foo(); diff --git a/tests/ui/resolve/unresolved-module-error-33293.rs b/tests/ui/resolve/unresolved-module-error-33293.rs index 354f9914d443..18906e610dca 100644 --- a/tests/ui/resolve/unresolved-module-error-33293.rs +++ b/tests/ui/resolve/unresolved-module-error-33293.rs @@ -2,6 +2,6 @@ fn main() { match 0 { aaa::bbb(_) => () - //~^ ERROR failed to resolve: use of unresolved module or unlinked crate `aaa` + //~^ ERROR: cannot find module or crate `aaa` }; } diff --git a/tests/ui/resolve/unresolved-module-error-33293.stderr b/tests/ui/resolve/unresolved-module-error-33293.stderr index 28528148387f..e119a69d2cc2 100644 --- a/tests/ui/resolve/unresolved-module-error-33293.stderr +++ b/tests/ui/resolve/unresolved-module-error-33293.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `aaa` +error[E0433]: cannot find module or crate `aaa` in this scope --> $DIR/unresolved-module-error-33293.rs:4:9 | LL | aaa::bbb(_) => () diff --git a/tests/ui/resolve/unresolved-segments-visibility.rs b/tests/ui/resolve/unresolved-segments-visibility.rs index fc86b31adfc2..b9695de1e999 100644 --- a/tests/ui/resolve/unresolved-segments-visibility.rs +++ b/tests/ui/resolve/unresolved-segments-visibility.rs @@ -6,6 +6,7 @@ extern crate alloc as b; mod foo { mod bar { pub(in crate::b::string::String::newy) extern crate alloc as e; - //~^ ERROR failed to resolve: `String` is a struct, not a module [E0433] + //~^ ERROR: cannot find module `String` in `string` [E0433] + //~| NOTE: `String` is a struct, not a module } } diff --git a/tests/ui/resolve/unresolved-segments-visibility.stderr b/tests/ui/resolve/unresolved-segments-visibility.stderr index 082579c9fa11..bfefdd6449d4 100644 --- a/tests/ui/resolve/unresolved-segments-visibility.stderr +++ b/tests/ui/resolve/unresolved-segments-visibility.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: `String` is a struct, not a module +error[E0433]: cannot find module `String` in `string` --> $DIR/unresolved-segments-visibility.rs:8:34 | LL | pub(in crate::b::string::String::newy) extern crate alloc as e; diff --git a/tests/ui/resolve/use_suggestion.rs b/tests/ui/resolve/use_suggestion.rs index 8c9bc6d76b8b..a23a61a39b84 100644 --- a/tests/ui/resolve/use_suggestion.rs +++ b/tests/ui/resolve/use_suggestion.rs @@ -1,6 +1,6 @@ fn main() { - let x1 = HashMap::new(); //~ ERROR failed to resolve - let x2 = GooMap::new(); //~ ERROR failed to resolve + let x1 = HashMap::new(); //~ ERROR cannot find + let x2 = GooMap::new(); //~ ERROR cannot find let y1: HashMap; //~ ERROR cannot find type let y2: GooMap; //~ ERROR cannot find type diff --git a/tests/ui/resolve/use_suggestion.stderr b/tests/ui/resolve/use_suggestion.stderr index 9981c97b2c17..98ef142e6b9c 100644 --- a/tests/ui/resolve/use_suggestion.stderr +++ b/tests/ui/resolve/use_suggestion.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of undeclared type `HashMap` +error[E0433]: cannot find type `HashMap` in this scope --> $DIR/use_suggestion.rs:2:14 | LL | let x1 = HashMap::new(); @@ -26,7 +26,7 @@ error[E0425]: cannot find type `GooMap` in this scope LL | let y2: GooMap; | ^^^^^^ not found in this scope -error[E0433]: failed to resolve: use of undeclared type `GooMap` +error[E0433]: cannot find type `GooMap` in this scope --> $DIR/use_suggestion.rs:3:14 | LL | let x2 = GooMap::new(); diff --git a/tests/ui/resolve/visibility-indeterminate.rs b/tests/ui/resolve/visibility-indeterminate.rs index 181bb2907743..8033a30b233c 100644 --- a/tests/ui/resolve/visibility-indeterminate.rs +++ b/tests/ui/resolve/visibility-indeterminate.rs @@ -2,6 +2,6 @@ foo!(); //~ ERROR cannot find macro `foo` in this scope -pub(in ::bar) struct Baz {} //~ ERROR failed to resolve: could not find `bar` in the list of imported crates +pub(in ::bar) struct Baz {} //~ ERROR cannot find `bar` fn main() {} diff --git a/tests/ui/resolve/visibility-indeterminate.stderr b/tests/ui/resolve/visibility-indeterminate.stderr index bbe28747f7c0..bd6fc11b6731 100644 --- a/tests/ui/resolve/visibility-indeterminate.stderr +++ b/tests/ui/resolve/visibility-indeterminate.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: could not find `bar` in the list of imported crates +error[E0433]: cannot find `bar` in the crate root --> $DIR/visibility-indeterminate.rs:5:10 | LL | pub(in ::bar) struct Baz {} diff --git a/tests/ui/rfcs/rfc-2126-crate-paths/crate-path-non-absolute.rs b/tests/ui/rfcs/rfc-2126-crate-paths/crate-path-non-absolute.rs index efadddf3ef1d..95486e37b691 100644 --- a/tests/ui/rfcs/rfc-2126-crate-paths/crate-path-non-absolute.rs +++ b/tests/ui/rfcs/rfc-2126-crate-paths/crate-path-non-absolute.rs @@ -3,8 +3,8 @@ struct S; pub mod m { fn f() { - let s = ::m::crate::S; //~ ERROR failed to resolve - let s1 = ::crate::S; //~ ERROR failed to resolve + let s = ::m::crate::S; //~ ERROR: `crate` in paths can only be used in start position + let s1 = ::crate::S; //~ ERROR: global paths cannot start with `crate` let s2 = crate::S; // no error } } diff --git a/tests/ui/rfcs/rfc-2126-crate-paths/crate-path-non-absolute.stderr b/tests/ui/rfcs/rfc-2126-crate-paths/crate-path-non-absolute.stderr index 6cb96e5762ad..a267c037d1ff 100644 --- a/tests/ui/rfcs/rfc-2126-crate-paths/crate-path-non-absolute.stderr +++ b/tests/ui/rfcs/rfc-2126-crate-paths/crate-path-non-absolute.stderr @@ -1,14 +1,14 @@ -error[E0433]: failed to resolve: `crate` in paths can only be used in start position +error[E0433]: `crate` in paths can only be used in start position --> $DIR/crate-path-non-absolute.rs:6:22 | LL | let s = ::m::crate::S; - | ^^^^^ `crate` in paths can only be used in start position + | ^^^^^ can only be used in path start position -error[E0433]: failed to resolve: global paths cannot start with `crate` +error[E0433]: global paths cannot start with `crate` --> $DIR/crate-path-non-absolute.rs:7:20 | LL | let s1 = ::crate::S; - | ^^^^^ global paths cannot start with `crate` + | ^^^^^ cannot start with this error: aborting due to 2 previous errors diff --git a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.rs b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.rs index 6bbfb69800e1..f8450d2ba009 100644 --- a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.rs +++ b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.rs @@ -2,5 +2,5 @@ fn main() { let s = ::xcrate::S; - //~^ ERROR failed to resolve: could not find `xcrate` in the list of imported crates + //~^ ERROR cannot find `xcrate` } diff --git a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.stderr b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.stderr index e3875fd843b6..553365c93223 100644 --- a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.stderr +++ b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: could not find `xcrate` in the list of imported crates +error[E0433]: cannot find `xcrate` in the crate root --> $DIR/non-existent-2.rs:4:15 | LL | let s = ::xcrate::S; diff --git a/tests/ui/simd/portable-intrinsics-arent-exposed.stderr b/tests/ui/simd/portable-intrinsics-arent-exposed.stderr index 043a4ca37618..21a6c3d65081 100644 --- a/tests/ui/simd/portable-intrinsics-arent-exposed.stderr +++ b/tests/ui/simd/portable-intrinsics-arent-exposed.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: you might be missing crate `core` +error[E0433]: cannot find `core` in the crate root --> $DIR/portable-intrinsics-arent-exposed.rs:5:5 | LL | use core::simd::intrinsics; diff --git a/tests/ui/span/visibility-ty-params.rs b/tests/ui/span/visibility-ty-params.rs index 05d93e546360..7817d134c77b 100644 --- a/tests/ui/span/visibility-ty-params.rs +++ b/tests/ui/span/visibility-ty-params.rs @@ -4,7 +4,7 @@ macro_rules! m { struct S(T); m!{ crate::S } //~ ERROR unexpected generic arguments in path - //~| ERROR failed to resolve: `S` is a struct, not a module [E0433] + //~| ERROR cannot find mod m { m!{ crate::m<> } //~ ERROR unexpected generic arguments in path diff --git a/tests/ui/span/visibility-ty-params.stderr b/tests/ui/span/visibility-ty-params.stderr index 7b02d79a1bc2..2fda6c70de0d 100644 --- a/tests/ui/span/visibility-ty-params.stderr +++ b/tests/ui/span/visibility-ty-params.stderr @@ -4,7 +4,7 @@ error: unexpected generic arguments in path LL | m!{ crate::S } | ^^^^ -error[E0433]: failed to resolve: `S` is a struct, not a module +error[E0433]: cannot find module `S` in `crate` --> $DIR/visibility-ty-params.rs:6:12 | LL | m!{ crate::S } diff --git a/tests/ui/suggestions/core-std-import-order-issue-83564.no_std.fixed b/tests/ui/suggestions/core-std-import-order-issue-83564.no_std.fixed index b7b94a051212..3ab6ad8b85f5 100644 --- a/tests/ui/suggestions/core-std-import-order-issue-83564.no_std.fixed +++ b/tests/ui/suggestions/core-std-import-order-issue-83564.no_std.fixed @@ -12,7 +12,7 @@ use core::num::NonZero; fn main() { //~^ HELP consider importing this struct let _x = NonZero::new(5u32).unwrap(); - //~^ ERROR failed to resolve: use of undeclared type `NonZero` + //~^ ERROR cannot find type `NonZero` } #[allow(dead_code)] diff --git a/tests/ui/suggestions/core-std-import-order-issue-83564.no_std.stderr b/tests/ui/suggestions/core-std-import-order-issue-83564.no_std.stderr index d73f613bf9c8..37bfb07b2295 100644 --- a/tests/ui/suggestions/core-std-import-order-issue-83564.no_std.stderr +++ b/tests/ui/suggestions/core-std-import-order-issue-83564.no_std.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of undeclared type `NonZero` +error[E0433]: cannot find type `NonZero` in this scope --> $DIR/core-std-import-order-issue-83564.rs:12:14 | LL | let _x = NonZero::new(5u32).unwrap(); diff --git a/tests/ui/suggestions/core-std-import-order-issue-83564.rs b/tests/ui/suggestions/core-std-import-order-issue-83564.rs index 4cfc9a6bf742..e7a56a44d921 100644 --- a/tests/ui/suggestions/core-std-import-order-issue-83564.rs +++ b/tests/ui/suggestions/core-std-import-order-issue-83564.rs @@ -10,7 +10,7 @@ fn main() { //~^ HELP consider importing this struct let _x = NonZero::new(5u32).unwrap(); - //~^ ERROR failed to resolve: use of undeclared type `NonZero` + //~^ ERROR cannot find type `NonZero` } #[allow(dead_code)] diff --git a/tests/ui/suggestions/core-std-import-order-issue-83564.std.fixed b/tests/ui/suggestions/core-std-import-order-issue-83564.std.fixed index 84c7c19d19e2..802177578846 100644 --- a/tests/ui/suggestions/core-std-import-order-issue-83564.std.fixed +++ b/tests/ui/suggestions/core-std-import-order-issue-83564.std.fixed @@ -12,7 +12,7 @@ use std::num::NonZero; fn main() { //~^ HELP consider importing this struct let _x = NonZero::new(5u32).unwrap(); - //~^ ERROR failed to resolve: use of undeclared type `NonZero` + //~^ ERROR cannot find type `NonZero` } #[allow(dead_code)] diff --git a/tests/ui/suggestions/core-std-import-order-issue-83564.std.stderr b/tests/ui/suggestions/core-std-import-order-issue-83564.std.stderr index ebfe197b45d6..ad0ac7859a8d 100644 --- a/tests/ui/suggestions/core-std-import-order-issue-83564.std.stderr +++ b/tests/ui/suggestions/core-std-import-order-issue-83564.std.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of undeclared type `NonZero` +error[E0433]: cannot find type `NonZero` in this scope --> $DIR/core-std-import-order-issue-83564.rs:12:14 | LL | let _x = NonZero::new(5u32).unwrap(); diff --git a/tests/ui/suggestions/crate-or-module-typo.rs b/tests/ui/suggestions/crate-or-module-typo.rs index 393fc7a1f72e..8a6df258b452 100644 --- a/tests/ui/suggestions/crate-or-module-typo.rs +++ b/tests/ui/suggestions/crate-or-module-typo.rs @@ -1,9 +1,9 @@ //@ edition:2018 -use st::cell::Cell; //~ ERROR failed to resolve: use of unresolved module or unlinked crate `st` +use st::cell::Cell; //~ ERROR cannot find module or crate `st` mod bar { - pub fn bar() { bar::baz(); } //~ ERROR failed to resolve: function `bar` is not a crate or module + pub fn bar() { bar::baz(); } //~ ERROR cannot find module or crate `bar` fn baz() {} } @@ -11,7 +11,7 @@ mod bar { use bas::bar; //~ ERROR unresolved import `bas` struct Foo { - bar: st::cell::Cell //~ ERROR failed to resolve: use of unresolved module or unlinked crate `st` + bar: st::cell::Cell //~ ERROR cannot find module or crate `st` } fn main() {} diff --git a/tests/ui/suggestions/crate-or-module-typo.stderr b/tests/ui/suggestions/crate-or-module-typo.stderr index 2ec4fc7ed6cc..49ac1c89ab52 100644 --- a/tests/ui/suggestions/crate-or-module-typo.stderr +++ b/tests/ui/suggestions/crate-or-module-typo.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `st` +error[E0433]: cannot find module or crate `st` in this scope --> $DIR/crate-or-module-typo.rs:3:5 | LL | use st::cell::Cell; @@ -21,7 +21,7 @@ LL - use bas::bar; LL + use bar::bar; | -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `st` +error[E0433]: cannot find module or crate `st` in this scope --> $DIR/crate-or-module-typo.rs:14:10 | LL | bar: st::cell::Cell @@ -41,7 +41,7 @@ LL - bar: st::cell::Cell LL + bar: cell::Cell | -error[E0433]: failed to resolve: function `bar` is not a crate or module +error[E0433]: cannot find module or crate `bar` in this scope --> $DIR/crate-or-module-typo.rs:6:20 | LL | pub fn bar() { bar::baz(); } diff --git a/tests/ui/suggestions/issue-103112.rs b/tests/ui/suggestions/issue-103112.rs index 111ae7c73080..795fe60fd693 100644 --- a/tests/ui/suggestions/issue-103112.rs +++ b/tests/ui/suggestions/issue-103112.rs @@ -1,4 +1,4 @@ fn main() { std::process::abort!(); - //~^ ERROR: failed to resolve + //~^ ERROR: cannot find } diff --git a/tests/ui/suggestions/issue-103112.stderr b/tests/ui/suggestions/issue-103112.stderr index b7de57bfd90e..b644eff920d6 100644 --- a/tests/ui/suggestions/issue-103112.stderr +++ b/tests/ui/suggestions/issue-103112.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: could not find `abort` in `process` +error[E0433]: cannot find `abort` in `process` --> $DIR/issue-103112.rs:2:19 | LL | std::process::abort!(); diff --git a/tests/ui/suggestions/issue-112590-suggest-import.rs b/tests/ui/suggestions/issue-112590-suggest-import.rs index a7868b719190..ec7a3cbac1de 100644 --- a/tests/ui/suggestions/issue-112590-suggest-import.rs +++ b/tests/ui/suggestions/issue-112590-suggest-import.rs @@ -1,8 +1,9 @@ pub struct S; -impl fmt::Debug for S { //~ ERROR failed to resolve: use of unresolved module or unlinked crate `fmt` - fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result { //~ ERROR failed to resolve: use of unresolved module or unlinked crate `fmt` - //~^ ERROR failed to resolve: use of unresolved module or unlinked crate `fmt` +impl fmt::Debug for S { //~ ERROR: cannot find module or crate `fmt` + fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result { + //~^ ERROR: cannot find module or crate `fmt` + //~| ERROR: cannot find module or crate `fmt` Ok(()) } } diff --git a/tests/ui/suggestions/issue-112590-suggest-import.stderr b/tests/ui/suggestions/issue-112590-suggest-import.stderr index bbbd2c481c1c..b44b59bea181 100644 --- a/tests/ui/suggestions/issue-112590-suggest-import.stderr +++ b/tests/ui/suggestions/issue-112590-suggest-import.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `fmt` +error[E0433]: cannot find module or crate `fmt` in this scope --> $DIR/issue-112590-suggest-import.rs:3:6 | LL | impl fmt::Debug for S { @@ -10,7 +10,7 @@ help: consider importing this module LL + use std::fmt; | -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `fmt` +error[E0433]: cannot find module or crate `fmt` in this scope --> $DIR/issue-112590-suggest-import.rs:4:28 | LL | fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result { @@ -22,7 +22,7 @@ help: consider importing this module LL + use std::fmt; | -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `fmt` +error[E0433]: cannot find module or crate `fmt` in this scope --> $DIR/issue-112590-suggest-import.rs:4:51 | LL | fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result { diff --git a/tests/ui/suggestions/suggest-tryinto-edition-change.rs b/tests/ui/suggestions/suggest-tryinto-edition-change.rs index f45670ae7c1e..06675a8e530b 100644 --- a/tests/ui/suggestions/suggest-tryinto-edition-change.rs +++ b/tests/ui/suggestions/suggest-tryinto-edition-change.rs @@ -8,17 +8,17 @@ fn test() { //~| NOTE 'std::convert::TryInto' is included in the prelude starting in Edition 2021 let _i: i16 = TryFrom::try_from(0_i32).unwrap(); - //~^ ERROR failed to resolve: use of undeclared type + //~^ ERROR cannot find //~| NOTE use of undeclared type //~| NOTE 'std::convert::TryFrom' is included in the prelude starting in Edition 2021 let _i: i16 = TryInto::try_into(0_i32).unwrap(); - //~^ ERROR failed to resolve: use of undeclared type + //~^ ERROR cannot find //~| NOTE use of undeclared type //~| NOTE 'std::convert::TryInto' is included in the prelude starting in Edition 2021 let _v: Vec<_> = FromIterator::from_iter(&[1]); - //~^ ERROR failed to resolve: use of undeclared type + //~^ ERROR cannot find //~| NOTE use of undeclared type //~| NOTE 'std::iter::FromIterator' is included in the prelude starting in Edition 2021 } diff --git a/tests/ui/suggestions/suggest-tryinto-edition-change.stderr b/tests/ui/suggestions/suggest-tryinto-edition-change.stderr index 8ab8a1716b14..b0d150f49c73 100644 --- a/tests/ui/suggestions/suggest-tryinto-edition-change.stderr +++ b/tests/ui/suggestions/suggest-tryinto-edition-change.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of undeclared type `TryFrom` +error[E0433]: cannot find type `TryFrom` in this scope --> $DIR/suggest-tryinto-edition-change.rs:10:19 | LL | let _i: i16 = TryFrom::try_from(0_i32).unwrap(); @@ -10,7 +10,7 @@ help: consider importing this trait LL + use std::convert::TryFrom; | -error[E0433]: failed to resolve: use of undeclared type `TryInto` +error[E0433]: cannot find type `TryInto` in this scope --> $DIR/suggest-tryinto-edition-change.rs:15:19 | LL | let _i: i16 = TryInto::try_into(0_i32).unwrap(); @@ -22,7 +22,7 @@ help: consider importing this trait LL + use std::convert::TryInto; | -error[E0433]: failed to resolve: use of undeclared type `FromIterator` +error[E0433]: cannot find type `FromIterator` in this scope --> $DIR/suggest-tryinto-edition-change.rs:20:22 | LL | let _v: Vec<_> = FromIterator::from_iter(&[1]); diff --git a/tests/ui/suggestions/undeclared-module-alloc.rs b/tests/ui/suggestions/undeclared-module-alloc.rs index a0bddc94471c..a19e828f2a9b 100644 --- a/tests/ui/suggestions/undeclared-module-alloc.rs +++ b/tests/ui/suggestions/undeclared-module-alloc.rs @@ -1,5 +1,5 @@ //@ edition:2018 -use alloc::rc::Rc; //~ ERROR failed to resolve: use of unresolved module or unlinked crate `alloc` +use alloc::rc::Rc; //~ ERROR cannot find module or crate `alloc` fn main() {} diff --git a/tests/ui/suggestions/undeclared-module-alloc.stderr b/tests/ui/suggestions/undeclared-module-alloc.stderr index 00e498aa9ba9..c73efa8a3614 100644 --- a/tests/ui/suggestions/undeclared-module-alloc.stderr +++ b/tests/ui/suggestions/undeclared-module-alloc.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `alloc` +error[E0433]: cannot find module or crate `alloc` in this scope --> $DIR/undeclared-module-alloc.rs:3:5 | LL | use alloc::rc::Rc; diff --git a/tests/ui/tool-attributes/tool-attributes-shadowing.rs b/tests/ui/tool-attributes/tool-attributes-shadowing.rs index 21bbaa3a7105..582c99b089f5 100644 --- a/tests/ui/tool-attributes/tool-attributes-shadowing.rs +++ b/tests/ui/tool-attributes/tool-attributes-shadowing.rs @@ -1,4 +1,4 @@ mod rustfmt {} -#[rustfmt::skip] //~ ERROR failed to resolve: could not find `skip` in `rustfmt` +#[rustfmt::skip] //~ ERROR: cannot find `skip` in `rustfmt` fn main() {} diff --git a/tests/ui/tool-attributes/tool-attributes-shadowing.stderr b/tests/ui/tool-attributes/tool-attributes-shadowing.stderr index f2da61727228..5ca1fdf586d4 100644 --- a/tests/ui/tool-attributes/tool-attributes-shadowing.stderr +++ b/tests/ui/tool-attributes/tool-attributes-shadowing.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: could not find `skip` in `rustfmt` +error[E0433]: cannot find `skip` in `rustfmt` --> $DIR/tool-attributes-shadowing.rs:3:12 | LL | #[rustfmt::skip] diff --git a/tests/ui/tool-attributes/unknown-tool-name.rs b/tests/ui/tool-attributes/unknown-tool-name.rs index ba21aecc230a..a87385329eff 100644 --- a/tests/ui/tool-attributes/unknown-tool-name.rs +++ b/tests/ui/tool-attributes/unknown-tool-name.rs @@ -1,2 +1,3 @@ -#[foo::bar] //~ ERROR failed to resolve: use of unresolved module or unlinked crate `foo` +#[foo::bar] //~ ERROR: cannot find module or crate `foo` +//~^ NOTE: use of unresolved module or unlinked crate `foo` fn main() {} diff --git a/tests/ui/tool-attributes/unknown-tool-name.stderr b/tests/ui/tool-attributes/unknown-tool-name.stderr index 9b636fcb0bdd..5a2b0e840be3 100644 --- a/tests/ui/tool-attributes/unknown-tool-name.stderr +++ b/tests/ui/tool-attributes/unknown-tool-name.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `foo` +error[E0433]: cannot find module or crate `foo` in this scope --> $DIR/unknown-tool-name.rs:1:3 | LL | #[foo::bar] diff --git a/tests/ui/traits/bound/unknown-assoc-with-const-arg.rs b/tests/ui/traits/bound/unknown-assoc-with-const-arg.rs index 0da68afb5926..1b04d8f91827 100644 --- a/tests/ui/traits/bound/unknown-assoc-with-const-arg.rs +++ b/tests/ui/traits/bound/unknown-assoc-with-const-arg.rs @@ -7,7 +7,7 @@ trait X { trait Y { fn a() -> NOT_EXIST::unknown<{}> {} - //~^ ERROR: failed to resolve: use of undeclared type `NOT_EXIST` + //~^ ERROR: cannot find type `NOT_EXIST` } trait Z { diff --git a/tests/ui/traits/bound/unknown-assoc-with-const-arg.stderr b/tests/ui/traits/bound/unknown-assoc-with-const-arg.stderr index 49e41f75ff35..6a78fa04fe66 100644 --- a/tests/ui/traits/bound/unknown-assoc-with-const-arg.stderr +++ b/tests/ui/traits/bound/unknown-assoc-with-const-arg.stderr @@ -10,7 +10,7 @@ error[E0220]: associated type `unknown` not found for `T` LL | fn a() -> T::unknown<{}> {} | ^^^^^^^ associated type `unknown` not found -error[E0433]: failed to resolve: use of undeclared type `NOT_EXIST` +error[E0433]: cannot find type `NOT_EXIST` in this scope --> $DIR/unknown-assoc-with-const-arg.rs:9:15 | LL | fn a() -> NOT_EXIST::unknown<{}> {} diff --git a/tests/ui/traits/const-traits/issue-102156.stderr b/tests/ui/traits/const-traits/issue-102156.stderr index 20505b685f30..22cd13527c6d 100644 --- a/tests/ui/traits/const-traits/issue-102156.stderr +++ b/tests/ui/traits/const-traits/issue-102156.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: you might be missing crate `core` +error[E0433]: cannot find `core` in the crate root --> $DIR/issue-102156.rs:5:5 | LL | use core::convert::{From, TryFrom}; @@ -7,7 +7,7 @@ LL | use core::convert::{From, TryFrom}; | you might be missing crate `core` | help: try using `std` instead of `core`: `std` -error[E0433]: failed to resolve: you might be missing crate `core` +error[E0433]: cannot find `core` in the crate root --> $DIR/issue-102156.rs:5:5 | LL | use core::convert::{From, TryFrom}; diff --git a/tests/ui/type-alias/issue-62263-self-in-atb.rs b/tests/ui/type-alias/issue-62263-self-in-atb.rs index 91522d8912f7..0f8d88310bcd 100644 --- a/tests/ui/type-alias/issue-62263-self-in-atb.rs +++ b/tests/ui/type-alias/issue-62263-self-in-atb.rs @@ -3,6 +3,6 @@ pub trait Trait { } pub type Alias = dyn Trait; -//~^ ERROR failed to resolve: `Self` +//~^ ERROR cannot find `Self` fn main() {} diff --git a/tests/ui/type-alias/issue-62263-self-in-atb.stderr b/tests/ui/type-alias/issue-62263-self-in-atb.stderr index 18c8bc1a1b36..aa9e37ce71c7 100644 --- a/tests/ui/type-alias/issue-62263-self-in-atb.stderr +++ b/tests/ui/type-alias/issue-62263-self-in-atb.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions +error[E0433]: cannot find `Self` in this scope --> $DIR/issue-62263-self-in-atb.rs:5:32 | LL | pub type Alias = dyn Trait; diff --git a/tests/ui/type-alias/issue-62305-self-assoc-ty.rs b/tests/ui/type-alias/issue-62305-self-assoc-ty.rs index a4d9a285485e..47a6838c9100 100644 --- a/tests/ui/type-alias/issue-62305-self-assoc-ty.rs +++ b/tests/ui/type-alias/issue-62305-self-assoc-ty.rs @@ -1,4 +1,4 @@ type Alias = Self::Target; -//~^ ERROR failed to resolve: `Self` +//~^ ERROR cannot find `Self` fn main() {} diff --git a/tests/ui/type-alias/issue-62305-self-assoc-ty.stderr b/tests/ui/type-alias/issue-62305-self-assoc-ty.stderr index a35e644d3aa8..5bec48f007ca 100644 --- a/tests/ui/type-alias/issue-62305-self-assoc-ty.stderr +++ b/tests/ui/type-alias/issue-62305-self-assoc-ty.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions +error[E0433]: cannot find `Self` in this scope --> $DIR/issue-62305-self-assoc-ty.rs:1:14 | LL | type Alias = Self::Target; diff --git a/tests/ui/type/type-path-err-node-types.rs b/tests/ui/type/type-path-err-node-types.rs index b3795772e6fe..a4ff4f497b47 100644 --- a/tests/ui/type/type-path-err-node-types.rs +++ b/tests/ui/type/type-path-err-node-types.rs @@ -12,7 +12,7 @@ fn ufcs_trait() { } fn ufcs_item() { - NonExistent::Assoc::; //~ ERROR undeclared type `NonExistent` + NonExistent::Assoc::; //~ ERROR cannot find type `NonExistent` } fn method() { diff --git a/tests/ui/type/type-path-err-node-types.stderr b/tests/ui/type/type-path-err-node-types.stderr index a9e999f80b3a..d03d5d0b55c9 100644 --- a/tests/ui/type/type-path-err-node-types.stderr +++ b/tests/ui/type/type-path-err-node-types.stderr @@ -16,7 +16,7 @@ error[E0425]: cannot find value `nonexistent` in this scope LL | nonexistent.nonexistent::(); | ^^^^^^^^^^^ not found in this scope -error[E0433]: failed to resolve: use of undeclared type `NonExistent` +error[E0433]: cannot find type `NonExistent` in this scope --> $DIR/type-path-err-node-types.rs:15:5 | LL | NonExistent::Assoc::; diff --git a/tests/ui/typeck/issue-120856.rs b/tests/ui/typeck/issue-120856.rs index 51dd63a6f89d..bd92adf529f8 100644 --- a/tests/ui/typeck/issue-120856.rs +++ b/tests/ui/typeck/issue-120856.rs @@ -1,5 +1,7 @@ pub type Archived = ::Archived; -//~^ ERROR failed to resolve: use of unresolved module or unlinked crate `m` -//~| ERROR failed to resolve: use of unresolved module or unlinked crate `n` +//~^ ERROR: cannot find module or crate `m` in this scope +//~| ERROR: cannot find module or crate `n` in this scope +//~| NOTE: use of unresolved module or unlinked crate `m` +//~| NOTE: use of unresolved module or unlinked crate `n` fn main() {} diff --git a/tests/ui/typeck/issue-120856.stderr b/tests/ui/typeck/issue-120856.stderr index 4ff9f345c48b..026c38da2959 100644 --- a/tests/ui/typeck/issue-120856.stderr +++ b/tests/ui/typeck/issue-120856.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `n` +error[E0433]: cannot find module or crate `n` in this scope --> $DIR/issue-120856.rs:1:37 | LL | pub type Archived = ::Archived; @@ -10,7 +10,7 @@ help: a trait with a similar name exists LL | pub type Archived = ::Archived; | + -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `m` +error[E0433]: cannot find module or crate `m` in this scope --> $DIR/issue-120856.rs:1:25 | LL | pub type Archived = ::Archived; diff --git a/tests/ui/typeck/path-to-method-sugg-unresolved-expr.cargo-invoked.stderr b/tests/ui/typeck/path-to-method-sugg-unresolved-expr.cargo-invoked.stderr index 8a3b87b0d11a..8ff61b21ad1f 100644 --- a/tests/ui/typeck/path-to-method-sugg-unresolved-expr.cargo-invoked.stderr +++ b/tests/ui/typeck/path-to-method-sugg-unresolved-expr.cargo-invoked.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `page_size` +error[E0433]: cannot find module or crate `page_size` in this scope --> $DIR/path-to-method-sugg-unresolved-expr.rs:5:21 | LL | let page_size = page_size::get(); diff --git a/tests/ui/typeck/path-to-method-sugg-unresolved-expr.only-rustc.stderr b/tests/ui/typeck/path-to-method-sugg-unresolved-expr.only-rustc.stderr index 34ed5c44d931..0cf3394cfedd 100644 --- a/tests/ui/typeck/path-to-method-sugg-unresolved-expr.only-rustc.stderr +++ b/tests/ui/typeck/path-to-method-sugg-unresolved-expr.only-rustc.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `page_size` +error[E0433]: cannot find module or crate `page_size` in this scope --> $DIR/path-to-method-sugg-unresolved-expr.rs:5:21 | LL | let page_size = page_size::get(); diff --git a/tests/ui/typeck/path-to-method-sugg-unresolved-expr.rs b/tests/ui/typeck/path-to-method-sugg-unresolved-expr.rs index e095850879cd..035e7afb30d9 100644 --- a/tests/ui/typeck/path-to-method-sugg-unresolved-expr.rs +++ b/tests/ui/typeck/path-to-method-sugg-unresolved-expr.rs @@ -3,7 +3,7 @@ //@[cargo-invoked] rustc-env:CARGO_CRATE_NAME=foo fn main() { let page_size = page_size::get(); - //~^ ERROR failed to resolve: use of unresolved module or unlinked crate `page_size` + //~^ ERROR cannot find module or crate `page_size` //~| NOTE use of unresolved module or unlinked crate `page_size` //[cargo-invoked]~^^^ HELP if you wanted to use a crate named `page_size`, use `cargo add //[only-rustc]~^^^^ HELP you might be missing a crate named `page_size` diff --git a/tests/ui/use/use-path-segment-kw.rs b/tests/ui/use/use-path-segment-kw.rs index 680ecd3d03d4..fffc027ac6fd 100644 --- a/tests/ui/use/use-path-segment-kw.rs +++ b/tests/ui/use/use-path-segment-kw.rs @@ -9,43 +9,43 @@ macro_rules! macro_dollar_crate { use $crate; //~ ERROR `$crate` may not be imported pub use $crate as _dollar_crate; //~ ERROR `$crate` may not be imported - type A2 = ::$crate; //~ ERROR failed to resolve: global paths cannot start with `$crate` + type A2 = ::$crate; //~ ERROR global paths cannot start with `$crate` use ::$crate; //~ ERROR unresolved import `$crate` use ::$crate as _dollar_crate2; //~ ERROR unresolved import `$crate` use ::{$crate}; //~ ERROR unresolved import `$crate` use ::{$crate as _nested_dollar_crate2}; //~ ERROR unresolved import `$crate` - type A3 = foobar::$crate; //~ ERROR failed to resolve: `$crate` in paths can only be used in start position + type A3 = foobar::$crate; //~ ERROR `$crate` in paths can only be used in start position use foobar::$crate; //~ ERROR unresolved import `foobar::$crate` use foobar::$crate as _dollar_crate3; //~ ERROR unresolved import `foobar::$crate` use foobar::{$crate}; //~ ERROR unresolved import `foobar::$crate` use foobar::{$crate as _nested_dollar_crate3}; //~ ERROR unresolved import `foobar::$crate` - type A4 = crate::$crate; //~ ERROR failed to resolve: `$crate` in paths can only be used in start position + type A4 = crate::$crate; //~ ERROR `$crate` in paths can only be used in start position use crate::$crate; //~ ERROR unresolved import `crate::$crate` use crate::$crate as _dollar_crate4; //~ ERROR unresolved import `crate::$crate` use crate::{$crate}; //~ ERROR unresolved import `crate::$crate` use crate::{$crate as _nested_dollar_crate4}; //~ ERROR unresolved import `crate::$crate` - type A5 = super::$crate; //~ ERROR failed to resolve: `$crate` in paths can only be used in start position + type A5 = super::$crate; //~ ERROR `$crate` in paths can only be used in start position use super::$crate; //~ ERROR unresolved import `super::$crate` use super::$crate as _dollar_crate5; //~ ERROR unresolved import `super::$crate` use super::{$crate}; //~ ERROR unresolved import `super::$crate` use super::{$crate as _nested_dollar_crate5}; //~ ERROR unresolved import `super::$crate` - type A6 = self::$crate; //~ ERROR failed to resolve: `$crate` in paths can only be used in start position + type A6 = self::$crate; //~ ERROR `$crate` in paths can only be used in start position use self::$crate; use self::$crate as _dollar_crate6; use self::{$crate}; use self::{$crate as _nested_dollar_crate6}; - type A7 = $crate::$crate; //~ ERROR failed to resolve: `$crate` in paths can only be used in start position + type A7 = $crate::$crate; //~ ERROR `$crate` in paths can only be used in start position use $crate::$crate; //~ ERROR unresolved import `$crate::$crate` use $crate::$crate as _dollar_crate7; //~ ERROR unresolved import `$crate::$crate` use $crate::{$crate}; //~ ERROR unresolved import `$crate::$crate` use $crate::{$crate as _nested_dollar_crate7}; //~ ERROR unresolved import `$crate::$crate` - type A8 = $crate::crate; //~ ERROR failed to resolve: `crate` in paths can only be used in start position + type A8 = $crate::crate; //~ ERROR `crate` in paths can only be used in start position use $crate::crate; //~ ERROR unresolved import `$crate::crate` //~^ ERROR crate root imports need to be explicitly named: `use crate as name;` use $crate::crate as _m_crate8; //~ ERROR unresolved import `$crate::crate` @@ -53,13 +53,13 @@ macro_rules! macro_dollar_crate { //~^ ERROR crate root imports need to be explicitly named: `use crate as name;` use $crate::{crate as _m_nested_crate8}; //~ ERROR unresolved import `$crate::crate` - type A9 = $crate::super; //~ ERROR failed to resolve: `super` in paths can only be used in start position + type A9 = $crate::super; //~ ERROR `super` in paths can only be used in start position use $crate::super; //~ ERROR unresolved import `$crate::super` use $crate::super as _m_super8; //~ ERROR unresolved import `$crate::super` use $crate::{super}; //~ ERROR unresolved import `$crate::super` use $crate::{super as _m_nested_super8}; //~ ERROR unresolved import `$crate::super` - type A10 = $crate::self; //~ ERROR failed to resolve: `self` in paths can only be used in start position + type A10 = $crate::self; //~ ERROR `self` in paths can only be used in start position use $crate::self; //~ ERROR `$crate` may not be imported //~^ ERROR `self` imports are only allowed within a { } list //~^^ ERROR the name `` is defined multiple times @@ -98,7 +98,7 @@ mod foo { use crate; //~ ERROR crate root imports need to be explicitly named: `use crate as name;` pub use crate as _crate; // Good - type B2 = ::crate; //~ ERROR failed to resolve: global paths cannot start with `crate` + type B2 = ::crate; //~ ERROR `crate` use ::crate; //~ ERROR crate root imports need to be explicitly named: `use crate as name;` //~^ ERROR unresolved import `crate` use ::crate as _crate2; //~ ERROR unresolved import `crate` @@ -106,7 +106,7 @@ mod foo { //~^ ERROR unresolved import `crate` use ::{crate as _nested_crate2}; //~ ERROR unresolved import `crate` - type B3 = foobar::crate; //~ ERROR failed to resolve: `crate` in paths can only be used in start position + type B3 = foobar::crate; //~ ERROR `crate` in paths can only be used in start position use foobar::crate; //~ ERROR unresolved import `foobar::crate` //~^ ERROR crate root imports need to be explicitly named: `use crate as name;` use foobar::crate as _crate3; //~ ERROR unresolved import `foobar::crate` @@ -114,7 +114,7 @@ mod foo { //~^ ERROR crate root imports need to be explicitly named: `use crate as name;` use foobar::{crate as _nested_crate3}; //~ ERROR unresolved import `foobar::crate` - type B4 = crate::crate; //~ ERROR failed to resolve: `crate` in paths can only be used in start position + type B4 = crate::crate; //~ ERROR `crate` in paths can only be used in start position use crate::crate; //~ ERROR unresolved import `crate::crate` //~^ ERROR crate root imports need to be explicitly named: `use crate as name;` use crate::crate as _crate4; //~ ERROR unresolved import `crate::crate` @@ -122,7 +122,7 @@ mod foo { //~^ ERROR crate root imports need to be explicitly named: `use crate as name;` use crate::{crate as _nested_crate4}; //~ ERROR unresolved import `crate::crate` - type B5 = super::crate; //~ ERROR failed to resolve: `crate` in paths can only be used in start position + type B5 = super::crate; //~ ERROR `crate` in paths can only be used in start position use super::crate; //~ ERROR unresolved import `super::crate` //~^ ERROR crate root imports need to be explicitly named: `use crate as name;` use super::crate as _crate5; //~ ERROR unresolved import `super::crate` @@ -130,7 +130,7 @@ mod foo { //~^ ERROR crate root imports need to be explicitly named: `use crate as name;` use super::{crate as _nested_crate5}; //~ ERROR unresolved import `super::crate` - type B6 = self::crate; //~ ERROR failed to resolve: `crate` in paths can only be used in start position + type B6 = self::crate; //~ ERROR `crate` in paths can only be used in start position use self::crate; //~ ERROR crate root imports need to be explicitly named: `use crate as name;` //~^ ERROR the name `crate` is defined multiple times use self::crate as _crate6; @@ -146,19 +146,19 @@ mod foo { use super; //~ ERROR unresolved import `super` pub use super as _super; //~ ERROR unresolved import `super` - type C2 = ::super; //~ ERROR failed to resolve: global paths cannot start with `super` + type C2 = ::super; //~ ERROR global paths cannot start with `super` use ::super; //~ ERROR unresolved import `super` use ::super as _super2; //~ ERROR unresolved import `super` use ::{super}; //~ ERROR unresolved import `super` use ::{super as _nested_super2}; //~ ERROR unresolved import `super` - type C3 = foobar::super; //~ ERROR failed to resolve: `super` in paths can only be used in start position + type C3 = foobar::super; //~ ERROR `super` in paths can only be used in start position use foobar::super; //~ ERROR unresolved import `foobar::super` use foobar::super as _super3; //~ ERROR unresolved import `foobar::super` use foobar::{super}; //~ ERROR unresolved import `foobar::super` use foobar::{super as _nested_super3}; //~ ERROR unresolved import `foobar::super` - type C4 = crate::super; //~ ERROR failed to resolve: `super` in paths can only be used in start position + type C4 = crate::super; //~ ERROR `super` in paths can only be used in start position use crate::super; //~ ERROR unresolved import `crate::super` use crate::super as _super4; //~ ERROR unresolved import `crate::super` use crate::{super}; //~ ERROR unresolved import `crate::super` @@ -184,7 +184,7 @@ mod foo { use self; //~ ERROR `self` imports are only allowed within a { } list pub use self as _self; //~ ERROR `self` imports are only allowed within a { } list - type D2 = ::self; //~ ERROR failed to resolve: global paths cannot start with `self` + type D2 = ::self; //~ ERROR global paths cannot start with `self` use ::self; //~ ERROR `self` imports are only allowed within a { } list //~^ ERROR unresolved import `{{root}}` use ::self as _self2; //~ ERROR `self` imports are only allowed within a { } list @@ -192,13 +192,13 @@ mod foo { use ::{self}; //~ ERROR `self` import can only appear in an import list with a non-empty prefix use ::{self as _nested_self2}; //~ ERROR `self` import can only appear in an import list with a non-empty prefix - type D3 = foobar::self; //~ ERROR failed to resolve: `self` in paths can only be used in start position + type D3 = foobar::self; //~ ERROR `self` in paths can only be used in start position pub use foobar::qux::self; //~ ERROR `self` imports are only allowed within a { } list pub use foobar::self as _self3; //~ ERROR `self` imports are only allowed within a { } list pub use foobar::baz::{self}; // Good pub use foobar::{self as _nested_self3}; // Good - type D4 = crate::self; //~ ERROR failed to resolve: `self` in paths can only be used in start position + type D4 = crate::self; //~ ERROR `self` in paths can only be used in start position use crate::self; //~ ERROR crate root imports need to be explicitly named: `use crate as name;` //~^ ERROR `self` imports are only allowed within a { } list //~^^ ERROR the name `crate` is defined multiple times @@ -207,7 +207,7 @@ mod foo { //~^ ERROR the name `crate` is defined multiple times pub use crate::{self as _nested_self4}; // Good - type D5 = super::self; //~ ERROR failed to resolve: `self` in paths can only be used in start position + type D5 = super::self; //~ ERROR `self` in paths can only be used in start position use super::self; //~ ERROR unresolved import `super` //~^ ERROR `self` imports are only allowed within a { } list pub use super::self as _self5; //~ ERROR `self` imports are only allowed within a { } list @@ -215,7 +215,7 @@ mod foo { use super::{self}; //~ ERROR unresolved import `super` pub use super::{self as _nested_self5}; //~ ERROR unresolved import `super` - type D6 = self::self; //~ ERROR failed to resolve: `self` in paths can only be used in start position + type D6 = self::self; //~ ERROR `self` in paths can only be used in start position use self::self; //~ ERROR `self` imports are only allowed within a { } list pub use self::self as _self6; //~ ERROR `self` imports are only allowed within a { } list use self::{self}; //~ ERROR unresolved import `self` diff --git a/tests/ui/use/use-path-segment-kw.stderr b/tests/ui/use/use-path-segment-kw.stderr index 407e99059b2a..a5cfa47df3b2 100644 --- a/tests/ui/use/use-path-segment-kw.stderr +++ b/tests/ui/use/use-path-segment-kw.stderr @@ -1062,182 +1062,182 @@ error[E0573]: expected type, found module `self` LL | type D1 = self; | ^^^^ not a type -error[E0433]: failed to resolve: global paths cannot start with `$crate` +error[E0433]: global paths cannot start with `$crate` --> $DIR/use-path-segment-kw.rs:12:21 | LL | type A2 = ::$crate; - | ^^^^^^ global paths cannot start with `$crate` + | ^^^^^^ cannot start with this ... LL | macro_dollar_crate!(); | --------------------- in this macro invocation | = note: this error originates in the macro `macro_dollar_crate` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0433]: failed to resolve: `$crate` in paths can only be used in start position +error[E0433]: `$crate` in paths can only be used in start position --> $DIR/use-path-segment-kw.rs:18:27 | LL | type A3 = foobar::$crate; - | ^^^^^^ `$crate` in paths can only be used in start position + | ^^^^^^ can only be used in path start position ... LL | macro_dollar_crate!(); | --------------------- in this macro invocation | = note: this error originates in the macro `macro_dollar_crate` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0433]: failed to resolve: `$crate` in paths can only be used in start position +error[E0433]: `$crate` in paths can only be used in start position --> $DIR/use-path-segment-kw.rs:24:26 | LL | type A4 = crate::$crate; - | ^^^^^^ `$crate` in paths can only be used in start position + | ^^^^^^ can only be used in path start position ... LL | macro_dollar_crate!(); | --------------------- in this macro invocation | = note: this error originates in the macro `macro_dollar_crate` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0433]: failed to resolve: `$crate` in paths can only be used in start position +error[E0433]: `$crate` in paths can only be used in start position --> $DIR/use-path-segment-kw.rs:30:26 | LL | type A5 = super::$crate; - | ^^^^^^ `$crate` in paths can only be used in start position + | ^^^^^^ can only be used in path start position ... LL | macro_dollar_crate!(); | --------------------- in this macro invocation | = note: this error originates in the macro `macro_dollar_crate` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0433]: failed to resolve: `$crate` in paths can only be used in start position +error[E0433]: `$crate` in paths can only be used in start position --> $DIR/use-path-segment-kw.rs:36:25 | LL | type A6 = self::$crate; - | ^^^^^^ `$crate` in paths can only be used in start position + | ^^^^^^ can only be used in path start position ... LL | macro_dollar_crate!(); | --------------------- in this macro invocation | = note: this error originates in the macro `macro_dollar_crate` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0433]: failed to resolve: `$crate` in paths can only be used in start position +error[E0433]: `$crate` in paths can only be used in start position --> $DIR/use-path-segment-kw.rs:42:27 | LL | type A7 = $crate::$crate; - | ^^^^^^ `$crate` in paths can only be used in start position + | ^^^^^^ can only be used in path start position ... LL | macro_dollar_crate!(); | --------------------- in this macro invocation | = note: this error originates in the macro `macro_dollar_crate` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0433]: failed to resolve: `crate` in paths can only be used in start position +error[E0433]: `crate` in paths can only be used in start position --> $DIR/use-path-segment-kw.rs:48:27 | LL | type A8 = $crate::crate; - | ^^^^^ `crate` in paths can only be used in start position + | ^^^^^ can only be used in path start position ... LL | macro_dollar_crate!(); | --------------------- in this macro invocation | = note: this error originates in the macro `macro_dollar_crate` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0433]: failed to resolve: `super` in paths can only be used in start position +error[E0433]: `super` in paths can only be used in start position --> $DIR/use-path-segment-kw.rs:56:27 | LL | type A9 = $crate::super; - | ^^^^^ `super` in paths can only be used in start position + | ^^^^^ can only be used in path start position ... LL | macro_dollar_crate!(); | --------------------- in this macro invocation | = note: this error originates in the macro `macro_dollar_crate` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0433]: failed to resolve: `self` in paths can only be used in start position +error[E0433]: `self` in paths can only be used in start position --> $DIR/use-path-segment-kw.rs:62:28 | LL | type A10 = $crate::self; - | ^^^^ `self` in paths can only be used in start position + | ^^^^ can only be used in path start position ... LL | macro_dollar_crate!(); | --------------------- in this macro invocation | = note: this error originates in the macro `macro_dollar_crate` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0433]: failed to resolve: global paths cannot start with `crate` +error[E0433]: global paths cannot start with `crate` --> $DIR/use-path-segment-kw.rs:101:21 | LL | type B2 = ::crate; - | ^^^^^ global paths cannot start with `crate` + | ^^^^^ cannot start with this -error[E0433]: failed to resolve: `crate` in paths can only be used in start position +error[E0433]: `crate` in paths can only be used in start position --> $DIR/use-path-segment-kw.rs:109:27 | LL | type B3 = foobar::crate; - | ^^^^^ `crate` in paths can only be used in start position + | ^^^^^ can only be used in path start position -error[E0433]: failed to resolve: `crate` in paths can only be used in start position +error[E0433]: `crate` in paths can only be used in start position --> $DIR/use-path-segment-kw.rs:117:26 | LL | type B4 = crate::crate; - | ^^^^^ `crate` in paths can only be used in start position + | ^^^^^ can only be used in path start position -error[E0433]: failed to resolve: `crate` in paths can only be used in start position +error[E0433]: `crate` in paths can only be used in start position --> $DIR/use-path-segment-kw.rs:125:26 | LL | type B5 = super::crate; - | ^^^^^ `crate` in paths can only be used in start position + | ^^^^^ can only be used in path start position -error[E0433]: failed to resolve: `crate` in paths can only be used in start position +error[E0433]: `crate` in paths can only be used in start position --> $DIR/use-path-segment-kw.rs:133:25 | LL | type B6 = self::crate; - | ^^^^^ `crate` in paths can only be used in start position + | ^^^^^ can only be used in path start position -error[E0433]: failed to resolve: global paths cannot start with `super` +error[E0433]: global paths cannot start with `super` --> $DIR/use-path-segment-kw.rs:149:21 | LL | type C2 = ::super; - | ^^^^^ global paths cannot start with `super` + | ^^^^^ cannot start with this -error[E0433]: failed to resolve: `super` in paths can only be used in start position +error[E0433]: `super` in paths can only be used in start position --> $DIR/use-path-segment-kw.rs:155:27 | LL | type C3 = foobar::super; - | ^^^^^ `super` in paths can only be used in start position + | ^^^^^ can only be used in path start position -error[E0433]: failed to resolve: `super` in paths can only be used in start position +error[E0433]: `super` in paths can only be used in start position --> $DIR/use-path-segment-kw.rs:161:26 | LL | type C4 = crate::super; - | ^^^^^ `super` in paths can only be used in start position + | ^^^^^ can only be used in path start position -error[E0433]: failed to resolve: global paths cannot start with `self` +error[E0433]: global paths cannot start with `self` --> $DIR/use-path-segment-kw.rs:187:21 | LL | type D2 = ::self; - | ^^^^ global paths cannot start with `self` + | ^^^^ cannot start with this -error[E0433]: failed to resolve: `self` in paths can only be used in start position +error[E0433]: `self` in paths can only be used in start position --> $DIR/use-path-segment-kw.rs:195:27 | LL | type D3 = foobar::self; - | ^^^^ `self` in paths can only be used in start position + | ^^^^ can only be used in path start position -error[E0433]: failed to resolve: `self` in paths can only be used in start position +error[E0433]: `self` in paths can only be used in start position --> $DIR/use-path-segment-kw.rs:201:26 | LL | type D4 = crate::self; - | ^^^^ `self` in paths can only be used in start position + | ^^^^ can only be used in path start position -error[E0433]: failed to resolve: `self` in paths can only be used in start position +error[E0433]: `self` in paths can only be used in start position --> $DIR/use-path-segment-kw.rs:210:26 | LL | type D5 = super::self; - | ^^^^ `self` in paths can only be used in start position + | ^^^^ can only be used in path start position -error[E0433]: failed to resolve: `self` in paths can only be used in start position +error[E0433]: `self` in paths can only be used in start position --> $DIR/use-path-segment-kw.rs:218:25 | LL | type D6 = self::self; - | ^^^^ `self` in paths can only be used in start position + | ^^^^ can only be used in path start position error: aborting due to 141 previous errors diff --git a/tests/ui/use/use-self-type.rs b/tests/ui/use/use-self-type.rs index 3b4ce4297019..4453049acff0 100644 --- a/tests/ui/use/use-self-type.rs +++ b/tests/ui/use/use-self-type.rs @@ -4,7 +4,7 @@ impl S { fn f() {} fn g() { use Self::f; //~ ERROR unresolved import - pub(in Self::f) struct Z; //~ ERROR failed to resolve: `Self` + pub(in Self::f) struct Z; //~ ERROR cannot find `Self` } } diff --git a/tests/ui/use/use-self-type.stderr b/tests/ui/use/use-self-type.stderr index 498df34fe325..086b7a4d8222 100644 --- a/tests/ui/use/use-self-type.stderr +++ b/tests/ui/use/use-self-type.stderr @@ -1,4 +1,4 @@ -error[E0433]: failed to resolve: `Self` cannot be used in imports +error[E0433]: cannot find `Self` in this scope --> $DIR/use-self-type.rs:7:16 | LL | pub(in Self::f) struct Z; diff --git a/tests/ui/use/use-super-global-path.rs b/tests/ui/use/use-super-global-path.rs index 64bfd14b7e7d..d00c6964dea1 100644 --- a/tests/ui/use/use-super-global-path.rs +++ b/tests/ui/use/use-super-global-path.rs @@ -4,11 +4,12 @@ struct S; struct Z; mod foo { - use ::super::{S, Z}; //~ ERROR global paths cannot start with `super` - //~| ERROR global paths cannot start with `super` + use ::super::{S, Z}; + //~^ ERROR: global paths cannot start with `super` + //~| ERROR: global paths cannot start with `super` pub fn g() { - use ::super::main; //~ ERROR global paths cannot start with `super` + use ::super::main; //~ ERROR: global paths cannot start with `super` main(); } } diff --git a/tests/ui/use/use-super-global-path.stderr b/tests/ui/use/use-super-global-path.stderr index 00d172f4799a..dd853aab4830 100644 --- a/tests/ui/use/use-super-global-path.stderr +++ b/tests/ui/use/use-super-global-path.stderr @@ -1,22 +1,22 @@ -error[E0433]: failed to resolve: global paths cannot start with `super` +error[E0433]: global paths cannot start with `super` --> $DIR/use-super-global-path.rs:7:11 | LL | use ::super::{S, Z}; - | ^^^^^ global paths cannot start with `super` + | ^^^^^ cannot start with this -error[E0433]: failed to resolve: global paths cannot start with `super` +error[E0433]: global paths cannot start with `super` --> $DIR/use-super-global-path.rs:7:11 | LL | use ::super::{S, Z}; - | ^^^^^ global paths cannot start with `super` + | ^^^^^ cannot start with this | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error[E0433]: failed to resolve: global paths cannot start with `super` - --> $DIR/use-super-global-path.rs:11:15 +error[E0433]: global paths cannot start with `super` + --> $DIR/use-super-global-path.rs:12:15 | LL | use ::super::main; - | ^^^^^ global paths cannot start with `super` + | ^^^^^ cannot start with this error: aborting due to 3 previous errors From 257a415e05ca85f156f549604952040fd9e496fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Fri, 13 Feb 2026 23:15:09 +0000 Subject: [PATCH 257/265] Make suggestion verbose and fix incorrect suggestion usage --- compiler/rustc_resolve/src/diagnostics.rs | 34 ++++++++++++------- tests/ui/resolve/issue-81508.stderr | 10 ++---- .../portable-intrinsics-arent-exposed.stderr | 11 +++--- .../traits/const-traits/issue-102156.stderr | 21 +++++++----- 4 files changed, 43 insertions(+), 33 deletions(-) diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index 0a6b55c79e85..dabb019ffdb8 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -32,7 +32,7 @@ use rustc_span::edit_distance::find_best_match_for_name; use rustc_span::edition::Edition; use rustc_span::hygiene::MacroKind; use rustc_span::source_map::{SourceMap, Spanned}; -use rustc_span::{BytePos, Ident, Span, Symbol, SyntaxContext, kw, sym}; +use rustc_span::{BytePos, Ident, RemapPathScopeComponents, Span, Symbol, SyntaxContext, kw, sym}; use thin_vec::{ThinVec, thin_vec}; use tracing::{debug, instrument}; @@ -908,7 +908,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { err.help(msg); return err; } - err.multipart_suggestion(msg, suggestions, applicability); + err.multipart_suggestion_verbose(msg, suggestions, applicability); } let module = match module { @@ -2633,12 +2633,12 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { // } // ``` Some(LateDecl::RibDef(Res::Local(id))) => { - Some(*self.pat_span_map.get(&id).unwrap()) + Some((*self.pat_span_map.get(&id).unwrap(), "a", "local binding")) } // Name matches item from a local name binding // created by `use` declaration. For example: // ``` - // pub Foo: &str = ""; + // pub const Foo: &str = ""; // // mod submod { // use super::Foo; @@ -2646,19 +2646,27 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { // // binding `Foo`. // } // ``` - Some(LateDecl::Decl(name_binding)) => Some(name_binding.span), + Some(LateDecl::Decl(name_binding)) => Some(( + name_binding.span, + name_binding.res().article(), + name_binding.res().descr(), + )), _ => None, }; - let suggestion = match_span.map(|span| { - ( - vec![(span, String::from(""))], - format!("`{ident}` is defined here, but is not a type"), - Applicability::MaybeIncorrect, - ) - }); let message = format!("cannot find type `{ident}` in {scope}"); - (message, format!("use of undeclared type `{ident}`"), suggestion) + let label = if let Some((span, article, descr)) = match_span { + format!( + "`{ident}` is declared as {article} {descr} at `{}`, not a type", + self.tcx + .sess + .source_map() + .span_to_short_string(span, RemapPathScopeComponents::DIAGNOSTICS) + ) + } else { + format!("use of undeclared type `{ident}`") + }; + (message, label, None) } else { let mut suggestion = None; if ident.name == sym::alloc { diff --git a/tests/ui/resolve/issue-81508.stderr b/tests/ui/resolve/issue-81508.stderr index 4e8d98989c3c..49fe9fbf6211 100644 --- a/tests/ui/resolve/issue-81508.stderr +++ b/tests/ui/resolve/issue-81508.stderr @@ -1,20 +1,14 @@ error[E0433]: cannot find type `Baz` in this scope --> $DIR/issue-81508.rs:11:20 | -LL | let Baz: &str = ""; - | --- help: `Baz` is defined here, but is not a type -LL | LL | println!("{}", Baz::Bar); - | ^^^ use of undeclared type `Baz` + | ^^^ `Baz` is declared as a local binding at `issue-81508.rs:9:9`, not a type error[E0433]: cannot find type `Foo` in this scope --> $DIR/issue-81508.rs:20:24 | -LL | use super::Foo; - | ---------- help: `Foo` is defined here, but is not a type -LL | fn function() { LL | println!("{}", Foo::Bar); - | ^^^ use of undeclared type `Foo` + | ^^^ `Foo` is declared as a constant at `issue-81508.rs:18:9`, not a type error: aborting due to 2 previous errors diff --git a/tests/ui/simd/portable-intrinsics-arent-exposed.stderr b/tests/ui/simd/portable-intrinsics-arent-exposed.stderr index 21a6c3d65081..c7c36c841091 100644 --- a/tests/ui/simd/portable-intrinsics-arent-exposed.stderr +++ b/tests/ui/simd/portable-intrinsics-arent-exposed.stderr @@ -2,10 +2,13 @@ error[E0433]: cannot find `core` in the crate root --> $DIR/portable-intrinsics-arent-exposed.rs:5:5 | LL | use core::simd::intrinsics; - | ^^^^ - | | - | you might be missing crate `core` - | help: try using `std` instead of `core`: `std` + | ^^^^ you might be missing crate `core` + | +help: try using `std` instead of `core` + | +LL - use core::simd::intrinsics; +LL + use std::simd::intrinsics; + | error[E0432]: unresolved import `std::simd::intrinsics` --> $DIR/portable-intrinsics-arent-exposed.rs:6:5 diff --git a/tests/ui/traits/const-traits/issue-102156.stderr b/tests/ui/traits/const-traits/issue-102156.stderr index 22cd13527c6d..1fce5f1b18fe 100644 --- a/tests/ui/traits/const-traits/issue-102156.stderr +++ b/tests/ui/traits/const-traits/issue-102156.stderr @@ -2,21 +2,26 @@ error[E0433]: cannot find `core` in the crate root --> $DIR/issue-102156.rs:5:5 | LL | use core::convert::{From, TryFrom}; - | ^^^^ - | | - | you might be missing crate `core` - | help: try using `std` instead of `core`: `std` + | ^^^^ you might be missing crate `core` + | +help: try using `std` instead of `core` + | +LL - use core::convert::{From, TryFrom}; +LL + use std::convert::{From, TryFrom}; + | error[E0433]: cannot find `core` in the crate root --> $DIR/issue-102156.rs:5:5 | LL | use core::convert::{From, TryFrom}; - | ^^^^ - | | - | you might be missing crate `core` - | help: try using `std` instead of `core`: `std` + | ^^^^ you might be missing crate `core` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` +help: try using `std` instead of `core` + | +LL - use core::convert::{From, TryFrom}; +LL + use std::convert::{From, TryFrom}; + | error: aborting due to 2 previous errors From 195b849ea7367ba36c3a68a9689381896b499fcd Mon Sep 17 00:00:00 2001 From: cyrgani Date: Tue, 17 Feb 2026 12:28:23 +0000 Subject: [PATCH 258/265] remove the explicit error for old `rental` versions --- compiler/rustc_expand/src/base.rs | 84 +------------------ compiler/rustc_expand/src/errors.rs | 12 --- compiler/rustc_expand/src/proc_macro.rs | 5 -- .../rustc_expand/src/proc_macro_server.rs | 22 +---- compiler/rustc_span/src/symbol.rs | 1 - tests/ui/proc-macro/pretty-print-hack-hide.rs | 12 --- .../proc-macro/pretty-print-hack-hide.stdout | 21 ----- .../pretty-print-hack-show.local.stderr | 6 -- .../pretty-print-hack-show.remapped.stderr | 6 -- tests/ui/proc-macro/pretty-print-hack-show.rs | 21 ----- .../allsorts-rental-0.5.6/src/lib.rs | 14 ---- .../pretty-print-hack/rental-0.5.5/src/lib.rs | 14 ---- .../pretty-print-hack/rental-0.5.6/src/lib.rs | 14 ---- 13 files changed, 6 insertions(+), 226 deletions(-) delete mode 100644 tests/ui/proc-macro/pretty-print-hack-hide.rs delete mode 100644 tests/ui/proc-macro/pretty-print-hack-hide.stdout delete mode 100644 tests/ui/proc-macro/pretty-print-hack-show.local.stderr delete mode 100644 tests/ui/proc-macro/pretty-print-hack-show.remapped.stderr delete mode 100644 tests/ui/proc-macro/pretty-print-hack-show.rs delete mode 100644 tests/ui/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs delete mode 100644 tests/ui/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs delete mode 100644 tests/ui/proc-macro/pretty-print-hack/rental-0.5.6/src/lib.rs diff --git a/compiler/rustc_expand/src/base.rs b/compiler/rustc_expand/src/base.rs index 5efaea44b3b9..476be94efd9e 100644 --- a/compiler/rustc_expand/src/base.rs +++ b/compiler/rustc_expand/src/base.rs @@ -2,12 +2,11 @@ use std::any::Any; use std::default::Default; use std::iter; use std::path::Component::Prefix; -use std::path::{Path, PathBuf}; +use std::path::PathBuf; use std::rc::Rc; use std::sync::Arc; use rustc_ast::attr::MarkedAttrs; -use rustc_ast::token::MetaVarKind; use rustc_ast::tokenstream::TokenStream; use rustc_ast::visit::{AssocCtxt, Visitor}; use rustc_ast::{self as ast, AttrVec, Attribute, HasAttrs, Item, NodeId, PatKind, Safety}; @@ -22,14 +21,14 @@ use rustc_hir::limit::Limit; use rustc_hir::{Stability, find_attr}; use rustc_lint_defs::RegisteredTools; use rustc_parse::MACRO_ARGUMENTS; -use rustc_parse::parser::{AllowConstBlockItems, ForceCollect, Parser}; +use rustc_parse::parser::Parser; use rustc_session::Session; use rustc_session::parse::ParseSess; use rustc_span::def_id::{CrateNum, DefId, LocalDefId}; use rustc_span::edition::Edition; use rustc_span::hygiene::{AstPass, ExpnData, ExpnKind, LocalExpnId, MacroKind}; use rustc_span::source_map::SourceMap; -use rustc_span::{DUMMY_SP, FileName, Ident, Span, Symbol, kw, sym}; +use rustc_span::{DUMMY_SP, Ident, Span, Symbol, kw}; use smallvec::{SmallVec, smallvec}; use thin_vec::ThinVec; @@ -1421,80 +1420,3 @@ pub fn resolve_path(sess: &Session, path: impl Into, span: Span) -> PRe } } } - -/// If this item looks like a specific enums from `rental`, emit a fatal error. -/// See #73345 and #83125 for more details. -/// FIXME(#73933): Remove this eventually. -fn pretty_printing_compatibility_hack(item: &Item, psess: &ParseSess) { - if let ast::ItemKind::Enum(ident, _, enum_def) = &item.kind - && ident.name == sym::ProceduralMasqueradeDummyType - && let [variant] = &*enum_def.variants - && variant.ident.name == sym::Input - && let FileName::Real(real) = psess.source_map().span_to_filename(ident.span) - && let Some(c) = real - .local_path() - .unwrap_or(Path::new("")) - .components() - .flat_map(|c| c.as_os_str().to_str()) - .find(|c| c.starts_with("rental") || c.starts_with("allsorts-rental")) - { - let crate_matches = if c.starts_with("allsorts-rental") { - true - } else { - let mut version = c.trim_start_matches("rental-").split('.'); - version.next() == Some("0") - && version.next() == Some("5") - && version.next().and_then(|c| c.parse::().ok()).is_some_and(|v| v < 6) - }; - - if crate_matches { - psess.dcx().emit_fatal(errors::ProcMacroBackCompat { - crate_name: "rental".to_string(), - fixed_version: "0.5.6".to_string(), - }); - } - } -} - -pub(crate) fn ann_pretty_printing_compatibility_hack(ann: &Annotatable, psess: &ParseSess) { - let item = match ann { - Annotatable::Item(item) => item, - Annotatable::Stmt(stmt) => match &stmt.kind { - ast::StmtKind::Item(item) => item, - _ => return, - }, - _ => return, - }; - pretty_printing_compatibility_hack(item, psess) -} - -pub(crate) fn stream_pretty_printing_compatibility_hack( - kind: MetaVarKind, - stream: &TokenStream, - psess: &ParseSess, -) { - let item = match kind { - MetaVarKind::Item => { - let mut parser = Parser::new(psess, stream.clone(), None); - // No need to collect tokens for this simple check. - parser - .parse_item(ForceCollect::No, AllowConstBlockItems::No) - .expect("failed to reparse item") - .expect("an actual item") - } - MetaVarKind::Stmt => { - let mut parser = Parser::new(psess, stream.clone(), None); - // No need to collect tokens for this simple check. - let stmt = parser - .parse_stmt(ForceCollect::No) - .expect("failed to reparse") - .expect("an actual stmt"); - match &stmt.kind { - ast::StmtKind::Item(item) => item.clone(), - _ => return, - } - } - _ => return, - }; - pretty_printing_compatibility_hack(&item, psess) -} diff --git a/compiler/rustc_expand/src/errors.rs b/compiler/rustc_expand/src/errors.rs index b6fcc13321ee..c7b0e0d211a4 100644 --- a/compiler/rustc_expand/src/errors.rs +++ b/compiler/rustc_expand/src/errors.rs @@ -446,18 +446,6 @@ pub(crate) struct GlobDelegationTraitlessQpath { pub span: Span, } -// This used to be the `proc_macro_back_compat` lint (#83125). It was later -// turned into a hard error. -#[derive(Diagnostic)] -#[diag("using an old version of `{$crate_name}`")] -#[note( - "older versions of the `{$crate_name}` crate no longer compile; please update to `{$crate_name}` v{$fixed_version}, or switch to one of the `{$crate_name}` alternatives" -)] -pub(crate) struct ProcMacroBackCompat { - pub crate_name: String, - pub fixed_version: String, -} - pub(crate) use metavar_exprs::*; mod metavar_exprs { use super::*; diff --git a/compiler/rustc_expand/src/proc_macro.rs b/compiler/rustc_expand/src/proc_macro.rs index e67855700813..a892b21d7622 100644 --- a/compiler/rustc_expand/src/proc_macro.rs +++ b/compiler/rustc_expand/src/proc_macro.rs @@ -105,11 +105,6 @@ impl MultiItemModifier for DeriveProcMacro { // (e.g. `fn foo() { #[derive(Debug)] struct Bar; }`) let is_stmt = matches!(item, Annotatable::Stmt(..)); - // We used to have an alternative behaviour for crates that needed it. - // We had a lint for a long time, but now we just emit a hard error. - // Eventually we might remove the special case hard error check - // altogether. See #73345. - crate::base::ann_pretty_printing_compatibility_hack(&item, &ecx.sess.psess); let input = item.to_tokens(); let invoc_id = ecx.current_expansion.id; diff --git a/compiler/rustc_expand/src/proc_macro_server.rs b/compiler/rustc_expand/src/proc_macro_server.rs index 947b8a6e3e5e..1da14ce0155d 100644 --- a/compiler/rustc_expand/src/proc_macro_server.rs +++ b/compiler/rustc_expand/src/proc_macro_server.rs @@ -103,8 +103,8 @@ impl ToInternal for LitKind { } } -impl FromInternal<(TokenStream, &mut Rustc<'_, '_>)> for Vec> { - fn from_internal((stream, rustc): (TokenStream, &mut Rustc<'_, '_>)) -> Self { +impl FromInternal for Vec> { + fn from_internal(stream: TokenStream) -> Self { use rustc_ast::token::*; // Estimate the capacity as `stream.len()` rounded up to the next power @@ -115,22 +115,6 @@ impl FromInternal<(TokenStream, &mut Rustc<'_, '_>)> for Vec { - // We used to have an alternative behaviour for crates that - // needed it: a hack used to pass AST fragments to - // attribute and derive macros as a single nonterminal - // token instead of a token stream. Such token needs to be - // "unwrapped" and not represented as a delimited group. We - // had a lint for a long time, but now we just emit a hard - // error. Eventually we might remove the special case hard - // error check altogether. See #73345. - if let Delimiter::Invisible(InvisibleOrigin::MetaVar(kind)) = delim { - crate::base::stream_pretty_printing_compatibility_hack( - kind, - &stream, - rustc.psess(), - ); - } - // In `mk_delimited` we avoid nesting invisible delimited // of the same `MetaVarKind`. Here we do the same but // ignore the `MetaVarKind` because it is discarded when we @@ -687,7 +671,7 @@ impl server::Server for Rustc<'_, '_> { &mut self, stream: Self::TokenStream, ) -> Vec> { - FromInternal::from_internal((stream, self)) + FromInternal::from_internal(stream) } fn span_debug(&mut self, span: Self::Span) -> String { diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 5623b984b242..1d38b41c25df 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -327,7 +327,6 @@ symbols! { Pointer, Poll, ProcMacro, - ProceduralMasqueradeDummyType, Range, RangeBounds, RangeCopy, diff --git a/tests/ui/proc-macro/pretty-print-hack-hide.rs b/tests/ui/proc-macro/pretty-print-hack-hide.rs deleted file mode 100644 index fd98f16a780e..000000000000 --- a/tests/ui/proc-macro/pretty-print-hack-hide.rs +++ /dev/null @@ -1,12 +0,0 @@ -//@ proc-macro: test-macros.rs -//@ compile-flags: -Z span-debug -//@ check-pass - -#![no_std] // Don't load unnecessary hygiene information from std -extern crate std; - -#[macro_use] extern crate test_macros; - -include!("pretty-print-hack/rental-0.5.6/src/lib.rs"); - -fn main() {} diff --git a/tests/ui/proc-macro/pretty-print-hack-hide.stdout b/tests/ui/proc-macro/pretty-print-hack-hide.stdout deleted file mode 100644 index ea796bb26976..000000000000 --- a/tests/ui/proc-macro/pretty-print-hack-hide.stdout +++ /dev/null @@ -1,21 +0,0 @@ -PRINT-DERIVE INPUT (DISPLAY): enum ProceduralMasqueradeDummyType { Input } -PRINT-DERIVE INPUT (DEBUG): TokenStream [ - Ident { - ident: "enum", - span: $DIR/pretty-print-hack/rental-0.5.6/src/lib.rs:4:1: 4:5 (#0), - }, - Ident { - ident: "ProceduralMasqueradeDummyType", - span: $DIR/pretty-print-hack/rental-0.5.6/src/lib.rs:4:6: 4:35 (#0), - }, - Group { - delimiter: Brace, - stream: TokenStream [ - Ident { - ident: "Input", - span: $DIR/pretty-print-hack/rental-0.5.6/src/lib.rs:13:5: 13:10 (#0), - }, - ], - span: $DIR/pretty-print-hack/rental-0.5.6/src/lib.rs:4:36: 14:2 (#0), - }, -] diff --git a/tests/ui/proc-macro/pretty-print-hack-show.local.stderr b/tests/ui/proc-macro/pretty-print-hack-show.local.stderr deleted file mode 100644 index 889cd0c90ebb..000000000000 --- a/tests/ui/proc-macro/pretty-print-hack-show.local.stderr +++ /dev/null @@ -1,6 +0,0 @@ -error: using an old version of `rental` - | - = note: older versions of the `rental` crate no longer compile; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives - -error: aborting due to 1 previous error - diff --git a/tests/ui/proc-macro/pretty-print-hack-show.remapped.stderr b/tests/ui/proc-macro/pretty-print-hack-show.remapped.stderr deleted file mode 100644 index 889cd0c90ebb..000000000000 --- a/tests/ui/proc-macro/pretty-print-hack-show.remapped.stderr +++ /dev/null @@ -1,6 +0,0 @@ -error: using an old version of `rental` - | - = note: older versions of the `rental` crate no longer compile; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives - -error: aborting due to 1 previous error - diff --git a/tests/ui/proc-macro/pretty-print-hack-show.rs b/tests/ui/proc-macro/pretty-print-hack-show.rs deleted file mode 100644 index 08e26c811427..000000000000 --- a/tests/ui/proc-macro/pretty-print-hack-show.rs +++ /dev/null @@ -1,21 +0,0 @@ -//@ proc-macro: test-macros.rs -//@ compile-flags: -Z span-debug -//@ revisions: local remapped -//@ [remapped] remap-src-base - -#![no_std] // Don't load unnecessary hygiene information from std -extern crate std; - -#[macro_use] extern crate test_macros; - -mod first { - include!("pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs"); -} - -mod second { - include!("pretty-print-hack/rental-0.5.5/src/lib.rs"); -} - -fn main() {} - -//~? ERROR using an old version of `rental` diff --git a/tests/ui/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs b/tests/ui/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs deleted file mode 100644 index a27176a38e22..000000000000 --- a/tests/ui/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs +++ /dev/null @@ -1,14 +0,0 @@ -//@ ignore-auxiliary (used by `../../../pretty-print-hack-show.rs`) - -#[derive(Print)] -enum ProceduralMasqueradeDummyType { -//~^ ERROR using -//~| WARN this was previously -//~| ERROR using -//~| WARN this was previously -//~| ERROR using -//~| WARN this was previously -//~| ERROR using -//~| WARN this was previously - Input -} diff --git a/tests/ui/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs b/tests/ui/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs deleted file mode 100644 index a27176a38e22..000000000000 --- a/tests/ui/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs +++ /dev/null @@ -1,14 +0,0 @@ -//@ ignore-auxiliary (used by `../../../pretty-print-hack-show.rs`) - -#[derive(Print)] -enum ProceduralMasqueradeDummyType { -//~^ ERROR using -//~| WARN this was previously -//~| ERROR using -//~| WARN this was previously -//~| ERROR using -//~| WARN this was previously -//~| ERROR using -//~| WARN this was previously - Input -} diff --git a/tests/ui/proc-macro/pretty-print-hack/rental-0.5.6/src/lib.rs b/tests/ui/proc-macro/pretty-print-hack/rental-0.5.6/src/lib.rs deleted file mode 100644 index 765ee4be656e..000000000000 --- a/tests/ui/proc-macro/pretty-print-hack/rental-0.5.6/src/lib.rs +++ /dev/null @@ -1,14 +0,0 @@ -//@ ignore-auxiliary (used by `../../../pretty-print-hack/hide.rs`) - -#[derive(Print)] -enum ProceduralMasqueradeDummyType { -//~^ ERROR using -//~| WARN this was previously -//~| ERROR using -//~| WARN this was previously -//~| ERROR using -//~| WARN this was previously -//~| ERROR using -//~| WARN this was previously - Input -} From 83ef5059d6a1bbcf9ae0923626b57f5ad0dd0e43 Mon Sep 17 00:00:00 2001 From: cyrgani Date: Tue, 17 Feb 2026 20:16:29 +0000 Subject: [PATCH 259/265] make `rustc_allow_const_fn_unstable` an actual `rustc_attrs` attribute --- compiler/rustc_feature/src/builtin_attrs.rs | 2 +- compiler/rustc_feature/src/unstable.rs | 4 - library/alloc/src/lib.rs | 1 - library/core/src/lib.rs | 1 - .../codegen-llvm/intrinsics/likely_assert.rs | 2 +- tests/ui/attributes/malformed-attrs.rs | 1 - tests/ui/attributes/malformed-attrs.stderr | 178 +++++++++--------- .../precise-drop-allow-const-fn-unstable.rs | 2 +- ...ture-gate-rustc-allow-const-fn-unstable.rs | 2 +- ...-gate-rustc-allow-const-fn-unstable.stderr | 8 +- tests/ui/traits/const-traits/staged-api.rs | 2 +- 11 files changed, 98 insertions(+), 105 deletions(-) diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index 2c2dae0fef52..db8f459ef045 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -1208,7 +1208,7 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ rustc_intrinsic_const_stable_indirect, Normal, template!(Word), WarnFollowing, EncodeCrossCrate::No, "this is an internal implementation detail", ), - gated!( + rustc_attr!( rustc_allow_const_fn_unstable, Normal, template!(Word, List: &["feat1, feat2, ..."]), DuplicatesOk, EncodeCrossCrate::No, "rustc_allow_const_fn_unstable side-steps feature gating and stability checks" diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index b810cd0db8cd..51283caafe66 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -287,10 +287,6 @@ declare_features! ( (internal, panic_runtime, "1.10.0", Some(32837)), /// Allows using pattern types. (internal, pattern_types, "1.79.0", Some(123646)), - /// Allows using `#[rustc_allow_const_fn_unstable]`. - /// This is an attribute on `const fn` for the same - /// purpose as `#[allow_internal_unstable]`. - (internal, rustc_allow_const_fn_unstable, "1.49.0", Some(69399)), /// Allows using compiler's own crates. (unstable, rustc_private, "1.0.0", Some(27812)), /// Allows using internal rustdoc features like `doc(keyword)`. diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs index 04ca6403fe83..73e93657b02f 100644 --- a/library/alloc/src/lib.rs +++ b/library/alloc/src/lib.rs @@ -182,7 +182,6 @@ #![feature(negative_impls)] #![feature(never_type)] #![feature(optimize_attribute)] -#![feature(rustc_allow_const_fn_unstable)] #![feature(rustc_attrs)] #![feature(slice_internals)] #![feature(staged_api)] diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index d650239a44c6..7158fda49a8d 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -159,7 +159,6 @@ #![feature(pattern_types)] #![feature(prelude_import)] #![feature(repr_simd)] -#![feature(rustc_allow_const_fn_unstable)] #![feature(rustc_attrs)] #![feature(rustdoc_internals)] #![feature(simd_ffi)] diff --git a/tests/codegen-llvm/intrinsics/likely_assert.rs b/tests/codegen-llvm/intrinsics/likely_assert.rs index 59a40c750eab..e7e2cfdff052 100644 --- a/tests/codegen-llvm/intrinsics/likely_assert.rs +++ b/tests/codegen-llvm/intrinsics/likely_assert.rs @@ -1,5 +1,5 @@ //@ compile-flags: -Copt-level=3 -#![feature(panic_internals, const_eval_select, rustc_allow_const_fn_unstable, core_intrinsics)] +#![feature(panic_internals, const_eval_select, rustc_attrs, core_intrinsics)] #![crate_type = "lib"] // check that assert! and const_assert! emit branch weights diff --git a/tests/ui/attributes/malformed-attrs.rs b/tests/ui/attributes/malformed-attrs.rs index 489c8bf9f495..6193a101918b 100644 --- a/tests/ui/attributes/malformed-attrs.rs +++ b/tests/ui/attributes/malformed-attrs.rs @@ -2,7 +2,6 @@ // We enable a bunch of features to not get feature-gate errs in this test. #![deny(invalid_doc_attributes)] #![feature(rustc_attrs)] -#![feature(rustc_allow_const_fn_unstable)] #![feature(allow_internal_unstable)] // FIXME(#82232, #143834): temporarily renamed to mitigate `#[align]` nameres ambiguity #![feature(fn_align)] diff --git a/tests/ui/attributes/malformed-attrs.stderr b/tests/ui/attributes/malformed-attrs.stderr index 009da1d12a16..01e70adf4ee9 100644 --- a/tests/ui/attributes/malformed-attrs.stderr +++ b/tests/ui/attributes/malformed-attrs.stderr @@ -1,5 +1,5 @@ error[E0539]: malformed `cfg` attribute input - --> $DIR/malformed-attrs.rs:107:1 + --> $DIR/malformed-attrs.rs:106:1 | LL | #[cfg] | ^^^^^^ @@ -10,7 +10,7 @@ LL | #[cfg] = note: for more information, visit error[E0539]: malformed `cfg_attr` attribute input - --> $DIR/malformed-attrs.rs:109:1 + --> $DIR/malformed-attrs.rs:108:1 | LL | #[cfg_attr] | ^^^^^^^^^^^ @@ -21,13 +21,13 @@ LL | #[cfg_attr] = note: for more information, visit error[E0463]: can't find crate for `wloop` - --> $DIR/malformed-attrs.rs:215:1 + --> $DIR/malformed-attrs.rs:214:1 | LL | extern crate wloop; | ^^^^^^^^^^^^^^^^^^^ can't find crate error: malformed `allow` attribute input - --> $DIR/malformed-attrs.rs:181:1 + --> $DIR/malformed-attrs.rs:180:1 | LL | #[allow] | ^^^^^^^^ @@ -43,7 +43,7 @@ LL | #[allow(lint1, lint2, lint3, reason = "...")] | +++++++++++++++++++++++++++++++++++++ error: malformed `expect` attribute input - --> $DIR/malformed-attrs.rs:183:1 + --> $DIR/malformed-attrs.rs:182:1 | LL | #[expect] | ^^^^^^^^^ @@ -59,7 +59,7 @@ LL | #[expect(lint1, lint2, lint3, reason = "...")] | +++++++++++++++++++++++++++++++++++++ error: malformed `warn` attribute input - --> $DIR/malformed-attrs.rs:185:1 + --> $DIR/malformed-attrs.rs:184:1 | LL | #[warn] | ^^^^^^^ @@ -75,7 +75,7 @@ LL | #[warn(lint1, lint2, lint3, reason = "...")] | +++++++++++++++++++++++++++++++++++++ error: malformed `deny` attribute input - --> $DIR/malformed-attrs.rs:187:1 + --> $DIR/malformed-attrs.rs:186:1 | LL | #[deny] | ^^^^^^^ @@ -91,7 +91,7 @@ LL | #[deny(lint1, lint2, lint3, reason = "...")] | +++++++++++++++++++++++++++++++++++++ error: malformed `forbid` attribute input - --> $DIR/malformed-attrs.rs:189:1 + --> $DIR/malformed-attrs.rs:188:1 | LL | #[forbid] | ^^^^^^^^^ @@ -107,25 +107,25 @@ LL | #[forbid(lint1, lint2, lint3, reason = "...")] | +++++++++++++++++++++++++++++++++++++ error: the `#[proc_macro]` attribute is only usable with crates of the `proc-macro` crate type - --> $DIR/malformed-attrs.rs:104:1 + --> $DIR/malformed-attrs.rs:103:1 | LL | #[proc_macro = 18] | ^^^^^^^^^^^^^^^^^^ error: the `#[proc_macro_attribute]` attribute is only usable with crates of the `proc-macro` crate type - --> $DIR/malformed-attrs.rs:121:1 + --> $DIR/malformed-attrs.rs:120:1 | LL | #[proc_macro_attribute = 19] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type - --> $DIR/malformed-attrs.rs:128:1 + --> $DIR/malformed-attrs.rs:127:1 | LL | #[proc_macro_derive] | ^^^^^^^^^^^^^^^^^^^^ error[E0658]: allow_internal_unsafe side-steps the unsafe_code lint - --> $DIR/malformed-attrs.rs:220:1 + --> $DIR/malformed-attrs.rs:219:1 | LL | #[allow_internal_unsafe = 1] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -134,7 +134,7 @@ LL | #[allow_internal_unsafe = 1] = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0539]: malformed `windows_subsystem` attribute input - --> $DIR/malformed-attrs.rs:27:1 + --> $DIR/malformed-attrs.rs:26:1 | LL | #![windows_subsystem] | ^^^-----------------^ @@ -150,25 +150,25 @@ LL | #![windows_subsystem = "windows"] | +++++++++++ error[E0539]: malformed `export_name` attribute input - --> $DIR/malformed-attrs.rs:30:1 + --> $DIR/malformed-attrs.rs:29:1 | LL | #[unsafe(export_name)] | ^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[export_name = "name"]` error: `rustc_allow_const_fn_unstable` expects a list of feature names - --> $DIR/malformed-attrs.rs:32:1 + --> $DIR/malformed-attrs.rs:31:1 | LL | #[rustc_allow_const_fn_unstable] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `allow_internal_unstable` expects a list of feature names - --> $DIR/malformed-attrs.rs:35:1 + --> $DIR/malformed-attrs.rs:34:1 | LL | #[allow_internal_unstable] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0539]: malformed `rustc_confusables` attribute input - --> $DIR/malformed-attrs.rs:37:1 + --> $DIR/malformed-attrs.rs:36:1 | LL | #[rustc_confusables] | ^^^^^^^^^^^^^^^^^^^^ @@ -177,7 +177,7 @@ LL | #[rustc_confusables] | help: must be of the form: `#[rustc_confusables("name1", "name2", ...)]` error: `#[rustc_confusables]` attribute cannot be used on functions - --> $DIR/malformed-attrs.rs:37:1 + --> $DIR/malformed-attrs.rs:36:1 | LL | #[rustc_confusables] | ^^^^^^^^^^^^^^^^^^^^ @@ -185,7 +185,7 @@ LL | #[rustc_confusables] = help: `#[rustc_confusables]` can only be applied to inherent methods error[E0539]: malformed `deprecated` attribute input - --> $DIR/malformed-attrs.rs:40:1 + --> $DIR/malformed-attrs.rs:39:1 | LL | #[deprecated = 5] | ^^^^^^^^^^^^^^^-^ @@ -193,7 +193,7 @@ LL | #[deprecated = 5] | expected a string literal here error[E0539]: malformed `rustc_macro_transparency` attribute input - --> $DIR/malformed-attrs.rs:44:1 + --> $DIR/malformed-attrs.rs:43:1 | LL | #[rustc_macro_transparency] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -208,7 +208,7 @@ LL | #[rustc_macro_transparency = "transparent"] | +++++++++++++++ error: `#[rustc_macro_transparency]` attribute cannot be used on functions - --> $DIR/malformed-attrs.rs:44:1 + --> $DIR/malformed-attrs.rs:43:1 | LL | #[rustc_macro_transparency] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -216,7 +216,7 @@ LL | #[rustc_macro_transparency] = help: `#[rustc_macro_transparency]` can only be applied to macro defs error[E0539]: malformed `repr` attribute input - --> $DIR/malformed-attrs.rs:47:1 + --> $DIR/malformed-attrs.rs:46:1 | LL | #[repr] | ^^^^^^^ expected this to be a list @@ -224,7 +224,7 @@ LL | #[repr] = note: for more information, visit error[E0565]: malformed `rustc_as_ptr` attribute input - --> $DIR/malformed-attrs.rs:50:1 + --> $DIR/malformed-attrs.rs:49:1 | LL | #[rustc_as_ptr = 5] | ^^^^^^^^^^^^^^^---^ @@ -233,7 +233,7 @@ LL | #[rustc_as_ptr = 5] | help: must be of the form: `#[rustc_as_ptr]` error[E0539]: malformed `rustc_align` attribute input - --> $DIR/malformed-attrs.rs:55:1 + --> $DIR/malformed-attrs.rs:54:1 | LL | #[rustc_align] | ^^^^^^^^^^^^^^ @@ -242,7 +242,7 @@ LL | #[rustc_align] | help: must be of the form: `#[rustc_align()]` error[E0539]: malformed `optimize` attribute input - --> $DIR/malformed-attrs.rs:57:1 + --> $DIR/malformed-attrs.rs:56:1 | LL | #[optimize] | ^^^^^^^^^^^ expected this to be a list @@ -257,7 +257,7 @@ LL | #[optimize(speed)] | +++++++ error[E0565]: malformed `cold` attribute input - --> $DIR/malformed-attrs.rs:59:1 + --> $DIR/malformed-attrs.rs:58:1 | LL | #[cold = 1] | ^^^^^^^---^ @@ -266,7 +266,7 @@ LL | #[cold = 1] | help: must be of the form: `#[cold]` error[E0539]: malformed `must_use` attribute input - --> $DIR/malformed-attrs.rs:61:1 + --> $DIR/malformed-attrs.rs:60:1 | LL | #[must_use()] | ^^^^^^^^^^--^ @@ -284,7 +284,7 @@ LL + #[must_use] | error[E0565]: malformed `no_mangle` attribute input - --> $DIR/malformed-attrs.rs:63:1 + --> $DIR/malformed-attrs.rs:62:1 | LL | #[no_mangle = 1] | ^^^^^^^^^^^^---^ @@ -293,7 +293,7 @@ LL | #[no_mangle = 1] | help: must be of the form: `#[no_mangle]` error[E0565]: malformed `naked` attribute input - --> $DIR/malformed-attrs.rs:65:1 + --> $DIR/malformed-attrs.rs:64:1 | LL | #[unsafe(naked())] | ^^^^^^^^^^^^^^--^^ @@ -302,7 +302,7 @@ LL | #[unsafe(naked())] | help: must be of the form: `#[naked]` error[E0565]: malformed `track_caller` attribute input - --> $DIR/malformed-attrs.rs:67:1 + --> $DIR/malformed-attrs.rs:66:1 | LL | #[track_caller()] | ^^^^^^^^^^^^^^--^ @@ -311,13 +311,13 @@ LL | #[track_caller()] | help: must be of the form: `#[track_caller]` error[E0539]: malformed `export_name` attribute input - --> $DIR/malformed-attrs.rs:69:1 + --> $DIR/malformed-attrs.rs:68:1 | LL | #[export_name()] | ^^^^^^^^^^^^^^^^ help: must be of the form: `#[export_name = "name"]` error[E0805]: malformed `used` attribute input - --> $DIR/malformed-attrs.rs:71:1 + --> $DIR/malformed-attrs.rs:70:1 | LL | #[used()] | ^^^^^^--^ @@ -335,7 +335,7 @@ LL + #[used] | error: `#[used]` attribute cannot be used on functions - --> $DIR/malformed-attrs.rs:71:1 + --> $DIR/malformed-attrs.rs:70:1 | LL | #[used()] | ^^^^^^^^^ @@ -343,13 +343,13 @@ LL | #[used()] = help: `#[used]` can only be applied to statics error[E0539]: malformed `crate_name` attribute input - --> $DIR/malformed-attrs.rs:74:1 + --> $DIR/malformed-attrs.rs:73:1 | LL | #[crate_name] | ^^^^^^^^^^^^^ help: must be of the form: `#[crate_name = "name"]` error[E0539]: malformed `target_feature` attribute input - --> $DIR/malformed-attrs.rs:79:1 + --> $DIR/malformed-attrs.rs:78:1 | LL | #[target_feature] | ^^^^^^^^^^^^^^^^^ @@ -358,7 +358,7 @@ LL | #[target_feature] | help: must be of the form: `#[target_feature(enable = "feat1, feat2")]` error[E0565]: malformed `export_stable` attribute input - --> $DIR/malformed-attrs.rs:81:1 + --> $DIR/malformed-attrs.rs:80:1 | LL | #[export_stable = 1] | ^^^^^^^^^^^^^^^^---^ @@ -367,7 +367,7 @@ LL | #[export_stable = 1] | help: must be of the form: `#[export_stable]` error[E0539]: malformed `link` attribute input - --> $DIR/malformed-attrs.rs:83:1 + --> $DIR/malformed-attrs.rs:82:1 | LL | #[link] | ^^^^^^^ expected this to be a list @@ -375,7 +375,7 @@ LL | #[link] = note: for more information, visit error[E0539]: malformed `link_name` attribute input - --> $DIR/malformed-attrs.rs:87:1 + --> $DIR/malformed-attrs.rs:86:1 | LL | #[link_name] | ^^^^^^^^^^^^ help: must be of the form: `#[link_name = "name"]` @@ -383,7 +383,7 @@ LL | #[link_name] = note: for more information, visit error[E0539]: malformed `link_section` attribute input - --> $DIR/malformed-attrs.rs:91:1 + --> $DIR/malformed-attrs.rs:90:1 | LL | #[link_section] | ^^^^^^^^^^^^^^^ help: must be of the form: `#[link_section = "name"]` @@ -391,7 +391,7 @@ LL | #[link_section] = note: for more information, visit error[E0539]: malformed `coverage` attribute input - --> $DIR/malformed-attrs.rs:93:1 + --> $DIR/malformed-attrs.rs:92:1 | LL | #[coverage] | ^^^^^^^^^^^ this attribute is only valid with either `on` or `off` as an argument @@ -404,13 +404,13 @@ LL | #[coverage(on)] | ++++ error[E0539]: malformed `sanitize` attribute input - --> $DIR/malformed-attrs.rs:95:1 + --> $DIR/malformed-attrs.rs:94:1 | LL | #[sanitize] | ^^^^^^^^^^^ expected this to be a list error[E0565]: malformed `no_implicit_prelude` attribute input - --> $DIR/malformed-attrs.rs:100:1 + --> $DIR/malformed-attrs.rs:99:1 | LL | #[no_implicit_prelude = 23] | ^^^^^^^^^^^^^^^^^^^^^^----^ @@ -419,7 +419,7 @@ LL | #[no_implicit_prelude = 23] | help: must be of the form: `#[no_implicit_prelude]` error[E0565]: malformed `proc_macro` attribute input - --> $DIR/malformed-attrs.rs:104:1 + --> $DIR/malformed-attrs.rs:103:1 | LL | #[proc_macro = 18] | ^^^^^^^^^^^^^----^ @@ -428,7 +428,7 @@ LL | #[proc_macro = 18] | help: must be of the form: `#[proc_macro]` error[E0539]: malformed `instruction_set` attribute input - --> $DIR/malformed-attrs.rs:111:1 + --> $DIR/malformed-attrs.rs:110:1 | LL | #[instruction_set] | ^^^^^^^^^^^^^^^^^^ @@ -439,7 +439,7 @@ LL | #[instruction_set] = note: for more information, visit error[E0539]: malformed `patchable_function_entry` attribute input - --> $DIR/malformed-attrs.rs:113:1 + --> $DIR/malformed-attrs.rs:112:1 | LL | #[patchable_function_entry] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -448,7 +448,7 @@ LL | #[patchable_function_entry] | help: must be of the form: `#[patchable_function_entry(prefix_nops = m, entry_nops = n)]` error[E0565]: malformed `coroutine` attribute input - --> $DIR/malformed-attrs.rs:116:5 + --> $DIR/malformed-attrs.rs:115:5 | LL | #[coroutine = 63] || {} | ^^^^^^^^^^^^----^ @@ -457,7 +457,7 @@ LL | #[coroutine = 63] || {} | help: must be of the form: `#[coroutine]` error[E0565]: malformed `proc_macro_attribute` attribute input - --> $DIR/malformed-attrs.rs:121:1 + --> $DIR/malformed-attrs.rs:120:1 | LL | #[proc_macro_attribute = 19] | ^^^^^^^^^^^^^^^^^^^^^^^----^ @@ -466,7 +466,7 @@ LL | #[proc_macro_attribute = 19] | help: must be of the form: `#[proc_macro_attribute]` error[E0539]: malformed `must_use` attribute input - --> $DIR/malformed-attrs.rs:124:1 + --> $DIR/malformed-attrs.rs:123:1 | LL | #[must_use = 1] | ^^^^^^^^^^^^^-^ @@ -484,7 +484,7 @@ LL + #[must_use] | error[E0539]: malformed `proc_macro_derive` attribute input - --> $DIR/malformed-attrs.rs:128:1 + --> $DIR/malformed-attrs.rs:127:1 | LL | #[proc_macro_derive] | ^^^^^^^^^^^^^^^^^^^^ expected this to be a list @@ -498,7 +498,7 @@ LL | #[proc_macro_derive(TraitName, attributes(name1, name2, ...))] | ++++++++++++++++++++++++++++++++++++++++++ error[E0539]: malformed `rustc_layout_scalar_valid_range_start` attribute input - --> $DIR/malformed-attrs.rs:133:1 + --> $DIR/malformed-attrs.rs:132:1 | LL | #[rustc_layout_scalar_valid_range_start] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -507,7 +507,7 @@ LL | #[rustc_layout_scalar_valid_range_start] | help: must be of the form: `#[rustc_layout_scalar_valid_range_start(start)]` error[E0539]: malformed `rustc_layout_scalar_valid_range_end` attribute input - --> $DIR/malformed-attrs.rs:135:1 + --> $DIR/malformed-attrs.rs:134:1 | LL | #[rustc_layout_scalar_valid_range_end] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -516,7 +516,7 @@ LL | #[rustc_layout_scalar_valid_range_end] | help: must be of the form: `#[rustc_layout_scalar_valid_range_end(end)]` error[E0539]: malformed `must_not_suspend` attribute input - --> $DIR/malformed-attrs.rs:137:1 + --> $DIR/malformed-attrs.rs:136:1 | LL | #[must_not_suspend()] | ^^^^^^^^^^^^^^^^^^--^ @@ -532,7 +532,7 @@ LL + #[must_not_suspend] | error[E0539]: malformed `cfi_encoding` attribute input - --> $DIR/malformed-attrs.rs:139:1 + --> $DIR/malformed-attrs.rs:138:1 | LL | #[cfi_encoding = ""] | ^^^^^^^^^^^^^^^^^--^ @@ -541,7 +541,7 @@ LL | #[cfi_encoding = ""] | help: must be of the form: `#[cfi_encoding = "encoding"]` error[E0565]: malformed `marker` attribute input - --> $DIR/malformed-attrs.rs:158:1 + --> $DIR/malformed-attrs.rs:157:1 | LL | #[marker = 3] | ^^^^^^^^^---^ @@ -550,7 +550,7 @@ LL | #[marker = 3] | help: must be of the form: `#[marker]` error[E0565]: malformed `fundamental` attribute input - --> $DIR/malformed-attrs.rs:160:1 + --> $DIR/malformed-attrs.rs:159:1 | LL | #[fundamental()] | ^^^^^^^^^^^^^--^ @@ -559,7 +559,7 @@ LL | #[fundamental()] | help: must be of the form: `#[fundamental]` error[E0565]: malformed `ffi_pure` attribute input - --> $DIR/malformed-attrs.rs:168:5 + --> $DIR/malformed-attrs.rs:167:5 | LL | #[unsafe(ffi_pure = 1)] | ^^^^^^^^^^^^^^^^^^---^^ @@ -568,7 +568,7 @@ LL | #[unsafe(ffi_pure = 1)] | help: must be of the form: `#[ffi_pure]` error[E0539]: malformed `link_ordinal` attribute input - --> $DIR/malformed-attrs.rs:170:5 + --> $DIR/malformed-attrs.rs:169:5 | LL | #[link_ordinal] | ^^^^^^^^^^^^^^^ @@ -579,7 +579,7 @@ LL | #[link_ordinal] = note: for more information, visit error[E0565]: malformed `ffi_const` attribute input - --> $DIR/malformed-attrs.rs:174:5 + --> $DIR/malformed-attrs.rs:173:5 | LL | #[unsafe(ffi_const = 1)] | ^^^^^^^^^^^^^^^^^^^---^^ @@ -588,13 +588,13 @@ LL | #[unsafe(ffi_const = 1)] | help: must be of the form: `#[ffi_const]` error[E0539]: malformed `linkage` attribute input - --> $DIR/malformed-attrs.rs:176:5 + --> $DIR/malformed-attrs.rs:175:5 | LL | #[linkage] | ^^^^^^^^^^ expected this to be of the form `linkage = "..."` error[E0539]: malformed `debugger_visualizer` attribute input - --> $DIR/malformed-attrs.rs:191:1 + --> $DIR/malformed-attrs.rs:190:1 | LL | #[debugger_visualizer] | ^^^^^^^^^^^^^^^^^^^^^^ @@ -605,7 +605,7 @@ LL | #[debugger_visualizer] = note: for more information, visit error[E0565]: malformed `automatically_derived` attribute input - --> $DIR/malformed-attrs.rs:193:1 + --> $DIR/malformed-attrs.rs:192:1 | LL | #[automatically_derived = 18] | ^^^^^^^^^^^^^^^^^^^^^^^^----^ @@ -614,7 +614,7 @@ LL | #[automatically_derived = 18] | help: must be of the form: `#[automatically_derived]` error[E0565]: malformed `non_exhaustive` attribute input - --> $DIR/malformed-attrs.rs:201:1 + --> $DIR/malformed-attrs.rs:200:1 | LL | #[non_exhaustive = 1] | ^^^^^^^^^^^^^^^^^---^ @@ -623,7 +623,7 @@ LL | #[non_exhaustive = 1] | help: must be of the form: `#[non_exhaustive]` error[E0565]: malformed `thread_local` attribute input - --> $DIR/malformed-attrs.rs:207:1 + --> $DIR/malformed-attrs.rs:206:1 | LL | #[thread_local()] | ^^^^^^^^^^^^^^--^ @@ -632,7 +632,7 @@ LL | #[thread_local()] | help: must be of the form: `#[thread_local]` error[E0565]: malformed `no_link` attribute input - --> $DIR/malformed-attrs.rs:211:1 + --> $DIR/malformed-attrs.rs:210:1 | LL | #[no_link()] | ^^^^^^^^^--^ @@ -641,7 +641,7 @@ LL | #[no_link()] | help: must be of the form: `#[no_link]` error[E0539]: malformed `macro_use` attribute input - --> $DIR/malformed-attrs.rs:213:1 + --> $DIR/malformed-attrs.rs:212:1 | LL | #[macro_use = 1] | ^^^^^^^^^^^^---^ @@ -659,7 +659,7 @@ LL + #[macro_use] | error[E0539]: malformed `macro_export` attribute input - --> $DIR/malformed-attrs.rs:218:1 + --> $DIR/malformed-attrs.rs:217:1 | LL | #[macro_export = 18] | ^^^^^^^^^^^^^^^----^ @@ -676,7 +676,7 @@ LL + #[macro_export] | error[E0565]: malformed `allow_internal_unsafe` attribute input - --> $DIR/malformed-attrs.rs:220:1 + --> $DIR/malformed-attrs.rs:219:1 | LL | #[allow_internal_unsafe = 1] | ^^^^^^^^^^^^^^^^^^^^^^^^---^ @@ -685,7 +685,7 @@ LL | #[allow_internal_unsafe = 1] | help: must be of the form: `#[allow_internal_unsafe]` error: attribute should be applied to `const fn` - --> $DIR/malformed-attrs.rs:32:1 + --> $DIR/malformed-attrs.rs:31:1 | LL | #[rustc_allow_const_fn_unstable] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -697,7 +697,7 @@ LL | | } | |_- not a `const fn` warning: attribute should be applied to an `extern` block with non-Rust ABI - --> $DIR/malformed-attrs.rs:83:1 + --> $DIR/malformed-attrs.rs:82:1 | LL | #[link] | ^^^^^^^ @@ -712,19 +712,19 @@ LL | | } = note: requested on the command line with `-W unused-attributes` error: `#[repr(align(...))]` is not supported on functions - --> $DIR/malformed-attrs.rs:47:1 + --> $DIR/malformed-attrs.rs:46:1 | LL | #[repr] | ^^^^^^^ | help: use `#[rustc_align(...)]` instead - --> $DIR/malformed-attrs.rs:47:1 + --> $DIR/malformed-attrs.rs:46:1 | LL | #[repr] | ^^^^^^^ warning: missing options for `on_unimplemented` attribute - --> $DIR/malformed-attrs.rs:143:1 + --> $DIR/malformed-attrs.rs:142:1 | LL | #[diagnostic::on_unimplemented] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -733,7 +733,7 @@ LL | #[diagnostic::on_unimplemented] = note: `#[warn(malformed_diagnostic_attributes)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default warning: malformed `on_unimplemented` attribute - --> $DIR/malformed-attrs.rs:145:1 + --> $DIR/malformed-attrs.rs:144:1 | LL | #[diagnostic::on_unimplemented = 1] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here @@ -741,7 +741,7 @@ LL | #[diagnostic::on_unimplemented = 1] = help: only `message`, `note` and `label` are allowed as options error: valid forms for the attribute are `#[doc = "string"]`, `#[doc(alias)]`, `#[doc(attribute)]`, `#[doc(auto_cfg)]`, `#[doc(cfg)]`, `#[doc(fake_variadic)]`, `#[doc(hidden)]`, `#[doc(html_favicon_url)]`, `#[doc(html_logo_url)]`, `#[doc(html_no_source)]`, `#[doc(html_playground_url)]`, `#[doc(html_root_url)]`, `#[doc(include)]`, `#[doc(inline)]`, `#[doc(issue_tracker_base_url)]`, `#[doc(keyword)]`, `#[doc(masked)]`, `#[doc(no_default_passes)]`, `#[doc(no_inline)]`, `#[doc(notable_trait)]`, `#[doc(passes)]`, `#[doc(plugins)]`, `#[doc(rust_logo)]`, `#[doc(search_unbox)]`, `#[doc(spotlight)]`, and `#[doc(test)]` - --> $DIR/malformed-attrs.rs:42:1 + --> $DIR/malformed-attrs.rs:41:1 | LL | #[doc] | ^^^^^^ @@ -753,7 +753,7 @@ LL | #![deny(invalid_doc_attributes)] | ^^^^^^^^^^^^^^^^^^^^^^ error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]` - --> $DIR/malformed-attrs.rs:52:1 + --> $DIR/malformed-attrs.rs:51:1 | LL | #[inline = 5] | ^^^^^^^^^^^^^ @@ -763,13 +763,13 @@ LL | #[inline = 5] = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_name]` - --> $DIR/malformed-attrs.rs:74:1 + --> $DIR/malformed-attrs.rs:73:1 | LL | #[crate_name] | ^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this function - --> $DIR/malformed-attrs.rs:115:1 + --> $DIR/malformed-attrs.rs:114:1 | LL | / fn test() { LL | | #[coroutine = 63] || {} @@ -778,13 +778,13 @@ LL | | } | |_^ error: valid forms for the attribute are `#[doc = "string"]`, `#[doc(alias)]`, `#[doc(attribute)]`, `#[doc(auto_cfg)]`, `#[doc(cfg)]`, `#[doc(fake_variadic)]`, `#[doc(hidden)]`, `#[doc(html_favicon_url)]`, `#[doc(html_logo_url)]`, `#[doc(html_no_source)]`, `#[doc(html_playground_url)]`, `#[doc(html_root_url)]`, `#[doc(include)]`, `#[doc(inline)]`, `#[doc(issue_tracker_base_url)]`, `#[doc(keyword)]`, `#[doc(masked)]`, `#[doc(no_default_passes)]`, `#[doc(no_inline)]`, `#[doc(notable_trait)]`, `#[doc(passes)]`, `#[doc(plugins)]`, `#[doc(rust_logo)]`, `#[doc(search_unbox)]`, `#[doc(spotlight)]`, and `#[doc(test)]` - --> $DIR/malformed-attrs.rs:77:1 + --> $DIR/malformed-attrs.rs:76:1 | LL | #[doc] | ^^^^^^ warning: `#[link_name]` attribute cannot be used on functions - --> $DIR/malformed-attrs.rs:87:1 + --> $DIR/malformed-attrs.rs:86:1 | LL | #[link_name] | ^^^^^^^^^^^^ @@ -793,7 +793,7 @@ LL | #[link_name] = help: `#[link_name]` can be applied to foreign functions and foreign statics error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]` - --> $DIR/malformed-attrs.rs:97:1 + --> $DIR/malformed-attrs.rs:96:1 | LL | #[ignore()] | ^^^^^^^^^^^ @@ -802,7 +802,7 @@ LL | #[ignore()] = note: for more information, see issue #57571 warning: `#[no_implicit_prelude]` attribute cannot be used on functions - --> $DIR/malformed-attrs.rs:100:1 + --> $DIR/malformed-attrs.rs:99:1 | LL | #[no_implicit_prelude = 23] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -811,13 +811,13 @@ LL | #[no_implicit_prelude = 23] = help: `#[no_implicit_prelude]` can be applied to crates and modules warning: `#[diagnostic::do_not_recommend]` does not expect any arguments - --> $DIR/malformed-attrs.rs:152:1 + --> $DIR/malformed-attrs.rs:151:1 | LL | #[diagnostic::do_not_recommend()] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: `#[automatically_derived]` attribute cannot be used on modules - --> $DIR/malformed-attrs.rs:193:1 + --> $DIR/malformed-attrs.rs:192:1 | LL | #[automatically_derived = 18] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -826,7 +826,7 @@ LL | #[automatically_derived = 18] = help: `#[automatically_derived]` can only be applied to trait impl blocks error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]` - --> $DIR/malformed-attrs.rs:227:1 + --> $DIR/malformed-attrs.rs:226:1 | LL | #[ignore = 1] | ^^^^^^^^^^^^^ @@ -835,7 +835,7 @@ LL | #[ignore = 1] = note: for more information, see issue #57571 error[E0308]: mismatched types - --> $DIR/malformed-attrs.rs:116:23 + --> $DIR/malformed-attrs.rs:115:23 | LL | fn test() { | - help: a return type might be missing here: `-> _` @@ -843,7 +843,7 @@ LL | #[coroutine = 63] || {} | ^^^^^ expected `()`, found coroutine | = note: expected unit type `()` - found coroutine `{coroutine@$DIR/malformed-attrs.rs:116:23: 116:25}` + found coroutine `{coroutine@$DIR/malformed-attrs.rs:115:23: 115:25}` error: aborting due to 75 previous errors; 8 warnings emitted @@ -851,7 +851,7 @@ Some errors have detailed explanations: E0308, E0463, E0539, E0565, E0658, E0805 For more information about an error, try `rustc --explain E0308`. Future incompatibility report: Future breakage diagnostic: error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]` - --> $DIR/malformed-attrs.rs:52:1 + --> $DIR/malformed-attrs.rs:51:1 | LL | #[inline = 5] | ^^^^^^^^^^^^^ @@ -862,7 +862,7 @@ LL | #[inline = 5] Future breakage diagnostic: error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]` - --> $DIR/malformed-attrs.rs:97:1 + --> $DIR/malformed-attrs.rs:96:1 | LL | #[ignore()] | ^^^^^^^^^^^ @@ -873,7 +873,7 @@ LL | #[ignore()] Future breakage diagnostic: error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]` - --> $DIR/malformed-attrs.rs:227:1 + --> $DIR/malformed-attrs.rs:226:1 | LL | #[ignore = 1] | ^^^^^^^^^^^^^ diff --git a/tests/ui/consts/precise-drop-allow-const-fn-unstable.rs b/tests/ui/consts/precise-drop-allow-const-fn-unstable.rs index 56155e519dca..4bd5f746f502 100644 --- a/tests/ui/consts/precise-drop-allow-const-fn-unstable.rs +++ b/tests/ui/consts/precise-drop-allow-const-fn-unstable.rs @@ -2,7 +2,7 @@ //@ compile-flags: --crate-type=lib -Cinstrument-coverage -Zno-profiler-runtime //@[allow] check-pass -#![feature(staged_api, rustc_allow_const_fn_unstable)] +#![feature(staged_api, rustc_attrs)] #![stable(feature = "rust_test", since = "1.0.0")] #[stable(feature = "rust_test", since = "1.0.0")] diff --git a/tests/ui/feature-gates/feature-gate-rustc-allow-const-fn-unstable.rs b/tests/ui/feature-gates/feature-gate-rustc-allow-const-fn-unstable.rs index 19d8fa87f553..0c0e0c362936 100644 --- a/tests/ui/feature-gates/feature-gate-rustc-allow-const-fn-unstable.rs +++ b/tests/ui/feature-gates/feature-gate-rustc-allow-const-fn-unstable.rs @@ -1,6 +1,6 @@ #![allow(unused_macros)] -#[rustc_allow_const_fn_unstable()] //~ ERROR rustc_allow_const_fn_unstable side-steps +#[rustc_allow_const_fn_unstable()] //~ ERROR use of an internal attribute const fn foo() { } fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-rustc-allow-const-fn-unstable.stderr b/tests/ui/feature-gates/feature-gate-rustc-allow-const-fn-unstable.stderr index 44f7a4bb0e68..42424abcc3cb 100644 --- a/tests/ui/feature-gates/feature-gate-rustc-allow-const-fn-unstable.stderr +++ b/tests/ui/feature-gates/feature-gate-rustc-allow-const-fn-unstable.stderr @@ -1,12 +1,12 @@ -error[E0658]: rustc_allow_const_fn_unstable side-steps feature gating and stability checks +error[E0658]: use of an internal attribute --> $DIR/feature-gate-rustc-allow-const-fn-unstable.rs:3:1 | LL | #[rustc_allow_const_fn_unstable()] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: see issue #69399 for more information - = help: add `#![feature(rustc_allow_const_fn_unstable)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date + = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable + = note: the `#[rustc_allow_const_fn_unstable]` attribute is an internal implementation detail that will never be stable + = note: rustc_allow_const_fn_unstable side-steps feature gating and stability checks error: aborting due to 1 previous error diff --git a/tests/ui/traits/const-traits/staged-api.rs b/tests/ui/traits/const-traits/staged-api.rs index 6d0a84797ea2..cd74bb45f651 100644 --- a/tests/ui/traits/const-traits/staged-api.rs +++ b/tests/ui/traits/const-traits/staged-api.rs @@ -5,7 +5,7 @@ #![feature(local_feature)] #![feature(const_trait_impl)] #![feature(staged_api)] -#![feature(rustc_allow_const_fn_unstable)] +#![feature(rustc_attrs)] #![stable(feature = "rust1", since = "1.0.0")] //@ aux-build: staged-api.rs From 626de862a5caa5db23e6413ca92856052af9368e Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 17 Feb 2026 21:57:52 +0100 Subject: [PATCH 260/265] carryless_mul: mention the base --- library/core/src/num/uint_macros.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs index cf79635dcd87..94396752ac6d 100644 --- a/library/core/src/num/uint_macros.rs +++ b/library/core/src/num/uint_macros.rs @@ -487,8 +487,8 @@ macro_rules! uint_impl { /// Performs a carry-less multiplication, returning the lower bits. /// - /// This operation is similar to long multiplication, except that exclusive or is used - /// instead of addition. The implementation is equivalent to: + /// This operation is similar to long multiplication in base 2, except that exclusive or is + /// used instead of addition. The implementation is equivalent to: /// /// ```no_run #[doc = concat!("pub fn carryless_mul(lhs: ", stringify!($SelfT), ", rhs: ", stringify!($SelfT), ") -> ", stringify!($SelfT), "{")] From ad5108eaad22d9a23100e1faa03dafc7f1f2deea Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 29 Dec 2025 00:54:17 +0100 Subject: [PATCH 261/265] tail calls: fix copying non-scalar arguments to callee --- .../src/const_eval/machine.rs | 2 +- .../rustc_const_eval/src/interpret/call.rs | 92 ++++++++++--------- .../rustc_const_eval/src/interpret/mod.rs | 2 +- .../rustc_const_eval/src/interpret/stack.rs | 70 ++++++-------- src/tools/miri/src/concurrency/thread.rs | 2 +- src/tools/miri/src/diagnostics.rs | 2 +- src/tools/miri/src/machine.rs | 4 +- .../fail/tail_calls/dangling-local-var.stderr | 4 +- .../pass/{ => function_calls}/tail_call.rs | 12 +++ 9 files changed, 98 insertions(+), 92 deletions(-) rename src/tools/miri/tests/pass/{ => function_calls}/tail_call.rs (84%) diff --git a/compiler/rustc_const_eval/src/const_eval/machine.rs b/compiler/rustc_const_eval/src/const_eval/machine.rs index 57ad670c3f56..3b4f7ed3261a 100644 --- a/compiler/rustc_const_eval/src/const_eval/machine.rs +++ b/compiler/rustc_const_eval/src/const_eval/machine.rs @@ -236,7 +236,7 @@ impl<'tcx> CompileTimeInterpCx<'tcx> { if self.tcx.is_lang_item(def_id, LangItem::PanicDisplay) || self.tcx.is_lang_item(def_id, LangItem::BeginPanic) { - let args = self.copy_fn_args(args); + let args = Self::copy_fn_args(args); // &str or &&str assert!(args.len() == 1); diff --git a/compiler/rustc_const_eval/src/interpret/call.rs b/compiler/rustc_const_eval/src/interpret/call.rs index 1ee2647d5bf7..9220fde474e4 100644 --- a/compiler/rustc_const_eval/src/interpret/call.rs +++ b/compiler/rustc_const_eval/src/interpret/call.rs @@ -19,8 +19,8 @@ use tracing::{info, instrument, trace}; use super::{ CtfeProvenance, FnVal, ImmTy, InterpCx, InterpResult, MPlaceTy, Machine, OpTy, PlaceTy, - Projectable, Provenance, ReturnAction, ReturnContinuation, Scalar, StackPopInfo, interp_ok, - throw_ub, throw_ub_custom, + Projectable, Provenance, ReturnAction, ReturnContinuation, Scalar, interp_ok, throw_ub, + throw_ub_custom, }; use crate::enter_trace_span; use crate::interpret::EnteredTraceSpan; @@ -43,25 +43,22 @@ impl<'tcx, Prov: Provenance> FnArg<'tcx, Prov> { FnArg::InPlace(mplace) => &mplace.layout, } } -} -impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { /// Make a copy of the given fn_arg. Any `InPlace` are degenerated to copies, no protection of the /// original memory occurs. - pub fn copy_fn_arg(&self, arg: &FnArg<'tcx, M::Provenance>) -> OpTy<'tcx, M::Provenance> { - match arg { + pub fn copy_fn_arg(&self) -> OpTy<'tcx, Prov> { + match self { FnArg::Copy(op) => op.clone(), FnArg::InPlace(mplace) => mplace.clone().into(), } } +} +impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { /// Make a copy of the given fn_args. Any `InPlace` are degenerated to copies, no protection of the /// original memory occurs. - pub fn copy_fn_args( - &self, - args: &[FnArg<'tcx, M::Provenance>], - ) -> Vec> { - args.iter().map(|fn_arg| self.copy_fn_arg(fn_arg)).collect() + pub fn copy_fn_args(args: &[FnArg<'tcx, M::Provenance>]) -> Vec> { + args.iter().map(|fn_arg| fn_arg.copy_fn_arg()).collect() } /// Helper function for argument untupling. @@ -319,7 +316,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { // We work with a copy of the argument for now; if this is in-place argument passing, we // will later protect the source it comes from. This means the callee cannot observe if we // did in-place of by-copy argument passing, except for pointer equality tests. - let caller_arg_copy = self.copy_fn_arg(caller_arg); + let caller_arg_copy = caller_arg.copy_fn_arg(); if !already_live { let local = callee_arg.as_local().unwrap(); let meta = caller_arg_copy.meta(); @@ -616,7 +613,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { if let Some(fallback) = M::call_intrinsic( self, instance, - &self.copy_fn_args(args), + &Self::copy_fn_args(args), destination, target, unwind, @@ -703,7 +700,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { // An `InPlace` does nothing here, we keep the original receiver intact. We can't // really pass the argument in-place anyway, and we are constructing a new // `Immediate` receiver. - let mut receiver = self.copy_fn_arg(&args[0]); + let mut receiver = args[0].copy_fn_arg(); let receiver_place = loop { match receiver.layout.ty.kind() { ty::Ref(..) | ty::RawPtr(..) => { @@ -824,41 +821,50 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { with_caller_location: bool, ) -> InterpResult<'tcx> { trace!("init_fn_tail_call: {:#?}", fn_val); - // This is the "canonical" implementation of tails calls, // a pop of the current stack frame, followed by a normal call // which pushes a new stack frame, with the return address from // the popped stack frame. // - // Note that we are using `pop_stack_frame_raw` and not `return_from_current_stack_frame`, - // as the latter "executes" the goto to the return block, but we don't want to, + // Note that we cannot use `return_from_current_stack_frame`, + // as that "executes" the goto to the return block, but we don't want to, // only the tail called function should return to the current return block. - let StackPopInfo { return_action, return_cont, return_place } = - self.pop_stack_frame_raw(false, |_this, _return_place| { - // This function's return value is just discarded, the tail-callee will fill in the return place instead. - interp_ok(()) - })?; - assert_eq!(return_action, ReturnAction::Normal); - - // Take the "stack pop cleanup" info, and use that to initiate the next call. - let ReturnContinuation::Goto { ret, unwind } = return_cont else { - bug!("can't tailcall as root"); + // The arguments need to all be copied since the current stack frame will be removed + // before the callee even starts executing. + // FIXME(explicit_tail_calls,#144855): does this match what codegen does? + let args = args.iter().map(|fn_arg| FnArg::Copy(fn_arg.copy_fn_arg())).collect::>(); + // Remove the frame from the stack. + let frame = self.pop_stack_frame_raw()?; + // Remember where this frame would have returned to. + let ReturnContinuation::Goto { ret, unwind } = frame.return_cont() else { + bug!("can't tailcall as root of the stack"); }; - + // There's no return value to deal with! Instead, we forward the old return place + // to the new function. // FIXME(explicit_tail_calls): // we should check if both caller&callee can/n't unwind, // see + // Now push the new stack frame. self.init_fn_call( fn_val, (caller_abi, caller_fn_abi), - args, + &*args, with_caller_location, - &return_place, + frame.return_place(), ret, unwind, - ) + )?; + + // Finally, clear the local variables. Has to be done after pushing to support + // non-scalar arguments. + // FIXME(explicit_tail_calls,#144855): revisit this once codegen supports indirect + // arguments, to ensure the semantics are compatible. + let return_action = self.cleanup_stack_frame(/* unwinding */ false, frame)?; + assert_eq!(return_action, ReturnAction::Normal); + + interp_ok(()) } pub(super) fn init_drop_in_place_call( @@ -953,14 +959,18 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { // local's value out. let return_op = self.local_to_op(mir::RETURN_PLACE, None).expect("return place should always be live"); - // Do the actual pop + copy. - let stack_pop_info = self.pop_stack_frame_raw(unwinding, |this, return_place| { - this.copy_op_allow_transmute(&return_op, return_place)?; - trace!("return value: {:?}", this.dump_place(return_place)); - interp_ok(()) - })?; - - match stack_pop_info.return_action { + // Remove the frame from the stack. + let frame = self.pop_stack_frame_raw()?; + // Copy the return value and remember the return continuation. + if !unwinding { + self.copy_op_allow_transmute(&return_op, frame.return_place())?; + trace!("return value: {:?}", self.dump_place(frame.return_place())); + } + let return_cont = frame.return_cont(); + // Finish popping the stack frame. + let return_action = self.cleanup_stack_frame(unwinding, frame)?; + // Jump to the next block. + match return_action { ReturnAction::Normal => {} ReturnAction::NoJump => { // The hook already did everything. @@ -978,7 +988,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { // Normal return, figure out where to jump. if unwinding { // Follow the unwind edge. - match stack_pop_info.return_cont { + match return_cont { ReturnContinuation::Goto { unwind, .. } => { // This must be the very last thing that happens, since it can in fact push a new stack frame. self.unwind_to_block(unwind) @@ -989,7 +999,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { } } else { // Follow the normal return edge. - match stack_pop_info.return_cont { + match return_cont { ReturnContinuation::Goto { ret, .. } => self.return_to_block(ret), ReturnContinuation::Stop { .. } => { assert!( diff --git a/compiler/rustc_const_eval/src/interpret/mod.rs b/compiler/rustc_const_eval/src/interpret/mod.rs index 2f365ec77b33..c8ffc0ed208a 100644 --- a/compiler/rustc_const_eval/src/interpret/mod.rs +++ b/compiler/rustc_const_eval/src/interpret/mod.rs @@ -36,7 +36,7 @@ pub use self::operand::{ImmTy, Immediate, OpTy}; pub use self::place::{MPlaceTy, MemPlaceMeta, PlaceTy, Writeable}; use self::place::{MemPlace, Place}; pub use self::projection::{OffsetMode, Projectable}; -pub use self::stack::{Frame, FrameInfo, LocalState, ReturnContinuation, StackPopInfo}; +pub use self::stack::{Frame, FrameInfo, LocalState, ReturnContinuation}; pub use self::util::EnteredTraceSpan; pub(crate) use self::util::create_static_alloc; pub use self::validity::{CtfeValidationMode, RangeSet, RefTracking}; diff --git a/compiler/rustc_const_eval/src/interpret/stack.rs b/compiler/rustc_const_eval/src/interpret/stack.rs index 1b8af1c44277..a55bea60cd6e 100644 --- a/compiler/rustc_const_eval/src/interpret/stack.rs +++ b/compiler/rustc_const_eval/src/interpret/stack.rs @@ -81,7 +81,7 @@ pub struct Frame<'tcx, Prov: Provenance = CtfeProvenance, Extra = ()> { /// and its layout in the caller. This place is to be interpreted relative to the /// *caller's* stack frame. We use a `PlaceTy` instead of an `MPlaceTy` since this /// avoids having to move *all* return places into Miri's memory. - pub return_place: PlaceTy<'tcx, Prov>, + return_place: PlaceTy<'tcx, Prov>, /// The list of locals for this stack frame, stored in order as /// `[return_ptr, arguments..., variables..., temporaries...]`. @@ -127,19 +127,6 @@ pub enum ReturnContinuation { Stop { cleanup: bool }, } -/// Return type of [`InterpCx::pop_stack_frame_raw`]. -pub struct StackPopInfo<'tcx, Prov: Provenance> { - /// Additional information about the action to be performed when returning from the popped - /// stack frame. - pub return_action: ReturnAction, - - /// [`return_cont`](Frame::return_cont) of the popped stack frame. - pub return_cont: ReturnContinuation, - - /// [`return_place`](Frame::return_place) of the popped stack frame. - pub return_place: PlaceTy<'tcx, Prov>, -} - /// State of a local variable including a memoized layout #[derive(Clone)] pub struct LocalState<'tcx, Prov: Provenance = CtfeProvenance> { @@ -292,6 +279,14 @@ impl<'tcx, Prov: Provenance, Extra> Frame<'tcx, Prov, Extra> { self.instance } + pub fn return_place(&self) -> &PlaceTy<'tcx, Prov> { + &self.return_place + } + + pub fn return_cont(&self) -> ReturnContinuation { + self.return_cont + } + /// Return the `SourceInfo` of the current instruction. pub fn current_source_info(&self) -> Option<&mir::SourceInfo> { self.loc.left().map(|loc| self.body.source_info(loc)) @@ -417,35 +412,26 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { interp_ok(()) } - /// Low-level helper that pops a stack frame from the stack and returns some information about - /// it. - /// - /// This also deallocates locals, if necessary. - /// `copy_ret_val` gets called after the frame has been taken from the stack but before the locals have been deallocated. - /// - /// [`M::before_stack_pop`] and [`M::after_stack_pop`] are called by this function - /// automatically. - /// - /// The high-level version of this is `return_from_current_stack_frame`. - /// - /// [`M::before_stack_pop`]: Machine::before_stack_pop - /// [`M::after_stack_pop`]: Machine::after_stack_pop + /// Low-level helper that pops a stack frame from the stack without any cleanup. + /// This invokes `before_stack_pop`. + /// After calling this function, you need to deal with the return value, and then + /// invoke `cleanup_stack_frame`. pub(super) fn pop_stack_frame_raw( &mut self, - unwinding: bool, - copy_ret_val: impl FnOnce(&mut Self, &PlaceTy<'tcx, M::Provenance>) -> InterpResult<'tcx>, - ) -> InterpResult<'tcx, StackPopInfo<'tcx, M::Provenance>> { + ) -> InterpResult<'tcx, Frame<'tcx, M::Provenance, M::FrameExtra>> { M::before_stack_pop(self)?; let frame = self.stack_mut().pop().expect("tried to pop a stack frame, but there were none"); + interp_ok(frame) + } - // Copy return value (unless we are unwinding). - if !unwinding { - copy_ret_val(self, &frame.return_place)?; - } - + /// Deallocate local variables in the stack frame, and invoke `after_stack_pop`. + pub(super) fn cleanup_stack_frame( + &mut self, + unwinding: bool, + frame: Frame<'tcx, M::Provenance, M::FrameExtra>, + ) -> InterpResult<'tcx, ReturnAction> { let return_cont = frame.return_cont; - let return_place = frame.return_place.clone(); // Cleanup: deallocate locals. // Usually we want to clean up (deallocate locals), but in a few rare cases we don't. @@ -455,7 +441,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { ReturnContinuation::Stop { cleanup, .. } => cleanup, }; - let return_action = if cleanup { + if cleanup { for local in &frame.locals { self.deallocate_local(local.value)?; } @@ -466,13 +452,11 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { // Call the machine hook, which determines the next steps. let return_action = M::after_stack_pop(self, frame, unwinding)?; assert_ne!(return_action, ReturnAction::NoCleanup); - return_action + interp_ok(return_action) } else { // We also skip the machine hook when there's no cleanup. This not a real "pop" anyway. - ReturnAction::NoCleanup - }; - - interp_ok(StackPopInfo { return_action, return_cont, return_place }) + interp_ok(ReturnAction::NoCleanup) + } } /// In the current stack frame, mark all locals as live that are not arguments and don't have @@ -655,7 +639,7 @@ impl<'a, 'tcx: 'a, M: Machine<'tcx>> InterpCx<'tcx, M> { let (_idx, callee_abi) = callee_abis.next().unwrap(); assert!(self.check_argument_compat(caller_abi, callee_abi)?); // FIXME: do we have to worry about in-place argument passing? - let op = self.copy_fn_arg(fn_arg); + let op = fn_arg.copy_fn_arg(); let mplace = self.allocate(op.layout, MemoryKind::Stack)?; self.copy_op(&op, &mplace)?; diff --git a/src/tools/miri/src/concurrency/thread.rs b/src/tools/miri/src/concurrency/thread.rs index 1c404d419ef8..9d829bf69e5e 100644 --- a/src/tools/miri/src/concurrency/thread.rs +++ b/src/tools/miri/src/concurrency/thread.rs @@ -343,8 +343,8 @@ impl VisitProvenance for Thread<'_> { impl VisitProvenance for Frame<'_, Provenance, FrameExtra<'_>> { fn visit_provenance(&self, visit: &mut VisitWith<'_>) { + let return_place = self.return_place(); let Frame { - return_place, locals, extra, // There are some private fields we cannot access; they contain no tags. diff --git a/src/tools/miri/src/diagnostics.rs b/src/tools/miri/src/diagnostics.rs index 64c7096fc5c2..71ec9723de8e 100644 --- a/src/tools/miri/src/diagnostics.rs +++ b/src/tools/miri/src/diagnostics.rs @@ -493,7 +493,7 @@ pub fn report_result<'tcx>( for (i, frame) in ecx.active_thread_stack().iter().enumerate() { trace!("-------------------"); trace!("Frame {}", i); - trace!(" return: {:?}", frame.return_place); + trace!(" return: {:?}", frame.return_place()); for (i, local) in frame.locals.iter().enumerate() { trace!(" local {}: {:?}", i, local); } diff --git a/src/tools/miri/src/machine.rs b/src/tools/miri/src/machine.rs index d50475c74874..7883673cdd6a 100644 --- a/src/tools/miri/src/machine.rs +++ b/src/tools/miri/src/machine.rs @@ -1235,7 +1235,7 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> { // to run extra MIR), and Ok(Some(body)) if we found MIR to run for the // foreign function // Any needed call to `goto_block` will be performed by `emulate_foreign_item`. - let args = ecx.copy_fn_args(args); // FIXME: Should `InPlace` arguments be reset to uninit? + let args = MiriInterpCx::copy_fn_args(args); // FIXME: Should `InPlace` arguments be reset to uninit? let link_name = Symbol::intern(ecx.tcx.symbol_name(instance).name); return ecx.emulate_foreign_item(link_name, abi, &args, dest, ret, unwind); } @@ -1262,7 +1262,7 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> { ret: Option, unwind: mir::UnwindAction, ) -> InterpResult<'tcx> { - let args = ecx.copy_fn_args(args); // FIXME: Should `InPlace` arguments be reset to uninit? + let args = MiriInterpCx::copy_fn_args(args); // FIXME: Should `InPlace` arguments be reset to uninit? ecx.emulate_dyn_sym(fn_val, abi, &args, dest, ret, unwind) } diff --git a/src/tools/miri/tests/fail/tail_calls/dangling-local-var.stderr b/src/tools/miri/tests/fail/tail_calls/dangling-local-var.stderr index 1577cceae594..7b0efec7be5a 100644 --- a/src/tools/miri/tests/fail/tail_calls/dangling-local-var.stderr +++ b/src/tools/miri/tests/fail/tail_calls/dangling-local-var.stderr @@ -14,8 +14,8 @@ LL | let local = 0; help: ALLOC was deallocated here: --> tests/fail/tail_calls/dangling-local-var.rs:LL:CC | -LL | f(std::ptr::null()); - | ^^^^^^^^^^^^^^^^^^^ +LL | let _val = unsafe { *x }; + | ^^^^ = note: stack backtrace: 0: g at tests/fail/tail_calls/dangling-local-var.rs:LL:CC diff --git a/src/tools/miri/tests/pass/tail_call.rs b/src/tools/miri/tests/pass/function_calls/tail_call.rs similarity index 84% rename from src/tools/miri/tests/pass/tail_call.rs rename to src/tools/miri/tests/pass/function_calls/tail_call.rs index f62007063980..f9cf86bb898f 100644 --- a/src/tools/miri/tests/pass/tail_call.rs +++ b/src/tools/miri/tests/pass/function_calls/tail_call.rs @@ -4,6 +4,7 @@ fn main() { assert_eq!(factorial(10), 3_628_800); assert_eq!(mutually_recursive_identity(1000), 1000); + non_scalar(); } fn factorial(n: u32) -> u32 { @@ -37,3 +38,14 @@ fn mutually_recursive_identity(x: u32) -> u32 { switch(x, 0) } + +fn non_scalar() { + fn f(x: [usize; 2], i: u32) { + if i == 0 { + return; + } + become f(x, i - 1); + } + + f([5, 5], 2); +} From 6e65aba9a394f3afad863378e761030ad36f80bc Mon Sep 17 00:00:00 2001 From: Daniel Scherzer Date: Wed, 11 Feb 2026 18:46:14 -0800 Subject: [PATCH 262/265] tests/ui/test-attrs: add annotations for reference rules --- tests/ui/test-attrs/issue-109816.rs | 1 + tests/ui/test-attrs/issue-109816.stderr | 2 +- .../test-attr-non-associated-functions.rs | 1 + .../test-attr-non-associated-functions.stderr | 4 ++-- .../ui/test-attrs/test-function-signature.rs | 1 + .../test-attrs/test-function-signature.stderr | 10 ++++---- tests/ui/test-attrs/test-on-not-fn.rs | 1 + tests/ui/test-attrs/test-on-not-fn.stderr | 24 +++++++++---------- tests/ui/test-attrs/test-passed.rs | 1 + tests/ui/test-attrs/test-should-panic-attr.rs | 1 + .../test-attrs/test-should-panic-attr.stderr | 8 +++---- .../test-should-panic-failed-show-span.rs | 1 + ...t-should-panic-failed-show-span.run.stderr | 8 +++---- ...t-should-panic-failed-show-span.run.stdout | 4 ++-- tests/ui/test-attrs/test-vs-cfg-test.rs | 1 + 15 files changed, 38 insertions(+), 30 deletions(-) diff --git a/tests/ui/test-attrs/issue-109816.rs b/tests/ui/test-attrs/issue-109816.rs index c7caae67fefa..f40f99946da1 100644 --- a/tests/ui/test-attrs/issue-109816.rs +++ b/tests/ui/test-attrs/issue-109816.rs @@ -1,4 +1,5 @@ //@ compile-flags: --test +//@ reference: attributes.testing.test.allowed-positions fn align_offset_weird_strides() { #[test] diff --git a/tests/ui/test-attrs/issue-109816.stderr b/tests/ui/test-attrs/issue-109816.stderr index 270f4e0a6668..118c8d878290 100644 --- a/tests/ui/test-attrs/issue-109816.stderr +++ b/tests/ui/test-attrs/issue-109816.stderr @@ -1,5 +1,5 @@ error: the `#[test]` attribute may only be used on a free function - --> $DIR/issue-109816.rs:4:5 + --> $DIR/issue-109816.rs:5:5 | LL | #[test] | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions diff --git a/tests/ui/test-attrs/test-attr-non-associated-functions.rs b/tests/ui/test-attrs/test-attr-non-associated-functions.rs index 4bf337d0f1b3..9d28f59888a0 100644 --- a/tests/ui/test-attrs/test-attr-non-associated-functions.rs +++ b/tests/ui/test-attrs/test-attr-non-associated-functions.rs @@ -1,4 +1,5 @@ //@ compile-flags:--test +//@ reference: attributes.testing.test.allowed-positions struct A {} diff --git a/tests/ui/test-attrs/test-attr-non-associated-functions.stderr b/tests/ui/test-attrs/test-attr-non-associated-functions.stderr index 13914971b558..fda28ee28a07 100644 --- a/tests/ui/test-attrs/test-attr-non-associated-functions.stderr +++ b/tests/ui/test-attrs/test-attr-non-associated-functions.stderr @@ -1,5 +1,5 @@ error: the `#[test]` attribute may only be used on a free function - --> $DIR/test-attr-non-associated-functions.rs:6:5 + --> $DIR/test-attr-non-associated-functions.rs:7:5 | LL | #[test] | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions @@ -11,7 +11,7 @@ LL + #[cfg(test)] | error: the `#[test]` attribute may only be used on a free function - --> $DIR/test-attr-non-associated-functions.rs:11:5 + --> $DIR/test-attr-non-associated-functions.rs:12:5 | LL | #[test] | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions diff --git a/tests/ui/test-attrs/test-function-signature.rs b/tests/ui/test-attrs/test-function-signature.rs index 0f43245be6f6..4a6c0e8450ce 100644 --- a/tests/ui/test-attrs/test-function-signature.rs +++ b/tests/ui/test-attrs/test-function-signature.rs @@ -1,4 +1,5 @@ //@ compile-flags: --test +//@ reference: attributes.testing.test.allowed-positions #[test] fn foo() -> Result<(), ()> { diff --git a/tests/ui/test-attrs/test-function-signature.stderr b/tests/ui/test-attrs/test-function-signature.stderr index 55d09970b320..7fdaaed1aebc 100644 --- a/tests/ui/test-attrs/test-function-signature.stderr +++ b/tests/ui/test-attrs/test-function-signature.stderr @@ -1,29 +1,29 @@ error: functions used as tests can not have any arguments - --> $DIR/test-function-signature.rs:14:1 + --> $DIR/test-function-signature.rs:15:1 | LL | fn baz(val: i32) {} | ^^^^^^^^^^^^^^^^^^^ error: functions used as tests can not have any non-lifetime generic parameters - --> $DIR/test-function-signature.rs:22:1 + --> $DIR/test-function-signature.rs:23:1 | LL | fn type_generic() {} | ^^^^^^^^^^^^^^^^^^^^^^^ error: functions used as tests can not have any non-lifetime generic parameters - --> $DIR/test-function-signature.rs:25:1 + --> $DIR/test-function-signature.rs:26:1 | LL | fn const_generic() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: functions used as tests can not have any arguments - --> $DIR/test-function-signature.rs:30:5 + --> $DIR/test-function-signature.rs:31:5 | LL | fn foo(arg: ()) {} | ^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `i32: Termination` is not satisfied - --> $DIR/test-function-signature.rs:9:13 + --> $DIR/test-function-signature.rs:10:13 | LL | #[test] | ------- in this attribute macro expansion diff --git a/tests/ui/test-attrs/test-on-not-fn.rs b/tests/ui/test-attrs/test-on-not-fn.rs index 16e9cd8d5b8d..57ae2b19cf5f 100644 --- a/tests/ui/test-attrs/test-on-not-fn.rs +++ b/tests/ui/test-attrs/test-on-not-fn.rs @@ -1,4 +1,5 @@ //@ compile-flags: --test +//@ reference: attributes.testing.test.allowed-positions #[test] //~ ERROR: the `#[test]` attribute may only be used on a free function mod test {} diff --git a/tests/ui/test-attrs/test-on-not-fn.stderr b/tests/ui/test-attrs/test-on-not-fn.stderr index db8bed100a63..22e479268856 100644 --- a/tests/ui/test-attrs/test-on-not-fn.stderr +++ b/tests/ui/test-attrs/test-on-not-fn.stderr @@ -1,5 +1,5 @@ error: the `#[test]` attribute may only be used on a free function - --> $DIR/test-on-not-fn.rs:3:1 + --> $DIR/test-on-not-fn.rs:4:1 | LL | #[test] | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions @@ -13,7 +13,7 @@ LL + #[cfg(test)] | error: the `#[test]` attribute may only be used on a free function - --> $DIR/test-on-not-fn.rs:6:1 + --> $DIR/test-on-not-fn.rs:7:1 | LL | #[test] | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions @@ -33,7 +33,7 @@ LL + #[cfg(test)] | error: the `#[test]` attribute may only be used on a free function - --> $DIR/test-on-not-fn.rs:20:1 + --> $DIR/test-on-not-fn.rs:21:1 | LL | #[test] | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions @@ -47,7 +47,7 @@ LL + #[cfg(test)] | error: the `#[test]` attribute may only be used on a free function - --> $DIR/test-on-not-fn.rs:23:1 + --> $DIR/test-on-not-fn.rs:24:1 | LL | #[test] | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions @@ -61,7 +61,7 @@ LL + #[cfg(test)] | error: the `#[test]` attribute may only be used on a free function - --> $DIR/test-on-not-fn.rs:26:1 + --> $DIR/test-on-not-fn.rs:27:1 | LL | #[test] | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions @@ -75,7 +75,7 @@ LL + #[cfg(test)] | error: the `#[test]` attribute may only be used on a free function - --> $DIR/test-on-not-fn.rs:29:1 + --> $DIR/test-on-not-fn.rs:30:1 | LL | #[test] | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions @@ -89,7 +89,7 @@ LL + #[cfg(test)] | error: the `#[test]` attribute may only be used on a free function - --> $DIR/test-on-not-fn.rs:32:1 + --> $DIR/test-on-not-fn.rs:33:1 | LL | #[test] | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions @@ -103,7 +103,7 @@ LL + #[cfg(test)] | error: the `#[test]` attribute may only be used on a free function - --> $DIR/test-on-not-fn.rs:35:1 + --> $DIR/test-on-not-fn.rs:36:1 | LL | #[test] | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions @@ -119,7 +119,7 @@ LL + #[cfg(test)] | error: the `#[test]` attribute may only be used on a free function - --> $DIR/test-on-not-fn.rs:40:1 + --> $DIR/test-on-not-fn.rs:41:1 | LL | #[test] | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions @@ -133,7 +133,7 @@ LL + #[cfg(test)] | error: the `#[test]` attribute may only be used on a free function - --> $DIR/test-on-not-fn.rs:43:1 + --> $DIR/test-on-not-fn.rs:44:1 | LL | #[test] | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions @@ -150,7 +150,7 @@ LL + #[cfg(test)] | error: the `#[test]` attribute may only be used on a free function - --> $DIR/test-on-not-fn.rs:50:1 + --> $DIR/test-on-not-fn.rs:51:1 | LL | #[test] | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions @@ -168,7 +168,7 @@ LL + #[cfg(test)] | warning: the `#[test]` attribute may only be used on a free function - --> $DIR/test-on-not-fn.rs:61:1 + --> $DIR/test-on-not-fn.rs:62:1 | LL | #[test] | ^^^^^^^ the `#[test]` macro causes a function to be run as a test and has no effect on non-functions diff --git a/tests/ui/test-attrs/test-passed.rs b/tests/ui/test-attrs/test-passed.rs index 959470adcc42..034051e4eb6d 100644 --- a/tests/ui/test-attrs/test-passed.rs +++ b/tests/ui/test-attrs/test-passed.rs @@ -4,6 +4,7 @@ //@ run-pass //@ check-run-results //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ reference: attributes.testing.test.success // Tests the output of the test harness with only passed tests. diff --git a/tests/ui/test-attrs/test-should-panic-attr.rs b/tests/ui/test-attrs/test-should-panic-attr.rs index e6de07d00941..b095099daad0 100644 --- a/tests/ui/test-attrs/test-should-panic-attr.rs +++ b/tests/ui/test-attrs/test-should-panic-attr.rs @@ -1,4 +1,5 @@ //@ compile-flags: --test +//@ reference: attributes.testing.should_panic.syntax #[test] #[should_panic = "foo"] diff --git a/tests/ui/test-attrs/test-should-panic-attr.stderr b/tests/ui/test-attrs/test-should-panic-attr.stderr index 475a55ad0cbc..48f6b0d37cb1 100644 --- a/tests/ui/test-attrs/test-should-panic-attr.stderr +++ b/tests/ui/test-attrs/test-should-panic-attr.stderr @@ -1,5 +1,5 @@ error[E0539]: malformed `should_panic` attribute input - --> $DIR/test-should-panic-attr.rs:10:1 + --> $DIR/test-should-panic-attr.rs:11:1 | LL | #[should_panic(expected)] | ^^^^^^^^^^^^^^^--------^^ @@ -19,7 +19,7 @@ LL + #[should_panic] | error[E0539]: malformed `should_panic` attribute input - --> $DIR/test-should-panic-attr.rs:19:1 + --> $DIR/test-should-panic-attr.rs:20:1 | LL | #[should_panic(expect)] | ^^^^^^^^^^^^^^--------^ @@ -39,7 +39,7 @@ LL + #[should_panic] | error[E0539]: malformed `should_panic` attribute input - --> $DIR/test-should-panic-attr.rs:28:1 + --> $DIR/test-should-panic-attr.rs:29:1 | LL | #[should_panic(expected(foo, bar))] | ^^^^^^^^^^^^^^^------------------^^ @@ -60,7 +60,7 @@ LL + #[should_panic] | error[E0805]: malformed `should_panic` attribute input - --> $DIR/test-should-panic-attr.rs:37:1 + --> $DIR/test-should-panic-attr.rs:38:1 | LL | #[should_panic(expected = "foo", bar)] | ^^^^^^^^^^^^^^-----------------------^ diff --git a/tests/ui/test-attrs/test-should-panic-failed-show-span.rs b/tests/ui/test-attrs/test-should-panic-failed-show-span.rs index 22a6f4a835e2..f8c1840ab79f 100644 --- a/tests/ui/test-attrs/test-should-panic-failed-show-span.rs +++ b/tests/ui/test-attrs/test-should-panic-failed-show-span.rs @@ -8,6 +8,7 @@ //@ normalize-stdout: "TypeId\(0x[0-9a-f]+\)" -> "TypeId($$HEX)" //@ needs-threads //@ needs-unwind (panic) +//@ reference: attributes.testing.should_panic.expected #[test] #[should_panic] diff --git a/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stderr b/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stderr index ab36bc2beb9e..398479f15fa2 100644 --- a/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stderr +++ b/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stderr @@ -1,13 +1,13 @@ -thread 'should_panic_with_any_message' ($TID) panicked at $DIR/test-should-panic-failed-show-span.rs:15:5: +thread 'should_panic_with_any_message' ($TID) panicked at $DIR/test-should-panic-failed-show-span.rs:16:5: Panic! note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace -thread 'should_panic_with_message' ($TID) panicked at $DIR/test-should-panic-failed-show-span.rs:21:5: +thread 'should_panic_with_message' ($TID) panicked at $DIR/test-should-panic-failed-show-span.rs:22:5: message -thread 'should_panic_with_substring_panics_with_incorrect_string' ($TID) panicked at $DIR/test-should-panic-failed-show-span.rs:39:5: +thread 'should_panic_with_substring_panics_with_incorrect_string' ($TID) panicked at $DIR/test-should-panic-failed-show-span.rs:40:5: ZOMGWTFBBQ -thread 'should_panic_with_substring_panics_with_non_string_value' ($TID) panicked at $DIR/test-should-panic-failed-show-span.rs:46:5: +thread 'should_panic_with_substring_panics_with_non_string_value' ($TID) panicked at $DIR/test-should-panic-failed-show-span.rs:47:5: Box diff --git a/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stdout b/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stdout index 492f54debc82..c28403a11e8e 100644 --- a/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stdout +++ b/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stdout @@ -10,9 +10,9 @@ test should_panic_with_substring_panics_with_non_string_value - should panic ... failures: ---- should_panic_with_any_message_does_not_panic stdout ---- -note: test did not panic as expected at $DIR/test-should-panic-failed-show-span.rs:26:4 +note: test did not panic as expected at $DIR/test-should-panic-failed-show-span.rs:27:4 ---- should_panic_with_message_does_not_panic stdout ---- -note: test did not panic as expected at $DIR/test-should-panic-failed-show-span.rs:32:4 +note: test did not panic as expected at $DIR/test-should-panic-failed-show-span.rs:33:4 ---- should_panic_with_substring_panics_with_incorrect_string stdout ---- note: panic did not contain expected string panic message: "ZOMGWTFBBQ" diff --git a/tests/ui/test-attrs/test-vs-cfg-test.rs b/tests/ui/test-attrs/test-vs-cfg-test.rs index d7d9e61103c9..634511fdff39 100644 --- a/tests/ui/test-attrs/test-vs-cfg-test.rs +++ b/tests/ui/test-attrs/test-vs-cfg-test.rs @@ -1,5 +1,6 @@ //@ run-pass //@ compile-flags: --cfg test +//@ reference: cfg.test // Make sure `--cfg test` does not inject test harness From d2580fdd5828f3a957c0457a58fa76d41c0c72ab Mon Sep 17 00:00:00 2001 From: mu001999 Date: Wed, 18 Feb 2026 10:35:02 +0800 Subject: [PATCH 263/265] Update tracking issue number for final_associated_functions --- compiler/rustc_feature/src/unstable.rs | 2 +- .../feature-gate-final-associated-functions.stderr | 2 +- tests/ui/traits/final/final-kw.gated.stderr | 2 +- tests/ui/traits/final/final-kw.ungated.stderr | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index b810cd0db8cd..81de49b9967a 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -493,7 +493,7 @@ declare_features! ( /// Allows the use of `#[ffi_pure]` on foreign functions. (unstable, ffi_pure, "1.45.0", Some(58329)), /// Allows marking trait functions as `final` to prevent overriding impls - (unstable, final_associated_functions, "CURRENT_RUSTC_VERSION", Some(1)), + (unstable, final_associated_functions, "CURRENT_RUSTC_VERSION", Some(131179)), /// Controlling the behavior of fmt::Debug (unstable, fmt_debug, "1.82.0", Some(129709)), /// Allows using `#[align(...)]` on function items diff --git a/tests/ui/feature-gates/feature-gate-final-associated-functions.stderr b/tests/ui/feature-gates/feature-gate-final-associated-functions.stderr index b3731acd1d90..cd21aa1c0bf3 100644 --- a/tests/ui/feature-gates/feature-gate-final-associated-functions.stderr +++ b/tests/ui/feature-gates/feature-gate-final-associated-functions.stderr @@ -4,7 +4,7 @@ error[E0658]: `final` on trait functions is experimental LL | final fn bar() {} | ^^^^^ | - = note: see issue #1 for more information + = note: see issue #131179 for more information = help: add `#![feature(final_associated_functions)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/ui/traits/final/final-kw.gated.stderr b/tests/ui/traits/final/final-kw.gated.stderr index a7967ebf08e2..62a39d7ca202 100644 --- a/tests/ui/traits/final/final-kw.gated.stderr +++ b/tests/ui/traits/final/final-kw.gated.stderr @@ -4,7 +4,7 @@ error[E0658]: `final` on trait functions is experimental LL | final fn foo() {} | ^^^^^ | - = note: see issue #1 for more information + = note: see issue #131179 for more information = help: add `#![feature(final_associated_functions)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/ui/traits/final/final-kw.ungated.stderr b/tests/ui/traits/final/final-kw.ungated.stderr index a7967ebf08e2..62a39d7ca202 100644 --- a/tests/ui/traits/final/final-kw.ungated.stderr +++ b/tests/ui/traits/final/final-kw.ungated.stderr @@ -4,7 +4,7 @@ error[E0658]: `final` on trait functions is experimental LL | final fn foo() {} | ^^^^^ | - = note: see issue #1 for more information + = note: see issue #131179 for more information = help: add `#![feature(final_associated_functions)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date From 9eaedddb7ff87a765c1ba629c85115655c27ffb3 Mon Sep 17 00:00:00 2001 From: Zalathar Date: Tue, 17 Feb 2026 18:22:25 +1100 Subject: [PATCH 264/265] Rename dep node "fingerprints" to distinguish key and value hashes --- .../rustc_incremental/src/persist/clean.rs | 2 +- .../rustc_middle/src/dep_graph/dep_node.rs | 82 ++++++++-------- .../src/dep_graph/dep_node_key.rs | 42 ++++---- compiler/rustc_middle/src/dep_graph/graph.rs | 70 +++++++------ compiler/rustc_middle/src/dep_graph/mod.rs | 16 +-- .../rustc_middle/src/dep_graph/serialized.rs | 98 +++++++++++-------- compiler/rustc_middle/src/query/caches.rs | 2 +- compiler/rustc_middle/src/verify_ich.rs | 2 +- .../rustc_query_impl/src/dep_kind_vtables.rs | 30 +++--- compiler/rustc_query_impl/src/execution.rs | 4 +- compiler/rustc_query_impl/src/plumbing.rs | 5 +- typos.toml | 1 + 12 files changed, 193 insertions(+), 161 deletions(-) diff --git a/compiler/rustc_incremental/src/persist/clean.rs b/compiler/rustc_incremental/src/persist/clean.rs index 0067b38fadc7..9e974e432c39 100644 --- a/compiler/rustc_incremental/src/persist/clean.rs +++ b/compiler/rustc_incremental/src/persist/clean.rs @@ -322,7 +322,7 @@ impl<'tcx> CleanVisitor<'tcx> { if let Some(def_id) = dep_node.extract_def_id(self.tcx) { format!("{:?}({})", dep_node.kind, self.tcx.def_path_str(def_id)) } else { - format!("{:?}({:?})", dep_node.kind, dep_node.hash) + format!("{:?}({:?})", dep_node.kind, dep_node.key_fingerprint) } } diff --git a/compiler/rustc_middle/src/dep_graph/dep_node.rs b/compiler/rustc_middle/src/dep_graph/dep_node.rs index 578277bce593..d24cb3b843c4 100644 --- a/compiler/rustc_middle/src/dep_graph/dep_node.rs +++ b/compiler/rustc_middle/src/dep_graph/dep_node.rs @@ -1,10 +1,10 @@ //! This module defines the [`DepNode`] type which the compiler uses to represent //! nodes in the [dependency graph]. A `DepNode` consists of a [`DepKind`] (which //! specifies the kind of thing it represents, like a piece of HIR, MIR, etc.) -//! and a [`Fingerprint`], a 128-bit hash value, the exact meaning of which -//! depends on the node's `DepKind`. Together, the kind and the fingerprint +//! and a "key fingerprint", a 128-bit hash value, the exact meaning of which +//! depends on the node's `DepKind`. Together, the kind and the key fingerprint //! fully identify a dependency node, even across multiple compilation sessions. -//! In other words, the value of the fingerprint does not depend on anything +//! In other words, the value of the key fingerprint does not depend on anything //! that is specific to a given compilation session, like an unpredictable //! interning key (e.g., `NodeId`, `DefId`, `Symbol`) or the numeric value of a //! pointer. The concept behind this could be compared to how git commit hashes @@ -41,17 +41,9 @@ //! `DepNode`s could represent global concepts with only one value. //! * Whether it is possible, in principle, to reconstruct a query key from a //! given `DepNode`. Many `DepKind`s only require a single `DefId` parameter, -//! in which case it is possible to map the node's fingerprint back to the +//! in which case it is possible to map the node's key fingerprint back to the //! `DefId` it was computed from. In other cases, too much information gets -//! lost during fingerprint computation. -//! -//! `make_compile_codegen_unit` and `make_compile_mono_items`, together with -//! `DepNode::new()`, ensure that only valid `DepNode` instances can be -//! constructed. For example, the API does not allow for constructing -//! parameterless `DepNode`s with anything other than a zeroed out fingerprint. -//! More generally speaking, it relieves the user of the `DepNode` API of -//! having to know how to compute the expected fingerprint for a given set of -//! node parameters. +//! lost when computing a key fingerprint. //! //! [dependency graph]: https://rustc-dev-guide.rust-lang.org/query.html @@ -65,7 +57,7 @@ use rustc_hir::definitions::DefPathHash; use rustc_macros::{Decodable, Encodable}; use rustc_span::Symbol; -use super::{FingerprintStyle, SerializedDepNodeIndex}; +use super::{KeyFingerprintStyle, SerializedDepNodeIndex}; use crate::ich::StableHashingContext; use crate::mir::mono::MonoItem; use crate::ty::{TyCtxt, tls}; @@ -125,10 +117,20 @@ impl fmt::Debug for DepKind { } } +/// Combination of a [`DepKind`] and a key fingerprint that uniquely identifies +/// a node in the dep graph. #[derive(Clone, Copy, PartialEq, Eq, Hash)] pub struct DepNode { pub kind: DepKind, - pub hash: PackedFingerprint, + + /// This is _typically_ a hash of the query key, but sometimes not. + /// + /// For example, `anon` nodes have a fingerprint that is derived from their + /// dependencies instead of a key. + /// + /// In some cases the key value can be reconstructed from this fingerprint; + /// see [`KeyFingerprintStyle`]. + pub key_fingerprint: PackedFingerprint, } impl DepNode { @@ -136,24 +138,23 @@ impl DepNode { /// that the DepNode corresponding to the given DepKind actually /// does not require any parameters. pub fn new_no_params<'tcx>(tcx: TyCtxt<'tcx>, kind: DepKind) -> DepNode { - debug_assert_eq!(tcx.fingerprint_style(kind), FingerprintStyle::Unit); - DepNode { kind, hash: Fingerprint::ZERO.into() } + debug_assert_eq!(tcx.key_fingerprint_style(kind), KeyFingerprintStyle::Unit); + DepNode { kind, key_fingerprint: Fingerprint::ZERO.into() } } - pub fn construct<'tcx, Key>(tcx: TyCtxt<'tcx>, kind: DepKind, arg: &Key) -> DepNode + pub fn construct<'tcx, Key>(tcx: TyCtxt<'tcx>, kind: DepKind, key: &Key) -> DepNode where Key: DepNodeKey<'tcx>, { - let hash = arg.to_fingerprint(tcx); - let dep_node = DepNode { kind, hash: hash.into() }; + let dep_node = DepNode { kind, key_fingerprint: key.to_fingerprint(tcx).into() }; #[cfg(debug_assertions)] { - if !tcx.fingerprint_style(kind).reconstructible() + if !tcx.key_fingerprint_style(kind).reconstructible() && (tcx.sess.opts.unstable_opts.incremental_info || tcx.sess.opts.unstable_opts.query_dep_graph) { - tcx.dep_graph.register_dep_node_debug_str(dep_node, || arg.to_debug_str(tcx)); + tcx.dep_graph.register_dep_node_debug_str(dep_node, || key.to_debug_str(tcx)); } } @@ -168,8 +169,8 @@ impl DepNode { def_path_hash: DefPathHash, kind: DepKind, ) -> Self { - debug_assert!(tcx.fingerprint_style(kind) == FingerprintStyle::DefPathHash); - DepNode { kind, hash: def_path_hash.0.into() } + debug_assert!(tcx.key_fingerprint_style(kind) == KeyFingerprintStyle::DefPathHash); + DepNode { kind, key_fingerprint: def_path_hash.0.into() } } } @@ -184,10 +185,10 @@ impl fmt::Debug for DepNode { } else if let Some(ref s) = tcx.dep_graph.dep_node_debug_str(*self) { write!(f, "{s}")?; } else { - write!(f, "{}", self.hash)?; + write!(f, "{}", self.key_fingerprint)?; } } else { - write!(f, "{}", self.hash)?; + write!(f, "{}", self.key_fingerprint)?; } Ok(()) })?; @@ -198,7 +199,7 @@ impl fmt::Debug for DepNode { /// Trait for query keys as seen by dependency-node tracking. pub trait DepNodeKey<'tcx>: fmt::Debug + Sized { - fn fingerprint_style() -> FingerprintStyle; + fn key_fingerprint_style() -> KeyFingerprintStyle; /// This method turns a query key into an opaque `Fingerprint` to be used /// in `DepNode`. @@ -221,8 +222,8 @@ where T: for<'a> HashStable> + fmt::Debug, { #[inline(always)] - default fn fingerprint_style() -> FingerprintStyle { - FingerprintStyle::Opaque + default fn key_fingerprint_style() -> KeyFingerprintStyle { + KeyFingerprintStyle::Opaque } #[inline(always)] @@ -264,10 +265,11 @@ pub struct DepKindVTable<'tcx> { /// cached within one compiler invocation. pub is_eval_always: bool, - /// Indicates whether and how the query key can be recovered from its hashed fingerprint. + /// Indicates whether and how a query key can be reconstructed from the + /// key fingerprint of a dep node with this [`DepKind`]. /// /// The [`DepNodeKey`] trait determines the fingerprint style for each key type. - pub fingerprint_style: FingerprintStyle, + pub key_fingerprint_style: KeyFingerprintStyle, /// The red/green evaluation system will try to mark a specific DepNode in the /// dependency graph as green by recursively trying to mark the dependencies of @@ -279,7 +281,7 @@ pub struct DepKindVTable<'tcx> { /// `force_from_dep_node()` implements. /// /// In the general case, a `DepNode` consists of a `DepKind` and an opaque - /// GUID/fingerprint that will uniquely identify the node. This GUID/fingerprint + /// "key fingerprint" that will uniquely identify the node. This key fingerprint /// is usually constructed by computing a stable hash of the query-key that the /// `DepNode` corresponds to. Consequently, it is not in general possible to go /// back from hash to query-key (since hash functions are not reversible). For @@ -293,7 +295,7 @@ pub struct DepKindVTable<'tcx> { /// Now, if `force_from_dep_node()` would always fail, it would be pretty useless. /// Fortunately, we can use some contextual information that will allow us to /// reconstruct query-keys for certain kinds of `DepNode`s. In particular, we - /// enforce by construction that the GUID/fingerprint of certain `DepNode`s is a + /// enforce by construction that the key fingerprint of certain `DepNode`s is a /// valid `DefPathHash`. Since we also always build a huge table that maps every /// `DefPathHash` in the current codebase to the corresponding `DefId`, we have /// everything we need to re-run the query. @@ -301,7 +303,7 @@ pub struct DepKindVTable<'tcx> { /// Take the `mir_promoted` query as an example. Like many other queries, it /// just has a single parameter: the `DefId` of the item it will compute the /// validated MIR for. Now, when we call `force_from_dep_node()` on a `DepNode` - /// with kind `MirValidated`, we know that the GUID/fingerprint of the `DepNode` + /// with kind `mir_promoted`, we know that the key fingerprint of the `DepNode` /// is actually a `DefPathHash`, and can therefore just look up the corresponding /// `DefId` in `tcx.def_path_hash_to_def_id`. pub force_from_dep_node: Option< @@ -472,8 +474,8 @@ impl DepNode { /// refers to something from the previous compilation session that /// has been removed. pub fn extract_def_id(&self, tcx: TyCtxt<'_>) -> Option { - if tcx.fingerprint_style(self.kind) == FingerprintStyle::DefPathHash { - tcx.def_path_hash_to_def_id(DefPathHash(self.hash.into())) + if tcx.key_fingerprint_style(self.kind) == KeyFingerprintStyle::DefPathHash { + tcx.def_path_hash_to_def_id(DefPathHash(self.key_fingerprint.into())) } else { None } @@ -486,10 +488,10 @@ impl DepNode { ) -> Result { let kind = dep_kind_from_label_string(label)?; - match tcx.fingerprint_style(kind) { - FingerprintStyle::Opaque | FingerprintStyle::HirId => Err(()), - FingerprintStyle::Unit => Ok(DepNode::new_no_params(tcx, kind)), - FingerprintStyle::DefPathHash => { + match tcx.key_fingerprint_style(kind) { + KeyFingerprintStyle::Opaque | KeyFingerprintStyle::HirId => Err(()), + KeyFingerprintStyle::Unit => Ok(DepNode::new_no_params(tcx, kind)), + KeyFingerprintStyle::DefPathHash => { Ok(DepNode::from_def_path_hash(tcx, def_path_hash, kind)) } } diff --git a/compiler/rustc_middle/src/dep_graph/dep_node_key.rs b/compiler/rustc_middle/src/dep_graph/dep_node_key.rs index 92c135a6e7fd..57743e73d832 100644 --- a/compiler/rustc_middle/src/dep_graph/dep_node_key.rs +++ b/compiler/rustc_middle/src/dep_graph/dep_node_key.rs @@ -3,13 +3,13 @@ use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE, LocalDefId, LocalModDefId, use rustc_hir::definitions::DefPathHash; use rustc_hir::{HirId, ItemLocalId, OwnerId}; -use crate::dep_graph::{DepNode, DepNodeKey, FingerprintStyle}; +use crate::dep_graph::{DepNode, DepNodeKey, KeyFingerprintStyle}; use crate::ty::TyCtxt; impl<'tcx> DepNodeKey<'tcx> for () { #[inline(always)] - fn fingerprint_style() -> FingerprintStyle { - FingerprintStyle::Unit + fn key_fingerprint_style() -> KeyFingerprintStyle { + KeyFingerprintStyle::Unit } #[inline(always)] @@ -25,8 +25,8 @@ impl<'tcx> DepNodeKey<'tcx> for () { impl<'tcx> DepNodeKey<'tcx> for DefId { #[inline(always)] - fn fingerprint_style() -> FingerprintStyle { - FingerprintStyle::DefPathHash + fn key_fingerprint_style() -> KeyFingerprintStyle { + KeyFingerprintStyle::DefPathHash } #[inline(always)] @@ -47,8 +47,8 @@ impl<'tcx> DepNodeKey<'tcx> for DefId { impl<'tcx> DepNodeKey<'tcx> for LocalDefId { #[inline(always)] - fn fingerprint_style() -> FingerprintStyle { - FingerprintStyle::DefPathHash + fn key_fingerprint_style() -> KeyFingerprintStyle { + KeyFingerprintStyle::DefPathHash } #[inline(always)] @@ -69,8 +69,8 @@ impl<'tcx> DepNodeKey<'tcx> for LocalDefId { impl<'tcx> DepNodeKey<'tcx> for OwnerId { #[inline(always)] - fn fingerprint_style() -> FingerprintStyle { - FingerprintStyle::DefPathHash + fn key_fingerprint_style() -> KeyFingerprintStyle { + KeyFingerprintStyle::DefPathHash } #[inline(always)] @@ -91,8 +91,8 @@ impl<'tcx> DepNodeKey<'tcx> for OwnerId { impl<'tcx> DepNodeKey<'tcx> for CrateNum { #[inline(always)] - fn fingerprint_style() -> FingerprintStyle { - FingerprintStyle::DefPathHash + fn key_fingerprint_style() -> KeyFingerprintStyle { + KeyFingerprintStyle::DefPathHash } #[inline(always)] @@ -114,8 +114,8 @@ impl<'tcx> DepNodeKey<'tcx> for CrateNum { impl<'tcx> DepNodeKey<'tcx> for (DefId, DefId) { #[inline(always)] - fn fingerprint_style() -> FingerprintStyle { - FingerprintStyle::Opaque + fn key_fingerprint_style() -> KeyFingerprintStyle { + KeyFingerprintStyle::Opaque } // We actually would not need to specialize the implementation of this @@ -141,8 +141,8 @@ impl<'tcx> DepNodeKey<'tcx> for (DefId, DefId) { impl<'tcx> DepNodeKey<'tcx> for HirId { #[inline(always)] - fn fingerprint_style() -> FingerprintStyle { - FingerprintStyle::HirId + fn key_fingerprint_style() -> KeyFingerprintStyle { + KeyFingerprintStyle::HirId } // We actually would not need to specialize the implementation of this @@ -167,8 +167,8 @@ impl<'tcx> DepNodeKey<'tcx> for HirId { #[inline(always)] fn recover(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option { - if tcx.fingerprint_style(dep_node.kind) == FingerprintStyle::HirId { - let (local_hash, local_id) = Fingerprint::from(dep_node.hash).split(); + if tcx.key_fingerprint_style(dep_node.kind) == KeyFingerprintStyle::HirId { + let (local_hash, local_id) = Fingerprint::from(dep_node.key_fingerprint).split(); let def_path_hash = DefPathHash::new(tcx.stable_crate_id(LOCAL_CRATE), local_hash); let def_id = tcx.def_path_hash_to_def_id(def_path_hash)?.expect_local(); let local_id = local_id @@ -184,8 +184,8 @@ impl<'tcx> DepNodeKey<'tcx> for HirId { impl<'tcx> DepNodeKey<'tcx> for ModDefId { #[inline(always)] - fn fingerprint_style() -> FingerprintStyle { - FingerprintStyle::DefPathHash + fn key_fingerprint_style() -> KeyFingerprintStyle { + KeyFingerprintStyle::DefPathHash } #[inline(always)] @@ -206,8 +206,8 @@ impl<'tcx> DepNodeKey<'tcx> for ModDefId { impl<'tcx> DepNodeKey<'tcx> for LocalModDefId { #[inline(always)] - fn fingerprint_style() -> FingerprintStyle { - FingerprintStyle::DefPathHash + fn key_fingerprint_style() -> KeyFingerprintStyle { + KeyFingerprintStyle::DefPathHash } #[inline(always)] diff --git a/compiler/rustc_middle/src/dep_graph/graph.rs b/compiler/rustc_middle/src/dep_graph/graph.rs index 5257ec4abef2..f5787716a94e 100644 --- a/compiler/rustc_middle/src/dep_graph/graph.rs +++ b/compiler/rustc_middle/src/dep_graph/graph.rs @@ -142,15 +142,17 @@ impl DepGraph { // Instantiate a node with zero dependencies only once for anonymous queries. let _green_node_index = current.alloc_new_node( - DepNode { kind: DepKind::ANON_ZERO_DEPS, hash: current.anon_id_seed.into() }, + DepNode { kind: DepKind::ANON_ZERO_DEPS, key_fingerprint: current.anon_id_seed.into() }, EdgesVec::new(), Fingerprint::ZERO, ); assert_eq!(_green_node_index, DepNodeIndex::SINGLETON_ZERO_DEPS_ANON_NODE); - // Instantiate a dependy-less red node only once for anonymous queries. + // Create a single always-red node, with no dependencies of its own. + // Other nodes can use the always-red node as a fake dependency, to + // ensure that their dependency list will never be all-green. let red_node_index = current.alloc_new_node( - DepNode { kind: DepKind::RED, hash: Fingerprint::ZERO.into() }, + DepNode { kind: DepKind::RED, key_fingerprint: Fingerprint::ZERO.into() }, EdgesVec::new(), Fingerprint::ZERO, ); @@ -418,7 +420,7 @@ impl DepGraphData { // Fingerprint::combine() is faster than sending Fingerprint // through the StableHasher (at least as long as StableHasher // is so slow). - hash: self.current.anon_id_seed.combine(hasher.finish()).into(), + key_fingerprint: self.current.anon_id_seed.combine(hasher.finish()).into(), }; // The DepNodes generated by the process above are not unique. 2 queries could @@ -585,7 +587,7 @@ impl DepGraph { data.current.record_edge( dep_node_index, node, - data.prev_fingerprint_of(prev_index), + data.prev_value_fingerprint_of(prev_index), ); } @@ -658,8 +660,8 @@ impl DepGraphData { } #[inline] - pub fn prev_fingerprint_of(&self, prev_index: SerializedDepNodeIndex) -> Fingerprint { - self.previous.fingerprint_by_index(prev_index) + pub fn prev_value_fingerprint_of(&self, prev_index: SerializedDepNodeIndex) -> Fingerprint { + self.previous.value_fingerprint_for_index(prev_index) } #[inline] @@ -679,7 +681,7 @@ impl DepGraphData { let dep_node_index = self.current.encoder.send_new( DepNode { kind: DepKind::SIDE_EFFECT, - hash: PackedFingerprint::from(Fingerprint::ZERO), + key_fingerprint: PackedFingerprint::from(Fingerprint::ZERO), }, Fingerprint::ZERO, // We want the side effect node to always be red so it will be forced and emit the @@ -712,7 +714,7 @@ impl DepGraphData { &self.colors, DepNode { kind: DepKind::SIDE_EFFECT, - hash: PackedFingerprint::from(Fingerprint::ZERO), + key_fingerprint: PackedFingerprint::from(Fingerprint::ZERO), }, Fingerprint::ZERO, std::iter::once(DepNodeIndex::FOREVER_RED_NODE).collect(), @@ -727,12 +729,12 @@ impl DepGraphData { &self, key: DepNode, edges: EdgesVec, - fingerprint: Option, + value_fingerprint: Option, ) -> DepNodeIndex { if let Some(prev_index) = self.previous.node_to_index_opt(&key) { // Determine the color and index of the new `DepNode`. - let is_green = if let Some(fingerprint) = fingerprint { - if fingerprint == self.previous.fingerprint_by_index(prev_index) { + let is_green = if let Some(value_fingerprint) = value_fingerprint { + if value_fingerprint == self.previous.value_fingerprint_for_index(prev_index) { // This is a green node: it existed in the previous compilation, // its query was re-executed, and it has the same result as before. true @@ -749,22 +751,22 @@ impl DepGraphData { false }; - let fingerprint = fingerprint.unwrap_or(Fingerprint::ZERO); + let value_fingerprint = value_fingerprint.unwrap_or(Fingerprint::ZERO); let dep_node_index = self.current.encoder.send_and_color( prev_index, &self.colors, key, - fingerprint, + value_fingerprint, edges, is_green, ); - self.current.record_node(dep_node_index, key, fingerprint); + self.current.record_node(dep_node_index, key, value_fingerprint); dep_node_index } else { - self.current.alloc_new_node(key, edges, fingerprint.unwrap_or(Fingerprint::ZERO)) + self.current.alloc_new_node(key, edges, value_fingerprint.unwrap_or(Fingerprint::ZERO)) } } @@ -781,7 +783,7 @@ impl DepGraphData { self.current.record_edge( dep_node_index, *self.previous.index_to_node(prev_index), - self.previous.fingerprint_by_index(prev_index), + self.previous.value_fingerprint_for_index(prev_index), ); } @@ -925,7 +927,7 @@ impl DepGraphData { if !tcx.is_eval_always(dep_dep_node.kind) { debug!( "state of dependency {:?} ({}) is unknown, trying to mark it green", - dep_dep_node, dep_dep_node.hash, + dep_dep_node, dep_dep_node.key_fingerprint, ); let node_index = self.try_mark_previous_green(tcx, parent_dep_node_index, Some(frame)); @@ -1154,10 +1156,10 @@ pub(super) struct CurrentDepGraph { encoder: GraphEncoder, anon_node_to_index: ShardedHashMap, - /// This is used to verify that fingerprints do not change between the creation of a node - /// and its recomputation. + /// This is used to verify that value fingerprints do not change between the + /// creation of a node and its recomputation. #[cfg(debug_assertions)] - fingerprints: Lock>>, + value_fingerprints: Lock>>, /// Used to trap when a specific edge is added to the graph. /// This is used for debug purposes and is only active with `debug_assertions`. @@ -1224,7 +1226,7 @@ impl CurrentDepGraph { #[cfg(debug_assertions)] forbidden_edge, #[cfg(debug_assertions)] - fingerprints: Lock::new(IndexVec::from_elem_n(None, new_node_count_estimate)), + value_fingerprints: Lock::new(IndexVec::from_elem_n(None, new_node_count_estimate)), nodes_in_current_session: new_node_dbg.then(|| { Lock::new(FxHashMap::with_capacity_and_hasher( new_node_count_estimate, @@ -1237,12 +1239,20 @@ impl CurrentDepGraph { } #[cfg(debug_assertions)] - fn record_edge(&self, dep_node_index: DepNodeIndex, key: DepNode, fingerprint: Fingerprint) { + fn record_edge( + &self, + dep_node_index: DepNodeIndex, + key: DepNode, + value_fingerprint: Fingerprint, + ) { if let Some(forbidden_edge) = &self.forbidden_edge { forbidden_edge.index_to_node.lock().insert(dep_node_index, key); } - let previous = *self.fingerprints.lock().get_or_insert_with(dep_node_index, || fingerprint); - assert_eq!(previous, fingerprint, "Unstable fingerprints for {:?}", key); + let prior_value_fingerprint = *self + .value_fingerprints + .lock() + .get_or_insert_with(dep_node_index, || value_fingerprint); + assert_eq!(prior_value_fingerprint, value_fingerprint, "Unstable fingerprints for {key:?}"); } #[inline(always)] @@ -1250,10 +1260,10 @@ impl CurrentDepGraph { &self, dep_node_index: DepNodeIndex, key: DepNode, - _current_fingerprint: Fingerprint, + _value_fingerprint: Fingerprint, ) { #[cfg(debug_assertions)] - self.record_edge(dep_node_index, key, _current_fingerprint); + self.record_edge(dep_node_index, key, _value_fingerprint); if let Some(ref nodes_in_current_session) = self.nodes_in_current_session { outline(|| { @@ -1271,11 +1281,11 @@ impl CurrentDepGraph { &self, key: DepNode, edges: EdgesVec, - current_fingerprint: Fingerprint, + value_fingerprint: Fingerprint, ) -> DepNodeIndex { - let dep_node_index = self.encoder.send_new(key, current_fingerprint, edges); + let dep_node_index = self.encoder.send_new(key, value_fingerprint, edges); - self.record_node(dep_node_index, key, current_fingerprint); + self.record_node(dep_node_index, key, value_fingerprint); dep_node_index } diff --git a/compiler/rustc_middle/src/dep_graph/mod.rs b/compiler/rustc_middle/src/dep_graph/mod.rs index 4b1faeb7d209..dda336fcd0b0 100644 --- a/compiler/rustc_middle/src/dep_graph/mod.rs +++ b/compiler/rustc_middle/src/dep_graph/mod.rs @@ -30,7 +30,7 @@ mod serialized; /// This is mainly for determining whether and how we can reconstruct a key /// from the fingerprint. #[derive(Debug, PartialEq, Eq, Copy, Clone)] -pub enum FingerprintStyle { +pub enum KeyFingerprintStyle { /// The fingerprint is actually a DefPathHash. DefPathHash, /// The fingerprint is actually a HirId. @@ -41,14 +41,14 @@ pub enum FingerprintStyle { Opaque, } -impl FingerprintStyle { +impl KeyFingerprintStyle { #[inline] pub const fn reconstructible(self) -> bool { match self { - FingerprintStyle::DefPathHash | FingerprintStyle::Unit | FingerprintStyle::HirId => { - true - } - FingerprintStyle::Opaque => false, + KeyFingerprintStyle::DefPathHash + | KeyFingerprintStyle::Unit + | KeyFingerprintStyle::HirId => true, + KeyFingerprintStyle::Opaque => false, } } } @@ -86,8 +86,8 @@ impl<'tcx> TyCtxt<'tcx> { } #[inline(always)] - pub fn fingerprint_style(self, kind: DepKind) -> FingerprintStyle { - self.dep_kind_vtable(kind).fingerprint_style + pub fn key_fingerprint_style(self, kind: DepKind) -> KeyFingerprintStyle { + self.dep_kind_vtable(kind).key_fingerprint_style } /// Try to force a dep node to execute and see if it's green. diff --git a/compiler/rustc_middle/src/dep_graph/serialized.rs b/compiler/rustc_middle/src/dep_graph/serialized.rs index dbcd5ea07088..4da96c5c9933 100644 --- a/compiler/rustc_middle/src/dep_graph/serialized.rs +++ b/compiler/rustc_middle/src/dep_graph/serialized.rs @@ -90,9 +90,13 @@ const DEP_NODE_WIDTH_BITS: usize = DEP_NODE_SIZE / 2; pub struct SerializedDepGraph { /// The set of all DepNodes in the graph nodes: IndexVec, - /// The set of all Fingerprints in the graph. Each Fingerprint corresponds to - /// the DepNode at the same index in the nodes vector. - fingerprints: IndexVec, + /// A value fingerprint associated with each [`DepNode`] in [`Self::nodes`], + /// typically a hash of the value returned by the node's query in the + /// previous incremental-compilation session. + /// + /// Some nodes don't have a meaningful value hash (e.g. queries with `no_hash`), + /// so they store a dummy value here instead (e.g. [`Fingerprint::ZERO`]). + value_fingerprints: IndexVec, /// For each DepNode, stores the list of edges originating from that /// DepNode. Encoded as a [start, end) pair indexing into edge_list_data, /// which holds the actual DepNodeIndices of the target nodes. @@ -100,8 +104,8 @@ pub struct SerializedDepGraph { /// A flattened list of all edge targets in the graph, stored in the same /// varint encoding that we use on disk. Edge sources are implicit in edge_list_indices. edge_list_data: Vec, - /// Stores a map from fingerprints to nodes per dep node kind. - /// This is the reciprocal of `nodes`. + /// For each dep kind, stores a map from key fingerprints back to the index + /// of the corresponding node. This is the inverse of `nodes`. index: Vec>, /// The number of previous compilation sessions. This is used to generate /// unique anon dep nodes per session. @@ -138,12 +142,15 @@ impl SerializedDepGraph { #[inline] pub fn node_to_index_opt(&self, dep_node: &DepNode) -> Option { - self.index.get(dep_node.kind.as_usize())?.get(&dep_node.hash).cloned() + self.index.get(dep_node.kind.as_usize())?.get(&dep_node.key_fingerprint).copied() } #[inline] - pub fn fingerprint_by_index(&self, dep_node_index: SerializedDepNodeIndex) -> Fingerprint { - self.fingerprints[dep_node_index] + pub fn value_fingerprint_for_index( + &self, + dep_node_index: SerializedDepNodeIndex, + ) -> Fingerprint { + self.value_fingerprints[dep_node_index] } #[inline] @@ -212,10 +219,13 @@ impl SerializedDepGraph { let graph_bytes = d.len() - (3 * IntEncodedWithFixedSize::ENCODED_SIZE) - d.position(); let mut nodes = IndexVec::from_elem_n( - DepNode { kind: DepKind::NULL, hash: PackedFingerprint::from(Fingerprint::ZERO) }, + DepNode { + kind: DepKind::NULL, + key_fingerprint: PackedFingerprint::from(Fingerprint::ZERO), + }, node_max, ); - let mut fingerprints = IndexVec::from_elem_n(Fingerprint::ZERO, node_max); + let mut value_fingerprints = IndexVec::from_elem_n(Fingerprint::ZERO, node_max); let mut edge_list_indices = IndexVec::from_elem_n(EdgeHeader { repr: 0, num_edges: 0 }, node_max); @@ -243,7 +253,7 @@ impl SerializedDepGraph { assert!(node_header.node().kind != DepKind::NULL && node.kind == DepKind::NULL); *node = node_header.node(); - fingerprints[index] = node_header.fingerprint(); + value_fingerprints[index] = node_header.value_fingerprint(); // If the length of this node's edge list is small, the length is stored in the header. // If it is not, we fall back to another decoder call. @@ -275,7 +285,7 @@ impl SerializedDepGraph { let session_count = d.read_u64(); for (idx, node) in nodes.iter_enumerated() { - if index[node.kind.as_usize()].insert(node.hash, idx).is_some() { + if index[node.kind.as_usize()].insert(node.key_fingerprint, idx).is_some() { // Empty nodes and side effect nodes can have duplicates if node.kind != DepKind::NULL && node.kind != DepKind::SIDE_EFFECT { let name = node.kind.name(); @@ -291,7 +301,7 @@ impl SerializedDepGraph { Arc::new(SerializedDepGraph { nodes, - fingerprints, + value_fingerprints, edge_list_indices, edge_list_data, index, @@ -303,8 +313,8 @@ impl SerializedDepGraph { /// A packed representation of all the fixed-size fields in a `NodeInfo`. /// /// This stores in one byte array: -/// * The `Fingerprint` in the `NodeInfo` -/// * The `Fingerprint` in `DepNode` that is in this `NodeInfo` +/// * The value `Fingerprint` in the `NodeInfo` +/// * The key `Fingerprint` in `DepNode` that is in this `NodeInfo` /// * The `DepKind`'s discriminant (a u16, but not all bits are used...) /// * The byte width of the encoded edges for this node /// * In whatever bits remain, the length of the edge list for this node, if it fits @@ -323,8 +333,8 @@ struct Unpacked { bytes_per_index: usize, kind: DepKind, index: SerializedDepNodeIndex, - hash: PackedFingerprint, - fingerprint: Fingerprint, + key_fingerprint: PackedFingerprint, + value_fingerprint: Fingerprint, } // Bit fields, where @@ -345,7 +355,7 @@ impl SerializedNodeHeader { fn new( node: &DepNode, index: DepNodeIndex, - fingerprint: Fingerprint, + value_fingerprint: Fingerprint, edge_max_index: u32, edge_count: usize, ) -> Self { @@ -363,19 +373,19 @@ impl SerializedNodeHeader { head |= (edge_count as u16 + 1) << (Self::KIND_BITS + Self::WIDTH_BITS); } - let hash: Fingerprint = node.hash.into(); + let hash: Fingerprint = node.key_fingerprint.into(); // Using half-open ranges ensures an unconditional panic if we get the magic numbers wrong. let mut bytes = [0u8; 38]; bytes[..2].copy_from_slice(&head.to_le_bytes()); bytes[2..6].copy_from_slice(&index.as_u32().to_le_bytes()); bytes[6..22].copy_from_slice(&hash.to_le_bytes()); - bytes[22..].copy_from_slice(&fingerprint.to_le_bytes()); + bytes[22..].copy_from_slice(&value_fingerprint.to_le_bytes()); #[cfg(debug_assertions)] { let res = Self { bytes }; - assert_eq!(fingerprint, res.fingerprint()); + assert_eq!(value_fingerprint, res.value_fingerprint()); assert_eq!(*node, res.node()); if let Some(len) = res.len() { assert_eq!(edge_count, len as usize); @@ -388,8 +398,8 @@ impl SerializedNodeHeader { fn unpack(&self) -> Unpacked { let head = u16::from_le_bytes(self.bytes[..2].try_into().unwrap()); let index = u32::from_le_bytes(self.bytes[2..6].try_into().unwrap()); - let hash = self.bytes[6..22].try_into().unwrap(); - let fingerprint = self.bytes[22..].try_into().unwrap(); + let key_fingerprint = self.bytes[6..22].try_into().unwrap(); + let value_fingerprint = self.bytes[22..].try_into().unwrap(); let kind = head & mask(Self::KIND_BITS) as u16; let bytes_per_index = (head >> Self::KIND_BITS) & mask(Self::WIDTH_BITS) as u16; @@ -400,8 +410,8 @@ impl SerializedNodeHeader { bytes_per_index: bytes_per_index as usize + 1, kind: DepKind::new(kind), index: SerializedDepNodeIndex::from_u32(index), - hash: Fingerprint::from_le_bytes(hash).into(), - fingerprint: Fingerprint::from_le_bytes(fingerprint), + key_fingerprint: Fingerprint::from_le_bytes(key_fingerprint).into(), + value_fingerprint: Fingerprint::from_le_bytes(value_fingerprint), } } @@ -421,14 +431,14 @@ impl SerializedNodeHeader { } #[inline] - fn fingerprint(&self) -> Fingerprint { - self.unpack().fingerprint + fn value_fingerprint(&self) -> Fingerprint { + self.unpack().value_fingerprint } #[inline] fn node(&self) -> DepNode { - let Unpacked { kind, hash, .. } = self.unpack(); - DepNode { kind, hash } + let Unpacked { kind, key_fingerprint, .. } = self.unpack(); + DepNode { kind, key_fingerprint } } #[inline] @@ -443,15 +453,20 @@ impl SerializedNodeHeader { #[derive(Debug)] struct NodeInfo { node: DepNode, - fingerprint: Fingerprint, + value_fingerprint: Fingerprint, edges: EdgesVec, } impl NodeInfo { fn encode(&self, e: &mut MemEncoder, index: DepNodeIndex) { - let NodeInfo { ref node, fingerprint, ref edges } = *self; - let header = - SerializedNodeHeader::new(node, index, fingerprint, edges.max_index(), edges.len()); + let NodeInfo { ref node, value_fingerprint, ref edges } = *self; + let header = SerializedNodeHeader::new( + node, + index, + value_fingerprint, + edges.max_index(), + edges.len(), + ); e.write_array(header.bytes); if header.len().is_none() { @@ -476,7 +491,7 @@ impl NodeInfo { e: &mut MemEncoder, node: &DepNode, index: DepNodeIndex, - fingerprint: Fingerprint, + value_fingerprint: Fingerprint, prev_index: SerializedDepNodeIndex, colors: &DepNodeColorMap, previous: &SerializedDepGraph, @@ -488,7 +503,8 @@ impl NodeInfo { let edge_max = edges.clone().map(|i| colors.current(i).unwrap().as_u32()).max().unwrap_or(0); - let header = SerializedNodeHeader::new(node, index, fingerprint, edge_max, edge_count); + let header = + SerializedNodeHeader::new(node, index, value_fingerprint, edge_max, edge_count); e.write_array(header.bytes); if header.len().is_none() { @@ -676,12 +692,12 @@ impl EncoderState { local: &mut LocalEncoderState, ) { let node = self.previous.index_to_node(prev_index); - let fingerprint = self.previous.fingerprint_by_index(prev_index); + let value_fingerprint = self.previous.value_fingerprint_for_index(prev_index); let edge_count = NodeInfo::encode_promoted( &mut local.encoder, node, index, - fingerprint, + value_fingerprint, prev_index, colors, &self.previous, @@ -857,11 +873,11 @@ impl GraphEncoder { pub(crate) fn send_new( &self, node: DepNode, - fingerprint: Fingerprint, + value_fingerprint: Fingerprint, edges: EdgesVec, ) -> DepNodeIndex { let _prof_timer = self.profiler.generic_activity("incr_comp_encode_dep_graph"); - let node = NodeInfo { node, fingerprint, edges }; + let node = NodeInfo { node, value_fingerprint, edges }; let mut local = self.status.local.borrow_mut(); let index = self.status.next_index(&mut *local); self.status.bump_index(&mut *local); @@ -877,12 +893,12 @@ impl GraphEncoder { prev_index: SerializedDepNodeIndex, colors: &DepNodeColorMap, node: DepNode, - fingerprint: Fingerprint, + value_fingerprint: Fingerprint, edges: EdgesVec, is_green: bool, ) -> DepNodeIndex { let _prof_timer = self.profiler.generic_activity("incr_comp_encode_dep_graph"); - let node = NodeInfo { node, fingerprint, edges }; + let node = NodeInfo { node, value_fingerprint, edges }; let mut local = self.status.local.borrow_mut(); diff --git a/compiler/rustc_middle/src/query/caches.rs b/compiler/rustc_middle/src/query/caches.rs index c1f5e5b67085..2adcecc5aaef 100644 --- a/compiler/rustc_middle/src/query/caches.rs +++ b/compiler/rustc_middle/src/query/caches.rs @@ -67,7 +67,7 @@ where #[inline] fn complete(&self, key: K, value: V, index: DepNodeIndex) { // We may be overwriting another value. This is all right, since the dep-graph - // will check that the fingerprint matches. + // will check that the value fingerprint matches. self.cache.insert(key, (value, index)); } diff --git a/compiler/rustc_middle/src/verify_ich.rs b/compiler/rustc_middle/src/verify_ich.rs index ff3c5bb5a9d6..a1ab4d8cc4d0 100644 --- a/compiler/rustc_middle/src/verify_ich.rs +++ b/compiler/rustc_middle/src/verify_ich.rs @@ -25,7 +25,7 @@ pub fn incremental_verify_ich<'tcx, V>( tcx.with_stable_hashing_context(|mut hcx| f(&mut hcx, result)) }); - let old_hash = dep_graph_data.prev_fingerprint_of(prev_index); + let old_hash = dep_graph_data.prev_value_fingerprint_of(prev_index); if new_hash != old_hash { incremental_verify_ich_failed(tcx, prev_index, &|| format_value(result)); diff --git a/compiler/rustc_query_impl/src/dep_kind_vtables.rs b/compiler/rustc_query_impl/src/dep_kind_vtables.rs index 60d9fdc47ed6..39bd2569ef46 100644 --- a/compiler/rustc_query_impl/src/dep_kind_vtables.rs +++ b/compiler/rustc_query_impl/src/dep_kind_vtables.rs @@ -1,5 +1,5 @@ use rustc_middle::bug; -use rustc_middle::dep_graph::{DepKindVTable, DepNodeKey, FingerprintStyle}; +use rustc_middle::dep_graph::{DepKindVTable, DepNodeKey, KeyFingerprintStyle}; use rustc_middle::query::QueryCache; use crate::plumbing::{force_from_dep_node_inner, try_load_from_on_disk_cache_inner}; @@ -15,7 +15,7 @@ mod non_query { DepKindVTable { is_anon: false, is_eval_always: false, - fingerprint_style: FingerprintStyle::Unit, + key_fingerprint_style: KeyFingerprintStyle::Unit, force_from_dep_node: Some(|_, dep_node, _| { bug!("force_from_dep_node: encountered {dep_node:?}") }), @@ -29,7 +29,7 @@ mod non_query { DepKindVTable { is_anon: false, is_eval_always: false, - fingerprint_style: FingerprintStyle::Unit, + key_fingerprint_style: KeyFingerprintStyle::Unit, force_from_dep_node: Some(|_, dep_node, _| { bug!("force_from_dep_node: encountered {dep_node:?}") }), @@ -42,7 +42,7 @@ mod non_query { DepKindVTable { is_anon: false, is_eval_always: false, - fingerprint_style: FingerprintStyle::Unit, + key_fingerprint_style: KeyFingerprintStyle::Unit, force_from_dep_node: Some(|tcx, _, prev_index| { tcx.dep_graph.force_diagnostic_node(tcx, prev_index); true @@ -56,7 +56,7 @@ mod non_query { DepKindVTable { is_anon: true, is_eval_always: false, - fingerprint_style: FingerprintStyle::Opaque, + key_fingerprint_style: KeyFingerprintStyle::Opaque, force_from_dep_node: Some(|_, _, _| bug!("cannot force an anon node")), try_load_from_on_disk_cache: None, name: &"AnonZeroDeps", @@ -67,7 +67,7 @@ mod non_query { DepKindVTable { is_anon: true, is_eval_always: false, - fingerprint_style: FingerprintStyle::Unit, + key_fingerprint_style: KeyFingerprintStyle::Unit, force_from_dep_node: None, try_load_from_on_disk_cache: None, name: &"TraitSelect", @@ -78,7 +78,7 @@ mod non_query { DepKindVTable { is_anon: false, is_eval_always: false, - fingerprint_style: FingerprintStyle::Opaque, + key_fingerprint_style: KeyFingerprintStyle::Opaque, force_from_dep_node: None, try_load_from_on_disk_cache: None, name: &"CompileCodegenUnit", @@ -89,7 +89,7 @@ mod non_query { DepKindVTable { is_anon: false, is_eval_always: false, - fingerprint_style: FingerprintStyle::Opaque, + key_fingerprint_style: KeyFingerprintStyle::Opaque, force_from_dep_node: None, try_load_from_on_disk_cache: None, name: &"CompileMonoItem", @@ -100,7 +100,7 @@ mod non_query { DepKindVTable { is_anon: false, is_eval_always: false, - fingerprint_style: FingerprintStyle::Unit, + key_fingerprint_style: KeyFingerprintStyle::Unit, force_from_dep_node: None, try_load_from_on_disk_cache: None, name: &"Metadata", @@ -118,17 +118,17 @@ where Cache: QueryCache + 'tcx, { let is_anon = FLAGS.is_anon; - let fingerprint_style = if is_anon { - FingerprintStyle::Opaque + let key_fingerprint_style = if is_anon { + KeyFingerprintStyle::Opaque } else { - >::fingerprint_style() + >::key_fingerprint_style() }; - if is_anon || !fingerprint_style.reconstructible() { + if is_anon || !key_fingerprint_style.reconstructible() { return DepKindVTable { is_anon, is_eval_always, - fingerprint_style, + key_fingerprint_style, force_from_dep_node: None, try_load_from_on_disk_cache: None, name: Q::NAME, @@ -138,7 +138,7 @@ where DepKindVTable { is_anon, is_eval_always, - fingerprint_style, + key_fingerprint_style, force_from_dep_node: Some(|tcx, dep_node, _| { force_from_dep_node_inner(Q::query_dispatcher(tcx), tcx, dep_node) }), diff --git a/compiler/rustc_query_impl/src/execution.rs b/compiler/rustc_query_impl/src/execution.rs index 80bdc5626ec8..1f064599332c 100644 --- a/compiler/rustc_query_impl/src/execution.rs +++ b/compiler/rustc_query_impl/src/execution.rs @@ -509,7 +509,7 @@ fn try_load_from_disk_and_cache_in_memory<'tcx, C: QueryCache, const FLAGS: Quer dep_graph_data.mark_debug_loaded_from_disk(*dep_node) } - let prev_fingerprint = dep_graph_data.prev_fingerprint_of(prev_dep_node_index); + let prev_fingerprint = dep_graph_data.prev_value_fingerprint_of(prev_dep_node_index); // If `-Zincremental-verify-ich` is specified, re-hash results from // the cache and make sure that they have the expected fingerprint. // @@ -538,7 +538,7 @@ fn try_load_from_disk_and_cache_in_memory<'tcx, C: QueryCache, const FLAGS: Quer // can be forced from `DepNode`. debug_assert!( !query.will_cache_on_disk_for_key(tcx, key) - || !tcx.fingerprint_style(dep_node.kind).reconstructible(), + || !tcx.key_fingerprint_style(dep_node.kind).reconstructible(), "missing on-disk cache entry for {dep_node:?}" ); diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs index 00f6a7fcf916..ab534b7bc601 100644 --- a/compiler/rustc_query_impl/src/plumbing.rs +++ b/compiler/rustc_query_impl/src/plumbing.rs @@ -397,7 +397,10 @@ pub(crate) fn try_load_from_on_disk_cache_inner<'tcx, C: QueryCache, const FLAGS debug_assert!(tcx.dep_graph.is_green(&dep_node)); let key = C::Key::recover(tcx, &dep_node).unwrap_or_else(|| { - panic!("Failed to recover key for {:?} with hash {}", dep_node, dep_node.hash) + panic!( + "Failed to recover key for {dep_node:?} with key fingerprint {}", + dep_node.key_fingerprint + ) }); if query.will_cache_on_disk_for_key(tcx, &key) { // Call `tcx.$query(key)` for its side-effect of loading the disk-cached diff --git a/typos.toml b/typos.toml index e486a7c1722c..3c95a45d572d 100644 --- a/typos.toml +++ b/typos.toml @@ -46,6 +46,7 @@ unstalled = "unstalled" # short for un-stalled # # tidy-alphabetical-start definitinon = "definition" +dependy = "" similarlty = "similarity" # tidy-alphabetical-end From b015d5712a99cd44ba8872a5c9695dfa6340951c Mon Sep 17 00:00:00 2001 From: Zalathar Date: Tue, 17 Feb 2026 22:00:08 +1100 Subject: [PATCH 265/265] Rename `DepNodeKey::recover` to `try_recover_key` --- .../rustc_middle/src/dep_graph/dep_node.rs | 4 ++-- .../src/dep_graph/dep_node_key.rs | 20 +++++++++---------- compiler/rustc_query_impl/src/plumbing.rs | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/compiler/rustc_middle/src/dep_graph/dep_node.rs b/compiler/rustc_middle/src/dep_graph/dep_node.rs index d24cb3b843c4..52faebcba025 100644 --- a/compiler/rustc_middle/src/dep_graph/dep_node.rs +++ b/compiler/rustc_middle/src/dep_graph/dep_node.rs @@ -213,7 +213,7 @@ pub trait DepNodeKey<'tcx>: fmt::Debug + Sized { /// `fingerprint_style()` is not `FingerprintStyle::Opaque`. /// It is always valid to return `None` here, in which case incremental /// compilation will treat the query as having changed instead of forcing it. - fn recover(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option; + fn try_recover_key(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option; } // Blanket impl of `DepNodeKey`, which is specialized by other impls elsewhere. @@ -244,7 +244,7 @@ where } #[inline(always)] - default fn recover(_: TyCtxt<'tcx>, _: &DepNode) -> Option { + default fn try_recover_key(_: TyCtxt<'tcx>, _: &DepNode) -> Option { None } } diff --git a/compiler/rustc_middle/src/dep_graph/dep_node_key.rs b/compiler/rustc_middle/src/dep_graph/dep_node_key.rs index 57743e73d832..c488a9471237 100644 --- a/compiler/rustc_middle/src/dep_graph/dep_node_key.rs +++ b/compiler/rustc_middle/src/dep_graph/dep_node_key.rs @@ -18,7 +18,7 @@ impl<'tcx> DepNodeKey<'tcx> for () { } #[inline(always)] - fn recover(_: TyCtxt<'tcx>, _: &DepNode) -> Option { + fn try_recover_key(_: TyCtxt<'tcx>, _: &DepNode) -> Option { Some(()) } } @@ -40,7 +40,7 @@ impl<'tcx> DepNodeKey<'tcx> for DefId { } #[inline(always)] - fn recover(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option { + fn try_recover_key(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option { dep_node.extract_def_id(tcx) } } @@ -62,7 +62,7 @@ impl<'tcx> DepNodeKey<'tcx> for LocalDefId { } #[inline(always)] - fn recover(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option { + fn try_recover_key(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option { dep_node.extract_def_id(tcx).map(|id| id.expect_local()) } } @@ -84,7 +84,7 @@ impl<'tcx> DepNodeKey<'tcx> for OwnerId { } #[inline(always)] - fn recover(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option { + fn try_recover_key(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option { dep_node.extract_def_id(tcx).map(|id| OwnerId { def_id: id.expect_local() }) } } @@ -107,7 +107,7 @@ impl<'tcx> DepNodeKey<'tcx> for CrateNum { } #[inline(always)] - fn recover(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option { + fn try_recover_key(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option { dep_node.extract_def_id(tcx).map(|id| id.krate) } } @@ -166,7 +166,7 @@ impl<'tcx> DepNodeKey<'tcx> for HirId { } #[inline(always)] - fn recover(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option { + fn try_recover_key(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option { if tcx.key_fingerprint_style(dep_node.kind) == KeyFingerprintStyle::HirId { let (local_hash, local_id) = Fingerprint::from(dep_node.key_fingerprint).split(); let def_path_hash = DefPathHash::new(tcx.stable_crate_id(LOCAL_CRATE), local_hash); @@ -199,8 +199,8 @@ impl<'tcx> DepNodeKey<'tcx> for ModDefId { } #[inline(always)] - fn recover(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option { - DefId::recover(tcx, dep_node).map(ModDefId::new_unchecked) + fn try_recover_key(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option { + DefId::try_recover_key(tcx, dep_node).map(ModDefId::new_unchecked) } } @@ -221,7 +221,7 @@ impl<'tcx> DepNodeKey<'tcx> for LocalModDefId { } #[inline(always)] - fn recover(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option { - LocalDefId::recover(tcx, dep_node).map(LocalModDefId::new_unchecked) + fn try_recover_key(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option { + LocalDefId::try_recover_key(tcx, dep_node).map(LocalModDefId::new_unchecked) } } diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs index ab534b7bc601..5981e7e0f526 100644 --- a/compiler/rustc_query_impl/src/plumbing.rs +++ b/compiler/rustc_query_impl/src/plumbing.rs @@ -396,7 +396,7 @@ pub(crate) fn try_load_from_on_disk_cache_inner<'tcx, C: QueryCache, const FLAGS ) { debug_assert!(tcx.dep_graph.is_green(&dep_node)); - let key = C::Key::recover(tcx, &dep_node).unwrap_or_else(|| { + let key = C::Key::try_recover_key(tcx, &dep_node).unwrap_or_else(|| { panic!( "Failed to recover key for {dep_node:?} with key fingerprint {}", dep_node.key_fingerprint @@ -465,7 +465,7 @@ pub(crate) fn force_from_dep_node_inner<'tcx, C: QueryCache, const FLAGS: QueryF "calling force_from_dep_node() on dep_kinds::codegen_unit" ); - if let Some(key) = C::Key::recover(tcx, &dep_node) { + if let Some(key) = C::Key::try_recover_key(tcx, &dep_node) { force_query(query, tcx, key, dep_node); true } else {