diff --git a/compiler/rustc_codegen_gcc/src/builder.rs b/compiler/rustc_codegen_gcc/src/builder.rs index b611f9ba8bcb3..457380685093f 100644 --- a/compiler/rustc_codegen_gcc/src/builder.rs +++ b/compiler/rustc_codegen_gcc/src/builder.rs @@ -30,7 +30,7 @@ use rustc_middle::ty::{Instance, ParamEnv, Ty, TyCtxt}; use rustc_span::Span; use rustc_span::def_id::DefId; use rustc_target::abi::call::FnAbi; -use rustc_target::spec::{HasTargetSpec, HasWasmCAbiOpt, Target, WasmCAbi}; +use rustc_target::spec::{HasTargetSpec, HasWasmCAbiOpt, HasX86AbiOpt, Target, WasmCAbi, X86Abi}; use crate::common::{SignType, TypeReflection, type_is_pointer}; use crate::context::CodegenCx; @@ -2347,6 +2347,12 @@ impl<'tcx> HasWasmCAbiOpt for Builder<'_, '_, 'tcx> { } } +impl<'tcx> HasX86AbiOpt for Builder<'_, '_, 'tcx> { + fn x86_abi_opt(&self) -> X86Abi { + self.cx.x86_abi_opt() + } +} + pub trait ToGccComp { fn to_gcc_comparison(&self) -> ComparisonOp; } diff --git a/compiler/rustc_codegen_gcc/src/context.rs b/compiler/rustc_codegen_gcc/src/context.rs index 7cb49bf799135..707b35967a6d8 100644 --- a/compiler/rustc_codegen_gcc/src/context.rs +++ b/compiler/rustc_codegen_gcc/src/context.rs @@ -19,7 +19,9 @@ use rustc_session::Session; use rustc_span::source_map::respan; use rustc_span::{DUMMY_SP, Span}; use rustc_target::abi::{HasDataLayout, PointeeInfo, Size, TargetDataLayout, VariantIdx}; -use rustc_target::spec::{HasTargetSpec, HasWasmCAbiOpt, Target, TlsModel, WasmCAbi}; +use rustc_target::spec::{ + HasTargetSpec, HasWasmCAbiOpt, HasX86AbiOpt, Target, TlsModel, WasmCAbi, X86Abi, +}; use crate::callee::get_fn; use crate::common::SignType; @@ -538,6 +540,12 @@ impl<'gcc, 'tcx> HasWasmCAbiOpt for CodegenCx<'gcc, 'tcx> { } } +impl<'gcc, 'tcx> HasX86AbiOpt for CodegenCx<'gcc, 'tcx> { + fn x86_abi_opt(&self) -> X86Abi { + X86Abi { regparm: self.tcx.sess.opts.unstable_opts.regparm } + } +} + impl<'gcc, 'tcx> LayoutOfHelpers<'tcx> for CodegenCx<'gcc, 'tcx> { #[inline] fn handle_layout_err(&self, err: LayoutError<'tcx>, span: Span, ty: Ty<'tcx>) -> ! { diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs index 3189620e969da..d3762e739db80 100644 --- a/compiler/rustc_interface/src/tests.rs +++ b/compiler/rustc_interface/src/tests.rs @@ -836,6 +836,7 @@ fn test_unstable_options_tracking_hash() { tracked!(profile_emit, Some(PathBuf::from("abc"))); tracked!(profile_sample_use, Some(PathBuf::from("abc"))); tracked!(profiler_runtime, "abc".to_string()); + tracked!(regparm, Some(3)); tracked!(relax_elf_relocations, Some(true)); tracked!(remap_cwd_prefix, Some(PathBuf::from("abc"))); tracked!(sanitizer, SanitizerSet::ADDRESS); diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs index 3670b6bbc772a..dbf88e643c56b 100644 --- a/compiler/rustc_middle/src/ty/layout.rs +++ b/compiler/rustc_middle/src/ty/layout.rs @@ -21,7 +21,9 @@ use rustc_span::{DUMMY_SP, ErrorGuaranteed, Span}; use rustc_target::abi::call::FnAbi; use rustc_target::abi::{FieldIdx, TyAbiInterface, VariantIdx, call}; use rustc_target::spec::abi::Abi as SpecAbi; -use rustc_target::spec::{HasTargetSpec, HasWasmCAbiOpt, PanicStrategy, Target, WasmCAbi}; +use rustc_target::spec::{ + HasTargetSpec, HasWasmCAbiOpt, HasX86AbiOpt, PanicStrategy, Target, WasmCAbi, X86Abi, +}; use tracing::debug; use {rustc_abi as abi, rustc_hir as hir}; @@ -544,6 +546,12 @@ impl<'tcx> HasWasmCAbiOpt for TyCtxt<'tcx> { } } +impl<'tcx> HasX86AbiOpt for TyCtxt<'tcx> { + fn x86_abi_opt(&self) -> X86Abi { + X86Abi { regparm: self.sess.opts.unstable_opts.regparm } + } +} + impl<'tcx> HasTyCtxt<'tcx> for TyCtxt<'tcx> { #[inline] fn tcx(&self) -> TyCtxt<'tcx> { @@ -595,6 +603,12 @@ impl<'tcx> HasWasmCAbiOpt for LayoutCx<'tcx> { } } +impl<'tcx> HasX86AbiOpt for LayoutCx<'tcx> { + fn x86_abi_opt(&self) -> X86Abi { + self.calc.cx.x86_abi_opt() + } +} + impl<'tcx> HasTyCtxt<'tcx> for LayoutCx<'tcx> { fn tcx(&self) -> TyCtxt<'tcx> { self.calc.cx diff --git a/compiler/rustc_session/messages.ftl b/compiler/rustc_session/messages.ftl index 1816d1278fe27..893c532f1fbb1 100644 --- a/compiler/rustc_session/messages.ftl +++ b/compiler/rustc_session/messages.ftl @@ -136,3 +136,6 @@ session_unsupported_crate_type_for_target = dropping unsupported crate type `{$crate_type}` for target `{$target_triple}` session_unsupported_dwarf_version = requested DWARF version {$dwarf_version} is greater than 5 + +session_unsupported_regparm = `-Zregparm={$regparm}` is unsupported (valid values 0-3) +session_unsupported_regparm_arch = `-Zregparm=N` is only supported on x86 diff --git a/compiler/rustc_session/src/errors.rs b/compiler/rustc_session/src/errors.rs index dbb74d1e2446e..20e8fb38b88ce 100644 --- a/compiler/rustc_session/src/errors.rs +++ b/compiler/rustc_session/src/errors.rs @@ -485,6 +485,16 @@ pub(crate) struct FunctionReturnRequiresX86OrX8664; #[diag(session_function_return_thunk_extern_requires_non_large_code_model)] pub(crate) struct FunctionReturnThunkExternRequiresNonLargeCodeModel; +#[derive(Diagnostic)] +#[diag(session_unsupported_regparm)] +pub(crate) struct UnsupportedRegparm { + pub(crate) regparm: u32, +} + +#[derive(Diagnostic)] +#[diag(session_unsupported_regparm_arch)] +pub(crate) struct UnsupportedRegparmArch; + #[derive(Diagnostic)] #[diag(session_failed_to_create_profiler)] pub(crate) struct FailedToCreateProfiler { diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index f9964b59a9415..54a4621db2462 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -2000,6 +2000,11 @@ options! { "enable queries of the dependency graph for regression testing (default: no)"), randomize_layout: bool = (false, parse_bool, [TRACKED], "randomize the layout of types (default: no)"), + regparm: Option = (None, parse_opt_number, [TRACKED], + "On x86-32 targets, setting this to N causes the compiler to pass N arguments \ + in registers EAX, EDX, and ECX instead of on the stack for\ + \"C\", \"cdecl\", and \"stdcall\" fn.\ + It is UNSOUND to link together crates that use different values for this flag!"), relax_elf_relocations: Option = (None, parse_opt_bool, [TRACKED], "whether ELF relocations can be relaxed"), remap_cwd_prefix: Option = (None, parse_opt_pathbuf, [TRACKED], diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index 27879d817b208..1963cf4eb7c06 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -1337,6 +1337,15 @@ fn validate_commandline_args_with_session_available(sess: &Session) { } } + if let Some(regparm) = sess.opts.unstable_opts.regparm { + if regparm > 3 { + sess.dcx().emit_err(errors::UnsupportedRegparm { regparm }); + } + if sess.target.arch != "x86" { + sess.dcx().emit_err(errors::UnsupportedRegparmArch); + } + } + // The code model check applies to `thunk` and `thunk-extern`, but not `thunk-inline`, so it is // kept as a `match` to force a change if new ones are added, even if we currently only support // `thunk-extern` like Clang. diff --git a/compiler/rustc_target/src/callconv/mod.rs b/compiler/rustc_target/src/callconv/mod.rs index 832246495bc99..5d120a68059a8 100644 --- a/compiler/rustc_target/src/callconv/mod.rs +++ b/compiler/rustc_target/src/callconv/mod.rs @@ -6,7 +6,7 @@ use rustc_macros::HashStable_Generic; use rustc_span::Symbol; use crate::abi::{self, Abi, Align, HasDataLayout, Size, TyAbiInterface, TyAndLayout}; -use crate::spec::{self, HasTargetSpec, HasWasmCAbiOpt, WasmCAbi}; +use crate::spec::{self, HasTargetSpec, HasWasmCAbiOpt, HasX86AbiOpt, WasmCAbi}; mod aarch64; mod amdgpu; @@ -631,7 +631,7 @@ impl<'a, Ty> FnAbi<'a, Ty> { ) -> Result<(), AdjustForForeignAbiError> where Ty: TyAbiInterface<'a, C> + Copy, - C: HasDataLayout + HasTargetSpec + HasWasmCAbiOpt, + C: HasDataLayout + HasTargetSpec + HasWasmCAbiOpt + HasX86AbiOpt, { if abi == spec::abi::Abi::X86Interrupt { if let Some(arg) = self.args.first_mut() { @@ -643,14 +643,18 @@ impl<'a, Ty> FnAbi<'a, Ty> { let spec = cx.target_spec(); match &spec.arch[..] { "x86" => { - let flavor = if let spec::abi::Abi::Fastcall { .. } - | spec::abi::Abi::Vectorcall { .. } = abi - { - x86::Flavor::FastcallOrVectorcall - } else { - x86::Flavor::General + let (flavor, regparm) = match abi { + spec::abi::Abi::Fastcall { .. } | spec::abi::Abi::Vectorcall { .. } => { + (x86::Flavor::FastcallOrVectorcall, None) + } + spec::abi::Abi::C { .. } + | spec::abi::Abi::Cdecl { .. } + | spec::abi::Abi::Stdcall { .. } => { + (x86::Flavor::General, cx.x86_abi_opt().regparm) + } + _ => (x86::Flavor::General, None), }; - x86::compute_abi_info(cx, self, flavor); + x86::compute_abi_info(cx, self, x86::X86Options { flavor, regparm }); } "x86_64" => match abi { spec::abi::Abi::SysV64 { .. } => x86_64::compute_abi_info(cx, self), diff --git a/compiler/rustc_target/src/callconv/x86.rs b/compiler/rustc_target/src/callconv/x86.rs index d9af83d3205bc..40c3e7a891a0c 100644 --- a/compiler/rustc_target/src/callconv/x86.rs +++ b/compiler/rustc_target/src/callconv/x86.rs @@ -8,7 +8,12 @@ pub(crate) enum Flavor { FastcallOrVectorcall, } -pub(crate) fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>, flavor: Flavor) +pub(crate) struct X86Options { + pub flavor: Flavor, + pub regparm: Option, +} + +pub(crate) fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>, opts: X86Options) where Ty: TyAbiInterface<'a, C> + Copy, C: HasDataLayout + HasTargetSpec, @@ -128,58 +133,77 @@ where } } - if flavor == Flavor::FastcallOrVectorcall { - // Mark arguments as InReg like clang does it, - // so our fastcall/vectorcall is compatible with C/C++ fastcall/vectorcall. + fill_inregs(cx, fn_abi, opts, false); +} - // Clang reference: lib/CodeGen/TargetInfo.cpp - // See X86_32ABIInfo::shouldPrimitiveUseInReg(), X86_32ABIInfo::updateFreeRegs() +pub(crate) fn fill_inregs<'a, Ty, C>( + cx: &C, + fn_abi: &mut FnAbi<'a, Ty>, + opts: X86Options, + rust_abi: bool, +) where + Ty: TyAbiInterface<'a, C> + Copy, +{ + if opts.flavor != Flavor::FastcallOrVectorcall && opts.regparm.is_none_or(|x| x == 0) { + return; + } + // Mark arguments as InReg like clang does it, + // so our fastcall/vectorcall is compatible with C/C++ fastcall/vectorcall. - // IsSoftFloatABI is only set to true on ARM platforms, - // which in turn can't be x86? + // Clang reference: lib/CodeGen/TargetInfo.cpp + // See X86_32ABIInfo::shouldPrimitiveUseInReg(), X86_32ABIInfo::updateFreeRegs() - let mut free_regs = 2; + // IsSoftFloatABI is only set to true on ARM platforms, + // which in turn can't be x86? - for arg in fn_abi.args.iter_mut() { - let attrs = match arg.mode { - PassMode::Ignore - | PassMode::Indirect { attrs: _, meta_attrs: None, on_stack: _ } => { - continue; - } - PassMode::Direct(ref mut attrs) => attrs, - PassMode::Pair(..) - | PassMode::Indirect { attrs: _, meta_attrs: Some(_), on_stack: _ } - | PassMode::Cast { .. } => { - unreachable!("x86 shouldn't be passing arguments by {:?}", arg.mode) - } - }; + // 2 for fastcall/vectorcall, regparm limited by 3 otherwise + let mut free_regs = opts.regparm.unwrap_or(2).into(); + + // For types generating PassMode::Cast, InRegs will not be set. + // Maybe, this is a FIXME + let has_casts = fn_abi.args.iter().any(|arg| matches!(arg.mode, PassMode::Cast { .. })); + if has_casts && rust_abi { + return; + } - // At this point we know this must be a primitive of sorts. - let unit = arg.layout.homogeneous_aggregate(cx).unwrap().unit().unwrap(); - assert_eq!(unit.size, arg.layout.size); - if unit.kind == RegKind::Float { + for arg in fn_abi.args.iter_mut() { + let attrs = match arg.mode { + PassMode::Ignore | PassMode::Indirect { attrs: _, meta_attrs: None, on_stack: _ } => { continue; } + PassMode::Direct(ref mut attrs) => attrs, + PassMode::Pair(..) + | PassMode::Indirect { attrs: _, meta_attrs: Some(_), on_stack: _ } + | PassMode::Cast { .. } => { + unreachable!("x86 shouldn't be passing arguments by {:?}", arg.mode) + } + }; - let size_in_regs = (arg.layout.size.bits() + 31) / 32; + // At this point we know this must be a primitive of sorts. + let unit = arg.layout.homogeneous_aggregate(cx).unwrap().unit().unwrap(); + assert_eq!(unit.size, arg.layout.size); + if matches!(unit.kind, RegKind::Float | RegKind::Vector) { + continue; + } - if size_in_regs == 0 { - continue; - } + let size_in_regs = (arg.layout.size.bits() + 31) / 32; - if size_in_regs > free_regs { - break; - } + if size_in_regs == 0 { + continue; + } - free_regs -= size_in_regs; + if size_in_regs > free_regs { + break; + } - if arg.layout.size.bits() <= 32 && unit.kind == RegKind::Integer { - attrs.set(ArgAttribute::InReg); - } + free_regs -= size_in_regs; - if free_regs == 0 { - break; - } + if arg.layout.size.bits() <= 32 && unit.kind == RegKind::Integer { + attrs.set(ArgAttribute::InReg); + } + + if free_regs == 0 { + break; } } } diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 24f5646a9ea4b..5ca2a339f72c7 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -2096,6 +2096,18 @@ pub trait HasWasmCAbiOpt { fn wasm_c_abi_opt(&self) -> WasmCAbi; } +/// x86 (32-bit) abi options. +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct X86Abi { + /// On x86-32 targets, the regparm N causes the compiler to pass arguments + /// in registers EAX, EDX, and ECX instead of on the stack. + pub regparm: Option, +} + +pub trait HasX86AbiOpt { + fn x86_abi_opt(&self) -> X86Abi; +} + type StaticCow = Cow<'static, T>; /// Optional aspects of a target specification. diff --git a/compiler/rustc_target/src/spec/targets/riscv32i_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32i_unknown_none_elf.rs index 1995de9dd2d7e..0e0e13fd1d8e0 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32i_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32i_unknown_none_elf.rs @@ -20,6 +20,7 @@ pub(crate) fn target() -> Target { max_atomic_width: Some(32), atomic_cas: false, features: "+forced-atomics".into(), + llvm_abiname: "ilp32".into(), panic_strategy: PanicStrategy::Abort, relocation_model: RelocModel::Static, emit_debug_gdb_scripts: false, diff --git a/compiler/rustc_target/src/spec/targets/riscv32im_risc0_zkvm_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32im_risc0_zkvm_elf.rs index bd37cf80b4833..669c1702fda8c 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32im_risc0_zkvm_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32im_risc0_zkvm_elf.rs @@ -29,6 +29,7 @@ pub(crate) fn target() -> Target { atomic_cas: true, features: "+m".into(), + llvm_abiname: "ilp32".into(), executables: true, panic_strategy: PanicStrategy::Abort, relocation_model: RelocModel::Static, diff --git a/compiler/rustc_target/src/spec/targets/riscv32im_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32im_unknown_none_elf.rs index 32df30ddb5e3d..477a6c0e9eb97 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32im_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32im_unknown_none_elf.rs @@ -20,6 +20,7 @@ pub(crate) fn target() -> Target { max_atomic_width: Some(32), atomic_cas: false, features: "+m,+forced-atomics".into(), + llvm_abiname: "ilp32".into(), panic_strategy: PanicStrategy::Abort, relocation_model: RelocModel::Static, emit_debug_gdb_scripts: false, diff --git a/compiler/rustc_target/src/spec/targets/riscv32ima_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32ima_unknown_none_elf.rs index 61c887031bcf2..68146788d2074 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32ima_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32ima_unknown_none_elf.rs @@ -19,6 +19,7 @@ pub(crate) fn target() -> Target { cpu: "generic-rv32".into(), max_atomic_width: Some(32), features: "+m,+a".into(), + llvm_abiname: "ilp32".into(), panic_strategy: PanicStrategy::Abort, relocation_model: RelocModel::Static, emit_debug_gdb_scripts: false, diff --git a/compiler/rustc_target/src/spec/targets/riscv32imac_esp_espidf.rs b/compiler/rustc_target/src/spec/targets/riscv32imac_esp_espidf.rs index 9795af5656941..e12c3af6f8f38 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32imac_esp_espidf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32imac_esp_espidf.rs @@ -27,6 +27,7 @@ pub(crate) fn target() -> Target { atomic_cas: true, features: "+m,+a,+c".into(), + llvm_abiname: "ilp32".into(), panic_strategy: PanicStrategy::Abort, relocation_model: RelocModel::Static, emit_debug_gdb_scripts: false, diff --git a/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_none_elf.rs index cc28198e3ff0a..adc76f3cdb583 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_none_elf.rs @@ -19,6 +19,7 @@ pub(crate) fn target() -> Target { cpu: "generic-rv32".into(), max_atomic_width: Some(32), features: "+m,+a,+c".into(), + llvm_abiname: "ilp32".into(), panic_strategy: PanicStrategy::Abort, relocation_model: RelocModel::Static, emit_debug_gdb_scripts: false, diff --git a/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_nuttx_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_nuttx_elf.rs index 62397dcae9a1b..31c9180c509ce 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_nuttx_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_nuttx_elf.rs @@ -21,6 +21,7 @@ pub(crate) fn target() -> Target { cpu: "generic-rv32".into(), max_atomic_width: Some(32), features: "+m,+a,+c".into(), + llvm_abiname: "ilp32".into(), panic_strategy: PanicStrategy::Unwind, relocation_model: RelocModel::Static, ..Default::default() diff --git a/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_xous_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_xous_elf.rs index 0eaabc60cbcd0..88d112a012d0c 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_xous_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_xous_elf.rs @@ -20,6 +20,7 @@ pub(crate) fn target() -> Target { cpu: "generic-rv32".into(), max_atomic_width: Some(32), features: "+m,+a,+c".into(), + llvm_abiname: "ilp32".into(), panic_strategy: PanicStrategy::Unwind, relocation_model: RelocModel::Static, ..Default::default() diff --git a/compiler/rustc_target/src/spec/targets/riscv32imc_esp_espidf.rs b/compiler/rustc_target/src/spec/targets/riscv32imc_esp_espidf.rs index 9ae84ace457dd..cec97f8653899 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32imc_esp_espidf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32imc_esp_espidf.rs @@ -30,6 +30,7 @@ pub(crate) fn target() -> Target { atomic_cas: true, features: "+m,+c".into(), + llvm_abiname: "ilp32".into(), panic_strategy: PanicStrategy::Abort, relocation_model: RelocModel::Static, emit_debug_gdb_scripts: false, diff --git a/compiler/rustc_target/src/spec/targets/riscv32imc_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32imc_unknown_none_elf.rs index 0ae49debc3a38..0e00fc69b41a9 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32imc_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32imc_unknown_none_elf.rs @@ -20,6 +20,7 @@ pub(crate) fn target() -> Target { max_atomic_width: Some(32), atomic_cas: false, features: "+m,+c,+forced-atomics".into(), + llvm_abiname: "ilp32".into(), panic_strategy: PanicStrategy::Abort, relocation_model: RelocModel::Static, emit_debug_gdb_scripts: false, diff --git a/compiler/rustc_target/src/spec/targets/riscv32imc_unknown_nuttx_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32imc_unknown_nuttx_elf.rs index 5f3917edf7019..e86549806ddbf 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32imc_unknown_nuttx_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32imc_unknown_nuttx_elf.rs @@ -21,6 +21,7 @@ pub(crate) fn target() -> Target { cpu: "generic-rv32".into(), max_atomic_width: Some(32), features: "+m,+c".into(), + llvm_abiname: "ilp32".into(), panic_strategy: PanicStrategy::Unwind, relocation_model: RelocModel::Static, ..Default::default() diff --git a/compiler/rustc_target/src/spec/targets/riscv64imac_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/riscv64imac_unknown_none_elf.rs index d514f8efcd08c..d62ecc07a5d4f 100644 --- a/compiler/rustc_target/src/spec/targets/riscv64imac_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64imac_unknown_none_elf.rs @@ -22,6 +22,7 @@ pub(crate) fn target() -> Target { cpu: "generic-rv64".into(), max_atomic_width: Some(64), features: "+m,+a,+c".into(), + llvm_abiname: "lp64".into(), panic_strategy: PanicStrategy::Abort, relocation_model: RelocModel::Static, code_model: Some(CodeModel::Medium), diff --git a/compiler/rustc_target/src/spec/targets/riscv64imac_unknown_nuttx_elf.rs b/compiler/rustc_target/src/spec/targets/riscv64imac_unknown_nuttx_elf.rs index a737e46de1baa..9c18166558115 100644 --- a/compiler/rustc_target/src/spec/targets/riscv64imac_unknown_nuttx_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64imac_unknown_nuttx_elf.rs @@ -24,6 +24,7 @@ pub(crate) fn target() -> Target { cpu: "generic-rv64".into(), max_atomic_width: Some(64), features: "+m,+a,+c".into(), + llvm_abiname: "lp64".into(), panic_strategy: PanicStrategy::Abort, relocation_model: RelocModel::Static, code_model: Some(CodeModel::Medium), diff --git a/compiler/rustc_target/src/spec/tests/tests_impl.rs b/compiler/rustc_target/src/spec/tests/tests_impl.rs index fc5bd846e0241..7ed21954fba02 100644 --- a/compiler/rustc_target/src/spec/tests/tests_impl.rs +++ b/compiler/rustc_target/src/spec/tests/tests_impl.rs @@ -152,6 +152,17 @@ impl Target { if self.crt_static_default || self.crt_static_allows_dylibs { assert!(self.crt_static_respected); } + + // Check that RISC-V targets always specify which ABI they use. + match &*self.arch { + "riscv32" => { + assert_matches!(&*self.llvm_abiname, "ilp32" | "ilp32f" | "ilp32d" | "ilp32e") + } + "riscv64" => { + assert_matches!(&*self.llvm_abiname, "lp64" | "lp64f" | "lp64d" | "lp64q") + } + _ => {} + } } // Add your target to the whitelist if it has `std` library diff --git a/library/core/src/fmt/rt.rs b/library/core/src/fmt/rt.rs index eee4a9e4c6c89..af6f0da88de67 100644 --- a/library/core/src/fmt/rt.rs +++ b/library/core/src/fmt/rt.rs @@ -94,11 +94,11 @@ pub struct Argument<'a> { } #[rustc_diagnostic_item = "ArgumentMethods"] -impl<'a> Argument<'a> { +impl Argument<'_> { #[inline(always)] - fn new<'b, T>(x: &'b T, f: fn(&T, &mut Formatter<'_>) -> Result) -> Argument<'b> { + fn new<'a, T>(x: &'a T, f: fn(&T, &mut Formatter<'_>) -> Result) -> Argument<'a> { Argument { - // INVARIANT: this creates an `ArgumentType<'b>` from a `&'b T` and + // INVARIANT: this creates an `ArgumentType<'a>` from a `&'a T` and // a `fn(&T, ...)`, so the invariant is maintained. ty: ArgumentType::Placeholder { value: NonNull::from(x).cast(), @@ -110,43 +110,43 @@ impl<'a> Argument<'a> { } #[inline(always)] - pub fn new_display<'b, T: Display>(x: &'b T) -> Argument<'b> { + pub fn new_display(x: &T) -> Argument<'_> { Self::new(x, Display::fmt) } #[inline(always)] - pub fn new_debug<'b, T: Debug>(x: &'b T) -> Argument<'b> { + pub fn new_debug(x: &T) -> Argument<'_> { Self::new(x, Debug::fmt) } #[inline(always)] - pub fn new_debug_noop<'b, T: Debug>(x: &'b T) -> Argument<'b> { + pub fn new_debug_noop(x: &T) -> Argument<'_> { Self::new(x, |_, _| Ok(())) } #[inline(always)] - pub fn new_octal<'b, T: Octal>(x: &'b T) -> Argument<'b> { + pub fn new_octal(x: &T) -> Argument<'_> { Self::new(x, Octal::fmt) } #[inline(always)] - pub fn new_lower_hex<'b, T: LowerHex>(x: &'b T) -> Argument<'b> { + pub fn new_lower_hex(x: &T) -> Argument<'_> { Self::new(x, LowerHex::fmt) } #[inline(always)] - pub fn new_upper_hex<'b, T: UpperHex>(x: &'b T) -> Argument<'b> { + pub fn new_upper_hex(x: &T) -> Argument<'_> { Self::new(x, UpperHex::fmt) } #[inline(always)] - pub fn new_pointer<'b, T: Pointer>(x: &'b T) -> Argument<'b> { + pub fn new_pointer(x: &T) -> Argument<'_> { Self::new(x, Pointer::fmt) } #[inline(always)] - pub fn new_binary<'b, T: Binary>(x: &'b T) -> Argument<'b> { + pub fn new_binary(x: &T) -> Argument<'_> { Self::new(x, Binary::fmt) } #[inline(always)] - pub fn new_lower_exp<'b, T: LowerExp>(x: &'b T) -> Argument<'b> { + pub fn new_lower_exp(x: &T) -> Argument<'_> { Self::new(x, LowerExp::fmt) } #[inline(always)] - pub fn new_upper_exp<'b, T: UpperExp>(x: &'b T) -> Argument<'b> { + pub fn new_upper_exp(x: &T) -> Argument<'_> { Self::new(x, UpperExp::fmt) } #[inline(always)] diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs index 3924a6d714e3b..a9db0377a507b 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs @@ -545,23 +545,28 @@ impl Build { .args(["--get-regexp", "path"]) .run_capture(self) .stdout(); - for line in output.lines() { + std::thread::scope(|s| { // Look for `submodule.$name.path = $path` // Sample output: `submodule.src/rust-installer.path src/tools/rust-installer` - let submodule = line.split_once(' ').unwrap().1; - self.update_existing_submodule(submodule); - } + for line in output.lines() { + let submodule = line.split_once(' ').unwrap().1; + let config = self.config.clone(); + s.spawn(move || { + Self::update_existing_submodule(&config, submodule); + }); + } + }); } /// Updates the given submodule only if it's initialized already; nothing happens otherwise. - pub fn update_existing_submodule(&self, submodule: &str) { + pub fn update_existing_submodule(config: &Config, submodule: &str) { // Avoid running git when there isn't a git checkout. - if !self.config.submodules() { + if !config.submodules() { return; } if GitInfo::new(false, Path::new(submodule)).is_managed_git_subrepository() { - self.config.update_submodule(submodule); + config.update_submodule(submodule); } } diff --git a/src/bootstrap/src/utils/channel.rs b/src/bootstrap/src/utils/channel.rs index c361abb9c9e13..4a9ecc7a4f8a1 100644 --- a/src/bootstrap/src/utils/channel.rs +++ b/src/bootstrap/src/utils/channel.rs @@ -10,7 +10,7 @@ use std::path::Path; use super::helpers; use crate::Build; -use crate::utils::helpers::{output, t}; +use crate::utils::helpers::{start_process, t}; #[derive(Clone, Default)] pub enum GitInfo { @@ -56,7 +56,7 @@ impl GitInfo { } // Ok, let's scrape some info - let ver_date = output( + let ver_date = start_process( helpers::git(Some(dir)) .arg("log") .arg("-1") @@ -65,14 +65,14 @@ impl GitInfo { .as_command_mut(), ); let ver_hash = - output(helpers::git(Some(dir)).arg("rev-parse").arg("HEAD").as_command_mut()); - let short_ver_hash = output( + start_process(helpers::git(Some(dir)).arg("rev-parse").arg("HEAD").as_command_mut()); + let short_ver_hash = start_process( helpers::git(Some(dir)).arg("rev-parse").arg("--short=9").arg("HEAD").as_command_mut(), ); GitInfo::Present(Some(Info { - commit_date: ver_date.trim().to_string(), - sha: ver_hash.trim().to_string(), - short_sha: short_ver_hash.trim().to_string(), + commit_date: ver_date().trim().to_string(), + sha: ver_hash().trim().to_string(), + short_sha: short_ver_hash().trim().to_string(), })) } diff --git a/src/bootstrap/src/utils/helpers.rs b/src/bootstrap/src/utils/helpers.rs index 2519ace92b9e0..7162007e9f0f7 100644 --- a/src/bootstrap/src/utils/helpers.rs +++ b/src/bootstrap/src/utils/helpers.rs @@ -288,6 +288,33 @@ pub fn output(cmd: &mut Command) -> String { String::from_utf8(output.stdout).unwrap() } +/// Spawn a process and return a closure that will wait for the process +/// to finish and then return its output. This allows the spawned process +/// to do work without immediately blocking bootstrap. +#[track_caller] +pub fn start_process(cmd: &mut Command) -> impl FnOnce() -> String { + let child = match cmd.stderr(Stdio::inherit()).stdout(Stdio::piped()).spawn() { + Ok(child) => child, + Err(e) => fail(&format!("failed to execute command: {cmd:?}\nERROR: {e}")), + }; + + let command = format!("{:?}", cmd); + + move || { + let output = child.wait_with_output().unwrap(); + + if !output.status.success() { + panic!( + "command did not execute successfully: {}\n\ + expected success, got: {}", + command, output.status + ); + } + + String::from_utf8(output.stdout).unwrap() + } +} + /// Returns the last-modified time for `path`, or zero if it doesn't exist. pub fn mtime(path: &Path) -> SystemTime { fs::metadata(path).and_then(|f| f.modified()).unwrap_or(UNIX_EPOCH) diff --git a/src/doc/unstable-book/src/compiler-flags/regparm.md b/src/doc/unstable-book/src/compiler-flags/regparm.md new file mode 100644 index 0000000000000..8f311f091c0a2 --- /dev/null +++ b/src/doc/unstable-book/src/compiler-flags/regparm.md @@ -0,0 +1,20 @@ +# `regparm` + +The tracking issue for this feature is: https://github.com/rust-lang/rust/issues/131749. + +------------------------ + +Option -Zregparm=N causes the compiler to pass N arguments +in registers EAX, EDX, and ECX instead of on the stack for "C", "cdecl", and "stdcall" fn. +It is UNSOUND to link together crates that use different values for this flag. +It is only supported on `x86`. + +It is equivalent to [Clang]'s and [GCC]'s `-mregparm`. + +Supported values for this option are 0-3. + +[Clang]: https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-mregparm +[GCC]: https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html#index-regparm-function-attribute_002c-x86 + +Implementation details: +For eligible arguments, llvm `inreg` attribute is set. diff --git a/src/tools/tidy/src/issues.txt b/src/tools/tidy/src/issues.txt index 97c42752c12dd..94f8d23c1586a 100644 --- a/src/tools/tidy/src/issues.txt +++ b/src/tools/tidy/src/issues.txt @@ -3720,16 +3720,6 @@ ui/rfcs/rfc-2497-if-let-chains/issue-99938.rs ui/rfcs/rfc-2528-type-changing-struct-update/issue-92010-trait-bound-not-satisfied.rs ui/rfcs/rfc-2528-type-changing-struct-update/issue-96878.rs ui/rfcs/rfc-2565-param-attrs/issue-64682-dropping-first-attrs-in-impl-fns.rs -ui/rfcs/rfc-2632-const-trait-impl/issue-100222.rs -ui/rfcs/rfc-2632-const-trait-impl/issue-102156.rs -ui/rfcs/rfc-2632-const-trait-impl/issue-102985.rs -ui/rfcs/rfc-2632-const-trait-impl/issue-103677.rs -ui/rfcs/rfc-2632-const-trait-impl/issue-79450.rs -ui/rfcs/rfc-2632-const-trait-impl/issue-88155.rs -ui/rfcs/rfc-2632-const-trait-impl/issue-92111.rs -ui/rfcs/rfc-2632-const-trait-impl/issue-92230-wf-super-trait-env.rs -ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95186-specialize-on-tilde-const.rs -ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.rs ui/rust-2018/issue-51008-1.rs ui/rust-2018/issue-51008.rs ui/rust-2018/issue-52202-use-suggestions.rs @@ -3983,6 +3973,16 @@ ui/traits/alias/issue-75983.rs ui/traits/alias/issue-83613.rs ui/traits/associated_type_bound/issue-51446.rs ui/traits/auxiliary/issue_89119_intercrate_caching.rs +ui/traits/const-traits/issue-100222.rs +ui/traits/const-traits/issue-102156.rs +ui/traits/const-traits/issue-102985.rs +ui/traits/const-traits/issue-103677.rs +ui/traits/const-traits/issue-79450.rs +ui/traits/const-traits/issue-88155.rs +ui/traits/const-traits/issue-92111.rs +ui/traits/const-traits/issue-92230-wf-super-trait-env.rs +ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.rs +ui/traits/const-traits/specialization/issue-95187-same-trait-bound-different-constness.rs ui/traits/issue-103563.rs ui/traits/issue-104322.rs ui/traits/issue-105231.rs diff --git a/tests/assembly/riscv-soft-abi-with-float-features.rs b/tests/assembly/riscv-soft-abi-with-float-features.rs new file mode 100644 index 0000000000000..733137f570093 --- /dev/null +++ b/tests/assembly/riscv-soft-abi-with-float-features.rs @@ -0,0 +1,46 @@ +//@ assembly-output: emit-asm +//@ compile-flags: --target riscv64imac-unknown-none-elf -Ctarget-feature=+f,+d +//@ needs-llvm-components: riscv + +#![feature(no_core, lang_items, f16)] +#![crate_type = "lib"] +#![no_core] + +#[lang = "sized"] +trait Sized {} + +#[lang = "copy"] +trait Copy {} + +impl Copy for f16 {} +impl Copy for f32 {} +impl Copy for f64 {} + +// This test checks that the floats are all returned in `a0` as required by the `lp64` ABI. + +// CHECK-LABEL: read_f16 +#[no_mangle] +pub extern "C" fn read_f16(x: &f16) -> f16 { + // CHECK: lh a0, 0(a0) + // CHECK-NEXT: lui a1, 1048560 + // CHECK-NEXT: or a0, a0, a1 + // CHECK-NEXT: ret + *x +} + +// CHECK-LABEL: read_f32 +#[no_mangle] +pub extern "C" fn read_f32(x: &f32) -> f32 { + // CHECK: flw fa5, 0(a0) + // CHECK-NEXT: fmv.x.w a0, fa5 + // CHECK-NEXT: ret + *x +} + +// CHECK-LABEL: read_f64 +#[no_mangle] +pub extern "C" fn read_f64(x: &f64) -> f64 { + // CHECK: ld a0, 0(a0) + // CHECK-NEXT: ret + *x +} diff --git a/tests/codegen/regparm-inreg.rs b/tests/codegen/regparm-inreg.rs new file mode 100644 index 0000000000000..c8c647bcc87c0 --- /dev/null +++ b/tests/codegen/regparm-inreg.rs @@ -0,0 +1,125 @@ +// Checks how `regparm` flag works with different calling conventions: +// marks function arguments as "inreg" like the C/C++ compilers for the platforms. +// x86 only. + +//@ compile-flags: --target i686-unknown-linux-gnu -O -C no-prepopulate-passes +//@ needs-llvm-components: x86 + +//@ revisions:regparm0 regparm1 regparm2 regparm3 +//@[regparm0] compile-flags: -Zregparm=0 +//@[regparm1] compile-flags: -Zregparm=1 +//@[regparm2] compile-flags: -Zregparm=2 +//@[regparm3] compile-flags: -Zregparm=3 + +#![crate_type = "lib"] +#![no_core] +#![feature(no_core, lang_items, repr_simd)] +#[lang = "sized"] +trait Sized {} +#[lang = "copy"] +trait Copy {} + +pub mod tests { + // regparm doesn't work for "fastcall" calling conv (only 2 inregs) + // CHECK: @f1(i32 inreg noundef %_1, i32 inreg noundef %_2, i32 noundef %_3) + #[no_mangle] + pub extern "fastcall" fn f1(_: i32, _: i32, _: i32) {} + + // regparm0: @f3(i32 noundef %_1, i32 noundef %_2, i32 noundef %_3) + // regparm1: @f3(i32 inreg noundef %_1, i32 noundef %_2, i32 noundef %_3) + // regparm2: @f3(i32 inreg noundef %_1, i32 inreg noundef %_2, i32 noundef %_3) + // regparm3: @f3(i32 inreg noundef %_1, i32 inreg noundef %_2, i32 inreg noundef %_3) + #[no_mangle] + pub extern "C" fn f3(_: i32, _: i32, _: i32) {} + + // regparm0: @f4(i32 noundef %_1, i32 noundef %_2, i32 noundef %_3) + // regparm1: @f4(i32 inreg noundef %_1, i32 noundef %_2, i32 noundef %_3) + // regparm2: @f4(i32 inreg noundef %_1, i32 inreg noundef %_2, i32 noundef %_3) + // regparm3: @f4(i32 inreg noundef %_1, i32 inreg noundef %_2, i32 inreg noundef %_3) + #[no_mangle] + pub extern "cdecl" fn f4(_: i32, _: i32, _: i32) {} + + // regparm0: @f5(i32 noundef %_1, i32 noundef %_2, i32 noundef %_3) + // regparm1: @f5(i32 inreg noundef %_1, i32 noundef %_2, i32 noundef %_3) + // regparm2: @f5(i32 inreg noundef %_1, i32 inreg noundef %_2, i32 noundef %_3) + // regparm3: @f5(i32 inreg noundef %_1, i32 inreg noundef %_2, i32 inreg noundef %_3) + #[no_mangle] + pub extern "stdcall" fn f5(_: i32, _: i32, _: i32) {} + + // regparm doesn't work for thiscall + // CHECK: @f6(i32 noundef %_1, i32 noundef %_2, i32 noundef %_3) + #[no_mangle] + pub extern "thiscall" fn f6(_: i32, _: i32, _: i32) {} + + struct S1 { + x1: i32, + } + // regparm0: @f7(i32 noundef %_1, i32 noundef %_2, i32 noundef %_3, i32 noundef %_4) + // regparm1: @f7(i32 inreg noundef %_1, i32 noundef %_2, i32 noundef %_3, i32 noundef %_4) + // regparm2: @f7(i32 inreg noundef %_1, i32 inreg noundef %_2, i32 noundef %_3, i32 noundef %_4) + // regparm3: @f7(i32 inreg noundef %_1, i32 inreg noundef %_2, i32 inreg noundef %_3, + // regparm3-SAME: i32 noundef %_4) + #[no_mangle] + pub extern "C" fn f7(_: i32, _: i32, _: S1, _: i32) {} + + #[repr(C)] + struct S2 { + x1: i32, + x2: i32, + } + // regparm0: @f8(i32 noundef %_1, i32 noundef %_2, ptr {{.*}} %_3, i32 noundef %_4) + // regparm1: @f8(i32 inreg noundef %_1, i32 noundef %_2, ptr {{.*}} %_3, i32 noundef %_4) + // regparm2: @f8(i32 inreg noundef %_1, i32 inreg noundef %_2, ptr {{.*}} %_3, i32 noundef %_4) + // regparm3: @f8(i32 inreg noundef %_1, i32 inreg noundef %_2, ptr {{.*}} %_3, + // regparm3-SAME: i32 inreg noundef %_4) + #[no_mangle] + pub extern "C" fn f8(_: i32, _: i32, _: S2, _: i32) {} + + // regparm0: @f9(i1 noundef zeroext %_1, i16 noundef signext %_2, i64 noundef %_3, + // regparm0-SAME: i128 noundef %_4) + // regparm1: @f9(i1 inreg noundef zeroext %_1, i16 noundef signext %_2, i64 noundef %_3, + // regparm1-SAME: i128 noundef %_4) + // regparm2: @f9(i1 inreg noundef zeroext %_1, i16 inreg noundef signext %_2, i64 noundef %_3, + // regparm2-SAME: i128 noundef %_4) + // regparm3: @f9(i1 inreg noundef zeroext %_1, i16 inreg noundef signext %_2, i64 noundef %_3, + // regparm3-SAME: i128 noundef %_4) + #[no_mangle] + pub extern "C" fn f9(_: bool, _: i16, _: i64, _: u128) {} + + // regparm0: @f10(float noundef %_1, double noundef %_2, i1 noundef zeroext %_3, + // regparm0-SAME: i16 noundef signext %_4) + // regparm1: @f10(float noundef %_1, double noundef %_2, i1 inreg noundef zeroext %_3, + // regparm1-SAME: i16 noundef signext %_4) + // regparm2: @f10(float noundef %_1, double noundef %_2, i1 inreg noundef zeroext %_3, + // regparm2-SAME: i16 inreg noundef signext %_4) + // regparm3: @f10(float noundef %_1, double noundef %_2, i1 inreg noundef zeroext %_3, + // regparm3-SAME: i16 inreg noundef signext %_4) + #[no_mangle] + pub extern "C" fn f10(_: f32, _: f64, _: bool, _: i16) {} + + #[allow(non_camel_case_types)] + #[repr(simd)] + pub struct __m128([f32; 4]); + + // regparm0: @f11(i32 noundef %_1, <4 x float> %_2, i32 noundef %_3, i32 noundef %_4) + // regparm1: @f11(i32 inreg noundef %_1, <4 x float> %_2, i32 noundef %_3, i32 noundef %_4) + // regparm2: @f11(i32 inreg noundef %_1, <4 x float> %_2, i32 inreg noundef %_3, + // regparm2-SAME: i32 noundef %_4) + // regparm3: @f11(i32 inreg noundef %_1, <4 x float> %_2, i32 inreg noundef %_3, + // regparm3-SAME: i32 inreg noundef %_4) + #[no_mangle] + pub extern "C" fn f11(_: i32, _: __m128, _: i32, _: i32) {} + + #[allow(non_camel_case_types)] + #[repr(simd)] + pub struct __m256([f32; 8]); + + // regparm0: @f12(i32 noundef %_1, <8 x float> %_2, i32 noundef %_3, i32 noundef %_4) + // regparm1: @f12(i32 inreg noundef %_1, <8 x float> %_2, i32 noundef %_3, i32 noundef %_4) + // regparm2: @f12(i32 inreg noundef %_1, <8 x float> %_2, i32 inreg noundef %_3, + // regparm2-SAME: i32 noundef %_4) + // regparm3: @f12(i32 inreg noundef %_1, <8 x float> %_2, i32 inreg noundef %_3, + // regparm3-SAME: i32 inreg noundef %_4) + #[no_mangle] + pub extern "C" fn f12(_: i32, _: __m256, _: i32, _: i32) {} +} diff --git a/tests/codegen/riscv-target-abi.rs b/tests/codegen/riscv-target-abi.rs index 5d545af9c7690..88da4ece7ba31 100644 --- a/tests/codegen/riscv-target-abi.rs +++ b/tests/codegen/riscv-target-abi.rs @@ -10,7 +10,7 @@ //@[riscv32imac] compile-flags: --target=riscv32imac-unknown-none-elf //@[riscv32imac] needs-llvm-components: riscv -// riscv32imac-NOT: !"target-abi" +// riscv32imac: !{i32 1, !"target-abi", !"ilp32"} #![feature(no_core, lang_items)] #![crate_type = "lib"] diff --git a/tests/ui/closures/issue-111932.stderr b/tests/ui/closures/issue-111932.stderr index ff46b10d005dc..93488ad2011e4 100644 --- a/tests/ui/closures/issue-111932.stderr +++ b/tests/ui/closures/issue-111932.stderr @@ -17,7 +17,7 @@ LL | println!("{:?}", foo); | required by a bound introduced by this call | = help: the trait `Sized` is not implemented for `dyn Foo` -note: required by an implicit `Sized` bound in `core::fmt::rt::Argument::<'a>::new_debug` +note: required by an implicit `Sized` bound in `core::fmt::rt::Argument::<'_>::new_debug` --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/const-generics/infer/issue-77092.stderr b/tests/ui/const-generics/infer/issue-77092.stderr index 9a6374a2adcbe..4ab80cec58d8d 100644 --- a/tests/ui/const-generics/infer/issue-77092.stderr +++ b/tests/ui/const-generics/infer/issue-77092.stderr @@ -25,7 +25,7 @@ LL | println!("{:?}", take_array_from_mut(&mut arr, i)); = 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::<'a>::new_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 | diff --git a/tests/ui/fmt/ifmt-unimpl.stderr b/tests/ui/fmt/ifmt-unimpl.stderr index a22bba07c0275..f83e7c8772886 100644 --- a/tests/ui/fmt/ifmt-unimpl.stderr +++ b/tests/ui/fmt/ifmt-unimpl.stderr @@ -17,7 +17,7 @@ LL | format!("{:X}", "3"); i32 and 9 others = note: required for `&str` to implement `UpperHex` -note: required by a bound in `core::fmt::rt::Argument::<'a>::new_upper_hex` +note: required by a bound in `core::fmt::rt::Argument::<'_>::new_upper_hex` --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/invalid-compile-flags/regparm/regparm-valid-values.regparm4.stderr b/tests/ui/invalid-compile-flags/regparm/regparm-valid-values.regparm4.stderr new file mode 100644 index 0000000000000..8fc04adf57f56 --- /dev/null +++ b/tests/ui/invalid-compile-flags/regparm/regparm-valid-values.regparm4.stderr @@ -0,0 +1,4 @@ +error: `-Zregparm=4` is unsupported (valid values 0-3) + +error: aborting due to 1 previous error + diff --git a/tests/ui/invalid-compile-flags/regparm/regparm-valid-values.rs b/tests/ui/invalid-compile-flags/regparm/regparm-valid-values.rs new file mode 100644 index 0000000000000..b548d678520b6 --- /dev/null +++ b/tests/ui/invalid-compile-flags/regparm/regparm-valid-values.rs @@ -0,0 +1,24 @@ +//@ revisions: regparm0 regparm1 regparm2 regparm3 regparm4 + +//@ needs-llvm-components: x86 +//@ compile-flags: --target i686-unknown-linux-gnu + +//@[regparm0] check-pass +//@[regparm0] compile-flags: -Zregparm=0 + +//@[regparm1] check-pass +//@[regparm1] compile-flags: -Zregparm=1 + +//@[regparm2] check-pass +//@[regparm2] compile-flags: -Zregparm=2 + +//@[regparm3] check-pass +//@[regparm3] compile-flags: -Zregparm=3 + +//@[regparm4] check-fail +//@[regparm4] compile-flags: -Zregparm=4 +//@[regparm4] error-pattern: `-Zregparm=4` is unsupported (valid values 0-3) + +#![feature(no_core)] +#![no_core] +#![no_main] diff --git a/tests/ui/invalid-compile-flags/regparm/requires-x86.aarch64.stderr b/tests/ui/invalid-compile-flags/regparm/requires-x86.aarch64.stderr new file mode 100644 index 0000000000000..2433519f803c8 --- /dev/null +++ b/tests/ui/invalid-compile-flags/regparm/requires-x86.aarch64.stderr @@ -0,0 +1,4 @@ +error: `-Zregparm=N` is only supported on x86 + +error: aborting due to 1 previous error + diff --git a/tests/ui/invalid-compile-flags/regparm/requires-x86.rs b/tests/ui/invalid-compile-flags/regparm/requires-x86.rs new file mode 100644 index 0000000000000..ce6e437fb476d --- /dev/null +++ b/tests/ui/invalid-compile-flags/regparm/requires-x86.rs @@ -0,0 +1,21 @@ +//@ revisions: x86 x86_64 aarch64 + +//@ compile-flags: -Zregparm=3 + +//@[x86] check-pass +//@[x86] needs-llvm-components: x86 +//@[x86] compile-flags: --target i686-unknown-linux-gnu + +//@[x86_64] check-fail +//@[x86_64] needs-llvm-components: x86 +//@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu +//@[x86_64] error-pattern: `-Zregparm=N` is only supported on x86 + +//@[aarch64] check-fail +//@[aarch64] needs-llvm-components: aarch64 +//@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu +//@[aarch64] error-pattern: `-Zregparm=N` is only supported on x86 + +#![feature(no_core)] +#![no_core] +#![no_main] diff --git a/tests/ui/invalid-compile-flags/regparm/requires-x86.x86_64.stderr b/tests/ui/invalid-compile-flags/regparm/requires-x86.x86_64.stderr new file mode 100644 index 0000000000000..2433519f803c8 --- /dev/null +++ b/tests/ui/invalid-compile-flags/regparm/requires-x86.x86_64.stderr @@ -0,0 +1,4 @@ +error: `-Zregparm=N` is only supported on x86 + +error: aborting due to 1 previous error + diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.rs b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.rs rename to tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.stderr b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.stderr rename to tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.rs b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.rs rename to tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.stderr b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.stderr rename to tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.rs b/tests/ui/traits/const-traits/assoc-type.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.rs rename to tests/ui/traits/const-traits/assoc-type.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.stderr b/tests/ui/traits/const-traits/assoc-type.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.stderr rename to tests/ui/traits/const-traits/assoc-type.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/attr-misuse.rs b/tests/ui/traits/const-traits/attr-misuse.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/attr-misuse.rs rename to tests/ui/traits/const-traits/attr-misuse.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/attr-misuse.stderr b/tests/ui/traits/const-traits/attr-misuse.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/attr-misuse.stderr rename to tests/ui/traits/const-traits/attr-misuse.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/auxiliary/cross-crate.rs b/tests/ui/traits/const-traits/auxiliary/cross-crate.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/auxiliary/cross-crate.rs rename to tests/ui/traits/const-traits/auxiliary/cross-crate.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/auxiliary/staged-api.rs b/tests/ui/traits/const-traits/auxiliary/staged-api.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/auxiliary/staged-api.rs rename to tests/ui/traits/const-traits/auxiliary/staged-api.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-fail.rs b/tests/ui/traits/const-traits/call-const-trait-method-fail.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-fail.rs rename to tests/ui/traits/const-traits/call-const-trait-method-fail.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-fail.stderr b/tests/ui/traits/const-traits/call-const-trait-method-fail.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-fail.stderr rename to tests/ui/traits/const-traits/call-const-trait-method-fail.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-pass.rs b/tests/ui/traits/const-traits/call-const-trait-method-pass.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-pass.rs rename to tests/ui/traits/const-traits/call-const-trait-method-pass.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-pass.stderr b/tests/ui/traits/const-traits/call-const-trait-method-pass.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-pass.stderr rename to tests/ui/traits/const-traits/call-const-trait-method-pass.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.rs b/tests/ui/traits/const-traits/call-generic-in-impl.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.rs rename to tests/ui/traits/const-traits/call-generic-in-impl.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.stderr b/tests/ui/traits/const-traits/call-generic-in-impl.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.stderr rename to tests/ui/traits/const-traits/call-generic-in-impl.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.rs b/tests/ui/traits/const-traits/call-generic-method-chain.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.rs rename to tests/ui/traits/const-traits/call-generic-method-chain.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.stderr b/tests/ui/traits/const-traits/call-generic-method-chain.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.stderr rename to tests/ui/traits/const-traits/call-generic-method-chain.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs b/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs rename to tests/ui/traits/const-traits/call-generic-method-dup-bound.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.stderr b/tests/ui/traits/const-traits/call-generic-method-dup-bound.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.stderr rename to tests/ui/traits/const-traits/call-generic-method-dup-bound.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-fail.rs b/tests/ui/traits/const-traits/call-generic-method-fail.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-fail.rs rename to tests/ui/traits/const-traits/call-generic-method-fail.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst-bound.rs b/tests/ui/traits/const-traits/call-generic-method-nonconst-bound.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst-bound.rs rename to tests/ui/traits/const-traits/call-generic-method-nonconst-bound.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.rs b/tests/ui/traits/const-traits/call-generic-method-nonconst.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.rs rename to tests/ui/traits/const-traits/call-generic-method-nonconst.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr b/tests/ui/traits/const-traits/call-generic-method-nonconst.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr rename to tests/ui/traits/const-traits/call-generic-method-nonconst.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.rs b/tests/ui/traits/const-traits/call-generic-method-pass.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.rs rename to tests/ui/traits/const-traits/call-generic-method-pass.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.stderr b/tests/ui/traits/const-traits/call-generic-method-pass.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.stderr rename to tests/ui/traits/const-traits/call-generic-method-pass.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call.rs b/tests/ui/traits/const-traits/call.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/call.rs rename to tests/ui/traits/const-traits/call.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-and-non-const-impl.rs b/tests/ui/traits/const-traits/const-and-non-const-impl.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-and-non-const-impl.rs rename to tests/ui/traits/const-traits/const-and-non-const-impl.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-and-non-const-impl.stderr b/tests/ui/traits/const-traits/const-and-non-const-impl.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-and-non-const-impl.stderr rename to tests/ui/traits/const-traits/const-and-non-const-impl.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-bound-on-not-const-associated-fn.rs b/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-bound-on-not-const-associated-fn.rs rename to tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-bound-on-not-const-associated-fn.stderr b/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-bound-on-not-const-associated-fn.stderr rename to tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-bounds-non-const-trait.rs b/tests/ui/traits/const-traits/const-bounds-non-const-trait.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-bounds-non-const-trait.rs rename to tests/ui/traits/const-traits/const-bounds-non-const-trait.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-bounds-non-const-trait.stderr b/tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-bounds-non-const-trait.stderr rename to tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-check-fns-in-const-impl.rs b/tests/ui/traits/const-traits/const-check-fns-in-const-impl.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-check-fns-in-const-impl.rs rename to tests/ui/traits/const-traits/const-check-fns-in-const-impl.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-check-fns-in-const-impl.stderr b/tests/ui/traits/const-traits/const-check-fns-in-const-impl.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-check-fns-in-const-impl.stderr rename to tests/ui/traits/const-traits/const-check-fns-in-const-impl.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-parse-not-item.rs b/tests/ui/traits/const-traits/const-closure-parse-not-item.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-parse-not-item.rs rename to tests/ui/traits/const-traits/const-closure-parse-not-item.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-parse-not-item.stderr b/tests/ui/traits/const-traits/const-closure-parse-not-item.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-parse-not-item.stderr rename to tests/ui/traits/const-traits/const-closure-parse-not-item.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method-fail.rs b/tests/ui/traits/const-traits/const-closure-trait-method-fail.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method-fail.rs rename to tests/ui/traits/const-traits/const-closure-trait-method-fail.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method-fail.stderr b/tests/ui/traits/const-traits/const-closure-trait-method-fail.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method-fail.stderr rename to tests/ui/traits/const-traits/const-closure-trait-method-fail.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method.rs b/tests/ui/traits/const-traits/const-closure-trait-method.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method.rs rename to tests/ui/traits/const-traits/const-closure-trait-method.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method.stderr b/tests/ui/traits/const-traits/const-closure-trait-method.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method.stderr rename to tests/ui/traits/const-traits/const-closure-trait-method.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closures.rs b/tests/ui/traits/const-traits/const-closures.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-closures.rs rename to tests/ui/traits/const-traits/const-closures.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closures.stderr b/tests/ui/traits/const-traits/const-closures.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-closures.stderr rename to tests/ui/traits/const-traits/const-closures.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-default-method-bodies.rs b/tests/ui/traits/const-traits/const-default-method-bodies.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-default-method-bodies.rs rename to tests/ui/traits/const-traits/const-default-method-bodies.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-default-method-bodies.stderr b/tests/ui/traits/const-traits/const-default-method-bodies.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-default-method-bodies.stderr rename to tests/ui/traits/const-traits/const-default-method-bodies.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.rs b/tests/ui/traits/const-traits/const-drop-bound.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.rs rename to tests/ui/traits/const-traits/const-drop-bound.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.stderr b/tests/ui/traits/const-traits/const-drop-bound.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.stderr rename to tests/ui/traits/const-traits/const-drop-bound.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.precise.stderr b/tests/ui/traits/const-traits/const-drop-fail-2.precise.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.precise.stderr rename to tests/ui/traits/const-traits/const-drop-fail-2.precise.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.rs b/tests/ui/traits/const-traits/const-drop-fail-2.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.rs rename to tests/ui/traits/const-traits/const-drop-fail-2.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.stderr b/tests/ui/traits/const-traits/const-drop-fail-2.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.stderr rename to tests/ui/traits/const-traits/const-drop-fail-2.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.stock.stderr b/tests/ui/traits/const-traits/const-drop-fail-2.stock.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.stock.stderr rename to tests/ui/traits/const-traits/const-drop-fail-2.stock.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr b/tests/ui/traits/const-traits/const-drop-fail.precise.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr rename to tests/ui/traits/const-traits/const-drop-fail.precise.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.rs b/tests/ui/traits/const-traits/const-drop-fail.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.rs rename to tests/ui/traits/const-traits/const-drop-fail.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.stock.stderr b/tests/ui/traits/const-traits/const-drop-fail.stock.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.stock.stderr rename to tests/ui/traits/const-traits/const-drop-fail.stock.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.precise.stderr b/tests/ui/traits/const-traits/const-drop.precise.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.precise.stderr rename to tests/ui/traits/const-traits/const-drop.precise.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs b/tests/ui/traits/const-traits/const-drop.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs rename to tests/ui/traits/const-traits/const-drop.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.stock.stderr b/tests/ui/traits/const-traits/const-drop.stock.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.stock.stderr rename to tests/ui/traits/const-traits/const-drop.stock.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-fns-are-early-bound.rs b/tests/ui/traits/const-traits/const-fns-are-early-bound.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-fns-are-early-bound.rs rename to tests/ui/traits/const-traits/const-fns-are-early-bound.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-fns-are-early-bound.stderr b/tests/ui/traits/const-traits/const-fns-are-early-bound.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-fns-are-early-bound.stderr rename to tests/ui/traits/const-traits/const-fns-are-early-bound.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-norecover.rs b/tests/ui/traits/const-traits/const-impl-norecover.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-norecover.rs rename to tests/ui/traits/const-traits/const-impl-norecover.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-norecover.stderr b/tests/ui/traits/const-traits/const-impl-norecover.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-norecover.stderr rename to tests/ui/traits/const-traits/const-impl-norecover.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-recovery.rs b/tests/ui/traits/const-traits/const-impl-recovery.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-recovery.rs rename to tests/ui/traits/const-traits/const-impl-recovery.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-recovery.stderr b/tests/ui/traits/const-traits/const-impl-recovery.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-recovery.stderr rename to tests/ui/traits/const-traits/const-impl-recovery.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.rs b/tests/ui/traits/const-traits/const-impl-requires-const-trait.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.rs rename to tests/ui/traits/const-traits/const-impl-requires-const-trait.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.stderr b/tests/ui/traits/const-traits/const-impl-requires-const-trait.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.stderr rename to tests/ui/traits/const-traits/const-impl-requires-const-trait.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs b/tests/ui/traits/const-traits/const-impl-trait.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs rename to tests/ui/traits/const-traits/const-impl-trait.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr b/tests/ui/traits/const-traits/const-impl-trait.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr rename to tests/ui/traits/const-traits/const-impl-trait.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs b/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs rename to tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.stderr b/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.stderr rename to tests/ui/traits/const-traits/const-trait-bounds-trait-objects.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds.rs b/tests/ui/traits/const-traits/const-trait-bounds.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds.rs rename to tests/ui/traits/const-traits/const-trait-bounds.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds.stderr b/tests/ui/traits/const-traits/const-trait-bounds.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds.stderr rename to tests/ui/traits/const-traits/const-trait-bounds.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-gate.rs b/tests/ui/traits/const-traits/const_derives/derive-const-gate.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-gate.rs rename to tests/ui/traits/const-traits/const_derives/derive-const-gate.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-gate.stderr b/tests/ui/traits/const-traits/const_derives/derive-const-gate.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-gate.stderr rename to tests/ui/traits/const-traits/const_derives/derive-const-gate.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.rs b/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.rs rename to tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.stderr b/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.stderr rename to tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.rs b/tests/ui/traits/const-traits/const_derives/derive-const-use.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.rs rename to tests/ui/traits/const-traits/const_derives/derive-const-use.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.stderr b/tests/ui/traits/const-traits/const_derives/derive-const-use.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.stderr rename to tests/ui/traits/const-traits/const_derives/derive-const-use.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.rs b/tests/ui/traits/const-traits/const_derives/derive-const-with-params.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.rs rename to tests/ui/traits/const-traits/const_derives/derive-const-with-params.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.stderr b/tests/ui/traits/const-traits/const_derives/derive-const-with-params.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.stderr rename to tests/ui/traits/const-traits/const_derives/derive-const-with-params.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate-default-method-body-is-const.rs b/tests/ui/traits/const-traits/cross-crate-default-method-body-is-const.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate-default-method-body-is-const.rs rename to tests/ui/traits/const-traits/cross-crate-default-method-body-is-const.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.gatednc.stderr b/tests/ui/traits/const-traits/cross-crate.gatednc.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.gatednc.stderr rename to tests/ui/traits/const-traits/cross-crate.gatednc.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.rs b/tests/ui/traits/const-traits/cross-crate.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.rs rename to tests/ui/traits/const-traits/cross-crate.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.stock.stderr b/tests/ui/traits/const-traits/cross-crate.stock.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.stock.stderr rename to tests/ui/traits/const-traits/cross-crate.stock.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.stocknc.stderr b/tests/ui/traits/const-traits/cross-crate.stocknc.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.stocknc.stderr rename to tests/ui/traits/const-traits/cross-crate.stocknc.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs b/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs rename to tests/ui/traits/const-traits/default-method-body-is-const-body-checking.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.rs b/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.rs rename to tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.stderr b/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.stderr rename to tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-with-staged-api.rs b/tests/ui/traits/const-traits/default-method-body-is-const-with-staged-api.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-with-staged-api.rs rename to tests/ui/traits/const-traits/default-method-body-is-const-with-staged-api.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/do-not-const-check-override.rs b/tests/ui/traits/const-traits/do-not-const-check-override.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/do-not-const-check-override.rs rename to tests/ui/traits/const-traits/do-not-const-check-override.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/do-not-const-check.rs b/tests/ui/traits/const-traits/do-not-const-check.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/do-not-const-check.rs rename to tests/ui/traits/const-traits/do-not-const-check.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/auxiliary/cross-crate.rs b/tests/ui/traits/const-traits/effects/auxiliary/cross-crate.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/auxiliary/cross-crate.rs rename to tests/ui/traits/const-traits/effects/auxiliary/cross-crate.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.rs b/tests/ui/traits/const-traits/effects/const_closure-const_trait_impl-ice-113381.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.rs rename to tests/ui/traits/const-traits/effects/const_closure-const_trait_impl-ice-113381.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/effect-param-infer.rs b/tests/ui/traits/const-traits/effects/effect-param-infer.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/effect-param-infer.rs rename to tests/ui/traits/const-traits/effects/effect-param-infer.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/fallback.rs b/tests/ui/traits/const-traits/effects/fallback.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/fallback.rs rename to tests/ui/traits/const-traits/effects/fallback.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/group-traits.rs b/tests/ui/traits/const-traits/effects/group-traits.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/group-traits.rs rename to tests/ui/traits/const-traits/effects/group-traits.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/helloworld.rs b/tests/ui/traits/const-traits/effects/helloworld.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/helloworld.rs rename to tests/ui/traits/const-traits/effects/helloworld.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.rs b/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.rs rename to tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.stderr b/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.stderr rename to tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs b/tests/ui/traits/const-traits/effects/ice-113375-index-out-of-bounds-generics.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs rename to tests/ui/traits/const-traits/effects/ice-113375-index-out-of-bounds-generics.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/infer-fallback.rs b/tests/ui/traits/const-traits/effects/infer-fallback.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/infer-fallback.rs rename to tests/ui/traits/const-traits/effects/infer-fallback.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs b/tests/ui/traits/const-traits/effects/minicore.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs rename to tests/ui/traits/const-traits/effects/minicore.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.stderr b/tests/ui/traits/const-traits/effects/minicore.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.stderr rename to tests/ui/traits/const-traits/effects/minicore.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/mismatched_generic_args.rs b/tests/ui/traits/const-traits/effects/mismatched_generic_args.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/mismatched_generic_args.rs rename to tests/ui/traits/const-traits/effects/mismatched_generic_args.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/mismatched_generic_args.stderr b/tests/ui/traits/const-traits/effects/mismatched_generic_args.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/mismatched_generic_args.stderr rename to tests/ui/traits/const-traits/effects/mismatched_generic_args.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.rs b/tests/ui/traits/const-traits/effects/no-explicit-const-params-cross-crate.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.rs rename to tests/ui/traits/const-traits/effects/no-explicit-const-params-cross-crate.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.stderr b/tests/ui/traits/const-traits/effects/no-explicit-const-params-cross-crate.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.stderr rename to tests/ui/traits/const-traits/effects/no-explicit-const-params-cross-crate.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.rs b/tests/ui/traits/const-traits/effects/no-explicit-const-params.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.rs rename to tests/ui/traits/const-traits/effects/no-explicit-const-params.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.stderr b/tests/ui/traits/const-traits/effects/no-explicit-const-params.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.stderr rename to tests/ui/traits/const-traits/effects/no-explicit-const-params.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.rs b/tests/ui/traits/const-traits/effects/project.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.rs rename to tests/ui/traits/const-traits/effects/project.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/span-bug-issue-121418.rs b/tests/ui/traits/const-traits/effects/span-bug-issue-121418.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/span-bug-issue-121418.rs rename to tests/ui/traits/const-traits/effects/span-bug-issue-121418.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/span-bug-issue-121418.stderr b/tests/ui/traits/const-traits/effects/span-bug-issue-121418.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/span-bug-issue-121418.stderr rename to tests/ui/traits/const-traits/effects/span-bug-issue-121418.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/spec-effectvar-ice.rs b/tests/ui/traits/const-traits/effects/spec-effectvar-ice.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/spec-effectvar-ice.rs rename to tests/ui/traits/const-traits/effects/spec-effectvar-ice.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/spec-effectvar-ice.stderr b/tests/ui/traits/const-traits/effects/spec-effectvar-ice.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/spec-effectvar-ice.stderr rename to tests/ui/traits/const-traits/effects/spec-effectvar-ice.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/trait-fn-const.rs b/tests/ui/traits/const-traits/effects/trait-fn-const.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/trait-fn-const.rs rename to tests/ui/traits/const-traits/effects/trait-fn-const.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/trait-fn-const.stderr b/tests/ui/traits/const-traits/effects/trait-fn-const.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/trait-fn-const.stderr rename to tests/ui/traits/const-traits/effects/trait-fn-const.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/with-without-next-solver.coherence.stderr b/tests/ui/traits/const-traits/effects/with-without-next-solver.coherence.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/with-without-next-solver.coherence.stderr rename to tests/ui/traits/const-traits/effects/with-without-next-solver.coherence.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/with-without-next-solver.rs b/tests/ui/traits/const-traits/effects/with-without-next-solver.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/with-without-next-solver.rs rename to tests/ui/traits/const-traits/effects/with-without-next-solver.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/with-without-next-solver.stock.stderr b/tests/ui/traits/const-traits/effects/with-without-next-solver.stock.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/with-without-next-solver.stock.stderr rename to tests/ui/traits/const-traits/effects/with-without-next-solver.stock.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.gated.stderr b/tests/ui/traits/const-traits/feature-gate.gated.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.gated.stderr rename to tests/ui/traits/const-traits/feature-gate.gated.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.rs b/tests/ui/traits/const-traits/feature-gate.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.rs rename to tests/ui/traits/const-traits/feature-gate.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.stock.stderr b/tests/ui/traits/const-traits/feature-gate.stock.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.stock.stderr rename to tests/ui/traits/const-traits/feature-gate.stock.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/function-pointer-does-not-require-const.rs b/tests/ui/traits/const-traits/function-pointer-does-not-require-const.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/function-pointer-does-not-require-const.rs rename to tests/ui/traits/const-traits/function-pointer-does-not-require-const.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/gate.rs b/tests/ui/traits/const-traits/gate.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/gate.rs rename to tests/ui/traits/const-traits/gate.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/gate.stderr b/tests/ui/traits/const-traits/gate.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/gate.stderr rename to tests/ui/traits/const-traits/gate.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/generic-bound.rs b/tests/ui/traits/const-traits/generic-bound.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/generic-bound.rs rename to tests/ui/traits/const-traits/generic-bound.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/generic-bound.stderr b/tests/ui/traits/const-traits/generic-bound.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/generic-bound.stderr rename to tests/ui/traits/const-traits/generic-bound.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/hir-const-check.rs b/tests/ui/traits/const-traits/hir-const-check.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/hir-const-check.rs rename to tests/ui/traits/const-traits/hir-const-check.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/hir-const-check.stderr b/tests/ui/traits/const-traits/hir-const-check.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/hir-const-check.stderr rename to tests/ui/traits/const-traits/hir-const-check.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/ice-119717-constant-lifetime.rs b/tests/ui/traits/const-traits/ice-119717-constant-lifetime.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/ice-119717-constant-lifetime.rs rename to tests/ui/traits/const-traits/ice-119717-constant-lifetime.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/ice-119717-constant-lifetime.stderr b/tests/ui/traits/const-traits/ice-119717-constant-lifetime.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/ice-119717-constant-lifetime.stderr rename to tests/ui/traits/const-traits/ice-119717-constant-lifetime.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/ice-120503-async-const-method.rs b/tests/ui/traits/const-traits/ice-120503-async-const-method.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/ice-120503-async-const-method.rs rename to tests/ui/traits/const-traits/ice-120503-async-const-method.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/ice-120503-async-const-method.stderr b/tests/ui/traits/const-traits/ice-120503-async-const-method.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/ice-120503-async-const-method.stderr rename to tests/ui/traits/const-traits/ice-120503-async-const-method.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/ice-121536-const-method.rs b/tests/ui/traits/const-traits/ice-121536-const-method.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/ice-121536-const-method.rs rename to tests/ui/traits/const-traits/ice-121536-const-method.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/ice-121536-const-method.stderr b/tests/ui/traits/const-traits/ice-121536-const-method.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/ice-121536-const-method.stderr rename to tests/ui/traits/const-traits/ice-121536-const-method.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/ice-123664-unexpected-bound-var.rs b/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/ice-123664-unexpected-bound-var.rs rename to tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/ice-123664-unexpected-bound-var.stderr b/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/ice-123664-unexpected-bound-var.stderr rename to tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/ice-124857-combine-effect-const-infer-vars.rs b/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/ice-124857-combine-effect-const-infer-vars.rs rename to tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/ice-124857-combine-effect-const-infer-vars.stderr b/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/ice-124857-combine-effect-const-infer-vars.stderr rename to tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/ice-126148-failed-to-normalize.rs b/tests/ui/traits/const-traits/ice-126148-failed-to-normalize.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/ice-126148-failed-to-normalize.rs rename to tests/ui/traits/const-traits/ice-126148-failed-to-normalize.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/ice-126148-failed-to-normalize.stderr b/tests/ui/traits/const-traits/ice-126148-failed-to-normalize.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/ice-126148-failed-to-normalize.stderr rename to tests/ui/traits/const-traits/ice-126148-failed-to-normalize.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-tilde-const-trait.rs b/tests/ui/traits/const-traits/impl-tilde-const-trait.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/impl-tilde-const-trait.rs rename to tests/ui/traits/const-traits/impl-tilde-const-trait.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-tilde-const-trait.stderr b/tests/ui/traits/const-traits/impl-tilde-const-trait.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/impl-tilde-const-trait.stderr rename to tests/ui/traits/const-traits/impl-tilde-const-trait.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-with-default-fn-fail.rs b/tests/ui/traits/const-traits/impl-with-default-fn-fail.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/impl-with-default-fn-fail.rs rename to tests/ui/traits/const-traits/impl-with-default-fn-fail.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-with-default-fn-fail.stderr b/tests/ui/traits/const-traits/impl-with-default-fn-fail.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/impl-with-default-fn-fail.stderr rename to tests/ui/traits/const-traits/impl-with-default-fn-fail.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-with-default-fn-pass.rs b/tests/ui/traits/const-traits/impl-with-default-fn-pass.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/impl-with-default-fn-pass.rs rename to tests/ui/traits/const-traits/impl-with-default-fn-pass.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/inherent-impl-const-bounds.rs b/tests/ui/traits/const-traits/inherent-impl-const-bounds.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/inherent-impl-const-bounds.rs rename to tests/ui/traits/const-traits/inherent-impl-const-bounds.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/inherent-impl.rs b/tests/ui/traits/const-traits/inherent-impl.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/inherent-impl.rs rename to tests/ui/traits/const-traits/inherent-impl.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/inherent-impl.stderr b/tests/ui/traits/const-traits/inherent-impl.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/inherent-impl.stderr rename to tests/ui/traits/const-traits/inherent-impl.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/inline-incorrect-early-bound-in-ctfe.rs b/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/inline-incorrect-early-bound-in-ctfe.rs rename to tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/inline-incorrect-early-bound-in-ctfe.stderr b/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/inline-incorrect-early-bound-in-ctfe.stderr rename to tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-100222.rs b/tests/ui/traits/const-traits/issue-100222.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/issue-100222.rs rename to tests/ui/traits/const-traits/issue-100222.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102156.rs b/tests/ui/traits/const-traits/issue-102156.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102156.rs rename to tests/ui/traits/const-traits/issue-102156.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102156.stderr b/tests/ui/traits/const-traits/issue-102156.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102156.stderr rename to tests/ui/traits/const-traits/issue-102156.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.rs b/tests/ui/traits/const-traits/issue-102985.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.rs rename to tests/ui/traits/const-traits/issue-102985.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.stderr b/tests/ui/traits/const-traits/issue-102985.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.stderr rename to tests/ui/traits/const-traits/issue-102985.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-103677.rs b/tests/ui/traits/const-traits/issue-103677.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/issue-103677.rs rename to tests/ui/traits/const-traits/issue-103677.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-79450.rs b/tests/ui/traits/const-traits/issue-79450.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/issue-79450.rs rename to tests/ui/traits/const-traits/issue-79450.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-79450.stderr b/tests/ui/traits/const-traits/issue-79450.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/issue-79450.stderr rename to tests/ui/traits/const-traits/issue-79450.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.rs b/tests/ui/traits/const-traits/issue-88155.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.rs rename to tests/ui/traits/const-traits/issue-88155.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.stderr b/tests/ui/traits/const-traits/issue-88155.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.stderr rename to tests/ui/traits/const-traits/issue-88155.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.rs b/tests/ui/traits/const-traits/issue-92111.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.rs rename to tests/ui/traits/const-traits/issue-92111.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.stderr b/tests/ui/traits/const-traits/issue-92111.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.stderr rename to tests/ui/traits/const-traits/issue-92111.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92230-wf-super-trait-env.rs b/tests/ui/traits/const-traits/issue-92230-wf-super-trait-env.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92230-wf-super-trait-env.rs rename to tests/ui/traits/const-traits/issue-92230-wf-super-trait-env.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.gated.stderr b/tests/ui/traits/const-traits/match-non-const-eq.gated.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.gated.stderr rename to tests/ui/traits/const-traits/match-non-const-eq.gated.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.rs b/tests/ui/traits/const-traits/match-non-const-eq.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.rs rename to tests/ui/traits/const-traits/match-non-const-eq.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.stock.stderr b/tests/ui/traits/const-traits/match-non-const-eq.stock.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.stock.stderr rename to tests/ui/traits/const-traits/match-non-const-eq.stock.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-bare-trait-objects-const-trait-bounds.rs b/tests/ui/traits/const-traits/mbe-bare-trait-objects-const-trait-bounds.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-bare-trait-objects-const-trait-bounds.rs rename to tests/ui/traits/const-traits/mbe-bare-trait-objects-const-trait-bounds.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-const-trait-bound-theoretical-regression.rs b/tests/ui/traits/const-traits/mbe-const-trait-bound-theoretical-regression.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-const-trait-bound-theoretical-regression.rs rename to tests/ui/traits/const-traits/mbe-const-trait-bound-theoretical-regression.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-const-trait-bound-theoretical-regression.stderr b/tests/ui/traits/const-traits/mbe-const-trait-bound-theoretical-regression.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-const-trait-bound-theoretical-regression.stderr rename to tests/ui/traits/const-traits/mbe-const-trait-bound-theoretical-regression.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-dyn-const-2015.rs b/tests/ui/traits/const-traits/mbe-dyn-const-2015.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-dyn-const-2015.rs rename to tests/ui/traits/const-traits/mbe-dyn-const-2015.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/mutually-exclusive-trait-bound-modifiers.rs b/tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/mutually-exclusive-trait-bound-modifiers.rs rename to tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/mutually-exclusive-trait-bound-modifiers.stderr b/tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/mutually-exclusive-trait-bound-modifiers.stderr rename to tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/nested-closure.rs b/tests/ui/traits/const-traits/nested-closure.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/nested-closure.rs rename to tests/ui/traits/const-traits/nested-closure.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-const-closure-non-const-outer.rs b/tests/ui/traits/const-traits/non-const-op-const-closure-non-const-outer.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-const-closure-non-const-outer.rs rename to tests/ui/traits/const-traits/non-const-op-const-closure-non-const-outer.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-const-closure-non-const-outer.stderr b/tests/ui/traits/const-traits/non-const-op-const-closure-non-const-outer.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-const-closure-non-const-outer.stderr rename to tests/ui/traits/const-traits/non-const-op-const-closure-non-const-outer.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.rs b/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.rs rename to tests/ui/traits/const-traits/non-const-op-in-closure-in-const.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.stderr b/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.stderr rename to tests/ui/traits/const-traits/non-const-op-in-closure-in-const.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs b/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs rename to tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.stderr b/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.stderr rename to tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-const-specialized.rs b/tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-const-specialized.rs rename to tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-const-specialized.stderr b/tests/ui/traits/const-traits/specialization/const-default-const-specialized.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-const-specialized.stderr rename to tests/ui/traits/const-traits/specialization/const-default-const-specialized.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-impl-non-const-specialized-impl.rs b/tests/ui/traits/const-traits/specialization/const-default-impl-non-const-specialized-impl.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-impl-non-const-specialized-impl.rs rename to tests/ui/traits/const-traits/specialization/const-default-impl-non-const-specialized-impl.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-impl-non-const-specialized-impl.stderr b/tests/ui/traits/const-traits/specialization/const-default-impl-non-const-specialized-impl.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-impl-non-const-specialized-impl.stderr rename to tests/ui/traits/const-traits/specialization/const-default-impl-non-const-specialized-impl.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/default-keyword.rs b/tests/ui/traits/const-traits/specialization/default-keyword.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/default-keyword.rs rename to tests/ui/traits/const-traits/specialization/default-keyword.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/default-keyword.stderr b/tests/ui/traits/const-traits/specialization/default-keyword.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/default-keyword.stderr rename to tests/ui/traits/const-traits/specialization/default-keyword.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95186-specialize-on-tilde-const.rs b/tests/ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95186-specialize-on-tilde-const.rs rename to tests/ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95186-specialize-on-tilde-const.stderr b/tests/ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95186-specialize-on-tilde-const.stderr rename to tests/ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.rs b/tests/ui/traits/const-traits/specialization/issue-95187-same-trait-bound-different-constness.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.rs rename to tests/ui/traits/const-traits/specialization/issue-95187-same-trait-bound-different-constness.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.stderr b/tests/ui/traits/const-traits/specialization/issue-95187-same-trait-bound-different-constness.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.stderr rename to tests/ui/traits/const-traits/specialization/issue-95187-same-trait-bound-different-constness.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/non-const-default-const-specialized.rs b/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/non-const-default-const-specialized.rs rename to tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/non-const-default-const-specialized.stderr b/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/non-const-default-const-specialized.stderr rename to tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.rs b/tests/ui/traits/const-traits/specializing-constness-2.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.rs rename to tests/ui/traits/const-traits/specializing-constness-2.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.stderr b/tests/ui/traits/const-traits/specializing-constness-2.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.stderr rename to tests/ui/traits/const-traits/specializing-constness-2.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness.rs b/tests/ui/traits/const-traits/specializing-constness.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness.rs rename to tests/ui/traits/const-traits/specializing-constness.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness.stderr b/tests/ui/traits/const-traits/specializing-constness.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness.stderr rename to tests/ui/traits/const-traits/specializing-constness.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate.rs b/tests/ui/traits/const-traits/staged-api-user-crate.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate.rs rename to tests/ui/traits/const-traits/staged-api-user-crate.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate.stderr b/tests/ui/traits/const-traits/staged-api-user-crate.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate.stderr rename to tests/ui/traits/const-traits/staged-api-user-crate.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api.rs b/tests/ui/traits/const-traits/staged-api.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api.rs rename to tests/ui/traits/const-traits/staged-api.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api.stable.stderr b/tests/ui/traits/const-traits/staged-api.stable.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api.stable.stderr rename to tests/ui/traits/const-traits/staged-api.stable.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api.unstable.stderr b/tests/ui/traits/const-traits/staged-api.unstable.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api.unstable.stderr rename to tests/ui/traits/const-traits/staged-api.unstable.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/static-const-trait-bound.rs b/tests/ui/traits/const-traits/static-const-trait-bound.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/static-const-trait-bound.rs rename to tests/ui/traits/const-traits/static-const-trait-bound.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.gated.stderr b/tests/ui/traits/const-traits/std-impl-gate.gated.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.gated.stderr rename to tests/ui/traits/const-traits/std-impl-gate.gated.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.rs b/tests/ui/traits/const-traits/std-impl-gate.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.rs rename to tests/ui/traits/const-traits/std-impl-gate.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.stock.stderr b/tests/ui/traits/const-traits/std-impl-gate.stock.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.stock.stderr rename to tests/ui/traits/const-traits/std-impl-gate.stock.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr b/tests/ui/traits/const-traits/super-traits-fail-2.nn.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr rename to tests/ui/traits/const-traits/super-traits-fail-2.nn.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.ny.stderr b/tests/ui/traits/const-traits/super-traits-fail-2.ny.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.ny.stderr rename to tests/ui/traits/const-traits/super-traits-fail-2.ny.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.rs b/tests/ui/traits/const-traits/super-traits-fail-2.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.rs rename to tests/ui/traits/const-traits/super-traits-fail-2.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr b/tests/ui/traits/const-traits/super-traits-fail-2.yn.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr rename to tests/ui/traits/const-traits/super-traits-fail-2.yn.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yy.stderr b/tests/ui/traits/const-traits/super-traits-fail-2.yy.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yy.stderr rename to tests/ui/traits/const-traits/super-traits-fail-2.yy.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.nn.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr rename to tests/ui/traits/const-traits/super-traits-fail-3.nn.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.ny.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.ny.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.ny.stderr rename to tests/ui/traits/const-traits/super-traits-fail-3.ny.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs b/tests/ui/traits/const-traits/super-traits-fail-3.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs rename to tests/ui/traits/const-traits/super-traits-fail-3.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.yn.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr rename to tests/ui/traits/const-traits/super-traits-fail-3.yn.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail.rs b/tests/ui/traits/const-traits/super-traits-fail.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail.rs rename to tests/ui/traits/const-traits/super-traits-fail.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail.stderr b/tests/ui/traits/const-traits/super-traits-fail.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail.stderr rename to tests/ui/traits/const-traits/super-traits-fail.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits.rs b/tests/ui/traits/const-traits/super-traits.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits.rs rename to tests/ui/traits/const-traits/super-traits.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/syntax.rs b/tests/ui/traits/const-traits/syntax.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/syntax.rs rename to tests/ui/traits/const-traits/syntax.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-and-const-params.rs b/tests/ui/traits/const-traits/tilde-const-and-const-params.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-and-const-params.rs rename to tests/ui/traits/const-traits/tilde-const-and-const-params.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-and-const-params.stderr b/tests/ui/traits/const-traits/tilde-const-and-const-params.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-and-const-params.stderr rename to tests/ui/traits/const-traits/tilde-const-and-const-params.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-assoc-fn-in-trait-impl.rs b/tests/ui/traits/const-traits/tilde-const-assoc-fn-in-trait-impl.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-assoc-fn-in-trait-impl.rs rename to tests/ui/traits/const-traits/tilde-const-assoc-fn-in-trait-impl.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-inherent-assoc-const-fn.rs b/tests/ui/traits/const-traits/tilde-const-inherent-assoc-const-fn.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-inherent-assoc-const-fn.rs rename to tests/ui/traits/const-traits/tilde-const-inherent-assoc-const-fn.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.rs b/tests/ui/traits/const-traits/tilde-const-invalid-places.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.rs rename to tests/ui/traits/const-traits/tilde-const-invalid-places.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr b/tests/ui/traits/const-traits/tilde-const-invalid-places.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr rename to tests/ui/traits/const-traits/tilde-const-invalid-places.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-syntax.rs b/tests/ui/traits/const-traits/tilde-const-syntax.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-syntax.rs rename to tests/ui/traits/const-traits/tilde-const-syntax.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-trait-assoc-tys.rs b/tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-trait-assoc-tys.rs rename to tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-twice.rs b/tests/ui/traits/const-traits/tilde-twice.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-twice.rs rename to tests/ui/traits/const-traits/tilde-twice.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-twice.stderr b/tests/ui/traits/const-traits/tilde-twice.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-twice.stderr rename to tests/ui/traits/const-traits/tilde-twice.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-default-body-stability.rs b/tests/ui/traits/const-traits/trait-default-body-stability.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/trait-default-body-stability.rs rename to tests/ui/traits/const-traits/trait-default-body-stability.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-default-body-stability.stderr b/tests/ui/traits/const-traits/trait-default-body-stability.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/trait-default-body-stability.stderr rename to tests/ui/traits/const-traits/trait-default-body-stability.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-method-ptr-in-consts-ice.rs b/tests/ui/traits/const-traits/trait-method-ptr-in-consts-ice.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/trait-method-ptr-in-consts-ice.rs rename to tests/ui/traits/const-traits/trait-method-ptr-in-consts-ice.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.rs b/tests/ui/traits/const-traits/trait-where-clause-const.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.rs rename to tests/ui/traits/const-traits/trait-where-clause-const.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr b/tests/ui/traits/const-traits/trait-where-clause-const.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr rename to tests/ui/traits/const-traits/trait-where-clause-const.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-run.rs b/tests/ui/traits/const-traits/trait-where-clause-run.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-run.rs rename to tests/ui/traits/const-traits/trait-where-clause-run.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-self-referential.rs b/tests/ui/traits/const-traits/trait-where-clause-self-referential.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-self-referential.rs rename to tests/ui/traits/const-traits/trait-where-clause-self-referential.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause.rs b/tests/ui/traits/const-traits/trait-where-clause.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause.rs rename to tests/ui/traits/const-traits/trait-where-clause.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause.stderr b/tests/ui/traits/const-traits/trait-where-clause.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause.stderr rename to tests/ui/traits/const-traits/trait-where-clause.stderr diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.rs b/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.rs rename to tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr b/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.stderr similarity index 100% rename from tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr rename to tests/ui/traits/const-traits/unsatisfied-const-trait-bound.stderr diff --git a/triagebot.toml b/triagebot.toml index 74caa036ae67c..17ce4cf32a212 100644 --- a/triagebot.toml +++ b/triagebot.toml @@ -1081,7 +1081,7 @@ project-const-traits = [ project-stable-mir = [ "@celinval", "@oli-obk", - "@ouz-a", + "@scottmcm", ] project-exploit-mitigations = [