From f42fb435179a01bef886bd187576e73bad35e289 Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Fri, 7 Jun 2024 21:00:07 +0200 Subject: [PATCH 1/8] Call the target libdir target libdir Because it's the target libdir. `--print` uses the same terminology, and it's a simple way to make it obviously different from `$sysroot/lib`. --- src/bootstrap/src/core/build_steps/check.rs | 8 ++-- src/bootstrap/src/core/build_steps/compile.rs | 41 +++++++++++-------- src/bootstrap/src/core/build_steps/dist.rs | 6 ++- src/bootstrap/src/core/build_steps/test.rs | 10 ++--- src/bootstrap/src/core/build_steps/tool.rs | 2 +- src/bootstrap/src/core/builder/mod.rs | 4 +- 6 files changed, 41 insertions(+), 30 deletions(-) diff --git a/src/bootstrap/src/core/build_steps/check.rs b/src/bootstrap/src/core/build_steps/check.rs index f419bebdc1263..d46c0ab7fefcf 100644 --- a/src/bootstrap/src/core/build_steps/check.rs +++ b/src/bootstrap/src/core/build_steps/check.rs @@ -91,8 +91,8 @@ impl Step for Std { // We skip populating the sysroot in non-zero stage because that'll lead // to rlib/rmeta conflicts if std gets built during this session. if compiler.stage == 0 { - let libdir = builder.sysroot_libdir(compiler, target); - let hostdir = builder.sysroot_libdir(compiler, compiler.host); + let libdir = builder.sysroot_target_libdir(compiler, target); + let hostdir = builder.sysroot_target_libdir(compiler, compiler.host); add_to_sysroot(builder, &libdir, &hostdir, &libstd_stamp(builder, compiler, target)); } drop(_guard); @@ -257,8 +257,8 @@ impl Step for Rustc { false, ); - let libdir = builder.sysroot_libdir(compiler, target); - let hostdir = builder.sysroot_libdir(compiler, compiler.host); + let libdir = builder.sysroot_target_libdir(compiler, target); + let hostdir = builder.sysroot_target_libdir(compiler, compiler.host); add_to_sysroot(builder, &libdir, &hostdir, &librustc_stamp(builder, compiler, target)); } } diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs index 4ab4e60773f1e..9ddcde7eb2cfc 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs @@ -220,7 +220,7 @@ impl Step for Std { .join("bin"); if src_sysroot_bin.exists() { let target_sysroot_bin = - builder.sysroot_libdir(compiler, target).parent().unwrap().join("bin"); + builder.sysroot_target_libdir(compiler, target).parent().unwrap().join("bin"); t!(fs::create_dir_all(&target_sysroot_bin)); builder.cp_link_r(&src_sysroot_bin, &target_sysroot_bin); } @@ -334,7 +334,7 @@ fn copy_third_party_objects( && (target.contains("linux") || target.contains("fuchsia")) { let libunwind_path = - copy_llvm_libunwind(builder, target, &builder.sysroot_libdir(*compiler, target)); + copy_llvm_libunwind(builder, target, &builder.sysroot_target_libdir(*compiler, target)); target_deps.push((libunwind_path, DependencyType::Target)); } @@ -347,7 +347,8 @@ fn copy_self_contained_objects( compiler: &Compiler, target: TargetSelection, ) -> Vec<(PathBuf, DependencyType)> { - let libdir_self_contained = builder.sysroot_libdir(*compiler, target).join("self-contained"); + let libdir_self_contained = + builder.sysroot_target_libdir(*compiler, target).join("self-contained"); t!(fs::create_dir_all(&libdir_self_contained)); let mut target_deps = vec![]; @@ -655,8 +656,8 @@ impl Step for StdLink { let hostdir = sysroot.join(lib).join("rustlib").join(compiler.host).join("lib"); (libdir, hostdir) } else { - let libdir = builder.sysroot_libdir(target_compiler, target); - let hostdir = builder.sysroot_libdir(target_compiler, compiler.host); + let libdir = builder.sysroot_target_libdir(target_compiler, target); + let hostdir = builder.sysroot_target_libdir(target_compiler, compiler.host); (libdir, hostdir) }; @@ -723,7 +724,7 @@ fn copy_sanitizers( } let mut target_deps = Vec::new(); - let libdir = builder.sysroot_libdir(*compiler, target); + let libdir = builder.sysroot_target_libdir(*compiler, target); for runtime in &runtimes { let dst = libdir.join(&runtime.name); @@ -801,7 +802,7 @@ impl Step for StartupObjects { let src_dir = &builder.src.join("library").join("rtstartup"); let dst_dir = &builder.native_dir(target).join("rtstartup"); - let sysroot_dir = &builder.sysroot_libdir(for_compiler, target); + let sysroot_dir = &builder.sysroot_target_libdir(for_compiler, target); t!(fs::create_dir_all(dst_dir)); for file in &["rsbegin", "rsend"] { @@ -1287,10 +1288,17 @@ fn rustc_llvm_env(builder: &Builder<'_>, cargo: &mut Cargo, target: TargetSelect } } +/// `RustcLink` copies all of the rlibs from the rustc build into the previous stage's sysroot. +/// This is necessary for tools using `rustc_private`, where the previous compiler will build +/// a tool against the next compiler. +/// To build a tool against a compiler, the rlibs of that compiler that it links against +/// must be in the sysroot of the compiler that's doing the compiling. #[derive(Debug, Clone, PartialEq, Eq, Hash)] struct RustcLink { + /// The compiler whose rlibs we are copying around. pub compiler: Compiler, - pub target_compiler: Compiler, + /// This is the compiler into whose sysroot we want to copy the rlibs into. + pub previous_stage_compiler: Compiler, pub target: TargetSelection, /// Not actually used; only present to make sure the cache invalidation is correct. crates: Vec, @@ -1300,7 +1308,7 @@ impl RustcLink { fn from_rustc(rustc: Rustc, host_compiler: Compiler) -> Self { Self { compiler: host_compiler, - target_compiler: rustc.compiler, + previous_stage_compiler: rustc.compiler, target: rustc.target, crates: rustc.crates, } @@ -1317,12 +1325,12 @@ impl Step for RustcLink { /// Same as `std_link`, only for librustc fn run(self, builder: &Builder<'_>) { let compiler = self.compiler; - let target_compiler = self.target_compiler; + let previous_stage_compiler = self.previous_stage_compiler; let target = self.target; add_to_sysroot( builder, - &builder.sysroot_libdir(target_compiler, target), - &builder.sysroot_libdir(target_compiler, compiler.host), + &builder.sysroot_target_libdir(previous_stage_compiler, target), + &builder.sysroot_target_libdir(previous_stage_compiler, compiler.host), &librustc_stamp(builder, compiler, target), ); } @@ -1770,7 +1778,7 @@ impl Step for Assemble { // We prepend this bin directory to the user PATH when linking Rust binaries. To // avoid shadowing the system LLD we rename the LLD we provide to `rust-lld`. - let libdir = builder.sysroot_libdir(target_compiler, target_compiler.host); + let libdir = builder.sysroot_target_libdir(target_compiler, target_compiler.host); let libdir_bin = libdir.parent().unwrap().join("bin"); t!(fs::create_dir_all(&libdir_bin)); @@ -1854,8 +1862,9 @@ impl Step for Assemble { if let Some(enzyme_install) = enzyme_install { let lib_ext = std::env::consts::DLL_EXTENSION; let src_lib = enzyme_install.join("build/Enzyme/libEnzyme-19").with_extension(lib_ext); - let libdir = builder.sysroot_libdir(build_compiler, build_compiler.host); - let target_libdir = builder.sysroot_libdir(target_compiler, target_compiler.host); + let libdir = builder.sysroot_target_libdir(build_compiler, build_compiler.host); + let target_libdir = + builder.sysroot_target_libdir(target_compiler, target_compiler.host); let dst_lib = libdir.join("libEnzyme-19").with_extension(lib_ext); let target_dst_lib = target_libdir.join("libEnzyme-19").with_extension(lib_ext); builder.copy_link(&src_lib, &dst_lib); @@ -1923,7 +1932,7 @@ impl Step for Assemble { let sysroot = builder.sysroot(target_compiler); let rustc_libdir = builder.rustc_libdir(target_compiler); t!(fs::create_dir_all(&rustc_libdir)); - let src_libdir = builder.sysroot_libdir(build_compiler, host); + let src_libdir = builder.sysroot_target_libdir(build_compiler, host); for f in builder.read_dir(&src_libdir) { let filename = f.file_name().into_string().unwrap(); diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs index 80ba9f4444863..759e720c208d8 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs @@ -459,7 +459,8 @@ impl Step for Rustc { // Copy over lld if it's there if builder.config.lld_enabled { - let src_dir = builder.sysroot_libdir(compiler, host).parent().unwrap().join("bin"); + let src_dir = + builder.sysroot_target_libdir(compiler, host).parent().unwrap().join("bin"); let rust_lld = exe("rust-lld", compiler.host); builder.copy_link(&src_dir.join(&rust_lld), &dst_dir.join(&rust_lld)); let self_contained_lld_src_dir = src_dir.join("gcc-ld"); @@ -474,7 +475,8 @@ impl Step for Rustc { } } if builder.tool_enabled("wasm-component-ld") { - let src_dir = builder.sysroot_libdir(compiler, host).parent().unwrap().join("bin"); + let src_dir = + builder.sysroot_target_libdir(compiler, host).parent().unwrap().join("bin"); let ld = exe("wasm-component-ld", compiler.host); builder.copy_link(&src_dir.join(&ld), &dst_dir.join(&ld)); } diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 0a290a697e617..bcce2748c2ee5 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -800,7 +800,7 @@ impl Step for RustdocTheme { .arg(builder.src.join("src/librustdoc/html/static/css/rustdoc.css").to_str().unwrap()) .env("RUSTC_STAGE", self.compiler.stage.to_string()) .env("RUSTC_SYSROOT", builder.sysroot(self.compiler)) - .env("RUSTDOC_LIBDIR", builder.sysroot_libdir(self.compiler, self.compiler.host)) + .env("RUSTDOC_LIBDIR", builder.sysroot_target_libdir(self.compiler, self.compiler.host)) .env("CFG_RELEASE_CHANNEL", &builder.config.channel) .env("RUSTDOC_REAL", builder.rustdoc(self.compiler)) .env("RUSTC_BOOTSTRAP", "1"); @@ -1722,7 +1722,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the // of them! cmd.arg("--compile-lib-path").arg(builder.rustc_libdir(compiler)); - cmd.arg("--run-lib-path").arg(builder.sysroot_libdir(compiler, target)); + cmd.arg("--run-lib-path").arg(builder.sysroot_target_libdir(compiler, target)); cmd.arg("--rustc-path").arg(builder.rustc(compiler)); // Minicore auxiliary lib for `no_core` tests that need `core` stubs in cross-compilation @@ -2583,7 +2583,7 @@ fn prepare_cargo_test( // by `Cargo::new` and that actually makes things go wrong. if builder.kind != Kind::Miri { let mut dylib_path = dylib_path(); - dylib_path.insert(0, PathBuf::from(&*builder.sysroot_libdir(compiler, target))); + dylib_path.insert(0, PathBuf::from(&*builder.sysroot_target_libdir(compiler, target))); cargo.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap()); } @@ -2818,7 +2818,7 @@ impl Step for CrateRustdoc { let libdir = if builder.download_rustc() { builder.rustc_libdir(compiler) } else { - builder.sysroot_libdir(compiler, target).to_path_buf() + builder.sysroot_target_libdir(compiler, target).to_path_buf() }; let mut dylib_path = dylib_path(); dylib_path.insert(0, PathBuf::from(&*libdir)); @@ -2943,7 +2943,7 @@ impl Step for RemoteCopyLibs { cmd.run(builder); // Push all our dylibs to the emulator - for f in t!(builder.sysroot_libdir(compiler, target).read_dir()) { + for f in t!(builder.sysroot_target_libdir(compiler, target).read_dir()) { let f = t!(f); let name = f.file_name().into_string().unwrap(); if helpers::is_dylib(&name) { diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs index bb837eb81379a..3cfbef27f87ad 100644 --- a/src/bootstrap/src/core/build_steps/tool.rs +++ b/src/bootstrap/src/core/build_steps/tool.rs @@ -466,7 +466,7 @@ impl ErrorIndex { let compiler = builder.compiler_for(builder.top_stage, host, host); let mut cmd = command(builder.ensure(ErrorIndex { compiler })); let mut dylib_paths = builder.rustc_lib_paths(compiler); - dylib_paths.push(PathBuf::from(&builder.sysroot_libdir(compiler, compiler.host))); + dylib_paths.push(PathBuf::from(&builder.sysroot_target_libdir(compiler, compiler.host))); add_dylib_path(dylib_paths, &mut cmd); cmd } diff --git a/src/bootstrap/src/core/builder/mod.rs b/src/bootstrap/src/core/builder/mod.rs index 8f8ab1128574c..19472bac4af85 100644 --- a/src/bootstrap/src/core/builder/mod.rs +++ b/src/bootstrap/src/core/builder/mod.rs @@ -1163,7 +1163,7 @@ impl<'a> Builder<'a> { /// Returns the libdir where the standard library and other artifacts are /// found for a compiler's sysroot. - pub fn sysroot_libdir(&self, compiler: Compiler, target: TargetSelection) -> PathBuf { + pub fn sysroot_target_libdir(&self, compiler: Compiler, target: TargetSelection) -> PathBuf { #[derive(Debug, Clone, Hash, PartialEq, Eq)] struct Libdir { compiler: Compiler, @@ -1211,7 +1211,7 @@ impl<'a> Builder<'a> { } pub fn sysroot_codegen_backends(&self, compiler: Compiler) -> PathBuf { - self.sysroot_libdir(compiler, compiler.host).with_file_name("codegen-backends") + self.sysroot_target_libdir(compiler, compiler.host).with_file_name("codegen-backends") } /// Returns the compiler's libdir where it stores the dynamic libraries that From be3a635fe777d4aac653994749ad47e650e71c1e Mon Sep 17 00:00:00 2001 From: klensy Date: Sat, 2 Nov 2024 15:08:53 +0300 Subject: [PATCH 2/8] replace manual time convertions with std ones --- compiler/rustc_incremental/src/persist/fs.rs | 18 ++++++------------ .../rustc_query_system/src/dep_graph/graph.rs | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/compiler/rustc_incremental/src/persist/fs.rs b/compiler/rustc_incremental/src/persist/fs.rs index 8769c4173c886..f6c3e8ebbcbd9 100644 --- a/compiler/rustc_incremental/src/persist/fs.rs +++ b/compiler/rustc_incremental/src/persist/fs.rs @@ -585,23 +585,17 @@ fn extract_timestamp_from_session_dir(directory_name: &str) -> Result BaseNString { let duration = timestamp.duration_since(UNIX_EPOCH).unwrap(); - let micros = duration.as_secs() * 1_000_000 + (duration.subsec_nanos() as u64) / 1000; + let micros: u64 = duration.as_micros().try_into().unwrap(); micros.to_base_fixed_len(CASE_INSENSITIVE) } fn string_to_timestamp(s: &str) -> Result { - let micros_since_unix_epoch = u64::from_str_radix(s, INT_ENCODE_BASE as u32); - - if micros_since_unix_epoch.is_err() { - return Err("timestamp not an int"); - } - - let micros_since_unix_epoch = micros_since_unix_epoch.unwrap(); + let micros_since_unix_epoch = match u64::from_str_radix(s, INT_ENCODE_BASE as u32) { + Ok(micros) => micros, + Err(_) => return Err("timestamp not an int"), + }; - let duration = Duration::new( - micros_since_unix_epoch / 1_000_000, - 1000 * (micros_since_unix_epoch % 1_000_000) as u32, - ); + let duration = Duration::from_micros(micros_since_unix_epoch); Ok(UNIX_EPOCH + duration) } diff --git a/compiler/rustc_query_system/src/dep_graph/graph.rs b/compiler/rustc_query_system/src/dep_graph/graph.rs index 5e30f17d6269a..e7ed828849953 100644 --- a/compiler/rustc_query_system/src/dep_graph/graph.rs +++ b/compiler/rustc_query_system/src/dep_graph/graph.rs @@ -1098,7 +1098,7 @@ impl CurrentDepGraph { use std::time::{SystemTime, UNIX_EPOCH}; let duration = SystemTime::now().duration_since(UNIX_EPOCH).unwrap(); - let nanos = duration.as_secs() * 1_000_000_000 + duration.subsec_nanos() as u64; + let nanos = duration.as_nanos(); let mut stable_hasher = StableHasher::new(); nanos.hash(&mut stable_hasher); let anon_id_seed = stable_hasher.finish(); From bc1d8e72e793c61c4c22867e0802835178b8a309 Mon Sep 17 00:00:00 2001 From: klensy Date: Sat, 2 Nov 2024 15:20:11 +0300 Subject: [PATCH 3/8] make time format parsing compiletime --- compiler/rustc_driver_impl/Cargo.toml | 2 +- compiler/rustc_driver_impl/src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_driver_impl/Cargo.toml b/compiler/rustc_driver_impl/Cargo.toml index ef577c0321899..74da0d11e4ba6 100644 --- a/compiler/rustc_driver_impl/Cargo.toml +++ b/compiler/rustc_driver_impl/Cargo.toml @@ -49,7 +49,7 @@ rustc_trait_selection = { path = "../rustc_trait_selection" } rustc_ty_utils = { path = "../rustc_ty_utils" } serde_json = "1.0.59" shlex = "1.0" -time = { version = "0.3.36", default-features = false, features = ["alloc", "formatting", "parsing", "macros"] } +time = { version = "0.3.36", default-features = false, features = ["alloc", "formatting", "macros"] } tracing = { version = "0.1.35" } # tidy-alphabetical-end diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index 4362007d4bae3..d2c4335cf2b44 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -64,6 +64,7 @@ use rustc_span::source_map::FileLoader; use rustc_target::json::ToJson; use rustc_target::spec::{Target, TargetTuple}; use time::OffsetDateTime; +use time::macros::format_description; use tracing::trace; #[allow(unused_macros)] @@ -1356,8 +1357,7 @@ fn ice_path_with_config(config: Option<&UnstableOptions>) -> &'static Option Date: Sun, 3 Nov 2024 18:26:01 +0000 Subject: [PATCH 4/8] Reduce dependence on the target name The target name can be anything with custom target specs. Matching on fields inside the target spec is much more robust than matching on the target name. --- compiler/rustc_codegen_gcc/src/consts.rs | 2 +- compiler/rustc_codegen_llvm/src/back/write.rs | 29 ++++++------------- compiler/rustc_codegen_ssa/src/back/link.rs | 7 ++--- compiler/rustc_codegen_ssa/src/back/linker.rs | 1 + compiler/rustc_codegen_ssa/src/back/write.rs | 4 +++ 5 files changed, 17 insertions(+), 26 deletions(-) diff --git a/compiler/rustc_codegen_gcc/src/consts.rs b/compiler/rustc_codegen_gcc/src/consts.rs index 660badb6a5018..07c7a54de1cec 100644 --- a/compiler/rustc_codegen_gcc/src/consts.rs +++ b/compiler/rustc_codegen_gcc/src/consts.rs @@ -146,7 +146,7 @@ impl<'gcc, 'tcx> StaticCodegenMethods for CodegenCx<'gcc, 'tcx> { // Wasm statics with custom link sections get special treatment as they // go into custom sections of the wasm executable. - if self.tcx.sess.opts.target_triple.tuple().starts_with("wasm32") { + if self.tcx.sess.target.is_like_wasm { if let Some(_section) = attrs.link_section { unimplemented!(); } diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs index 647e9e13fbcb6..a65ae4df1e378 100644 --- a/compiler/rustc_codegen_llvm/src/back/write.rs +++ b/compiler/rustc_codegen_llvm/src/back/write.rs @@ -945,23 +945,10 @@ fn create_section_with_flags_asm(section_name: &str, section_flags: &str, data: asm } -fn target_is_apple(cgcx: &CodegenContext) -> bool { - let triple = cgcx.opts.target_triple.tuple(); - triple.contains("-ios") - || triple.contains("-darwin") - || triple.contains("-tvos") - || triple.contains("-watchos") - || triple.contains("-visionos") -} - -fn target_is_aix(cgcx: &CodegenContext) -> bool { - cgcx.opts.target_triple.tuple().contains("-aix") -} - pub(crate) fn bitcode_section_name(cgcx: &CodegenContext) -> &'static CStr { - if target_is_apple(cgcx) { + if cgcx.target_is_like_osx { c"__LLVM,__bitcode" - } else if target_is_aix(cgcx) { + } else if cgcx.target_is_like_aix { c".ipa" } else { c".llvmbc" @@ -1028,10 +1015,12 @@ unsafe fn embed_bitcode( // Unfortunately, LLVM provides no way to set custom section flags. For ELF // and COFF we emit the sections using module level inline assembly for that // reason (see issue #90326 for historical background). - let is_aix = target_is_aix(cgcx); - let is_apple = target_is_apple(cgcx); unsafe { - if is_apple || is_aix || cgcx.opts.target_triple.tuple().starts_with("wasm") { + if cgcx.target_is_like_osx + || cgcx.target_is_like_aix + || cgcx.target_arch == "wasm32" + || cgcx.target_arch == "wasm64" + { // We don't need custom section flags, create LLVM globals. let llconst = common::bytes_in_context(llcx, bitcode); let llglobal = llvm::LLVMAddGlobal( @@ -1052,9 +1041,9 @@ unsafe fn embed_bitcode( c"rustc.embedded.cmdline".as_ptr(), ); llvm::LLVMSetInitializer(llglobal, llconst); - let section = if is_apple { + let section = if cgcx.target_is_like_osx { c"__LLVM,__cmdline" - } else if is_aix { + } else if cgcx.target_is_like_aix { c".info" } else { c".llvmcmd" diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index 20920d16f3cea..39ff00baf6dc6 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -85,11 +85,7 @@ pub fn link_binary( } if invalid_output_for_target(sess, crate_type) { - bug!( - "invalid output type `{:?}` for target os `{}`", - crate_type, - sess.opts.target_triple - ); + bug!("invalid output type `{:?}` for target `{}`", crate_type, sess.opts.target_triple); } sess.time("link_binary_check_files_are_writeable", || { @@ -996,6 +992,7 @@ fn link_natively( && (code < 1000 || code > 9999) { let is_vs_installed = windows_registry::find_vs_version().is_ok(); + // FIXME(cc-rs#1265) pass only target arch to find_tool() let has_linker = windows_registry::find_tool( sess.opts.target_triple.tuple(), "link.exe", diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs index 3b4429535d434..4f3664a503d61 100644 --- a/compiler/rustc_codegen_ssa/src/back/linker.rs +++ b/compiler/rustc_codegen_ssa/src/back/linker.rs @@ -47,6 +47,7 @@ pub(crate) fn get_linker<'a>( self_contained: bool, target_cpu: &'a str, ) -> Box { + // FIXME(cc-rs#1265) pass only target arch to find_tool() let msvc_tool = windows_registry::find_tool(sess.opts.target_triple.tuple(), "link.exe"); // If our linker looks like a batch script on Windows then to execute this diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs index d977cca247eea..a2285bf9204a4 100644 --- a/compiler/rustc_codegen_ssa/src/back/write.rs +++ b/compiler/rustc_codegen_ssa/src/back/write.rs @@ -345,6 +345,8 @@ pub struct CodegenContext { pub is_pe_coff: bool, pub target_can_use_split_dwarf: bool, pub target_arch: String, + pub target_is_like_osx: bool, + pub target_is_like_aix: bool, pub split_debuginfo: rustc_target::spec::SplitDebuginfo, pub split_dwarf_kind: rustc_session::config::SplitDwarfKind, @@ -1195,6 +1197,8 @@ fn start_executing_work( is_pe_coff: tcx.sess.target.is_like_windows, target_can_use_split_dwarf: tcx.sess.target_can_use_split_dwarf(), target_arch: tcx.sess.target.arch.to_string(), + target_is_like_osx: tcx.sess.target.is_like_osx, + target_is_like_aix: tcx.sess.target.is_like_aix, split_debuginfo: tcx.sess.split_debuginfo(), split_dwarf_kind: tcx.sess.opts.unstable_opts.split_dwarf_kind, parallel: backend.supports_parallel() && !sess.opts.unstable_opts.no_parallel_backend, From dc4ad44618ab48fea2f3835f90b8e4b1525cdbec Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sun, 3 Nov 2024 18:31:32 +0000 Subject: [PATCH 5/8] Remove is_builtin target spec field It is unused. --- compiler/rustc_target/src/spec/mod.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 06408e0b210fb..cef11fe1c9e80 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -1595,11 +1595,10 @@ macro_rules! supported_targets { pub const TARGETS: &[&str] = &[$($tuple),+]; fn load_builtin(target: &str) -> Option { - let mut t = match target { + let t = match target { $( $tuple => targets::$module::target(), )+ _ => return None, }; - t.is_builtin = true; debug!("got builtin target: {:?}", t); Some(t) } @@ -2128,9 +2127,6 @@ type StaticCow = Cow<'static, T>; /// through `Deref` impls. #[derive(PartialEq, Clone, Debug)] pub struct TargetOptions { - /// Whether the target is built-in or loaded from a custom target specification. - pub is_builtin: bool, - /// Used as the `target_endian` `cfg` variable. Defaults to little endian. pub endian: Endian, /// Width of c_int type. Defaults to "32". @@ -2606,7 +2602,6 @@ impl Default for TargetOptions { /// incomplete, and if used for compilation, will certainly not work. fn default() -> TargetOptions { TargetOptions { - is_builtin: false, endian: Endian::Little, c_int_width: "32".into(), os: "none".into(), @@ -3349,7 +3344,6 @@ impl Target { } } - key!(is_builtin, bool); key!(c_int_width = "target-c-int-width"); key!(c_enum_min_bits, Option); // if None, matches c_int_width key!(os); @@ -3462,10 +3456,6 @@ impl Target { key!(entry_abi, Conv)?; key!(supports_xray, bool); - if base.is_builtin { - // This can cause unfortunate ICEs later down the line. - return Err("may not set is_builtin for targets not built-in".into()); - } base.update_from_cli(); // Each field should have been read using `Json::remove` so any keys remaining are unused. @@ -3635,7 +3625,6 @@ impl ToJson for Target { target_val!(arch); target_val!(data_layout); - target_option_val!(is_builtin); target_option_val!(endian, "target-endian"); target_option_val!(c_int_width, "target-c-int-width"); target_option_val!(os); From ace9e4c078ee91dc2e809cc563776ddadefddf44 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Wed, 30 Oct 2024 17:42:31 +0000 Subject: [PATCH 6/8] Gate checking ~const bounds on const_trait_impl --- .../src/check_consts/check.rs | 12 ++--- compiler/rustc_hir_typeck/src/callee.rs | 2 +- .../ui/specialization/const_trait_impl.stderr | 51 +------------------ .../call-const-trait-method-pass.stderr | 26 +--------- .../const-traits/const-drop-fail-2.stderr | 30 ++++------- .../const-traits/const-drop.precise.stderr | 18 ++----- .../const-traits/const-drop.stock.stderr | 18 ++----- ...-method-body-is-const-body-checking.stderr | 6 --- .../const-default-const-specialized.rs | 3 +- .../const-default-const-specialized.stderr | 15 ------ .../non-const-default-const-specialized.rs | 4 +- ...non-const-default-const-specialized.stderr | 15 ------ .../specializing-constness-2.stderr | 17 +------ 13 files changed, 26 insertions(+), 191 deletions(-) diff --git a/compiler/rustc_const_eval/src/check_consts/check.rs b/compiler/rustc_const_eval/src/check_consts/check.rs index 303c490d82753..4583712c2c75a 100644 --- a/compiler/rustc_const_eval/src/check_consts/check.rs +++ b/compiler/rustc_const_eval/src/check_consts/check.rs @@ -20,7 +20,6 @@ use rustc_mir_dataflow::Analysis; use rustc_mir_dataflow::impls::MaybeStorageLive; use rustc_mir_dataflow::storage::always_storage_live_locals; use rustc_span::{Span, Symbol, sym}; -use rustc_trait_selection::error_reporting::InferCtxtErrorExt; use rustc_trait_selection::traits::{ Obligation, ObligationCause, ObligationCauseCode, ObligationCtxt, }; @@ -419,13 +418,8 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> { let errors = ocx.select_all_or_error(); if !errors.is_empty() { - // FIXME(effects): Soon this should be unconditionally delaying a bug. - if matches!(call_source, CallSource::Normal) && tcx.features().effects() { - tcx.dcx() - .span_delayed_bug(call_span, "this should have reported a ~const error in HIR"); - } else { - infcx.err_ctxt().report_fulfillment_errors(errors); - } + tcx.dcx() + .span_delayed_bug(call_span, "this should have reported a ~const error in HIR"); } } } @@ -664,7 +658,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> { // so we only error if the trait isn't const. We try to resolve the trait // into the concrete method, and uses that for const stability checks. // FIXME(effects) we might consider moving const stability checks to typeck as well. - if tcx.features().effects() && trait_is_const { + if tcx.features().const_trait_impl() && trait_is_const { // This skips the check below that ensures we only call `const fn`. is_trait = true; diff --git a/compiler/rustc_hir_typeck/src/callee.rs b/compiler/rustc_hir_typeck/src/callee.rs index f9a21a9bef31d..481a5f3a921d9 100644 --- a/compiler/rustc_hir_typeck/src/callee.rs +++ b/compiler/rustc_hir_typeck/src/callee.rs @@ -847,7 +847,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { // This can be done as soon as we convert the standard library back to // using const traits, since if we were to enforce these conditions now, // we'd fail on basically every builtin trait call (i.e. `1 + 2`). - if !self.tcx.features().effects() { + if !self.tcx.features().const_trait_impl() { return; } diff --git a/tests/ui/specialization/const_trait_impl.stderr b/tests/ui/specialization/const_trait_impl.stderr index 40ac350980ef6..607fc06823e42 100644 --- a/tests/ui/specialization/const_trait_impl.stderr +++ b/tests/ui/specialization/const_trait_impl.stderr @@ -40,54 +40,5 @@ LL | impl const A for T { | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error[E0015]: cannot call non-const fn `<() as A>::a` in constants - --> $DIR/const_trait_impl.rs:52:23 - | -LL | const _: () = assert!(<()>::a() == 42); - | ^^^^^^^^^ - | - = note: calls in constants are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - -error[E0015]: cannot call non-const fn `::a` in constants - --> $DIR/const_trait_impl.rs:53:23 - | -LL | const _: () = assert!(::a() == 3); - | ^^^^^^^^^ - | - = note: calls in constants are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - -error[E0015]: cannot call non-const fn `::a` in constants - --> $DIR/const_trait_impl.rs:54:23 - | -LL | const _: () = assert!(::a() == 2); - | ^^^^^^^^^^ - | - = note: calls in constants are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - -error[E0015]: cannot call non-const fn `::foo` in constant functions - --> $DIR/const_trait_impl.rs:48:9 - | -LL | T::foo() - | ^^^^^^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - -error: aborting due to 10 previous errors +error: aborting due to 6 previous errors -For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/call-const-trait-method-pass.stderr b/tests/ui/traits/const-traits/call-const-trait-method-pass.stderr index 32f53137a00e6..9ae1ed18e3511 100644 --- a/tests/ui/traits/const-traits/call-const-trait-method-pass.stderr +++ b/tests/ui/traits/const-traits/call-const-trait-method-pass.stderr @@ -24,18 +24,6 @@ LL | const ADD_INT: Int = Int(1i32) + Int(2i32); | = note: calls in constants are limited to constant functions, tuple structs and tuple variants -error[E0015]: cannot call non-const fn `::plus` in constant functions - --> $DIR/call-const-trait-method-pass.rs:11:20 - | -LL | Int(self.0.plus(rhs.0)) - | ^^^^^^^^^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - error[E0015]: cannot call non-const fn `::eq` in constant functions --> $DIR/call-const-trait-method-pass.rs:20:15 | @@ -44,18 +32,6 @@ LL | !self.eq(other) | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -error[E0015]: cannot call non-const fn `::plus` in constant functions - --> $DIR/call-const-trait-method-pass.rs:36:7 - | -LL | a.plus(b) - | ^^^^^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - -error: aborting due to 6 previous errors +error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/const-drop-fail-2.stderr b/tests/ui/traits/const-traits/const-drop-fail-2.stderr index 102dbb1a5999e..fde106599c236 100644 --- a/tests/ui/traits/const-traits/const-drop-fail-2.stderr +++ b/tests/ui/traits/const-traits/const-drop-fail-2.stderr @@ -21,33 +21,21 @@ LL | const fn check(_: T) {} | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error[E0493]: destructor of `T` cannot be evaluated at compile-time - --> $DIR/const-drop-fail-2.rs:20:36 - | -LL | const fn check(_: T) {} - | ^ - value is dropped here - | | - | the destructor for this type cannot be evaluated in constant functions - error[E0277]: the trait bound `T: ~const A` is not satisfied --> $DIR/const-drop-fail-2.rs:41:9 | LL | T::a(); | ^^^^^^ -error[E0015]: cannot call non-const fn `::a` in constant functions - --> $DIR/const-drop-fail-2.rs:41:9 - | -LL | T::a(); - | ^^^^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] +error[E0493]: destructor of `T` cannot be evaluated at compile-time + --> $DIR/const-drop-fail-2.rs:20:36 | +LL | const fn check(_: T) {} + | ^ - value is dropped here + | | + | the destructor for this type cannot be evaluated in constant functions -error: aborting due to 6 previous errors +error: aborting due to 5 previous errors -Some errors have detailed explanations: E0015, E0277, E0493. -For more information about an error, try `rustc --explain E0015`. +Some errors have detailed explanations: E0277, E0493. +For more information about an error, try `rustc --explain E0277`. diff --git a/tests/ui/traits/const-traits/const-drop.precise.stderr b/tests/ui/traits/const-traits/const-drop.precise.stderr index 7471b200c3378..ed90b234761ad 100644 --- a/tests/ui/traits/const-traits/const-drop.precise.stderr +++ b/tests/ui/traits/const-traits/const-drop.precise.stderr @@ -84,19 +84,7 @@ error[E0277]: the trait bound `T: ~const SomeTrait` is not satisfied LL | T::foo(); | ^^^^^^^^ -error[E0015]: cannot call non-const fn `::foo` in constant functions - --> $DIR/const-drop.rs:69:13 - | -LL | T::foo(); - | ^^^^^^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - -error: aborting due to 11 previous errors +error: aborting due to 10 previous errors -Some errors have detailed explanations: E0015, E0277, E0493. -For more information about an error, try `rustc --explain E0015`. +Some errors have detailed explanations: E0277, E0493. +For more information about an error, try `rustc --explain E0277`. diff --git a/tests/ui/traits/const-traits/const-drop.stock.stderr b/tests/ui/traits/const-traits/const-drop.stock.stderr index 7137834916167..2b46b048e9095 100644 --- a/tests/ui/traits/const-traits/const-drop.stock.stderr +++ b/tests/ui/traits/const-traits/const-drop.stock.stderr @@ -86,19 +86,7 @@ error[E0277]: the trait bound `T: ~const SomeTrait` is not satisfied LL | T::foo(); | ^^^^^^^^ -error[E0015]: cannot call non-const fn `::foo` in constant functions - --> $DIR/const-drop.rs:69:13 - | -LL | T::foo(); - | ^^^^^^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - -error: aborting due to 11 previous errors +error: aborting due to 10 previous errors -Some errors have detailed explanations: E0015, E0277, E0493. -For more information about an error, try `rustc --explain E0015`. +Some errors have detailed explanations: E0277, E0493. +For more information about an error, try `rustc --explain E0277`. diff --git a/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.stderr b/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.stderr index 308a60c08d316..0534f3eb8d292 100644 --- a/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.stderr +++ b/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.stderr @@ -3,12 +3,6 @@ error[E0277]: the trait bound `(): ~const Tr` is not satisfied | LL | foo::<()>(); | ^^^^^^^^^^^ - | -note: required by a bound in `foo` - --> $DIR/default-method-body-is-const-body-checking.rs:7:28 - | -LL | const fn foo() where T: ~const Tr {} - | ^^^^^^ required by this bound in `foo` error: aborting due to 1 previous error diff --git a/tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs b/tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs index a48a50b9e5ce4..89ad61c3c31c4 100644 --- a/tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs +++ b/tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs @@ -1,8 +1,7 @@ // Tests that a const default trait impl can be specialized by another const // trait impl and that the specializing impl will be used during const-eval. -//@ known-bug: #110395 -// FIXME(effects) run-pass +//@ run-pass #![feature(const_trait_impl)] #![feature(min_specialization)] diff --git a/tests/ui/traits/const-traits/specialization/const-default-const-specialized.stderr b/tests/ui/traits/const-traits/specialization/const-default-const-specialized.stderr index f127268d2a1c9..e69de29bb2d1d 100644 --- a/tests/ui/traits/const-traits/specialization/const-default-const-specialized.stderr +++ b/tests/ui/traits/const-traits/specialization/const-default-const-specialized.stderr @@ -1,15 +0,0 @@ -error[E0015]: cannot call non-const fn `::value` in constant functions - --> $DIR/const-default-const-specialized.rs:16:5 - | -LL | T::value() - | ^^^^^^^^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs b/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs index 912b35095f918..e9b494bc2c0d9 100644 --- a/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs +++ b/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs @@ -1,7 +1,7 @@ // Tests that a non-const default impl can be specialized by a const trait impl, // but that the default impl cannot be used in a const context. -//@ known-bug: #110395 -// FIXME(effects) run-pass + +//@ run-pass #![feature(const_trait_impl)] #![feature(min_specialization)] diff --git a/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.stderr b/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.stderr index a4095d7e8ce56..e69de29bb2d1d 100644 --- a/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.stderr +++ b/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.stderr @@ -1,15 +0,0 @@ -error[E0015]: cannot call non-const fn `::value` in constant functions - --> $DIR/non-const-default-const-specialized.rs:15:5 - | -LL | T::value() - | ^^^^^^^^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/specializing-constness-2.stderr b/tests/ui/traits/const-traits/specializing-constness-2.stderr index 98a9de2324af1..4ad5e3157d4f8 100644 --- a/tests/ui/traits/const-traits/specializing-constness-2.stderr +++ b/tests/ui/traits/const-traits/specializing-constness-2.stderr @@ -4,19 +4,6 @@ error[E0277]: the trait bound `T: ~const A` is not satisfied LL | ::a(); | ^^^^^^^^^^^^^ -error[E0015]: cannot call non-const fn `::a` in constant functions - --> $DIR/specializing-constness-2.rs:27:5 - | -LL | ::a(); - | ^^^^^^^^^^^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -help: add `#![feature(effects)]` to the crate attributes to enable - | -LL + #![feature(effects)] - | - -error: aborting due to 2 previous errors +error: aborting due to 1 previous error -Some errors have detailed explanations: E0015, E0277. -For more information about an error, try `rustc --explain E0015`. +For more information about this error, try `rustc --explain E0277`. From 0b5ddf30ebb097d0c46975cfb2a9ee9b04805af2 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Wed, 30 Oct 2024 18:03:44 +0000 Subject: [PATCH 7/8] Yeet effects feature --- compiler/rustc_feature/src/removed.rs | 3 ++ compiler/rustc_feature/src/unstable.rs | 2 - tests/crashes/112623.rs | 2 +- tests/crashes/119701.rs | 2 +- tests/crashes/121411.rs | 2 +- tests/rustdoc/const-effect-param.rs | 3 +- tests/rustdoc/const-fn-effects.rs | 2 - .../auxiliary/const-effect-param.rs | 3 +- tests/rustdoc/rfc-2632-const-trait-impl.rs | 3 +- .../const_trait_fn-issue-88433.rs | 3 +- .../unify-op-with-fn-call.rs | 2 +- .../unify-op-with-fn-call.stderr | 2 +- tests/ui/const-generics/issues/issue-88119.rs | 2 +- .../const-generics/issues/issue-88119.stderr | 6 +-- .../auxiliary/closure-in-foreign-crate.rs | 3 +- tests/ui/consts/const-try.rs | 3 +- tests/ui/consts/const-try.stderr | 8 ++-- tests/ui/consts/const_cmp_type_id.rs | 3 +- tests/ui/consts/const_cmp_type_id.stderr | 6 +-- .../constifconst-call-in-const-position.rs | 2 +- tests/ui/consts/rustc-impl-const-stability.rs | 3 +- .../consts/rustc-impl-const-stability.stderr | 2 +- tests/ui/delegation/unsupported.rs | 1 - tests/ui/delegation/unsupported.stderr | 36 +++++++------- tests/ui/dropck/const_drop_is_valid.rs | 3 -- tests/ui/dropck/const_drop_is_valid.stderr | 17 ++----- .../generic-const-items/const-trait-impl.rs | 2 +- .../ui/intrinsics/safe-intrinsic-mismatch.rs | 7 --- ....stderr => safe-intrinsic-mismatch.stderr} | 12 ++--- .../safe-intrinsic-mismatch.stock.stderr | 47 ------------------- .../impls-nested-within-fns-semantic-1.rs | 3 +- .../missing-const-stability.rs | 2 +- .../missing-const-stability.stderr | 11 +---- .../assoc-type-const-bound-usage-0.rs | 3 +- .../assoc-type-const-bound-usage-1.rs | 2 +- .../assoc-type-const-bound-usage-1.stderr | 6 +-- .../assoc-type-const-bound-usage-fail-2.rs | 3 +- ...assoc-type-const-bound-usage-fail-2.stderr | 4 +- .../assoc-type-const-bound-usage-fail.rs | 3 +- .../assoc-type-const-bound-usage-fail.stderr | 4 +- tests/ui/traits/const-traits/assoc-type.rs | 2 +- .../ui/traits/const-traits/assoc-type.stderr | 11 +---- .../const-traits/auxiliary/cross-crate.rs | 3 +- .../const-traits/auxiliary/staged-api.rs | 3 +- .../traits/const-traits/call-const-closure.rs | 2 +- .../const-traits/call-const-in-tilde-const.rs | 3 +- .../call-const-in-tilde-const.stderr | 13 +---- .../call-const-trait-method-fail.rs | 3 +- .../call-const-trait-method-fail.stderr | 2 +- .../const-traits/call-generic-method-chain.rs | 2 +- .../call-generic-method-chain.stderr | 11 +---- .../call-generic-method-dup-bound.rs | 2 +- .../call-generic-method-dup-bound.stderr | 11 +---- .../const-traits/call-generic-method-fail.rs | 3 +- .../call-generic-method-fail.stderr | 2 +- .../call-generic-method-nonconst.rs | 3 +- .../call-generic-method-nonconst.stderr | 2 +- .../const-traits/call-generic-method-pass.rs | 2 +- .../call-generic-method-pass.stderr | 11 +---- tests/ui/traits/const-traits/call.rs | 2 +- .../const-traits/const-bound-in-host.rs | 3 +- .../const-traits/const-bound-in-host.stderr | 11 ----- .../const-bound-on-not-const-associated-fn.rs | 3 +- ...st-bound-on-not-const-associated-fn.stderr | 8 ++-- .../const-bounds-non-const-trait.rs | 2 +- .../const-bounds-non-const-trait.stderr | 11 +---- .../const-check-fns-in-const-impl.rs | 2 +- .../const-check-fns-in-const-impl.stderr | 11 +---- .../const-default-method-bodies.rs | 3 +- .../const-default-method-bodies.stderr | 2 +- .../const-impl-requires-const-trait.rs | 3 +- .../const-impl-requires-const-trait.stderr | 2 +- .../traits/const-traits/const-in-closure.rs | 3 +- .../const-traits/const-in-closure.stderr | 11 ----- .../traits/const-traits/const-trait-bounds.rs | 2 +- .../const-traits/const-trait-bounds.stderr | 6 +-- .../derive-const-non-const-type.rs | 2 +- .../derive-const-non-const-type.stderr | 11 +---- .../const_derives/derive-const-use.rs | 2 +- .../const_derives/derive-const-use.stderr | 15 ++---- .../const_derives/derive-const-with-params.rs | 2 +- .../derive-const-with-params.stderr | 11 +---- ...ross-crate-default-method-body-is-const.rs | 3 +- tests/ui/traits/const-traits/cross-crate.rs | 2 +- ...ault-method-body-is-const-same-trait-ck.rs | 3 +- ...-method-body-is-const-same-trait-ck.stderr | 2 +- .../do-not-const-check-override.rs | 2 +- .../traits/const-traits/do-not-const-check.rs | 3 +- .../const-traits/do-not-const-check.stderr | 11 ----- .../const-traits/dont-observe-host-opaque.rs | 3 +- .../dont-observe-host-opaque.stderr | 11 ----- .../traits/const-traits/dont-observe-host.rs | 3 +- .../const-traits/dont-observe-host.stderr | 11 ----- .../effects/auxiliary/cross-crate.rs | 3 +- ...nst_closure-const_trait_impl-ice-113381.rs | 2 +- .../effects/effect-param-infer.rs | 3 +- .../traits/const-traits/effects/fallback.rs | 2 - .../traits/const-traits/effects/helloworld.rs | 33 ------------- .../ice-112822-expected-type-for-param.rs | 2 +- .../ice-112822-expected-type-for-param.stderr | 11 +---- ...ice-113375-index-out-of-bounds-generics.rs | 2 +- .../const-traits/effects/infer-fallback.rs | 3 +- .../traits/const-traits/effects/minicore.rs | 15 ++++-- ...o-explicit-const-params-cross-crate.stderr | 8 ++-- .../effects/no-explicit-const-params.rs | 2 +- .../effects/no-explicit-const-params.stderr | 11 +---- .../ui/traits/const-traits/effects/project.rs | 3 +- .../effects/span-bug-issue-121418.rs | 1 - .../effects/span-bug-issue-121418.stderr | 17 ++----- .../effects/spec-effectvar-ice.rs | 1 - .../effects/spec-effectvar-ice.stderr | 23 +++------ .../const-traits/effects/trait-fn-const.rs | 2 +- .../effects/trait-fn-const.stderr | 11 +---- tests/ui/traits/const-traits/fn-ptr-lub.rs | 3 +- .../ui/traits/const-traits/fn-ptr-lub.stderr | 11 ----- .../ui/traits/const-traits/hir-const-check.rs | 2 +- .../const-traits/hir-const-check.stderr | 11 +---- .../ice-119717-constant-lifetime.rs | 2 +- .../ice-120503-async-const-method.rs | 1 - .../ice-120503-async-const-method.stderr | 21 +++------ .../const-traits/ice-121536-const-method.rs | 2 +- .../ice-121536-const-method.stderr | 11 +---- .../ice-123664-unexpected-bound-var.rs | 2 +- ...-124857-combine-effect-const-infer-vars.rs | 3 +- ...857-combine-effect-const-infer-vars.stderr | 2 +- .../ice-126148-failed-to-normalize.rs | 2 +- .../const-traits/impl-with-default-fn-fail.rs | 3 +- .../impl-with-default-fn-fail.stderr | 2 +- .../const-traits/impl-with-default-fn-pass.rs | 3 +- .../inline-incorrect-early-bound-in-ctfe.rs | 3 +- ...nline-incorrect-early-bound-in-ctfe.stderr | 15 ++---- tests/ui/traits/const-traits/issue-100222.rs | 2 +- tests/ui/traits/const-traits/issue-79450.rs | 3 +- .../ui/traits/const-traits/issue-79450.stderr | 2 +- .../issue-92230-wf-super-trait-env.rs | 3 +- .../item-bound-entailment-fails.rs | 3 +- .../item-bound-entailment-fails.stderr | 19 ++------ .../const-traits/item-bound-entailment.rs | 3 +- .../const-traits/item-bound-entailment.stderr | 11 ----- .../predicate-entailment-fails.rs | 3 +- .../predicate-entailment-fails.stderr | 23 +++------ .../predicate-entailment-passes.rs | 3 +- .../predicate-entailment-passes.stderr | 11 ----- .../const-default-const-specialized.stderr | 0 ...default-impl-non-const-specialized-impl.rs | 2 +- ...ult-impl-non-const-specialized-impl.stderr | 11 +---- ...non-const-default-const-specialized.stderr | 0 .../const-traits/specializing-constness.rs | 2 +- .../specializing-constness.stderr | 11 +---- tests/ui/traits/const-traits/staged-api.rs | 3 +- .../const-traits/staged-api.stable.stderr | 20 ++++---- .../const-traits/staged-api.unstable.stderr | 14 +++--- .../super-traits-fail-2.nn.stderr | 12 ++--- .../super-traits-fail-2.ny.stderr | 12 ++--- .../const-traits/super-traits-fail-2.rs | 3 +- .../super-traits-fail-2.yn.stderr | 6 +-- .../super-traits-fail-2.yy.stderr | 2 +- .../super-traits-fail-3.nn.stderr | 16 +++---- .../super-traits-fail-3.ny.stderr | 12 ++--- .../const-traits/super-traits-fail-3.rs | 3 +- .../super-traits-fail-3.yn.stderr | 10 ++-- .../traits/const-traits/super-traits-fail.rs | 3 +- .../const-traits/super-traits-fail.stderr | 2 +- tests/ui/traits/const-traits/super-traits.rs | 3 +- .../tilde-const-and-const-params.rs | 2 +- .../tilde-const-assoc-fn-in-trait-impl.rs | 3 +- .../tilde-const-in-struct-args.rs | 2 +- .../tilde-const-in-struct-args.stderr | 11 ----- .../tilde-const-inherent-assoc-const-fn.rs | 3 +- .../tilde-const-trait-assoc-tys.rs | 3 +- .../trait-default-body-stability.rs | 2 +- .../const-traits/trait-where-clause-const.rs | 3 +- .../trait-where-clause-const.stderr | 4 +- .../const-traits/trait-where-clause-run.rs | 3 +- .../trait-where-clause-self-referential.rs | 3 +- .../unsatisfied-const-trait-bound.rs | 2 +- .../unsatisfied-const-trait-bound.stderr | 6 +-- .../next-solver/canonical/effect-var.rs | 1 - .../next-solver/canonical/effect-var.stderr | 11 ----- 179 files changed, 286 insertions(+), 766 deletions(-) rename tests/ui/intrinsics/{safe-intrinsic-mismatch.effects.stderr => safe-intrinsic-mismatch.stderr} (86%) delete mode 100644 tests/ui/intrinsics/safe-intrinsic-mismatch.stock.stderr delete mode 100644 tests/ui/traits/const-traits/const-bound-in-host.stderr delete mode 100644 tests/ui/traits/const-traits/const-in-closure.stderr delete mode 100644 tests/ui/traits/const-traits/do-not-const-check.stderr delete mode 100644 tests/ui/traits/const-traits/dont-observe-host-opaque.stderr delete mode 100644 tests/ui/traits/const-traits/dont-observe-host.stderr delete mode 100644 tests/ui/traits/const-traits/effects/helloworld.rs delete mode 100644 tests/ui/traits/const-traits/fn-ptr-lub.stderr delete mode 100644 tests/ui/traits/const-traits/item-bound-entailment.stderr delete mode 100644 tests/ui/traits/const-traits/predicate-entailment-passes.stderr delete mode 100644 tests/ui/traits/const-traits/specialization/const-default-const-specialized.stderr delete mode 100644 tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.stderr delete mode 100644 tests/ui/traits/const-traits/tilde-const-in-struct-args.stderr delete mode 100644 tests/ui/traits/next-solver/canonical/effect-var.stderr diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs index 8d2e1e8c8041e..6ff70044eed44 100644 --- a/compiler/rustc_feature/src/removed.rs +++ b/compiler/rustc_feature/src/removed.rs @@ -100,6 +100,9 @@ declare_features! ( Some("renamed to `doc_notable_trait`")), /// Allows using `#[unsafe_destructor_blind_to_params]` (RFC 1238). (removed, dropck_parametricity, "1.38.0", Some(28498), None), + /// Uses generic effect parameters for ~const bounds + (removed, effects, "CURRENT_RUSTC_VERSION", Some(102090), + Some("removed, redundant with `#![feature(const_trait_impl)]`")), /// Allows defining `existential type`s. (removed, existential_type, "1.38.0", Some(63063), Some("removed in favor of `#![feature(type_alias_impl_trait)]`")), diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index a99d90488861c..5f83c211b386b 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -462,8 +462,6 @@ declare_features! ( (unstable, doc_masked, "1.21.0", Some(44027)), /// Allows `dyn* Trait` objects. (incomplete, dyn_star, "1.65.0", Some(102425)), - /// Uses generic effect parameters for ~const bounds - (incomplete, effects, "1.72.0", Some(102090)), /// Allows exhaustive pattern matching on types that contain uninhabited types. (unstable, exhaustive_patterns, "1.13.0", Some(51085)), /// Allows explicit tail calls via `become` expression. diff --git a/tests/crashes/112623.rs b/tests/crashes/112623.rs index fc7361bfcb205..592ad742e5ffb 100644 --- a/tests/crashes/112623.rs +++ b/tests/crashes/112623.rs @@ -1,6 +1,6 @@ //@ known-bug: #112623 -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Value { diff --git a/tests/crashes/119701.rs b/tests/crashes/119701.rs index 5f681bb8da88a..bdb326ea76b19 100644 --- a/tests/crashes/119701.rs +++ b/tests/crashes/119701.rs @@ -1,5 +1,5 @@ //@ known-bug: #119701 -#![feature(const_trait_impl, effects, generic_const_exprs)] +#![feature(const_trait_impl, generic_const_exprs)] fn main() { let _ = process::<()>([()]); diff --git a/tests/crashes/121411.rs b/tests/crashes/121411.rs index ef7b16579dd58..2456910e6fa62 100644 --- a/tests/crashes/121411.rs +++ b/tests/crashes/121411.rs @@ -1,5 +1,5 @@ //@ known-bug: #121411 -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Foo { diff --git a/tests/rustdoc/const-effect-param.rs b/tests/rustdoc/const-effect-param.rs index 3c81700ba837f..cceb0adac3096 100644 --- a/tests/rustdoc/const-effect-param.rs +++ b/tests/rustdoc/const-effect-param.rs @@ -1,8 +1,7 @@ // Check that we don't render host effect parameters & arguments. #![crate_name = "foo"] -#![feature(effects, const_trait_impl)] -#![allow(incomplete_features)] +#![feature(const_trait_impl)] #[const_trait] pub trait Tr { diff --git a/tests/rustdoc/const-fn-effects.rs b/tests/rustdoc/const-fn-effects.rs index 4523870c8a5d6..df060a1aa1a16 100644 --- a/tests/rustdoc/const-fn-effects.rs +++ b/tests/rustdoc/const-fn-effects.rs @@ -1,6 +1,4 @@ #![crate_name = "foo"] -#![feature(effects)] -#![allow(incomplete_features)] //@ has foo/fn.bar.html //@ has - '//pre[@class="rust item-decl"]' 'pub const fn bar() -> ' diff --git a/tests/rustdoc/inline_cross/auxiliary/const-effect-param.rs b/tests/rustdoc/inline_cross/auxiliary/const-effect-param.rs index 161d0c9d54e11..db198e0fce993 100644 --- a/tests/rustdoc/inline_cross/auxiliary/const-effect-param.rs +++ b/tests/rustdoc/inline_cross/auxiliary/const-effect-param.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![feature(effects, const_trait_impl)] -#![allow(incomplete_features)] +#![feature(const_trait_impl)] #[const_trait] pub trait Resource {} diff --git a/tests/rustdoc/rfc-2632-const-trait-impl.rs b/tests/rustdoc/rfc-2632-const-trait-impl.rs index eb3e00af3b0b5..f6a5555dbadd0 100644 --- a/tests/rustdoc/rfc-2632-const-trait-impl.rs +++ b/tests/rustdoc/rfc-2632-const-trait-impl.rs @@ -8,8 +8,7 @@ // // FIXME(effects) add `const_trait` to `Fn` so we use `~const` // FIXME(effects) restore `const_trait` to `Destruct` -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #![crate_name = "foo"] use std::marker::Destruct; diff --git a/tests/ui/const-generics/const_trait_fn-issue-88433.rs b/tests/ui/const-generics/const_trait_fn-issue-88433.rs index 5e0ea6fc168ef..bc91fc1700eaf 100644 --- a/tests/ui/const-generics/const_trait_fn-issue-88433.rs +++ b/tests/ui/const-generics/const_trait_fn-issue-88433.rs @@ -1,8 +1,7 @@ //@ build-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Func { diff --git a/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.rs b/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.rs index 818b5d6ca93ae..6c0ac639612cd 100644 --- a/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.rs +++ b/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.rs @@ -1,6 +1,6 @@ //@ known-bug: #110395 //@ compile-flags: -Znext-solver -#![feature(generic_const_exprs, adt_const_params, const_trait_impl, effects)] +#![feature(generic_const_exprs, adt_const_params, const_trait_impl)] #![allow(incomplete_features)] // test `N + N` unifies with explicit function calls for non-builtin-types diff --git a/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.stderr b/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.stderr index b8d7c94bddc80..882fdf0b228e8 100644 --- a/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.stderr +++ b/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.stderr @@ -1,7 +1,7 @@ error: `-Znext-solver=globally` and `generic_const_exprs` are incompatible, using them at the same time is not allowed --> $DIR/unify-op-with-fn-call.rs:3:12 | -LL | #![feature(generic_const_exprs, adt_const_params, const_trait_impl, effects)] +LL | #![feature(generic_const_exprs, adt_const_params, const_trait_impl)] | ^^^^^^^^^^^^^^^^^^^ | = help: remove one of these features diff --git a/tests/ui/const-generics/issues/issue-88119.rs b/tests/ui/const-generics/issues/issue-88119.rs index 12cb7ee7f55cc..a49b2ab8b03d1 100644 --- a/tests/ui/const-generics/issues/issue-88119.rs +++ b/tests/ui/const-generics/issues/issue-88119.rs @@ -1,7 +1,7 @@ //@ known-bug: #110395 //@ compile-flags: -Znext-solver #![allow(incomplete_features)] -#![feature(const_trait_impl, effects, generic_const_exprs)] +#![feature(const_trait_impl, generic_const_exprs)] #[const_trait] trait ConstName { diff --git a/tests/ui/const-generics/issues/issue-88119.stderr b/tests/ui/const-generics/issues/issue-88119.stderr index a0ca33e38ef83..370244fe8c984 100644 --- a/tests/ui/const-generics/issues/issue-88119.stderr +++ b/tests/ui/const-generics/issues/issue-88119.stderr @@ -1,8 +1,8 @@ error: `-Znext-solver=globally` and `generic_const_exprs` are incompatible, using them at the same time is not allowed - --> $DIR/issue-88119.rs:4:39 + --> $DIR/issue-88119.rs:4:30 | -LL | #![feature(const_trait_impl, effects, generic_const_exprs)] - | ^^^^^^^^^^^^^^^^^^^ +LL | #![feature(const_trait_impl, generic_const_exprs)] + | ^^^^^^^^^^^^^^^^^^^ | = help: remove one of these features diff --git a/tests/ui/consts/auxiliary/closure-in-foreign-crate.rs b/tests/ui/consts/auxiliary/closure-in-foreign-crate.rs index a4dd3ee2e7e96..8804772e2827a 100644 --- a/tests/ui/consts/auxiliary/closure-in-foreign-crate.rs +++ b/tests/ui/consts/auxiliary/closure-in-foreign-crate.rs @@ -1,7 +1,6 @@ //@ compile-flags: -Znext-solver #![crate_type = "lib"] -#![feature(const_closures, const_trait_impl, effects)] -#![allow(incomplete_features)] +#![feature(const_closures, const_trait_impl)] pub const fn test() { let cl = const || {}; diff --git a/tests/ui/consts/const-try.rs b/tests/ui/consts/const-try.rs index 758c4dd1e8c41..d30b22accef9d 100644 --- a/tests/ui/consts/const-try.rs +++ b/tests/ui/consts/const-try.rs @@ -4,9 +4,8 @@ #![crate_type = "lib"] #![feature(try_trait_v2)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #![feature(const_try)] -#![allow(incomplete_features)] use std::ops::{ControlFlow, FromResidual, Try}; diff --git a/tests/ui/consts/const-try.stderr b/tests/ui/consts/const-try.stderr index abb1a921cfa46..1f4f814cb936b 100644 --- a/tests/ui/consts/const-try.stderr +++ b/tests/ui/consts/const-try.stderr @@ -1,5 +1,5 @@ error: const `impl` for trait `FromResidual` which is not marked with `#[const_trait]` - --> $DIR/const-try.rs:16:12 + --> $DIR/const-try.rs:15:12 | LL | impl const FromResidual for TryMe { | ^^^^^^^^^^^^^^^^^^^ @@ -8,7 +8,7 @@ LL | impl const FromResidual for TryMe { = note: adding a non-const method body in the future would be a breaking change error: const `impl` for trait `Try` which is not marked with `#[const_trait]` - --> $DIR/const-try.rs:23:12 + --> $DIR/const-try.rs:22:12 | LL | impl const Try for TryMe { | ^^^ @@ -17,7 +17,7 @@ LL | impl const Try for TryMe { = note: adding a non-const method body in the future would be a breaking change error[E0015]: `?` cannot determine the branch of `TryMe` in constant functions - --> $DIR/const-try.rs:36:5 + --> $DIR/const-try.rs:35:5 | LL | TryMe?; | ^^^^^^ @@ -25,7 +25,7 @@ LL | TryMe?; = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants error[E0015]: `?` cannot convert from residual of `TryMe` in constant functions - --> $DIR/const-try.rs:36:5 + --> $DIR/const-try.rs:35:5 | LL | TryMe?; | ^^^^^^ diff --git a/tests/ui/consts/const_cmp_type_id.rs b/tests/ui/consts/const_cmp_type_id.rs index 3a54764f422f7..0e1b5c75a1003 100644 --- a/tests/ui/consts/const_cmp_type_id.rs +++ b/tests/ui/consts/const_cmp_type_id.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![feature(const_type_id, const_trait_impl, effects)] -#![allow(incomplete_features)] +#![feature(const_type_id, const_trait_impl)] use std::any::TypeId; diff --git a/tests/ui/consts/const_cmp_type_id.stderr b/tests/ui/consts/const_cmp_type_id.stderr index 12f35361b808a..2e9a8024eaeba 100644 --- a/tests/ui/consts/const_cmp_type_id.stderr +++ b/tests/ui/consts/const_cmp_type_id.stderr @@ -1,5 +1,5 @@ error[E0015]: cannot call non-const operator in constants - --> $DIR/const_cmp_type_id.rs:9:17 + --> $DIR/const_cmp_type_id.rs:8:17 | LL | assert!(TypeId::of::() == TypeId::of::()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -9,7 +9,7 @@ note: impl defined here, but it is not `const` = note: calls in constants are limited to constant functions, tuple structs and tuple variants error[E0015]: cannot call non-const operator in constants - --> $DIR/const_cmp_type_id.rs:11:17 + --> $DIR/const_cmp_type_id.rs:10:17 | LL | assert!(TypeId::of::<()>() != TypeId::of::()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -19,7 +19,7 @@ note: impl defined here, but it is not `const` = note: calls in constants are limited to constant functions, tuple structs and tuple variants error[E0015]: cannot call non-const operator in constants - --> $DIR/const_cmp_type_id.rs:13:18 + --> $DIR/const_cmp_type_id.rs:12:18 | LL | let _a = TypeId::of::() < TypeId::of::(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/consts/constifconst-call-in-const-position.rs b/tests/ui/consts/constifconst-call-in-const-position.rs index 757e35bbab209..80e47c2230f22 100644 --- a/tests/ui/consts/constifconst-call-in-const-position.rs +++ b/tests/ui/consts/constifconst-call-in-const-position.rs @@ -1,6 +1,6 @@ //@ known-bug: #102498 -#![feature(const_trait_impl, effects, generic_const_exprs)] +#![feature(const_trait_impl, generic_const_exprs)] #![allow(incomplete_features)] #[const_trait] diff --git a/tests/ui/consts/rustc-impl-const-stability.rs b/tests/ui/consts/rustc-impl-const-stability.rs index af3262ca57534..0df8482bec121 100644 --- a/tests/ui/consts/rustc-impl-const-stability.rs +++ b/tests/ui/consts/rustc-impl-const-stability.rs @@ -2,8 +2,7 @@ //@ known-bug: #110395 #![crate_type = "lib"] -#![feature(staged_api, const_trait_impl, effects)] -#![allow(incomplete_features)] +#![feature(staged_api, const_trait_impl)] #![stable(feature = "foo", since = "1.0.0")] #[stable(feature = "potato", since = "1.27.0")] diff --git a/tests/ui/consts/rustc-impl-const-stability.stderr b/tests/ui/consts/rustc-impl-const-stability.stderr index 4a534b3ca1410..4a58b5c86034e 100644 --- a/tests/ui/consts/rustc-impl-const-stability.stderr +++ b/tests/ui/consts/rustc-impl-const-stability.stderr @@ -1,5 +1,5 @@ error: const `impl` for trait `Default` which is not marked with `#[const_trait]` - --> $DIR/rustc-impl-const-stability.rs:16:12 + --> $DIR/rustc-impl-const-stability.rs:15:12 | LL | impl const Default for Data { | ^^^^^^^ diff --git a/tests/ui/delegation/unsupported.rs b/tests/ui/delegation/unsupported.rs index 56296db85a3fa..b35af76da3eb3 100644 --- a/tests/ui/delegation/unsupported.rs +++ b/tests/ui/delegation/unsupported.rs @@ -1,6 +1,5 @@ #![feature(const_trait_impl)] #![feature(c_variadic)] -#![feature(effects)] #![feature(fn_delegation)] #![allow(incomplete_features)] diff --git a/tests/ui/delegation/unsupported.stderr b/tests/ui/delegation/unsupported.stderr index 2f64d23b8d24c..9391763dca2b1 100644 --- a/tests/ui/delegation/unsupported.stderr +++ b/tests/ui/delegation/unsupported.stderr @@ -1,24 +1,24 @@ -error[E0391]: cycle detected when computing type of `opaque::::{synthetic#0}` - --> $DIR/unsupported.rs:27:25 +error[E0391]: cycle detected when computing type of `opaque::::{synthetic#0}` + --> $DIR/unsupported.rs:26:25 | LL | reuse to_reuse::opaque_ret; | ^^^^^^^^^^ | note: ...which requires comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process... - --> $DIR/unsupported.rs:27:25 + --> $DIR/unsupported.rs:26:25 | LL | reuse to_reuse::opaque_ret; | ^^^^^^^^^^ - = note: ...which again requires computing type of `opaque::::{synthetic#0}`, completing the cycle -note: cycle used when checking that `opaque::` is well-formed - --> $DIR/unsupported.rs:26:5 + = note: ...which again requires computing type of `opaque::::{synthetic#0}`, completing the cycle +note: cycle used when checking that `opaque::` is well-formed + --> $DIR/unsupported.rs:25:5 | LL | impl ToReuse for u8 { | ^^^^^^^^^^^^^^^^^^^ = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information warning: this function depends on never type fallback being `()` - --> $DIR/unsupported.rs:14:9 + --> $DIR/unsupported.rs:13:9 | LL | pub fn opaque_ret() -> impl Trait { unimplemented!() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -27,14 +27,14 @@ LL | pub fn opaque_ret() -> impl Trait { unimplemented!() } = note: for more information, see issue #123748 = help: specify the types explicitly note: in edition 2024, the requirement `!: opaque::Trait` will fail - --> $DIR/unsupported.rs:14:32 + --> $DIR/unsupported.rs:13:32 | LL | pub fn opaque_ret() -> impl Trait { unimplemented!() } | ^^^^^^^^^^ = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default warning: this function depends on never type fallback being `()` - --> $DIR/unsupported.rs:20:9 + --> $DIR/unsupported.rs:19:9 | LL | fn opaque_ret() -> impl Trait { unimplemented!() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -43,32 +43,32 @@ LL | fn opaque_ret() -> impl Trait { unimplemented!() } = note: for more information, see issue #123748 = help: specify the types explicitly note: in edition 2024, the requirement `!: opaque::Trait` will fail - --> $DIR/unsupported.rs:20:28 + --> $DIR/unsupported.rs:19:28 | LL | fn opaque_ret() -> impl Trait { unimplemented!() } | ^^^^^^^^^^ -error[E0391]: cycle detected when computing type of `opaque::::{synthetic#0}` - --> $DIR/unsupported.rs:30:24 +error[E0391]: cycle detected when computing type of `opaque::::{synthetic#0}` + --> $DIR/unsupported.rs:29:24 | LL | reuse ToReuse::opaque_ret; | ^^^^^^^^^^ | note: ...which requires comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process... - --> $DIR/unsupported.rs:30:24 + --> $DIR/unsupported.rs:29:24 | LL | reuse ToReuse::opaque_ret; | ^^^^^^^^^^ - = note: ...which again requires computing type of `opaque::::{synthetic#0}`, completing the cycle -note: cycle used when checking that `opaque::` is well-formed - --> $DIR/unsupported.rs:29:5 + = note: ...which again requires computing type of `opaque::::{synthetic#0}`, completing the cycle +note: cycle used when checking that `opaque::` is well-formed + --> $DIR/unsupported.rs:28:5 | LL | impl ToReuse for u16 { | ^^^^^^^^^^^^^^^^^^^^ = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information error: recursive delegation is not supported yet - --> $DIR/unsupported.rs:43:22 + --> $DIR/unsupported.rs:42:22 | LL | pub reuse to_reuse2::foo; | --- callee defined here @@ -77,7 +77,7 @@ LL | reuse to_reuse1::foo; | ^^^ error[E0283]: type annotations needed - --> $DIR/unsupported.rs:53:18 + --> $DIR/unsupported.rs:52:18 | LL | reuse Trait::foo; | ^^^ cannot infer type diff --git a/tests/ui/dropck/const_drop_is_valid.rs b/tests/ui/dropck/const_drop_is_valid.rs index 0441b6ed067a4..26ef2d61deb69 100644 --- a/tests/ui/dropck/const_drop_is_valid.rs +++ b/tests/ui/dropck/const_drop_is_valid.rs @@ -1,6 +1,3 @@ -#![feature(effects)] -//~^ WARN: the feature `effects` is incomplete - struct A(); impl const Drop for A {} diff --git a/tests/ui/dropck/const_drop_is_valid.stderr b/tests/ui/dropck/const_drop_is_valid.stderr index 2383a6668a85f..5837e1623a170 100644 --- a/tests/ui/dropck/const_drop_is_valid.stderr +++ b/tests/ui/dropck/const_drop_is_valid.stderr @@ -1,5 +1,5 @@ error[E0658]: const trait impls are experimental - --> $DIR/const_drop_is_valid.rs:6:6 + --> $DIR/const_drop_is_valid.rs:3:6 | LL | impl const Drop for A {} | ^^^^^ @@ -8,17 +8,8 @@ LL | impl const Drop for A {} = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/const_drop_is_valid.rs:1:12 - | -LL | #![feature(effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error: const `impl` for trait `Drop` which is not marked with `#[const_trait]` - --> $DIR/const_drop_is_valid.rs:6:12 + --> $DIR/const_drop_is_valid.rs:3:12 | LL | impl const Drop for A {} | ^^^^ @@ -27,14 +18,14 @@ LL | impl const Drop for A {} = note: adding a non-const method body in the future would be a breaking change error[E0046]: not all trait items implemented, missing: `drop` - --> $DIR/const_drop_is_valid.rs:6:1 + --> $DIR/const_drop_is_valid.rs:3:1 | LL | impl const Drop for A {} | ^^^^^^^^^^^^^^^^^^^^^ missing `drop` in implementation | = help: implement the missing item: `fn drop(&mut self) { todo!() }` -error: aborting due to 3 previous errors; 1 warning emitted +error: aborting due to 3 previous errors Some errors have detailed explanations: E0046, E0658. For more information about an error, try `rustc --explain E0046`. diff --git a/tests/ui/generic-const-items/const-trait-impl.rs b/tests/ui/generic-const-items/const-trait-impl.rs index 51209121bd915..e11d346b712d8 100644 --- a/tests/ui/generic-const-items/const-trait-impl.rs +++ b/tests/ui/generic-const-items/const-trait-impl.rs @@ -2,7 +2,7 @@ //@ compile-flags: -Znext-solver // Test that we can call methods from const trait impls inside of generic const items. -#![feature(generic_const_items, const_trait_impl, effects)] +#![feature(generic_const_items, const_trait_impl)] #![allow(incomplete_features)] #![crate_type = "lib"] diff --git a/tests/ui/intrinsics/safe-intrinsic-mismatch.rs b/tests/ui/intrinsics/safe-intrinsic-mismatch.rs index af563e996c1df..915a23b59053d 100644 --- a/tests/ui/intrinsics/safe-intrinsic-mismatch.rs +++ b/tests/ui/intrinsics/safe-intrinsic-mismatch.rs @@ -1,11 +1,5 @@ -//@ revisions: stock effects #![feature(intrinsics)] #![feature(rustc_attrs)] -// as effects insert a const generic param to const intrinsics, -// check here that it doesn't report a const param mismatch either -// enabling or disabling effects. -#![cfg_attr(effects, feature(effects))] -#![allow(incomplete_features)] extern "rust-intrinsic" { fn size_of() -> usize; //~ ERROR intrinsic safety mismatch @@ -24,7 +18,6 @@ const fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} mod foo { #[rustc_intrinsic] unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} - // FIXME(effects) ~^ ERROR wrong number of const parameters } fn main() {} diff --git a/tests/ui/intrinsics/safe-intrinsic-mismatch.effects.stderr b/tests/ui/intrinsics/safe-intrinsic-mismatch.stderr similarity index 86% rename from tests/ui/intrinsics/safe-intrinsic-mismatch.effects.stderr rename to tests/ui/intrinsics/safe-intrinsic-mismatch.stderr index c59e357b27526..aa4f294232d2d 100644 --- a/tests/ui/intrinsics/safe-intrinsic-mismatch.effects.stderr +++ b/tests/ui/intrinsics/safe-intrinsic-mismatch.stderr @@ -1,11 +1,11 @@ error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `size_of` - --> $DIR/safe-intrinsic-mismatch.rs:11:5 + --> $DIR/safe-intrinsic-mismatch.rs:5:5 | LL | fn size_of() -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `size_of` - --> $DIR/safe-intrinsic-mismatch.rs:11:5 + --> $DIR/safe-intrinsic-mismatch.rs:5:5 | LL | fn size_of() -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -13,13 +13,13 @@ LL | fn size_of() -> usize; = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `assume` - --> $DIR/safe-intrinsic-mismatch.rs:16:1 + --> $DIR/safe-intrinsic-mismatch.rs:10:1 | LL | const fn assume(_b: bool) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: intrinsic has wrong type - --> $DIR/safe-intrinsic-mismatch.rs:16:16 + --> $DIR/safe-intrinsic-mismatch.rs:10:16 | LL | const fn assume(_b: bool) {} | ^ expected unsafe fn, found safe fn @@ -28,13 +28,13 @@ LL | const fn assume(_b: bool) {} found signature `fn(_)` error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `const_deallocate` - --> $DIR/safe-intrinsic-mismatch.rs:20:1 + --> $DIR/safe-intrinsic-mismatch.rs:14:1 | LL | const fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: intrinsic has wrong type - --> $DIR/safe-intrinsic-mismatch.rs:20:26 + --> $DIR/safe-intrinsic-mismatch.rs:14:26 | LL | const fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} | ^ expected unsafe fn, found safe fn diff --git a/tests/ui/intrinsics/safe-intrinsic-mismatch.stock.stderr b/tests/ui/intrinsics/safe-intrinsic-mismatch.stock.stderr deleted file mode 100644 index c59e357b27526..0000000000000 --- a/tests/ui/intrinsics/safe-intrinsic-mismatch.stock.stderr +++ /dev/null @@ -1,47 +0,0 @@ -error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `size_of` - --> $DIR/safe-intrinsic-mismatch.rs:11:5 - | -LL | fn size_of() -> usize; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `size_of` - --> $DIR/safe-intrinsic-mismatch.rs:11:5 - | -LL | fn size_of() -> usize; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` - -error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `assume` - --> $DIR/safe-intrinsic-mismatch.rs:16:1 - | -LL | const fn assume(_b: bool) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - -error[E0308]: intrinsic has wrong type - --> $DIR/safe-intrinsic-mismatch.rs:16:16 - | -LL | const fn assume(_b: bool) {} - | ^ expected unsafe fn, found safe fn - | - = note: expected signature `unsafe fn(_)` - found signature `fn(_)` - -error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `const_deallocate` - --> $DIR/safe-intrinsic-mismatch.rs:20:1 - | -LL | const fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error[E0308]: intrinsic has wrong type - --> $DIR/safe-intrinsic-mismatch.rs:20:26 - | -LL | const fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} - | ^ expected unsafe fn, found safe fn - | - = note: expected signature `unsafe fn(_, _, _)` - found signature `fn(_, _, _)` - -error: aborting due to 6 previous errors - -For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/parser/impls-nested-within-fns-semantic-1.rs b/tests/ui/parser/impls-nested-within-fns-semantic-1.rs index 92823b05af840..f06d19d7f5ec6 100644 --- a/tests/ui/parser/impls-nested-within-fns-semantic-1.rs +++ b/tests/ui/parser/impls-nested-within-fns-semantic-1.rs @@ -2,8 +2,7 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Trait { diff --git a/tests/ui/stability-attribute/missing-const-stability.rs b/tests/ui/stability-attribute/missing-const-stability.rs index f113965255002..6d49996c3b5e9 100644 --- a/tests/ui/stability-attribute/missing-const-stability.rs +++ b/tests/ui/stability-attribute/missing-const-stability.rs @@ -1,6 +1,6 @@ //@ compile-flags: -Znext-solver #![feature(staged_api)] -#![feature(const_trait_impl, effects, rustc_attrs, intrinsics)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl, rustc_attrs, intrinsics)] #![stable(feature = "stable", since = "1.0.0")] #[stable(feature = "stable", since = "1.0.0")] diff --git a/tests/ui/stability-attribute/missing-const-stability.stderr b/tests/ui/stability-attribute/missing-const-stability.stderr index e62a8b8826162..ad8a1fa9d36e1 100644 --- a/tests/ui/stability-attribute/missing-const-stability.stderr +++ b/tests/ui/stability-attribute/missing-const-stability.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/missing-const-stability.rs:3:30 - | -LL | #![feature(const_trait_impl, effects, rustc_attrs, intrinsics)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error: function has missing const stability attribute --> $DIR/missing-const-stability.rs:7:1 | @@ -34,5 +25,5 @@ error: associated function has missing const stability attribute LL | pub const fn foo() {} | ^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 4 previous errors; 1 warning emitted +error: aborting due to 4 previous errors diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs index bbf8891790516..bac7ee023f479 100644 --- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs +++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs @@ -1,8 +1,7 @@ //@ compile-flags: -Znext-solver //@ check-pass -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Trait { diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs index 04ad94556c384..a0375cda079a7 100644 --- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs +++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs @@ -1,7 +1,7 @@ //@ compile-flags: -Znext-solver //@ known-bug: unknown -#![feature(const_trait_impl, effects, generic_const_exprs)] +#![feature(const_trait_impl, generic_const_exprs)] #![allow(incomplete_features)] #[const_trait] diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.stderr b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.stderr index b8768bd5541c9..8d1c85c0c8aa0 100644 --- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.stderr +++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.stderr @@ -1,8 +1,8 @@ error: `-Znext-solver=globally` and `generic_const_exprs` are incompatible, using them at the same time is not allowed - --> $DIR/assoc-type-const-bound-usage-1.rs:4:39 + --> $DIR/assoc-type-const-bound-usage-1.rs:4:30 | -LL | #![feature(const_trait_impl, effects, generic_const_exprs)] - | ^^^^^^^^^^^^^^^^^^^ +LL | #![feature(const_trait_impl, generic_const_exprs)] + | ^^^^^^^^^^^^^^^^^^^ | = help: remove one of these features diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.rs b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.rs index 5e873082781be..b3a636b0f713d 100644 --- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.rs +++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.rs @@ -5,8 +5,7 @@ // i.e. check that we validate the const conditions for the associated type // when considering one of implied const bounds. -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Trait { diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.stderr b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.stderr index 1f6532c7a570e..86bd07a5f593d 100644 --- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.stderr +++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `::Assoc: ~const Trait` is not satisfied - --> $DIR/assoc-type-const-bound-usage-fail-2.rs:24:5 + --> $DIR/assoc-type-const-bound-usage-fail-2.rs:23:5 | LL | T::Assoc::::func(); | ^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `::Assoc: ~const Trait` is not satisfied - --> $DIR/assoc-type-const-bound-usage-fail-2.rs:26:5 + --> $DIR/assoc-type-const-bound-usage-fail-2.rs:25:5 | LL | ::Assoc::::func(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.rs b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.rs index 73b3d142f7c84..ce01086f0dc0b 100644 --- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.rs +++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.rs @@ -4,8 +4,7 @@ // i.e. check that we validate the const conditions for the associated type // when considering one of implied const bounds. -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Trait { diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.stderr b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.stderr index fb08e74eb7f41..145fe2c41dd40 100644 --- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.stderr +++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `T: ~const Trait` is not satisfied - --> $DIR/assoc-type-const-bound-usage-fail.rs:17:5 + --> $DIR/assoc-type-const-bound-usage-fail.rs:16:5 | LL | T::Assoc::func(); | ^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `T: ~const Trait` is not satisfied - --> $DIR/assoc-type-const-bound-usage-fail.rs:19:5 + --> $DIR/assoc-type-const-bound-usage-fail.rs:18:5 | LL | ::Assoc::func(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/traits/const-traits/assoc-type.rs b/tests/ui/traits/const-traits/assoc-type.rs index a9394d90ed88a..32c91fa51f135 100644 --- a/tests/ui/traits/const-traits/assoc-type.rs +++ b/tests/ui/traits/const-traits/assoc-type.rs @@ -1,6 +1,6 @@ //@ compile-flags: -Znext-solver -#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] trait Add { diff --git a/tests/ui/traits/const-traits/assoc-type.stderr b/tests/ui/traits/const-traits/assoc-type.stderr index 672eaf26f7275..b318675b6123f 100644 --- a/tests/ui/traits/const-traits/assoc-type.stderr +++ b/tests/ui/traits/const-traits/assoc-type.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/assoc-type.rs:3:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0277]: the trait bound `NonConstAdd: ~const Add` is not satisfied --> $DIR/assoc-type.rs:36:16 | @@ -19,6 +10,6 @@ note: required by a bound in `Foo::Bar` LL | type Bar: ~const Add; | ^^^^^^ required by this bound in `Foo::Bar` -error: aborting due to 1 previous error; 1 warning emitted +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/traits/const-traits/auxiliary/cross-crate.rs b/tests/ui/traits/const-traits/auxiliary/cross-crate.rs index 8f63cd1d521ed..01921c140cbcf 100644 --- a/tests/ui/traits/const-traits/auxiliary/cross-crate.rs +++ b/tests/ui/traits/const-traits/auxiliary/cross-crate.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] pub trait MyTrait { diff --git a/tests/ui/traits/const-traits/auxiliary/staged-api.rs b/tests/ui/traits/const-traits/auxiliary/staged-api.rs index bb591321b84fc..abe22db702c65 100644 --- a/tests/ui/traits/const-traits/auxiliary/staged-api.rs +++ b/tests/ui/traits/const-traits/auxiliary/staged-api.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #![feature(staged_api)] #![stable(feature = "rust1", since = "1.0.0")] diff --git a/tests/ui/traits/const-traits/call-const-closure.rs b/tests/ui/traits/const-traits/call-const-closure.rs index cbf3e6c3ac40a..4cb6b4b41b90d 100644 --- a/tests/ui/traits/const-traits/call-const-closure.rs +++ b/tests/ui/traits/const-traits/call-const-closure.rs @@ -1,7 +1,7 @@ //@ compile-flags: -Znext-solver //@ edition:2021 -#![feature(const_trait_impl, effects, const_closures)] +#![feature(const_trait_impl, const_closures)] #![allow(incomplete_features)] #[const_trait] diff --git a/tests/ui/traits/const-traits/call-const-in-tilde-const.rs b/tests/ui/traits/const-traits/call-const-in-tilde-const.rs index 970ee93fd49a3..b6d1517499d6e 100644 --- a/tests/ui/traits/const-traits/call-const-in-tilde-const.rs +++ b/tests/ui/traits/const-traits/call-const-in-tilde-const.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] trait Foo { fn foo(); diff --git a/tests/ui/traits/const-traits/call-const-in-tilde-const.stderr b/tests/ui/traits/const-traits/call-const-in-tilde-const.stderr index 49c310f1f7513..e56968b90972d 100644 --- a/tests/ui/traits/const-traits/call-const-in-tilde-const.stderr +++ b/tests/ui/traits/const-traits/call-const-in-tilde-const.stderr @@ -1,18 +1,9 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/call-const-in-tilde-const.rs:2:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0277]: the trait bound `T: const Foo` is not satisfied - --> $DIR/call-const-in-tilde-const.rs:10:13 + --> $DIR/call-const-in-tilde-const.rs:9:13 | LL | const { T::foo() } | ^^^^^^^^ -error: aborting due to 1 previous error; 1 warning emitted +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/traits/const-traits/call-const-trait-method-fail.rs b/tests/ui/traits/const-traits/call-const-trait-method-fail.rs index 878f9a713a0b4..e06d04db80409 100644 --- a/tests/ui/traits/const-traits/call-const-trait-method-fail.rs +++ b/tests/ui/traits/const-traits/call-const-trait-method-fail.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] pub trait Plus { diff --git a/tests/ui/traits/const-traits/call-const-trait-method-fail.stderr b/tests/ui/traits/const-traits/call-const-trait-method-fail.stderr index 40a06af85edca..b461fd9e39e3c 100644 --- a/tests/ui/traits/const-traits/call-const-trait-method-fail.stderr +++ b/tests/ui/traits/const-traits/call-const-trait-method-fail.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `u32: ~const Plus` is not satisfied - --> $DIR/call-const-trait-method-fail.rs:27:5 + --> $DIR/call-const-trait-method-fail.rs:26:5 | LL | a.plus(b) | ^^^^^^^^^ diff --git a/tests/ui/traits/const-traits/call-generic-method-chain.rs b/tests/ui/traits/const-traits/call-generic-method-chain.rs index e5baedae818b9..dd09fbcb37b9d 100644 --- a/tests/ui/traits/const-traits/call-generic-method-chain.rs +++ b/tests/ui/traits/const-traits/call-generic-method-chain.rs @@ -4,7 +4,7 @@ //@ compile-flags: -Znext-solver // FIXME(effects) check-pass -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] struct S; diff --git a/tests/ui/traits/const-traits/call-generic-method-chain.stderr b/tests/ui/traits/const-traits/call-generic-method-chain.stderr index 6dbf3ad252657..9a53c61d0191d 100644 --- a/tests/ui/traits/const-traits/call-generic-method-chain.stderr +++ b/tests/ui/traits/const-traits/call-generic-method-chain.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/call-generic-method-chain.rs:7:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]` --> $DIR/call-generic-method-chain.rs:11:12 | @@ -64,6 +55,6 @@ LL | !self.eq(other) | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -error: aborting due to 7 previous errors; 1 warning emitted +error: aborting due to 7 previous errors For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs b/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs index 83a4bb2543621..6df4679c58353 100644 --- a/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs +++ b/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs @@ -2,7 +2,7 @@ //@ known-bug: #110395 // FIXME(effects) check-pass -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] struct S; diff --git a/tests/ui/traits/const-traits/call-generic-method-dup-bound.stderr b/tests/ui/traits/const-traits/call-generic-method-dup-bound.stderr index 08877daad79da..a168171cfe84b 100644 --- a/tests/ui/traits/const-traits/call-generic-method-dup-bound.stderr +++ b/tests/ui/traits/const-traits/call-generic-method-dup-bound.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/call-generic-method-dup-bound.rs:5:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]` --> $DIR/call-generic-method-dup-bound.rs:9:12 | @@ -76,6 +67,6 @@ help: consider further restricting this bound LL | const fn equals_self2(t: &T) -> bool { | ++++++++++++++++++++++++++++ -error: aborting due to 8 previous errors; 1 warning emitted +error: aborting due to 8 previous errors For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/call-generic-method-fail.rs b/tests/ui/traits/const-traits/call-generic-method-fail.rs index 6bfbbef6f762e..66881334a2985 100644 --- a/tests/ui/traits/const-traits/call-generic-method-fail.rs +++ b/tests/ui/traits/const-traits/call-generic-method-fail.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] pub const fn equals_self(t: &T) -> bool { *t == *t diff --git a/tests/ui/traits/const-traits/call-generic-method-fail.stderr b/tests/ui/traits/const-traits/call-generic-method-fail.stderr index 5cd4216dce11e..07e50a7f7daae 100644 --- a/tests/ui/traits/const-traits/call-generic-method-fail.stderr +++ b/tests/ui/traits/const-traits/call-generic-method-fail.stderr @@ -1,5 +1,5 @@ error[E0015]: cannot call non-const operator in constant functions - --> $DIR/call-generic-method-fail.rs:6:5 + --> $DIR/call-generic-method-fail.rs:5:5 | LL | *t == *t | ^^^^^^^^ diff --git a/tests/ui/traits/const-traits/call-generic-method-nonconst.rs b/tests/ui/traits/const-traits/call-generic-method-nonconst.rs index f9e79d417521d..446a74eb7b7d4 100644 --- a/tests/ui/traits/const-traits/call-generic-method-nonconst.rs +++ b/tests/ui/traits/const-traits/call-generic-method-nonconst.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] struct S; diff --git a/tests/ui/traits/const-traits/call-generic-method-nonconst.stderr b/tests/ui/traits/const-traits/call-generic-method-nonconst.stderr index 06b99375cdaa7..d881bd5f4de61 100644 --- a/tests/ui/traits/const-traits/call-generic-method-nonconst.stderr +++ b/tests/ui/traits/const-traits/call-generic-method-nonconst.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `S: const Foo` is not satisfied - --> $DIR/call-generic-method-nonconst.rs:25:22 + --> $DIR/call-generic-method-nonconst.rs:24:22 | LL | pub const EQ: bool = equals_self(&S); | ^^^^^^^^^^^^^^^ diff --git a/tests/ui/traits/const-traits/call-generic-method-pass.rs b/tests/ui/traits/const-traits/call-generic-method-pass.rs index cbeeb2567dd5b..e4a48b884a8a7 100644 --- a/tests/ui/traits/const-traits/call-generic-method-pass.rs +++ b/tests/ui/traits/const-traits/call-generic-method-pass.rs @@ -4,7 +4,7 @@ //@ known-bug: #110395 // FIXME(effects) check-pass -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] struct S; diff --git a/tests/ui/traits/const-traits/call-generic-method-pass.stderr b/tests/ui/traits/const-traits/call-generic-method-pass.stderr index ac08c057435e0..af6e6d25dc9be 100644 --- a/tests/ui/traits/const-traits/call-generic-method-pass.stderr +++ b/tests/ui/traits/const-traits/call-generic-method-pass.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/call-generic-method-pass.rs:7:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]` --> $DIR/call-generic-method-pass.rs:11:12 | @@ -50,6 +41,6 @@ LL | !self.eq(other) | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -error: aborting due to 5 previous errors; 1 warning emitted +error: aborting due to 5 previous errors For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/call.rs b/tests/ui/traits/const-traits/call.rs index f96fb614ac2f9..a6eecb56874c9 100644 --- a/tests/ui/traits/const-traits/call.rs +++ b/tests/ui/traits/const-traits/call.rs @@ -1,6 +1,6 @@ // FIXME(effects) check-pass //@ compile-flags: -Znext-solver -#![feature(const_closures, const_trait_impl, effects)] +#![feature(const_closures, const_trait_impl)] #![allow(incomplete_features)] pub const _: () = { diff --git a/tests/ui/traits/const-traits/const-bound-in-host.rs b/tests/ui/traits/const-traits/const-bound-in-host.rs index 6fbc21074b685..b4c4f5a6de1d0 100644 --- a/tests/ui/traits/const-traits/const-bound-in-host.rs +++ b/tests/ui/traits/const-traits/const-bound-in-host.rs @@ -1,8 +1,7 @@ //@ compile-flags: -Znext-solver //@ check-pass -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] trait Foo { fn foo(); diff --git a/tests/ui/traits/const-traits/const-bound-in-host.stderr b/tests/ui/traits/const-traits/const-bound-in-host.stderr deleted file mode 100644 index b815f745ee8fc..0000000000000 --- a/tests/ui/traits/const-traits/const-bound-in-host.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/const-bound-in-host.rs:4:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.rs b/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.rs index 7c3e2af17977c..c735f855bcea7 100644 --- a/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.rs +++ b/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.rs @@ -1,7 +1,6 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait MyTrait { diff --git a/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr b/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr index ae1260ffab79a..50ab52ade49c7 100644 --- a/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr +++ b/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr @@ -1,23 +1,23 @@ error: `~const` is not allowed here - --> $DIR/const-bound-on-not-const-associated-fn.rs:12:40 + --> $DIR/const-bound-on-not-const-associated-fn.rs:11:40 | LL | fn do_something_else() where Self: ~const MyTrait; | ^^^^^^ | note: this function is not `const`, so it cannot have `~const` trait bounds - --> $DIR/const-bound-on-not-const-associated-fn.rs:12:8 + --> $DIR/const-bound-on-not-const-associated-fn.rs:11:8 | LL | fn do_something_else() where Self: ~const MyTrait; | ^^^^^^^^^^^^^^^^^ error: `~const` is not allowed here - --> $DIR/const-bound-on-not-const-associated-fn.rs:23:32 + --> $DIR/const-bound-on-not-const-associated-fn.rs:22:32 | LL | pub fn foo(&self) where T: ~const MyTrait { | ^^^^^^ | note: this function is not `const`, so it cannot have `~const` trait bounds - --> $DIR/const-bound-on-not-const-associated-fn.rs:23:12 + --> $DIR/const-bound-on-not-const-associated-fn.rs:22:12 | LL | pub fn foo(&self) where T: ~const MyTrait { | ^^^ diff --git a/tests/ui/traits/const-traits/const-bounds-non-const-trait.rs b/tests/ui/traits/const-traits/const-bounds-non-const-trait.rs index d51d231b8a977..e446eb154814f 100644 --- a/tests/ui/traits/const-traits/const-bounds-non-const-trait.rs +++ b/tests/ui/traits/const-traits/const-bounds-non-const-trait.rs @@ -1,5 +1,5 @@ // Regression test for issue #117244. -#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] trait NonConst {} diff --git a/tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr b/tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr index 8e836685eb0ab..2436c97ccf2ca 100644 --- a/tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr +++ b/tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/const-bounds-non-const-trait.rs:2:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error: `~const` can only be applied to `#[const_trait]` traits --> $DIR/const-bounds-non-const-trait.rs:6:21 | @@ -27,5 +18,5 @@ error: `const` can only be applied to `#[const_trait]` traits LL | fn operate() {} | ^^^^^ -error: aborting due to 3 previous errors; 1 warning emitted +error: aborting due to 3 previous errors diff --git a/tests/ui/traits/const-traits/const-check-fns-in-const-impl.rs b/tests/ui/traits/const-traits/const-check-fns-in-const-impl.rs index 7f9b38b820764..0330ed5ca8b25 100644 --- a/tests/ui/traits/const-traits/const-check-fns-in-const-impl.rs +++ b/tests/ui/traits/const-traits/const-check-fns-in-const-impl.rs @@ -1,6 +1,6 @@ //@ compile-flags: -Znext-solver -#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] struct S; #[const_trait] diff --git a/tests/ui/traits/const-traits/const-check-fns-in-const-impl.stderr b/tests/ui/traits/const-traits/const-check-fns-in-const-impl.stderr index ba12854987e24..d111a9d56390f 100644 --- a/tests/ui/traits/const-traits/const-check-fns-in-const-impl.stderr +++ b/tests/ui/traits/const-traits/const-check-fns-in-const-impl.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/const-check-fns-in-const-impl.rs:3:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0015]: cannot call non-const fn `non_const` in constant functions --> $DIR/const-check-fns-in-const-impl.rs:14:16 | @@ -15,6 +6,6 @@ LL | fn foo() { non_const() } | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -error: aborting due to 1 previous error; 1 warning emitted +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/const-default-method-bodies.rs b/tests/ui/traits/const-traits/const-default-method-bodies.rs index a0333153f857a..0ef11a7f0c933 100644 --- a/tests/ui/traits/const-traits/const-default-method-bodies.rs +++ b/tests/ui/traits/const-traits/const-default-method-bodies.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait ConstDefaultFn: Sized { diff --git a/tests/ui/traits/const-traits/const-default-method-bodies.stderr b/tests/ui/traits/const-traits/const-default-method-bodies.stderr index 071eaf495418a..5879330f15823 100644 --- a/tests/ui/traits/const-traits/const-default-method-bodies.stderr +++ b/tests/ui/traits/const-traits/const-default-method-bodies.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `NonConstImpl: ~const ConstDefaultFn` is not satisfied - --> $DIR/const-default-method-bodies.rs:26:5 + --> $DIR/const-default-method-bodies.rs:25:5 | LL | NonConstImpl.a(); | ^^^^^^^^^^^^^^^^ diff --git a/tests/ui/traits/const-traits/const-impl-requires-const-trait.rs b/tests/ui/traits/const-traits/const-impl-requires-const-trait.rs index e49e9090eb433..6bea664b65fe6 100644 --- a/tests/ui/traits/const-traits/const-impl-requires-const-trait.rs +++ b/tests/ui/traits/const-traits/const-impl-requires-const-trait.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![feature(const_trait_impl, effects)] -#![allow(incomplete_features)] +#![feature(const_trait_impl)] pub trait A {} diff --git a/tests/ui/traits/const-traits/const-impl-requires-const-trait.stderr b/tests/ui/traits/const-traits/const-impl-requires-const-trait.stderr index 828e2174f0007..bcaae38194959 100644 --- a/tests/ui/traits/const-traits/const-impl-requires-const-trait.stderr +++ b/tests/ui/traits/const-traits/const-impl-requires-const-trait.stderr @@ -1,5 +1,5 @@ error: const `impl` for trait `A` which is not marked with `#[const_trait]` - --> $DIR/const-impl-requires-const-trait.rs:7:12 + --> $DIR/const-impl-requires-const-trait.rs:6:12 | LL | pub trait A {} | - help: mark `A` as const: `#[const_trait]` diff --git a/tests/ui/traits/const-traits/const-in-closure.rs b/tests/ui/traits/const-traits/const-in-closure.rs index 51b22c530361a..ebc17a50c8660 100644 --- a/tests/ui/traits/const-traits/const-in-closure.rs +++ b/tests/ui/traits/const-traits/const-in-closure.rs @@ -1,8 +1,7 @@ //@ compile-flags: -Znext-solver //@ check-pass -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] trait Trait { fn method(); diff --git a/tests/ui/traits/const-traits/const-in-closure.stderr b/tests/ui/traits/const-traits/const-in-closure.stderr deleted file mode 100644 index f4b03b9ed2017..0000000000000 --- a/tests/ui/traits/const-traits/const-in-closure.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/const-in-closure.rs:4:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/const-traits/const-trait-bounds.rs b/tests/ui/traits/const-traits/const-trait-bounds.rs index 3b4ba6a998f88..4130d5c15ee9b 100644 --- a/tests/ui/traits/const-traits/const-trait-bounds.rs +++ b/tests/ui/traits/const-traits/const-trait-bounds.rs @@ -1,7 +1,7 @@ //@ known-bug: #110395 //@ compile-flags: -Znext-solver // FIXME(effects): check-pass -#![feature(const_trait_impl, effects, generic_const_exprs)] +#![feature(const_trait_impl, generic_const_exprs)] #![allow(incomplete_features)] fn main() { diff --git a/tests/ui/traits/const-traits/const-trait-bounds.stderr b/tests/ui/traits/const-traits/const-trait-bounds.stderr index 698b1b5b57817..29a01b9d7dcef 100644 --- a/tests/ui/traits/const-traits/const-trait-bounds.stderr +++ b/tests/ui/traits/const-traits/const-trait-bounds.stderr @@ -1,8 +1,8 @@ error: `-Znext-solver=globally` and `generic_const_exprs` are incompatible, using them at the same time is not allowed - --> $DIR/const-trait-bounds.rs:4:39 + --> $DIR/const-trait-bounds.rs:4:30 | -LL | #![feature(const_trait_impl, effects, generic_const_exprs)] - | ^^^^^^^^^^^^^^^^^^^ +LL | #![feature(const_trait_impl, generic_const_exprs)] + | ^^^^^^^^^^^^^^^^^^^ | = help: remove one of these features diff --git a/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.rs b/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.rs index 5896091f8c472..7bda7117a47e6 100644 --- a/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.rs +++ b/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.rs @@ -1,5 +1,5 @@ //@ known-bug: #110395 -#![feature(derive_const, effects)] +#![feature(derive_const)] pub struct A; diff --git a/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.stderr b/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.stderr index 8f4235dabad20..9492000a5631e 100644 --- a/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.stderr +++ b/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/derive-const-non-const-type.rs:2:26 - | -LL | #![feature(derive_const, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error: const `impl` for trait `Default` which is not marked with `#[const_trait]` --> $DIR/derive-const-non-const-type.rs:10:16 | @@ -28,6 +19,6 @@ LL | pub struct S(A); = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/const_derives/derive-const-use.rs b/tests/ui/traits/const-traits/const_derives/derive-const-use.rs index cb649b1ec7970..1e447147213d6 100644 --- a/tests/ui/traits/const-traits/const_derives/derive-const-use.rs +++ b/tests/ui/traits/const-traits/const_derives/derive-const-use.rs @@ -1,6 +1,6 @@ //@ known-bug: #110395 -#![feature(const_trait_impl, const_cmp, const_default_impls, derive_const, effects)] +#![feature(const_trait_impl, const_cmp, const_default_impls, derive_const)] pub struct A; diff --git a/tests/ui/traits/const-traits/const_derives/derive-const-use.stderr b/tests/ui/traits/const-traits/const_derives/derive-const-use.stderr index 7fc44229e2a0a..6f4fc90f6363f 100644 --- a/tests/ui/traits/const-traits/const_derives/derive-const-use.stderr +++ b/tests/ui/traits/const-traits/const_derives/derive-const-use.stderr @@ -1,22 +1,13 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/derive-const-use.rs:3:76 - | -LL | #![feature(const_trait_impl, const_cmp, const_default_impls, derive_const, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0635]: unknown feature `const_cmp` --> $DIR/derive-const-use.rs:3:30 | -LL | #![feature(const_trait_impl, const_cmp, const_default_impls, derive_const, effects)] +LL | #![feature(const_trait_impl, const_cmp, const_default_impls, derive_const)] | ^^^^^^^^^ error[E0635]: unknown feature `const_default_impls` --> $DIR/derive-const-use.rs:3:41 | -LL | #![feature(const_trait_impl, const_cmp, const_default_impls, derive_const, effects)] +LL | #![feature(const_trait_impl, const_cmp, const_default_impls, derive_const)] | ^^^^^^^^^^^^^^^^^^^ error: const `impl` for trait `Default` which is not marked with `#[const_trait]` @@ -117,7 +108,7 @@ LL | pub struct S((), A); = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to 12 previous errors; 1 warning emitted +error: aborting due to 12 previous errors Some errors have detailed explanations: E0015, E0635. For more information about an error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/const_derives/derive-const-with-params.rs b/tests/ui/traits/const-traits/const_derives/derive-const-with-params.rs index c032c76d38f6d..6d303726d8838 100644 --- a/tests/ui/traits/const-traits/const_derives/derive-const-with-params.rs +++ b/tests/ui/traits/const-traits/const_derives/derive-const-with-params.rs @@ -2,7 +2,7 @@ // FIXME(effects) check-pass #![feature(derive_const)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[derive_const(PartialEq)] pub struct Reverse(T); diff --git a/tests/ui/traits/const-traits/const_derives/derive-const-with-params.stderr b/tests/ui/traits/const-traits/const_derives/derive-const-with-params.stderr index 1395947bb1574..21cf64f89ea84 100644 --- a/tests/ui/traits/const-traits/const_derives/derive-const-with-params.stderr +++ b/tests/ui/traits/const-traits/const_derives/derive-const-with-params.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/derive-const-with-params.rs:5:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]` --> $DIR/derive-const-with-params.rs:7:16 | @@ -38,6 +29,6 @@ LL | a == b | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -error: aborting due to 4 previous errors; 1 warning emitted +error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/cross-crate-default-method-body-is-const.rs b/tests/ui/traits/const-traits/cross-crate-default-method-body-is-const.rs index 9ee5254dbf8a8..80b4124a644aa 100644 --- a/tests/ui/traits/const-traits/cross-crate-default-method-body-is-const.rs +++ b/tests/ui/traits/const-traits/cross-crate-default-method-body-is-const.rs @@ -3,8 +3,7 @@ // //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] //@ aux-build: cross-crate.rs extern crate cross_crate; diff --git a/tests/ui/traits/const-traits/cross-crate.rs b/tests/ui/traits/const-traits/cross-crate.rs index 30d2260a7449a..9558ec6164ede 100644 --- a/tests/ui/traits/const-traits/cross-crate.rs +++ b/tests/ui/traits/const-traits/cross-crate.rs @@ -1,7 +1,7 @@ //@ revisions: stock gated stocknc gatednc //@ [gated] check-pass //@ compile-flags: -Znext-solver -#![cfg_attr(any(gated, gatednc), feature(const_trait_impl, effects))] +#![cfg_attr(any(gated, gatednc), feature(const_trait_impl))] #![allow(incomplete_features)] //@ aux-build: cross-crate.rs diff --git a/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs b/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs index 0c2d93775a4d7..b3beba08237c1 100644 --- a/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs +++ b/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] pub trait Tr { diff --git a/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.stderr b/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.stderr index 7b4d512e39180..d987cad6f1451 100644 --- a/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.stderr +++ b/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `(): ~const Tr` is not satisfied - --> $DIR/default-method-body-is-const-same-trait-ck.rs:10:9 + --> $DIR/default-method-body-is-const-same-trait-ck.rs:9:9 | LL | ().a() | ^^^^^^ diff --git a/tests/ui/traits/const-traits/do-not-const-check-override.rs b/tests/ui/traits/const-traits/do-not-const-check-override.rs index 71e6375283fd8..2b8e1d38ac99f 100644 --- a/tests/ui/traits/const-traits/do-not-const-check-override.rs +++ b/tests/ui/traits/const-traits/do-not-const-check-override.rs @@ -1,7 +1,7 @@ //@ check-pass //@ compile-flags: -Znext-solver #![allow(incomplete_features)] -#![feature(const_trait_impl, rustc_attrs, effects)] +#![feature(const_trait_impl, rustc_attrs)] #[const_trait] trait Foo { diff --git a/tests/ui/traits/const-traits/do-not-const-check.rs b/tests/ui/traits/const-traits/do-not-const-check.rs index d227a9a9c094b..443b638573576 100644 --- a/tests/ui/traits/const-traits/do-not-const-check.rs +++ b/tests/ui/traits/const-traits/do-not-const-check.rs @@ -1,6 +1,5 @@ //@ check-pass -#![feature(const_trait_impl, rustc_attrs, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl, rustc_attrs)] #[const_trait] trait IntoIter { diff --git a/tests/ui/traits/const-traits/do-not-const-check.stderr b/tests/ui/traits/const-traits/do-not-const-check.stderr deleted file mode 100644 index 0d81ef74e8d31..0000000000000 --- a/tests/ui/traits/const-traits/do-not-const-check.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/do-not-const-check.rs:2:43 - | -LL | #![feature(const_trait_impl, rustc_attrs, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/const-traits/dont-observe-host-opaque.rs b/tests/ui/traits/const-traits/dont-observe-host-opaque.rs index 4a5ae346e3961..751ba1cb8c70c 100644 --- a/tests/ui/traits/const-traits/dont-observe-host-opaque.rs +++ b/tests/ui/traits/const-traits/dont-observe-host-opaque.rs @@ -1,8 +1,7 @@ //@ compile-flags: -Znext-solver //@ check-pass -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] const fn opaque() -> impl Sized {} diff --git a/tests/ui/traits/const-traits/dont-observe-host-opaque.stderr b/tests/ui/traits/const-traits/dont-observe-host-opaque.stderr deleted file mode 100644 index 1b457ab764327..0000000000000 --- a/tests/ui/traits/const-traits/dont-observe-host-opaque.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/dont-observe-host-opaque.rs:4:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/const-traits/dont-observe-host.rs b/tests/ui/traits/const-traits/dont-observe-host.rs index d027d578c42f3..06050385f9168 100644 --- a/tests/ui/traits/const-traits/dont-observe-host.rs +++ b/tests/ui/traits/const-traits/dont-observe-host.rs @@ -1,8 +1,7 @@ //@ compile-flags: -Znext-solver //@ check-pass -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] trait Trait { diff --git a/tests/ui/traits/const-traits/dont-observe-host.stderr b/tests/ui/traits/const-traits/dont-observe-host.stderr deleted file mode 100644 index 64ef611f011c0..0000000000000 --- a/tests/ui/traits/const-traits/dont-observe-host.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/dont-observe-host.rs:4:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/const-traits/effects/auxiliary/cross-crate.rs b/tests/ui/traits/const-traits/effects/auxiliary/cross-crate.rs index 779527e22d4ab..e02bf6a4d2c43 100644 --- a/tests/ui/traits/const-traits/effects/auxiliary/cross-crate.rs +++ b/tests/ui/traits/const-traits/effects/auxiliary/cross-crate.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] pub const fn foo() {} diff --git a/tests/ui/traits/const-traits/effects/const_closure-const_trait_impl-ice-113381.rs b/tests/ui/traits/const-traits/effects/const_closure-const_trait_impl-ice-113381.rs index 8f8e9f065845e..50a381c92bc39 100644 --- a/tests/ui/traits/const-traits/effects/const_closure-const_trait_impl-ice-113381.rs +++ b/tests/ui/traits/const-traits/effects/const_closure-const_trait_impl-ice-113381.rs @@ -1,5 +1,5 @@ //@ compile-flags: -Znext-solver -#![feature(const_closures, const_trait_impl, effects)] +#![feature(const_closures, const_trait_impl)] #![allow(incomplete_features)] trait Foo { diff --git a/tests/ui/traits/const-traits/effects/effect-param-infer.rs b/tests/ui/traits/const-traits/effects/effect-param-infer.rs index 958b9ac6d5773..fcacf458a9fa5 100644 --- a/tests/ui/traits/const-traits/effects/effect-param-infer.rs +++ b/tests/ui/traits/const-traits/effects/effect-param-infer.rs @@ -3,8 +3,7 @@ // //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] pub trait Foo { diff --git a/tests/ui/traits/const-traits/effects/fallback.rs b/tests/ui/traits/const-traits/effects/fallback.rs index 4cfba00526b0b..253d16f3251ca 100644 --- a/tests/ui/traits/const-traits/effects/fallback.rs +++ b/tests/ui/traits/const-traits/effects/fallback.rs @@ -1,7 +1,5 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(effects)] pub const fn owo() {} diff --git a/tests/ui/traits/const-traits/effects/helloworld.rs b/tests/ui/traits/const-traits/effects/helloworld.rs deleted file mode 100644 index 54f362b4413b9..0000000000000 --- a/tests/ui/traits/const-traits/effects/helloworld.rs +++ /dev/null @@ -1,33 +0,0 @@ -//@ check-pass -//@ compile-flags: -Znext-solver -// gate-test-effects -// ^ effects doesn't have a gate so we will trick tidy into thinking this is a gate test -#![allow(incomplete_features)] -#![feature( - const_trait_impl, - effects, - core_intrinsics, - const_eval_select -)] - -// ensure we are passing in the correct host effect in always const contexts. - -pub const fn hmm() -> usize { - // FIXME(const_trait_impl): maybe we should have a way to refer to the (hidden) effect param - fn one() -> usize { 1 } - const fn zero() -> usize { 0 } - unsafe { - std::intrinsics::const_eval_select((), zero, one) - } -} - -const _: () = { - let x = hmm::<()>(); - assert!(0 == x); -}; - -pub const fn uwu(x: [u8; hmm::<()>()]) { - let [] = x; -} - -fn main() {} diff --git a/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.rs b/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.rs index ab530b109e158..c467088ab3d3c 100644 --- a/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.rs +++ b/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.rs @@ -1,4 +1,4 @@ -#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] const fn test() -> impl ~const Fn() { //~^ ERROR `~const` can only be applied to `#[const_trait]` traits diff --git a/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.stderr b/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.stderr index 3618485603503..6d7edaf19f267 100644 --- a/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.stderr +++ b/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.stderr @@ -8,15 +8,6 @@ LL | const move || { = help: add `#![feature(const_closures)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/ice-112822-expected-type-for-param.rs:1:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error: `~const` can only be applied to `#[const_trait]` traits --> $DIR/ice-112822-expected-type-for-param.rs:3:25 | @@ -49,7 +40,7 @@ LL | assert_eq!(first, &b'f'); = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to 5 previous errors; 1 warning emitted +error: aborting due to 5 previous errors Some errors have detailed explanations: E0015, E0658. For more information about an error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/effects/ice-113375-index-out-of-bounds-generics.rs b/tests/ui/traits/const-traits/effects/ice-113375-index-out-of-bounds-generics.rs index 06e3377c5eec1..f3cbaf847a97f 100644 --- a/tests/ui/traits/const-traits/effects/ice-113375-index-out-of-bounds-generics.rs +++ b/tests/ui/traits/const-traits/effects/ice-113375-index-out-of-bounds-generics.rs @@ -3,7 +3,7 @@ // effects ice https://github.com/rust-lang/rust/issues/113375 index out of bounds #![allow(incomplete_features, unused)] -#![feature(effects, adt_const_params)] +#![feature(adt_const_params)] struct Bar(T); diff --git a/tests/ui/traits/const-traits/effects/infer-fallback.rs b/tests/ui/traits/const-traits/effects/infer-fallback.rs index 581c3949d3811..a7342d72a9c3b 100644 --- a/tests/ui/traits/const-traits/effects/infer-fallback.rs +++ b/tests/ui/traits/const-traits/effects/infer-fallback.rs @@ -1,7 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] const fn a() {} diff --git a/tests/ui/traits/const-traits/effects/minicore.rs b/tests/ui/traits/const-traits/effects/minicore.rs index 1f0d22eeb38bd..b739a4a2b69eb 100644 --- a/tests/ui/traits/const-traits/effects/minicore.rs +++ b/tests/ui/traits/const-traits/effects/minicore.rs @@ -7,13 +7,20 @@ //@ compile-flags: -Znext-solver #![crate_type = "lib"] -#![feature(no_core, lang_items, unboxed_closures, auto_traits, intrinsics, rustc_attrs, staged_api)] -#![feature(fundamental, marker_trait_attr)] -#![feature(const_trait_impl, effects)] +#![feature( + no_core, + lang_items, + unboxed_closures, + auto_traits, + intrinsics, + rustc_attrs, + fundamental, + marker_trait_attr, + const_trait_impl +)] #![allow(internal_features, incomplete_features)] #![no_std] #![no_core] -#![stable(feature = "minicore", since = "1.0.0")] #[lang = "sized"] trait Sized {} diff --git a/tests/ui/traits/const-traits/effects/no-explicit-const-params-cross-crate.stderr b/tests/ui/traits/const-traits/effects/no-explicit-const-params-cross-crate.stderr index eea6a06c1c818..d1180dbd80e68 100644 --- a/tests/ui/traits/const-traits/effects/no-explicit-const-params-cross-crate.stderr +++ b/tests/ui/traits/const-traits/effects/no-explicit-const-params-cross-crate.stderr @@ -7,7 +7,7 @@ LL | foo::(); | expected 0 generic arguments | note: function defined here, with 0 generic parameters - --> $DIR/auxiliary/cross-crate.rs:5:14 + --> $DIR/auxiliary/cross-crate.rs:4:14 | LL | pub const fn foo() {} | ^^^ @@ -21,7 +21,7 @@ LL | <() as Bar>::bar(); | expected 0 generic arguments | note: trait defined here, with 0 generic parameters - --> $DIR/auxiliary/cross-crate.rs:8:11 + --> $DIR/auxiliary/cross-crate.rs:7:11 | LL | pub trait Bar { | ^^^ @@ -35,7 +35,7 @@ LL | foo::(); | expected 0 generic arguments | note: function defined here, with 0 generic parameters - --> $DIR/auxiliary/cross-crate.rs:5:14 + --> $DIR/auxiliary/cross-crate.rs:4:14 | LL | pub const fn foo() {} | ^^^ @@ -49,7 +49,7 @@ LL | <() as Bar>::bar(); | expected 0 generic arguments | note: trait defined here, with 0 generic parameters - --> $DIR/auxiliary/cross-crate.rs:8:11 + --> $DIR/auxiliary/cross-crate.rs:7:11 | LL | pub trait Bar { | ^^^ diff --git a/tests/ui/traits/const-traits/effects/no-explicit-const-params.rs b/tests/ui/traits/const-traits/effects/no-explicit-const-params.rs index c6b94fa2230fe..76663292223b2 100644 --- a/tests/ui/traits/const-traits/effects/no-explicit-const-params.rs +++ b/tests/ui/traits/const-traits/effects/no-explicit-const-params.rs @@ -1,4 +1,4 @@ -#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] const fn foo() {} diff --git a/tests/ui/traits/const-traits/effects/no-explicit-const-params.stderr b/tests/ui/traits/const-traits/effects/no-explicit-const-params.stderr index bd9acc7a6d27b..0b8e4696c4613 100644 --- a/tests/ui/traits/const-traits/effects/no-explicit-const-params.stderr +++ b/tests/ui/traits/const-traits/effects/no-explicit-const-params.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/no-explicit-const-params.rs:1:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied --> $DIR/no-explicit-const-params.rs:22:5 | @@ -69,7 +60,7 @@ note: trait defined here, with 0 generic parameters LL | trait Bar { | ^^^ -error: aborting due to 5 previous errors; 1 warning emitted +error: aborting due to 5 previous errors Some errors have detailed explanations: E0107, E0277. For more information about an error, try `rustc --explain E0107`. diff --git a/tests/ui/traits/const-traits/effects/project.rs b/tests/ui/traits/const-traits/effects/project.rs index 9f6ca1f294f01..139299753e5c7 100644 --- a/tests/ui/traits/const-traits/effects/project.rs +++ b/tests/ui/traits/const-traits/effects/project.rs @@ -1,7 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![feature(const_trait_impl, effects)] -#![allow(incomplete_features)] +#![feature(const_trait_impl)] #[const_trait] pub trait Owo::T> {} diff --git a/tests/ui/traits/const-traits/effects/span-bug-issue-121418.rs b/tests/ui/traits/const-traits/effects/span-bug-issue-121418.rs index e6e41c472bdc7..50a7e12f2a78a 100644 --- a/tests/ui/traits/const-traits/effects/span-bug-issue-121418.rs +++ b/tests/ui/traits/const-traits/effects/span-bug-issue-121418.rs @@ -1,5 +1,4 @@ #![feature(const_trait_impl)] -#![feature(effects)] //~ WARN the feature `effects` is incomplete struct S; trait T {} diff --git a/tests/ui/traits/const-traits/effects/span-bug-issue-121418.stderr b/tests/ui/traits/const-traits/effects/span-bug-issue-121418.stderr index 97663232fcf73..fe1e5e558b28c 100644 --- a/tests/ui/traits/const-traits/effects/span-bug-issue-121418.stderr +++ b/tests/ui/traits/const-traits/effects/span-bug-issue-121418.stderr @@ -1,5 +1,5 @@ error: inherent impls cannot be `const` - --> $DIR/span-bug-issue-121418.rs:7:12 + --> $DIR/span-bug-issue-121418.rs:6:12 | LL | impl const dyn T { | ----- ^^^^^ inherent impl for this type @@ -8,17 +8,8 @@ LL | impl const dyn T { | = note: only trait implementations may be annotated with `const` -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/span-bug-issue-121418.rs:2:12 - | -LL | #![feature(effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0308]: mismatched types - --> $DIR/span-bug-issue-121418.rs:9:27 + --> $DIR/span-bug-issue-121418.rs:8:27 | LL | pub const fn new() -> std::sync::Mutex {} | --- ^^^^^^^^^^^^^^^^^^^^^^^ expected `Mutex`, found `()` @@ -29,7 +20,7 @@ LL | pub const fn new() -> std::sync::Mutex {} found unit type `()` error[E0277]: the size for values of type `(dyn T + 'static)` cannot be known at compilation time - --> $DIR/span-bug-issue-121418.rs:9:27 + --> $DIR/span-bug-issue-121418.rs:8:27 | LL | pub const fn new() -> std::sync::Mutex {} | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time @@ -39,7 +30,7 @@ note: required because it appears within the type `Mutex<(dyn T + 'static)>` --> $SRC_DIR/std/src/sync/mutex.rs:LL:COL = note: the return type of a function must have a statically known size -error: aborting due to 3 previous errors; 1 warning emitted +error: aborting due to 3 previous errors Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/tests/ui/traits/const-traits/effects/spec-effectvar-ice.rs b/tests/ui/traits/const-traits/effects/spec-effectvar-ice.rs index d29cd93d3fb72..c85b174696757 100644 --- a/tests/ui/traits/const-traits/effects/spec-effectvar-ice.rs +++ b/tests/ui/traits/const-traits/effects/spec-effectvar-ice.rs @@ -1,6 +1,5 @@ // Fixes #119830 -#![feature(effects)] //~ WARN the feature `effects` is incomplete #![feature(min_specialization)] #![feature(const_trait_impl)] diff --git a/tests/ui/traits/const-traits/effects/spec-effectvar-ice.stderr b/tests/ui/traits/const-traits/effects/spec-effectvar-ice.stderr index 273f994321259..5659102c5e5c4 100644 --- a/tests/ui/traits/const-traits/effects/spec-effectvar-ice.stderr +++ b/tests/ui/traits/const-traits/effects/spec-effectvar-ice.stderr @@ -1,14 +1,5 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/spec-effectvar-ice.rs:3:12 - | -LL | #![feature(effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error: const `impl` for trait `Foo` which is not marked with `#[const_trait]` - --> $DIR/spec-effectvar-ice.rs:11:15 + --> $DIR/spec-effectvar-ice.rs:10:15 | LL | trait Foo {} | - help: mark `Foo` as const: `#[const_trait]` @@ -20,7 +11,7 @@ LL | impl const Foo for T {} = note: adding a non-const method body in the future would be a breaking change error: const `impl` for trait `Foo` which is not marked with `#[const_trait]` - --> $DIR/spec-effectvar-ice.rs:14:15 + --> $DIR/spec-effectvar-ice.rs:13:15 | LL | trait Foo {} | - help: mark `Foo` as const: `#[const_trait]` @@ -32,28 +23,28 @@ LL | impl const Foo for T where T: const Specialize {} = note: adding a non-const method body in the future would be a breaking change error: `const` can only be applied to `#[const_trait]` traits - --> $DIR/spec-effectvar-ice.rs:14:34 + --> $DIR/spec-effectvar-ice.rs:13:34 | LL | impl const Foo for T where T: const Specialize {} | ^^^^^ error: specialization impl does not specialize any associated items - --> $DIR/spec-effectvar-ice.rs:14:1 + --> $DIR/spec-effectvar-ice.rs:13:1 | LL | impl const Foo for T where T: const Specialize {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: impl is a specialization of this impl - --> $DIR/spec-effectvar-ice.rs:11:1 + --> $DIR/spec-effectvar-ice.rs:10:1 | LL | impl const Foo for T {} | ^^^^^^^^^^^^^^^^^^^^^^^ error: cannot specialize on trait `Specialize` - --> $DIR/spec-effectvar-ice.rs:14:34 + --> $DIR/spec-effectvar-ice.rs:13:34 | LL | impl const Foo for T where T: const Specialize {} | ^^^^^^^^^^^^^^^^ -error: aborting due to 5 previous errors; 1 warning emitted +error: aborting due to 5 previous errors diff --git a/tests/ui/traits/const-traits/effects/trait-fn-const.rs b/tests/ui/traits/const-traits/effects/trait-fn-const.rs index d63dbfbf57d4a..07eac032a82a6 100644 --- a/tests/ui/traits/const-traits/effects/trait-fn-const.rs +++ b/tests/ui/traits/const-traits/effects/trait-fn-const.rs @@ -1,5 +1,5 @@ // Regression test for issue #113378. -#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] trait Trait { diff --git a/tests/ui/traits/const-traits/effects/trait-fn-const.stderr b/tests/ui/traits/const-traits/effects/trait-fn-const.stderr index 33914cb306dc6..4d0b03046d27d 100644 --- a/tests/ui/traits/const-traits/effects/trait-fn-const.stderr +++ b/tests/ui/traits/const-traits/effects/trait-fn-const.stderr @@ -54,15 +54,6 @@ LL + #[const_trait] LL | trait NonConst { | -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/trait-fn-const.rs:2:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - -error: aborting due to 4 previous errors; 1 warning emitted +error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0379`. diff --git a/tests/ui/traits/const-traits/fn-ptr-lub.rs b/tests/ui/traits/const-traits/fn-ptr-lub.rs index 0fc326788270d..8f1a29e612c98 100644 --- a/tests/ui/traits/const-traits/fn-ptr-lub.rs +++ b/tests/ui/traits/const-traits/fn-ptr-lub.rs @@ -1,8 +1,7 @@ //@ compile-flags: -Znext-solver //@ check-pass -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] const fn foo() {} const fn bar() {} diff --git a/tests/ui/traits/const-traits/fn-ptr-lub.stderr b/tests/ui/traits/const-traits/fn-ptr-lub.stderr deleted file mode 100644 index b333311b660e7..0000000000000 --- a/tests/ui/traits/const-traits/fn-ptr-lub.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/fn-ptr-lub.rs:4:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/const-traits/hir-const-check.rs b/tests/ui/traits/const-traits/hir-const-check.rs index 0ffd60682b0c7..ea1783b7c2cc7 100644 --- a/tests/ui/traits/const-traits/hir-const-check.rs +++ b/tests/ui/traits/const-traits/hir-const-check.rs @@ -2,7 +2,7 @@ // Regression test for #69615. -#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] pub trait MyTrait { diff --git a/tests/ui/traits/const-traits/hir-const-check.stderr b/tests/ui/traits/const-traits/hir-const-check.stderr index a22ac2c973979..ef5dba0dc0e6b 100644 --- a/tests/ui/traits/const-traits/hir-const-check.stderr +++ b/tests/ui/traits/const-traits/hir-const-check.stderr @@ -1,12 +1,3 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/hir-const-check.rs:5:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0658]: `?` is not allowed in a `const fn` --> $DIR/hir-const-check.rs:14:9 | @@ -37,7 +28,7 @@ note: impl defined here, but it is not `const` --> $SRC_DIR/core/src/option.rs:LL:COL = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -error: aborting due to 3 previous errors; 1 warning emitted +error: aborting due to 3 previous errors Some errors have detailed explanations: E0015, E0658. For more information about an error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/ice-119717-constant-lifetime.rs b/tests/ui/traits/const-traits/ice-119717-constant-lifetime.rs index c2f452a9925c6..dc1e719bded1a 100644 --- a/tests/ui/traits/const-traits/ice-119717-constant-lifetime.rs +++ b/tests/ui/traits/const-traits/ice-119717-constant-lifetime.rs @@ -1,5 +1,5 @@ #![allow(incomplete_features)] -#![feature(const_trait_impl, effects, try_trait_v2)] +#![feature(const_trait_impl, try_trait_v2)] use std::ops::FromResidual; diff --git a/tests/ui/traits/const-traits/ice-120503-async-const-method.rs b/tests/ui/traits/const-traits/ice-120503-async-const-method.rs index 9cd18d4566da1..4c337a42a68a7 100644 --- a/tests/ui/traits/const-traits/ice-120503-async-const-method.rs +++ b/tests/ui/traits/const-traits/ice-120503-async-const-method.rs @@ -1,5 +1,4 @@ //@ edition: 2021 -#![feature(effects)] //~ WARN the feature `effects` is incomplete trait MyTrait {} diff --git a/tests/ui/traits/const-traits/ice-120503-async-const-method.stderr b/tests/ui/traits/const-traits/ice-120503-async-const-method.stderr index 1a11aec4b2619..66862d97bf914 100644 --- a/tests/ui/traits/const-traits/ice-120503-async-const-method.stderr +++ b/tests/ui/traits/const-traits/ice-120503-async-const-method.stderr @@ -1,5 +1,5 @@ error: expected one of `extern`, `fn`, `safe`, or `unsafe`, found keyword `const` - --> $DIR/ice-120503-async-const-method.rs:7:11 + --> $DIR/ice-120503-async-const-method.rs:6:11 | LL | async const fn bar(&self) { | ------^^^^^ @@ -10,7 +10,7 @@ LL | async const fn bar(&self) { = note: keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern` error[E0379]: functions in trait impls cannot be declared const - --> $DIR/ice-120503-async-const-method.rs:7:11 + --> $DIR/ice-120503-async-const-method.rs:6:11 | LL | async const fn bar(&self) { | ^^^^^- @@ -19,7 +19,7 @@ LL | async const fn bar(&self) { | help: remove the `const` error: functions cannot be both `const` and `async` - --> $DIR/ice-120503-async-const-method.rs:7:5 + --> $DIR/ice-120503-async-const-method.rs:6:5 | LL | async const fn bar(&self) { | -^^^^ ^^^^^ `const` because of this @@ -35,7 +35,7 @@ LL | | } | |_____- error[E0407]: method `bar` is not a member of trait `MyTrait` - --> $DIR/ice-120503-async-const-method.rs:7:5 + --> $DIR/ice-120503-async-const-method.rs:6:5 | LL | / async const fn bar(&self) { LL | | @@ -46,17 +46,8 @@ LL | | LL | | } | |_____^ not a member of trait `MyTrait` -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/ice-120503-async-const-method.rs:2:12 - | -LL | #![feature(effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0425]: cannot find function `main8` in this scope - --> $DIR/ice-120503-async-const-method.rs:12:9 + --> $DIR/ice-120503-async-const-method.rs:11:9 | LL | main8().await; | ^^^^^ help: a function with a similar name exists: `main` @@ -64,7 +55,7 @@ LL | main8().await; LL | fn main() {} | --------- similarly named function `main` defined here -error: aborting due to 5 previous errors; 1 warning emitted +error: aborting due to 5 previous errors Some errors have detailed explanations: E0379, E0407, E0425. For more information about an error, try `rustc --explain E0379`. diff --git a/tests/ui/traits/const-traits/ice-121536-const-method.rs b/tests/ui/traits/const-traits/ice-121536-const-method.rs index a01329278d78a..b89786bfd933f 100644 --- a/tests/ui/traits/const-traits/ice-121536-const-method.rs +++ b/tests/ui/traits/const-traits/ice-121536-const-method.rs @@ -1,4 +1,4 @@ -#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] pub struct Vec3; diff --git a/tests/ui/traits/const-traits/ice-121536-const-method.stderr b/tests/ui/traits/const-traits/ice-121536-const-method.stderr index 4fe88f263c81b..408958abf6307 100644 --- a/tests/ui/traits/const-traits/ice-121536-const-method.stderr +++ b/tests/ui/traits/const-traits/ice-121536-const-method.stderr @@ -14,15 +14,6 @@ help: ... and declare the impl to be const instead LL | impl const Add for Vec3 { | +++++ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/ice-121536-const-method.rs:1:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - -error: aborting due to 1 previous error; 1 warning emitted +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0379`. diff --git a/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.rs b/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.rs index 29f40604747b2..fadcaa3981670 100644 --- a/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.rs +++ b/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.rs @@ -1,5 +1,5 @@ #![allow(incomplete_features)] -#![feature(generic_const_exprs, const_trait_impl, effects)] +#![feature(generic_const_exprs, const_trait_impl)] const fn with_positive() {} //~^ ERROR `~const` can only be applied to `#[const_trait]` traits diff --git a/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.rs b/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.rs index d4fcbfb1b83e6..d6df1714314aa 100644 --- a/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.rs +++ b/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.rs @@ -1,7 +1,6 @@ //@ compile-flags: -Znext-solver=coherence -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Foo {} diff --git a/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.stderr b/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.stderr index 0b1f8b40898e3..183c2c2cdf4a6 100644 --- a/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.stderr +++ b/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `Foo` for type `i32` - --> $DIR/ice-124857-combine-effect-const-infer-vars.rs:11:1 + --> $DIR/ice-124857-combine-effect-const-infer-vars.rs:10:1 | LL | impl const Foo for i32 {} | ---------------------- first implementation here diff --git a/tests/ui/traits/const-traits/ice-126148-failed-to-normalize.rs b/tests/ui/traits/const-traits/ice-126148-failed-to-normalize.rs index da97a0e70ed73..9ce81031b2704 100644 --- a/tests/ui/traits/const-traits/ice-126148-failed-to-normalize.rs +++ b/tests/ui/traits/const-traits/ice-126148-failed-to-normalize.rs @@ -1,5 +1,5 @@ #![allow(incomplete_features)] -#![feature(const_trait_impl, effects, try_trait_v2, const_try)] +#![feature(const_trait_impl, try_trait_v2, const_try)] use std::ops::{FromResidual, Try}; struct TryMe; diff --git a/tests/ui/traits/const-traits/impl-with-default-fn-fail.rs b/tests/ui/traits/const-traits/impl-with-default-fn-fail.rs index 49741ca24c7e7..6df9696f2cbd7 100644 --- a/tests/ui/traits/const-traits/impl-with-default-fn-fail.rs +++ b/tests/ui/traits/const-traits/impl-with-default-fn-fail.rs @@ -1,5 +1,4 @@ -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Tr { diff --git a/tests/ui/traits/const-traits/impl-with-default-fn-fail.stderr b/tests/ui/traits/const-traits/impl-with-default-fn-fail.stderr index 0135296526f96..36c8163f1c567 100644 --- a/tests/ui/traits/const-traits/impl-with-default-fn-fail.stderr +++ b/tests/ui/traits/const-traits/impl-with-default-fn-fail.stderr @@ -1,5 +1,5 @@ error[E0046]: not all trait items implemented, missing: `req` - --> $DIR/impl-with-default-fn-fail.rs:13:1 + --> $DIR/impl-with-default-fn-fail.rs:12:1 | LL | fn req(&self); | -------------- `req` from trait diff --git a/tests/ui/traits/const-traits/impl-with-default-fn-pass.rs b/tests/ui/traits/const-traits/impl-with-default-fn-pass.rs index 2c375036941c0..c776a29716ff7 100644 --- a/tests/ui/traits/const-traits/impl-with-default-fn-pass.rs +++ b/tests/ui/traits/const-traits/impl-with-default-fn-pass.rs @@ -1,7 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Tr { diff --git a/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.rs b/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.rs index 8638c4bbd7f18..86cb38e0bcfd5 100644 --- a/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.rs +++ b/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.rs @@ -8,8 +8,7 @@ //@ compile-flags: -Znext-solver -Zinline-mir=yes -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] trait Trait { fn foo(self); diff --git a/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.stderr b/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.stderr index 096b00dd30293..c4547f4c43d1f 100644 --- a/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.stderr +++ b/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.stderr @@ -1,14 +1,5 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/inline-incorrect-early-bound-in-ctfe.rs:11:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0049]: method `foo` has 1 type parameter but its trait declaration has 0 type parameters - --> $DIR/inline-incorrect-early-bound-in-ctfe.rs:20:12 + --> $DIR/inline-incorrect-early-bound-in-ctfe.rs:19:12 | LL | fn foo(self); | - expected 0 type parameters @@ -17,14 +8,14 @@ LL | fn foo(self) { | ^ found 1 type parameter error[E0015]: cannot call non-const fn `<() as Trait>::foo` in constant functions - --> $DIR/inline-incorrect-early-bound-in-ctfe.rs:27:8 + --> $DIR/inline-incorrect-early-bound-in-ctfe.rs:26:8 | LL | ().foo(); | ^^^^^ | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors Some errors have detailed explanations: E0015, E0049. For more information about an error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/issue-100222.rs b/tests/ui/traits/const-traits/issue-100222.rs index 13c469d656cfc..55722d35075a2 100644 --- a/tests/ui/traits/const-traits/issue-100222.rs +++ b/tests/ui/traits/const-traits/issue-100222.rs @@ -3,7 +3,7 @@ //@ check-pass #![allow(incomplete_features)] -#![feature(const_trait_impl, effects, associated_type_defaults)] +#![feature(const_trait_impl, associated_type_defaults)] #[cfg_attr(any(yn, yy), const_trait)] pub trait Index { diff --git a/tests/ui/traits/const-traits/issue-79450.rs b/tests/ui/traits/const-traits/issue-79450.rs index cdefebc87d675..521576d27ef9d 100644 --- a/tests/ui/traits/const-traits/issue-79450.rs +++ b/tests/ui/traits/const-traits/issue-79450.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Tr { diff --git a/tests/ui/traits/const-traits/issue-79450.stderr b/tests/ui/traits/const-traits/issue-79450.stderr index 49f380c1a2b57..85996c212118f 100644 --- a/tests/ui/traits/const-traits/issue-79450.stderr +++ b/tests/ui/traits/const-traits/issue-79450.stderr @@ -1,5 +1,5 @@ error[E0015]: cannot call non-const fn `_print` in constant functions - --> $DIR/issue-79450.rs:10:9 + --> $DIR/issue-79450.rs:9:9 | LL | println!("lul"); | ^^^^^^^^^^^^^^^ diff --git a/tests/ui/traits/const-traits/issue-92230-wf-super-trait-env.rs b/tests/ui/traits/const-traits/issue-92230-wf-super-trait-env.rs index e666355db6ffc..a3edc5ff8b107 100644 --- a/tests/ui/traits/const-traits/issue-92230-wf-super-trait-env.rs +++ b/tests/ui/traits/const-traits/issue-92230-wf-super-trait-env.rs @@ -3,8 +3,7 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![feature(const_trait_impl, effects)] -#![allow(incomplete_features)] +#![feature(const_trait_impl)] #[const_trait] pub trait Super {} diff --git a/tests/ui/traits/const-traits/item-bound-entailment-fails.rs b/tests/ui/traits/const-traits/item-bound-entailment-fails.rs index 42799e3700ca4..f4bfcbda0ac44 100644 --- a/tests/ui/traits/const-traits/item-bound-entailment-fails.rs +++ b/tests/ui/traits/const-traits/item-bound-entailment-fails.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] trait Foo { type Assoc: ~const Bar diff --git a/tests/ui/traits/const-traits/item-bound-entailment-fails.stderr b/tests/ui/traits/const-traits/item-bound-entailment-fails.stderr index 054a8ac757794..3fc6f58470947 100644 --- a/tests/ui/traits/const-traits/item-bound-entailment-fails.stderr +++ b/tests/ui/traits/const-traits/item-bound-entailment-fails.stderr @@ -1,36 +1,27 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/item-bound-entailment-fails.rs:2:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0277]: the trait bound `N: ~const Bar` is not satisfied - --> $DIR/item-bound-entailment-fails.rs:18:21 + --> $DIR/item-bound-entailment-fails.rs:17:21 | LL | type Assoc = N | ^^^^ | note: required by a bound in `Foo::Assoc` - --> $DIR/item-bound-entailment-fails.rs:6:20 + --> $DIR/item-bound-entailment-fails.rs:5:20 | LL | type Assoc: ~const Bar | ^^^^^^ required by this bound in `Foo::Assoc` error[E0277]: the trait bound `T: ~const Bar` is not satisfied - --> $DIR/item-bound-entailment-fails.rs:25:21 + --> $DIR/item-bound-entailment-fails.rs:24:21 | LL | type Assoc = C | ^^^^ | note: required by a bound in `Foo::Assoc` - --> $DIR/item-bound-entailment-fails.rs:6:20 + --> $DIR/item-bound-entailment-fails.rs:5:20 | LL | type Assoc: ~const Bar | ^^^^^^ required by this bound in `Foo::Assoc` -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/traits/const-traits/item-bound-entailment.rs b/tests/ui/traits/const-traits/item-bound-entailment.rs index 3670eabd66c0f..11db57be81513 100644 --- a/tests/ui/traits/const-traits/item-bound-entailment.rs +++ b/tests/ui/traits/const-traits/item-bound-entailment.rs @@ -1,8 +1,7 @@ //@ compile-flags: -Znext-solver //@ check-pass -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] trait Foo { type Assoc: ~const Bar diff --git a/tests/ui/traits/const-traits/item-bound-entailment.stderr b/tests/ui/traits/const-traits/item-bound-entailment.stderr deleted file mode 100644 index b4a4ebdbee274..0000000000000 --- a/tests/ui/traits/const-traits/item-bound-entailment.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/item-bound-entailment.rs:4:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/const-traits/predicate-entailment-fails.rs b/tests/ui/traits/const-traits/predicate-entailment-fails.rs index 5d6109bfad3a0..266a49f9e386d 100644 --- a/tests/ui/traits/const-traits/predicate-entailment-fails.rs +++ b/tests/ui/traits/const-traits/predicate-entailment-fails.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] trait Bar {} impl const Bar for () {} diff --git a/tests/ui/traits/const-traits/predicate-entailment-fails.stderr b/tests/ui/traits/const-traits/predicate-entailment-fails.stderr index c50009e9b8c49..369e95688a9b2 100644 --- a/tests/ui/traits/const-traits/predicate-entailment-fails.stderr +++ b/tests/ui/traits/const-traits/predicate-entailment-fails.stderr @@ -1,14 +1,5 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/predicate-entailment-fails.rs:2:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0276]: impl has stricter requirements than trait - --> $DIR/predicate-entailment-fails.rs:15:31 + --> $DIR/predicate-entailment-fails.rs:14:31 | LL | type Bar where T: ~const Bar; | ----------- definition of `Bar` from trait @@ -17,7 +8,7 @@ LL | type Bar = () where T: const Bar; | ^^^^^ impl has extra requirement `T: const Bar` error[E0276]: impl has stricter requirements than trait - --> $DIR/predicate-entailment-fails.rs:18:26 + --> $DIR/predicate-entailment-fails.rs:17:26 | LL | fn foo() where T: ~const Bar; | -------------------------------- definition of `foo` from trait @@ -26,7 +17,7 @@ LL | fn foo() where T: const Bar {} | ^^^^^ impl has extra requirement `T: const Bar` error[E0276]: impl has stricter requirements than trait - --> $DIR/predicate-entailment-fails.rs:29:31 + --> $DIR/predicate-entailment-fails.rs:28:31 | LL | type Bar where T: Bar; | ----------- definition of `Bar` from trait @@ -35,7 +26,7 @@ LL | type Bar = () where T: const Bar; | ^^^^^ impl has extra requirement `T: const Bar` error[E0276]: impl has stricter requirements than trait - --> $DIR/predicate-entailment-fails.rs:32:26 + --> $DIR/predicate-entailment-fails.rs:31:26 | LL | fn foo() where T: Bar; | ------------------------- definition of `foo` from trait @@ -44,7 +35,7 @@ LL | fn foo() where T: const Bar {} | ^^^^^ impl has extra requirement `T: const Bar` error[E0276]: impl has stricter requirements than trait - --> $DIR/predicate-entailment-fails.rs:36:31 + --> $DIR/predicate-entailment-fails.rs:35:31 | LL | type Bar where T: Bar; | ----------- definition of `Bar` from trait @@ -53,7 +44,7 @@ LL | type Bar = () where T: ~const Bar; | ^^^^^^ impl has extra requirement `T: ~const Bar` error[E0276]: impl has stricter requirements than trait - --> $DIR/predicate-entailment-fails.rs:39:26 + --> $DIR/predicate-entailment-fails.rs:38:26 | LL | fn foo() where T: Bar; | ------------------------- definition of `foo` from trait @@ -61,6 +52,6 @@ LL | fn foo() where T: Bar; LL | fn foo() where T: ~const Bar {} | ^^^^^^ impl has extra requirement `T: ~const Bar` -error: aborting due to 6 previous errors; 1 warning emitted +error: aborting due to 6 previous errors For more information about this error, try `rustc --explain E0276`. diff --git a/tests/ui/traits/const-traits/predicate-entailment-passes.rs b/tests/ui/traits/const-traits/predicate-entailment-passes.rs index b660329151bec..9c8d5a5e3f6ad 100644 --- a/tests/ui/traits/const-traits/predicate-entailment-passes.rs +++ b/tests/ui/traits/const-traits/predicate-entailment-passes.rs @@ -1,8 +1,7 @@ //@ compile-flags: -Znext-solver //@ check-pass -#![feature(const_trait_impl, effects)] -//~^ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #[const_trait] trait Bar {} impl const Bar for () {} diff --git a/tests/ui/traits/const-traits/predicate-entailment-passes.stderr b/tests/ui/traits/const-traits/predicate-entailment-passes.stderr deleted file mode 100644 index dcaeea73b580d..0000000000000 --- a/tests/ui/traits/const-traits/predicate-entailment-passes.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/predicate-entailment-passes.rs:4:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/const-traits/specialization/const-default-const-specialized.stderr b/tests/ui/traits/const-traits/specialization/const-default-const-specialized.stderr deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/tests/ui/traits/const-traits/specialization/const-default-impl-non-const-specialized-impl.rs b/tests/ui/traits/const-traits/specialization/const-default-impl-non-const-specialized-impl.rs index 40fc3b17ae48b..a3bb9b3f93eda 100644 --- a/tests/ui/traits/const-traits/specialization/const-default-impl-non-const-specialized-impl.rs +++ b/tests/ui/traits/const-traits/specialization/const-default-impl-non-const-specialized-impl.rs @@ -1,6 +1,6 @@ // Tests that specializing trait impls must be at least as const as the default impl. -#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl)] #![feature(min_specialization)] #[const_trait] diff --git a/tests/ui/traits/const-traits/specialization/const-default-impl-non-const-specialized-impl.stderr b/tests/ui/traits/const-traits/specialization/const-default-impl-non-const-specialized-impl.stderr index 363fbee1f8bfb..e356621ba47ed 100644 --- a/tests/ui/traits/const-traits/specialization/const-default-impl-non-const-specialized-impl.stderr +++ b/tests/ui/traits/const-traits/specialization/const-default-impl-non-const-specialized-impl.stderr @@ -1,17 +1,8 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/const-default-impl-non-const-specialized-impl.rs:3:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error: cannot specialize on const impl with non-const impl --> $DIR/const-default-impl-non-const-specialized-impl.rs:19:1 | LL | impl Value for FortyTwo { | ^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 1 previous error; 1 warning emitted +error: aborting due to 1 previous error diff --git a/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.stderr b/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.stderr deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/tests/ui/traits/const-traits/specializing-constness.rs b/tests/ui/traits/const-traits/specializing-constness.rs index 3aabaf137d54c..0a28da9e65e64 100644 --- a/tests/ui/traits/const-traits/specializing-constness.rs +++ b/tests/ui/traits/const-traits/specializing-constness.rs @@ -1,4 +1,4 @@ -#![feature(const_trait_impl, effects, min_specialization, rustc_attrs)] //~ WARN the feature `effects` is incomplete +#![feature(const_trait_impl, min_specialization, rustc_attrs)] #[rustc_specialization_trait] #[const_trait] diff --git a/tests/ui/traits/const-traits/specializing-constness.stderr b/tests/ui/traits/const-traits/specializing-constness.stderr index 226295bf949df..21e21c2cb71aa 100644 --- a/tests/ui/traits/const-traits/specializing-constness.stderr +++ b/tests/ui/traits/const-traits/specializing-constness.stderr @@ -1,17 +1,8 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/specializing-constness.rs:1:30 - | -LL | #![feature(const_trait_impl, effects, min_specialization, rustc_attrs)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - error: cannot specialize on const impl with non-const impl --> $DIR/specializing-constness.rs:23:1 | LL | impl A for T { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 1 previous error; 1 warning emitted +error: aborting due to 1 previous error diff --git a/tests/ui/traits/const-traits/staged-api.rs b/tests/ui/traits/const-traits/staged-api.rs index 59fe6d52d5d78..401a81d81425e 100644 --- a/tests/ui/traits/const-traits/staged-api.rs +++ b/tests/ui/traits/const-traits/staged-api.rs @@ -3,8 +3,7 @@ #![cfg_attr(unstable, feature(unstable))] // The feature from the ./auxiliary/staged-api.rs file. #![cfg_attr(unstable, feature(local_feature))] -#![feature(const_trait_impl, effects)] -#![allow(incomplete_features)] +#![feature(const_trait_impl)] #![feature(staged_api)] #![stable(feature = "rust1", since = "1.0.0")] diff --git a/tests/ui/traits/const-traits/staged-api.stable.stderr b/tests/ui/traits/const-traits/staged-api.stable.stderr index 40045081f93cc..8f491b2f18238 100644 --- a/tests/ui/traits/const-traits/staged-api.stable.stderr +++ b/tests/ui/traits/const-traits/staged-api.stable.stderr @@ -1,5 +1,5 @@ error: trait implementations cannot be const stable yet - --> $DIR/staged-api.rs:22:1 + --> $DIR/staged-api.rs:21:1 | LL | / impl const MyTrait for Foo { LL | | @@ -10,7 +10,7 @@ LL | | } = note: see issue #67792 for more information error: function has missing const stability attribute - --> $DIR/staged-api.rs:49:1 + --> $DIR/staged-api.rs:48:1 | LL | / pub const fn const_context_not_const_stable() { LL | | @@ -22,7 +22,7 @@ LL | | } | |_^ error: `::func` is not yet stable as a const fn - --> $DIR/staged-api.rs:35:5 + --> $DIR/staged-api.rs:34:5 | LL | Unstable::func(); | ^^^^^^^^^^^^^^^^ @@ -30,7 +30,7 @@ LL | Unstable::func(); = help: add `#![feature(unstable)]` to the crate attributes to enable error: `::func` cannot be (indirectly) exposed to stable - --> $DIR/staged-api.rs:38:5 + --> $DIR/staged-api.rs:37:5 | LL | Foo::func(); | ^^^^^^^^^^^ @@ -38,7 +38,7 @@ LL | Foo::func(); = help: either mark the callee as `#[rustc_const_stable_indirect]`, or the caller as `#[rustc_const_unstable]` error: `::func` is not yet stable as a const fn - --> $DIR/staged-api.rs:42:5 + --> $DIR/staged-api.rs:41:5 | LL | Unstable2::func(); | ^^^^^^^^^^^^^^^^^ @@ -46,7 +46,7 @@ LL | Unstable2::func(); = help: add `#![feature(unstable2)]` to the crate attributes to enable error: `::func` is not yet stable as a const fn - --> $DIR/staged-api.rs:51:5 + --> $DIR/staged-api.rs:50:5 | LL | Unstable::func(); | ^^^^^^^^^^^^^^^^ @@ -54,7 +54,7 @@ LL | Unstable::func(); = help: add `#![feature(unstable)]` to the crate attributes to enable error: `::func` cannot be (indirectly) exposed to stable - --> $DIR/staged-api.rs:53:5 + --> $DIR/staged-api.rs:52:5 | LL | Foo::func(); | ^^^^^^^^^^^ @@ -62,7 +62,7 @@ LL | Foo::func(); = help: either mark the callee as `#[rustc_const_stable_indirect]`, or the caller as `#[rustc_const_unstable]` error: `::func` is not yet stable as a const fn - --> $DIR/staged-api.rs:56:5 + --> $DIR/staged-api.rs:55:5 | LL | Unstable2::func(); | ^^^^^^^^^^^^^^^^^ @@ -70,7 +70,7 @@ LL | Unstable2::func(); = help: add `#![feature(unstable2)]` to the crate attributes to enable error: `::func` is not yet stable as a const fn - --> $DIR/staged-api.rs:64:5 + --> $DIR/staged-api.rs:63:5 | LL | Unstable::func(); | ^^^^^^^^^^^^^^^^ @@ -78,7 +78,7 @@ LL | Unstable::func(); = help: add `#![feature(unstable)]` to the crate attributes to enable error: `::func` cannot be (indirectly) exposed to stable - --> $DIR/staged-api.rs:67:5 + --> $DIR/staged-api.rs:66:5 | LL | Foo::func(); | ^^^^^^^^^^^ diff --git a/tests/ui/traits/const-traits/staged-api.unstable.stderr b/tests/ui/traits/const-traits/staged-api.unstable.stderr index 64b3a8ab19f13..76275452e90c4 100644 --- a/tests/ui/traits/const-traits/staged-api.unstable.stderr +++ b/tests/ui/traits/const-traits/staged-api.unstable.stderr @@ -1,5 +1,5 @@ error: const function that might be (indirectly) exposed to stable cannot use `#[feature(unstable)]` - --> $DIR/staged-api.rs:35:5 + --> $DIR/staged-api.rs:34:5 | LL | Unstable::func(); | ^^^^^^^^^^^^^^^^ @@ -17,7 +17,7 @@ LL | const fn const_context() { | error: const function that might be (indirectly) exposed to stable cannot use `#[feature(local_feature)]` - --> $DIR/staged-api.rs:38:5 + --> $DIR/staged-api.rs:37:5 | LL | Foo::func(); | ^^^^^^^^^^^ @@ -35,7 +35,7 @@ LL | const fn const_context() { | error: `::func` is not yet stable as a const fn - --> $DIR/staged-api.rs:42:5 + --> $DIR/staged-api.rs:41:5 | LL | Unstable2::func(); | ^^^^^^^^^^^^^^^^^ @@ -43,7 +43,7 @@ LL | Unstable2::func(); = help: add `#![feature(unstable2)]` to the crate attributes to enable error: `::func` is not yet stable as a const fn - --> $DIR/staged-api.rs:56:5 + --> $DIR/staged-api.rs:55:5 | LL | Unstable2::func(); | ^^^^^^^^^^^^^^^^^ @@ -51,7 +51,7 @@ LL | Unstable2::func(); = help: add `#![feature(unstable2)]` to the crate attributes to enable error: const function that might be (indirectly) exposed to stable cannot use `#[feature(unstable)]` - --> $DIR/staged-api.rs:64:5 + --> $DIR/staged-api.rs:63:5 | LL | Unstable::func(); | ^^^^^^^^^^^^^^^^ @@ -69,7 +69,7 @@ LL | const fn stable_const_context() { | error: const function that might be (indirectly) exposed to stable cannot use `#[feature(local_feature)]` - --> $DIR/staged-api.rs:67:5 + --> $DIR/staged-api.rs:66:5 | LL | Foo::func(); | ^^^^^^^^^^^ @@ -87,7 +87,7 @@ LL | const fn stable_const_context() { | error: const function that might be (indirectly) exposed to stable cannot use `#[feature(local_feature)]` - --> $DIR/staged-api.rs:71:5 + --> $DIR/staged-api.rs:70:5 | LL | const_context_not_const_stable() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/traits/const-traits/super-traits-fail-2.nn.stderr b/tests/ui/traits/const-traits/super-traits-fail-2.nn.stderr index 8de1bb07e908c..e7f54b4c5bdda 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-2.nn.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-2.nn.stderr @@ -1,23 +1,23 @@ error: `~const` is not allowed here - --> $DIR/super-traits-fail-2.rs:12:12 + --> $DIR/super-traits-fail-2.rs:11:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ | note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds - --> $DIR/super-traits-fail-2.rs:12:1 + --> $DIR/super-traits-fail-2.rs:11:1 | LL | trait Bar: ~const Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:12:12 + --> $DIR/super-traits-fail-2.rs:11:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:12:12 + --> $DIR/super-traits-fail-2.rs:11:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -25,7 +25,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:12:12 + --> $DIR/super-traits-fail-2.rs:11:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -33,7 +33,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0015]: cannot call non-const fn `::a` in constant functions - --> $DIR/super-traits-fail-2.rs:21:7 + --> $DIR/super-traits-fail-2.rs:20:7 | LL | x.a(); | ^^^ diff --git a/tests/ui/traits/const-traits/super-traits-fail-2.ny.stderr b/tests/ui/traits/const-traits/super-traits-fail-2.ny.stderr index 82b306aeff6b1..a09fe81f71696 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-2.ny.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-2.ny.stderr @@ -1,11 +1,11 @@ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:12:12 + --> $DIR/super-traits-fail-2.rs:11:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:12:12 + --> $DIR/super-traits-fail-2.rs:11:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -13,7 +13,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:12:12 + --> $DIR/super-traits-fail-2.rs:11:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -21,7 +21,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:12:12 + --> $DIR/super-traits-fail-2.rs:11:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -29,7 +29,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:12:12 + --> $DIR/super-traits-fail-2.rs:11:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -37,7 +37,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0015]: cannot call non-const fn `::a` in constant functions - --> $DIR/super-traits-fail-2.rs:21:7 + --> $DIR/super-traits-fail-2.rs:20:7 | LL | x.a(); | ^^^ diff --git a/tests/ui/traits/const-traits/super-traits-fail-2.rs b/tests/ui/traits/const-traits/super-traits-fail-2.rs index 1e41d709d6b32..53a84bcdd1bb9 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-2.rs +++ b/tests/ui/traits/const-traits/super-traits-fail-2.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] //@ revisions: yy yn ny nn #[cfg_attr(any(yy, yn), const_trait)] diff --git a/tests/ui/traits/const-traits/super-traits-fail-2.yn.stderr b/tests/ui/traits/const-traits/super-traits-fail-2.yn.stderr index ec6ca1072890e..01ae209016a12 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-2.yn.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-2.yn.stderr @@ -1,17 +1,17 @@ error: `~const` is not allowed here - --> $DIR/super-traits-fail-2.rs:12:12 + --> $DIR/super-traits-fail-2.rs:11:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ | note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds - --> $DIR/super-traits-fail-2.rs:12:1 + --> $DIR/super-traits-fail-2.rs:11:1 | LL | trait Bar: ~const Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `T: ~const Foo` is not satisfied - --> $DIR/super-traits-fail-2.rs:21:5 + --> $DIR/super-traits-fail-2.rs:20:5 | LL | x.a(); | ^^^^^ diff --git a/tests/ui/traits/const-traits/super-traits-fail-2.yy.stderr b/tests/ui/traits/const-traits/super-traits-fail-2.yy.stderr index 3fa6256abc349..ae4c65e4aee1e 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-2.yy.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-2.yy.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `T: ~const Foo` is not satisfied - --> $DIR/super-traits-fail-2.rs:21:5 + --> $DIR/super-traits-fail-2.rs:20:5 | LL | x.a(); | ^^^^^ diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.nn.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.nn.stderr index 1dd4a2ed5a5f7..599b8c826f7ae 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-3.nn.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-3.nn.stderr @@ -1,23 +1,23 @@ error: `~const` is not allowed here - --> $DIR/super-traits-fail-3.rs:14:12 + --> $DIR/super-traits-fail-3.rs:13:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ | note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds - --> $DIR/super-traits-fail-3.rs:14:1 + --> $DIR/super-traits-fail-3.rs:13:1 | LL | trait Bar: ~const Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:14:12 + --> $DIR/super-traits-fail-3.rs:13:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:14:12 + --> $DIR/super-traits-fail-3.rs:13:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -25,7 +25,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:14:12 + --> $DIR/super-traits-fail-3.rs:13:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -33,13 +33,13 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:22:17 + --> $DIR/super-traits-fail-3.rs:21:17 | LL | const fn foo(x: &T) { | ^^^^^^ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:22:17 + --> $DIR/super-traits-fail-3.rs:21:17 | LL | const fn foo(x: &T) { | ^^^^^^ @@ -47,7 +47,7 @@ LL | const fn foo(x: &T) { = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0015]: cannot call non-const fn `::a` in constant functions - --> $DIR/super-traits-fail-3.rs:25:7 + --> $DIR/super-traits-fail-3.rs:24:7 | LL | x.a(); | ^^^ diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.ny.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.ny.stderr index e619b8bd6babc..a880c2a22061f 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-3.ny.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-3.ny.stderr @@ -1,11 +1,11 @@ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:14:12 + --> $DIR/super-traits-fail-3.rs:13:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:14:12 + --> $DIR/super-traits-fail-3.rs:13:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -13,7 +13,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:14:12 + --> $DIR/super-traits-fail-3.rs:13:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -21,7 +21,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:14:12 + --> $DIR/super-traits-fail-3.rs:13:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -29,7 +29,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:14:12 + --> $DIR/super-traits-fail-3.rs:13:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ @@ -37,7 +37,7 @@ LL | trait Bar: ~const Foo {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0015]: cannot call non-const fn `::a` in constant functions - --> $DIR/super-traits-fail-3.rs:25:7 + --> $DIR/super-traits-fail-3.rs:24:7 | LL | x.a(); | ^^^ diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.rs b/tests/ui/traits/const-traits/super-traits-fail-3.rs index 414337956e217..bd95ae8d96a9d 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-3.rs +++ b/tests/ui/traits/const-traits/super-traits-fail-3.rs @@ -1,6 +1,5 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] //@ revisions: yy yn ny nn //@[yy] check-pass diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.yn.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.yn.stderr index 0a36d40d93141..8fcada1bfd1d9 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-3.yn.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-3.yn.stderr @@ -1,23 +1,23 @@ error: `~const` is not allowed here - --> $DIR/super-traits-fail-3.rs:14:12 + --> $DIR/super-traits-fail-3.rs:13:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ | note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds - --> $DIR/super-traits-fail-3.rs:14:1 + --> $DIR/super-traits-fail-3.rs:13:1 | LL | trait Bar: ~const Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:22:17 + --> $DIR/super-traits-fail-3.rs:21:17 | LL | const fn foo(x: &T) { | ^^^^^^ error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:22:17 + --> $DIR/super-traits-fail-3.rs:21:17 | LL | const fn foo(x: &T) { | ^^^^^^ @@ -25,7 +25,7 @@ LL | const fn foo(x: &T) { = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0277]: the trait bound `T: ~const Foo` is not satisfied - --> $DIR/super-traits-fail-3.rs:25:5 + --> $DIR/super-traits-fail-3.rs:24:5 | LL | x.a(); | ^^^^^ diff --git a/tests/ui/traits/const-traits/super-traits-fail.rs b/tests/ui/traits/const-traits/super-traits-fail.rs index c07619fbf621c..9fd6263118bdc 100644 --- a/tests/ui/traits/const-traits/super-traits-fail.rs +++ b/tests/ui/traits/const-traits/super-traits-fail.rs @@ -1,7 +1,6 @@ //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Foo { diff --git a/tests/ui/traits/const-traits/super-traits-fail.stderr b/tests/ui/traits/const-traits/super-traits-fail.stderr index 7a734a6c9f1ca..1f453edf0359d 100644 --- a/tests/ui/traits/const-traits/super-traits-fail.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `S: ~const Foo` is not satisfied - --> $DIR/super-traits-fail.rs:18:20 + --> $DIR/super-traits-fail.rs:17:20 | LL | impl const Bar for S {} | ^ diff --git a/tests/ui/traits/const-traits/super-traits.rs b/tests/ui/traits/const-traits/super-traits.rs index ff7349bba3cf2..73ddc037cd795 100644 --- a/tests/ui/traits/const-traits/super-traits.rs +++ b/tests/ui/traits/const-traits/super-traits.rs @@ -1,7 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Foo { diff --git a/tests/ui/traits/const-traits/tilde-const-and-const-params.rs b/tests/ui/traits/const-traits/tilde-const-and-const-params.rs index b316ac75a8a43..706c77b6200a8 100644 --- a/tests/ui/traits/const-traits/tilde-const-and-const-params.rs +++ b/tests/ui/traits/const-traits/tilde-const-and-const-params.rs @@ -1,4 +1,4 @@ -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #![feature(generic_arg_infer)] #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/traits/const-traits/tilde-const-assoc-fn-in-trait-impl.rs b/tests/ui/traits/const-traits/tilde-const-assoc-fn-in-trait-impl.rs index 8e7202ecaa1ff..73b2bdc4e3f86 100644 --- a/tests/ui/traits/const-traits/tilde-const-assoc-fn-in-trait-impl.rs +++ b/tests/ui/traits/const-traits/tilde-const-assoc-fn-in-trait-impl.rs @@ -1,8 +1,7 @@ // Regression test for issue #119700. //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Main { diff --git a/tests/ui/traits/const-traits/tilde-const-in-struct-args.rs b/tests/ui/traits/const-traits/tilde-const-in-struct-args.rs index 4722be955e9e5..e7ec3d31eb91f 100644 --- a/tests/ui/traits/const-traits/tilde-const-in-struct-args.rs +++ b/tests/ui/traits/const-traits/tilde-const-in-struct-args.rs @@ -2,7 +2,7 @@ //@ known-bug: #132067 //@ check-pass -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] struct S; #[const_trait] diff --git a/tests/ui/traits/const-traits/tilde-const-in-struct-args.stderr b/tests/ui/traits/const-traits/tilde-const-in-struct-args.stderr deleted file mode 100644 index a9759f10d06b6..0000000000000 --- a/tests/ui/traits/const-traits/tilde-const-in-struct-args.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/tilde-const-in-struct-args.rs:5:30 - | -LL | #![feature(const_trait_impl, effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/traits/const-traits/tilde-const-inherent-assoc-const-fn.rs b/tests/ui/traits/const-traits/tilde-const-inherent-assoc-const-fn.rs index 71c5d8366b2f4..0e010695587f4 100644 --- a/tests/ui/traits/const-traits/tilde-const-inherent-assoc-const-fn.rs +++ b/tests/ui/traits/const-traits/tilde-const-inherent-assoc-const-fn.rs @@ -1,7 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Foo { diff --git a/tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs b/tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs index 254cf2200d853..b7d446ce1e7ce 100644 --- a/tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs +++ b/tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs @@ -1,7 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Trait { diff --git a/tests/ui/traits/const-traits/trait-default-body-stability.rs b/tests/ui/traits/const-traits/trait-default-body-stability.rs index b36e9535ca113..5f7486eb176af 100644 --- a/tests/ui/traits/const-traits/trait-default-body-stability.rs +++ b/tests/ui/traits/const-traits/trait-default-body-stability.rs @@ -2,7 +2,7 @@ //@ compile-flags: -Znext-solver #![allow(incomplete_features)] #![feature(staged_api)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #![feature(const_t_try)] #![feature(const_try)] #![feature(try_trait_v2)] diff --git a/tests/ui/traits/const-traits/trait-where-clause-const.rs b/tests/ui/traits/const-traits/trait-where-clause-const.rs index 61e2bc384268a..6f281ca571805 100644 --- a/tests/ui/traits/const-traits/trait-where-clause-const.rs +++ b/tests/ui/traits/const-traits/trait-where-clause-const.rs @@ -4,8 +4,7 @@ // (`rustc_const_eval` instead of `rustc_hir_analysis`) Therefore one file as a // test is not enough. -#![feature(const_trait_impl, effects)] -#![allow(incomplete_features)] +#![feature(const_trait_impl)] #[const_trait] trait Bar {} diff --git a/tests/ui/traits/const-traits/trait-where-clause-const.stderr b/tests/ui/traits/const-traits/trait-where-clause-const.stderr index 30a7ef1fd0d3f..d7735ef282f7f 100644 --- a/tests/ui/traits/const-traits/trait-where-clause-const.stderr +++ b/tests/ui/traits/const-traits/trait-where-clause-const.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `T: ~const Bar` is not satisfied - --> $DIR/trait-where-clause-const.rs:22:5 + --> $DIR/trait-where-clause-const.rs:21:5 | LL | T::b(); | ^^^^^^ error[E0277]: the trait bound `T: ~const Bar` is not satisfied - --> $DIR/trait-where-clause-const.rs:24:5 + --> $DIR/trait-where-clause-const.rs:23:5 | LL | T::c::(); | ^^^^^^^^^^^ diff --git a/tests/ui/traits/const-traits/trait-where-clause-run.rs b/tests/ui/traits/const-traits/trait-where-clause-run.rs index 2837c83542999..2582a69acab20 100644 --- a/tests/ui/traits/const-traits/trait-where-clause-run.rs +++ b/tests/ui/traits/const-traits/trait-where-clause-run.rs @@ -1,8 +1,7 @@ //@ run-pass //@ compile-flags: -Znext-solver -#![feature(const_trait_impl, effects)] -#![allow(incomplete_features)] +#![feature(const_trait_impl)] #[const_trait] trait Bar { diff --git a/tests/ui/traits/const-traits/trait-where-clause-self-referential.rs b/tests/ui/traits/const-traits/trait-where-clause-self-referential.rs index cb5cc924bfd34..b6ac574a4fcd8 100644 --- a/tests/ui/traits/const-traits/trait-where-clause-self-referential.rs +++ b/tests/ui/traits/const-traits/trait-where-clause-self-referential.rs @@ -1,7 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![allow(incomplete_features)] -#![feature(const_trait_impl, effects)] +#![feature(const_trait_impl)] #[const_trait] trait Foo { diff --git a/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs b/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs index d336719f52edc..27992a309033f 100644 --- a/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs +++ b/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs @@ -2,7 +2,7 @@ // Ensure that we print unsatisfied always-const trait bounds as `const Trait` in diagnostics. //@ compile-flags: -Znext-solver -#![feature(const_trait_impl, effects, generic_const_exprs)] +#![feature(const_trait_impl, generic_const_exprs)] #![allow(incomplete_features)] fn require() {} diff --git a/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.stderr b/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.stderr index 35f3019b6eee8..d04143fc4641d 100644 --- a/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.stderr +++ b/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.stderr @@ -1,8 +1,8 @@ error: `-Znext-solver=globally` and `generic_const_exprs` are incompatible, using them at the same time is not allowed - --> $DIR/unsatisfied-const-trait-bound.rs:5:39 + --> $DIR/unsatisfied-const-trait-bound.rs:5:30 | -LL | #![feature(const_trait_impl, effects, generic_const_exprs)] - | ^^^^^^^^^^^^^^^^^^^ +LL | #![feature(const_trait_impl, generic_const_exprs)] + | ^^^^^^^^^^^^^^^^^^^ | = help: remove one of these features diff --git a/tests/ui/traits/next-solver/canonical/effect-var.rs b/tests/ui/traits/next-solver/canonical/effect-var.rs index d1e3e18cdc807..82dbde0413c49 100644 --- a/tests/ui/traits/next-solver/canonical/effect-var.rs +++ b/tests/ui/traits/next-solver/canonical/effect-var.rs @@ -1,7 +1,6 @@ //@ compile-flags: -Znext-solver //@ check-pass -#![feature(effects)] //~ WARN the feature `effects` is incomplete #![feature(const_trait_impl)] #[const_trait] diff --git a/tests/ui/traits/next-solver/canonical/effect-var.stderr b/tests/ui/traits/next-solver/canonical/effect-var.stderr deleted file mode 100644 index 994228c51e5e1..0000000000000 --- a/tests/ui/traits/next-solver/canonical/effect-var.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/effect-var.rs:4:12 - | -LL | #![feature(effects)] - | ^^^^^^^ - | - = note: see issue #102090 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - From 6b96103bf3b0746e443f9bb86b532be2c536113a Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Fri, 1 Nov 2024 18:49:08 +0000 Subject: [PATCH 8/8] Rename the FIXMEs, remove a few that dont matter anymore --- compiler/rustc_ast_passes/src/errors.rs | 4 ++-- compiler/rustc_const_eval/src/check_consts/check.rs | 3 ++- compiler/rustc_const_eval/src/check_consts/ops.rs | 2 +- compiler/rustc_const_eval/src/check_consts/qualifs.rs | 2 +- compiler/rustc_const_eval/src/const_eval/machine.rs | 2 +- .../rustc_hir_analysis/src/check/compare_impl_item.rs | 1 - compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs | 1 - .../src/impl_wf_check/min_specialization.rs | 2 +- compiler/rustc_hir_typeck/src/callee.rs | 10 +++++----- compiler/rustc_middle/src/ty/context.rs | 1 - .../rustc_next_trait_solver/src/solve/effect_goals.rs | 2 +- .../rustc_next_trait_solver/src/solve/trait_goals.rs | 2 -- compiler/rustc_passes/src/stability.rs | 2 +- .../src/error_reporting/traits/fulfillment_errors.rs | 6 +++--- .../src/error_reporting/traits/suggestions.rs | 2 +- compiler/rustc_trait_selection/src/traits/fulfill.rs | 2 +- .../src/traits/select/candidate_assembly.rs | 2 -- compiler/rustc_ty_utils/src/instance.rs | 1 - compiler/rustc_type_ir/src/predicate.rs | 1 - library/core/src/ffi/c_str.rs | 2 +- library/core/src/ops/drop.rs | 2 +- library/core/src/ops/function.rs | 6 +++--- library/core/src/slice/sort/shared/smallsort.rs | 2 +- src/librustdoc/clean/mod.rs | 4 ++-- .../clippy/clippy_utils/src/qualify_min_const_fn.rs | 4 ++-- .../tests/ui/missing_const_for_fn/could_be_const.fixed | 4 ++-- .../tests/ui/missing_const_for_fn/could_be_const.rs | 4 ++-- tests/rustdoc/rfc-2632-const-trait-impl.rs | 4 ++-- tests/ui/consts/closure-in-foreign-crate.rs | 6 +++--- tests/ui/consts/const_cmp_type_id.rs | 2 +- tests/ui/traits/const-traits/call-const-closure.rs | 2 +- tests/ui/traits/const-traits/call-generic-in-impl.rs | 2 +- .../traits/const-traits/call-generic-method-chain.rs | 2 +- .../const-traits/call-generic-method-dup-bound.rs | 2 +- .../ui/traits/const-traits/call-generic-method-pass.rs | 2 +- tests/ui/traits/const-traits/call.rs | 2 +- tests/ui/traits/const-traits/const-drop-fail-2.rs | 2 +- .../traits/const-traits/const-fns-are-early-bound.rs | 2 +- .../const-traits/const-trait-bounds-trait-objects.rs | 2 +- tests/ui/traits/const-traits/const-trait-bounds.rs | 2 +- .../const_derives/derive-const-with-params.rs | 2 +- .../const_closure-const_trait_impl-ice-113381.rs | 2 +- tests/ui/traits/const-traits/effects/minicore.rs | 2 +- .../const-default-bound-non-const-specialized-bound.rs | 2 +- tests/ui/traits/const-traits/specializing-constness.rs | 2 +- .../traits/const-traits/tilde-const-trait-assoc-tys.rs | 2 -- .../const-traits/unsatisfied-const-trait-bound.rs | 6 +++--- 47 files changed, 58 insertions(+), 68 deletions(-) diff --git a/compiler/rustc_ast_passes/src/errors.rs b/compiler/rustc_ast_passes/src/errors.rs index 8c3ac9864ed8a..f65056a494ba0 100644 --- a/compiler/rustc_ast_passes/src/errors.rs +++ b/compiler/rustc_ast_passes/src/errors.rs @@ -594,8 +594,8 @@ pub(crate) struct ConstBoundTraitObject { pub span: Span, } -// FIXME(effects): Consider making the note/reason the message of the diagnostic. -// FIXME(effects): Provide structured suggestions (e.g., add `const` / `#[const_trait]` here). +// FIXME(const_trait_impl): Consider making the note/reason the message of the diagnostic. +// FIXME(const_trait_impl): Provide structured suggestions (e.g., add `const` / `#[const_trait]` here). #[derive(Diagnostic)] #[diag(ast_passes_tilde_const_disallowed)] pub(crate) struct TildeConstDisallowed { diff --git a/compiler/rustc_const_eval/src/check_consts/check.rs b/compiler/rustc_const_eval/src/check_consts/check.rs index 4583712c2c75a..8cb7e02036fd8 100644 --- a/compiler/rustc_const_eval/src/check_consts/check.rs +++ b/compiler/rustc_const_eval/src/check_consts/check.rs @@ -657,7 +657,8 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> { // typeck ensures the conditions for calling a const trait method are met, // so we only error if the trait isn't const. We try to resolve the trait // into the concrete method, and uses that for const stability checks. - // FIXME(effects) we might consider moving const stability checks to typeck as well. + // FIXME(const_trait_impl) we might consider moving const stability checks + // to typeck as well. if tcx.features().const_trait_impl() && trait_is_const { // This skips the check below that ensures we only call `const fn`. is_trait = true; diff --git a/compiler/rustc_const_eval/src/check_consts/ops.rs b/compiler/rustc_const_eval/src/check_consts/ops.rs index ce36701a9428c..d264cab1511b9 100644 --- a/compiler/rustc_const_eval/src/check_consts/ops.rs +++ b/compiler/rustc_const_eval/src/check_consts/ops.rs @@ -120,7 +120,7 @@ impl<'tcx> NonConstOp<'tcx> for FnCallNonConst<'tcx> { let implsrc = selcx.select(&obligation); if let Ok(Some(ImplSource::UserDefined(data))) = implsrc { - // FIXME(effects) revisit this + // FIXME(const_trait_impl) revisit this if !tcx.is_const_trait_impl(data.impl_def_id) { let span = tcx.def_span(data.impl_def_id); err.subdiagnostic(errors::NonConstImplNote { span }); diff --git a/compiler/rustc_const_eval/src/check_consts/qualifs.rs b/compiler/rustc_const_eval/src/check_consts/qualifs.rs index e8637ba45cf1d..29a08579175eb 100644 --- a/compiler/rustc_const_eval/src/check_consts/qualifs.rs +++ b/compiler/rustc_const_eval/src/check_consts/qualifs.rs @@ -192,7 +192,7 @@ impl Qualif for NeedsNonConstDrop { return false; } - // FIXME(effects): Reimplement const drop checking. + // FIXME(const_trait_impl): Reimplement const drop checking. NeedsDrop::in_any_value_of_ty(cx, ty) } diff --git a/compiler/rustc_const_eval/src/const_eval/machine.rs b/compiler/rustc_const_eval/src/const_eval/machine.rs index 5f0bc8539ee0b..977d25f359f53 100644 --- a/compiler/rustc_const_eval/src/const_eval/machine.rs +++ b/compiler/rustc_const_eval/src/const_eval/machine.rs @@ -431,7 +431,7 @@ impl<'tcx> interpret::Machine<'tcx> for CompileTimeMachine<'tcx> { // sensitive check here. But we can at least rule out functions that are not const at // all. That said, we have to allow calling functions inside a trait marked with // #[const_trait]. These *are* const-checked! - // FIXME(effects): why does `is_const_fn` not classify them as const? + // FIXME(const_trait_impl): why does `is_const_fn` not classify them as const? if (!ecx.tcx.is_const_fn(def) && !ecx.tcx.is_const_default_method(def)) || ecx.tcx.has_attr(def, sym::rustc_do_not_const_check) { diff --git a/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs b/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs index 0b7d3f8b0850f..dee76c6666394 100644 --- a/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs +++ b/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs @@ -205,7 +205,6 @@ fn compare_method_predicate_entailment<'tcx>( trait_m_predicates.instantiate_own(tcx, trait_to_impl_args).map(|(predicate, _)| predicate), ); - // FIXME(effects): This should be replaced with a more dedicated method. let is_conditionally_const = tcx.is_conditionally_const(impl_def_id); if is_conditionally_const { // Augment the hybrid param-env with the const conditions diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs index fb23ad1b24894..400a79f3dae57 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs @@ -563,7 +563,6 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { if let Err(guar) = ty.error_reported() { return ty::Const::new_error(tcx, guar).into(); } - // FIXME(effects) see if we should special case effect params here if !infer_args && has_default { tcx.const_param_default(param.def_id) .instantiate(tcx, preceding_args) diff --git a/compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs b/compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs index b0c9aed5d8557..34effd199f152 100644 --- a/compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs +++ b/compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs @@ -459,7 +459,7 @@ fn trait_predicates_eq<'tcx>( predicate1: ty::Predicate<'tcx>, predicate2: ty::Predicate<'tcx>, ) -> bool { - // FIXME(effects) + // FIXME(const_trait_impl) predicate1 == predicate2 } diff --git a/compiler/rustc_hir_typeck/src/callee.rs b/compiler/rustc_hir_typeck/src/callee.rs index 481a5f3a921d9..ec2a0b93f0386 100644 --- a/compiler/rustc_hir_typeck/src/callee.rs +++ b/compiler/rustc_hir_typeck/src/callee.rs @@ -461,7 +461,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { } (fn_sig, Some(def_id)) } - // FIXME(effects): these arms should error because we can't enforce them + // FIXME(const_trait_impl): these arms should error because we can't enforce them ty::FnPtr(sig_tys, hdr) => (sig_tys.with(hdr), None), _ => { for arg in arg_exprs { @@ -843,7 +843,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { callee_did: DefId, callee_args: GenericArgsRef<'tcx>, ) { - // FIXME(effects): We should be enforcing these effects unconditionally. + // FIXME(const_trait_impl): We should be enforcing these effects unconditionally. // This can be done as soon as we convert the standard library back to // using const traits, since if we were to enforce these conditions now, // we'd fail on basically every builtin trait call (i.e. `1 + 2`). @@ -864,11 +864,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { None => return, }; - // FIXME(effects): Should this be `is_const_fn_raw`? It depends on if we move + // FIXME(const_trait_impl): Should this be `is_const_fn_raw`? It depends on if we move // const stability checking here too, I guess. if self.tcx.is_conditionally_const(callee_did) { let q = self.tcx.const_conditions(callee_did); - // FIXME(effects): Use this span with a better cause code. + // FIXME(const_trait_impl): Use this span with a better cause code. for (cond, _) in q.instantiate(self.tcx, callee_args) { self.register_predicate(Obligation::new( self.tcx, @@ -878,7 +878,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { )); } } else { - // FIXME(effects): This should eventually be caught here. + // FIXME(const_trait_impl): This should eventually be caught here. // For now, though, we defer some const checking to MIR. } } diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index 9abad6d1a680b..59a53155a2127 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -3125,7 +3125,6 @@ impl<'tcx> TyCtxt<'tcx> { } } - // FIXME(effects): Please remove this. It's a footgun. /// Whether the trait impl is marked const. This does not consider stability or feature gates. pub fn is_const_trait_impl(self, def_id: DefId) -> bool { self.def_kind(def_id) == DefKind::Impl { of_trait: true } diff --git a/compiler/rustc_next_trait_solver/src/solve/effect_goals.rs b/compiler/rustc_next_trait_solver/src/solve/effect_goals.rs index 5bfc156ed94fe..0912e5effa63d 100644 --- a/compiler/rustc_next_trait_solver/src/solve/effect_goals.rs +++ b/compiler/rustc_next_trait_solver/src/solve/effect_goals.rs @@ -84,7 +84,7 @@ where let cx = ecx.cx(); let mut candidates = vec![]; - // FIXME(effects): We elaborate here because the implied const bounds + // FIXME(const_trait_impl): We elaborate here because the implied const bounds // aren't necessarily elaborated. We probably should prefix this query // with `explicit_`... for clause in elaborate::elaborate( diff --git a/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs b/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs index e23e475a2a62a..df4f0ffdd576b 100644 --- a/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs +++ b/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs @@ -609,8 +609,6 @@ where return Err(NoSolution); } - // FIXME(effects): Implement this when we get const working in the new solver - // `Destruct` is automatically implemented for every type in // non-const environments. ecx.probe_builtin_trait_candidate(BuiltinImplSource::Misc) diff --git a/compiler/rustc_passes/src/stability.rs b/compiler/rustc_passes/src/stability.rs index f69cc74fba24d..737e163efcef1 100644 --- a/compiler/rustc_passes/src/stability.rs +++ b/compiler/rustc_passes/src/stability.rs @@ -217,7 +217,7 @@ impl<'a, 'tcx> Annotator<'a, 'tcx> { // `impl const Trait for Type` items forward their const stability to their // immediate children. - // FIXME(effects): how is this supposed to interact with `#[rustc_const_stable_indirect]`? + // FIXME(const_trait_impl): how is this supposed to interact with `#[rustc_const_stable_indirect]`? // Currently, once that is set, we do not inherit anything from the parent any more. if const_stab.is_none() { debug!("annotate: const_stab not found, parent = {:?}", self.parent_const_stab); diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs index 524b413960095..f5cd99222e337 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs @@ -538,7 +538,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { } ty::PredicateKind::Clause(ty::ClauseKind::HostEffect(predicate)) => { - // FIXME(effects): We should recompute the predicate with `~const` + // FIXME(const_trait_impl): We should recompute the predicate with `~const` // if it's `const`, and if it holds, explain that this bound only // *conditionally* holds. If that fails, we should also do selection // to drill this down to an impl or built-in source, so we can @@ -2641,7 +2641,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { _span: Span, ) -> UnsatisfiedConst { let unsatisfied_const = UnsatisfiedConst(false); - // FIXME(effects) + // FIXME(const_trait_impl) unsatisfied_const } @@ -3052,7 +3052,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { // Make a fresh inference variable so we can determine what the generic parameters // of the trait are. let var = self.next_ty_var(DUMMY_SP); - // FIXME(effects) + // FIXME(const_trait_impl) let trait_ref = ty::TraitRef::new(self.tcx, trait_def_id, [ty.skip_binder(), var]); let obligation = Obligation::new( self.tcx, diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs index 07e3300f0f24e..e155effa1e3f1 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs @@ -3751,7 +3751,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { trait_pred.skip_binder().self_ty(), diagnostic_name, ), - // FIXME(effects, const_trait_impl) derive_const as suggestion? + // FIXME(const_trait_impl) derive_const as suggestion? format!("#[derive({diagnostic_name})]\n"), Applicability::MaybeIncorrect, ); diff --git a/compiler/rustc_trait_selection/src/traits/fulfill.rs b/compiler/rustc_trait_selection/src/traits/fulfill.rs index 29e60e3c428bc..e3d17a910cce2 100644 --- a/compiler/rustc_trait_selection/src/traits/fulfill.rs +++ b/compiler/rustc_trait_selection/src/traits/fulfill.rs @@ -374,7 +374,7 @@ impl<'a, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'tcx> { | ty::PredicateKind::Coerce(_) | ty::PredicateKind::Clause(ty::ClauseKind::ConstEvaluatable(..)) | ty::PredicateKind::ConstEquate(..) - // FIXME(effects): We may need to do this using the higher-ranked + // FIXME(const_trait_impl): We may need to do this using the higher-ranked // pred instead of just instantiating it with placeholders b/c of // higher-ranked implied bound issues in the old solver. | ty::PredicateKind::Clause(ty::ClauseKind::HostEffect(..)) => { diff --git a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs index 03fde1d159890..bf3f83ec82799 100644 --- a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs +++ b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs @@ -1170,8 +1170,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { _obligation: &PolyTraitObligation<'tcx>, candidates: &mut SelectionCandidateSet<'tcx>, ) { - // FIXME(effects): Destruct is not const yet, and it is implemented - // by all types today in non-const setting. candidates.vec.push(BuiltinCandidate { has_nested: false }); } diff --git a/compiler/rustc_ty_utils/src/instance.rs b/compiler/rustc_ty_utils/src/instance.rs index e258b6dae0b46..1d8a088076013 100644 --- a/compiler/rustc_ty_utils/src/instance.rs +++ b/compiler/rustc_ty_utils/src/instance.rs @@ -81,7 +81,6 @@ fn resolve_instance_raw<'tcx>( } } else { debug!(" => free item"); - // FIXME(effects): we may want to erase the effect param if that is present on this item. ty::InstanceKind::Item(def_id) }; diff --git a/compiler/rustc_type_ir/src/predicate.rs b/compiler/rustc_type_ir/src/predicate.rs index 0cade1d688553..8a8e624e72a2d 100644 --- a/compiler/rustc_type_ir/src/predicate.rs +++ b/compiler/rustc_type_ir/src/predicate.rs @@ -174,7 +174,6 @@ impl UpcastFrom> for TraitPredicate { impl fmt::Debug for TraitPredicate { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - // FIXME(effects) printing? write!(f, "TraitPredicate({:?}, polarity:{:?})", self.trait_ref, self.polarity) } } diff --git a/library/core/src/ffi/c_str.rs b/library/core/src/ffi/c_str.rs index 93dd351b02958..4ea5cbf862645 100644 --- a/library/core/src/ffi/c_str.rs +++ b/library/core/src/ffi/c_str.rs @@ -510,7 +510,7 @@ impl CStr { #[inline] #[must_use] const fn as_non_null_ptr(&self) -> NonNull { - // FIXME(effects) replace with `NonNull::from` + // FIXME(const_trait_impl) replace with `NonNull::from` // SAFETY: a reference is never null unsafe { NonNull::new_unchecked(&self.inner as *const [c_char] as *mut [c_char]) } .as_non_null_ptr() diff --git a/library/core/src/ops/drop.rs b/library/core/src/ops/drop.rs index c6083a121d107..a6f63ad68d695 100644 --- a/library/core/src/ops/drop.rs +++ b/library/core/src/ops/drop.rs @@ -203,7 +203,7 @@ /// [nomicon]: ../../nomicon/phantom-data.html#an-exception-the-special-case-of-the-standard-library-and-its-unstable-may_dangle #[lang = "drop"] #[stable(feature = "rust1", since = "1.0.0")] -// FIXME(effects) #[const_trait] +// FIXME(const_trait_impl) #[const_trait] pub trait Drop { /// Executes the destructor for this type. /// diff --git a/library/core/src/ops/function.rs b/library/core/src/ops/function.rs index 3a3d3fcf1da64..e9014458b48ea 100644 --- a/library/core/src/ops/function.rs +++ b/library/core/src/ops/function.rs @@ -72,7 +72,7 @@ use crate::marker::Tuple; )] #[fundamental] // so that regex can rely that `&str: !FnMut` #[must_use = "closures are lazy and do nothing unless called"] -// FIXME(effects) #[const_trait] +// FIXME(const_trait_impl) #[const_trait] pub trait Fn: FnMut { /// Performs the call operation. #[unstable(feature = "fn_traits", issue = "29625")] @@ -159,7 +159,7 @@ pub trait Fn: FnMut { )] #[fundamental] // so that regex can rely that `&str: !FnMut` #[must_use = "closures are lazy and do nothing unless called"] -// FIXME(effects) #[const_trait] +// FIXME(const_trait_impl) #[const_trait] pub trait FnMut: FnOnce { /// Performs the call operation. #[unstable(feature = "fn_traits", issue = "29625")] @@ -238,7 +238,7 @@ pub trait FnMut: FnOnce { )] #[fundamental] // so that regex can rely that `&str: !FnMut` #[must_use = "closures are lazy and do nothing unless called"] -// FIXME(effects) #[const_trait] +// FIXME(const_trait_impl) #[const_trait] pub trait FnOnce { /// The returned type after the call operator is used. #[lang = "fn_once_output"] diff --git a/library/core/src/slice/sort/shared/smallsort.rs b/library/core/src/slice/sort/shared/smallsort.rs index 6adf779a72f0c..09f898309bd65 100644 --- a/library/core/src/slice/sort/shared/smallsort.rs +++ b/library/core/src/slice/sort/shared/smallsort.rs @@ -102,7 +102,7 @@ impl UnstableSmallSortTypeImpl for T { } } -/// FIXME(effects) use original ipnsort approach with choose_unstable_small_sort, +/// FIXME(const_trait_impl) use original ipnsort approach with choose_unstable_small_sort, /// as found here . pub(crate) trait UnstableSmallSortFreezeTypeImpl: Sized + FreezeMarker { fn small_sort_threshold() -> usize; diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 58663fcbafec8..c367eed53e07b 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -369,7 +369,7 @@ pub(crate) fn clean_predicate<'tcx>( ty::ClauseKind::ConstEvaluatable(..) | ty::ClauseKind::WellFormed(..) | ty::ClauseKind::ConstArgHasType(..) - // FIXME(effects): We can probably use this `HostEffect` pred to render `~const`. + // FIXME(const_trait_impl): We can probably use this `HostEffect` pred to render `~const`. | ty::ClauseKind::HostEffect(_) => None, } } @@ -379,7 +379,7 @@ fn clean_poly_trait_predicate<'tcx>( cx: &mut DocContext<'tcx>, ) -> Option { // `T: ~const Destruct` is hidden because `T: Destruct` is a no-op. - // FIXME(effects) check constness + // FIXME(const_trait_impl) check constness if Some(pred.skip_binder().def_id()) == cx.tcx.lang_items().destruct_trait() { return None; } diff --git a/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs b/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs index 8f9f75d6824ad..666ec8df930d8 100644 --- a/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs +++ b/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs @@ -404,7 +404,7 @@ fn is_stable_const_fn(tcx: TyCtxt<'_>, def_id: DefId, msrv: &Msrv) -> bool { } fn is_ty_const_destruct<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, body: &Body<'tcx>) -> bool { - // FIXME(effects, fee1-dead) revert to const destruct once it works again + // FIXME(const_trait_impl, fee1-dead) revert to const destruct once it works again #[expect(unused)] fn is_ty_const_destruct_unused<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, body: &Body<'tcx>) -> bool { // Avoid selecting for simple cases, such as builtin types. @@ -412,7 +412,7 @@ fn is_ty_const_destruct<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, body: &Body<'tcx> return true; } - // FIXME(effects) constness + // FIXME(const_trait_impl) constness let obligation = Obligation::new( tcx, ObligationCause::dummy_with_span(body.span), diff --git a/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.fixed b/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.fixed index f7b6e1a186bbd..7c88278951152 100644 --- a/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.fixed +++ b/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.fixed @@ -104,7 +104,7 @@ fn main() {} struct D; -/* FIXME(effects) +/* FIXME(const_trait_impl) impl const Drop for D { fn drop(&mut self) { todo!(); @@ -113,7 +113,7 @@ impl const Drop for D { */ // Lint this, since it can be dropped in const contexts -// FIXME(effects) +// FIXME(const_trait_impl) const fn d(this: D) {} //~^ ERROR: this could be a `const fn` diff --git a/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.rs b/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.rs index 4866e3210245e..48312d48ed3d0 100644 --- a/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.rs +++ b/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.rs @@ -104,7 +104,7 @@ fn main() {} struct D; -/* FIXME(effects) +/* FIXME(const_trait_impl) impl const Drop for D { fn drop(&mut self) { todo!(); @@ -113,7 +113,7 @@ impl const Drop for D { */ // Lint this, since it can be dropped in const contexts -// FIXME(effects) +// FIXME(const_trait_impl) fn d(this: D) {} //~^ ERROR: this could be a `const fn` diff --git a/tests/rustdoc/rfc-2632-const-trait-impl.rs b/tests/rustdoc/rfc-2632-const-trait-impl.rs index f6a5555dbadd0..8a86e3e5e9782 100644 --- a/tests/rustdoc/rfc-2632-const-trait-impl.rs +++ b/tests/rustdoc/rfc-2632-const-trait-impl.rs @@ -6,8 +6,8 @@ // stabilized when changing `@!has` to `@has`, and please do // not remove this test. // -// FIXME(effects) add `const_trait` to `Fn` so we use `~const` -// FIXME(effects) restore `const_trait` to `Destruct` +// FIXME(const_trait_impl) add `const_trait` to `Fn` so we use `~const` +// FIXME(const_trait_impl) restore `const_trait` to `Destruct` #![feature(const_trait_impl)] #![crate_name = "foo"] diff --git a/tests/ui/consts/closure-in-foreign-crate.rs b/tests/ui/consts/closure-in-foreign-crate.rs index 94e40fcf1e418..423cd582e5ed7 100644 --- a/tests/ui/consts/closure-in-foreign-crate.rs +++ b/tests/ui/consts/closure-in-foreign-crate.rs @@ -1,8 +1,8 @@ -// FIXME(effects) aux-build:closure-in-foreign-crate.rs +// FIXME(const_trait_impl) aux-build:closure-in-foreign-crate.rs //@ build-pass -// FIXME(effects) extern crate closure_in_foreign_crate; +// FIXME(const_trait_impl) extern crate closure_in_foreign_crate; -// FIXME(effects) const _: () = closure_in_foreign_crate::test(); +// FIXME(const_trait_impl) const _: () = closure_in_foreign_crate::test(); fn main() {} diff --git a/tests/ui/consts/const_cmp_type_id.rs b/tests/ui/consts/const_cmp_type_id.rs index 0e1b5c75a1003..e89b8d3778783 100644 --- a/tests/ui/consts/const_cmp_type_id.rs +++ b/tests/ui/consts/const_cmp_type_id.rs @@ -12,6 +12,6 @@ fn main() { let _a = TypeId::of::() < TypeId::of::(); //~^ ERROR cannot call non-const operator in constants // can't assert `_a` because it is not deterministic - // FIXME(effects) make it pass + // FIXME(const_trait_impl) make it pass } } diff --git a/tests/ui/traits/const-traits/call-const-closure.rs b/tests/ui/traits/const-traits/call-const-closure.rs index 4cb6b4b41b90d..21f4374b8d530 100644 --- a/tests/ui/traits/const-traits/call-const-closure.rs +++ b/tests/ui/traits/const-traits/call-const-closure.rs @@ -16,7 +16,7 @@ impl Bar for () { const FOO: () = { (const || ().foo())(); //~^ ERROR the trait bound `(): ~const Bar` is not satisfied - // FIXME(effects): The constness environment for const closures is wrong. + // FIXME(const_trait_impl): The constness environment for const closures is wrong. }; fn main() {} diff --git a/tests/ui/traits/const-traits/call-generic-in-impl.rs b/tests/ui/traits/const-traits/call-generic-in-impl.rs index 6b3a4ae1b95ee..6149dc3d12635 100644 --- a/tests/ui/traits/const-traits/call-generic-in-impl.rs +++ b/tests/ui/traits/const-traits/call-generic-in-impl.rs @@ -1,5 +1,5 @@ //@ known-bug: #110395 -// FIXME(effects) check-pass +// FIXME(const_trait_impl) check-pass #![feature(const_trait_impl)] #[const_trait] diff --git a/tests/ui/traits/const-traits/call-generic-method-chain.rs b/tests/ui/traits/const-traits/call-generic-method-chain.rs index dd09fbcb37b9d..74beab71208af 100644 --- a/tests/ui/traits/const-traits/call-generic-method-chain.rs +++ b/tests/ui/traits/const-traits/call-generic-method-chain.rs @@ -2,7 +2,7 @@ //@ known-bug: #110395 //@ compile-flags: -Znext-solver -// FIXME(effects) check-pass +// FIXME(const_trait_impl) check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs b/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs index 6df4679c58353..ec615d8484cda 100644 --- a/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs +++ b/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs @@ -1,6 +1,6 @@ //@ compile-flags: -Znext-solver //@ known-bug: #110395 -// FIXME(effects) check-pass +// FIXME(const_trait_impl) check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/traits/const-traits/call-generic-method-pass.rs b/tests/ui/traits/const-traits/call-generic-method-pass.rs index e4a48b884a8a7..af793b8da031b 100644 --- a/tests/ui/traits/const-traits/call-generic-method-pass.rs +++ b/tests/ui/traits/const-traits/call-generic-method-pass.rs @@ -2,7 +2,7 @@ //@ compile-flags: -Znext-solver //@ known-bug: #110395 -// FIXME(effects) check-pass +// FIXME(const_trait_impl) check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/traits/const-traits/call.rs b/tests/ui/traits/const-traits/call.rs index a6eecb56874c9..b985e3da34511 100644 --- a/tests/ui/traits/const-traits/call.rs +++ b/tests/ui/traits/const-traits/call.rs @@ -1,4 +1,4 @@ -// FIXME(effects) check-pass +// FIXME(const_trait_impl) check-pass //@ compile-flags: -Znext-solver #![feature(const_closures, const_trait_impl)] #![allow(incomplete_features)] diff --git a/tests/ui/traits/const-traits/const-drop-fail-2.rs b/tests/ui/traits/const-traits/const-drop-fail-2.rs index 7b57e0405af98..5d7bafa38871f 100644 --- a/tests/ui/traits/const-traits/const-drop-fail-2.rs +++ b/tests/ui/traits/const-traits/const-drop-fail-2.rs @@ -20,7 +20,7 @@ impl A for NonTrivialDrop {} const fn check(_: T) {} -/* FIXME(effects) +/* FIXME(const_trait_impl) struct ConstDropImplWithBounds(PhantomData); impl const Drop for ConstDropImplWithBounds { diff --git a/tests/ui/traits/const-traits/const-fns-are-early-bound.rs b/tests/ui/traits/const-traits/const-fns-are-early-bound.rs index 6d08d8bdd919e..c26eaf674546a 100644 --- a/tests/ui/traits/const-traits/const-fns-are-early-bound.rs +++ b/tests/ui/traits/const-traits/const-fns-are-early-bound.rs @@ -1,7 +1,7 @@ //@ known-bug: #110395 //@ failure-status: 101 //@ dont-check-compiler-stderr -// FIXME(effects) check-pass +// FIXME(const_trait_impl) check-pass //@ compile-flags: -Znext-solver #![crate_type = "lib"] diff --git a/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs b/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs index 691bce19dc245..2dac1970835d2 100644 --- a/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs +++ b/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs @@ -1,5 +1,5 @@ #![feature(const_trait_impl)] -// FIXME(effects) add effects +// FIXME(const_trait_impl) add effects //@ edition: 2021 #[const_trait] diff --git a/tests/ui/traits/const-traits/const-trait-bounds.rs b/tests/ui/traits/const-traits/const-trait-bounds.rs index 4130d5c15ee9b..8722d9909edda 100644 --- a/tests/ui/traits/const-traits/const-trait-bounds.rs +++ b/tests/ui/traits/const-traits/const-trait-bounds.rs @@ -1,6 +1,6 @@ //@ known-bug: #110395 //@ compile-flags: -Znext-solver -// FIXME(effects): check-pass +// FIXME(const_trait_impl): check-pass #![feature(const_trait_impl, generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/traits/const-traits/const_derives/derive-const-with-params.rs b/tests/ui/traits/const-traits/const_derives/derive-const-with-params.rs index 6d303726d8838..18b224af2780f 100644 --- a/tests/ui/traits/const-traits/const_derives/derive-const-with-params.rs +++ b/tests/ui/traits/const-traits/const_derives/derive-const-with-params.rs @@ -1,5 +1,5 @@ //@ known-bug: #110395 -// FIXME(effects) check-pass +// FIXME(const_trait_impl) check-pass #![feature(derive_const)] #![feature(const_trait_impl)] diff --git a/tests/ui/traits/const-traits/effects/const_closure-const_trait_impl-ice-113381.rs b/tests/ui/traits/const-traits/effects/const_closure-const_trait_impl-ice-113381.rs index 50a381c92bc39..877249135cd97 100644 --- a/tests/ui/traits/const-traits/effects/const_closure-const_trait_impl-ice-113381.rs +++ b/tests/ui/traits/const-traits/effects/const_closure-const_trait_impl-ice-113381.rs @@ -13,5 +13,5 @@ impl Foo for () { fn main() { (const || { (()).foo() })(); //~^ ERROR: cannot call non-const fn `<() as Foo>::foo` in constant functions - // FIXME(effects) this should probably say constant closures + // FIXME(const_trait_impl) this should probably say constant closures } diff --git a/tests/ui/traits/const-traits/effects/minicore.rs b/tests/ui/traits/const-traits/effects/minicore.rs index b739a4a2b69eb..50badcd2e8794 100644 --- a/tests/ui/traits/const-traits/effects/minicore.rs +++ b/tests/ui/traits/const-traits/effects/minicore.rs @@ -3,7 +3,7 @@ //@ normalize-stderr-test: ".*note: .*\n\n" -> "" //@ normalize-stderr-test: "thread 'rustc' panicked.*:\n.*\n" -> "" //@ rustc-env:RUST_BACKTRACE=0 -// FIXME(effects) check-pass +// FIXME(const_trait_impl) check-pass //@ compile-flags: -Znext-solver #![crate_type = "lib"] diff --git a/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.rs b/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.rs index 69dcb403aa908..5af9ee8614fd5 100644 --- a/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.rs +++ b/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.rs @@ -1,7 +1,7 @@ // Tests that trait bounds on specializing trait impls must be `~const` if the // same bound is present on the default impl and is `~const` there. //@ known-bug: #110395 -// FIXME(effects) ^ should error +// FIXME(const_trait_impl) ^ should error #![feature(const_trait_impl)] #![feature(rustc_attrs)] diff --git a/tests/ui/traits/const-traits/specializing-constness.rs b/tests/ui/traits/const-traits/specializing-constness.rs index 0a28da9e65e64..632121924a63b 100644 --- a/tests/ui/traits/const-traits/specializing-constness.rs +++ b/tests/ui/traits/const-traits/specializing-constness.rs @@ -22,7 +22,7 @@ impl const A for T { impl A for T { //~^ ERROR: cannot specialize -//FIXME(effects) ~| ERROR: missing `~const` qualifier +//FIXME(const_trait_impl) ~| ERROR: missing `~const` qualifier fn a() -> u32 { 3 } diff --git a/tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs b/tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs index b7d446ce1e7ce..53ddb5c0cdfc8 100644 --- a/tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs +++ b/tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs @@ -4,8 +4,6 @@ #[const_trait] trait Trait { - // FIXME(effects): `~const` bounds in trait associated types (excluding associated type bounds) - // don't look super useful. Should we forbid them again? type Assoc; } diff --git a/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs b/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs index 27992a309033f..6d19ef771af1f 100644 --- a/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs +++ b/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs @@ -24,10 +24,10 @@ fn main() { struct Container; -// FIXME(effects): Somehow emit `the trait bound `T: const Trait` is not satisfied` here instead -// and suggest changing `Trait` to `const Trait`. +// FIXME(const_trait_impl): Somehow emit `the trait bound `T: const Trait` +// is not satisfied` here instead and suggest changing `Trait` to `const Trait`. fn accept0(_: Container<{ T::make() }>) {} -// FIXME(effects): Instead of suggesting `+ const Trait`, suggest +// FIXME(const_trait_impl): Instead of suggesting `+ const Trait`, suggest // changing `~const Trait` to `const Trait`. const fn accept1(_: Container<{ T::make() }>) {}