From 0cdd7f50b06fb363a2e8b0f6d270e0ed14476af8 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 8 May 2025 14:34:40 +0000 Subject: [PATCH 01/23] Add all rustc_std_internal_symbol to symbols.o rustc_std_internal_symbol is meant to call functions from crates where there is no direct dependency on said crate. As they either have to be added to symbols.o or rustc has to introduce an implicit dependency on them to avoid linker errors. The latter is done for some things like the panic runtime, but adding these symbols to symbols.o allows removing those implicit dependencies. --- compiler/rustc_codegen_ssa/src/back/linker.rs | 1 + .../src/back/symbol_export.rs | 16 ++++++++++++++ compiler/rustc_codegen_ssa/src/base.rs | 22 +------------------ .../src/middle/exported_symbols.rs | 3 +++ src/tools/miri/src/bin/miri.rs | 1 + 5 files changed, 22 insertions(+), 21 deletions(-) diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs index b6892bb63e856..8138fd788cf0f 100644 --- a/compiler/rustc_codegen_ssa/src/back/linker.rs +++ b/compiler/rustc_codegen_ssa/src/back/linker.rs @@ -1882,6 +1882,7 @@ pub(crate) fn linked_symbols( for_each_exported_symbols_include_dep(tcx, crate_type, |symbol, info, cnum| { if info.level.is_below_threshold(export_threshold) && !tcx.is_compiler_builtins(cnum) || info.used + || info.rustc_std_internal_symbol { symbols.push(( symbol_export::linking_symbol_name_for_instance_in_crate( diff --git a/compiler/rustc_codegen_ssa/src/back/symbol_export.rs b/compiler/rustc_codegen_ssa/src/back/symbol_export.rs index 19c005d418e89..75f7a46355652 100644 --- a/compiler/rustc_codegen_ssa/src/back/symbol_export.rs +++ b/compiler/rustc_codegen_ssa/src/back/symbol_export.rs @@ -131,6 +131,9 @@ fn reachable_non_generics_provider(tcx: TyCtxt<'_>, _: LocalCrate) -> DefIdMap, _: LocalCrate) -> DefIdMap( level: info.level, kind: SymbolExportKind::Text, used: info.used, + rustc_std_internal_symbol: info.rustc_std_internal_symbol, }, ) }) @@ -207,6 +212,7 @@ fn exported_symbols_provider_local<'tcx>( level: SymbolExportLevel::C, kind: SymbolExportKind::Text, used: false, + rustc_std_internal_symbol: false, }, )); } @@ -230,6 +236,7 @@ fn exported_symbols_provider_local<'tcx>( level: SymbolExportLevel::Rust, kind: SymbolExportKind::Text, used: false, + rustc_std_internal_symbol: true, }, )); } @@ -250,6 +257,7 @@ fn exported_symbols_provider_local<'tcx>( level: SymbolExportLevel::C, kind: SymbolExportKind::Data, used: false, + rustc_std_internal_symbol: false, }, ) })); @@ -275,6 +283,7 @@ fn exported_symbols_provider_local<'tcx>( level: SymbolExportLevel::C, kind: SymbolExportKind::Data, used: false, + rustc_std_internal_symbol: false, }, ) })); @@ -292,6 +301,7 @@ fn exported_symbols_provider_local<'tcx>( level: SymbolExportLevel::C, kind: SymbolExportKind::Data, used: true, + rustc_std_internal_symbol: false, }, )); } @@ -367,6 +377,8 @@ fn exported_symbols_provider_local<'tcx>( } } + // Note: These all set rustc_std_internal_symbol to false as generic functions must not + // be marked with this attribute and we are only handling generic functions here. match *mono_item { MonoItem::Fn(Instance { def: InstanceKind::Item(def), args }) => { let has_generics = args.non_erasable_generics().next().is_some(); @@ -382,6 +394,7 @@ fn exported_symbols_provider_local<'tcx>( level: SymbolExportLevel::Rust, kind: SymbolExportKind::Text, used: false, + rustc_std_internal_symbol: false, }, )); } @@ -404,6 +417,7 @@ fn exported_symbols_provider_local<'tcx>( level: SymbolExportLevel::Rust, kind: SymbolExportKind::Text, used: false, + rustc_std_internal_symbol: false, }, )); } @@ -420,6 +434,7 @@ fn exported_symbols_provider_local<'tcx>( level: SymbolExportLevel::Rust, kind: SymbolExportKind::Text, used: false, + rustc_std_internal_symbol: false, }, )); } @@ -430,6 +445,7 @@ fn exported_symbols_provider_local<'tcx>( level: SymbolExportLevel::Rust, kind: SymbolExportKind::Text, used: false, + rustc_std_internal_symbol: false, }, )); } diff --git a/compiler/rustc_codegen_ssa/src/base.rs b/compiler/rustc_codegen_ssa/src/base.rs index cc90271cd0c6f..b06cfd1e4730e 100644 --- a/compiler/rustc_codegen_ssa/src/base.rs +++ b/compiler/rustc_codegen_ssa/src/base.rs @@ -6,7 +6,7 @@ use std::time::{Duration, Instant}; use itertools::Itertools; use rustc_abi::FIRST_VARIANT; use rustc_ast as ast; -use rustc_ast::expand::allocator::{ALLOCATOR_METHODS, AllocatorKind, global_fn_name}; +use rustc_ast::expand::allocator::AllocatorKind; use rustc_attr_data_structures::OptimizeAttr; use rustc_data_structures::fx::{FxHashMap, FxIndexSet}; use rustc_data_structures::profiling::{get_resident_set_size, print_time_passes_entry}; @@ -1056,26 +1056,6 @@ impl CrateInfo { .collect::>(); symbols.sort_unstable_by(|a, b| a.0.cmp(&b.0)); linked_symbols.extend(symbols); - if tcx.allocator_kind(()).is_some() { - // At least one crate needs a global allocator. This crate may be placed - // after the crate that defines it in the linker order, in which case some - // linkers return an error. By adding the global allocator shim methods to - // the linked_symbols list, linking the generated symbols.o will ensure that - // circular dependencies involving the global allocator don't lead to linker - // errors. - linked_symbols.extend(ALLOCATOR_METHODS.iter().map(|method| { - ( - add_prefix( - mangle_internal_symbol( - tcx, - global_fn_name(method.name).as_str(), - ), - SymbolExportKind::Text, - ), - SymbolExportKind::Text, - ) - })); - } }); } diff --git a/compiler/rustc_middle/src/middle/exported_symbols.rs b/compiler/rustc_middle/src/middle/exported_symbols.rs index 64a1f2aff15c5..491bba98c1946 100644 --- a/compiler/rustc_middle/src/middle/exported_symbols.rs +++ b/compiler/rustc_middle/src/middle/exported_symbols.rs @@ -35,7 +35,10 @@ pub enum SymbolExportKind { pub struct SymbolExportInfo { pub level: SymbolExportLevel, pub kind: SymbolExportKind, + /// Was the symbol marked as `#[used(compiler)]` or `#[used(linker)]`? pub used: bool, + /// Was the symbol marked as `#[rustc_std_internal_symbol]`? + pub rustc_std_internal_symbol: bool, } #[derive(Eq, PartialEq, Debug, Copy, Clone, TyEncodable, TyDecodable, HashStable)] diff --git a/src/tools/miri/src/bin/miri.rs b/src/tools/miri/src/bin/miri.rs index d4ba7fbd6a479..72057f812f962 100644 --- a/src/tools/miri/src/bin/miri.rs +++ b/src/tools/miri/src/bin/miri.rs @@ -295,6 +295,7 @@ impl rustc_driver::Callbacks for MiriBeRustCompilerCalls { level: SymbolExportLevel::C, kind: SymbolExportKind::Text, used: false, + rustc_std_internal_symbol: false, }, )) } else { From 5f63b5758969872add239e477b9a49cea08cc921 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 8 May 2025 11:32:22 +0000 Subject: [PATCH 02/23] Remove dependency injection for the panic runtime This used to be necessary for a correct linker order, but ever since the introduction of symbols.o adding the symbols in question to symbols.o would work just as well. We do still add dependencies on the panic runtime to the local crate, but not for #![needs_panic_runtime] crates. This also removes the runtime-depends-on-needs-runtime test. inject_dependency_if used to emit this error, but with symbols.o it is no longer important that there is no dependency and in fact it may be nice to have panic_abort and panic_unwind directly depend on libstd in the future for calling std::process::abort(). --- compiler/rustc_metadata/src/creader.rs | 73 +------------------ compiler/rustc_metadata/src/rmeta/decoder.rs | 4 - tests/ui/panic-runtime/auxiliary/depends.rs | 8 -- .../auxiliary/needs-panic-runtime.rs | 6 -- .../runtime-depend-on-needs-runtime.rs | 9 --- 5 files changed, 3 insertions(+), 97 deletions(-) delete mode 100644 tests/ui/panic-runtime/auxiliary/depends.rs delete mode 100644 tests/ui/panic-runtime/auxiliary/needs-panic-runtime.rs delete mode 100644 tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs diff --git a/compiler/rustc_metadata/src/creader.rs b/compiler/rustc_metadata/src/creader.rs index de19c10bc57c8..60788a43bd75b 100644 --- a/compiler/rustc_metadata/src/creader.rs +++ b/compiler/rustc_metadata/src/creader.rs @@ -1,7 +1,6 @@ //! Validates all used crates and extern libraries and loads their metadata use std::error::Error; -use std::ops::Fn; use std::path::Path; use std::str::FromStr; use std::time::Duration; @@ -276,12 +275,6 @@ impl CStore { .filter_map(|(cnum, data)| data.as_deref().map(|data| (cnum, data))) } - fn iter_crate_data_mut(&mut self) -> impl Iterator { - self.metas - .iter_enumerated_mut() - .filter_map(|(cnum, data)| data.as_deref_mut().map(|data| (cnum, data))) - } - fn push_dependencies_in_postorder(&self, deps: &mut IndexSet, cnum: CrateNum) { if !deps.contains(&cnum) { let data = self.get_crate_data(cnum); @@ -307,13 +300,6 @@ impl CStore { deps } - fn crate_dependencies_in_reverse_postorder( - &self, - cnum: CrateNum, - ) -> impl Iterator { - self.crate_dependencies_in_postorder(cnum).into_iter().rev() - } - pub(crate) fn injected_panic_runtime(&self) -> Option { self.injected_panic_runtime } @@ -966,27 +952,16 @@ impl<'a, 'tcx> CrateLoader<'a, 'tcx> { // If we need a panic runtime, we try to find an existing one here. At // the same time we perform some general validation of the DAG we've got // going such as ensuring everything has a compatible panic strategy. - // - // The logic for finding the panic runtime here is pretty much the same - // as the allocator case with the only addition that the panic strategy - // compilation mode also comes into play. let desired_strategy = self.sess.panic_strategy(); let mut runtime_found = false; let mut needs_panic_runtime = attr::contains_name(&krate.attrs, sym::needs_panic_runtime); - let mut panic_runtimes = Vec::new(); - for (cnum, data) in self.cstore.iter_crate_data() { + for (_cnum, data) in self.cstore.iter_crate_data() { needs_panic_runtime = needs_panic_runtime || data.needs_panic_runtime(); if data.is_panic_runtime() { - // Inject a dependency from all #![needs_panic_runtime] to this - // #![panic_runtime] crate. - panic_runtimes.push(cnum); runtime_found = runtime_found || data.dep_kind() == CrateDepKind::Explicit; } } - for cnum in panic_runtimes { - self.inject_dependency_if(cnum, "a panic runtime", &|data| data.needs_panic_runtime()); - } // If an explicitly linked and matching panic runtime was found, or if // we just don't need one at all, then we're done here and there's @@ -997,12 +972,10 @@ impl<'a, 'tcx> CrateLoader<'a, 'tcx> { // By this point we know that we (a) need a panic runtime and (b) no // panic runtime was explicitly linked. Here we just load an appropriate - // default runtime for our panic strategy and then inject the - // dependencies. + // default runtime for our panic strategy. // // We may resolve to an already loaded crate (as the crate may not have - // been explicitly linked prior to this) and we may re-inject - // dependencies again, but both of those situations are fine. + // been explicitly linked prior to this), but this is fine. // // Also note that we have yet to perform validation of the crate graph // in terms of everyone has a compatible panic runtime format, that's @@ -1031,7 +1004,6 @@ impl<'a, 'tcx> CrateLoader<'a, 'tcx> { } self.cstore.injected_panic_runtime = Some(cnum); - self.inject_dependency_if(cnum, "a panic runtime", &|data| data.needs_panic_runtime()); } fn inject_profiler_runtime(&mut self) { @@ -1212,45 +1184,6 @@ impl<'a, 'tcx> CrateLoader<'a, 'tcx> { } } - fn inject_dependency_if( - &mut self, - krate: CrateNum, - what: &str, - needs_dep: &dyn Fn(&CrateMetadata) -> bool, - ) { - // Don't perform this validation if the session has errors, as one of - // those errors may indicate a circular dependency which could cause - // this to stack overflow. - if self.dcx().has_errors().is_some() { - return; - } - - // Before we inject any dependencies, make sure we don't inject a - // circular dependency by validating that this crate doesn't - // transitively depend on any crates satisfying `needs_dep`. - for dep in self.cstore.crate_dependencies_in_reverse_postorder(krate) { - let data = self.cstore.get_crate_data(dep); - if needs_dep(&data) { - self.dcx().emit_err(errors::NoTransitiveNeedsDep { - crate_name: self.cstore.get_crate_data(krate).name(), - needs_crate_name: what, - deps_crate_name: data.name(), - }); - } - } - - // All crates satisfying `needs_dep` do not explicitly depend on the - // crate provided for this compile, but in order for this compilation to - // be successfully linked we need to inject a dependency (to order the - // crates on the command line correctly). - for (cnum, data) in self.cstore.iter_crate_data_mut() { - if needs_dep(data) { - info!("injecting a dep from {} to {}", cnum, krate); - data.add_dependency(krate); - } - } - } - fn report_unused_deps(&mut self, krate: &ast::Crate) { // Make a point span rather than covering the whole file let span = krate.spans.inner_span.shrink_to_lo(); diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index d886f25247f2d..2696c47c62c9a 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder.rs @@ -1912,10 +1912,6 @@ impl CrateMetadata { self.dependencies.iter().copied() } - pub(crate) fn add_dependency(&mut self, cnum: CrateNum) { - self.dependencies.push(cnum); - } - pub(crate) fn target_modifiers(&self) -> TargetModifiers { self.root.decode_target_modifiers(&self.blob).collect() } diff --git a/tests/ui/panic-runtime/auxiliary/depends.rs b/tests/ui/panic-runtime/auxiliary/depends.rs deleted file mode 100644 index 7a35619b68133..0000000000000 --- a/tests/ui/panic-runtime/auxiliary/depends.rs +++ /dev/null @@ -1,8 +0,0 @@ -//@ no-prefer-dynamic - -#![feature(panic_runtime)] -#![crate_type = "rlib"] -#![panic_runtime] -#![no_std] - -extern crate needs_panic_runtime; diff --git a/tests/ui/panic-runtime/auxiliary/needs-panic-runtime.rs b/tests/ui/panic-runtime/auxiliary/needs-panic-runtime.rs deleted file mode 100644 index fbafee0c24177..0000000000000 --- a/tests/ui/panic-runtime/auxiliary/needs-panic-runtime.rs +++ /dev/null @@ -1,6 +0,0 @@ -//@ no-prefer-dynamic - -#![feature(needs_panic_runtime)] -#![crate_type = "rlib"] -#![needs_panic_runtime] -#![no_std] diff --git a/tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs b/tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs deleted file mode 100644 index eb00c071702c3..0000000000000 --- a/tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs +++ /dev/null @@ -1,9 +0,0 @@ -//@ dont-check-compiler-stderr -//@ aux-build:needs-panic-runtime.rs -//@ aux-build:depends.rs - -extern crate depends; - -fn main() {} - -//~? ERROR the crate `depends` cannot depend on a crate that needs a panic runtime, but it depends on `needs_panic_runtime` From 5dfe72c1fda271e1147ac85aebf6d382145ee0c0 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 8 May 2025 14:58:26 +0000 Subject: [PATCH 03/23] Stop handling explicit dependencies on the panic runtime You shouldn't ever need to explicitly depend on it. And we weren't checking that the panic runtime used the correct panic strategy either. --- compiler/rustc_metadata/src/creader.rs | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/compiler/rustc_metadata/src/creader.rs b/compiler/rustc_metadata/src/creader.rs index 60788a43bd75b..2c882b84c588d 100644 --- a/compiler/rustc_metadata/src/creader.rs +++ b/compiler/rustc_metadata/src/creader.rs @@ -952,27 +952,19 @@ impl<'a, 'tcx> CrateLoader<'a, 'tcx> { // If we need a panic runtime, we try to find an existing one here. At // the same time we perform some general validation of the DAG we've got // going such as ensuring everything has a compatible panic strategy. - let desired_strategy = self.sess.panic_strategy(); - let mut runtime_found = false; let mut needs_panic_runtime = attr::contains_name(&krate.attrs, sym::needs_panic_runtime); - for (_cnum, data) in self.cstore.iter_crate_data() { - needs_panic_runtime = needs_panic_runtime || data.needs_panic_runtime(); - if data.is_panic_runtime() { - runtime_found = runtime_found || data.dep_kind() == CrateDepKind::Explicit; - } + needs_panic_runtime |= data.needs_panic_runtime(); } - // If an explicitly linked and matching panic runtime was found, or if - // we just don't need one at all, then we're done here and there's - // nothing else to do. - if !needs_panic_runtime || runtime_found { + // If we just don't need a panic runtime at all, then we're done here + // and there's nothing else to do. + if !needs_panic_runtime { return; } - // By this point we know that we (a) need a panic runtime and (b) no - // panic runtime was explicitly linked. Here we just load an appropriate - // default runtime for our panic strategy. + // By this point we know that we need a panic runtime. Here we just load + // an appropriate default runtime for our panic strategy. // // We may resolve to an already loaded crate (as the crate may not have // been explicitly linked prior to this), but this is fine. @@ -980,6 +972,7 @@ impl<'a, 'tcx> CrateLoader<'a, 'tcx> { // Also note that we have yet to perform validation of the crate graph // in terms of everyone has a compatible panic runtime format, that's // performed later as part of the `dependency_format` module. + let desired_strategy = self.sess.panic_strategy(); let name = match desired_strategy { PanicStrategy::Unwind => sym::panic_unwind, PanicStrategy::Abort => sym::panic_abort, From 6d3ff3915e09f736bda9bc1f04fe88a3630b71a2 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 8 May 2025 15:03:04 +0000 Subject: [PATCH 04/23] Avoid exporting panic_unwind as stdlib cargo feature There is already panic-unwind to enable it. --- library/std/Cargo.toml | 2 +- library/sysroot/Cargo.toml | 2 +- src/tools/miri/cargo-miri/src/setup.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/std/Cargo.toml b/library/std/Cargo.toml index ae7107938f363..7c2a43ef20745 100644 --- a/library/std/Cargo.toml +++ b/library/std/Cargo.toml @@ -93,7 +93,7 @@ backtrace = [ 'miniz_oxide/rustc-dep-of-std', ] -panic-unwind = ["panic_unwind"] +panic-unwind = ["dep:panic_unwind"] compiler-builtins-c = ["alloc/compiler-builtins-c"] compiler-builtins-mem = ["alloc/compiler-builtins-mem"] compiler-builtins-no-asm = ["alloc/compiler-builtins-no-asm"] diff --git a/library/sysroot/Cargo.toml b/library/sysroot/Cargo.toml index c149d513c32b4..3adc022497167 100644 --- a/library/sysroot/Cargo.toml +++ b/library/sysroot/Cargo.toml @@ -26,7 +26,7 @@ debug_typeid = ["std/debug_typeid"] llvm-libunwind = ["std/llvm-libunwind"] system-llvm-libunwind = ["std/system-llvm-libunwind"] optimize_for_size = ["std/optimize_for_size"] -panic-unwind = ["std/panic_unwind"] +panic-unwind = ["std/panic-unwind"] panic_immediate_abort = ["std/panic_immediate_abort"] profiler = ["dep:profiler_builtins"] std_detect_file_io = ["std/std_detect_file_io"] diff --git a/src/tools/miri/cargo-miri/src/setup.rs b/src/tools/miri/cargo-miri/src/setup.rs index b9b58c04f9e4a..e399f66fbc9cd 100644 --- a/src/tools/miri/cargo-miri/src/setup.rs +++ b/src/tools/miri/cargo-miri/src/setup.rs @@ -83,7 +83,7 @@ pub fn setup( SysrootConfig::NoStd } else { SysrootConfig::WithStd { - std_features: ["panic_unwind", "backtrace"].into_iter().map(Into::into).collect(), + std_features: ["panic-unwind", "backtrace"].into_iter().map(Into::into).collect(), } }; let cargo_cmd = { From c44a23c16c78d61f3283c6d23f1160a70add7975 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Fri, 9 May 2025 09:56:27 +0000 Subject: [PATCH 05/23] Make comment on activate_injected_dep a doc comment --- .../rustc_metadata/src/dependency_format.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/compiler/rustc_metadata/src/dependency_format.rs b/compiler/rustc_metadata/src/dependency_format.rs index fcae33c73c9c0..f2f5afd84a09a 100644 --- a/compiler/rustc_metadata/src/dependency_format.rs +++ b/compiler/rustc_metadata/src/dependency_format.rs @@ -370,15 +370,15 @@ fn attempt_static(tcx: TyCtxt<'_>, unavailable: &mut Vec) -> Option, list: &mut DependencyList, From b9c0f15486326e127987d79883921a1591405118 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Tue, 17 Jun 2025 16:47:55 +0000 Subject: [PATCH 06/23] Fix LTO for internalizing rustc_std_internal_symbol symbols --- compiler/rustc_codegen_ssa/src/back/linker.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs index 8138fd788cf0f..3d8ff3fbf568b 100644 --- a/compiler/rustc_codegen_ssa/src/back/linker.rs +++ b/compiler/rustc_codegen_ssa/src/back/linker.rs @@ -1876,6 +1876,21 @@ pub(crate) fn linked_symbols( } } + match tcx.sess.lto() { + Lto::No | Lto::ThinLocal => {} + Lto::Thin | Lto::Fat => { + // We really only need symbols from upstream rlibs to end up in the linked symbols list. + // The rest are in separate object files which the linker will always link in and + // doesn't have rules around the order in which they need to appear. + // When doing LTO, some of the symbols in the linked symbols list may end up getting + // internalized, which then prevents referencing them from symbols.o. When doing LTO, + // all object files that get linked in will be local object files rather than pulled in + // from rlibs, so an empty linked symbols list works fine to avoid referencing all those + // internalized symbols from symbols.o. + return Vec::new(); + } + } + let mut symbols = Vec::new(); let export_threshold = symbol_export::crates_export_threshold(&[crate_type]); From f5af05b8f7a03a9a1d08fe7faa3c842d585da1dc Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Tue, 17 Jun 2025 20:24:42 +0000 Subject: [PATCH 07/23] Fix circular dependency test to use rustc_std_internal_symbol --- tests/run-make/crate-circular-deps-link/a.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/run-make/crate-circular-deps-link/a.rs b/tests/run-make/crate-circular-deps-link/a.rs index a54f429550e74..b9a7201e8199d 100644 --- a/tests/run-make/crate-circular-deps-link/a.rs +++ b/tests/run-make/crate-circular-deps-link/a.rs @@ -1,6 +1,7 @@ #![crate_type = "rlib"] #![feature(lang_items)] #![feature(panic_unwind)] +#![feature(rustc_attrs)] #![no_std] extern crate panic_unwind; @@ -10,12 +11,12 @@ pub fn panic_handler(_: &core::panic::PanicInfo) -> ! { loop {} } -#[no_mangle] +#[rustc_std_internal_symbol] extern "C" fn __rust_drop_panic() -> ! { loop {} } -#[no_mangle] +#[rustc_std_internal_symbol] extern "C" fn __rust_foreign_exception() -> ! { loop {} } From 0c405ae459b0cf2ce7350d5b50e470c514e10542 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 23 Jun 2025 10:24:40 -0700 Subject: [PATCH 08/23] Update version placeholders --- compiler/rustc_feature/src/accepted.rs | 10 +++++----- compiler/rustc_feature/src/removed.rs | 4 ++-- compiler/rustc_feature/src/unstable.rs | 6 +++--- library/core/src/array/iter.rs | 2 +- library/core/src/array/mod.rs | 2 +- library/core/src/cell/lazy.rs | 2 +- library/core/src/ptr/non_null.rs | 16 ++++++++-------- library/core/src/result.rs | 4 ++-- library/core/src/slice/ascii.rs | 2 +- library/core/src/slice/iter.rs | 2 +- library/core/src/str/mod.rs | 2 +- library/std/src/ffi/os_str.rs | 2 +- library/std/src/fs.rs | 20 ++++++++++---------- library/std/src/io/mod.rs | 2 +- library/std/src/os/android/net.rs | 2 +- library/std/src/os/linux/net.rs | 2 +- library/std/src/os/net/linux_ext/mod.rs | 2 +- library/std/src/os/net/linux_ext/tcp.rs | 10 +++++----- library/std/src/path.rs | 2 +- library/std/src/sync/lazy_lock.rs | 2 +- tests/ui/unsized-locals/yote.stderr | 2 +- 21 files changed, 49 insertions(+), 49 deletions(-) diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs index cfe0f4e5d6cb6..bf6b88262d307 100644 --- a/compiler/rustc_feature/src/accepted.rs +++ b/compiler/rustc_feature/src/accepted.rs @@ -83,7 +83,7 @@ declare_features! ( /// Allows overloading augmented assignment operations like `a += b`. (accepted, augmented_assignments, "1.8.0", Some(28235)), /// Allows using `avx512*` target features. - (accepted, avx512_target_feature, "CURRENT_RUSTC_VERSION", Some(44839)), + (accepted, avx512_target_feature, "1.89.0", Some(44839)), /// Allows mixing bind-by-move in patterns and references to those identifiers in guards. (accepted, bind_by_move_pattern_guards, "1.39.0", Some(15287)), /// Allows bindings in the subpattern of a binding pattern. @@ -221,7 +221,7 @@ declare_features! ( /// Allows capturing variables in scope using format_args! (accepted, format_args_capture, "1.58.0", Some(67984)), /// Infer generic args for both consts and types. - (accepted, generic_arg_infer, "CURRENT_RUSTC_VERSION", Some(85077)), + (accepted, generic_arg_infer, "1.89.0", Some(85077)), /// Allows associated types to be generic, e.g., `type Foo;` (RFC 1598). (accepted, generic_associated_types, "1.65.0", Some(44265)), /// Allows attributes on lifetime/type formal parameters in generics (RFC 1327). @@ -262,7 +262,7 @@ declare_features! ( /// especially around globs and shadowing (RFC 1560). (accepted, item_like_imports, "1.15.0", Some(35120)), // Allows using the `kl` and `widekl` target features and the associated intrinsics - (accepted, keylocker_x86, "CURRENT_RUSTC_VERSION", Some(134813)), + (accepted, keylocker_x86, "1.89.0", Some(134813)), /// Allows `'a: { break 'a; }`. (accepted, label_break_value, "1.65.0", Some(48594)), /// Allows `let...else` statements. @@ -365,7 +365,7 @@ declare_features! ( /// Lessens the requirements for structs to implement `Unsize`. (accepted, relaxed_struct_unsize, "1.58.0", Some(81793)), /// Allows the `#[repr(i128)]` attribute for enums. - (accepted, repr128, "CURRENT_RUSTC_VERSION", Some(56071)), + (accepted, repr128, "1.89.0", Some(56071)), /// Allows `repr(align(16))` struct attribute (RFC 1358). (accepted, repr_align, "1.25.0", Some(33626)), /// Allows using `#[repr(align(X))]` on enums with equivalent semantics @@ -387,7 +387,7 @@ declare_features! ( /// Allows `Self` struct constructor (RFC 2302). (accepted, self_struct_ctor, "1.32.0", Some(51994)), /// Allows use of x86 SHA512, SM3 and SM4 target-features and intrinsics - (accepted, sha512_sm_x86, "CURRENT_RUSTC_VERSION", Some(126624)), + (accepted, sha512_sm_x86, "1.89.0", Some(126624)), /// Shortern the tail expression lifetime (accepted, shorter_tail_lifetimes, "1.84.0", Some(123739)), /// Allows using subslice patterns, `[a, .., b]` and `[a, xs @ .., b]`. diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs index c54b831e24448..df10edbccaf6b 100644 --- a/compiler/rustc_feature/src/removed.rs +++ b/compiler/rustc_feature/src/removed.rs @@ -221,7 +221,7 @@ declare_features! ( /// Allows exhaustive integer pattern matching with `usize::MAX`/`isize::MIN`/`isize::MAX`. (removed, precise_pointer_size_matching, "1.76.0", Some(56354), Some("removed in favor of half-open ranges"), 118598), - (removed, pref_align_of, "CURRENT_RUSTC_VERSION", Some(91971), + (removed, pref_align_of, "1.89.0", Some(91971), Some("removed due to marginal use and inducing compiler complications")), (removed, proc_macro_expr, "1.27.0", Some(54727), Some("subsumed by `#![feature(proc_macro_hygiene)]`"), 52121), @@ -264,7 +264,7 @@ declare_features! ( (removed, unnamed_fields, "1.83.0", Some(49804), Some("feature needs redesign"), 131045), (removed, unsafe_no_drop_flag, "1.0.0", None, None), /// Allows unsized rvalues at arguments and parameters. - (removed, unsized_locals, "CURRENT_RUSTC_VERSION", Some(48055), Some("removed due to implementation concerns; see https://github.com/rust-lang/rust/issues/111942")), + (removed, unsized_locals, "1.89.0", Some(48055), Some("removed due to implementation concerns; see https://github.com/rust-lang/rust/issues/111942")), (removed, unsized_tuple_coercion, "1.87.0", Some(42877), Some("The feature restricts possible layouts for tuples, and this restriction is not worth it."), 137728), /// Allows `union` fields that don't implement `Copy` as long as they don't have any drop glue. diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index 91715851226bb..31faa7e5be27b 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -238,7 +238,7 @@ declare_features! ( /// Allows using `rustc_*` attributes (RFC 572). (internal, rustc_attrs, "1.0.0", None), /// Introduces a hierarchy of `Sized` traits (RFC 3729). - (unstable, sized_hierarchy, "CURRENT_RUSTC_VERSION", None), + (unstable, sized_hierarchy, "1.89.0", None), /// Allows using the `#[stable]` and `#[unstable]` attributes. (internal, staged_api, "1.0.0", None), /// Added for testing unstable lints; perma-unstable. @@ -356,7 +356,7 @@ declare_features! ( /// Allows `extern "C-cmse-nonsecure-call" fn()`. (unstable, abi_c_cmse_nonsecure_call, "1.51.0", Some(81391)), /// Allows `extern "custom" fn()`. - (unstable, abi_custom, "CURRENT_RUSTC_VERSION", Some(140829)), + (unstable, abi_custom, "1.89.0", Some(140829)), /// Allows `extern "gpu-kernel" fn()`. (unstable, abi_gpu_kernel, "1.86.0", Some(135467)), /// Allows `extern "msp430-interrupt" fn()`. @@ -376,7 +376,7 @@ declare_features! ( /// Allows inherent and trait methods with arbitrary self types that are raw pointers. (unstable, arbitrary_self_types_pointers, "1.83.0", Some(44874)), /// Allows #[cfg(...)] on inline assembly templates and operands. - (unstable, asm_cfg, "CURRENT_RUSTC_VERSION", Some(140364)), + (unstable, asm_cfg, "1.89.0", Some(140364)), /// Enables experimental inline assembly support for additional architectures. (unstable, asm_experimental_arch, "1.58.0", Some(93335)), /// Enables experimental register support in inline assembly. diff --git a/library/core/src/array/iter.rs b/library/core/src/array/iter.rs index a59b2f05305d2..fdae5c08f1e8e 100644 --- a/library/core/src/array/iter.rs +++ b/library/core/src/array/iter.rs @@ -224,7 +224,7 @@ impl IntoIter { } } -#[stable(feature = "array_value_iter_default", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "array_value_iter_default", since = "1.89.0")] impl Default for IntoIter { fn default() -> Self { IntoIter::empty() diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs index 221ca91e005f7..5a46c04527b9e 100644 --- a/library/core/src/array/mod.rs +++ b/library/core/src/array/mod.rs @@ -588,7 +588,7 @@ impl [T; N] { /// Returns a mutable slice containing the entire array. Equivalent to /// `&mut s[..]`. #[stable(feature = "array_as_slice", since = "1.57.0")] - #[rustc_const_stable(feature = "const_array_as_mut_slice", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "const_array_as_mut_slice", since = "1.89.0")] pub const fn as_mut_slice(&mut self) -> &mut [T] { self } diff --git a/library/core/src/cell/lazy.rs b/library/core/src/cell/lazy.rs index 0b2a2ce7ded04..1758e84ad7cdf 100644 --- a/library/core/src/cell/lazy.rs +++ b/library/core/src/cell/lazy.rs @@ -284,7 +284,7 @@ impl T> Deref for LazyCell { } } -#[stable(feature = "lazy_deref_mut", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "lazy_deref_mut", since = "1.89.0")] impl T> DerefMut for LazyCell { #[inline] fn deref_mut(&mut self) -> &mut T { diff --git a/library/core/src/ptr/non_null.rs b/library/core/src/ptr/non_null.rs index 282ad32553c98..ea650b810b7fd 100644 --- a/library/core/src/ptr/non_null.rs +++ b/library/core/src/ptr/non_null.rs @@ -94,8 +94,8 @@ impl NonNull { /// For more details, see the equivalent method on a raw pointer, [`ptr::without_provenance_mut`]. /// /// This is a [Strict Provenance][crate::ptr#strict-provenance] API. - #[stable(feature = "nonnull_provenance", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "nonnull_provenance", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "nonnull_provenance", since = "1.89.0")] + #[rustc_const_stable(feature = "nonnull_provenance", since = "1.89.0")] #[must_use] #[inline] pub const fn without_provenance(addr: NonZero) -> Self { @@ -138,7 +138,7 @@ impl NonNull { /// For more details, see the equivalent method on a raw pointer, [`ptr::with_exposed_provenance_mut`]. /// /// This is an [Exposed Provenance][crate::ptr#exposed-provenance] API. - #[stable(feature = "nonnull_provenance", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "nonnull_provenance", since = "1.89.0")] #[inline] pub fn with_exposed_provenance(addr: NonZero) -> Self { // SAFETY: we know `addr` is non-zero. @@ -269,8 +269,8 @@ impl NonNull { } /// Converts a reference to a `NonNull` pointer. - #[stable(feature = "non_null_from_ref", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "non_null_from_ref", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "non_null_from_ref", since = "1.89.0")] + #[rustc_const_stable(feature = "non_null_from_ref", since = "1.89.0")] #[inline] pub const fn from_ref(r: &T) -> Self { // SAFETY: A reference cannot be null. @@ -278,8 +278,8 @@ impl NonNull { } /// Converts a mutable reference to a `NonNull` pointer. - #[stable(feature = "non_null_from_ref", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "non_null_from_ref", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "non_null_from_ref", since = "1.89.0")] + #[rustc_const_stable(feature = "non_null_from_ref", since = "1.89.0")] #[inline] pub const fn from_mut(r: &mut T) -> Self { // SAFETY: A mutable reference cannot be null. @@ -335,7 +335,7 @@ impl NonNull { /// For more details, see the equivalent method on a raw pointer, [`pointer::expose_provenance`]. /// /// This is an [Exposed Provenance][crate::ptr#exposed-provenance] API. - #[stable(feature = "nonnull_provenance", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "nonnull_provenance", since = "1.89.0")] pub fn expose_provenance(self) -> NonZero { // SAFETY: The pointer is guaranteed by the type to be non-null, // meaning that the address will be non-zero. diff --git a/library/core/src/result.rs b/library/core/src/result.rs index 3a84ea66ad4b2..7f3f296498544 100644 --- a/library/core/src/result.rs +++ b/library/core/src/result.rs @@ -1740,9 +1740,9 @@ impl Result, E> { /// assert_eq!(Ok("hello"), x.flatten().flatten()); /// ``` #[inline] - #[stable(feature = "result_flattening", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "result_flattening", since = "1.89.0")] #[rustc_allow_const_fn_unstable(const_precise_live_drops)] - #[rustc_const_stable(feature = "result_flattening", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "result_flattening", since = "1.89.0")] pub const fn flatten(self) -> Result { // FIXME(const-hack): could be written with `and_then` match self { diff --git a/library/core/src/slice/ascii.rs b/library/core/src/slice/ascii.rs index 181ae82959c66..e17a2e03d2dc4 100644 --- a/library/core/src/slice/ascii.rs +++ b/library/core/src/slice/ascii.rs @@ -52,7 +52,7 @@ impl [u8] { /// Same as `to_ascii_lowercase(a) == to_ascii_lowercase(b)`, /// but without allocating and copying temporaries. #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")] - #[rustc_const_stable(feature = "const_eq_ignore_ascii_case", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "const_eq_ignore_ascii_case", since = "1.89.0")] #[must_use] #[inline] pub const fn eq_ignore_ascii_case(&self, other: &[u8]) -> bool { diff --git a/library/core/src/slice/iter.rs b/library/core/src/slice/iter.rs index 6def6ae85306c..33132dcc7148d 100644 --- a/library/core/src/slice/iter.rs +++ b/library/core/src/slice/iter.rs @@ -3376,7 +3376,7 @@ where #[stable(feature = "slice_group_by", since = "1.77.0")] impl<'a, T: 'a, P> FusedIterator for ChunkBy<'a, T, P> where P: FnMut(&T, &T) -> bool {} -#[stable(feature = "slice_group_by_clone", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "slice_group_by_clone", since = "1.89.0")] impl<'a, T: 'a, P: Clone> Clone for ChunkBy<'a, T, P> { fn clone(&self) -> Self { Self { slice: self.slice, predicate: self.predicate.clone() } diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs index d250e1478d80a..8a6925a0e9a43 100644 --- a/library/core/src/str/mod.rs +++ b/library/core/src/str/mod.rs @@ -2754,7 +2754,7 @@ impl str { /// assert!(!"Ferrös".eq_ignore_ascii_case("FERRÖS")); /// ``` #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")] - #[rustc_const_stable(feature = "const_eq_ignore_ascii_case", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "const_eq_ignore_ascii_case", since = "1.89.0")] #[must_use] #[inline] pub const fn eq_ignore_ascii_case(&self, other: &str) -> bool { diff --git a/library/std/src/ffi/os_str.rs b/library/std/src/ffi/os_str.rs index 3cc225004ea39..8d7edc732aff3 100644 --- a/library/std/src/ffi/os_str.rs +++ b/library/std/src/ffi/os_str.rs @@ -568,7 +568,7 @@ impl OsString { /// However, keep in mind that trimming the capacity may result in a reallocation and copy. /// /// [`into_boxed_os_str`]: Self::into_boxed_os_str - #[stable(feature = "os_string_pathbuf_leak", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "os_string_pathbuf_leak", since = "1.89.0")] #[inline] pub fn leak<'a>(self) -> &'a mut OsStr { OsStr::from_inner_mut(self.inner.leak()) diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index 865ea620a283f..f0756d43132f8 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -121,7 +121,7 @@ pub struct File { /// /// [`try_lock`]: File::try_lock /// [`try_lock_shared`]: File::try_lock_shared -#[stable(feature = "file_lock", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "file_lock", since = "1.89.0")] pub enum TryLockError { /// The lock could not be acquired due to an I/O error on the file. The standard library will /// not return an [`ErrorKind::WouldBlock`] error inside [`TryLockError::Error`] @@ -366,10 +366,10 @@ pub fn write, C: AsRef<[u8]>>(path: P, contents: C) -> io::Result inner(path.as_ref(), contents.as_ref()) } -#[stable(feature = "file_lock", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "file_lock", since = "1.89.0")] impl error::Error for TryLockError {} -#[stable(feature = "file_lock", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "file_lock", since = "1.89.0")] impl fmt::Debug for TryLockError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { @@ -379,7 +379,7 @@ impl fmt::Debug for TryLockError { } } -#[stable(feature = "file_lock", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "file_lock", since = "1.89.0")] impl fmt::Display for TryLockError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { @@ -390,7 +390,7 @@ impl fmt::Display for TryLockError { } } -#[stable(feature = "file_lock", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "file_lock", since = "1.89.0")] impl From for io::Error { fn from(err: TryLockError) -> io::Error { match err { @@ -721,7 +721,7 @@ impl File { /// Ok(()) /// } /// ``` - #[stable(feature = "file_lock", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "file_lock", since = "1.89.0")] pub fn lock(&self) -> io::Result<()> { self.inner.lock() } @@ -773,7 +773,7 @@ impl File { /// Ok(()) /// } /// ``` - #[stable(feature = "file_lock", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "file_lock", since = "1.89.0")] pub fn lock_shared(&self) -> io::Result<()> { self.inner.lock_shared() } @@ -837,7 +837,7 @@ impl File { /// Ok(()) /// } /// ``` - #[stable(feature = "file_lock", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "file_lock", since = "1.89.0")] pub fn try_lock(&self) -> Result<(), TryLockError> { self.inner.try_lock() } @@ -901,7 +901,7 @@ impl File { /// Ok(()) /// } /// ``` - #[stable(feature = "file_lock", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "file_lock", since = "1.89.0")] pub fn try_lock_shared(&self) -> Result<(), TryLockError> { self.inner.try_lock_shared() } @@ -938,7 +938,7 @@ impl File { /// Ok(()) /// } /// ``` - #[stable(feature = "file_lock", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "file_lock", since = "1.89.0")] pub fn unlock(&self) -> io::Result<()> { self.inner.unlock() } diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs index a9a24681e7c8f..17c32d7a571c8 100644 --- a/library/std/src/io/mod.rs +++ b/library/std/src/io/mod.rs @@ -3128,7 +3128,7 @@ impl SizeHint for Take { } } -#[stable(feature = "seek_io_take", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "seek_io_take", since = "1.89.0")] impl Seek for Take { fn seek(&mut self, pos: SeekFrom) -> Result { let new_position = match pos { diff --git a/library/std/src/os/android/net.rs b/library/std/src/os/android/net.rs index 3a459ed8aeea1..95c3a74c4890a 100644 --- a/library/std/src/os/android/net.rs +++ b/library/std/src/os/android/net.rs @@ -6,5 +6,5 @@ pub use crate::os::net::linux_ext::addr::SocketAddrExt; #[unstable(feature = "unix_socket_ancillary_data", issue = "76915")] pub use crate::os::net::linux_ext::socket::UnixSocketExt; -#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "tcp_quickack", since = "1.89.0")] pub use crate::os::net::linux_ext::tcp::TcpStreamExt; diff --git a/library/std/src/os/linux/net.rs b/library/std/src/os/linux/net.rs index c14aba13bd153..ee56dafdbfda2 100644 --- a/library/std/src/os/linux/net.rs +++ b/library/std/src/os/linux/net.rs @@ -6,5 +6,5 @@ pub use crate::os::net::linux_ext::addr::SocketAddrExt; #[unstable(feature = "unix_socket_ancillary_data", issue = "76915")] pub use crate::os::net::linux_ext::socket::UnixSocketExt; -#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "tcp_quickack", since = "1.89.0")] pub use crate::os::net::linux_ext::tcp::TcpStreamExt; diff --git a/library/std/src/os/net/linux_ext/mod.rs b/library/std/src/os/net/linux_ext/mod.rs index bb9dfae2623e1..3c9afe35479df 100644 --- a/library/std/src/os/net/linux_ext/mod.rs +++ b/library/std/src/os/net/linux_ext/mod.rs @@ -8,7 +8,7 @@ pub(crate) mod addr; #[unstable(feature = "unix_socket_ancillary_data", issue = "76915")] pub(crate) mod socket; -#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "tcp_quickack", since = "1.89.0")] pub(crate) mod tcp; #[cfg(test)] diff --git a/library/std/src/os/net/linux_ext/tcp.rs b/library/std/src/os/net/linux_ext/tcp.rs index 167cfa6253165..fde53ec4257bd 100644 --- a/library/std/src/os/net/linux_ext/tcp.rs +++ b/library/std/src/os/net/linux_ext/tcp.rs @@ -9,7 +9,7 @@ use crate::{io, net}; /// Os-specific extensions for [`TcpStream`] /// /// [`TcpStream`]: net::TcpStream -#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "tcp_quickack", since = "1.89.0")] pub trait TcpStreamExt: Sealed { /// Enable or disable `TCP_QUICKACK`. /// @@ -33,7 +33,7 @@ pub trait TcpStreamExt: Sealed { /// .expect("Couldn't connect to the server..."); /// stream.set_quickack(true).expect("set_quickack call failed"); /// ``` - #[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "tcp_quickack", since = "1.89.0")] fn set_quickack(&self, quickack: bool) -> io::Result<()>; /// Gets the value of the `TCP_QUICKACK` option on this socket. @@ -54,7 +54,7 @@ pub trait TcpStreamExt: Sealed { /// stream.set_quickack(true).expect("set_quickack call failed"); /// assert_eq!(stream.quickack().unwrap_or(false), true); /// ``` - #[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "tcp_quickack", since = "1.89.0")] fn quickack(&self) -> io::Result; /// A socket listener will be awakened solely when data arrives. @@ -103,10 +103,10 @@ pub trait TcpStreamExt: Sealed { fn deferaccept(&self) -> io::Result; } -#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "tcp_quickack", since = "1.89.0")] impl Sealed for net::TcpStream {} -#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "tcp_quickack", since = "1.89.0")] impl TcpStreamExt for net::TcpStream { fn set_quickack(&self, quickack: bool) -> io::Result<()> { self.as_inner().as_inner().set_quickack(quickack) diff --git a/library/std/src/path.rs b/library/std/src/path.rs index 07f212b113564..b734d2b324c08 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -1252,7 +1252,7 @@ impl PathBuf { /// However, keep in mind that trimming the capacity may result in a reallocation and copy. /// /// [`into_boxed_path`]: Self::into_boxed_path - #[stable(feature = "os_string_pathbuf_leak", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "os_string_pathbuf_leak", since = "1.89.0")] #[inline] pub fn leak<'a>(self) -> &'a mut Path { Path::from_inner_mut(self.inner.leak()) diff --git a/library/std/src/sync/lazy_lock.rs b/library/std/src/sync/lazy_lock.rs index 82e5fe05db5e3..eba849d16dacd 100644 --- a/library/std/src/sync/lazy_lock.rs +++ b/library/std/src/sync/lazy_lock.rs @@ -313,7 +313,7 @@ impl T> Deref for LazyLock { } } -#[stable(feature = "lazy_deref_mut", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "lazy_deref_mut", since = "1.89.0")] impl T> DerefMut for LazyLock { #[inline] fn deref_mut(&mut self) -> &mut T { diff --git a/tests/ui/unsized-locals/yote.stderr b/tests/ui/unsized-locals/yote.stderr index 8e7da64038a40..f08a0b4aa6067 100644 --- a/tests/ui/unsized-locals/yote.stderr +++ b/tests/ui/unsized-locals/yote.stderr @@ -4,7 +4,7 @@ error[E0557]: feature has been removed LL | #![feature(unsized_locals)] | ^^^^^^^^^^^^^^ feature has been removed | - = note: removed in CURRENT_RUSTC_VERSION + = note: removed in 1.89.0 = note: removed due to implementation concerns; see https://github.com/rust-lang/rust/issues/111942 error: aborting due to 1 previous error From 1e9c63fbe614fab35e5d1d1a7fc5b62a3530bf11 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 24 Jun 2025 08:28:23 -0700 Subject: [PATCH 09/23] Update stage0 to 1.89.0-beta.1 --- src/stage0 | 940 +++++++++++++++++++++++++++-------------------------- 1 file changed, 480 insertions(+), 460 deletions(-) diff --git a/src/stage0 b/src/stage0 index 4cff7bafa5dee..3313edf329cac 100644 --- a/src/stage0 +++ b/src/stage0 @@ -13,466 +13,486 @@ nightly_branch=master # All changes below this comment will be overridden the next time the # tool is executed. -compiler_date=2025-05-26 +compiler_date=2025-06-24 compiler_version=beta -rustfmt_date=2025-05-27 +rustfmt_date=2025-06-24 rustfmt_version=nightly -dist/2025-05-26/rustc-beta-aarch64-apple-darwin.tar.gz=4dbdbac9216bb9a1e277f02d1fbbe6125709456a26440d0b8b852f615c8d0e5e -dist/2025-05-26/rustc-beta-aarch64-apple-darwin.tar.xz=14cfac4d029e4960d3d822d2a02fd5a604b4d545ccf9b2a6c8ce7d1a7fffd2a2 -dist/2025-05-26/rustc-beta-aarch64-pc-windows-msvc.tar.gz=af901ff979cb9ec448ca8d5ae8dd70987b015614265dc7d8c5fbcf0c7d7f06f1 -dist/2025-05-26/rustc-beta-aarch64-pc-windows-msvc.tar.xz=afe5ac02574f8b996a8eb7dd7e95d717655da8a49f652694a31f52fdb39eb044 -dist/2025-05-26/rustc-beta-aarch64-unknown-linux-gnu.tar.gz=f2eaa46be24e7d5504628f05f799e58dd993d8ac3158328c238b834c14b5ad33 -dist/2025-05-26/rustc-beta-aarch64-unknown-linux-gnu.tar.xz=2c4a949aee410d9ed6602c3f95d58895fb0051fe7a3f1d0abd585f3d952a31d7 -dist/2025-05-26/rustc-beta-aarch64-unknown-linux-musl.tar.gz=e8aec1f37de24b6532056f5e3be512f5ddde86e536a9b68dab0baac76df36778 -dist/2025-05-26/rustc-beta-aarch64-unknown-linux-musl.tar.xz=64457bd80c7575c0792a5b998d407dea844d38d102560d1fce824ac8241efa7c -dist/2025-05-26/rustc-beta-arm-unknown-linux-gnueabi.tar.gz=fd5dac6844caaccc15f29bea41b81e9d271f4408057580a86fdd7f5a032f4233 -dist/2025-05-26/rustc-beta-arm-unknown-linux-gnueabi.tar.xz=3095a4442404eb8e958ab9205fca9cfff13ca52cc18602fb322b410d497e6849 -dist/2025-05-26/rustc-beta-arm-unknown-linux-gnueabihf.tar.gz=d02a4cd721a8fa1f82f64bd9953f4867e1628dbb9e223e04c3ab7954f7eec055 -dist/2025-05-26/rustc-beta-arm-unknown-linux-gnueabihf.tar.xz=84c1a1e5e8dfb796c1c6b643329dfb65f53df372455fc70f4f3abd5dc8f614d8 -dist/2025-05-26/rustc-beta-armv7-unknown-linux-gnueabihf.tar.gz=86b675fa61c7cfd494e7e6ed514e9ccf6beab425238c236f8425052df7800724 -dist/2025-05-26/rustc-beta-armv7-unknown-linux-gnueabihf.tar.xz=078b1d00b8c6a37823d724b7993e7b2bcc73f433230a25bcbeb191eb2a0e8714 -dist/2025-05-26/rustc-beta-i686-pc-windows-gnu.tar.gz=08b47eca900f48b51ad4da927dca1a29b761e4e62b8e8eed7486cb150101afe1 -dist/2025-05-26/rustc-beta-i686-pc-windows-gnu.tar.xz=da0701faa92f4cfab71a78e707068d4840fb79393a00b14984a2bb37c24d99f5 -dist/2025-05-26/rustc-beta-i686-pc-windows-msvc.tar.gz=35de6670fbf76f3455be1630c8a3f628baea46473a69f0281e0dee20121b44be -dist/2025-05-26/rustc-beta-i686-pc-windows-msvc.tar.xz=45bd16224593ae586358343ceb5c845af01b053800bc0dd9ddb3fca352abeb09 -dist/2025-05-26/rustc-beta-i686-unknown-linux-gnu.tar.gz=1de0f032ca7755c2b2c7d79d048bb8e25279a728619b9bec65f8e373ef58ff0f -dist/2025-05-26/rustc-beta-i686-unknown-linux-gnu.tar.xz=00506ca8eeca547c844c48165e80afc71fa5bc9ad5734c2b90ebd9d6184540f5 -dist/2025-05-26/rustc-beta-loongarch64-unknown-linux-gnu.tar.gz=3067489dbd5bd1713e0d256a13061f484d662b4dad46e502a0d7507db69506c4 -dist/2025-05-26/rustc-beta-loongarch64-unknown-linux-gnu.tar.xz=09337bbecb0933162c1dcd5c85a5fa430b85c4b541b70f01ba77a82d5e64cbdb -dist/2025-05-26/rustc-beta-loongarch64-unknown-linux-musl.tar.gz=aac2f6ca44fd4541ec6acdb658631e7907365f27b874c5cb14a15bd1fd23ee78 -dist/2025-05-26/rustc-beta-loongarch64-unknown-linux-musl.tar.xz=51505bc92660d2e206ea35218b682e23155f5d006ab200cbb1398f6a23c63fcf -dist/2025-05-26/rustc-beta-powerpc-unknown-linux-gnu.tar.gz=35e4fa7207810cd8490e3d7ba181356d55e946d740a7a4f36e18d38e8a3b35a2 -dist/2025-05-26/rustc-beta-powerpc-unknown-linux-gnu.tar.xz=4cc9f12877323f5ebcf7f3d2878800dbc4d0930615b9baeb40e0a2824536d5d9 -dist/2025-05-26/rustc-beta-powerpc64-unknown-linux-gnu.tar.gz=9d8b217d6733c5f0375eaf6a38aa1a1b596ac5ef979f9440ff51ec7e7df25b08 -dist/2025-05-26/rustc-beta-powerpc64-unknown-linux-gnu.tar.xz=b32b303840f35d6a2f42751cada1f833b4c55b7d83634b1cc6d469902539d168 -dist/2025-05-26/rustc-beta-powerpc64le-unknown-linux-gnu.tar.gz=2fb8b2e97e7d1adea24302e2d2cf47b04200c6ad0299498d07b4ab59b6d4df08 -dist/2025-05-26/rustc-beta-powerpc64le-unknown-linux-gnu.tar.xz=33c763eeedd8f3a3ca885f94ade5c3a2355a479a0186ddae33e4cb068529de72 -dist/2025-05-26/rustc-beta-powerpc64le-unknown-linux-musl.tar.gz=6f59fecc08d6e84616bb89c2ee73b2f285c4bb2ebdfb122538c49b2fda41d1f9 -dist/2025-05-26/rustc-beta-powerpc64le-unknown-linux-musl.tar.xz=4723d0b463897004959e91675aa50aff0c9a9beca943267d77d11d5beee257cb -dist/2025-05-26/rustc-beta-riscv64gc-unknown-linux-gnu.tar.gz=96a0400a43b8bc948619b51a9b8dbe778584b4225baf11f97bb59a443dfad1bb -dist/2025-05-26/rustc-beta-riscv64gc-unknown-linux-gnu.tar.xz=cee9ff6682f8c87d5b81082dd6dd7eea26c59c246ef34c70c934b07a2d520817 -dist/2025-05-26/rustc-beta-s390x-unknown-linux-gnu.tar.gz=fa4d770e564aa0863825d5111a4b6c01d8486c65e8b9ef06db25ef778a448813 -dist/2025-05-26/rustc-beta-s390x-unknown-linux-gnu.tar.xz=945070094b80ac73cb013d3f556767caf6437258121f76921227e44d18249678 -dist/2025-05-26/rustc-beta-x86_64-apple-darwin.tar.gz=cf87e17e8f2fd18d9146671a393f31ab40ccfaf4c781bb81cdf02dff8bab5435 -dist/2025-05-26/rustc-beta-x86_64-apple-darwin.tar.xz=7cf73955adfb107f454829d3503d6cf91430e4cf5c4640466073c2c0f8a42732 -dist/2025-05-26/rustc-beta-x86_64-pc-windows-gnu.tar.gz=12b7528b31d971ccd36a44fff62ccc377dfa322a22af85fbcc7dcf2c8f2e0539 -dist/2025-05-26/rustc-beta-x86_64-pc-windows-gnu.tar.xz=21a305e0b085d73db5d79dabb61e1aad213b623f12708f94ff448a2db60d7651 -dist/2025-05-26/rustc-beta-x86_64-pc-windows-msvc.tar.gz=444aa1eea6824d1b73c0f653a2703806bd04154da160f96b9700c39b9e201dc3 -dist/2025-05-26/rustc-beta-x86_64-pc-windows-msvc.tar.xz=16c6000c46bab4f46ec2084d7e920d2099b8759870057e62bf0e8df8eb4ccb9f -dist/2025-05-26/rustc-beta-x86_64-unknown-freebsd.tar.gz=6ad9c67484aa6598c4f0f70799980f57e4749560306ce1190dcb38476006247d -dist/2025-05-26/rustc-beta-x86_64-unknown-freebsd.tar.xz=b8f921568dbca553484936adb267d384b8ce6bfd40efa0b54d22cd98a6638c43 -dist/2025-05-26/rustc-beta-x86_64-unknown-illumos.tar.gz=14083e187d62529058dc0de8657024f5dc2ac5af37986053fc21f2334e1217af -dist/2025-05-26/rustc-beta-x86_64-unknown-illumos.tar.xz=2410d5423581ec2d205a47bfeb3c95bf3071303b5b71343254492d53fa27cd48 -dist/2025-05-26/rustc-beta-x86_64-unknown-linux-gnu.tar.gz=6561e72c72b5a2a10ef97632c0af2ce8112fe0faf6d12d83da0ec9f0b347b88f -dist/2025-05-26/rustc-beta-x86_64-unknown-linux-gnu.tar.xz=14b944631444b666019e0c2f3590b78b3de3dcd499c0f7254dd22a95703e8585 -dist/2025-05-26/rustc-beta-x86_64-unknown-linux-musl.tar.gz=cd09f6ef2c26b2f192cf1a05badd3603e8cab4141e120ec98c1afbcda7036aa5 -dist/2025-05-26/rustc-beta-x86_64-unknown-linux-musl.tar.xz=53745c050956b886e5e3f523b1a77f40c6c73c1df867505cb9f1ec2cb5026f56 -dist/2025-05-26/rustc-beta-x86_64-unknown-netbsd.tar.gz=d88ccdea31b269ad513cd8106c0aec60124ee1ec50c839dbc7218dc1d2b80e0a -dist/2025-05-26/rustc-beta-x86_64-unknown-netbsd.tar.xz=d10add7b925f1492d2b1c9ecd76df2065bac118fa6a27fde7b73d5ec55f30c0c -dist/2025-05-26/rust-std-beta-aarch64-apple-darwin.tar.gz=4076b5062f1e3f098c0b5ce5cacbaed784afcae6f7db740c0939fcf3a58025e6 -dist/2025-05-26/rust-std-beta-aarch64-apple-darwin.tar.xz=91c94ea57ca9eebf103d89532c6b1b24f3a2529f3a755b1c29ae0897b759dec6 -dist/2025-05-26/rust-std-beta-aarch64-apple-ios.tar.gz=8b89d32f731c103945efedaf2d9050d96e525d50f066239175f629cc0e3b944c -dist/2025-05-26/rust-std-beta-aarch64-apple-ios.tar.xz=b139ea399a96514732007ba26488cc6f75cd86e710938638dc3b1c7913a8b103 -dist/2025-05-26/rust-std-beta-aarch64-apple-ios-macabi.tar.gz=7bb6dd559ef08d5e8bbfee75243eca8760d411f952ff646356ce4fe74564dc2a -dist/2025-05-26/rust-std-beta-aarch64-apple-ios-macabi.tar.xz=c17c372f13bddd9d0629fc1bab0dac6004f7356752db20b196da0e46860b174d -dist/2025-05-26/rust-std-beta-aarch64-apple-ios-sim.tar.gz=a2a01f111d234d89b820591428b036cc6de2b74e6c0e96c32211b085e537b4f6 -dist/2025-05-26/rust-std-beta-aarch64-apple-ios-sim.tar.xz=06380c88a781e584feea822c91b1b6f98412ed5699d4d00d65e5ef7075dbf4c4 -dist/2025-05-26/rust-std-beta-aarch64-linux-android.tar.gz=1ab07c597044c1eed2224aa72893e14055494d8fcf0e746426578055ee881087 -dist/2025-05-26/rust-std-beta-aarch64-linux-android.tar.xz=c55be970bcde2866cb2d66830476cd7fd52692a791fbe3f198e84913a4247a4b -dist/2025-05-26/rust-std-beta-aarch64-pc-windows-gnullvm.tar.gz=7445b8979d6d325a1a6714e28048ce965159b7fa326c9b7d663c771129f81a7b -dist/2025-05-26/rust-std-beta-aarch64-pc-windows-gnullvm.tar.xz=f3fe861b5d81b54c7861663519324a5d305f3300c733cb7f146b6a93770fb73b -dist/2025-05-26/rust-std-beta-aarch64-pc-windows-msvc.tar.gz=57be8b656ae0f4fa9164803155c9af5eafdd961bac752ff3833e5ceba4accb18 -dist/2025-05-26/rust-std-beta-aarch64-pc-windows-msvc.tar.xz=e64807cbdf82117a127d85a35a1303683dbe3c95366bf469c13a2781ed66916b -dist/2025-05-26/rust-std-beta-aarch64-unknown-fuchsia.tar.gz=d8d4737d031170d5c6f8bb1aede6c863a3ad6c32007de2e1b7ff03242710ab17 -dist/2025-05-26/rust-std-beta-aarch64-unknown-fuchsia.tar.xz=27998ee47c29ba860a5c56155332091275e7e9669e035fcf11a02c9089b6e8f2 -dist/2025-05-26/rust-std-beta-aarch64-unknown-linux-gnu.tar.gz=9dc717d80d91e833580748c831c2a80bca2f8d7bce9af51d21f0375c44cce395 -dist/2025-05-26/rust-std-beta-aarch64-unknown-linux-gnu.tar.xz=88ffb04366bc06c331113026ea64b04ce970f01f13a0e80736fd59676e4e974a -dist/2025-05-26/rust-std-beta-aarch64-unknown-linux-musl.tar.gz=5ac4a726e875af3387a2214f722b676e21e3d0afbfbcf1969107c34c6eeb1706 -dist/2025-05-26/rust-std-beta-aarch64-unknown-linux-musl.tar.xz=7fe9cd0d76f9c4778d53b5fba083616ac06d04b622e9e783e3e0fd3e0d3756e8 -dist/2025-05-26/rust-std-beta-aarch64-unknown-linux-ohos.tar.gz=5813b23bccf3fe10ec2ab540149bed4739668d9f9b198a476300e50e53721d52 -dist/2025-05-26/rust-std-beta-aarch64-unknown-linux-ohos.tar.xz=383a1758e3f2f1d20b23b8095f3772f79ea5377312602cd577a2b047ed062115 -dist/2025-05-26/rust-std-beta-aarch64-unknown-none.tar.gz=3589b1e3c4367b369050062e9df8838a797059056c98662e47d1cf71ecdcd787 -dist/2025-05-26/rust-std-beta-aarch64-unknown-none.tar.xz=47e290959699c9bc9093cd6603bf3357492ef7a05a5c2335393d41ef94955c30 -dist/2025-05-26/rust-std-beta-aarch64-unknown-none-softfloat.tar.gz=e690ad47757a726cfe621e936dd0ac76d96dd4b838ba3e5dd582565d5b2c3618 -dist/2025-05-26/rust-std-beta-aarch64-unknown-none-softfloat.tar.xz=2d17e86eaaddc93e81b3bd39d3faeed3ccb1765a9a13144d4bab726d384f8eba -dist/2025-05-26/rust-std-beta-aarch64-unknown-uefi.tar.gz=a5f8b8e8ee3859d877430760132180ef956e597de3ab539e980aa48c937e3e10 -dist/2025-05-26/rust-std-beta-aarch64-unknown-uefi.tar.xz=225b50bb3500d46291bdf877cdce57d8bf8133f1302b98c3b8d07d34a91cfadc -dist/2025-05-26/rust-std-beta-arm-linux-androideabi.tar.gz=aa93b2e198a1ea5f586851ecde2b1fc56a0e28e2c16e7210cd77b4357e327196 -dist/2025-05-26/rust-std-beta-arm-linux-androideabi.tar.xz=00e020d2654c6324b6c8070c9ac32b0838470ad74df711ea7c9940a4bdcbb71f -dist/2025-05-26/rust-std-beta-arm-unknown-linux-gnueabi.tar.gz=c0ed57ac290b57f654419e35f7950c6b2b2594638bfca5a060a49dff6febd2de -dist/2025-05-26/rust-std-beta-arm-unknown-linux-gnueabi.tar.xz=bcb7a661e83d7973ac0cf9ead4588595cbcf39e71867d1e2fb3e6e94f2506d39 -dist/2025-05-26/rust-std-beta-arm-unknown-linux-gnueabihf.tar.gz=baf206be5648992a7280836ed7520b5fd6ca59a28d9aecfbf3769022ececc753 -dist/2025-05-26/rust-std-beta-arm-unknown-linux-gnueabihf.tar.xz=a86cb2309e93b7a0ff92199e47e0a36f192221eb376966b1e4a49c8d5d5de7bd -dist/2025-05-26/rust-std-beta-arm-unknown-linux-musleabi.tar.gz=703b6baab5a33e6ed1acaad52781c1779146e1fa5d5974d19d354dc2279ccec6 -dist/2025-05-26/rust-std-beta-arm-unknown-linux-musleabi.tar.xz=55e56cda5e2af49b0ccab4baeb0e8051c416c0321832742609edde9b1ebae8ee -dist/2025-05-26/rust-std-beta-arm-unknown-linux-musleabihf.tar.gz=7080221a8911393a012306c934043df6aa4d483411c90ca275d2539704d38120 -dist/2025-05-26/rust-std-beta-arm-unknown-linux-musleabihf.tar.xz=8d9ed7e57a37f328aeb4004f043887edd980e7ac0df8ff714566b0bf474bce99 -dist/2025-05-26/rust-std-beta-arm64ec-pc-windows-msvc.tar.gz=85cd1a37bc2977c116264a6e84f2c578c7a698e26bf7bd99e0713b14ec6c74c5 -dist/2025-05-26/rust-std-beta-arm64ec-pc-windows-msvc.tar.xz=6ee7ea565266040310050a4cf3e2afb1e85f956e0ad54a9642291949e1b376bc -dist/2025-05-26/rust-std-beta-armebv7r-none-eabi.tar.gz=8c41876321a8bec594d028460c93396786739ed82f79ed8703cf54dfc1e7d51b -dist/2025-05-26/rust-std-beta-armebv7r-none-eabi.tar.xz=fb1a88a048e1945dc2bb84aa47e027455c5a94acf416865c5ef26c6a1616414f -dist/2025-05-26/rust-std-beta-armebv7r-none-eabihf.tar.gz=61561a8324bced38f5ee6c1c65348750162655315ddb5eb0f0142a48872faa8c -dist/2025-05-26/rust-std-beta-armebv7r-none-eabihf.tar.xz=3e57bdf2dfb8cbcdd4b4f7e2523cd7946dd0d64d0ee17cf794b5a04dab26a46b -dist/2025-05-26/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.gz=c2586abead3190b936f1cdb46c472ee4c4b6bdfeb9c33165765922d3da0151a0 -dist/2025-05-26/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.xz=24a64cbdabd8074219f7a27f266f695109bcd7fc3646cc78652cf2f3bc2ea099 -dist/2025-05-26/rust-std-beta-armv5te-unknown-linux-musleabi.tar.gz=a6b7e5ec522eb29582c7ca2d9a2a79f1658058c4db6b0442ccfae40e1403ff07 -dist/2025-05-26/rust-std-beta-armv5te-unknown-linux-musleabi.tar.xz=94f88e141605997ae9578b062de3f750761648847d0ed6fd18394d8dbb81afff -dist/2025-05-26/rust-std-beta-armv7-linux-androideabi.tar.gz=e50086fac3b8e433d1a59724349122bde2172bc22db1175c7826635d978973c0 -dist/2025-05-26/rust-std-beta-armv7-linux-androideabi.tar.xz=2700b25ce1e6db9eadd2b3f63582fc3759963449781799216239b9e2daa9e51b -dist/2025-05-26/rust-std-beta-armv7-unknown-linux-gnueabi.tar.gz=e507fd70d155f17fc3cd5e1b38b97a871d51090d4dd7069366d3e3e2a48c0355 -dist/2025-05-26/rust-std-beta-armv7-unknown-linux-gnueabi.tar.xz=8988863479cb0280851e1765de2810eebcfc1592100b052e88c51386a88c4c87 -dist/2025-05-26/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.gz=519cfee0178123e15bea3544113ac3f4914a72fd619fdf11044ccc1b8b31c848 -dist/2025-05-26/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.xz=5cf09c2f66482863ca9586782f56aa453c3fbe8ab48d80c18d5570b1d7a80455 -dist/2025-05-26/rust-std-beta-armv7-unknown-linux-musleabi.tar.gz=9949d9684b83610bcba9fd91cc66587d6216dc850cc7b6413a7dc0f80dc4ca2b -dist/2025-05-26/rust-std-beta-armv7-unknown-linux-musleabi.tar.xz=cd87009d6362cc5777a664e537261227fda510a5e9ac1080a42b0f2fa7b4d364 -dist/2025-05-26/rust-std-beta-armv7-unknown-linux-musleabihf.tar.gz=a9a5280fc64bcb40dbd43f3fae1ee01dfffb06d4bbf1a635b79b923343f97060 -dist/2025-05-26/rust-std-beta-armv7-unknown-linux-musleabihf.tar.xz=bf1e9ef03fc1d727b59ffcd991c207c503db884b14134154ff674b6435dd7c92 -dist/2025-05-26/rust-std-beta-armv7-unknown-linux-ohos.tar.gz=9171f328fc67817f3f2e10209e0122ec7e9f0138ad8ffb4b19b64d21a72b9414 -dist/2025-05-26/rust-std-beta-armv7-unknown-linux-ohos.tar.xz=9d9974ccdd87fb741a568ca8966e21a044f8c40415b4e58bcf359605c6c3d8fb -dist/2025-05-26/rust-std-beta-armv7a-none-eabi.tar.gz=402f7b7b4c132ec6a1d51c0528608291a423e16090b9f4327e447fdef5d8e771 -dist/2025-05-26/rust-std-beta-armv7a-none-eabi.tar.xz=9a8d857299c24a54a5c49b25d5b07bdd9eb77b4a4be853d6d12e5df4ac404c56 -dist/2025-05-26/rust-std-beta-armv7r-none-eabi.tar.gz=c8fc641d53bc04751d16283d50696ade8925e22d530cdd4f97facd7e2e4f878c -dist/2025-05-26/rust-std-beta-armv7r-none-eabi.tar.xz=4773a4a02fa088d3c4231695cc698edeef39c2a0ac3f4d3a0eb272d7b8663705 -dist/2025-05-26/rust-std-beta-armv7r-none-eabihf.tar.gz=4ffc1f544f164f5e4a803fb9aacff693e00abcead950bde2d7065739e189058a -dist/2025-05-26/rust-std-beta-armv7r-none-eabihf.tar.xz=e64d238b9468ecc3df0e3a20cbc0c2b3bd5a12500fad4b7194382106ee5c4aa3 -dist/2025-05-26/rust-std-beta-i586-unknown-linux-gnu.tar.gz=82ac2e07233a629ff1ea556be728fb1617ce085f5909ae3f3b9d8a792f73baca -dist/2025-05-26/rust-std-beta-i586-unknown-linux-gnu.tar.xz=2c54755349f8d94511b15b29b527533be186f6865ee1b2022e5345f42b00f5bf -dist/2025-05-26/rust-std-beta-i586-unknown-linux-musl.tar.gz=5debce1f9edbbbf0b8e2e8055525296d2d7c4a14bf561c7bc05e7eb953b5a034 -dist/2025-05-26/rust-std-beta-i586-unknown-linux-musl.tar.xz=e559611ce05ba79894c4e3bd9066701ea851708ca44c0189c93607fe8721640a -dist/2025-05-26/rust-std-beta-i686-linux-android.tar.gz=17be4d733c597bc7ff5aefe1b5944df0d2f3f2274773f2691e863fcf18877251 -dist/2025-05-26/rust-std-beta-i686-linux-android.tar.xz=2603b3e9fa2b8a2f769ea3558037e4a20b1bd13101c518f05a5800935bb5b02b -dist/2025-05-26/rust-std-beta-i686-pc-windows-gnu.tar.gz=3c2c9283b1fb0196bfedd8f87f1aaf00dbcadd52ca8fb40382262f86e21701d9 -dist/2025-05-26/rust-std-beta-i686-pc-windows-gnu.tar.xz=3067d576128325449174c9220d10c543644e94d6045764e32bfccd30cd94e94b -dist/2025-05-26/rust-std-beta-i686-pc-windows-gnullvm.tar.gz=6df448b2a49f2f9f3f4fd0cb0ef758f31f00fbf2008b4a9ae2a1cc5818bbb21c -dist/2025-05-26/rust-std-beta-i686-pc-windows-gnullvm.tar.xz=537a695b2377b1aa4ed31970b8170ddc575c18c180faec5602febe71bc44088d -dist/2025-05-26/rust-std-beta-i686-pc-windows-msvc.tar.gz=d45afe32951d926702d62d5a94b5343c3cd2f1d04497af3412dc6d1ccb97be05 -dist/2025-05-26/rust-std-beta-i686-pc-windows-msvc.tar.xz=bd8a25921b63d3d4fe13219422a324a538a08284dac681153d960cd25fd02c6c -dist/2025-05-26/rust-std-beta-i686-unknown-freebsd.tar.gz=e8ad2a8eae371b8a99251bc3337732f3e47457a8d740a9609f96206291589f43 -dist/2025-05-26/rust-std-beta-i686-unknown-freebsd.tar.xz=e2edeb9636cab8ba8489d28e829c039d4e547ccdbfd4023f98943341f5cad96c -dist/2025-05-26/rust-std-beta-i686-unknown-linux-gnu.tar.gz=9b319357a2c6d75d0140bad5241a72e4d858e06962c024414449299f83bce9b4 -dist/2025-05-26/rust-std-beta-i686-unknown-linux-gnu.tar.xz=b4447663123e42a950943829f661283d6b36f3da14750c811d6704a2edc64b40 -dist/2025-05-26/rust-std-beta-i686-unknown-linux-musl.tar.gz=4391070bdb67171c4063df3d801dc66e16c097165873c5c219659e1e706028fb -dist/2025-05-26/rust-std-beta-i686-unknown-linux-musl.tar.xz=48e566d549dff7bde2a1cb07c55ee0a2537147f66e4ca8a7bc9ac9ebe104de28 -dist/2025-05-26/rust-std-beta-i686-unknown-uefi.tar.gz=3176685b3b5b3d0f44655f5449b328ff8c2e4a577d1076a2692f2e7062004e3d -dist/2025-05-26/rust-std-beta-i686-unknown-uefi.tar.xz=2c0983eaec9d5cca76fdf0fceb3461960e5bcb162c2409169d0c6ddfc5497f8a -dist/2025-05-26/rust-std-beta-loongarch64-unknown-linux-gnu.tar.gz=17e49779ef3931acbc2828a5a674e1d9032f08ca6166cb62a9ba7dc156b06ee8 -dist/2025-05-26/rust-std-beta-loongarch64-unknown-linux-gnu.tar.xz=7411b776b6fb10d0a10e3de19183caeb9980f523aa014a5b320bb4422f2301a8 -dist/2025-05-26/rust-std-beta-loongarch64-unknown-linux-musl.tar.gz=1a54d2d8b31a84693738a896068e38506b9d8e94f660368c6674ca66d38fee89 -dist/2025-05-26/rust-std-beta-loongarch64-unknown-linux-musl.tar.xz=1023907e072bf083168497dea8801544d2f407cdba1ad3157977032c92e7c4d8 -dist/2025-05-26/rust-std-beta-loongarch64-unknown-none.tar.gz=86135dbb69909d33a0d6bf0caeb35f190299f594b062238e3d18ec7ffab26150 -dist/2025-05-26/rust-std-beta-loongarch64-unknown-none.tar.xz=3e9733daceb421f6a2e00a1c8d7ba2ad87332127ca0fedfc391bd0715836da2f -dist/2025-05-26/rust-std-beta-loongarch64-unknown-none-softfloat.tar.gz=6190b439b569ef1a5aa832445ac60bb5b4ef605ff8f41a0ad1cdc5f5cb0de28b -dist/2025-05-26/rust-std-beta-loongarch64-unknown-none-softfloat.tar.xz=8e5a7224d8abd8010a4278f7e767aecdcde7060ffb16e0a5c8de579c5d86e21b -dist/2025-05-26/rust-std-beta-nvptx64-nvidia-cuda.tar.gz=2006ea99dcecccabf97d74f3f582f8a29c4e69caf27fa9a689a28702a6d9b1ad -dist/2025-05-26/rust-std-beta-nvptx64-nvidia-cuda.tar.xz=7baffc71f0e9279439775b95280206411ef04bea7eb4ad38096a11a38e38dd47 -dist/2025-05-26/rust-std-beta-powerpc-unknown-linux-gnu.tar.gz=9650a6a1812492df104c0df20c5db422678e2f7a84e33a83aedf1d9c602369d6 -dist/2025-05-26/rust-std-beta-powerpc-unknown-linux-gnu.tar.xz=4a265f557aca1b2cc3d377be693bf9fe90c4b0ced99e77a406849aaaf3ad7eff -dist/2025-05-26/rust-std-beta-powerpc64-unknown-linux-gnu.tar.gz=6aedb018d3758c3f1e8d5d3e69f0c996c35fba18338346b43ad7e9099621d714 -dist/2025-05-26/rust-std-beta-powerpc64-unknown-linux-gnu.tar.xz=3886265ec1bd94ae47146db67bc2a72fdd9d70b64c74878fc1ef9c50498b9f23 -dist/2025-05-26/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.gz=60c8355e9f6c59a329b111b4abd7b8feeb493dc0e4d8d4ec1b07809a9ac6923e -dist/2025-05-26/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.xz=0c687a9b04b1b36a14c972913dfb9f0d230551f301a895593f1623677b59a26d -dist/2025-05-26/rust-std-beta-powerpc64le-unknown-linux-musl.tar.gz=29fc686f26c6258a542e118a035924167c3c6b2b007980f89101cd50ca3543f4 -dist/2025-05-26/rust-std-beta-powerpc64le-unknown-linux-musl.tar.xz=a6d643c2c794a405ee6bfa7e8f3c19cf2b94a17c61d743763dd6939ed8641d0e -dist/2025-05-26/rust-std-beta-riscv32i-unknown-none-elf.tar.gz=781b81baa8dfd9a5e7eb346176e9cac1e83cba42d1943677b08c689d535debd4 -dist/2025-05-26/rust-std-beta-riscv32i-unknown-none-elf.tar.xz=ca46997729ba43239372bda073a20c1a5d6d25c00cfd79105dd44ff634cacf84 -dist/2025-05-26/rust-std-beta-riscv32im-unknown-none-elf.tar.gz=d0173b18212cf346c5477b8fa1292f51db7fa7275455417ede405f6e822548b1 -dist/2025-05-26/rust-std-beta-riscv32im-unknown-none-elf.tar.xz=6357a65bf47d918d8375e0f7f0f3cfa137026a3be7123a2ae1ae827a71e96c31 -dist/2025-05-26/rust-std-beta-riscv32imac-unknown-none-elf.tar.gz=dc0b7a21b4e597320bcf63c84812ae9caab0aafd215aafa10187820ba91d6490 -dist/2025-05-26/rust-std-beta-riscv32imac-unknown-none-elf.tar.xz=f42b4e807be249463cb9e4f3781b45c45492c0badc45ee6baacb50d61fd3fd42 -dist/2025-05-26/rust-std-beta-riscv32imafc-unknown-none-elf.tar.gz=78cfa47f2376a73f7247ac69968ce0752129cc57f7961fe0c12509b27411e232 -dist/2025-05-26/rust-std-beta-riscv32imafc-unknown-none-elf.tar.xz=2b2ba34b8c6992e4f253e30d80df578e9ac8063264f61cfec0b0fedb9b823ef6 -dist/2025-05-26/rust-std-beta-riscv32imc-unknown-none-elf.tar.gz=27ef3d52ca7b2e1294506f3e105fb5753f468e5a29f1a84804213a055a885719 -dist/2025-05-26/rust-std-beta-riscv32imc-unknown-none-elf.tar.xz=71b0a54a82cf5f69da177559494b2601c55c3e3bd0bea539ce69e7499c3150a1 -dist/2025-05-26/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.gz=d11ccac57c31274b7b3dac4b1761a04a806ddf368c00e7a16644390ba221154a -dist/2025-05-26/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.xz=f636c9cee16b8e676597b31956d6827e1bac7ccd83c730653953affce9724a96 -dist/2025-05-26/rust-std-beta-riscv64gc-unknown-linux-musl.tar.gz=806dab8bfe031f0043706992a9426e8580e82a92df11ef5728e6a00da13cb40a -dist/2025-05-26/rust-std-beta-riscv64gc-unknown-linux-musl.tar.xz=b48f6e9641db567e8728db48a062b0cc570ee2712af7adfc64dcb4f4ab355396 -dist/2025-05-26/rust-std-beta-riscv64gc-unknown-none-elf.tar.gz=8d779f261e4c0e62e8c6a616f2635dc74cb4637366386b0857f31fb015fcf152 -dist/2025-05-26/rust-std-beta-riscv64gc-unknown-none-elf.tar.xz=7d12366c1c1166e50d2a78f1ac3fe3166935b4920eac8f64e878a6b5f8653a6a -dist/2025-05-26/rust-std-beta-riscv64imac-unknown-none-elf.tar.gz=6c01c064a5812f55004ecce5c514c1aeead262dda2525fc7225bbc68d0020d5b -dist/2025-05-26/rust-std-beta-riscv64imac-unknown-none-elf.tar.xz=1be564ed4d96e15ed8eaad48a0b64112d05a9096a2fc56245e38ef9fc3098865 -dist/2025-05-26/rust-std-beta-s390x-unknown-linux-gnu.tar.gz=9329f4c55d1c9216ddbe684d0b246f65724d0919a009d066987052bb27a867db -dist/2025-05-26/rust-std-beta-s390x-unknown-linux-gnu.tar.xz=3e164f2c3af1850902a7852d5b043f6ac2065b02d0786912b66c83c1371f71e6 -dist/2025-05-26/rust-std-beta-sparc64-unknown-linux-gnu.tar.gz=613cd5db53ae3f2c69eddbbbf39957a6931b9b5ab1766135b150e01396cff220 -dist/2025-05-26/rust-std-beta-sparc64-unknown-linux-gnu.tar.xz=03d9f75b9a4126c81b1896dcfafadecbbb6f4e81fdc774023f81acc28ed125c9 -dist/2025-05-26/rust-std-beta-sparcv9-sun-solaris.tar.gz=fd5aad29a1ac50b469629fa7ead7d503060909f2640750084f0a72f8d9699456 -dist/2025-05-26/rust-std-beta-sparcv9-sun-solaris.tar.xz=942a34da917069072ac610dbc3667cd847dfadfe3df09d6ff3aebefd49311041 -dist/2025-05-26/rust-std-beta-thumbv6m-none-eabi.tar.gz=91024331bd867a1ed71b687509fe694f924bef58047a9137c7a759ae783179f3 -dist/2025-05-26/rust-std-beta-thumbv6m-none-eabi.tar.xz=e3b5096e07f3587c87fd6832b852882f7d63fbc6b8819de452ce5883e26742e1 -dist/2025-05-26/rust-std-beta-thumbv7em-none-eabi.tar.gz=40f0dcf8654464732add7e8b3e1a1d898699fbf50be74b116650c8251209f913 -dist/2025-05-26/rust-std-beta-thumbv7em-none-eabi.tar.xz=6193c72b9c4c7ca27b12da0f13dca0ac1d11b1cb2a8868a7f2e7f24ab3e7a78f -dist/2025-05-26/rust-std-beta-thumbv7em-none-eabihf.tar.gz=a008f4debee859f5c5b90aa4000774cdaae045f8161b8e7fbfaab68db7f2341e -dist/2025-05-26/rust-std-beta-thumbv7em-none-eabihf.tar.xz=bb96feab15991aea5fa38f22848a715422c0b1da060b34a7273f3ec077d4a4e3 -dist/2025-05-26/rust-std-beta-thumbv7m-none-eabi.tar.gz=46e8c8f891c22cee04de8c02aa1e0f5604a9bcd33219cfd1a299c43b4005f93f -dist/2025-05-26/rust-std-beta-thumbv7m-none-eabi.tar.xz=d4dbed9d96c6b57e185ede566a3dc610f03d854ff696466e9c68815b85dee963 -dist/2025-05-26/rust-std-beta-thumbv7neon-linux-androideabi.tar.gz=222d18565a0d40edc3d6cb051f2647b5416b417933fcdcd25bba54fc55de625f -dist/2025-05-26/rust-std-beta-thumbv7neon-linux-androideabi.tar.xz=4190060ea541ad1f1f5eb91815027ba475d0e1281ded77ee3116561660919550 -dist/2025-05-26/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.gz=bf99b1d2a8997d36f994f31bcb48482ec3d48f962ed66beb8642025859c53d97 -dist/2025-05-26/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.xz=477fe3a269b43ca2f795fef83b50697600021129678aa6af1594858bfeb9479d -dist/2025-05-26/rust-std-beta-thumbv8m.base-none-eabi.tar.gz=bbd981f00bdad617fdaf823d78cd6f500807b742e050a3d4cbd42ed2966ac7d7 -dist/2025-05-26/rust-std-beta-thumbv8m.base-none-eabi.tar.xz=8a8c004818d5fe2eb9f99d77f65810f577bc1e8cbba0ba2ec6e045234c6a700b -dist/2025-05-26/rust-std-beta-thumbv8m.main-none-eabi.tar.gz=7e015ea2920c65337b61d5fc1a5f619cfef6589483a4e6c09d8dfbe1529972b2 -dist/2025-05-26/rust-std-beta-thumbv8m.main-none-eabi.tar.xz=37b2b934afd57a81c4007cb4b8b901fe7b15334588625e98d79b037876f18725 -dist/2025-05-26/rust-std-beta-thumbv8m.main-none-eabihf.tar.gz=919db1cc7cbe3e52a6e33f03fe4e79504bef2825ffe58895e24130907bad7b6b -dist/2025-05-26/rust-std-beta-thumbv8m.main-none-eabihf.tar.xz=59b8ced330f72dc06635aff3de2cc7c796baee86320ff8458d8dc995ba11b909 -dist/2025-05-26/rust-std-beta-wasm32-unknown-emscripten.tar.gz=5d5298f0a3d9a8a8cee3ad9003c409adeed1b3fcacac449a5827f14099b052a6 -dist/2025-05-26/rust-std-beta-wasm32-unknown-emscripten.tar.xz=e9b8868b05e0d210419f3b041839f60e0d4fdd7bd54eca6b0f96b5f90148cdf9 -dist/2025-05-26/rust-std-beta-wasm32-unknown-unknown.tar.gz=35a70b6c8369ca487d93c9cf445a0011ff13dd5cea485a4d01558167473130f0 -dist/2025-05-26/rust-std-beta-wasm32-unknown-unknown.tar.xz=5243ebcffd4880cecae8c3a90c9c76bae1da188478d5e572a8a71cf4442ca991 -dist/2025-05-26/rust-std-beta-wasm32-wasip1.tar.gz=f39ae9fc833c1e0d6b3aa3a3782f7dd1e547c7f6b0141c52e0c7cb5b6fa30def -dist/2025-05-26/rust-std-beta-wasm32-wasip1.tar.xz=caa1d6e9eb7663ba34dc7db1d47bbd972b41f22f458afd95a6a0aaa0d7e26f59 -dist/2025-05-26/rust-std-beta-wasm32-wasip1-threads.tar.gz=9f0de2858a6ee7de500562fb9639e68cdebc45a6181778ffb41be77af74fdead -dist/2025-05-26/rust-std-beta-wasm32-wasip1-threads.tar.xz=98523168355e334dbcf0730c314ad9fe901751eefd61d567878c34f21c30ec98 -dist/2025-05-26/rust-std-beta-wasm32-wasip2.tar.gz=8cfdd1d718208fead76aaebd54ad44e9f98145664e475914f7b9951372c1813d -dist/2025-05-26/rust-std-beta-wasm32-wasip2.tar.xz=64fed08a0d9b09097a9370ee4b013332d19587b5de67b0f0af49bc09625c765c -dist/2025-05-26/rust-std-beta-wasm32v1-none.tar.gz=ff212273e3d5c4e465d8a3d8838716f2b2e2380f82c158d13dba997df4a8fb0b -dist/2025-05-26/rust-std-beta-wasm32v1-none.tar.xz=8300711696bc8988e6e00baea2d15012f373525436f1415f54037e10511acd83 -dist/2025-05-26/rust-std-beta-x86_64-apple-darwin.tar.gz=77d89abf4d00195e240b8f55ab2bc5558d21f0f1fee33bf419d14a3e3f2b3ab1 -dist/2025-05-26/rust-std-beta-x86_64-apple-darwin.tar.xz=817dc01f12d7a2c388b001bd708aab2967afce42a11aecfa278a40235800e1cf -dist/2025-05-26/rust-std-beta-x86_64-apple-ios.tar.gz=cdcbeb20884c7782e080ae38ec6dd955706fa2e924ddfd235d775e39be2cb446 -dist/2025-05-26/rust-std-beta-x86_64-apple-ios.tar.xz=378d04709658b08a24edff046bbc6b3fbee7d0127fff93818e92cda0234e0837 -dist/2025-05-26/rust-std-beta-x86_64-apple-ios-macabi.tar.gz=81d68c70d385f38f526856d021aa1b5b25e9bddff52b8098d76a87c53721784f -dist/2025-05-26/rust-std-beta-x86_64-apple-ios-macabi.tar.xz=e9cd869473a379a72364b1246fee3007d9b45801e40a3cd2eecc7831edba5bb4 -dist/2025-05-26/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.gz=49c18132004107623e554264b000d07ea0a1dc51ee1e21d02b833b9fdb07b855 -dist/2025-05-26/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.xz=be2269500b5522f677eebf74c0a201751c74481568ba235200716fe368f443e2 -dist/2025-05-26/rust-std-beta-x86_64-linux-android.tar.gz=25801215e0bfa5af3b2b84aa0b881fa723cef308872de58e36d2de943746e51b -dist/2025-05-26/rust-std-beta-x86_64-linux-android.tar.xz=f692f2f3c69c8fa62d5344faa75375fd2a48a1b81284a7fbfe4b41f575c7263f -dist/2025-05-26/rust-std-beta-x86_64-pc-solaris.tar.gz=7d79359bc70414d23174aac81b1e5c341b541f6a8361142a3d48ddfc956dc7fd -dist/2025-05-26/rust-std-beta-x86_64-pc-solaris.tar.xz=ec42340a3bbaeb9723ec77a48b4c49496ee61a928ae20c1bdf3ca33859a3fa52 -dist/2025-05-26/rust-std-beta-x86_64-pc-windows-gnu.tar.gz=6ad0c0a19a92af2749dc8680dcc14bc1fa9fc1d3f4bcf8e28b0646c3bb50859b -dist/2025-05-26/rust-std-beta-x86_64-pc-windows-gnu.tar.xz=e3e1ecbf40411fa9216a43573b765c526652205f2978409b5488c25b19e98375 -dist/2025-05-26/rust-std-beta-x86_64-pc-windows-gnullvm.tar.gz=a62671dc133e7cc059ed4ad004946e9030e8b882094ddd81b282c56363b0644a -dist/2025-05-26/rust-std-beta-x86_64-pc-windows-gnullvm.tar.xz=16aac5f5f78f067dd4e2106d62a31fff071757bebf53742eb72f25a5abb2d7af -dist/2025-05-26/rust-std-beta-x86_64-pc-windows-msvc.tar.gz=d2c5c7a89dc122a7edf1120c3765e55001b3ecca57fb8077b6f4e6085c9fb6af -dist/2025-05-26/rust-std-beta-x86_64-pc-windows-msvc.tar.xz=14b0a62b8dca999d96ff6cbc7fa8dfc3486555be9aae4d509dd95fba01db8f65 -dist/2025-05-26/rust-std-beta-x86_64-unknown-freebsd.tar.gz=fc3ead4c4599e5371668c610658538dc2bab3b3db2ca9aa1645da087649df131 -dist/2025-05-26/rust-std-beta-x86_64-unknown-freebsd.tar.xz=9e7477e05192ce11190e9b1291a5e171a9cd9da9ca2f4c53d08b98025a697255 -dist/2025-05-26/rust-std-beta-x86_64-unknown-fuchsia.tar.gz=b21552a046715dabb5b14d82fc9707c6622073b013b839f1b08e0463dcf536ac -dist/2025-05-26/rust-std-beta-x86_64-unknown-fuchsia.tar.xz=1ed92b1672f0d18ff0d6f8365326478cdcf60af25837924f54d3c7459a4dcdf4 -dist/2025-05-26/rust-std-beta-x86_64-unknown-illumos.tar.gz=14d1ffa188c1e4b64d9ac941698922d2a46d0fab78498c6499d5782edd529968 -dist/2025-05-26/rust-std-beta-x86_64-unknown-illumos.tar.xz=41cca6d938e5c39e4032f94256ecb4efdd76c1569e29f84191d58be5d3c0773a -dist/2025-05-26/rust-std-beta-x86_64-unknown-linux-gnu.tar.gz=444f4875970842d935d1a42a46ac524b6bac248d4bb5993e5ac578ee88f519cf -dist/2025-05-26/rust-std-beta-x86_64-unknown-linux-gnu.tar.xz=354c0e9396e7b241a7e8c69e3670d98a42ed8bb7359d4f06deefa4fdf81df675 -dist/2025-05-26/rust-std-beta-x86_64-unknown-linux-gnux32.tar.gz=efb7bc1afab8d3f3f6de3fbf41bfb3ae17bb3e193644ae40be5d497aba20d1cb -dist/2025-05-26/rust-std-beta-x86_64-unknown-linux-gnux32.tar.xz=c717608c4378ecf44cf3ef9d3ab8c5e6bc29db0b1c9b04054b42c60fb5109ff0 -dist/2025-05-26/rust-std-beta-x86_64-unknown-linux-musl.tar.gz=1e4f8c03396b130a284a3a11c20da15185d3a9cbbb6d9a219a76e0e192cbd2a0 -dist/2025-05-26/rust-std-beta-x86_64-unknown-linux-musl.tar.xz=b5639086009cc35a8fd493fc885cebbf2dc68b4d4fc956b00bd5061ec4ed75b1 -dist/2025-05-26/rust-std-beta-x86_64-unknown-linux-ohos.tar.gz=cd577082d0fb089e42ea31509f92321b40221b54f73edb0f80510f6e170acc6d -dist/2025-05-26/rust-std-beta-x86_64-unknown-linux-ohos.tar.xz=2257286555b3208b43390284db141d2db7282a7d2d4c438fd3b217de3ede790a -dist/2025-05-26/rust-std-beta-x86_64-unknown-netbsd.tar.gz=61205a7f309f18f9e1a8c12c9b74902f014475ea357fdadf728858f9f81d6e73 -dist/2025-05-26/rust-std-beta-x86_64-unknown-netbsd.tar.xz=d11ae113c9d4156ef31561c002a9b65ef702302c89b0dd2b3005bef57ba92d01 -dist/2025-05-26/rust-std-beta-x86_64-unknown-none.tar.gz=8583686c6aa8eaeb57b64dbc288d564fdaf4939d6f552143e7cdc0641147192d -dist/2025-05-26/rust-std-beta-x86_64-unknown-none.tar.xz=64a654c790902abf4f936a3194757eb6885d88a68cbd8de19767a8e7a0f21335 -dist/2025-05-26/rust-std-beta-x86_64-unknown-redox.tar.gz=b80e62b6982c684d5550233c15299533fa709e540e53bf20e7ed06fc09e396d1 -dist/2025-05-26/rust-std-beta-x86_64-unknown-redox.tar.xz=63a195aab6fe29882c7a0688ca2368a611127381320349c7cb1097dcde2b4603 -dist/2025-05-26/rust-std-beta-x86_64-unknown-uefi.tar.gz=3f285485b3a7bd957ad69cb76ff717d7987ad0bc50368aeb1b813f9b2d3b5af5 -dist/2025-05-26/rust-std-beta-x86_64-unknown-uefi.tar.xz=dc1e9a9952adbb65711ebcb79b7afc149ac1c9f73b69b97f6b059a53ac71067c -dist/2025-05-26/cargo-beta-aarch64-apple-darwin.tar.gz=368b6cb43f573346237012bdc23e5c44d476db779795464cecc2065f6fda8b8f -dist/2025-05-26/cargo-beta-aarch64-apple-darwin.tar.xz=4bbf76bc026d740269c09658a3218eee2dfcc7422fe233db192cfee4dc4a371e -dist/2025-05-26/cargo-beta-aarch64-pc-windows-msvc.tar.gz=afd53341d1c84f86ddcb4ee85affc0413715c05bd43c075ef193306e86126488 -dist/2025-05-26/cargo-beta-aarch64-pc-windows-msvc.tar.xz=2cf06c20e07ab905f329c8ffcf275b7cd528488893c7014a1cc03faafb13d2c6 -dist/2025-05-26/cargo-beta-aarch64-unknown-linux-gnu.tar.gz=8ca26bf35ed608b6b6ebdff67f7949bf8219f32edb1ece3ca9f8d49a182cd8ed -dist/2025-05-26/cargo-beta-aarch64-unknown-linux-gnu.tar.xz=61a8743d62dd505d7d76b2ffd282e2b41653b0b30eb96e7f950f144201270a21 -dist/2025-05-26/cargo-beta-aarch64-unknown-linux-musl.tar.gz=8cd37cda7f2f2c323ebda896fc2fb8d8a83b30f2b9c102a1305bf724c261566c -dist/2025-05-26/cargo-beta-aarch64-unknown-linux-musl.tar.xz=fa5f4fa4da574b2bc79db4dd37969ba5549b32acb65554e35735b55913ab6e53 -dist/2025-05-26/cargo-beta-arm-unknown-linux-gnueabi.tar.gz=30a29adc0c331a3cdff5c1f1d8b541f720212a3b8b2c96795e95f96ffb5982b2 -dist/2025-05-26/cargo-beta-arm-unknown-linux-gnueabi.tar.xz=069071883eee8226003b1cd8501868b3aa51ec8d0f0637e4538b30b920d05823 -dist/2025-05-26/cargo-beta-arm-unknown-linux-gnueabihf.tar.gz=0151634d3a2a1757b9671cf9d48cbfd5fa34df77744ffeac02d8cb5f6949cdc1 -dist/2025-05-26/cargo-beta-arm-unknown-linux-gnueabihf.tar.xz=524386061e1b6b212cd9f94d9d7baf2cd1eb9b2ee105c334aaffcc192cb38e19 -dist/2025-05-26/cargo-beta-armv7-unknown-linux-gnueabihf.tar.gz=d392c9fac6521b2377928305d87e1d65f70e6a5472d4ded3475e08118186f2b1 -dist/2025-05-26/cargo-beta-armv7-unknown-linux-gnueabihf.tar.xz=b1ff6f50dd621d7af5224dce74a25ae895e6b06216fe8e1501ff4199c04f0374 -dist/2025-05-26/cargo-beta-i686-pc-windows-gnu.tar.gz=52ebc95b1c29d3c0714c66505f0ef838c13d12d9436f1d2c2291cf027a38697f -dist/2025-05-26/cargo-beta-i686-pc-windows-gnu.tar.xz=c6acb26d5e9a4f8c51c13f8b92560849cc4df822a80d04b0e61b1407e93555d5 -dist/2025-05-26/cargo-beta-i686-pc-windows-msvc.tar.gz=af54473c85c035105c429138cfc0d5ab30dcc1b13ea01a3e4d12a8342c309e98 -dist/2025-05-26/cargo-beta-i686-pc-windows-msvc.tar.xz=3a44659128f07fe5953659506c1b6c93fbea96a327401064dbe0393ddb28542d -dist/2025-05-26/cargo-beta-i686-unknown-linux-gnu.tar.gz=39632af7bcf55760161ddd4ebfe40a3c9a49b6191ec88d1b1d66390668d09905 -dist/2025-05-26/cargo-beta-i686-unknown-linux-gnu.tar.xz=190e8b6bda864b4316f530e5d693e779074de8665a5abe6a4f5cbd01ce8fe6b7 -dist/2025-05-26/cargo-beta-loongarch64-unknown-linux-gnu.tar.gz=87d25663fa5b4b09fff9ea02c07bdddf760873bad7c425015d6e1750a24f66a4 -dist/2025-05-26/cargo-beta-loongarch64-unknown-linux-gnu.tar.xz=b0789d6fe6d8f7e07f0858211e59ae9278adee7d14dee64fc359b3079773993d -dist/2025-05-26/cargo-beta-loongarch64-unknown-linux-musl.tar.gz=d0f43421313fb6d43ec9b165dc2c9f6be91daee61f201eaea6735fa6ddaadda7 -dist/2025-05-26/cargo-beta-loongarch64-unknown-linux-musl.tar.xz=3e2de8fe7062494c260d0560253e03fc45baa680f9a62171350c5caf2e5fb426 -dist/2025-05-26/cargo-beta-powerpc-unknown-linux-gnu.tar.gz=93a901615aeaa14dcaa0ccd2fe870ccd29bb4f52601cb7ff3b2da7bc6c3e1b22 -dist/2025-05-26/cargo-beta-powerpc-unknown-linux-gnu.tar.xz=28ab251856c6a252beb72a5db0e18e68e40b342fcbd903dd75811ba393b44194 -dist/2025-05-26/cargo-beta-powerpc64-unknown-linux-gnu.tar.gz=6c1f5cb9ec7787cf004c3efa6da81a93155ff3b5319ba7c6ffd29ba631a0feb2 -dist/2025-05-26/cargo-beta-powerpc64-unknown-linux-gnu.tar.xz=9a09c0f8d027310b26909c193227466402ef616c27b943ec16cd5a7eabca5ca9 -dist/2025-05-26/cargo-beta-powerpc64le-unknown-linux-gnu.tar.gz=c5c81cbf63206e47989c5a11953289f99e72647aff4d876d18fb8d2c99a54d1a -dist/2025-05-26/cargo-beta-powerpc64le-unknown-linux-gnu.tar.xz=d187d131e679bebcdae5a7b9e828285f55b61cbc124e72d233725e4e0f2dbc39 -dist/2025-05-26/cargo-beta-powerpc64le-unknown-linux-musl.tar.gz=883c45f3a2a659560187cbc7696a3132163d6385dd155007c4d5fd2fb068dfb7 -dist/2025-05-26/cargo-beta-powerpc64le-unknown-linux-musl.tar.xz=f9d36abf952bed0e4df94dbeab0ef732ed731e6f8740c5be0ff96f603c46f4c1 -dist/2025-05-26/cargo-beta-riscv64gc-unknown-linux-gnu.tar.gz=23e25b899432df81b660105786f038e95bbddb3bab60a7917e4ca077d5b7520a -dist/2025-05-26/cargo-beta-riscv64gc-unknown-linux-gnu.tar.xz=885a2c1e30eb3d489a1234034663131c8762645ec1c03ce94198053a21debfa7 -dist/2025-05-26/cargo-beta-s390x-unknown-linux-gnu.tar.gz=f9b69f26f868a5a2173de74424be26cb0d4e6db6867e1a8c32db799e9fb03ede -dist/2025-05-26/cargo-beta-s390x-unknown-linux-gnu.tar.xz=bf3d01fc0202bcdea158e22821e1ffb8b07e4324ce487be96cde2cf1f1e5eaf6 -dist/2025-05-26/cargo-beta-x86_64-apple-darwin.tar.gz=65b4ee4359e402e06cee2c574a03389e36acb4e1caee4aa83cb281f95c48576a -dist/2025-05-26/cargo-beta-x86_64-apple-darwin.tar.xz=2906bd00506ada8cffb743f355aa918531273f45f449616410dd0c3f913013b3 -dist/2025-05-26/cargo-beta-x86_64-pc-windows-gnu.tar.gz=7b4c8ad29c72d619c2977f5d79cb5c959bdd8acaae2364495962db5473478609 -dist/2025-05-26/cargo-beta-x86_64-pc-windows-gnu.tar.xz=0dfddbc3218d921ac75affe9d3b8595c8d49df9a98d91fe0f92341754f2b6296 -dist/2025-05-26/cargo-beta-x86_64-pc-windows-msvc.tar.gz=43a110d4e7cd3c8a764e4a2836fe368a347ba7fdfd40c8f565969244964d20c1 -dist/2025-05-26/cargo-beta-x86_64-pc-windows-msvc.tar.xz=703d2cce50711a9753c5b7a72c9468d73144a8f6015db913920795590c54ac97 -dist/2025-05-26/cargo-beta-x86_64-unknown-freebsd.tar.gz=9236099e0ffff060c483cc8996e66ca2e906a2c030941aa49163bdc4dfb7bd3b -dist/2025-05-26/cargo-beta-x86_64-unknown-freebsd.tar.xz=ff50d29e650cf85f6aadee0618ffef15ac4f3c9b30f02f9a678129e9bf8f5ad3 -dist/2025-05-26/cargo-beta-x86_64-unknown-illumos.tar.gz=ea5bd3cd42867e5174f7661fb5254d2f3effadcf0551cf3cbe6fa60d718f48ae -dist/2025-05-26/cargo-beta-x86_64-unknown-illumos.tar.xz=e3249f14d4467644a73b950d3d9a4f5ac20146923c961bdec3689bbbd4330a38 -dist/2025-05-26/cargo-beta-x86_64-unknown-linux-gnu.tar.gz=e0c5dc6ee9250c0ddbd7db218878fffc5a38641fc773ded5dc28d92a1750eed6 -dist/2025-05-26/cargo-beta-x86_64-unknown-linux-gnu.tar.xz=53921721c33e20275eb7a912ae80af22aa3e888a232360baa3f00f272114833f -dist/2025-05-26/cargo-beta-x86_64-unknown-linux-musl.tar.gz=18ea106ff675f15b112c4f4dabcb068857a54c6dbd25e9e8661184b2ee3db556 -dist/2025-05-26/cargo-beta-x86_64-unknown-linux-musl.tar.xz=ea4db9c40954dd72896ef9323767384f2da48064465f8961b775f87c8944d0a8 -dist/2025-05-26/cargo-beta-x86_64-unknown-netbsd.tar.gz=05e8398cb96e2c5ebc2db71edd0965c6da755bd14b1598197f5d375d2b0c1cf3 -dist/2025-05-26/cargo-beta-x86_64-unknown-netbsd.tar.xz=ede3da14f0e405398aa9cfe3743d568a37b1adf62aa2a16489b710d773b1744f -dist/2025-05-26/clippy-beta-aarch64-apple-darwin.tar.gz=43cbc31dce5ca5abc1efcf87fc4609d148d456429d41836c502f217de50aaaab -dist/2025-05-26/clippy-beta-aarch64-apple-darwin.tar.xz=1ea6c9615a8c3101acb36585d12ec3a61ba55ec069155324675aeb0005738bf4 -dist/2025-05-26/clippy-beta-aarch64-pc-windows-msvc.tar.gz=eec62be5aaa28c856954a2d5e3fbdce10377bd164929ea6d18e43c085ff5044f -dist/2025-05-26/clippy-beta-aarch64-pc-windows-msvc.tar.xz=76e60d581deb1989f93ec88e94fc984568c69486c9b50c88e1059f18560cf649 -dist/2025-05-26/clippy-beta-aarch64-unknown-linux-gnu.tar.gz=be69d0e6ac05d624dece95d6e6f9a90f8f8e52be2c1fde4b5d64fd9da8d89c7b -dist/2025-05-26/clippy-beta-aarch64-unknown-linux-gnu.tar.xz=198c679a62e71d108688d3b64a5be76ecd6462f3301c0ee411943678bae640ce -dist/2025-05-26/clippy-beta-aarch64-unknown-linux-musl.tar.gz=c9012719c15ed4fddd04d4ac3618018a1c194f048e9879acbbb580346a72bda9 -dist/2025-05-26/clippy-beta-aarch64-unknown-linux-musl.tar.xz=7f10e2a9164ae2cd916e82ef569a1f729853ecdc8edfd92012c63e03ff9b5786 -dist/2025-05-26/clippy-beta-arm-unknown-linux-gnueabi.tar.gz=8388777a665a098add359f5dfb10c2e85e6d5ff344b71844267750c589d9dd9f -dist/2025-05-26/clippy-beta-arm-unknown-linux-gnueabi.tar.xz=ecbd41ae30412624507a6338c25b398b34153762d127bcb413321510334b7036 -dist/2025-05-26/clippy-beta-arm-unknown-linux-gnueabihf.tar.gz=47b420620eae76da5db8fbb2e0a7f23988b436bfce22d17cd44885daac011d7a -dist/2025-05-26/clippy-beta-arm-unknown-linux-gnueabihf.tar.xz=21fe8e08a556bc6c70bff20e13ea2b54fc6f97656911b960f27c665c6d9d45d2 -dist/2025-05-26/clippy-beta-armv7-unknown-linux-gnueabihf.tar.gz=ded5cec25a893481d0735228946518b3bbf22becb298d5bd72ffa80c338d423b -dist/2025-05-26/clippy-beta-armv7-unknown-linux-gnueabihf.tar.xz=26ce2e33c7434e2da0d3dd48ea2d57d2cb08eb52d041ff6539bc7d6e6f6ec13c -dist/2025-05-26/clippy-beta-i686-pc-windows-gnu.tar.gz=e38aa8d7ee0d74e73ed07ebd173549be67654ecf3e781e8386d47c11175d150e -dist/2025-05-26/clippy-beta-i686-pc-windows-gnu.tar.xz=e35de2fd0152277780464f80bed8aa78feb2e1e64b818888b32522d36ddc6ef2 -dist/2025-05-26/clippy-beta-i686-pc-windows-msvc.tar.gz=b4d259b042439f1324c91580b5d050eebfab04afb86715bc7571f17174f7622f -dist/2025-05-26/clippy-beta-i686-pc-windows-msvc.tar.xz=7183a9094ebe14baf68a42e7879953c8d433febdad5b32153371d21c65dd86ca -dist/2025-05-26/clippy-beta-i686-unknown-linux-gnu.tar.gz=d42ba45cc7f6ecec2cfad85fd15d69b17a84d19206fa5c33f1016d135ee29e6f -dist/2025-05-26/clippy-beta-i686-unknown-linux-gnu.tar.xz=ef98b85f80e434c49b0c19eca16baab3d10345237642c7252b3ab5ddeb494fba -dist/2025-05-26/clippy-beta-loongarch64-unknown-linux-gnu.tar.gz=6d2e11bbe7c0a1a9249146193e6879176460b90bb9b7909ec01065c02a20f801 -dist/2025-05-26/clippy-beta-loongarch64-unknown-linux-gnu.tar.xz=1eeb173bc287d7fba22091a7083c472aeace48679aae3450c77435376a5285b5 -dist/2025-05-26/clippy-beta-loongarch64-unknown-linux-musl.tar.gz=3d75d8f697609fd3ff857d9aba4947d5efcbe1791994a5a29204d87c625ad3b1 -dist/2025-05-26/clippy-beta-loongarch64-unknown-linux-musl.tar.xz=70ee5bd276113f98b2913c72564c0bf0d364167986d7db776669fb6e4e08e9e7 -dist/2025-05-26/clippy-beta-powerpc-unknown-linux-gnu.tar.gz=010fcc2d0e9724d6162383002d0c63039b9e24c0cb6e2d5187edbb869bc7e1b0 -dist/2025-05-26/clippy-beta-powerpc-unknown-linux-gnu.tar.xz=6b0bcca51760ec121f7ec64e2f6eaf91eeebb9da0318642a115f6852647ae806 -dist/2025-05-26/clippy-beta-powerpc64-unknown-linux-gnu.tar.gz=3b2306a5b60fd2f67eb805189457e1dc0350854eb3a47ae9dd53cc89df9f668d -dist/2025-05-26/clippy-beta-powerpc64-unknown-linux-gnu.tar.xz=ccafe9b4403c6bcb87a244eb6afadcbab799e65dc105f60551a8a3b6153c31d9 -dist/2025-05-26/clippy-beta-powerpc64le-unknown-linux-gnu.tar.gz=d70a86b08254f64cb2c4d37e911f70aaa0c22f464e1c906d63e61a6b29d39184 -dist/2025-05-26/clippy-beta-powerpc64le-unknown-linux-gnu.tar.xz=2db59bb48172923ad3db736f51ccf1226bdb8ebc76daa29e220007897d76bf6d -dist/2025-05-26/clippy-beta-powerpc64le-unknown-linux-musl.tar.gz=cf6915d74c6e8789380f5b986c2ed1b17e8709c2a41abd4cfe89033b45cd8642 -dist/2025-05-26/clippy-beta-powerpc64le-unknown-linux-musl.tar.xz=60c647b9fe5ab19522ef94dc5d5e6a03ce58e922ac55dd85feded92812b40879 -dist/2025-05-26/clippy-beta-riscv64gc-unknown-linux-gnu.tar.gz=36614d7f77357fbdcdaf35bebb4222e41617cb684a3daf69e2a1cbfe46ea60d1 -dist/2025-05-26/clippy-beta-riscv64gc-unknown-linux-gnu.tar.xz=0876fae91f3d54a745a73876b901d6551089264b408b7d1954475d3e6195f72b -dist/2025-05-26/clippy-beta-s390x-unknown-linux-gnu.tar.gz=72247770c08147d59d93ece7d6fc97f46c091fc71c65d3a215f682608aecb2ba -dist/2025-05-26/clippy-beta-s390x-unknown-linux-gnu.tar.xz=12d12c1c6a277af5c203ad0fbf6dcb4b04ea74614740734466ea7754f13696f6 -dist/2025-05-26/clippy-beta-x86_64-apple-darwin.tar.gz=a9e255811a75cba14ee0789c2263655407b8d293273252217a4fd7d0de813cec -dist/2025-05-26/clippy-beta-x86_64-apple-darwin.tar.xz=8bac948774490e48e4193eef0415fd02ce0b7e6855d6cc59314e0f6234da927c -dist/2025-05-26/clippy-beta-x86_64-pc-windows-gnu.tar.gz=fc5d7c3712d8be85f3992f01e2ade695e6c443983b46b4e1eaa3bbad9bc951a8 -dist/2025-05-26/clippy-beta-x86_64-pc-windows-gnu.tar.xz=0e20c9f824ac305c0fa0370376f977f5fd27aff485223ae1ce32c3de0e12b119 -dist/2025-05-26/clippy-beta-x86_64-pc-windows-msvc.tar.gz=c85932e32236b3365351b775cd382744fb47b3bb3117a65cee537ad79fc78881 -dist/2025-05-26/clippy-beta-x86_64-pc-windows-msvc.tar.xz=b4198fac7d359f3fea4240ab81b2f4f013c938e520a350ca21878c84c5ec16f5 -dist/2025-05-26/clippy-beta-x86_64-unknown-freebsd.tar.gz=e3e5d327a35c467ad44151db010a10ad61b0377d8f5c1844d79678d9388cd6e5 -dist/2025-05-26/clippy-beta-x86_64-unknown-freebsd.tar.xz=94637cf9f7715155e530fc9c295fb41555ebbac18255a8750255b13e2f691641 -dist/2025-05-26/clippy-beta-x86_64-unknown-illumos.tar.gz=8ea5ed861bbc11d47b8f6710b95b29acdeaf6d7a80562216a5e8094bfe440d90 -dist/2025-05-26/clippy-beta-x86_64-unknown-illumos.tar.xz=b14302a36f11794b181125c22af92eb5777f7f5f898c73194e82361ddbfacacb -dist/2025-05-26/clippy-beta-x86_64-unknown-linux-gnu.tar.gz=611504bffef243a1ac873c7d18c42731d6e24caa6d4b370be1ab1858603bb201 -dist/2025-05-26/clippy-beta-x86_64-unknown-linux-gnu.tar.xz=52f4b0a2bd2a5d0bdbccfc1a8ad9cf24572c103c8713911e121fde4935c22854 -dist/2025-05-26/clippy-beta-x86_64-unknown-linux-musl.tar.gz=7af7df177e64881dd68fa1e8207fb4a0bd7ba4e642468024fa34fc3d5c839df8 -dist/2025-05-26/clippy-beta-x86_64-unknown-linux-musl.tar.xz=f2f9575cbd3e3f067aeda5f9b7ab424e0dc119448d12872692cb7c6669f61ae0 -dist/2025-05-26/clippy-beta-x86_64-unknown-netbsd.tar.gz=5e1dc30da47902c52ab1fbfa2216a6952385184b44854c47b8eb988bdd1b040d -dist/2025-05-26/clippy-beta-x86_64-unknown-netbsd.tar.xz=23f21905caa5824a463fac01e18e0055009cecdfd406da76b838105eb78127e7 -dist/2025-05-27/rustfmt-nightly-aarch64-apple-darwin.tar.gz=5a3b21df1d525a049b9bd1fca0e32eb5aad1a82a2800e094af80f121e90878c0 -dist/2025-05-27/rustfmt-nightly-aarch64-apple-darwin.tar.xz=3f7edd6997839f12d70246edb672a13d808bd871bfaa4bda66bb4db4fb1158fc -dist/2025-05-27/rustfmt-nightly-aarch64-pc-windows-msvc.tar.gz=99ecb24920480c06482d8b10f6dbc23247c66033991ad807f8228dff35626fac -dist/2025-05-27/rustfmt-nightly-aarch64-pc-windows-msvc.tar.xz=fc716e83a694792c0b2355457cbe6f0a820ed85be725d6b3e742b257cc9cd245 -dist/2025-05-27/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.gz=cc6bbe1ea77372ea927329aeb6e4d7602829b307a407466d9c6a3417c62b6ce0 -dist/2025-05-27/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz=2018c51986de7be37f11ae05aa101b50f2d8f0e06f7ed8e3c6e4891b580a122f -dist/2025-05-27/rustfmt-nightly-aarch64-unknown-linux-musl.tar.gz=11cbb36b62563209127c1c8b1f4c32ec1ebc6ca04f18a8e067333402120da00b -dist/2025-05-27/rustfmt-nightly-aarch64-unknown-linux-musl.tar.xz=5bcdcf88ece597956dea20d63cf568a92cb841df529fb0c0b277f469c58bc742 -dist/2025-05-27/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.gz=507753792ca1668ffb7ea4e4467f2ecbfee8753e269a29050cd4e22b1ff20b33 -dist/2025-05-27/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.xz=3e2b0b89c373dc935dc6c0a882b7723d252792d831a6a81889f77df0964df819 -dist/2025-05-27/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.gz=40c728833bee43b25bf81eea8e9e6e3330d455729ec34c6b1c45d6c8b04f3ff4 -dist/2025-05-27/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.xz=c8dc03a4b1c1ed9f853f4c548d94d44b87fcdf52095e7b84d9ddd3be7be7a11a -dist/2025-05-27/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.gz=fefed8cce0ab0b90b7b58e1a417e031b0969148a427dbbf2f29a9170fb386646 -dist/2025-05-27/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.xz=77b787221ec106ceb20e58e684f348bc5542bac506fc4a3084d4d2931164878a -dist/2025-05-27/rustfmt-nightly-i686-pc-windows-gnu.tar.gz=3cd4ed08fe7dd4d921d60f15e7593d71db450c9e2e6d5a1f4fca3f409dabe8fe -dist/2025-05-27/rustfmt-nightly-i686-pc-windows-gnu.tar.xz=df210bf84e04e83ff77cad6acd156393d687e89fd74fff4c288762edfa0853de -dist/2025-05-27/rustfmt-nightly-i686-pc-windows-msvc.tar.gz=1f3b532d841f5c78fbdb5d0a1c513ab45bd942de27ce650dfca459e33db9b27c -dist/2025-05-27/rustfmt-nightly-i686-pc-windows-msvc.tar.xz=e9e52af5658861dfa2d1caed954b078a2630b42de08205727b368098348fa0dd -dist/2025-05-27/rustfmt-nightly-i686-unknown-linux-gnu.tar.gz=c81689ec620c0fbdd4a4daed7a3de6ecbc0b13b98fa06dd1f2d1beb5cc98d5c8 -dist/2025-05-27/rustfmt-nightly-i686-unknown-linux-gnu.tar.xz=a9cb725755e64fff80dfcd2fddf8cb3a62508dee90c6b6aa6786d8e03a2dd232 -dist/2025-05-27/rustfmt-nightly-loongarch64-unknown-linux-gnu.tar.gz=96fae51d3f3443e28f2789a7117510840f24a3270f8a77cf3103c6e7100079b7 -dist/2025-05-27/rustfmt-nightly-loongarch64-unknown-linux-gnu.tar.xz=78a3298fa4f70001326aec0d080873fd8c64b18beca91c8eb93f2d2786b27b5e -dist/2025-05-27/rustfmt-nightly-loongarch64-unknown-linux-musl.tar.gz=a87af95c57af0edacceb7072fb81291f9e935d548fa5c68afa58d2d5f53d4497 -dist/2025-05-27/rustfmt-nightly-loongarch64-unknown-linux-musl.tar.xz=924b5fbbec1a00b714787b7489ab592a6c0ec9c72d57f06f3ac4ff9960a610a5 -dist/2025-05-27/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.gz=c11fc36cf2ae84737ca5d1fc441acbf755053eba26fd962f12a9b1a76a0a52ec -dist/2025-05-27/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.xz=6f2fa0295e91031a1f9f1e6c344435021a6b18212c2e21c50a46baafd6694071 -dist/2025-05-27/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.gz=40e7a2d6986084a630161809132213cf3a2858f04c60902fa09eedbf9caa8bb0 -dist/2025-05-27/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.xz=112d9a416fb43ed6dcc8b066133ded75354977ea9e2d14e6d8310b35bfdf338e -dist/2025-05-27/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.gz=6c30107bfcc9c5b72be06570efa37d356ba9ee9a14385fb84e392095533a8352 -dist/2025-05-27/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.xz=6e80b773b5e2353bad7a5e01e3b330dd569133aae505bceaf605864fda12d55c -dist/2025-05-27/rustfmt-nightly-powerpc64le-unknown-linux-musl.tar.gz=b250ceb2e2360bf0366a91f6533aff91e17d7c9f3ca48fe448ca18008da3aedb -dist/2025-05-27/rustfmt-nightly-powerpc64le-unknown-linux-musl.tar.xz=62cebf6541b0d3b2f247f3e43492160750eabb227be9ca98b34714538e176cbc -dist/2025-05-27/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.gz=ac31569b7367b4a44fd64c6cc778849196a7d02ca4b413c08568a4318100246d -dist/2025-05-27/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.xz=0ef0aa7518da52dcea41e979aba1e4e93268bfc43140a83e00dff566ea2ee0e1 -dist/2025-05-27/rustfmt-nightly-s390x-unknown-linux-gnu.tar.gz=811c1024ca9b92a9512105c6589f557ddc409df6ce7dda3f1ad537f0b5e5520c -dist/2025-05-27/rustfmt-nightly-s390x-unknown-linux-gnu.tar.xz=f0deb894b1f9921ab401c8e4fe3a1eb2cef4c2b51352f54c87fad0dc8689d927 -dist/2025-05-27/rustfmt-nightly-x86_64-apple-darwin.tar.gz=18b3231a7df8e5ab2fa961de699880878aa234f56cff9d7a1126c17b8f249846 -dist/2025-05-27/rustfmt-nightly-x86_64-apple-darwin.tar.xz=74a69eb74ebd5ae965f2f7fd251743ad81efc2e6e5684886d47427414d39b2e7 -dist/2025-05-27/rustfmt-nightly-x86_64-pc-windows-gnu.tar.gz=815169fe5a0bced72ae2a7a187597d56bfc402cd5c318f9258d5576c178a19e2 -dist/2025-05-27/rustfmt-nightly-x86_64-pc-windows-gnu.tar.xz=0849e77b370332530f51bc486cb3b67a26a13369267e1978aeb895e66d8c62a1 -dist/2025-05-27/rustfmt-nightly-x86_64-pc-windows-msvc.tar.gz=b003015eb6622e2ee16a4471e9d1b6908556b4f544ee8574d793e94e866258b9 -dist/2025-05-27/rustfmt-nightly-x86_64-pc-windows-msvc.tar.xz=2fb0722be5ecec129175e74928464f57b4595208e87b5295186f163389aee8c3 -dist/2025-05-27/rustfmt-nightly-x86_64-unknown-freebsd.tar.gz=d780af4579941b6a1d1825a3d512cf541486cd365699243634f134af1af80661 -dist/2025-05-27/rustfmt-nightly-x86_64-unknown-freebsd.tar.xz=7109ac35f05e8d0f013eaa530c6271cc943ae8076cb7056383b93422329dbc0a -dist/2025-05-27/rustfmt-nightly-x86_64-unknown-illumos.tar.gz=9e3d61435933b25f5e489cfd97cc3d9737fc99403e72fd2b2c302a2850d6e7ac -dist/2025-05-27/rustfmt-nightly-x86_64-unknown-illumos.tar.xz=8a8dfcea26c974826693c776a64e89b3ef9104f61772e84918c780c92c5a13a5 -dist/2025-05-27/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.gz=c4b37e59ef93c647a1533bb7427cfc97a3766a40dd551ae8eb3668a44702e1df -dist/2025-05-27/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz=5ad72eb343c31b8da7edd7c1fe56e9920a4f7662190fab6e20dfb258e3c38c60 -dist/2025-05-27/rustfmt-nightly-x86_64-unknown-linux-musl.tar.gz=f99a565ea5a7d2238f7cd79364c39fdd2b83559f4cc668cee10c0e3564a5420c -dist/2025-05-27/rustfmt-nightly-x86_64-unknown-linux-musl.tar.xz=a470498028404e7c64cb5fb77f88dfac560772320fd6aa620eb25c37bf879c9a -dist/2025-05-27/rustfmt-nightly-x86_64-unknown-netbsd.tar.gz=e9c10350ba54a7d8a190a32aa913cc581e918cfdda14c12553e0278db8e78239 -dist/2025-05-27/rustfmt-nightly-x86_64-unknown-netbsd.tar.xz=63e5effaf0b5bfaf8fc9350d1bc0eb30cf0e8076da85c805fbb4988fff1b8f3c -dist/2025-05-27/rustc-nightly-aarch64-apple-darwin.tar.gz=16ca9b794c74a72cf9ca68fff71b9f56db1e832feb919c3ff95b65133718719d -dist/2025-05-27/rustc-nightly-aarch64-apple-darwin.tar.xz=52c42f611e409b50e857c3ce2857afd5f45f19d30f0c8ca1d0a7e1add6fadcbe -dist/2025-05-27/rustc-nightly-aarch64-pc-windows-msvc.tar.gz=687337020aca4e3e97a5313aafecbbce548cd54fe599c6d62b07f530c39ea755 -dist/2025-05-27/rustc-nightly-aarch64-pc-windows-msvc.tar.xz=2d558352e8f441d1eba929dd5598db5f717a5dec3f813dcc34c4c43da169aea2 -dist/2025-05-27/rustc-nightly-aarch64-unknown-linux-gnu.tar.gz=1eab60c4ce6e7e8e0e245a5928f26ab0b76dc9a4545eb89e481eae0673bc9c84 -dist/2025-05-27/rustc-nightly-aarch64-unknown-linux-gnu.tar.xz=be47b529deb209ae5120a359047b6353114e7a7cceeee5b038a2fa1464fc9c14 -dist/2025-05-27/rustc-nightly-aarch64-unknown-linux-musl.tar.gz=a9985e558669e2f8f6142c3ae25010b834a4d9069344abeb69e4d4cf5c244777 -dist/2025-05-27/rustc-nightly-aarch64-unknown-linux-musl.tar.xz=ce8e9f473ef4247d011055ac6787a9b92b2fb0e932a8b0f08278c8db2529655e -dist/2025-05-27/rustc-nightly-arm-unknown-linux-gnueabi.tar.gz=709f050c2c73b2788d0c5bbe388296c94db9bc014996015e41688d119b42b0cd -dist/2025-05-27/rustc-nightly-arm-unknown-linux-gnueabi.tar.xz=010b92069ba7a9de01966e54f09bda22b9ff436929a2e17ea1e9f5b379114780 -dist/2025-05-27/rustc-nightly-arm-unknown-linux-gnueabihf.tar.gz=0685aa646c5bcf6c2b6a70e6384023bd79571f1f87bf85c74c452ea7adbcab32 -dist/2025-05-27/rustc-nightly-arm-unknown-linux-gnueabihf.tar.xz=f3cb40e7a13f75e40c36dea7b916ed245976e9d82a37299c94b6d6245e697f66 -dist/2025-05-27/rustc-nightly-armv7-unknown-linux-gnueabihf.tar.gz=a4c876c4d4c8829ec4755f71ac8efa69baa2875782a371a9aa6ae84d13270ae1 -dist/2025-05-27/rustc-nightly-armv7-unknown-linux-gnueabihf.tar.xz=5e64186cdb993c1ff56fbe10ee1fed73fe71384db6bfdfc57e15cc93924df816 -dist/2025-05-27/rustc-nightly-i686-pc-windows-gnu.tar.gz=92b706e06dc7b656038437b0c281436a28d8508ef13081b61438133d2fe952ef -dist/2025-05-27/rustc-nightly-i686-pc-windows-gnu.tar.xz=fb8d2d68ac3600befba96f67acbeefec581e2b1eada7c33887fb792101eb2dda -dist/2025-05-27/rustc-nightly-i686-pc-windows-msvc.tar.gz=8322ce000c9660d86b5a376da11b7da482b78e7e47a56f1fa2fe151b597d8024 -dist/2025-05-27/rustc-nightly-i686-pc-windows-msvc.tar.xz=4612835d7ba71cfe226d04d55c06222bd8b2dd56a8dcba07133dd02cac69fb16 -dist/2025-05-27/rustc-nightly-i686-unknown-linux-gnu.tar.gz=8663c35fe6371fe7ae91c391933a7165cefd5f9f26fe75bcedf6f9977cb4ad0f -dist/2025-05-27/rustc-nightly-i686-unknown-linux-gnu.tar.xz=17c937f85f59fa7a876540ea60ecd5729c85409a64655041707865fd5f7cc849 -dist/2025-05-27/rustc-nightly-loongarch64-unknown-linux-gnu.tar.gz=639e0b5ed5b0afa3d8304189ed674e9d39b742dc61cc267043628b4c458ba157 -dist/2025-05-27/rustc-nightly-loongarch64-unknown-linux-gnu.tar.xz=faa19a69d37059f67afe8f031b8f743823422dc23939513877125cc2c4a9db2c -dist/2025-05-27/rustc-nightly-loongarch64-unknown-linux-musl.tar.gz=3dffa8b59899fd9f4d0d7a999212a1737745883f6b6d1a15cee7ff75d7dda417 -dist/2025-05-27/rustc-nightly-loongarch64-unknown-linux-musl.tar.xz=1d5368b7d616d42b81b82d0f46e5ddfc2b7033bc13e06b06520dca4489631388 -dist/2025-05-27/rustc-nightly-powerpc-unknown-linux-gnu.tar.gz=66b1ef67218c651844ffa481e8a9dbbb81a2ef4b40e673bcde2a0c9612eaac95 -dist/2025-05-27/rustc-nightly-powerpc-unknown-linux-gnu.tar.xz=48306f0162b762424e5e7da9e8920c1be982e6e0989536f2d89e922cf7fe7d64 -dist/2025-05-27/rustc-nightly-powerpc64-unknown-linux-gnu.tar.gz=7d7557024f84240fa7cb0d42bbe223c49615eeadcff6c757a755a2e500f8f623 -dist/2025-05-27/rustc-nightly-powerpc64-unknown-linux-gnu.tar.xz=62ebda3f8a44be8c1498defb5059b93add29e95f867e2e7cfd648185fc21b6e5 -dist/2025-05-27/rustc-nightly-powerpc64le-unknown-linux-gnu.tar.gz=5f3579be74da3329e3af32b034fcae002c781f7933b522638cb84876e00efa56 -dist/2025-05-27/rustc-nightly-powerpc64le-unknown-linux-gnu.tar.xz=6191553b2216ef7e9f43763736708a50c9ba972ae51997676244c52795ac5486 -dist/2025-05-27/rustc-nightly-powerpc64le-unknown-linux-musl.tar.gz=70fe263d30c9ed08e00d4d10f9bcbdfda571e5468dcda304a137f7d980e027ac -dist/2025-05-27/rustc-nightly-powerpc64le-unknown-linux-musl.tar.xz=973c090d6f72c9962fec065d99c02a79f857243306cc6b34a2f77f9c8f7f567c -dist/2025-05-27/rustc-nightly-riscv64gc-unknown-linux-gnu.tar.gz=bcf3f416152378bac430f88da0fc79e34a7fcbb65e7e06ac890b8de9f2793e98 -dist/2025-05-27/rustc-nightly-riscv64gc-unknown-linux-gnu.tar.xz=cf0cce7680f97a7c248869e44c5571dcc46c5b85e8f00c567efbf9ca3c4af80e -dist/2025-05-27/rustc-nightly-s390x-unknown-linux-gnu.tar.gz=e6e6094edf1a44f7f08e9d2cb814d3023f0261d5595be89d968b75b0ba0e368c -dist/2025-05-27/rustc-nightly-s390x-unknown-linux-gnu.tar.xz=0f4b4c5d07b8cc6815094f49ad53e8520245da428afd80e0497676a0863764cf -dist/2025-05-27/rustc-nightly-x86_64-apple-darwin.tar.gz=c9c5ff52a78d80c74ce0c40c0a2947dedfe99b195f06885d0e405c7f5b6bde28 -dist/2025-05-27/rustc-nightly-x86_64-apple-darwin.tar.xz=1cc3250c923e8647d6668c6e8ee14f2c92c50a73b080a2991768e3a88a9a99ca -dist/2025-05-27/rustc-nightly-x86_64-pc-windows-gnu.tar.gz=04d2f910571ce2e2e32ab655589989538516cfc023cb6401c605973465054927 -dist/2025-05-27/rustc-nightly-x86_64-pc-windows-gnu.tar.xz=a420f9a4cc7fd01da0b86e56ed4d72f45cfd10c725f381d047dd701bd4e84178 -dist/2025-05-27/rustc-nightly-x86_64-pc-windows-msvc.tar.gz=ea454055258e3ccb6710ba86fc58e1d629c807aa52353d48d754eafe6e4f3522 -dist/2025-05-27/rustc-nightly-x86_64-pc-windows-msvc.tar.xz=9570ad0c65bc3226e3ec05185b01dbf5a1d9822de9aeabedcb4921cc8fbc2639 -dist/2025-05-27/rustc-nightly-x86_64-unknown-freebsd.tar.gz=08f400e47513fe7b8a3d3f5fb86510e28f87d5bfbd661fa8b106b16c0e22b444 -dist/2025-05-27/rustc-nightly-x86_64-unknown-freebsd.tar.xz=5c6467a38bff56ca4fa1722b092a157d0e258eb037bd5f784fae0827af842088 -dist/2025-05-27/rustc-nightly-x86_64-unknown-illumos.tar.gz=f007908e9cbc7defab2719a4f734f6f327952d59d6939b0e85ccb36dca670e0c -dist/2025-05-27/rustc-nightly-x86_64-unknown-illumos.tar.xz=620be77081b1564ff626b1926d8242d8fc2e6f2c0308002f01cc214f8843701b -dist/2025-05-27/rustc-nightly-x86_64-unknown-linux-gnu.tar.gz=8749217fd22d81ee2f380b1af63116e4c540fd11f617752e552f66568d50868c -dist/2025-05-27/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz=545ff3e0ac1c7c303b47bc062d029033a3d8de77c6fb54bad39a6a34b099c711 -dist/2025-05-27/rustc-nightly-x86_64-unknown-linux-musl.tar.gz=d146af52aa7fad3b198b9dd5242793bfc2dc8aad81642bf34702e409d5ae7f3b -dist/2025-05-27/rustc-nightly-x86_64-unknown-linux-musl.tar.xz=d72ed1096917a5789f26564ddc920c3fdcd29056cf97452371e5141bcc2c8a8e -dist/2025-05-27/rustc-nightly-x86_64-unknown-netbsd.tar.gz=94b608796d12feff92c54f942318e711879d86b1a3114a710b8366b7415ae025 -dist/2025-05-27/rustc-nightly-x86_64-unknown-netbsd.tar.xz=7d870360a35a34dffede096d62734d97a7bf60d0661e638f73d913cb93bd49ec +dist/2025-06-24/rustc-beta-aarch64-apple-darwin.tar.gz=d52ba1003d317f779490731ac66bcf4ebeda0e56648ac35373c6f7385515c06d +dist/2025-06-24/rustc-beta-aarch64-apple-darwin.tar.xz=1d4ab402eded5cfe91040f3af5128448cc4b57ceb53b82571bde8a86f42681df +dist/2025-06-24/rustc-beta-aarch64-pc-windows-msvc.tar.gz=aa82360f0428aa3c918c9fb1b0f41752655aae5249f5795d34b1a4737362cf8d +dist/2025-06-24/rustc-beta-aarch64-pc-windows-msvc.tar.xz=969a5aa9d69a2e64c918d1757489f2532544754563aae73aea9bde7d85d22d2f +dist/2025-06-24/rustc-beta-aarch64-unknown-linux-gnu.tar.gz=bac05a8267c6dd563ae0869cdfaac9fa3a07e9d64c5c332bc4028f7f3e8ba668 +dist/2025-06-24/rustc-beta-aarch64-unknown-linux-gnu.tar.xz=3d37128f78af2b6fffb661dc05c2f7ace3a8307b3d60176fcc2b70bd4d802b90 +dist/2025-06-24/rustc-beta-aarch64-unknown-linux-musl.tar.gz=268f550fb51c63f0e8ad8c8a955633c79dde3011c26c1f3b555f2575a8366f88 +dist/2025-06-24/rustc-beta-aarch64-unknown-linux-musl.tar.xz=b706d4cdb5b4e86602994c74476b4be7ff94749c3104553ba6d73356cb914582 +dist/2025-06-24/rustc-beta-arm-unknown-linux-gnueabi.tar.gz=20b0e77b39b9ef5c80f19a3b6daec5e479cf3e0af8b623cee81d38f0a5318cfc +dist/2025-06-24/rustc-beta-arm-unknown-linux-gnueabi.tar.xz=0add4728a9a993c6b33d8cda11c27520e013f0721532686b5919d3958d2333f0 +dist/2025-06-24/rustc-beta-arm-unknown-linux-gnueabihf.tar.gz=4bdd3e99737137d3595fa9e27e590d8589d5f380e9e634fdd65e8c526f872fed +dist/2025-06-24/rustc-beta-arm-unknown-linux-gnueabihf.tar.xz=662c73cf5f9e0796be7d8ad19a064b5bbbace7b8d1e55644acc19880fa76526c +dist/2025-06-24/rustc-beta-armv7-unknown-linux-gnueabihf.tar.gz=c31b823567177bba812b1074af46282083214314ba3e0c4c2386748526fb64d0 +dist/2025-06-24/rustc-beta-armv7-unknown-linux-gnueabihf.tar.xz=67eed549762b32d50117e200b5157a60388e67d246b60ddf8fc4e41defa3ed0e +dist/2025-06-24/rustc-beta-i686-pc-windows-gnu.tar.gz=de5c004abce01c43ac7caaefa9ed10006e41b83d085bcbe6fceb4040138787ca +dist/2025-06-24/rustc-beta-i686-pc-windows-gnu.tar.xz=f5b715035c76cae7099c74e0f00e924c2cf965aa7152518c2e6313ef04d81d8c +dist/2025-06-24/rustc-beta-i686-pc-windows-msvc.tar.gz=48a97523dbc061b2a3a575a34b2ba87c0dfca2e56fee67260001ba51c3b37ac1 +dist/2025-06-24/rustc-beta-i686-pc-windows-msvc.tar.xz=5c2254445c7d5cdf3e64c86b29046699fe7f8a6828dcd3f2931aa26d026d71af +dist/2025-06-24/rustc-beta-i686-unknown-linux-gnu.tar.gz=4515aa57b3f9191fb14d228bedee72044d2fda3e3166780e622d857460c77c57 +dist/2025-06-24/rustc-beta-i686-unknown-linux-gnu.tar.xz=8791d2c9321b36d64280902e0ec04b85728715bdd072f859fbe3d533209504de +dist/2025-06-24/rustc-beta-loongarch64-unknown-linux-gnu.tar.gz=08b9941535edae23971a42803bc398bd87c353dda837ecc68e534be6604d7e35 +dist/2025-06-24/rustc-beta-loongarch64-unknown-linux-gnu.tar.xz=a2a109408ba5db4540ad7bbd1e67a9623aae96203c0238aca5fb3c3741ead97f +dist/2025-06-24/rustc-beta-loongarch64-unknown-linux-musl.tar.gz=41709a32ceb106a618aedcebb1470e6bb3734362790d1aad7d0f59e25c9f76ca +dist/2025-06-24/rustc-beta-loongarch64-unknown-linux-musl.tar.xz=67294e9465728d7a2e1f9553927067fbba176c1d806a59472b84a2dc18e46032 +dist/2025-06-24/rustc-beta-powerpc-unknown-linux-gnu.tar.gz=a18de5c31855d7a2f73a242217c628a49fe9a64b1374d6720e37e3eb0a584fae +dist/2025-06-24/rustc-beta-powerpc-unknown-linux-gnu.tar.xz=7785929842939af15a8404f666c95e5786ca0941f1c15dc084f26a5124411e2c +dist/2025-06-24/rustc-beta-powerpc64-unknown-linux-gnu.tar.gz=35e4e2c48895480d5c012d2741a1b3387c1ffb4c4d2440649c0eda182f27f6c1 +dist/2025-06-24/rustc-beta-powerpc64-unknown-linux-gnu.tar.xz=3cd480374907eb3816c8db73973abc676c96bc9598943dc89056eb5542d6b6b8 +dist/2025-06-24/rustc-beta-powerpc64le-unknown-linux-gnu.tar.gz=3901ff91a71c32808f23d715b9e04ce65dfac20746cad1b00c1a964220284cb5 +dist/2025-06-24/rustc-beta-powerpc64le-unknown-linux-gnu.tar.xz=c670f5201c14464d9e13da1922609369e784a1e482162cf3e9ed281fce926b01 +dist/2025-06-24/rustc-beta-powerpc64le-unknown-linux-musl.tar.gz=72f5c00badcc4a87e237b831262d12e94edb960d65f411557a54dc9bf587464b +dist/2025-06-24/rustc-beta-powerpc64le-unknown-linux-musl.tar.xz=337f222313427704cfa4b9f68c89f82e3855f2b3d1cec1c151778fd631674452 +dist/2025-06-24/rustc-beta-riscv64gc-unknown-linux-gnu.tar.gz=b2a49ff470ce80e887f2eb3b69b39cd65b64a2a25b5f09df91a9e58762a6a159 +dist/2025-06-24/rustc-beta-riscv64gc-unknown-linux-gnu.tar.xz=1c2b2090ab6ec51df85e6495389adceca4fd414a709d2219fd7b39d1c47c7a49 +dist/2025-06-24/rustc-beta-s390x-unknown-linux-gnu.tar.gz=26ad57058ddb3ad1795300bff0bbbfc1bb3a0437638112655dbec279db78bb11 +dist/2025-06-24/rustc-beta-s390x-unknown-linux-gnu.tar.xz=742c09735a0b50acea601dfd2ae41e931cbb44d7700d6cba18df9e0ccb45bad8 +dist/2025-06-24/rustc-beta-sparcv9-sun-solaris.tar.gz=cc6c4e7bada6d864177a163f1d6b1f75e1e388abe1fcd4de87c2aeb8e609587a +dist/2025-06-24/rustc-beta-sparcv9-sun-solaris.tar.xz=1fcf41f42ef399bb8c450f6a8c9cef8af960d6fa82495c53273419bd3cbb79a0 +dist/2025-06-24/rustc-beta-x86_64-apple-darwin.tar.gz=b1dd64d9ee00d14a4cf41556b70330606c793a81725494e4f14215092ded4d73 +dist/2025-06-24/rustc-beta-x86_64-apple-darwin.tar.xz=75de284a6a29a453e1e453d372affb5717434584445019582a50d169b7770d65 +dist/2025-06-24/rustc-beta-x86_64-pc-solaris.tar.gz=ff4832c37c0bfb55e54bd02f40251a4d43ab68f41d22ee54543fe37e33561925 +dist/2025-06-24/rustc-beta-x86_64-pc-solaris.tar.xz=e297337e331fab37350f0826328ef1086e210068cc764567905a4caae3f18d0d +dist/2025-06-24/rustc-beta-x86_64-pc-windows-gnu.tar.gz=fd4dc0fb13dd1cc8ad58f143ff83a8a52fe31e277c6fd19dcf4d51dd5d004135 +dist/2025-06-24/rustc-beta-x86_64-pc-windows-gnu.tar.xz=347de9b9f7ce028fe479803dd846d13be8db6d0baf81a0a4eeb3511cfebe4821 +dist/2025-06-24/rustc-beta-x86_64-pc-windows-msvc.tar.gz=c84ee0f00b5f13fee3ce8c45301577a42866493aefa5460f3385d03398204acd +dist/2025-06-24/rustc-beta-x86_64-pc-windows-msvc.tar.xz=4b6a27561bc94afe072b66c5bed3f30da712bdc812ff1609feb669556dc878ca +dist/2025-06-24/rustc-beta-x86_64-unknown-freebsd.tar.gz=493c5c391e7829c8925bc447457c56617076ed32d3ee1465639fa02cda5717d4 +dist/2025-06-24/rustc-beta-x86_64-unknown-freebsd.tar.xz=71e9e3a1d1f5e8dc98403c2a6695c969908ba0cde594c4e20249fe81b67d62d1 +dist/2025-06-24/rustc-beta-x86_64-unknown-illumos.tar.gz=40e58bcfc116546268f5007e4092eeb43c3a582e7090f0bff29fb0ad24a0bc72 +dist/2025-06-24/rustc-beta-x86_64-unknown-illumos.tar.xz=e313e1b0136be269ff68b4d2a71d0414357df66e1ed192e9a60e908c6c64c37f +dist/2025-06-24/rustc-beta-x86_64-unknown-linux-gnu.tar.gz=0725845044e9ecb37ff6b4c1a030a6c8bf287706601b29ba7fb5284f67d29ba4 +dist/2025-06-24/rustc-beta-x86_64-unknown-linux-gnu.tar.xz=4fdc2e7a65b3924d1577229fe02975a4618481aac35053426abd2b9ede18afde +dist/2025-06-24/rustc-beta-x86_64-unknown-linux-musl.tar.gz=26426288117d71c8212aa30fa5b874e3aca9e4e706852f18d22da05bbd638dab +dist/2025-06-24/rustc-beta-x86_64-unknown-linux-musl.tar.xz=bca55f330ec76ebdd6f6dc8764cfb31aa9158cb96758779f8eefc031d393e263 +dist/2025-06-24/rustc-beta-x86_64-unknown-netbsd.tar.gz=007e38bc7d09c4ca3a7ea389ed112a2de0e09f6688e5e1f161a4d11e41d43ab0 +dist/2025-06-24/rustc-beta-x86_64-unknown-netbsd.tar.xz=08a5d9cac358f115af3d0985439e2ff0c79b70b592f99fb3d31b65cb7f56d958 +dist/2025-06-24/rust-std-beta-aarch64-apple-darwin.tar.gz=2c38b17116d9a2d2020e7e84bbaad3b614e8a0c27fe26987416bd183138596ba +dist/2025-06-24/rust-std-beta-aarch64-apple-darwin.tar.xz=c51b0e3932226017dfb70e8fbd879e9eefd65d5f17ad07db606ebe2ba1500dd0 +dist/2025-06-24/rust-std-beta-aarch64-apple-ios.tar.gz=f71b8bc726eb5f60bb1603607609a1c04569581875d697fb1026b8454ff0b403 +dist/2025-06-24/rust-std-beta-aarch64-apple-ios.tar.xz=ea0634039755708291275ee3af545982f3c29381b1e9675cb087ede59e03b461 +dist/2025-06-24/rust-std-beta-aarch64-apple-ios-macabi.tar.gz=c457134ea13cdbaf1af7f11148074ac01e6e19415b591a8ee6958ea5006f4754 +dist/2025-06-24/rust-std-beta-aarch64-apple-ios-macabi.tar.xz=cff6edde276467a7e3674506c9b668abf0004a12464fb22fd35f56537b0dc4b3 +dist/2025-06-24/rust-std-beta-aarch64-apple-ios-sim.tar.gz=c70fcec2f7610058c5cde51847879415376fedfae10ec49a7b198e5c5582aac5 +dist/2025-06-24/rust-std-beta-aarch64-apple-ios-sim.tar.xz=6e763366bfb635915ae7d505c35df55ebf8a1d5373bd5403584d7dd7ac682f21 +dist/2025-06-24/rust-std-beta-aarch64-linux-android.tar.gz=c4d13dcea814eb20b4c7045e6d881df185f6ee1539b42428348068d752718498 +dist/2025-06-24/rust-std-beta-aarch64-linux-android.tar.xz=67d3cc8f90712e50909aca5e734211baeab3ccd47a3cd00dea07839f16770a19 +dist/2025-06-24/rust-std-beta-aarch64-pc-windows-gnullvm.tar.gz=d882aeee9217327a650ad37b902380c87dd3d02d0d49015cb3052537da42b380 +dist/2025-06-24/rust-std-beta-aarch64-pc-windows-gnullvm.tar.xz=4aaee0fdc8aad773eb8576c869b111dbfa4e3882cf5cf50da174e63528db01c6 +dist/2025-06-24/rust-std-beta-aarch64-pc-windows-msvc.tar.gz=56b70c5445d95471651093ebe31a16fef54ec91b2acef533f3c1f06c2f18f924 +dist/2025-06-24/rust-std-beta-aarch64-pc-windows-msvc.tar.xz=d60d4aea6fc5345bd0478c92a81bca7ec3589775ec67733aca845d78b9364e8c +dist/2025-06-24/rust-std-beta-aarch64-unknown-fuchsia.tar.gz=b6946f0c1d01d370d217e3512505211ca4aff4f07c1f7c55d99065b70c9d52fb +dist/2025-06-24/rust-std-beta-aarch64-unknown-fuchsia.tar.xz=e3479f792c61b425459c691169d8fe55a149dd6c0440aea4a0d9be41d6806b00 +dist/2025-06-24/rust-std-beta-aarch64-unknown-linux-gnu.tar.gz=47c5e35cf704a1496a5d01143d2f418880a4540bbd6b4fd41e4f9988a71ded83 +dist/2025-06-24/rust-std-beta-aarch64-unknown-linux-gnu.tar.xz=010bae09b5a25a7b1b0c1a10dc67f5d7db89212fa9ef7149cea4e4f586d5f252 +dist/2025-06-24/rust-std-beta-aarch64-unknown-linux-musl.tar.gz=2dba8ca097a3afbc9d51b75c8338f3536b079fa751dbd4a877d89a36cb0e616b +dist/2025-06-24/rust-std-beta-aarch64-unknown-linux-musl.tar.xz=9ae1856c909ba57b3c5638e8546fec2e2741a54f5f5b14c73c1c031f33096815 +dist/2025-06-24/rust-std-beta-aarch64-unknown-linux-ohos.tar.gz=f0f25e623f96ea98d004039add0232abd5ba7216ba347db3a827d4ec323d3ab1 +dist/2025-06-24/rust-std-beta-aarch64-unknown-linux-ohos.tar.xz=fcfec16c209afc3362f710d0207e5ff8a596ba7ad7123335ad3670294d0b4e6f +dist/2025-06-24/rust-std-beta-aarch64-unknown-none.tar.gz=00d63ef3e735db06d0989601a78a21dcbfa4c62bc1ab063a53c48f94ec24b92d +dist/2025-06-24/rust-std-beta-aarch64-unknown-none.tar.xz=50934b2bec9bfff0c58e9a70adeafa7875236814e8338cc01fab3373822e8d5a +dist/2025-06-24/rust-std-beta-aarch64-unknown-none-softfloat.tar.gz=211e95246719c6242dc243559175bc0d8154c4878b8ca72e4acb6f29c60aca8c +dist/2025-06-24/rust-std-beta-aarch64-unknown-none-softfloat.tar.xz=ba53e4fae39fa980c6eeb1a2d2299eb53ded22dcdfc0390938bdd7b9563ed9eb +dist/2025-06-24/rust-std-beta-aarch64-unknown-uefi.tar.gz=93e56e090c416f038faca4837c4fb72894f3d6d1a3ba8b9fe27b2ca032deedb6 +dist/2025-06-24/rust-std-beta-aarch64-unknown-uefi.tar.xz=f0f0aebb6b764b648736b9f4a1a335463c4de7076a2be3bfb7bbcd04e3aaccd2 +dist/2025-06-24/rust-std-beta-arm-linux-androideabi.tar.gz=3ade9cb0c40515ed3b1601ec66bab1cc81f46e9814790a3589259750be8c9ec8 +dist/2025-06-24/rust-std-beta-arm-linux-androideabi.tar.xz=cf6997822547dc1b776443cee80acff76ec66747e6cdb16784d81877922a9d57 +dist/2025-06-24/rust-std-beta-arm-unknown-linux-gnueabi.tar.gz=09525696ac31ab025a27cd61daa457f6687a526e4ecb8fecb87e0152fff65bcf +dist/2025-06-24/rust-std-beta-arm-unknown-linux-gnueabi.tar.xz=d5cb742fec22224144fde555dcda683a3efa262d1c7e7986e038fe545d8ad9e8 +dist/2025-06-24/rust-std-beta-arm-unknown-linux-gnueabihf.tar.gz=ae119ef640163fe7c73179d0f895794520c790b05decd31548631f288ba6d01e +dist/2025-06-24/rust-std-beta-arm-unknown-linux-gnueabihf.tar.xz=11f07bc11660e4a4b6b2a97d26cfa31c36976fb74a36b5dba7dd66c4bb81608a +dist/2025-06-24/rust-std-beta-arm-unknown-linux-musleabi.tar.gz=2c9f4567c766e85152981a594169f6f656d89048947d2d9a30ff805ca6f1e59b +dist/2025-06-24/rust-std-beta-arm-unknown-linux-musleabi.tar.xz=427c70145dc35701b0888b7863657ef0fd5d4b7bff7081e984a5e977d423c7f5 +dist/2025-06-24/rust-std-beta-arm-unknown-linux-musleabihf.tar.gz=c042af9e0d8fb02ed80b57bae19ed8608c005dd279ec1c64dde53d65752a0b14 +dist/2025-06-24/rust-std-beta-arm-unknown-linux-musleabihf.tar.xz=b6fd66abb9f14c4b8bb43d6c8b32d9aa666be01468b60768fc8d0db4414da920 +dist/2025-06-24/rust-std-beta-arm64ec-pc-windows-msvc.tar.gz=896294c85fe8570f024a08aa0c22668f38b998dabb0008e5a4f8d7e1ecb2236e +dist/2025-06-24/rust-std-beta-arm64ec-pc-windows-msvc.tar.xz=03a2a8658186e48c7bffa4b120821e99d4066fd115b550af4d76998545e1fb24 +dist/2025-06-24/rust-std-beta-armebv7r-none-eabi.tar.gz=3302d8df9dd73c44603b7629ece46a0a0c1f03a838a354973fe8aa2ed13ac10e +dist/2025-06-24/rust-std-beta-armebv7r-none-eabi.tar.xz=3c9d1278136a92c6c829a07eeb991f9047e703a82145af2ba0373c0d01429ab4 +dist/2025-06-24/rust-std-beta-armebv7r-none-eabihf.tar.gz=864a261c4c337e692d4c3aa0f2659e9d87ce946309d0e61fea752f4fd7835a6b +dist/2025-06-24/rust-std-beta-armebv7r-none-eabihf.tar.xz=ef22b1321da09ac6d64b5e965c02ab0886dd9f4281520cad4050764203b153bc +dist/2025-06-24/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.gz=d057fd26541f096995e3d774659d5d8b602e67354b8551f0b99c7595945aa194 +dist/2025-06-24/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.xz=afad054eee6bcdafbb68308d7c53438e561ec26196683552d2f825c63948d325 +dist/2025-06-24/rust-std-beta-armv5te-unknown-linux-musleabi.tar.gz=65306dbc9e7d75810b28624a9dc146034b3c7764313ddac084309a36e688ba0b +dist/2025-06-24/rust-std-beta-armv5te-unknown-linux-musleabi.tar.xz=ed4f9cffcb7b1bb1bf72b952afa422cfbc74ab9e04d6acb750126da5d0f24094 +dist/2025-06-24/rust-std-beta-armv7-linux-androideabi.tar.gz=7e39283a3e4e469e6b9dd35497515481a9050fbc1fb9f10334cf495b3c34980a +dist/2025-06-24/rust-std-beta-armv7-linux-androideabi.tar.xz=7af0e068e2ebad42c79926ff1480e4ec07d7a48db142a497fb8f75b7a065e0fe +dist/2025-06-24/rust-std-beta-armv7-unknown-linux-gnueabi.tar.gz=677d3328d721fbcf515bbd0628b59dde2ac1e0d7ed567f2784666430d61e391a +dist/2025-06-24/rust-std-beta-armv7-unknown-linux-gnueabi.tar.xz=550c6df5954535165b55c07411144a122f8156658c1f46f74a71a7f17974fd29 +dist/2025-06-24/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.gz=b5deee5b5ba9048dbfc1c416972df6a4d42d52f4a6d1857757e0d01d8c47a824 +dist/2025-06-24/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.xz=7f898d3e1f6ec6d53a269803d4d4a248e052892bc9f46c3bb9095ffcfb0e04a5 +dist/2025-06-24/rust-std-beta-armv7-unknown-linux-musleabi.tar.gz=56f8943fc65b732dc971f01bed589d9fc19a2a263a4af4f20810f7b586ae391c +dist/2025-06-24/rust-std-beta-armv7-unknown-linux-musleabi.tar.xz=1802d041656132519baf110e5a072260a7fe809fda87c6e01fd5fc4809249f8e +dist/2025-06-24/rust-std-beta-armv7-unknown-linux-musleabihf.tar.gz=36917662d6e98b19782c9d81087857f52b7dfdbb37872387285c9507a1bff391 +dist/2025-06-24/rust-std-beta-armv7-unknown-linux-musleabihf.tar.xz=e6aec6411c740e5470879e64c85882cf3627c24c7d584f359c77397a782a613c +dist/2025-06-24/rust-std-beta-armv7-unknown-linux-ohos.tar.gz=0c9a18a6b7a7c981c5e0ef337e66915d14499c6392bbfeb55a65c4f3340a4835 +dist/2025-06-24/rust-std-beta-armv7-unknown-linux-ohos.tar.xz=f1cce70c71bb712a9aba0827ebb7d5783b977a674606cf5fe10879db81627c5d +dist/2025-06-24/rust-std-beta-armv7a-none-eabi.tar.gz=d477ce01b099b81e96a9edf6617c21725808c4c234c4ab2f84216565f6a6efcb +dist/2025-06-24/rust-std-beta-armv7a-none-eabi.tar.xz=a2339cd5cd3dcbb5b897740b7e7bbf6c5130feb1f6ef7c2c09012eb6cc79d417 +dist/2025-06-24/rust-std-beta-armv7r-none-eabi.tar.gz=40fd9ed6b6b428cd476f690ebd3e2265cac040f4772b91af76b071115b16b9aa +dist/2025-06-24/rust-std-beta-armv7r-none-eabi.tar.xz=c2dae5167d4f7f6e1d797b065404cb647d102d0f0165fff89d040c5c89faadb6 +dist/2025-06-24/rust-std-beta-armv7r-none-eabihf.tar.gz=c4731d34cb23614cda51fba5e66d6327c653c21df71795bdbcfa48f20aa0ef17 +dist/2025-06-24/rust-std-beta-armv7r-none-eabihf.tar.xz=561f5934f8bcbd9860f7b042d9baa4d4ffe0696eeb3a0447ae04467497b749ad +dist/2025-06-24/rust-std-beta-i586-unknown-linux-gnu.tar.gz=035ad6be061e3a3bbe36baffd1bca5cfb91d827e07b441e3e2c32b0b9e1212f4 +dist/2025-06-24/rust-std-beta-i586-unknown-linux-gnu.tar.xz=5ca691898ea3cc66822aa32ac9d24996610cd79e34275b35a53e252f5c99fae7 +dist/2025-06-24/rust-std-beta-i586-unknown-linux-musl.tar.gz=614a68e5593b672f87601c07f95b30324a3a60e10ffe814fe2a772d533a9eabf +dist/2025-06-24/rust-std-beta-i586-unknown-linux-musl.tar.xz=78f7ed2c2f0f3e0e0d883ffc94a4fae43e7e5f3fff6e91e16d8a459a40570fee +dist/2025-06-24/rust-std-beta-i686-linux-android.tar.gz=d6e5a0fa260c5222e4cce351be2eeed9b85951a8e79bdfe379a4fc2be354d558 +dist/2025-06-24/rust-std-beta-i686-linux-android.tar.xz=3e0c1ff1e8528a7c0a6cda3a7a90c2ee88b0b1b697b2430d410dad944df11a46 +dist/2025-06-24/rust-std-beta-i686-pc-windows-gnu.tar.gz=f944a4982a6ca520284bcc5633f05226f636747b8df4325ca1a2c77049e2ebe7 +dist/2025-06-24/rust-std-beta-i686-pc-windows-gnu.tar.xz=6664ba19dd85737fb5276e8e83a30989c49e795dd4608e67f33f4115253c0753 +dist/2025-06-24/rust-std-beta-i686-pc-windows-gnullvm.tar.gz=9e7e7838710db5f340448e957a5ba812a3fe91baa40ba68c355fdee653b0413b +dist/2025-06-24/rust-std-beta-i686-pc-windows-gnullvm.tar.xz=c5d4c6274444e695630309ca66fd52f08645eefe424b5e287e89064eb10aee2a +dist/2025-06-24/rust-std-beta-i686-pc-windows-msvc.tar.gz=e1bdc0d04736e0bc95e131eed25944f62a4d2896d80778b8a2260df38e0f9946 +dist/2025-06-24/rust-std-beta-i686-pc-windows-msvc.tar.xz=7df4a0e74e6ad457fbe38d0eaf40a3d190f0d77d6b4d1d3940028e9c7935558b +dist/2025-06-24/rust-std-beta-i686-unknown-freebsd.tar.gz=a791a76c83a257590c8ab653b92ce65d74f4885faebf64c91c111363d237aeb5 +dist/2025-06-24/rust-std-beta-i686-unknown-freebsd.tar.xz=7455eb781d0e1a0b6a154e93d7cf2ae2891f20fd77b8a2a0a3011e94a5013147 +dist/2025-06-24/rust-std-beta-i686-unknown-linux-gnu.tar.gz=c6f770e2cf229e97640845137df23a7da8f6e6e9753d494dc9d5aa8dfb506e95 +dist/2025-06-24/rust-std-beta-i686-unknown-linux-gnu.tar.xz=d7c351e3a45181f040acd5f8c20c655d878a0d53927489891603b91c80c4abb6 +dist/2025-06-24/rust-std-beta-i686-unknown-linux-musl.tar.gz=547a90d1f7742389642590bfc45b66474febebe3c6c5209cb1b22773e65ad03e +dist/2025-06-24/rust-std-beta-i686-unknown-linux-musl.tar.xz=6c7476b7b93ac2a97ec5385ecb55463b11118b84aaf9a155a1cdbb68ea879241 +dist/2025-06-24/rust-std-beta-i686-unknown-uefi.tar.gz=1f45c12ccc6d27bc6931a6348dd0a0a3f4e5eb63ad45e4ec362f706bb327ee24 +dist/2025-06-24/rust-std-beta-i686-unknown-uefi.tar.xz=43c76c933f3eee6f7c4230fd34e702a59b5a5ad088c9bc20112e4e0b2d5dbaae +dist/2025-06-24/rust-std-beta-loongarch64-unknown-linux-gnu.tar.gz=caed38451c419ab05e54b8d20f6af56a274b3c59b000a0ffa51b7b63ea314c27 +dist/2025-06-24/rust-std-beta-loongarch64-unknown-linux-gnu.tar.xz=5418975da12a39cecfb1a040dbb2ae6b8b63a76b652aca582ce04aeebb3c05fb +dist/2025-06-24/rust-std-beta-loongarch64-unknown-linux-musl.tar.gz=b0d0856119c2b15f1ce6c3fe26e9f50550817c896235784333afd502ee804957 +dist/2025-06-24/rust-std-beta-loongarch64-unknown-linux-musl.tar.xz=22c39fa9a460b12e782951794fe92537fbf8108db1e4cee4c641a07d9741145b +dist/2025-06-24/rust-std-beta-loongarch64-unknown-none.tar.gz=2433c862a1fec8a983112f6472bdd0e6bf9ce66ce9484f89b78d80c65375a70e +dist/2025-06-24/rust-std-beta-loongarch64-unknown-none.tar.xz=dfff451f7f16c309cd0335def206429b2f10ab4943d59dd7cabe8afd8c072dfd +dist/2025-06-24/rust-std-beta-loongarch64-unknown-none-softfloat.tar.gz=d975fafa4271c774d8295cd93944ca91528960c12aa087435074b78c0ad783a7 +dist/2025-06-24/rust-std-beta-loongarch64-unknown-none-softfloat.tar.xz=561172fcbb2448dfa60a0daff761d8e6022543dbff191b584614adfcef8f255d +dist/2025-06-24/rust-std-beta-nvptx64-nvidia-cuda.tar.gz=f381683e2aca2a54f9aaa920c71eb8a06f50edb2967968b63a32a53bae3c2e7f +dist/2025-06-24/rust-std-beta-nvptx64-nvidia-cuda.tar.xz=e09536466bf24c3ddf250bcd4e92677446341902e6c20bbed7f20a9a11250462 +dist/2025-06-24/rust-std-beta-powerpc-unknown-linux-gnu.tar.gz=56484912fc1ee60288b5739b5e08680361cf8abbc927cb30012f491e77483192 +dist/2025-06-24/rust-std-beta-powerpc-unknown-linux-gnu.tar.xz=96bb329f992b3c8e060796e52aca2ba384225f350ccc2c12d0aa8022b1305842 +dist/2025-06-24/rust-std-beta-powerpc64-unknown-linux-gnu.tar.gz=806c017f5a94c70722ebb38d4e2ee8fa87d5d53b63712763114fc318d33edb8f +dist/2025-06-24/rust-std-beta-powerpc64-unknown-linux-gnu.tar.xz=e4bcfd4ffb2db92ff57f881875755b9808744c8e59efb2a3ae9c215a05e696ea +dist/2025-06-24/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.gz=8082559bc3da5b9e6e39732e83682a892df8535f75321710c6e5748f6e7e1985 +dist/2025-06-24/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.xz=d05626a5f3c364aba66aa214530fbf37a38b7c613c8c1a54c5ba46d66477db96 +dist/2025-06-24/rust-std-beta-powerpc64le-unknown-linux-musl.tar.gz=03690be0e07e3158da23750b4fc063c25b5760bca3447877cbcd45707eda9780 +dist/2025-06-24/rust-std-beta-powerpc64le-unknown-linux-musl.tar.xz=4b1997788c727c36a64eb335de3c7d8f100c3825129a1e4a2187e3a23851f083 +dist/2025-06-24/rust-std-beta-riscv32i-unknown-none-elf.tar.gz=421dd99dcdc80a55c8a159d22c3c596424029f1fa1d7c12bfdc7b718091b776c +dist/2025-06-24/rust-std-beta-riscv32i-unknown-none-elf.tar.xz=1a574ae822a4ad793c10313d79dd5566d9ff74d7a7b83d860e06df0aa752a151 +dist/2025-06-24/rust-std-beta-riscv32im-unknown-none-elf.tar.gz=0b0891369b16ea1480554b2670311aaf6b7937420056d04b1ce2c80ef3955bb2 +dist/2025-06-24/rust-std-beta-riscv32im-unknown-none-elf.tar.xz=366db574f295053b2bbdeb35a7c597fb624396b1896bf482067d5d5cee7e4f19 +dist/2025-06-24/rust-std-beta-riscv32imac-unknown-none-elf.tar.gz=813cced4f75479412b22dba98148036da9ccfe9e1181009b8ca99f3e12398932 +dist/2025-06-24/rust-std-beta-riscv32imac-unknown-none-elf.tar.xz=5378810bc555e2d4be7bf5d43731649f803943854ea23da7a36887254f473a59 +dist/2025-06-24/rust-std-beta-riscv32imafc-unknown-none-elf.tar.gz=709c652ec071033227867dd87ba19483e30f6f68e95b36c448d46b0321b693ef +dist/2025-06-24/rust-std-beta-riscv32imafc-unknown-none-elf.tar.xz=cd6935d932ef81beab950126dd932ee6d0fa11105974f94485640fff894c1bc8 +dist/2025-06-24/rust-std-beta-riscv32imc-unknown-none-elf.tar.gz=43ac51227f85776f98c91dea378b765cfe870141d6bac7ae8aa0cbb0ce821de8 +dist/2025-06-24/rust-std-beta-riscv32imc-unknown-none-elf.tar.xz=c5ddf06de14b22ba431c1f8d1944425ea325b0cc83c3f2a2ee85291570187824 +dist/2025-06-24/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.gz=d45fe2a30afd25bb2975e006cd17b612221a710814611670d804a9bd2f4efd84 +dist/2025-06-24/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.xz=b43a87dbd6ab3b3d440f2bbeeacc77719d29347b980e74160301539902f039ea +dist/2025-06-24/rust-std-beta-riscv64gc-unknown-linux-musl.tar.gz=cfb5d97f24c7daf95d833b519a8912b2fcdaba31d8d1bece90c406ae8a2ebd32 +dist/2025-06-24/rust-std-beta-riscv64gc-unknown-linux-musl.tar.xz=66e5fb37d89bd0fa7b8a2721f4b610711ca6069f9e406c5cb9b90d792e70b5ae +dist/2025-06-24/rust-std-beta-riscv64gc-unknown-none-elf.tar.gz=5e1f10a92f1ca7bd4a0325662d15933371e756f0eee554e04b525f35b036e050 +dist/2025-06-24/rust-std-beta-riscv64gc-unknown-none-elf.tar.xz=7c09140b3af9ea56fafb724f66bb67d73bc788d139330b373eccd9fecf014024 +dist/2025-06-24/rust-std-beta-riscv64imac-unknown-none-elf.tar.gz=1c41567f55b86e683efff62f0fd397dc43324e2e664c0702f1c79db8b407759b +dist/2025-06-24/rust-std-beta-riscv64imac-unknown-none-elf.tar.xz=63573b32f25f53bfe42b1a4beecc75dba0f0e8f02be9e680a45a2429a46a6f9b +dist/2025-06-24/rust-std-beta-s390x-unknown-linux-gnu.tar.gz=3725c30ee0938a4cf3c9f29e115c61d8045f437c06887e39644a1211ba18a4b6 +dist/2025-06-24/rust-std-beta-s390x-unknown-linux-gnu.tar.xz=2bb94be7f6ee32bc23748e69e399a5fd087671e3e4fd8d77e819e51dff8cee5c +dist/2025-06-24/rust-std-beta-sparc64-unknown-linux-gnu.tar.gz=b789df52548c45c070057ade63f1d6351ba3cb39403a9e33c0776bafa5985abb +dist/2025-06-24/rust-std-beta-sparc64-unknown-linux-gnu.tar.xz=84179facb34fb286545622407ac6bfd5bb2b7546e02e56597152ab5bab49fe93 +dist/2025-06-24/rust-std-beta-sparcv9-sun-solaris.tar.gz=ec9de10d91c1f912d97f2a96aea58e6c7cca5ab864a14a7aae62064c8ddb1e53 +dist/2025-06-24/rust-std-beta-sparcv9-sun-solaris.tar.xz=6628f2b64f56ff05ac18bc7486231a3f072de23979de2bc1fb7133670e32f98e +dist/2025-06-24/rust-std-beta-thumbv6m-none-eabi.tar.gz=a202ee09869f4902d1769b42cd05a992293003f92d4d62db8d87c195f9c9dd9b +dist/2025-06-24/rust-std-beta-thumbv6m-none-eabi.tar.xz=e34431bd5a7a00fbc9af4ee5c697b7244cf768477e05e68c6739a4c9561feb11 +dist/2025-06-24/rust-std-beta-thumbv7em-none-eabi.tar.gz=681da6a51ba84e4f517f1390ff4e8c09fbb9cca0515e67ce074c3431d582cc7a +dist/2025-06-24/rust-std-beta-thumbv7em-none-eabi.tar.xz=ca7a21b1e58625bed5a9d8ee9e20ae7fd33fc822741e1aa8b4cf2599e45f6edd +dist/2025-06-24/rust-std-beta-thumbv7em-none-eabihf.tar.gz=51f4d95e11a9b5dc59534e63277c1567e8ba8edf205f50bfb857d0bc2d2a0a16 +dist/2025-06-24/rust-std-beta-thumbv7em-none-eabihf.tar.xz=066189a75cba466b8f6881e559c5501a987741a5314a3be18045339111eaff67 +dist/2025-06-24/rust-std-beta-thumbv7m-none-eabi.tar.gz=97395d2c7f9ffca227434df59925082be1c19656f78af8914886e37ec687bac6 +dist/2025-06-24/rust-std-beta-thumbv7m-none-eabi.tar.xz=9904335b8a696233694a96538d965a8ca6b62a1cb8e155818061fd1ae3f7d8e2 +dist/2025-06-24/rust-std-beta-thumbv7neon-linux-androideabi.tar.gz=8227426bae9b1c242deca19312af3bb3e64fcf736e7902cb74daed2e3595bfe5 +dist/2025-06-24/rust-std-beta-thumbv7neon-linux-androideabi.tar.xz=0908f15689366fa9cb3a6acf5f85a6355aba2f30387d17b0ea51edef5a7903b1 +dist/2025-06-24/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.gz=f2b3fec136958adf29a43d3307505f6fe79fd0e00f9abc42a56c0a04fadcf227 +dist/2025-06-24/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.xz=4520b3d88a48e054ea4c243904d3c7fdaa8dda0a448e48014d78d9ada1982220 +dist/2025-06-24/rust-std-beta-thumbv8m.base-none-eabi.tar.gz=da25e5bb90b522db9ab502068b7a7f4ec0a9ce7fbc0b98949e345490ff5854fd +dist/2025-06-24/rust-std-beta-thumbv8m.base-none-eabi.tar.xz=eebf1b73a75a4dab88bcc70121c024f40184ac30668ff298620853bd770a6e03 +dist/2025-06-24/rust-std-beta-thumbv8m.main-none-eabi.tar.gz=ad77f75d12be96cd135cb7dec17688635f98101072c014724e118d1e1d124afe +dist/2025-06-24/rust-std-beta-thumbv8m.main-none-eabi.tar.xz=038927ed53bca15d35ceaa33d9d8ca3e21be380d853b67404535317327e42ec5 +dist/2025-06-24/rust-std-beta-thumbv8m.main-none-eabihf.tar.gz=e5f4e09db94d0a92985bb4e0e72c1cf9402c81647bf4ee2f56b5b0626da1bfe5 +dist/2025-06-24/rust-std-beta-thumbv8m.main-none-eabihf.tar.xz=662c722d3445141d1f3aeb070e789c5115776a3dd909faf5a39b9ce3df8c8933 +dist/2025-06-24/rust-std-beta-wasm32-unknown-emscripten.tar.gz=cb2630b14ef721b43366e8f6135fb37ec3d2185951bd66344e329644fdc31812 +dist/2025-06-24/rust-std-beta-wasm32-unknown-emscripten.tar.xz=4c7e117fa93c9220b5e6103fb7802c18b4a6c53f2836480d60263046e73c3a8b +dist/2025-06-24/rust-std-beta-wasm32-unknown-unknown.tar.gz=1e9ac4f3fb341dfb1719fe5643e7cf867ebe69172e352ba94fb18b63bc2518e9 +dist/2025-06-24/rust-std-beta-wasm32-unknown-unknown.tar.xz=c207fb92fa666f3113c451cd584ebe666e36d6a1b97a3b91be1d513920ddf26c +dist/2025-06-24/rust-std-beta-wasm32-wasip1.tar.gz=e68f2697d3824721abeeb1d953455dd3d54ba8549d3b7c6998f00869747f3e99 +dist/2025-06-24/rust-std-beta-wasm32-wasip1.tar.xz=46150b8817705718589a85bf9b657acf60bd9c8829cb42fc4b59264cb357921a +dist/2025-06-24/rust-std-beta-wasm32-wasip1-threads.tar.gz=1a718af362f1314cdf934901b4eb26c8ea678a28009e8e725d46452420b1d7c9 +dist/2025-06-24/rust-std-beta-wasm32-wasip1-threads.tar.xz=f4c785ae809fa803562e2a1e406fd7a0362f44174e40913803e3332672bd1e40 +dist/2025-06-24/rust-std-beta-wasm32-wasip2.tar.gz=f17386b04a3f003bb42ca83a2044b23bb1b766b65b64b44c10e9d24f09a1bfc8 +dist/2025-06-24/rust-std-beta-wasm32-wasip2.tar.xz=9f90613dc5c6f659087144d6e25b091cd1a6fa09697a0d2d4c896bf74f473d9b +dist/2025-06-24/rust-std-beta-wasm32v1-none.tar.gz=753c77345c3b1fd7407a69d29a3cf3fb8c2dcd813c2ad63c1e97fe0dcf203f94 +dist/2025-06-24/rust-std-beta-wasm32v1-none.tar.xz=3bee75d197b4679c2355fad5739aebf721b182e93bfe76f1b8b9e004bd146d5c +dist/2025-06-24/rust-std-beta-x86_64-apple-darwin.tar.gz=aa7ac11017e96b2bc2c103c160dd03aa0e1826034c30a417b11d67b9fb657f2d +dist/2025-06-24/rust-std-beta-x86_64-apple-darwin.tar.xz=89a065f72d284cf2f886b7af2edc89f89812531d85aec8608ca0c1516365082e +dist/2025-06-24/rust-std-beta-x86_64-apple-ios.tar.gz=b814b2fb46db55b18e1b5bcd0ceba73745ca6f7a57afc7b90009275d61bb95c8 +dist/2025-06-24/rust-std-beta-x86_64-apple-ios.tar.xz=5a82ad2a7e45df8f5f1c374ac5bef2dd4f7da81dec2a348c75593e1bb752dd40 +dist/2025-06-24/rust-std-beta-x86_64-apple-ios-macabi.tar.gz=2482863c941aec4d9de753a8787961206e1ba8129180e2e85a4ac3eb158ae8a7 +dist/2025-06-24/rust-std-beta-x86_64-apple-ios-macabi.tar.xz=744d487c980f455d967df95c466399b181a891a879c25eac677fadfd87ebbaf3 +dist/2025-06-24/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.gz=9ebd84ebf36aaf8707268965ccc9efa69b259edd7d3a5fe13be4d21dc63f6bfd +dist/2025-06-24/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.xz=06020c24f4d5b339c794cd16fe87b1fd7f77d8d54f9d83f0d6088fbd062c900b +dist/2025-06-24/rust-std-beta-x86_64-linux-android.tar.gz=f5054210cba3367f5c9fc0c37b7f2cdfcf90ec624e7b1b3cddf24b2bbba53c7b +dist/2025-06-24/rust-std-beta-x86_64-linux-android.tar.xz=65dca5fdb5c9138b4361819aed754a574d74bed1a2d7a7aace1fda15821ba2f2 +dist/2025-06-24/rust-std-beta-x86_64-pc-solaris.tar.gz=575392afe724160d65c05dcfeda4d9b4868c182aefd8981a4b233222bc1168c1 +dist/2025-06-24/rust-std-beta-x86_64-pc-solaris.tar.xz=f385ad71529ff286607a461c84a15df81e9a8f880ee64a50cff8979c52262f27 +dist/2025-06-24/rust-std-beta-x86_64-pc-windows-gnu.tar.gz=647b7e4a44d1802721461e6c9d6ab1f7e148183476c01e410b7052e485081a61 +dist/2025-06-24/rust-std-beta-x86_64-pc-windows-gnu.tar.xz=817535fcf0efdd1e84ed85787fce6e674c22b120bce0c8aa1dbe53b2b41aebdc +dist/2025-06-24/rust-std-beta-x86_64-pc-windows-gnullvm.tar.gz=c6486c9cbf372d64858d4d251750c3dcf07e95d58b55ccec87a4c71292eb7d11 +dist/2025-06-24/rust-std-beta-x86_64-pc-windows-gnullvm.tar.xz=75c3f76b85534f0d058913328b9ee58c32a3a08414b4c5e7a046a87970b9eba1 +dist/2025-06-24/rust-std-beta-x86_64-pc-windows-msvc.tar.gz=d61125fae17e7627e7b56ca4ed32500b48a146d000e4a723ba34780568d8c0d0 +dist/2025-06-24/rust-std-beta-x86_64-pc-windows-msvc.tar.xz=590b14dfe52e3a286763d19ac19a83315c47f33a284d59169e145c8860eddfd3 +dist/2025-06-24/rust-std-beta-x86_64-unknown-freebsd.tar.gz=76e7066a540a06ac241a11df8fbefd511b48d85aa46f380a8b122bc342395faf +dist/2025-06-24/rust-std-beta-x86_64-unknown-freebsd.tar.xz=7cc4adb3c102eac53916b28c0dad40bd095e19ea3fd0430e84a2e0b094445809 +dist/2025-06-24/rust-std-beta-x86_64-unknown-fuchsia.tar.gz=b6b97c0e0348051a314bc705d8361f5609c63a42eaa3f85081d004c0258ac9fd +dist/2025-06-24/rust-std-beta-x86_64-unknown-fuchsia.tar.xz=5dd625fd17faa417e1c0abc5aef7a3f40d16122227c8078f8e0ad2530ef6d271 +dist/2025-06-24/rust-std-beta-x86_64-unknown-illumos.tar.gz=92bbecc4de50711693b54a11559a07f17569f60b1600ea40d6f6ce2e3a24ad10 +dist/2025-06-24/rust-std-beta-x86_64-unknown-illumos.tar.xz=fe3cb8e3adb7f4fd5f64feaa57587b4e41ba7437553e94a36f59a5bdca293f06 +dist/2025-06-24/rust-std-beta-x86_64-unknown-linux-gnu.tar.gz=a81e77c04cbc0b0f456c117361e695b78ae234cd53043368e62dbf10810c2c8d +dist/2025-06-24/rust-std-beta-x86_64-unknown-linux-gnu.tar.xz=c71ecb0a0c44cb7a9f35b6fe71e73f605d025af16f1ee5f1fd9c8a432144c54a +dist/2025-06-24/rust-std-beta-x86_64-unknown-linux-gnux32.tar.gz=2fcfa0c62f69b5e6d78c31596e7b6136bac38d65efabdd8fafdedd731bb124cc +dist/2025-06-24/rust-std-beta-x86_64-unknown-linux-gnux32.tar.xz=b2cced1e9ac03a4aa4f39de7ca6b8ed8cef2201bc851a413214e414001601ee9 +dist/2025-06-24/rust-std-beta-x86_64-unknown-linux-musl.tar.gz=178fe4f5b68e65450abaecf5c45c29e2a458bdde9b7c16f59755bdb1b4c1c218 +dist/2025-06-24/rust-std-beta-x86_64-unknown-linux-musl.tar.xz=eac7c2aaf40a31c2fb9fd792bacdff8b573f2fdcd2e52f4c7e798b51e2586652 +dist/2025-06-24/rust-std-beta-x86_64-unknown-linux-ohos.tar.gz=0c481e67a034eede634c201c88aae0cd2ecb36c656256728aff44b211657ab45 +dist/2025-06-24/rust-std-beta-x86_64-unknown-linux-ohos.tar.xz=4a1fc452d88bce5100d0da49c0a42621296731f7584de1e7869ec41800454bf9 +dist/2025-06-24/rust-std-beta-x86_64-unknown-netbsd.tar.gz=f7cb4b3d73ba6e571b77e5b58d877da5f89664d0107360f7c183c45df7b98e2a +dist/2025-06-24/rust-std-beta-x86_64-unknown-netbsd.tar.xz=6dc733be1457802f8c54a6f2bbc6f337204c2baef693888c1302b6f2df11e7aa +dist/2025-06-24/rust-std-beta-x86_64-unknown-none.tar.gz=16e3765f0c5b017ce3f6e2f3325c30e27eabb85fae1d935198f376fbe33e2551 +dist/2025-06-24/rust-std-beta-x86_64-unknown-none.tar.xz=60c87182e6f9d6ce4e8e612ac6aadd3989e69073f5fa0774d0e8dd76a47d122f +dist/2025-06-24/rust-std-beta-x86_64-unknown-redox.tar.gz=757169fa5abdcbf592aecc8b77a7ac48de7fad19a0cc714e5e0c37f0c887b36d +dist/2025-06-24/rust-std-beta-x86_64-unknown-redox.tar.xz=9888201cd4d10eeeb5b4c342aafcc10b1933f32df7e90ff2e9cf6ef0be6759f7 +dist/2025-06-24/rust-std-beta-x86_64-unknown-uefi.tar.gz=9d84268a50c1a730eb999761e248e166942dffbed9d6ab92ee1ef05ffa43d133 +dist/2025-06-24/rust-std-beta-x86_64-unknown-uefi.tar.xz=3ac1e6eecfc611b6be02a10eb4708c8d6932dea2004ed8c8441a619a61eb25f7 +dist/2025-06-24/cargo-beta-aarch64-apple-darwin.tar.gz=6dcf7741941f12ffac96f8210c9cafc3ee68bbed9211a95bcd33e1e835454b31 +dist/2025-06-24/cargo-beta-aarch64-apple-darwin.tar.xz=39d6bff308caf2fd5550325f2f930cbc3d77dd4f385d21e0509688d2203acdf7 +dist/2025-06-24/cargo-beta-aarch64-pc-windows-msvc.tar.gz=ff9d9c47fc85ee51ac1194138b25d8626704621e38871bf03a7e1c015c88ed60 +dist/2025-06-24/cargo-beta-aarch64-pc-windows-msvc.tar.xz=459006cc1a313e9ed28665015dcec313413722df20de729dada4f9e5a11d4809 +dist/2025-06-24/cargo-beta-aarch64-unknown-linux-gnu.tar.gz=62371da9200aa838f8e217347c3aa5568010d9fc2d963077e785d0f7f75417b9 +dist/2025-06-24/cargo-beta-aarch64-unknown-linux-gnu.tar.xz=cf7ec78f834f41c658179524a741b472c7ab4bbed3d6c0d7f61e7147d7353a78 +dist/2025-06-24/cargo-beta-aarch64-unknown-linux-musl.tar.gz=2ba26fb886020b136b6635ad89caa96d995c4179ffeb4c06bd8a5484c6e94669 +dist/2025-06-24/cargo-beta-aarch64-unknown-linux-musl.tar.xz=343f471ea1df375de51b881b6829855ca060d8e9e6bf3b066123d3e7fc348c18 +dist/2025-06-24/cargo-beta-arm-unknown-linux-gnueabi.tar.gz=4f03751e62a43cfe8aa9528a9af2903bee629ce1d7eb808a3f5c9881e7c3fa4a +dist/2025-06-24/cargo-beta-arm-unknown-linux-gnueabi.tar.xz=4082553dfb3af462d9e70c1c13b505dece9a0dcdf5584da2a311d7d6c4e45838 +dist/2025-06-24/cargo-beta-arm-unknown-linux-gnueabihf.tar.gz=d80111e0b74f8e9d5412307c6dffe53cb77a8febd25ae6d8e66813aefa56a7e5 +dist/2025-06-24/cargo-beta-arm-unknown-linux-gnueabihf.tar.xz=d06aa271a329ba63c4d1a3a6adf6ced0c5c1b900b20870c666ba6764f2d5e5cd +dist/2025-06-24/cargo-beta-armv7-unknown-linux-gnueabihf.tar.gz=5509454a5390a5732b340959974dab97e31b6f307d036e55b788633cb21e6f54 +dist/2025-06-24/cargo-beta-armv7-unknown-linux-gnueabihf.tar.xz=bc6e883addc936fe55009fa854922c2ec405ee2c085749476bf3848070098116 +dist/2025-06-24/cargo-beta-i686-pc-windows-gnu.tar.gz=2afa312411c50a629c62661d245f3672e305d7f083494cb0dc8034a726c72a54 +dist/2025-06-24/cargo-beta-i686-pc-windows-gnu.tar.xz=67e0cbfff31418c767e81bc45ddcfe6e9a47b0f279b49c0b0cad84aa589802c7 +dist/2025-06-24/cargo-beta-i686-pc-windows-msvc.tar.gz=1a9d5cf8c1dbe182b224687bdba0026120fc684232a89488db52160dd6f8145c +dist/2025-06-24/cargo-beta-i686-pc-windows-msvc.tar.xz=9ce77b6d3ffbdde316b54c1abc6fec888ea5d4307e0a4bab7555b9460122e3cb +dist/2025-06-24/cargo-beta-i686-unknown-linux-gnu.tar.gz=1d9fb35b564e718616ae2766cbc99e041d4e9d53bb0d8f885cf971e0803c85a8 +dist/2025-06-24/cargo-beta-i686-unknown-linux-gnu.tar.xz=c0c5c0f72726b577fec05670b6f9d46501b79af55c642d2b2f58a88e731db7ea +dist/2025-06-24/cargo-beta-loongarch64-unknown-linux-gnu.tar.gz=2bd4605054472e27df314d795c524126a2ab54e9f37442f579e6d75b8a7a0534 +dist/2025-06-24/cargo-beta-loongarch64-unknown-linux-gnu.tar.xz=7f8dc8897f88659268ed0247bce6fd35b4de813fcac5bd488d20c28504bee028 +dist/2025-06-24/cargo-beta-loongarch64-unknown-linux-musl.tar.gz=dc52a8982e04f52b5c42a09c3fabf3529b3871d90039299ddbc2648713e3b8f9 +dist/2025-06-24/cargo-beta-loongarch64-unknown-linux-musl.tar.xz=c25a1beb08ba399a98eb77c4baf4bcad80003eaae09fcb7cb6253943d5ccbc05 +dist/2025-06-24/cargo-beta-powerpc-unknown-linux-gnu.tar.gz=4d0841925d6f2664b4b110b4fb3f3c62a64b34b925722d08cdcb2b568e3f0682 +dist/2025-06-24/cargo-beta-powerpc-unknown-linux-gnu.tar.xz=c81c32af1c4e7e432112515af1dbdd6e4adbea668710881b63af7acd5c4715f9 +dist/2025-06-24/cargo-beta-powerpc64-unknown-linux-gnu.tar.gz=08d06b8b77148626bb2bd17059619083cd13d3d3f344c146dd509bf5d0d3d7b1 +dist/2025-06-24/cargo-beta-powerpc64-unknown-linux-gnu.tar.xz=55cd74747e6993eee6ec3aba36a79d108bf952d64a646696883e33798b27ade7 +dist/2025-06-24/cargo-beta-powerpc64le-unknown-linux-gnu.tar.gz=eea9d0980545cd6ffde6ea512255cc2d66d335c23a8850695c87885bb931183c +dist/2025-06-24/cargo-beta-powerpc64le-unknown-linux-gnu.tar.xz=7fe952473dca82b599745a9f3578b4976e43a6f91bba02a59da216a748d3a3f7 +dist/2025-06-24/cargo-beta-powerpc64le-unknown-linux-musl.tar.gz=6cba20c43713901144fe4542c4e410299e12306448d214614c19dfa201ee7853 +dist/2025-06-24/cargo-beta-powerpc64le-unknown-linux-musl.tar.xz=2c40f5715befa7938c3f1c2a65a787c497e97eb57bf03a82fba96f3eb55567a9 +dist/2025-06-24/cargo-beta-riscv64gc-unknown-linux-gnu.tar.gz=ad81074f9ea5c4373285dfaceafcb0d00f3372ac1d0655ac0ad0b2af816809bc +dist/2025-06-24/cargo-beta-riscv64gc-unknown-linux-gnu.tar.xz=f963720adb03fdc4508d7037937345109973e1b15f9590ba7393dac26c493b6b +dist/2025-06-24/cargo-beta-s390x-unknown-linux-gnu.tar.gz=b053764c635f2a943074c6f4b9f615ce6324d4c488143086ce2ead7d5e685790 +dist/2025-06-24/cargo-beta-s390x-unknown-linux-gnu.tar.xz=a214a89077adacb0e73acf6c7b0a312822eb72313be88aa5a1865dee7fba8dbe +dist/2025-06-24/cargo-beta-sparcv9-sun-solaris.tar.gz=c2d95ad154fc06aefa53c54e5a71f019b46146d2efddcb2f605977a393dacfb8 +dist/2025-06-24/cargo-beta-sparcv9-sun-solaris.tar.xz=a4c001aa2a9def4fce93d910e0afc3dab6a8fa2c767e51f5bf5ad05b9fd8c2c9 +dist/2025-06-24/cargo-beta-x86_64-apple-darwin.tar.gz=3942f0f82e2797f146f171e69a4ea0c58c6c37aca319bf9a80ab3e96bb540407 +dist/2025-06-24/cargo-beta-x86_64-apple-darwin.tar.xz=07c111b584a728a6e1ffd2694864eceebf3cb6c58c6d860778f8266ee050fe50 +dist/2025-06-24/cargo-beta-x86_64-pc-solaris.tar.gz=175f782e1e9d4aa0fc12b618f46c75077d63014ce92e07b6a9faecad797ef787 +dist/2025-06-24/cargo-beta-x86_64-pc-solaris.tar.xz=b8c317d244fafbfbaa702b3fae80db1119f9e5804c30370c45e5070915241d29 +dist/2025-06-24/cargo-beta-x86_64-pc-windows-gnu.tar.gz=ec0a52c99193bc8b995627809ca18f09e3fd7ea2a7a2eb9cf02a7af0012438c4 +dist/2025-06-24/cargo-beta-x86_64-pc-windows-gnu.tar.xz=a85b1e69b0ecb3323f1ba57c99c6ab62befe0146ca52905cc7db063dafa75667 +dist/2025-06-24/cargo-beta-x86_64-pc-windows-msvc.tar.gz=c775f0978a7a7f09b7277e41ff4c07f5cf7d2bd16a15dbd6cc89217c79192a56 +dist/2025-06-24/cargo-beta-x86_64-pc-windows-msvc.tar.xz=e956dc392e72fae8e42de5450c53c30e2fba56656cda1c6d5307ddd0d58653e7 +dist/2025-06-24/cargo-beta-x86_64-unknown-freebsd.tar.gz=2c8abc632a6e197fd93ccac1f2649247d31ad48519c5ad12a2b9c059e6725bd1 +dist/2025-06-24/cargo-beta-x86_64-unknown-freebsd.tar.xz=be762a368c6dfbe47a0f8c4b09cea1755a6d311f713b57b57a87276c88e5c34d +dist/2025-06-24/cargo-beta-x86_64-unknown-illumos.tar.gz=6a2f8043e69c1297da8084f3c37695dfccfe30c4b23f7607e39e55ba3bfd082c +dist/2025-06-24/cargo-beta-x86_64-unknown-illumos.tar.xz=471e9de6a783b7be80e44ad7626869ab06f03df9de00fdd35e9937607c259314 +dist/2025-06-24/cargo-beta-x86_64-unknown-linux-gnu.tar.gz=634d3c89c05ca3b9f4579dd607a2122b03a15b342e616bb62355d642c286dcac +dist/2025-06-24/cargo-beta-x86_64-unknown-linux-gnu.tar.xz=93eeaf15597a264f552c6d60d3d833f15503f6dcc7d909f4138e1daedd56bdd9 +dist/2025-06-24/cargo-beta-x86_64-unknown-linux-musl.tar.gz=e8711c3926302bf6e2647d19028716cbb6c77c2e858c6d452f61d2d0a65df559 +dist/2025-06-24/cargo-beta-x86_64-unknown-linux-musl.tar.xz=a34fc3ab20fecf5221014068128c9ca5806788d16b7c0e2b490ad2e611614388 +dist/2025-06-24/cargo-beta-x86_64-unknown-netbsd.tar.gz=7afdb8922a69f922fcfee48e8028e0541b66fd34c18dd64f38b76477efc4744b +dist/2025-06-24/cargo-beta-x86_64-unknown-netbsd.tar.xz=494e3e4648b22e285a763c190dc510ce5b75495da4184bf3feee3b77107a4df0 +dist/2025-06-24/clippy-beta-aarch64-apple-darwin.tar.gz=a8d3580790758c6bff3972a189c7e5f18472459c533368fcd9d04c40338166dd +dist/2025-06-24/clippy-beta-aarch64-apple-darwin.tar.xz=9af8d1dc8f8111e26aa509ada13561b19dbf3f47e3416faecc170abdb433cdc2 +dist/2025-06-24/clippy-beta-aarch64-pc-windows-msvc.tar.gz=866653887ddbb770d0acd843ab54bd688abd2f3a384bfafeaf47d0643d7c7be5 +dist/2025-06-24/clippy-beta-aarch64-pc-windows-msvc.tar.xz=62d0400196a347622b7cab566fe64a87082e94933d0d0f28c3f9d0b9682764b4 +dist/2025-06-24/clippy-beta-aarch64-unknown-linux-gnu.tar.gz=2659dd96831dfeabbe2f4806ec67a449dca2d3f950f705280a99da9d9e1fbb1b +dist/2025-06-24/clippy-beta-aarch64-unknown-linux-gnu.tar.xz=3325ddf5704811e48b1f50daea60961d18296ac1626e68828c9eb757e52cf65a +dist/2025-06-24/clippy-beta-aarch64-unknown-linux-musl.tar.gz=471b5577f82ceb6a1a5c7e017526835643472a30d51ac023c7a758ec77166691 +dist/2025-06-24/clippy-beta-aarch64-unknown-linux-musl.tar.xz=9d5a3296f07ba65b576ca4d3de09d26b476b390b876dc8c8e4eac2fff1270cc8 +dist/2025-06-24/clippy-beta-arm-unknown-linux-gnueabi.tar.gz=d2e1316aec639089a7d18ce41a9eb9c21317e25ba06c20f0551675a8aeebea43 +dist/2025-06-24/clippy-beta-arm-unknown-linux-gnueabi.tar.xz=027deae3f2518ef33f41055a8a11ebc32697bb3499cad98ae89a05d9c5bb354b +dist/2025-06-24/clippy-beta-arm-unknown-linux-gnueabihf.tar.gz=d041ee879d9489d4258541041478b3efd9c6a89dee97892378269cf2cd2896b5 +dist/2025-06-24/clippy-beta-arm-unknown-linux-gnueabihf.tar.xz=1f5a4a3cce223b750f271f1ab469939d00055795a752a0c88b1b49f00f2f42c0 +dist/2025-06-24/clippy-beta-armv7-unknown-linux-gnueabihf.tar.gz=acd1d67dfd4176d2fdec865b4027492f43be7aa1d0635e6777cc6862dd6e306c +dist/2025-06-24/clippy-beta-armv7-unknown-linux-gnueabihf.tar.xz=e79ba7baa995f160561868fe221267b1b2f448a932b518fafb3afaaaa1028b44 +dist/2025-06-24/clippy-beta-i686-pc-windows-gnu.tar.gz=ee9c369d91d58aac3894a40500e0c8b0c4136a82cc39b2e44c9524a8c6e0d7ca +dist/2025-06-24/clippy-beta-i686-pc-windows-gnu.tar.xz=ddee9ab89250fbfa7f45a5121cdad5cb1a2fcc010e4a5082392862f7c0033d45 +dist/2025-06-24/clippy-beta-i686-pc-windows-msvc.tar.gz=8ea4c8e4bb9ad9447cbf7c648f36378911d85985fcb5af13908a89180443cae0 +dist/2025-06-24/clippy-beta-i686-pc-windows-msvc.tar.xz=bd57be99cfa8eedd284d2bc93a5abf74368aae021e83a367e426e4be0193cbd2 +dist/2025-06-24/clippy-beta-i686-unknown-linux-gnu.tar.gz=973c76613f1d049708587b84006c408fd8c8d5cf308c572257e45b8e5e33bb4b +dist/2025-06-24/clippy-beta-i686-unknown-linux-gnu.tar.xz=b84d9b6918e18540e3073d66e9bc02845257fe2f1a39c9e62b44e81f2aae341d +dist/2025-06-24/clippy-beta-loongarch64-unknown-linux-gnu.tar.gz=dc4e842ce58fd07eb59cfdd870fa311f925e5efda1044bb51719bd250ff03cda +dist/2025-06-24/clippy-beta-loongarch64-unknown-linux-gnu.tar.xz=332e8549d7bedf4f97dd9b1cb8a5af47fc56374438e8878ebad2593bd36a48b6 +dist/2025-06-24/clippy-beta-loongarch64-unknown-linux-musl.tar.gz=d8181ee683bdd6831af1d882247353d2731ee08ffc0443a9cce0f6da44fc6b0d +dist/2025-06-24/clippy-beta-loongarch64-unknown-linux-musl.tar.xz=c7b0a21c55e36372cb1dabdacb58b45bd02827e08e6524dad97b74e6ed9de1c5 +dist/2025-06-24/clippy-beta-powerpc-unknown-linux-gnu.tar.gz=38f2a198a952bb7002fbea1ae9a12ffdfb54ec774e04848b7950bd13f17199de +dist/2025-06-24/clippy-beta-powerpc-unknown-linux-gnu.tar.xz=b4f5e016c5035cd2b70d4e3fbdf1d0ebcd0d1cc6f1d297bc04f99581a02febc5 +dist/2025-06-24/clippy-beta-powerpc64-unknown-linux-gnu.tar.gz=1beac7db7663f460e548f0efe9ef1737d114c6b8aa56ec81e536e170c21231a7 +dist/2025-06-24/clippy-beta-powerpc64-unknown-linux-gnu.tar.xz=0dbcfc800635438f803888caaf37677b424ef5a90cab81ceaac627bba7faf6b5 +dist/2025-06-24/clippy-beta-powerpc64le-unknown-linux-gnu.tar.gz=8c0dd34227e9b7a44ae8ed96be4110e10c01eafd46a7d050ab0121ca80f4fe09 +dist/2025-06-24/clippy-beta-powerpc64le-unknown-linux-gnu.tar.xz=7a56be9e5d58dbd2531d8c049fada5bdff5d98436afb63b92ddfc5f58d5835f9 +dist/2025-06-24/clippy-beta-powerpc64le-unknown-linux-musl.tar.gz=6bf5ed0793c38fed42974f8d0ae9442b926ac1072b3af08f97effbf32c5dfa54 +dist/2025-06-24/clippy-beta-powerpc64le-unknown-linux-musl.tar.xz=79adc7bbc8e4623c333ad3600305fce3c34fd35dcb026a654648707eef87cc6b +dist/2025-06-24/clippy-beta-riscv64gc-unknown-linux-gnu.tar.gz=1f881bf6585354c5abadf2e7f8ba50247b47de0c317ab61cfcc550cb6755de6a +dist/2025-06-24/clippy-beta-riscv64gc-unknown-linux-gnu.tar.xz=dcfa6d2fcfb96aed0ce6df6bf53cb8cdfe8529fb361cfaa78b92fc8773cc7446 +dist/2025-06-24/clippy-beta-s390x-unknown-linux-gnu.tar.gz=307884da83f8b77d2bde49a522d586e22c95febaca197d95380c7d60393ca948 +dist/2025-06-24/clippy-beta-s390x-unknown-linux-gnu.tar.xz=46db14272bd41ec2b89d146f8d200cf21b12bdb1183fbc303f8e8cebdf11080e +dist/2025-06-24/clippy-beta-sparcv9-sun-solaris.tar.gz=09fcd95262f04a5e858baf04f47dc02632cd6860a9e747daf78fe1aaf787153c +dist/2025-06-24/clippy-beta-sparcv9-sun-solaris.tar.xz=28905a71542485498261529d8cc4a2a47ebca4a9bbc8a2ffb22dc3ebb5ac96c6 +dist/2025-06-24/clippy-beta-x86_64-apple-darwin.tar.gz=884844e318557cfe8a2175795ffad57919eb88c3d5246893e47fdb0db6ff9046 +dist/2025-06-24/clippy-beta-x86_64-apple-darwin.tar.xz=4b8594e3f2945857c4316fa7a46eb8d8ad025ae9b87af58fbb7b6913f843b48a +dist/2025-06-24/clippy-beta-x86_64-pc-solaris.tar.gz=04a12879eb1fea5b646dfedda6f25bb349b1096d753137e41543f20bece4b6f8 +dist/2025-06-24/clippy-beta-x86_64-pc-solaris.tar.xz=4f3323454f0c53868637d98dae2d237b1d16857b18e8db40884e7c550ee1ca3e +dist/2025-06-24/clippy-beta-x86_64-pc-windows-gnu.tar.gz=81eca7c5978dff34526a1e3921e42785190efe0e5064e006c677b82b6cab783d +dist/2025-06-24/clippy-beta-x86_64-pc-windows-gnu.tar.xz=3f3fae70db224b98aa6d9ce38f35c31bccfecceb1c6111bf928008a545e93b48 +dist/2025-06-24/clippy-beta-x86_64-pc-windows-msvc.tar.gz=48ece2ad4610148df4dbf6c78c81c56eb66d3d3e9a8c08b8bec76b0abf640983 +dist/2025-06-24/clippy-beta-x86_64-pc-windows-msvc.tar.xz=b37de86534a8655cb41fac60c920d49ab3880b1ac4aeec124711fdeffb025052 +dist/2025-06-24/clippy-beta-x86_64-unknown-freebsd.tar.gz=140c8f99e13ec96256bbd50af6e8e3786885d718cdedadc2b2dc1d82cb3e5ab9 +dist/2025-06-24/clippy-beta-x86_64-unknown-freebsd.tar.xz=6f306a3fd1a920931393081ee431c7ab37f589bf7a449d36892e6b5945a71d80 +dist/2025-06-24/clippy-beta-x86_64-unknown-illumos.tar.gz=9faab86392b6d1ab0579f5ce61d94e2998357d2c8d82cb441d7a718ce52dd1a4 +dist/2025-06-24/clippy-beta-x86_64-unknown-illumos.tar.xz=ea03c88713cbe937d963a4f18e0cd5015aa2e5151e66cb3cb24eec76b56c4023 +dist/2025-06-24/clippy-beta-x86_64-unknown-linux-gnu.tar.gz=13fd137434d475440beae2ad047b58853e54d1063396ecaadae316fe81d761ab +dist/2025-06-24/clippy-beta-x86_64-unknown-linux-gnu.tar.xz=c3b96035b40c01c23256ad5b4c2ba876e84e8bc5cfdc6c14cfc9d4eaf57fd74b +dist/2025-06-24/clippy-beta-x86_64-unknown-linux-musl.tar.gz=2af28e2a0c1b8c6c41842b420251375dd2cd24a51cc0cfaf2de4bf3d49612a76 +dist/2025-06-24/clippy-beta-x86_64-unknown-linux-musl.tar.xz=e18561036958432a47c94c1b32202a3f843bf01b7a1edd61e51b835bee83d611 +dist/2025-06-24/clippy-beta-x86_64-unknown-netbsd.tar.gz=75ea015d2b9148d77ef7e060bee4b190cc73e7b117420f60abc77aac2a2aec7e +dist/2025-06-24/clippy-beta-x86_64-unknown-netbsd.tar.xz=0282575f3ea1476994940e0a97a5720bf4452be01e0360cab58eec12c0480699 +dist/2025-06-24/rustfmt-nightly-aarch64-apple-darwin.tar.gz=3432f8489fe400b73d3cb01e4e49fc3305a0e5207e81a88a6f28eeb189b889b3 +dist/2025-06-24/rustfmt-nightly-aarch64-apple-darwin.tar.xz=62fbf75889736832087badca386546bce580601d8a396be707ccab1c77fc8ad1 +dist/2025-06-24/rustfmt-nightly-aarch64-pc-windows-msvc.tar.gz=0b50197c8e1b988d1cf6bbeef055bfdce5b01efc07742ee85221c57b2d70e33e +dist/2025-06-24/rustfmt-nightly-aarch64-pc-windows-msvc.tar.xz=c555acf28f160f9b133c4e196305ac9e0f5b528a683690ea6980a457b3cd4184 +dist/2025-06-24/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.gz=54b7acb5fcedd0fb50161acf1977e62904cf55a74f98e8530f64b5459a7f04ec +dist/2025-06-24/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz=a96e42605d11c5220a0de5164f32522c884c61782075933f1e6eaab1bb4a41f4 +dist/2025-06-24/rustfmt-nightly-aarch64-unknown-linux-musl.tar.gz=d4b7d8e5fac122215f6d75654b9a60ddfd8057818ad5bff945a7823bfa17354e +dist/2025-06-24/rustfmt-nightly-aarch64-unknown-linux-musl.tar.xz=8cc5a0760dea509e435c0185f4c5a4a8d64515fb280808d18cc77d96632b4479 +dist/2025-06-24/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.gz=c0bd020fdcc8eed3b34ee7aa12181c56197df339fd84b1cda5386e4848c0b0aa +dist/2025-06-24/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.xz=eb521c9a78be2c814b76910dfeb8dcf233a9e1076c655f3c682f5b79fd1ec4c6 +dist/2025-06-24/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.gz=34a4b7f51c39e5b41496f085d85396ea3f95384315c0e184dc78da3f75c3478d +dist/2025-06-24/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.xz=a9da4962599db3fce8d5e31b0aeff681a05198d32838e9844b49de12af88217e +dist/2025-06-24/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.gz=27dab44d55602c98447d93a9f0e566e8f772c97c8322a7cb54144f9b6b29af71 +dist/2025-06-24/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.xz=1598d5d8612de93539b36e1a421b5f1ce97a71eee8a5a9ee85aa6e8e9d778fca +dist/2025-06-24/rustfmt-nightly-i686-pc-windows-gnu.tar.gz=a62d2f370fd9aa99152d66c0ce49ed2595f8e48b4ee40a95271bbd7a584410b3 +dist/2025-06-24/rustfmt-nightly-i686-pc-windows-gnu.tar.xz=e0378cd9afc1a9e6b6665b98a3a2c089e42bda56a855cd1d2011c14bc75e6886 +dist/2025-06-24/rustfmt-nightly-i686-pc-windows-msvc.tar.gz=f316d4b45a2d454ca2bac683d470794c80db84fcf6f809c20b11333035d6f2ab +dist/2025-06-24/rustfmt-nightly-i686-pc-windows-msvc.tar.xz=6e73b85d0fb10b77646db2cdc2ad236a8a5d0ed71761e171b00ddfa6b6d7cd83 +dist/2025-06-24/rustfmt-nightly-i686-unknown-linux-gnu.tar.gz=034eb9ed25935694ee0c530bb58bb0dd5586d7361f1f1356fb67af5e5c440c62 +dist/2025-06-24/rustfmt-nightly-i686-unknown-linux-gnu.tar.xz=0873543b725aa062f2c6dd00f2be3ea66dad56bfa2a25251f92c0d8b495eb9b7 +dist/2025-06-24/rustfmt-nightly-loongarch64-unknown-linux-gnu.tar.gz=7cd21e55b12d13de4f6a7678e89141476dc96523f91622da662672e3b967547a +dist/2025-06-24/rustfmt-nightly-loongarch64-unknown-linux-gnu.tar.xz=08c9a5e50cd50c2a5676ee49fbcb7b2a622c7823dd787f79ab1feee38ade84f9 +dist/2025-06-24/rustfmt-nightly-loongarch64-unknown-linux-musl.tar.gz=3e7ebe2cbd951ab9c9b4863aecaaf18ee09c200a1d58430d1bd6be788ac7c311 +dist/2025-06-24/rustfmt-nightly-loongarch64-unknown-linux-musl.tar.xz=76d79e2f26c19678a8191295563abc34c99ef971fd795cab8b690abb6afcc46a +dist/2025-06-24/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.gz=7f29b3b39f0d49fc6033006d8ff72fd9bf64ccdb9865f3654d06db46a62170d8 +dist/2025-06-24/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.xz=25e85b3608dd57fb997f58d0bd626d1148eacd51fcc62066c3dae2b4edf475fe +dist/2025-06-24/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.gz=2c6c869cdd36dbedcf8ec6b803f1cf737c2ef159ab0c7bad57f9fc1a9bbc944f +dist/2025-06-24/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.xz=2a6135517dea234a8cf1e1bc503133b232f053e6043818ea11a38a9133742a50 +dist/2025-06-24/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.gz=cd9957ba8ceee1cbbfc64c7d336cd14cf86d80d4e2f292300f1693b7f333c8c3 +dist/2025-06-24/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.xz=002a7a3286cb9794d6d9b4a4ad711ddb83cda8acc5150ed82ceedc04861a19a2 +dist/2025-06-24/rustfmt-nightly-powerpc64le-unknown-linux-musl.tar.gz=1a905ec7b06ac868f448ebf96c8ace4397e65a040c3c284b37446f95a2004bcc +dist/2025-06-24/rustfmt-nightly-powerpc64le-unknown-linux-musl.tar.xz=2f3ed860d7c5416a8ce8e7a9fbf3435d34653692adc153054af0044a3bc544d7 +dist/2025-06-24/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.gz=f2eaf7ae2de5bc3b1c66944cfe145c5005bbdfaa7f395751863eb62650cf6f80 +dist/2025-06-24/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.xz=4f646fe74c3a155837f2febdc720586a6bd03ebe93b130d042c4061012c36c62 +dist/2025-06-24/rustfmt-nightly-s390x-unknown-linux-gnu.tar.gz=cfea8bd86d79dd10200c80debd7b0a67c2f9e15aa32bbe293305b4cb1d4c140b +dist/2025-06-24/rustfmt-nightly-s390x-unknown-linux-gnu.tar.xz=82dc1b9dcbc2a16948c73aa11fa7faaa1cc156c70811a76c9ae6bae87527cf05 +dist/2025-06-24/rustfmt-nightly-sparcv9-sun-solaris.tar.gz=1c78e4dcda6625502ea55945e60c489afb321c015b4d5bf98f16df36e363c5e1 +dist/2025-06-24/rustfmt-nightly-sparcv9-sun-solaris.tar.xz=90d072b9f5e23252ff98808f878718dc0eafbd2f379c33814cf355bf824b91bf +dist/2025-06-24/rustfmt-nightly-x86_64-apple-darwin.tar.gz=fbc0a4f9b03caf6cef7b3b44f45e952b5f2386dabe27f6f57bb1d5a07e92b679 +dist/2025-06-24/rustfmt-nightly-x86_64-apple-darwin.tar.xz=334563dd55124add3f08e5ad0360870f7dacf643a2db10842da629e7b82d844b +dist/2025-06-24/rustfmt-nightly-x86_64-pc-solaris.tar.gz=70a974c74c4bbf14ad52dd91feba8adcc7821e650e78beb46f375fb23519d433 +dist/2025-06-24/rustfmt-nightly-x86_64-pc-solaris.tar.xz=851b15e50d9b02518bd82f4269d80c31eee4f5559a5c871af013272e9f6e68a8 +dist/2025-06-24/rustfmt-nightly-x86_64-pc-windows-gnu.tar.gz=5608ac9918b30cf05ad1110a7a2da3f051fb97da630a6ce34ddb02927e6dcff2 +dist/2025-06-24/rustfmt-nightly-x86_64-pc-windows-gnu.tar.xz=8fcb4f2159189af9d94253c1b92034f8fd18d2dbe6c2c72b172fefb6acd1bab7 +dist/2025-06-24/rustfmt-nightly-x86_64-pc-windows-msvc.tar.gz=e2e85fa9b30cea48a5ed0dbeee8a14dea4c16b31208fb1b884e4c1253bcc20fe +dist/2025-06-24/rustfmt-nightly-x86_64-pc-windows-msvc.tar.xz=cf11c5776728edf90ef7fec81f7f46d5edfa4d827629346f1b8cd1e00fb9b1c0 +dist/2025-06-24/rustfmt-nightly-x86_64-unknown-freebsd.tar.gz=5f8befb9ef7640b75d9c29955f3ced2a128015ca1f39bd24aab2ef2587a5fb99 +dist/2025-06-24/rustfmt-nightly-x86_64-unknown-freebsd.tar.xz=2a09a48f979bf762d465704bbb4f90cc1bf6b10a1d8b75434370b38dba91e62d +dist/2025-06-24/rustfmt-nightly-x86_64-unknown-illumos.tar.gz=e0be33a6c1272d885939469354e9d8a670a370408c2c3f1b095a9f36de514849 +dist/2025-06-24/rustfmt-nightly-x86_64-unknown-illumos.tar.xz=9ac7896342c3a2411b3dd68984c6a94d8cec52852c551745c363552e54767fb6 +dist/2025-06-24/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.gz=4adfe1a8ed77ee7f7aa17f4181e87f59482f7345735c939d181e86870ad4edef +dist/2025-06-24/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz=df97ab0f9a090b3a01b089ba8b259333c3e0cdc34a2cfb1f91d204a279b60783 +dist/2025-06-24/rustfmt-nightly-x86_64-unknown-linux-musl.tar.gz=ec13df06afe80f82ac7af36fb76461712ca6a5993a3935966c9dec9a9af15b74 +dist/2025-06-24/rustfmt-nightly-x86_64-unknown-linux-musl.tar.xz=db58fe88b3795306f08afc79b676c92397cbb5f49a934f764eab490826788ff5 +dist/2025-06-24/rustfmt-nightly-x86_64-unknown-netbsd.tar.gz=23f7bd79106676c6a26828e663a51b4c1450fd1097b684735a46ead2ff54a57c +dist/2025-06-24/rustfmt-nightly-x86_64-unknown-netbsd.tar.xz=d294f8ed438c068b6792f7ccdecf9716e08b927249728f4aac7064b983e71e5c +dist/2025-06-24/rustc-nightly-aarch64-apple-darwin.tar.gz=1f6dfb2fd4ef09e0889589747d239b5e1af57feb859d89efed7d30b9afc3e8e6 +dist/2025-06-24/rustc-nightly-aarch64-apple-darwin.tar.xz=1fcd2e30508b664208c236ff3b522a62c385197c9af4131b060d10b5a5b89d20 +dist/2025-06-24/rustc-nightly-aarch64-pc-windows-msvc.tar.gz=f0ddd8c974d8a0022260a193e16c045334c0526328604a4ad26b9efe6953de4a +dist/2025-06-24/rustc-nightly-aarch64-pc-windows-msvc.tar.xz=9274d4b17011713f9a7b050e89ef7626b8d24300456463d1c7d7a65f8be54039 +dist/2025-06-24/rustc-nightly-aarch64-unknown-linux-gnu.tar.gz=4155841d5101c2f7b65282c4b5b33146acfe1bffcf2c68d48c5b4ca31d73b663 +dist/2025-06-24/rustc-nightly-aarch64-unknown-linux-gnu.tar.xz=3547deb9ca8fcd638b0c17f9e3848034d4b9dc2a859581932e95344715058b21 +dist/2025-06-24/rustc-nightly-aarch64-unknown-linux-musl.tar.gz=b63dcf52528338728f5a29b51f7f38f99999fec061b2b9bd789e456cff0a16bf +dist/2025-06-24/rustc-nightly-aarch64-unknown-linux-musl.tar.xz=e77030ec0dfefa9ea571483c10a590c5d58f084fc8ce3e10031ce9cf503e9675 +dist/2025-06-24/rustc-nightly-arm-unknown-linux-gnueabi.tar.gz=a1da6251ad4cf9710382bb871d9400c0886fb17b2790477c4c2933c97bd1552e +dist/2025-06-24/rustc-nightly-arm-unknown-linux-gnueabi.tar.xz=96051a8bb8c0fc377d8fe8af861398c39bc21edd6e808977d728eddf6393ab8c +dist/2025-06-24/rustc-nightly-arm-unknown-linux-gnueabihf.tar.gz=fcb7eda9e1060cf4c4c702681d0a0ab6680f0e1875a7e0da2bde01f6b018e834 +dist/2025-06-24/rustc-nightly-arm-unknown-linux-gnueabihf.tar.xz=56217f3b73e8cbae769a0a20d2a01e1f2d474c67bc10f93e1a9f7c2d51da0ac1 +dist/2025-06-24/rustc-nightly-armv7-unknown-linux-gnueabihf.tar.gz=c02e586ee5732d8b89f4262333de9444f0cd48b897a51e8767e505abfe54921f +dist/2025-06-24/rustc-nightly-armv7-unknown-linux-gnueabihf.tar.xz=4d0eda5553deea639d39d2ad663d6f077b14f7216b99268bd787196475fd1205 +dist/2025-06-24/rustc-nightly-i686-pc-windows-gnu.tar.gz=1e9acd43dae9e1a199c96e6842869e1f3418d0167f93f9220fd937ee63363645 +dist/2025-06-24/rustc-nightly-i686-pc-windows-gnu.tar.xz=5e12380c2c8d2ec40ac8e6141c9ef9c9430928fcf2491bb46e27ca6529b7a779 +dist/2025-06-24/rustc-nightly-i686-pc-windows-msvc.tar.gz=fcba4f7b348d06d5ac602111a53de9767d394298eeebde41200780e73bb39c93 +dist/2025-06-24/rustc-nightly-i686-pc-windows-msvc.tar.xz=ce2b140a46faa99a96f9c02fa44481f6414e1d4bed94015dcc773a07b133e39b +dist/2025-06-24/rustc-nightly-i686-unknown-linux-gnu.tar.gz=eb57e8444762b11f88aac3217807c976a87e22dfdccb790c7ed1c30c445c033f +dist/2025-06-24/rustc-nightly-i686-unknown-linux-gnu.tar.xz=b0395824f59a07c311ecdef0cd54a2734eb84a7a817561eb157ab66f5b46b9be +dist/2025-06-24/rustc-nightly-loongarch64-unknown-linux-gnu.tar.gz=cd512e558d3cb27913cf79a188529d953b770452a3ec11d63c843424ddd04e6b +dist/2025-06-24/rustc-nightly-loongarch64-unknown-linux-gnu.tar.xz=8fb1c1c32ccc3b62f100dbfa151c70e86de571adcf215d978e0fbcf80448a555 +dist/2025-06-24/rustc-nightly-loongarch64-unknown-linux-musl.tar.gz=ec39e3ed4f93d4ce31c748b2109e921065106ff850540bfbd4584ada5c296b83 +dist/2025-06-24/rustc-nightly-loongarch64-unknown-linux-musl.tar.xz=600c2457caf6ae99502e96e2ad6021628611e4feea6e8498178e257fe4e3bf8a +dist/2025-06-24/rustc-nightly-powerpc-unknown-linux-gnu.tar.gz=6a91c5f05a167ffb7c32aa719422e816e592fcbc3f6da1d77e15df1360888133 +dist/2025-06-24/rustc-nightly-powerpc-unknown-linux-gnu.tar.xz=b8e935a3715139bc2d5fe89f08c8e2c7bf5e5cbe3ce555e0c6306bd4fc0d5c37 +dist/2025-06-24/rustc-nightly-powerpc64-unknown-linux-gnu.tar.gz=fc50b819def6bec22245776b01b1332086604a04170951a43713286c88a8ab06 +dist/2025-06-24/rustc-nightly-powerpc64-unknown-linux-gnu.tar.xz=07c23da71f7330c19cffb16866702341dab46a7cd3151b054a3020e16a72ef70 +dist/2025-06-24/rustc-nightly-powerpc64le-unknown-linux-gnu.tar.gz=b8c5f9a1868f6ef86630eab919aad9a8cbcec274badd85412d7a807d4539b648 +dist/2025-06-24/rustc-nightly-powerpc64le-unknown-linux-gnu.tar.xz=b555f6f3e5340a79766b652c686973d827a5e18676c2204880bfa76bd9b18379 +dist/2025-06-24/rustc-nightly-powerpc64le-unknown-linux-musl.tar.gz=78c4e13ec693969eef566a69845e167c881a2e3f1c668abe98511dc4e7ca4ce1 +dist/2025-06-24/rustc-nightly-powerpc64le-unknown-linux-musl.tar.xz=a4d67c535d135fc180a7cda7b012d67ed7b315aea2dacf875ece0d1364a573ff +dist/2025-06-24/rustc-nightly-riscv64gc-unknown-linux-gnu.tar.gz=dda2348abc72eec12707421751185c6d90e8751aed4e8b36df01becdce35ab24 +dist/2025-06-24/rustc-nightly-riscv64gc-unknown-linux-gnu.tar.xz=03fa26da35f92d2f1833e06da81fb0ccdf60feeab5189ffe789e81afa93fcfbb +dist/2025-06-24/rustc-nightly-s390x-unknown-linux-gnu.tar.gz=6e12884335ab012c78a4f672e143303cbda142a728a8379eedec97fba76f0f0c +dist/2025-06-24/rustc-nightly-s390x-unknown-linux-gnu.tar.xz=e235dd111abe60b11ab020618a5eddbcdc105c8ea63f91c886972d6298b38512 +dist/2025-06-24/rustc-nightly-sparcv9-sun-solaris.tar.gz=53fc8dfc78e01dfef45bdb840cfd46acbca64a6177448f47d8fce52db6eef224 +dist/2025-06-24/rustc-nightly-sparcv9-sun-solaris.tar.xz=99eb657c275896295e2dac5868a7209de64ea9edb951a4bbf1336afb105bb6e7 +dist/2025-06-24/rustc-nightly-x86_64-apple-darwin.tar.gz=3d08912e28645fef5177ded3979abd93b8d2c2f1b391035b4709f0411180d772 +dist/2025-06-24/rustc-nightly-x86_64-apple-darwin.tar.xz=ec77aa5e779fa33e21b39501e19c9ae4be2b3fceb31372b571da7e55ed6e5493 +dist/2025-06-24/rustc-nightly-x86_64-pc-solaris.tar.gz=3e6639d90cb9f79d3d7e484f127b9d2074163eb6d6b82ee8d05c025380677afc +dist/2025-06-24/rustc-nightly-x86_64-pc-solaris.tar.xz=7bc1294b1362773428bdb2604033658af83c9af75a4d986106d950fe2a6e7259 +dist/2025-06-24/rustc-nightly-x86_64-pc-windows-gnu.tar.gz=71d2ae019fb18e7b592a5a89e79256fd6cd77f594a8272a2d906ee0ad6a7c314 +dist/2025-06-24/rustc-nightly-x86_64-pc-windows-gnu.tar.xz=8592859eaf1453b98ff0d66e78bcc4507727df8b74e8019620f51ce61e2f0359 +dist/2025-06-24/rustc-nightly-x86_64-pc-windows-msvc.tar.gz=e85a7fdff5a848371da8ead8aa476e0bb966bbe7fa75f4fadea793a417ee2fd5 +dist/2025-06-24/rustc-nightly-x86_64-pc-windows-msvc.tar.xz=98ec37c80995927851cf2b4a47d520b2ee2a4431b0e31c117bc8df8dba813b15 +dist/2025-06-24/rustc-nightly-x86_64-unknown-freebsd.tar.gz=47885c0006351251d9db998bc8367d4ea59aa33798e35c40aad6dd804b057362 +dist/2025-06-24/rustc-nightly-x86_64-unknown-freebsd.tar.xz=8976ecfc666cdb9624b470e8f6d3fd6231d7e949663bea928775308ae89ae8c3 +dist/2025-06-24/rustc-nightly-x86_64-unknown-illumos.tar.gz=98b8058dbe9a783b4aa73678bb7efda29a5c13eefe332c873d265805eb9c7a4f +dist/2025-06-24/rustc-nightly-x86_64-unknown-illumos.tar.xz=30abf5c4c71353451a6c23fa02a9160b1d65fb5946e2166a5b3c5c77e9905906 +dist/2025-06-24/rustc-nightly-x86_64-unknown-linux-gnu.tar.gz=eeed224afbd20219b4f19c4a31f9cdcf9672af7d20ec3cd688d02764404f7cdc +dist/2025-06-24/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz=01e1f185c4a0c18b256b4d13e1eb8aff312a6969f630ce70411367454642fe4e +dist/2025-06-24/rustc-nightly-x86_64-unknown-linux-musl.tar.gz=4c57c6805d18f1bc53acce957c0b1279a1b0894efcf0f24c744b3765a82c59fd +dist/2025-06-24/rustc-nightly-x86_64-unknown-linux-musl.tar.xz=3da2e26f0fb0a94e3caac0385c82eab54e553eb9759723dfd601f5dc25a87906 +dist/2025-06-24/rustc-nightly-x86_64-unknown-netbsd.tar.gz=a1b2db0321e9b22c11eb0ae1a6ed052917600bbe18b46bf732fdb20a60cc0950 +dist/2025-06-24/rustc-nightly-x86_64-unknown-netbsd.tar.xz=306d96754bdfdadd4d1c2dd303f5db06f3e405b343210209c256d1b1862d47a5 From c388e6802f3db1bbe5c11907503b17667d3ec14b Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 24 Jun 2025 09:50:58 -0700 Subject: [PATCH 10/23] Update `STAGE0_MISSING_TARGETS` --- src/bootstrap/src/core/sanity.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs index 493f73b21fe15..dd529ee1d571a 100644 --- a/src/bootstrap/src/core/sanity.rs +++ b/src/bootstrap/src/core/sanity.rs @@ -34,8 +34,6 @@ pub struct Finder { // Targets can be removed from this list once they are present in the stage0 compiler (usually by updating the beta compiler of the bootstrap). const STAGE0_MISSING_TARGETS: &[&str] = &[ // just a dummy comment so the list doesn't get onelined - "loongarch32-unknown-none", - "loongarch32-unknown-none-softfloat", ]; /// Minimum version threshold for libstdc++ required when using prebuilt LLVM From 6cacbc7c4a8c0fc064cebd3346923661e3007f1b Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 24 Jun 2025 10:05:56 -0700 Subject: [PATCH 11/23] Update `cfg(bootstrap)` --- compiler/rustc_builtin_macros/src/lib.rs | 2 +- compiler/rustc_data_structures/src/aligned.rs | 3 +-- compiler/rustc_data_structures/src/flock.rs | 13 +------------ compiler/rustc_data_structures/src/lib.rs | 8 ++------ compiler/rustc_data_structures/src/marker.rs | 3 +-- .../rustc_data_structures/src/profiling.rs | 13 +------------ compiler/rustc_errors/src/lib.rs | 2 +- compiler/rustc_infer/src/lib.rs | 2 +- compiler/rustc_middle/src/lib.rs | 4 ++-- compiler/rustc_middle/src/ty/codec.rs | 4 ++-- compiler/rustc_middle/src/ty/context.rs | 3 +-- compiler/rustc_next_trait_solver/src/lib.rs | 2 +- compiler/rustc_serialize/src/lib.rs | 18 +----------------- compiler/rustc_serialize/src/serialize.rs | 6 +++--- compiler/rustc_smir/src/lib.rs | 2 +- compiler/rustc_smir/src/rustc_smir/mod.rs | 2 +- compiler/rustc_span/src/analyze_source_file.rs | 13 +------------ compiler/rustc_span/src/lib.rs | 3 +-- compiler/rustc_type_ir/src/lib.rs | 2 +- library/core/Cargo.toml | 2 -- library/rtstartup/rsbegin.rs | 17 ----------------- library/rtstartup/rsend.rs | 17 ----------------- library/std/Cargo.toml | 2 -- src/tools/miri/Cargo.toml | 1 - src/tools/miri/cargo-miri/src/phases.rs | 5 ----- src/tools/miri/src/concurrency/mod.rs | 13 +------------ src/tools/miri/src/lib.rs | 4 +--- src/tools/test-float-parse/src/lib.rs | 1 - src/tools/test-float-parse/src/traits.rs | 1 - 29 files changed, 26 insertions(+), 142 deletions(-) diff --git a/compiler/rustc_builtin_macros/src/lib.rs b/compiler/rustc_builtin_macros/src/lib.rs index 9b6dea2143854..0594f7e86c333 100644 --- a/compiler/rustc_builtin_macros/src/lib.rs +++ b/compiler/rustc_builtin_macros/src/lib.rs @@ -5,10 +5,10 @@ #![allow(internal_features)] #![allow(rustc::diagnostic_outside_of_impl)] #![allow(rustc::untranslatable_diagnostic)] -#![cfg_attr(not(bootstrap), feature(autodiff))] #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")] #![doc(rust_logo)] #![feature(assert_matches)] +#![feature(autodiff)] #![feature(box_patterns)] #![feature(decl_macro)] #![feature(if_let_guard)] diff --git a/compiler/rustc_data_structures/src/aligned.rs b/compiler/rustc_data_structures/src/aligned.rs index 111740e550920..bfc7556faf68c 100644 --- a/compiler/rustc_data_structures/src/aligned.rs +++ b/compiler/rustc_data_structures/src/aligned.rs @@ -1,7 +1,6 @@ +use std::marker::PointeeSized; use std::ptr::Alignment; -use rustc_serialize::PointeeSized; - /// Returns the ABI-required minimum alignment of a type in bytes. /// /// This is equivalent to [`align_of`], but also works for some unsized diff --git a/compiler/rustc_data_structures/src/flock.rs b/compiler/rustc_data_structures/src/flock.rs index 60ae7ad115aee..f33f6b7cac1ac 100644 --- a/compiler/rustc_data_structures/src/flock.rs +++ b/compiler/rustc_data_structures/src/flock.rs @@ -4,18 +4,7 @@ //! green/native threading. This is just a bare-bones enough solution for //! librustdoc, it is not production quality at all. -// cfg(bootstrap) -macro_rules! cfg_select_dispatch { - ($($tokens:tt)*) => { - #[cfg(bootstrap)] - cfg_match! { $($tokens)* } - - #[cfg(not(bootstrap))] - cfg_select! { $($tokens)* } - }; -} - -cfg_select_dispatch! { +cfg_select! { target_os = "linux" => { mod linux; use linux as imp; diff --git a/compiler/rustc_data_structures/src/lib.rs b/compiler/rustc_data_structures/src/lib.rs index 0431182e9e2ad..53178d09348d9 100644 --- a/compiler/rustc_data_structures/src/lib.rs +++ b/compiler/rustc_data_structures/src/lib.rs @@ -10,9 +10,6 @@ #![allow(internal_features)] #![allow(rustc::default_hash_types)] #![allow(rustc::potential_query_instability)] -#![cfg_attr(bootstrap, feature(cfg_match))] -#![cfg_attr(not(bootstrap), feature(cfg_select))] -#![cfg_attr(not(bootstrap), feature(sized_hierarchy))] #![deny(unsafe_op_in_unsafe_fn)] #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")] #![doc(rust_logo)] @@ -22,6 +19,7 @@ #![feature(ascii_char_variants)] #![feature(assert_matches)] #![feature(auto_traits)] +#![feature(cfg_select)] #![feature(core_intrinsics)] #![feature(dropck_eyepatch)] #![feature(extend_one)] @@ -33,6 +31,7 @@ #![feature(ptr_alignment_type)] #![feature(rustc_attrs)] #![feature(rustdoc_internals)] +#![feature(sized_hierarchy)] #![feature(test)] #![feature(thread_id_value)] #![feature(type_alias_impl_trait)] @@ -44,9 +43,6 @@ use std::fmt; pub use atomic_ref::AtomicRef; pub use ena::{snapshot_vec, undo_log, unify}; pub use rustc_index::static_assert_size; -// re-exported for `rustc_smir` -// FIXME(sized_hierarchy): remove with `cfg(bootstrap)`, see `rustc_serialize/src/lib.rs` -pub use rustc_serialize::PointeeSized; pub mod aligned; pub mod base_n; diff --git a/compiler/rustc_data_structures/src/marker.rs b/compiler/rustc_data_structures/src/marker.rs index 4846bc997f13f..2be9ba292f976 100644 --- a/compiler/rustc_data_structures/src/marker.rs +++ b/compiler/rustc_data_structures/src/marker.rs @@ -1,6 +1,5 @@ use std::alloc::Allocator; - -use rustc_serialize::PointeeSized; +use std::marker::PointeeSized; #[diagnostic::on_unimplemented(message = "`{Self}` doesn't implement `DynSend`. \ Add it to `rustc_data_structures::marker` or use `IntoDynSyncSend` if it's already `Send`")] diff --git a/compiler/rustc_data_structures/src/profiling.rs b/compiler/rustc_data_structures/src/profiling.rs index e3a01e4035c49..36649a3607070 100644 --- a/compiler/rustc_data_structures/src/profiling.rs +++ b/compiler/rustc_data_structures/src/profiling.rs @@ -859,19 +859,8 @@ fn get_thread_id() -> u32 { std::thread::current().id().as_u64().get() as u32 } -// cfg(bootstrap) -macro_rules! cfg_select_dispatch { - ($($tokens:tt)*) => { - #[cfg(bootstrap)] - cfg_match! { $($tokens)* } - - #[cfg(not(bootstrap))] - cfg_select! { $($tokens)* } - }; -} - // Memory reporting -cfg_select_dispatch! { +cfg_select! { windows => { pub fn get_resident_set_size() -> Option { use windows::{ diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 207aed8c75545..69ad15c608162 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -6,8 +6,8 @@ #![allow(incomplete_features)] #![allow(internal_features)] #![allow(rustc::diagnostic_outside_of_impl)] +#![allow(rustc::direct_use_of_rustc_type_ir)] #![allow(rustc::untranslatable_diagnostic)] -#![cfg_attr(not(bootstrap), allow(rustc::direct_use_of_rustc_type_ir))] #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")] #![doc(rust_logo)] #![feature(array_windows)] diff --git a/compiler/rustc_infer/src/lib.rs b/compiler/rustc_infer/src/lib.rs index 18cee03ba2e87..285e2912937c6 100644 --- a/compiler/rustc_infer/src/lib.rs +++ b/compiler/rustc_infer/src/lib.rs @@ -15,8 +15,8 @@ // tidy-alphabetical-start #![allow(internal_features)] #![allow(rustc::diagnostic_outside_of_impl)] +#![allow(rustc::direct_use_of_rustc_type_ir)] #![allow(rustc::untranslatable_diagnostic)] -#![cfg_attr(not(bootstrap), allow(rustc::direct_use_of_rustc_type_ir))] #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")] #![doc(rust_logo)] #![feature(assert_matches)] diff --git a/compiler/rustc_middle/src/lib.rs b/compiler/rustc_middle/src/lib.rs index ce2cb33c17366..c81a2d136c5c0 100644 --- a/compiler/rustc_middle/src/lib.rs +++ b/compiler/rustc_middle/src/lib.rs @@ -27,9 +27,8 @@ // tidy-alphabetical-start #![allow(internal_features)] #![allow(rustc::diagnostic_outside_of_impl)] +#![allow(rustc::direct_use_of_rustc_type_ir)] #![allow(rustc::untranslatable_diagnostic)] -#![cfg_attr(not(bootstrap), allow(rustc::direct_use_of_rustc_type_ir))] -#![cfg_attr(not(bootstrap), feature(sized_hierarchy))] #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")] #![doc(rust_logo)] #![feature(allocator_api)] @@ -56,6 +55,7 @@ #![feature(round_char_boundary)] #![feature(rustc_attrs)] #![feature(rustdoc_internals)] +#![feature(sized_hierarchy)] #![feature(try_blocks)] #![feature(try_trait_v2)] #![feature(try_trait_v2_yeet)] diff --git a/compiler/rustc_middle/src/ty/codec.rs b/compiler/rustc_middle/src/ty/codec.rs index 3d7965f6cfecd..335b889b14dc1 100644 --- a/compiler/rustc_middle/src/ty/codec.rs +++ b/compiler/rustc_middle/src/ty/codec.rs @@ -8,12 +8,12 @@ use std::hash::Hash; use std::intrinsics; -use std::marker::DiscriminantKind; +use std::marker::{DiscriminantKind, PointeeSized}; use rustc_abi::{FieldIdx, VariantIdx}; use rustc_data_structures::fx::FxHashMap; use rustc_hir::def_id::LocalDefId; -use rustc_serialize::{Decodable, Encodable, PointeeSized}; +use rustc_serialize::{Decodable, Encodable}; use rustc_span::source_map::Spanned; use rustc_span::{Span, SpanDecoder, SpanEncoder}; diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index c5f4b95cbbe61..584e051d3598f 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -10,7 +10,7 @@ use std::cmp::Ordering; use std::env::VarError; use std::ffi::OsStr; use std::hash::{Hash, Hasher}; -use std::marker::PhantomData; +use std::marker::{PhantomData, PointeeSized}; use std::ops::{Bound, Deref}; use std::sync::{Arc, OnceLock}; use std::{fmt, iter, mem}; @@ -43,7 +43,6 @@ use rustc_macros::{HashStable, TyDecodable, TyEncodable}; use rustc_query_system::cache::WithDepNode; use rustc_query_system::dep_graph::DepNodeIndex; use rustc_query_system::ich::StableHashingContext; -use rustc_serialize::PointeeSized; use rustc_serialize::opaque::{FileEncodeResult, FileEncoder}; use rustc_session::config::CrateType; use rustc_session::cstore::{CrateStoreDyn, Untracked}; diff --git a/compiler/rustc_next_trait_solver/src/lib.rs b/compiler/rustc_next_trait_solver/src/lib.rs index e3f42c181fa28..d3965e14c68a8 100644 --- a/compiler/rustc_next_trait_solver/src/lib.rs +++ b/compiler/rustc_next_trait_solver/src/lib.rs @@ -5,9 +5,9 @@ //! So if you got to this crate from the old solver, it's totally normal. // tidy-alphabetical-start +#![allow(rustc::direct_use_of_rustc_type_ir)] #![allow(rustc::usage_of_type_ir_inherent)] #![allow(rustc::usage_of_type_ir_traits)] -#![cfg_attr(not(bootstrap), allow(rustc::direct_use_of_rustc_type_ir))] // tidy-alphabetical-end pub mod canonicalizer; diff --git a/compiler/rustc_serialize/src/lib.rs b/compiler/rustc_serialize/src/lib.rs index 656ecfcab362e..806d880b19c5a 100644 --- a/compiler/rustc_serialize/src/lib.rs +++ b/compiler/rustc_serialize/src/lib.rs @@ -3,7 +3,6 @@ // tidy-alphabetical-start #![allow(internal_features)] #![allow(rustc::internal)] -#![cfg_attr(not(bootstrap), feature(sized_hierarchy))] #![cfg_attr(test, feature(test))] #![doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/", @@ -15,6 +14,7 @@ #![feature(min_specialization)] #![feature(never_type)] #![feature(rustdoc_internals)] +#![feature(sized_hierarchy)] // tidy-alphabetical-end // Allows macros to refer to this crate as `::rustc_serialize`. @@ -28,19 +28,3 @@ mod serialize; pub mod int_overflow; pub mod leb128; pub mod opaque; - -// This has nothing to do with `rustc_serialize` but it is convenient to define it in one place -// for the rest of the compiler so that `cfg(bootstrap)` doesn't need to be littered throughout -// the compiler wherever `PointeeSized` would be used. `rustc_serialize` happens to be the deepest -// crate in the crate graph which uses `PointeeSized`. -// -// When bootstrap bumps, remove both the `cfg(not(bootstrap))` and `cfg(bootstrap)` lines below -// and just import `std::marker::PointeeSized` whereever this item was used. - -#[cfg(not(bootstrap))] -pub use std::marker::PointeeSized; - -#[cfg(bootstrap)] -pub trait PointeeSized {} -#[cfg(bootstrap)] -impl PointeeSized for T {} diff --git a/compiler/rustc_serialize/src/serialize.rs b/compiler/rustc_serialize/src/serialize.rs index 8940d10696d16..f4f59993f5112 100644 --- a/compiler/rustc_serialize/src/serialize.rs +++ b/compiler/rustc_serialize/src/serialize.rs @@ -4,7 +4,7 @@ use std::borrow::Cow; use std::cell::{Cell, RefCell}; use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet, VecDeque}; use std::hash::{BuildHasher, Hash}; -use std::marker::PhantomData; +use std::marker::{PhantomData, PointeeSized}; use std::num::NonZero; use std::path; use std::rc::Rc; @@ -142,7 +142,7 @@ pub trait Decoder { /// `rustc_metadata::rmeta::Lazy`. /// * `TyEncodable` should be used for types that are only serialized in crate /// metadata or the incremental cache. This is most types in `rustc_middle`. -pub trait Encodable: crate::PointeeSized { +pub trait Encodable: PointeeSized { fn encode(&self, s: &mut S); } @@ -198,7 +198,7 @@ direct_serialize_impls! { char emit_char read_char } -impl Encodable for &T +impl Encodable for &T where T: Encodable, { diff --git a/compiler/rustc_smir/src/lib.rs b/compiler/rustc_smir/src/lib.rs index 63623cfad72b5..067adda791de9 100644 --- a/compiler/rustc_smir/src/lib.rs +++ b/compiler/rustc_smir/src/lib.rs @@ -9,13 +9,13 @@ // tidy-alphabetical-start #![allow(internal_features)] #![allow(rustc::usage_of_ty_tykind)] -#![cfg_attr(not(bootstrap), feature(sized_hierarchy))] #![doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/", test(attr(allow(unused_variables), deny(warnings))) )] #![doc(rust_logo)] #![feature(rustdoc_internals)] +#![feature(sized_hierarchy)] // tidy-alphabetical-end pub mod rustc_internal; diff --git a/compiler/rustc_smir/src/rustc_smir/mod.rs b/compiler/rustc_smir/src/rustc_smir/mod.rs index 64fe181c26d48..26de9b0a4960f 100644 --- a/compiler/rustc_smir/src/rustc_smir/mod.rs +++ b/compiler/rustc_smir/src/rustc_smir/mod.rs @@ -7,9 +7,9 @@ //! //! For now, we are developing everything inside `rustc`, thus, we keep this module private. +use std::marker::PointeeSized; use std::ops::RangeInclusive; -use rustc_data_structures::PointeeSized; use rustc_hir::def::DefKind; use rustc_middle::mir; use rustc_middle::mir::interpret::AllocId; diff --git a/compiler/rustc_span/src/analyze_source_file.rs b/compiler/rustc_span/src/analyze_source_file.rs index 55d899c9ada6d..c32593a6d95ab 100644 --- a/compiler/rustc_span/src/analyze_source_file.rs +++ b/compiler/rustc_span/src/analyze_source_file.rs @@ -29,18 +29,7 @@ pub(crate) fn analyze_source_file(src: &str) -> (Vec, Vec { - #[cfg(bootstrap)] - cfg_match! { $($tokens)* } - - #[cfg(not(bootstrap))] - cfg_select! { $($tokens)* } - }; -} - -cfg_select_dispatch! { +cfg_select! { any(target_arch = "x86", target_arch = "x86_64") => { fn analyze_source_file_dispatch( src: &str, diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs index c8a29a2f68fd9..8ba61226c78fb 100644 --- a/compiler/rustc_span/src/lib.rs +++ b/compiler/rustc_span/src/lib.rs @@ -17,11 +17,10 @@ // tidy-alphabetical-start #![allow(internal_features)] -#![cfg_attr(bootstrap, feature(cfg_match))] -#![cfg_attr(not(bootstrap), feature(cfg_select))] #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")] #![doc(rust_logo)] #![feature(array_windows)] +#![feature(cfg_select)] #![feature(core_io_borrowed_buf)] #![feature(if_let_guard)] #![feature(map_try_insert)] diff --git a/compiler/rustc_type_ir/src/lib.rs b/compiler/rustc_type_ir/src/lib.rs index 3863a6d7c5a85..a483c18813b03 100644 --- a/compiler/rustc_type_ir/src/lib.rs +++ b/compiler/rustc_type_ir/src/lib.rs @@ -1,5 +1,6 @@ #![cfg_attr(feature = "nightly", rustc_diagnostic_item = "type_ir")] // tidy-alphabetical-start +#![allow(rustc::direct_use_of_rustc_type_ir)] #![allow(rustc::usage_of_ty_tykind)] #![allow(rustc::usage_of_type_ir_inherent)] #![allow(rustc::usage_of_type_ir_traits)] @@ -8,7 +9,6 @@ feature(associated_type_defaults, never_type, rustc_attrs, negative_impls) )] #![cfg_attr(feature = "nightly", allow(internal_features))] -#![cfg_attr(not(bootstrap), allow(rustc::direct_use_of_rustc_type_ir))] // tidy-alphabetical-end extern crate self as rustc_type_ir; diff --git a/library/core/Cargo.toml b/library/core/Cargo.toml index 5d65b55bcdabe..f88661ee00151 100644 --- a/library/core/Cargo.toml +++ b/library/core/Cargo.toml @@ -29,8 +29,6 @@ debug_typeid = [] [lints.rust.unexpected_cfgs] level = "warn" check-cfg = [ - # #[cfg(bootstrap)] loongarch32 - 'cfg(target_arch, values("loongarch32"))', 'cfg(no_fp_fmt_parse)', # core use #[path] imports to portable-simd `core_simd` crate # and to stdarch `core_arch` crate which messes-up with Cargo list diff --git a/library/rtstartup/rsbegin.rs b/library/rtstartup/rsbegin.rs index 0e915b92697f1..62d247fafb7ad 100644 --- a/library/rtstartup/rsbegin.rs +++ b/library/rtstartup/rsbegin.rs @@ -21,18 +21,12 @@ #![allow(internal_features)] #![warn(unreachable_pub)] -#[cfg(not(bootstrap))] #[lang = "pointee_sized"] pub trait PointeeSized {} -#[cfg(not(bootstrap))] #[lang = "meta_sized"] pub trait MetaSized: PointeeSized {} -#[cfg(bootstrap)] -#[lang = "sized"] -pub trait Sized {} -#[cfg(not(bootstrap))] #[lang = "sized"] pub trait Sized: MetaSized {} @@ -43,19 +37,8 @@ trait Copy {} #[lang = "freeze"] auto trait Freeze {} -#[cfg(bootstrap)] -impl Copy for *mut T {} -#[cfg(not(bootstrap))] impl Copy for *mut T {} -#[cfg(bootstrap)] -#[lang = "drop_in_place"] -#[inline] -#[allow(unconditional_recursion)] -pub unsafe fn drop_in_place(to_drop: *mut T) { - drop_in_place(to_drop); -} -#[cfg(not(bootstrap))] #[lang = "drop_in_place"] #[inline] #[allow(unconditional_recursion)] diff --git a/library/rtstartup/rsend.rs b/library/rtstartup/rsend.rs index 75f9212695d1f..d763971445069 100644 --- a/library/rtstartup/rsend.rs +++ b/library/rtstartup/rsend.rs @@ -8,18 +8,12 @@ #![allow(internal_features)] #![warn(unreachable_pub)] -#[cfg(not(bootstrap))] #[lang = "pointee_sized"] pub trait PointeeSized {} -#[cfg(not(bootstrap))] #[lang = "meta_sized"] pub trait MetaSized: PointeeSized {} -#[cfg(bootstrap)] -#[lang = "sized"] -pub trait Sized {} -#[cfg(not(bootstrap))] #[lang = "sized"] pub trait Sized: MetaSized {} @@ -31,19 +25,8 @@ trait Copy {} #[lang = "freeze"] auto trait Freeze {} -#[cfg(bootstrap)] -impl Copy for *mut T {} -#[cfg(not(bootstrap))] impl Copy for *mut T {} -#[cfg(bootstrap)] -#[lang = "drop_in_place"] -#[inline] -#[allow(unconditional_recursion)] -pub unsafe fn drop_in_place(to_drop: *mut T) { - drop_in_place(to_drop); -} -#[cfg(not(bootstrap))] #[lang = "drop_in_place"] #[inline] #[allow(unconditional_recursion)] diff --git a/library/std/Cargo.toml b/library/std/Cargo.toml index ae7107938f363..566e0f71f9f67 100644 --- a/library/std/Cargo.toml +++ b/library/std/Cargo.toml @@ -157,8 +157,6 @@ test = true [lints.rust.unexpected_cfgs] level = "warn" check-cfg = [ - # #[cfg(bootstrap)] loongarch32 - 'cfg(target_arch, values("loongarch32"))', # std use #[path] imports to portable-simd `std_float` crate # and to the `backtrace` crate which messes-up with Cargo list # of declared features, we therefor expect any feature cfg diff --git a/src/tools/miri/Cargo.toml b/src/tools/miri/Cargo.toml index a314488bb2533..dbaf15bd0dbd4 100644 --- a/src/tools/miri/Cargo.toml +++ b/src/tools/miri/Cargo.toml @@ -64,7 +64,6 @@ stack-cache-consistency-check = ["stack-cache"] [lints.rust.unexpected_cfgs] level = "warn" -check-cfg = ['cfg(bootstrap)'] # Be aware that this file is inside a workspace when used via the # submodule in the rustc repo. That means there are many cargo features diff --git a/src/tools/miri/cargo-miri/src/phases.rs b/src/tools/miri/cargo-miri/src/phases.rs index a5e019a8ea972..b72b974bdbdd6 100644 --- a/src/tools/miri/cargo-miri/src/phases.rs +++ b/src/tools/miri/cargo-miri/src/phases.rs @@ -176,11 +176,6 @@ pub fn phase_cargo_miri(mut args: impl Iterator) { // Set `--target-dir` to `miri` inside the original target directory. let target_dir = get_target_dir(&metadata); cmd.arg("--target-dir").arg(target_dir); - // Only when running in x.py (where we are running with beta cargo): set `RUSTC_STAGE`. - // Will have to be removed on next bootstrap bump. tag: cfg(bootstrap). - if env::var_os("RUSTC_STAGE").is_some() { - cmd.arg("-Zdoctest-xcompile"); - } // *After* we set all the flags that need setting, forward everything else. Make sure to skip // `--target-dir` (which would otherwise be set twice). diff --git a/src/tools/miri/src/concurrency/mod.rs b/src/tools/miri/src/concurrency/mod.rs index aaa3fc85a6ccd..17d0f3f5ff67e 100644 --- a/src/tools/miri/src/concurrency/mod.rs +++ b/src/tools/miri/src/concurrency/mod.rs @@ -8,19 +8,8 @@ pub mod thread; mod vector_clock; pub mod weak_memory; -// cfg(bootstrap) -macro_rules! cfg_select_dispatch { - ($($tokens:tt)*) => { - #[cfg(bootstrap)] - cfg_match! { $($tokens)* } - - #[cfg(not(bootstrap))] - cfg_select! { $($tokens)* } - }; -} - // Import either the real genmc adapter or a dummy module. -cfg_select_dispatch! { +cfg_select! { feature = "genmc" => { mod genmc; pub use self::genmc::{GenmcCtx, GenmcConfig}; diff --git a/src/tools/miri/src/lib.rs b/src/tools/miri/src/lib.rs index e96c81d5b1d16..60ea3eb061356 100644 --- a/src/tools/miri/src/lib.rs +++ b/src/tools/miri/src/lib.rs @@ -1,5 +1,4 @@ -#![cfg_attr(bootstrap, feature(cfg_match))] -#![cfg_attr(not(bootstrap), feature(cfg_select))] +#![feature(cfg_select)] #![feature(rustc_private)] #![feature(float_gamma)] #![feature(float_erf)] @@ -16,7 +15,6 @@ #![feature(unqualified_local_imports)] #![feature(derive_coerce_pointee)] #![feature(arbitrary_self_types)] -#![cfg_attr(bootstrap, feature(file_lock))] // Configure clippy and other lints #![allow( clippy::collapsible_else_if, diff --git a/src/tools/test-float-parse/src/lib.rs b/src/tools/test-float-parse/src/lib.rs index f590149523bd7..0bd4878f9a626 100644 --- a/src/tools/test-float-parse/src/lib.rs +++ b/src/tools/test-float-parse/src/lib.rs @@ -119,7 +119,6 @@ pub fn register_tests(cfg: &Config) -> Vec { // Register normal generators for all floats. - #[cfg(not(bootstrap))] #[cfg(target_has_reliable_f16)] register_float::(&mut tests, cfg); register_float::(&mut tests, cfg); diff --git a/src/tools/test-float-parse/src/traits.rs b/src/tools/test-float-parse/src/traits.rs index 16484f8fe2c23..65a8721bfa5cd 100644 --- a/src/tools/test-float-parse/src/traits.rs +++ b/src/tools/test-float-parse/src/traits.rs @@ -170,7 +170,6 @@ macro_rules! impl_float { impl_float!(f32, u32; f64, u64); -#[cfg(not(bootstrap))] #[cfg(target_has_reliable_f16)] impl_float!(f16, u16); From 18f4cb11108bbb3119d4ba2a7eb06c80adf6a438 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 1 Apr 2025 14:05:36 +0000 Subject: [PATCH 12/23] Extract const boundness parsing out into a method --- compiler/rustc_parse/src/parser/ty.rs | 28 +++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/compiler/rustc_parse/src/parser/ty.rs b/compiler/rustc_parse/src/parser/ty.rs index 620a34044d12e..aa51b550426a8 100644 --- a/compiler/rustc_parse/src/parser/ty.rs +++ b/compiler/rustc_parse/src/parser/ty.rs @@ -995,18 +995,7 @@ impl<'a> Parser<'a> { /// See `parse_generic_ty_bound` for the complete grammar of trait bound modifiers. fn parse_trait_bound_modifiers(&mut self) -> PResult<'a, TraitBoundModifiers> { let modifier_lo = self.token.span; - let constness = if self.eat(exp!(Tilde)) { - let tilde = self.prev_token.span; - self.expect_keyword(exp!(Const))?; - let span = tilde.to(self.prev_token.span); - self.psess.gated_spans.gate(sym::const_trait_impl, span); - BoundConstness::Maybe(span) - } else if self.eat_keyword(exp!(Const)) { - self.psess.gated_spans.gate(sym::const_trait_impl, self.prev_token.span); - BoundConstness::Always(self.prev_token.span) - } else { - BoundConstness::Never - }; + let constness = self.parse_bound_constness()?; let asyncness = if self.token_uninterpolated_span().at_least_rust_2018() && self.eat_keyword(exp!(Async)) @@ -1068,6 +1057,21 @@ impl<'a> Parser<'a> { Ok(TraitBoundModifiers { constness, asyncness, polarity }) } + fn parse_bound_constness(&mut self) -> PResult<'a, BoundConstness> { + Ok(if self.eat(exp!(Tilde)) { + let tilde = self.prev_token.span; + self.expect_keyword(exp!(Const))?; + let span = tilde.to(self.prev_token.span); + self.psess.gated_spans.gate(sym::const_trait_impl, span); + BoundConstness::Maybe(span) + } else if self.eat_keyword(exp!(Const)) { + self.psess.gated_spans.gate(sym::const_trait_impl, self.prev_token.span); + BoundConstness::Always(self.prev_token.span) + } else { + BoundConstness::Never + }) + } + /// Parses a type bound according to: /// ```ebnf /// TY_BOUND = TY_BOUND_NOPAREN | (TY_BOUND_NOPAREN) From e0f8e865dbf9f1dc9d1d917efc04320e2eb123f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Tue, 24 Jun 2025 15:51:08 +0200 Subject: [PATCH 13/23] Skip unnecessary components in x64 try builds --- src/tools/opt-dist/src/exec.rs | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/tools/opt-dist/src/exec.rs b/src/tools/opt-dist/src/exec.rs index 64ce5cc377522..75569eacacdea 100644 --- a/src/tools/opt-dist/src/exec.rs +++ b/src/tools/opt-dist/src/exec.rs @@ -113,7 +113,7 @@ impl Bootstrap { "library/std", ]) .env("RUST_BACKTRACE", "full"); - let cmd = add_shared_x_flags(env, cmd); + let mut cmd = add_shared_x_flags(env, cmd); Self { cmd, metrics_path } } @@ -122,7 +122,12 @@ impl Bootstrap { let metrics_path = env.build_root().join("build").join("metrics.json"); let args = dist_args.iter().map(|arg| arg.as_str()).collect::>(); let cmd = cmd(&args).env("RUST_BACKTRACE", "full"); - let cmd = add_shared_x_flags(env, cmd); + let mut cmd = add_shared_x_flags(env, cmd); + if env.is_fast_try_build() { + // We set build.extended=false for fast try builds, but we still need Cargo + cmd = cmd.arg("cargo"); + } + Self { cmd, metrics_path } } @@ -188,6 +193,19 @@ impl Bootstrap { } } -fn add_shared_x_flags(env: &Environment, cmd: CmdBuilder) -> CmdBuilder { - if env.is_fast_try_build() { cmd.arg("--set").arg("rust.deny-warnings=false") } else { cmd } +fn add_shared_x_flags(env: &Environment, mut cmd: CmdBuilder) -> CmdBuilder { + if env.is_fast_try_build() { + // Skip things that cannot be skipped through `x ... --skip` + cmd.arg("--set") + .arg("rust.llvm-bitcode-linker=false") + // Skip wasm-component-ld. This also skips cargo, which we need to re-enable for dist + .arg("--set") + .arg("build.extended=false") + .arg("--set") + .arg("rust.codegen-backends=['llvm']") + .arg("--set") + .arg("rust.deny-warnings=false") + } else { + cmd + } } From 25dee4e56e0ad075044e7e465ae513086c78f45a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Tue, 24 Jun 2025 15:57:25 +0200 Subject: [PATCH 14/23] Skip more dist components --- src/tools/opt-dist/src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tools/opt-dist/src/main.rs b/src/tools/opt-dist/src/main.rs index d2827ec01ca7d..9c8a6637a3b10 100644 --- a/src/tools/opt-dist/src/main.rs +++ b/src/tools/opt-dist/src/main.rs @@ -407,13 +407,18 @@ fn main() -> anyhow::Result<()> { for target in [ "rust-docs", "rustc-docs", + "rustc-dev", + "rust-dev", "rust-docs-json", "rust-analyzer", "rustc-src", + "extended", "clippy", "miri", "rustfmt", "gcc", + "generate-copyright", + "bootstrap", ] { build_args.extend(["--skip".to_string(), target.to_string()]); } From 803415478cfc69d9e6c02b313560d6a2e433e0f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Tue, 24 Jun 2025 16:04:56 +0200 Subject: [PATCH 15/23] Do not build GCC in fast try builds --- src/ci/docker/host-x86_64/dist-x86_64-linux/dist.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/dist.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/dist.sh index 064ac5b0a5e42..924bdbc761505 100755 --- a/src/ci/docker/host-x86_64/dist-x86_64-linux/dist.sh +++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/dist.sh @@ -10,4 +10,7 @@ python3 ../x.py build --set rust.debug=true opt-dist build-manifest bootstrap # Use GCC for building GCC, as it seems to behave badly when built with Clang -CC=/rustroot/bin/cc CXX=/rustroot/bin/c++ python3 ../x.py dist gcc +# Only build GCC on full builds, not try builds +if [ "${DIST_TRY_BUILD:-0}" == "0" ]; then + CC=/rustroot/bin/cc CXX=/rustroot/bin/c++ python3 ../x.py dist gcc +fi From 58bc1dcb73b75d8fd0117d76e9a9f61ff297cd4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Wed, 25 Jun 2025 16:24:30 +0200 Subject: [PATCH 16/23] Remove `mut` --- src/tools/opt-dist/src/exec.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/opt-dist/src/exec.rs b/src/tools/opt-dist/src/exec.rs index 75569eacacdea..0dc6e56b9d5f4 100644 --- a/src/tools/opt-dist/src/exec.rs +++ b/src/tools/opt-dist/src/exec.rs @@ -113,7 +113,7 @@ impl Bootstrap { "library/std", ]) .env("RUST_BACKTRACE", "full"); - let mut cmd = add_shared_x_flags(env, cmd); + let cmd = add_shared_x_flags(env, cmd); Self { cmd, metrics_path } } @@ -193,7 +193,7 @@ impl Bootstrap { } } -fn add_shared_x_flags(env: &Environment, mut cmd: CmdBuilder) -> CmdBuilder { +fn add_shared_x_flags(env: &Environment, cmd: CmdBuilder) -> CmdBuilder { if env.is_fast_try_build() { // Skip things that cannot be skipped through `x ... --skip` cmd.arg("--set") From eb7245a864613f290c5668f4f4e8376edd065dc6 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 11 Mar 2025 12:08:45 +0000 Subject: [PATCH 17/23] Change const trait bound syntax from ~const to [const] --- compiler/rustc_ast/src/ast.rs | 6 +- compiler/rustc_ast_passes/messages.ftl | 22 +- .../src/check_consts/check.rs | 2 +- .../rustc_const_eval/src/check_consts/ops.rs | 2 +- .../src/check_consts/qualifs.rs | 12 +- compiler/rustc_feature/src/removed.rs | 4 +- compiler/rustc_feature/src/unstable.rs | 2 +- .../rustc_hir_analysis/src/check/check.rs | 2 +- .../src/check/compare_impl_item.rs | 6 +- .../rustc_hir_analysis/src/check/wfcheck.rs | 2 +- .../src/collect/item_bounds.rs | 4 +- .../src/collect/predicates_of.rs | 6 +- .../errors/wrong_number_of_generic_args.rs | 2 +- .../src/hir_ty_lowering/bounds.rs | 4 +- .../src/hir_ty_lowering/mod.rs | 6 +- .../src/impl_wf_check/min_specialization.rs | 8 +- compiler/rustc_hir_pretty/src/lib.rs | 2 +- compiler/rustc_hir_typeck/src/callee.rs | 2 +- .../rustc_hir_typeck/src/fn_ctxt/_impl.rs | 2 +- compiler/rustc_middle/src/middle/stability.rs | 2 +- compiler/rustc_middle/src/query/mod.rs | 14 +- compiler/rustc_middle/src/ty/generics.rs | 2 +- compiler/rustc_middle/src/ty/mod.rs | 2 +- compiler/rustc_middle/src/ty/print/pretty.rs | 4 +- .../src/solve/assembly/structural_traits.rs | 16 +- .../src/solve/effect_goals.rs | 6 +- compiler/rustc_parse/src/parser/ty.rs | 24 +- .../traits/fulfillment_errors.rs | 2 +- .../traits/on_unimplemented.rs | 2 +- .../src/traits/dyn_compatibility.rs | 2 +- .../src/traits/effects.rs | 16 +- .../src/traits/specialize/mod.rs | 2 +- compiler/rustc_ty_utils/src/ty.rs | 2 +- compiler/rustc_type_ir/src/elaborate.rs | 2 +- compiler/rustc_type_ir/src/predicate.rs | 6 +- compiler/rustc_type_ir/src/solve/mod.rs | 2 +- src/librustdoc/clean/mod.rs | 6 +- src/librustdoc/html/format.rs | 2 +- .../clippy_utils/src/qualify_min_const_fn.rs | 2 +- src/tools/clippy/tests/ui/assign_ops.fixed | 2 +- src/tools/clippy/tests/ui/assign_ops.rs | 2 +- .../ui/trait_duplication_in_bounds.fixed | 4 +- .../tests/ui/trait_duplication_in_bounds.rs | 4 +- .../ui/trait_duplication_in_bounds.stderr | 4 +- src/tools/rustfmt/tests/source/type.rs | 12 +- src/tools/rustfmt/tests/target/type.rs | 12 +- .../const-super-trait-nightly-disabled.stderr | 8 +- .../const-super-trait-nightly-enabled.stderr | 8 +- .../const-super-trait-stable-disabled.stderr | 12 +- .../const-super-trait-stable-enabled.stderr | 12 +- tests/rustdoc/constant/const-effect-param.rs | 2 +- .../constant/rfc-2632-const-trait-impl.rs | 46 +-- .../auxiliary/const-effect-param.rs | 2 +- .../const_trait_fn-issue-88433.rs | 3 +- .../const-generics/issues/issue-88119.stderr | 4 +- tests/ui/consts/const-block-const-bound.rs | 2 +- .../ui/consts/const-block-const-bound.stderr | 4 +- .../constifconst-call-in-const-position.rs | 2 +- ...constifconst-call-in-const-position.stderr | 6 +- tests/ui/consts/fn_trait_refs.rs | 20 +- tests/ui/consts/fn_trait_refs.stderr | 150 ++++----- .../ui/consts/issue-73976-monomorphic.stderr | 2 +- .../ui/consts/unstable-const-fn-in-libcore.rs | 2 +- .../unstable-const-fn-in-libcore.stderr | 32 +- .../ui/impl-trait/normalize-tait-in-const.rs | 2 +- .../impl-trait/normalize-tait-in-const.stderr | 20 +- tests/ui/macros/stringify.rs | 5 +- tests/ui/parser/bounds-type.rs | 8 +- tests/ui/parser/bounds-type.stderr | 18 +- tests/ui/parser/trait-object-delimiters.rs | 2 +- .../ui/parser/trait-object-delimiters.stderr | 4 +- tests/ui/specialization/const_trait_impl.rs | 8 +- .../ui/specialization/const_trait_impl.stderr | 60 ++-- .../assoc-type-const-bound-usage-0.rs | 6 +- .../assoc-type-const-bound-usage-1.rs | 2 +- ...pe-const-bound-usage-fail-2.current.stderr | 4 +- ...-type-const-bound-usage-fail-2.next.stderr | 4 +- .../assoc-type-const-bound-usage-fail-2.rs | 14 +- ...type-const-bound-usage-fail.current.stderr | 4 +- ...oc-type-const-bound-usage-fail.next.stderr | 4 +- .../assoc-type-const-bound-usage-fail.rs | 10 +- .../const-traits/assoc-type.current.stderr | 6 +- .../const-traits/assoc-type.next.stderr | 6 +- tests/ui/traits/const-traits/assoc-type.rs | 4 +- .../traits/const-traits/auxiliary/minicore.rs | 24 +- .../traits/const-traits/call-const-closure.rs | 2 +- .../const-traits/call-const-closure.stderr | 2 +- .../const-traits/call-const-in-tilde-const.rs | 2 +- .../call-const-trait-method-fail.rs | 2 +- .../call-const-trait-method-fail.stderr | 2 +- .../const-traits/call-generic-in-impl.rs | 2 +- .../const-traits/call-generic-method-chain.rs | 4 +- .../call-generic-method-dup-bound.rs | 8 +- .../const-traits/call-generic-method-fail.rs | 2 +- .../call-generic-method-fail.stderr | 2 +- .../call-generic-method-nonconst.rs | 2 +- .../call-generic-method-nonconst.stderr | 4 +- .../const-traits/call-generic-method-pass.rs | 2 +- .../const-bound-on-not-const-associated-fn.rs | 8 +- ...st-bound-on-not-const-associated-fn.stderr | 24 +- .../const-bounds-non-const-trait.rs | 6 +- .../const-bounds-non-const-trait.stderr | 16 +- .../const-closure-parse-not-item.rs | 2 +- .../const-closure-parse-not-item.stderr | 30 +- .../const-closure-trait-method-fail.rs | 2 +- .../const-closure-trait-method-fail.stderr | 20 +- .../const-closure-trait-method.rs | 2 +- .../const-closure-trait-method.stderr | 20 +- .../ui/traits/const-traits/const-closures.rs | 8 +- .../traits/const-traits/const-closures.stderr | 80 ++--- .../const-traits/const-cond-for-rpitit.rs | 6 +- .../const-default-method-bodies.rs | 2 +- .../const-default-method-bodies.stderr | 2 +- .../traits/const-traits/const-drop-bound.rs | 6 +- .../const-drop-fail-2.precise.stderr | 10 +- .../traits/const-traits/const-drop-fail-2.rs | 6 +- .../const-drop-fail-2.stock.stderr | 10 +- .../const-drop-fail.new_precise.stderr | 8 +- .../const-drop-fail.new_stock.stderr | 8 +- .../const-drop-fail.old_precise.stderr | 8 +- .../const-drop-fail.old_stock.stderr | 8 +- .../ui/traits/const-traits/const-drop-fail.rs | 2 +- tests/ui/traits/const-traits/const-drop.rs | 4 +- .../traits/const-traits/const-impl-trait.rs | 18 +- .../const-traits/const-impl-trait.stderr | 4 +- .../traits/const-traits/const-in-closure.rs | 9 +- .../const-traits/const-opaque.no.stderr | 4 +- tests/ui/traits/const-traits/const-opaque.rs | 4 +- .../const-trait-bounds-trait-objects.rs | 6 +- .../const-trait-bounds-trait-objects.stderr | 20 +- .../const-trait-impl-parameter-mismatch.rs | 2 +- ...const-trait-impl-parameter-mismatch.stderr | 2 +- .../const_derives/derive-const-use.stderr | 2 +- .../const-traits/cross-crate.gatednc.stderr | 2 +- ...ault-method-body-is-const-body-checking.rs | 4 +- ...-method-body-is-const-body-checking.stderr | 6 +- ...ault-method-body-is-const-same-trait-ck.rs | 2 +- ...-method-body-is-const-same-trait-ck.stderr | 2 +- .../dont-ice-on-const-pred-for-bounds.rs | 2 +- ...dont-prefer-param-env-for-infer-self-ty.rs | 6 +- .../double-error-for-unimplemented-trait.rs | 2 +- ...ouble-error-for-unimplemented-trait.stderr | 8 +- .../traits/const-traits/eval-bad-signature.rs | 2 +- tests/ui/traits/const-traits/feature-gate.rs | 4 +- .../const-traits/feature-gate.stock.stderr | 12 +- ...function-pointer-does-not-require-const.rs | 2 +- .../ice-112822-expected-type-for-param.rs | 8 +- .../ice-112822-expected-type-for-param.stderr | 30 +- .../ice-123664-unexpected-bound-var.rs | 6 +- .../ice-123664-unexpected-bound-var.stderr | 20 +- ...-124857-combine-effect-const-infer-vars.rs | 2 +- ...857-combine-effect-const-infer-vars.stderr | 4 +- .../const-traits/impl-tilde-const-trait.rs | 4 +- .../impl-tilde-const-trait.stderr | 8 +- .../inherent-impl-const-bounds.rs | 2 +- tests/ui/traits/const-traits/issue-100222.rs | 21 +- tests/ui/traits/const-traits/issue-92111.rs | 2 +- .../issue-92230-wf-super-trait-env.rs | 4 +- .../item-bound-entailment-fails.rs | 12 +- .../item-bound-entailment-fails.stderr | 18 +- .../const-traits/item-bound-entailment.rs | 8 +- ...e-bare-trait-objects-const-trait-bounds.rs | 16 +- ...re-trait-objects-const-trait-bounds.stderr | 22 ++ .../const-traits/minicore-deref-fail.rs | 6 +- .../const-traits/minicore-deref-fail.stderr | 4 +- .../traits/const-traits/minicore-drop-fail.rs | 2 +- .../traits/const-traits/minicore-fn-fail.rs | 6 +- .../const-traits/minicore-fn-fail.stderr | 6 +- .../ui/traits/const-traits/minicore-works.rs | 4 +- ...utually-exclusive-trait-bound-modifiers.rs | 8 +- ...lly-exclusive-trait-bound-modifiers.stderr | 26 +- .../non-const-op-in-closure-in-const.rs | 2 +- .../non-const-op-in-closure-in-const.stderr | 20 +- ...verlap-const-with-nonconst.min_spec.stderr | 4 +- .../overlap-const-with-nonconst.rs | 4 +- .../overlap-const-with-nonconst.spec.stderr | 4 +- .../predicate-entailment-fails.rs | 8 +- .../predicate-entailment-fails.stderr | 14 +- .../predicate-entailment-passes.rs | 4 +- ...fault-bound-non-const-specialized-bound.rs | 10 +- ...t-bound-non-const-specialized-bound.stderr | 10 +- .../const-default-const-specialized.rs | 2 +- .../issue-95186-specialize-on-tilde-const.rs | 10 +- ...87-same-trait-bound-different-constness.rs | 6 +- .../non-const-default-const-specialized.rs | 2 +- .../const-traits/specializing-constness-2.rs | 4 +- .../specializing-constness-2.stderr | 2 +- .../const-traits/specializing-constness.rs | 2 +- .../specializing-constness.stderr | 4 +- tests/ui/traits/const-traits/staged-api.rs | 2 +- .../super-traits-fail-2.nn.stderr | 38 +-- .../super-traits-fail-2.ny.stderr | 40 +-- .../const-traits/super-traits-fail-2.rs | 16 +- .../super-traits-fail-2.yn.stderr | 16 +- .../super-traits-fail-2.yy.stderr | 2 +- .../super-traits-fail-3.nnn.stderr | 70 ++-- .../super-traits-fail-3.nny.stderr | 70 ++-- .../super-traits-fail-3.nyn.stderr | 12 +- .../super-traits-fail-3.nyy.stderr | 12 +- .../const-traits/super-traits-fail-3.rs | 22 +- .../super-traits-fail-3.ynn.stderr | 58 ++-- .../super-traits-fail-3.yny.stderr | 40 +-- .../super-traits-fail-3.yyn.stderr | 36 +-- .../traits/const-traits/super-traits-fail.rs | 2 +- .../const-traits/super-traits-fail.stderr | 2 +- tests/ui/traits/const-traits/super-traits.rs | 4 +- .../const-traits/syntactical-unstable.rs | 12 +- .../const-traits/syntactical-unstable.stderr | 50 +-- tests/ui/traits/const-traits/syntax.rs | 9 +- tests/ui/traits/const-traits/syntax.stderr | 8 + .../tilde-const-and-const-params.rs | 8 +- .../tilde-const-and-const-params.stderr | 36 +-- .../tilde-const-assoc-fn-in-trait-impl.rs | 4 +- .../tilde-const-in-struct-args.rs | 2 +- .../tilde-const-inherent-assoc-const-fn.rs | 2 +- .../tilde-const-invalid-places.rs | 46 +-- .../tilde-const-invalid-places.stderr | 304 +++++++++--------- .../traits/const-traits/tilde-const-syntax.rs | 4 +- .../tilde-const-trait-assoc-tys.rs | 4 +- tests/ui/traits/const-traits/tilde-twice.rs | 4 +- .../ui/traits/const-traits/tilde-twice.stderr | 8 +- .../const-traits/trait-where-clause-const.rs | 8 +- .../trait-where-clause-const.stderr | 12 +- .../const-traits/trait-where-clause-run.rs | 2 +- .../trait-where-clause-self-referential.rs | 4 +- .../traits/const-traits/trait-where-clause.rs | 8 +- .../const-traits/trait-where-clause.stderr | 32 +- .../unsatisfied-const-trait-bound.rs | 4 +- .../unsatisfied-const-trait-bound.stderr | 72 ++--- tests/ui/unpretty/ast-const-trait-bound.rs | 2 +- .../ui/unpretty/ast-const-trait-bound.stdout | 2 +- tests/ui/unpretty/exhaustive.expanded.stdout | 2 +- tests/ui/unpretty/exhaustive.hir.stderr | 4 +- tests/ui/unpretty/exhaustive.rs | 2 +- 234 files changed, 1382 insertions(+), 1319 deletions(-) create mode 100644 tests/ui/traits/const-traits/mbe-bare-trait-objects-const-trait-bounds.stderr create mode 100644 tests/ui/traits/const-traits/syntax.stderr diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index 11afd359e5ad3..87fe54dc31d46 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -323,7 +323,7 @@ impl ParenthesizedArgs { pub use crate::node_id::{CRATE_NODE_ID, DUMMY_NODE_ID, NodeId}; -/// Modifiers on a trait bound like `~const`, `?` and `!`. +/// Modifiers on a trait bound like `[const]`, `?` and `!`. #[derive(Copy, Clone, PartialEq, Eq, Encodable, Decodable, Debug)] pub struct TraitBoundModifiers { pub constness: BoundConstness, @@ -3111,7 +3111,7 @@ pub enum BoundConstness { Never, /// `Type: const Trait` Always(Span), - /// `Type: ~const Trait` + /// `Type: [const] Trait` Maybe(Span), } @@ -3120,7 +3120,7 @@ impl BoundConstness { match self { Self::Never => "", Self::Always(_) => "const", - Self::Maybe(_) => "~const", + Self::Maybe(_) => "[const]", } } } diff --git a/compiler/rustc_ast_passes/messages.ftl b/compiler/rustc_ast_passes/messages.ftl index 9a267501230fe..37bb35c97ef7f 100644 --- a/compiler/rustc_ast_passes/messages.ftl +++ b/compiler/rustc_ast_passes/messages.ftl @@ -232,17 +232,17 @@ ast_passes_static_without_body = free static item without body .suggestion = provide a definition for the static -ast_passes_tilde_const_disallowed = `~const` is not allowed here - .closure = closures cannot have `~const` trait bounds - .function = this function is not `const`, so it cannot have `~const` trait bounds - .trait = this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds - .trait_impl = this impl is not `const`, so it cannot have `~const` trait bounds - .impl = inherent impls cannot have `~const` trait bounds - .trait_assoc_ty = associated types in non-`#[const_trait]` traits cannot have `~const` trait bounds - .trait_impl_assoc_ty = associated types in non-const impls cannot have `~const` trait bounds - .inherent_assoc_ty = inherent associated types cannot have `~const` trait bounds - .object = trait objects cannot have `~const` trait bounds - .item = this item cannot have `~const` trait bounds +ast_passes_tilde_const_disallowed = `[const]` is not allowed here + .closure = closures cannot have `[const]` trait bounds + .function = this function is not `const`, so it cannot have `[const]` trait bounds + .trait = this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds + .trait_impl = this impl is not `const`, so it cannot have `[const]` trait bounds + .impl = inherent impls cannot have `[const]` trait bounds + .trait_assoc_ty = associated types in non-`#[const_trait]` traits cannot have `[const]` trait bounds + .trait_impl_assoc_ty = associated types in non-const impls cannot have `[const]` trait bounds + .inherent_assoc_ty = inherent associated types cannot have `[const]` trait bounds + .object = trait objects cannot have `[const]` trait bounds + .item = this item cannot have `[const]` trait bounds ast_passes_trait_fn_const = functions in {$in_impl -> diff --git a/compiler/rustc_const_eval/src/check_consts/check.rs b/compiler/rustc_const_eval/src/check_consts/check.rs index 576b174369d46..29274a12f441b 100644 --- a/compiler/rustc_const_eval/src/check_consts/check.rs +++ b/compiler/rustc_const_eval/src/check_consts/check.rs @@ -421,7 +421,7 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> { Some(ConstConditionsHold::Yes) } else { tcx.dcx() - .span_delayed_bug(call_span, "this should have reported a ~const error in HIR"); + .span_delayed_bug(call_span, "this should have reported a [const] error in HIR"); Some(ConstConditionsHold::No) } } diff --git a/compiler/rustc_const_eval/src/check_consts/ops.rs b/compiler/rustc_const_eval/src/check_consts/ops.rs index 887275e7294d2..4295f4a413205 100644 --- a/compiler/rustc_const_eval/src/check_consts/ops.rs +++ b/compiler/rustc_const_eval/src/check_consts/ops.rs @@ -149,7 +149,7 @@ impl<'tcx> NonConstOp<'tcx> for FnCallNonConst<'tcx> { debug!(?param_ty); if let Some(generics) = tcx.hir_node_by_def_id(caller).generics() { let constraint = with_no_trimmed_paths!(format!( - "~const {}", + "[const] {}", trait_ref.print_trait_sugared(), )); suggest_constraining_type_param( diff --git a/compiler/rustc_const_eval/src/check_consts/qualifs.rs b/compiler/rustc_const_eval/src/check_consts/qualifs.rs index c1a37ab6a83f3..166491b47a1fd 100644 --- a/compiler/rustc_const_eval/src/check_consts/qualifs.rs +++ b/compiler/rustc_const_eval/src/check_consts/qualifs.rs @@ -170,14 +170,14 @@ impl Qualif for NeedsNonConstDrop { #[instrument(level = "trace", skip(cx), ret)] fn in_any_value_of_ty<'tcx>(cx: &ConstCx<'_, 'tcx>, ty: Ty<'tcx>) -> bool { - // If this doesn't need drop at all, then don't select `~const Destruct`. + // If this doesn't need drop at all, then don't select `[const] Destruct`. if !ty.needs_drop(cx.tcx, cx.typing_env) { return false; } - // We check that the type is `~const Destruct` since that will verify that - // the type is both `~const Drop` (if a drop impl exists for the adt), *and* - // that the components of this type are also `~const Destruct`. This + // We check that the type is `[const] Destruct` since that will verify that + // the type is both `[const] Drop` (if a drop impl exists for the adt), *and* + // that the components of this type are also `[const] Destruct`. This // amounts to verifying that there are no values in this ADT that may have // a non-const drop. let destruct_def_id = cx.tcx.require_lang_item(LangItem::Destruct, cx.body.span); @@ -203,9 +203,9 @@ impl Qualif for NeedsNonConstDrop { fn is_structural_in_adt_value<'tcx>(cx: &ConstCx<'_, 'tcx>, adt: AdtDef<'tcx>) -> bool { // As soon as an ADT has a destructor, then the drop becomes non-structural // in its value since: - // 1. The destructor may have `~const` bounds which are not present on the type. + // 1. The destructor may have `[const]` bounds which are not present on the type. // Someone needs to check that those are satisfied. - // While this could be instead satisfied by checking that the `~const Drop` + // While this could be instead satisfied by checking that the `[const] Drop` // impl holds (i.e. replicating part of the `in_any_value_of_ty` logic above), // even in this case, we have another problem, which is, // 2. The destructor may *modify* the operand being dropped, so even if we diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs index 0cd090b25a4f8..df9f85fa7e21b 100644 --- a/compiler/rustc_feature/src/removed.rs +++ b/compiler/rustc_feature/src/removed.rs @@ -86,7 +86,7 @@ declare_features! ( Some("at compile-time, pointers do not have an integer value, so these casts cannot be properly supported"), 87020), /// Allows `T: ?const Trait` syntax in bounds. (removed, const_trait_bound_opt_out, "1.56.0", Some(67794), - Some("Removed in favor of `~const` bound in #![feature(const_trait_impl)]"), 88328), + Some("Removed in favor of `[const]` bound in #![feature(const_trait_impl)]"), 88328), /// Allows using `crate` as visibility modifier, synonymous with `pub(crate)`. (removed, crate_visibility_modifier, "1.63.0", Some(53120), Some("removed in favor of `pub(crate)`"), 97254), /// Allows using custom attributes (RFC 572). @@ -122,7 +122,7 @@ declare_features! ( /// [^1]: Formerly known as "object safe". (removed, dyn_compatible_for_dispatch, "1.87.0", Some(43561), Some("removed, not used heavily and represented additional complexity in dyn compatibility"), 136522), - /// Uses generic effect parameters for ~const bounds + /// Uses generic effect parameters for [const] bounds (removed, effects, "1.84.0", Some(102090), Some("removed, redundant with `#![feature(const_trait_impl)]`"), 132479), /// Allows defining `existential type`s. diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index 91715851226bb..14d494f8d7aa0 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -437,7 +437,7 @@ declare_features! ( (unstable, const_async_blocks, "1.53.0", Some(85368)), /// Allows `const || {}` closures in const contexts. (incomplete, const_closures, "1.68.0", Some(106003)), - /// Allows using `~const Destruct` bounds and calling drop impls in const contexts. + /// Allows using `[const] Destruct` bounds and calling drop impls in const contexts. (unstable, const_destruct, "1.85.0", Some(133214)), /// Allows `for _ in _` loops in const contexts. (unstable, const_for, "1.56.0", Some(87575)), diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs index 485dd1d220441..b2cfd5b9dab8d 100644 --- a/compiler/rustc_hir_analysis/src/check/check.rs +++ b/compiler/rustc_hir_analysis/src/check/check.rs @@ -344,7 +344,7 @@ fn check_opaque_meets_bounds<'tcx>( let misc_cause = ObligationCause::misc(span, def_id); // FIXME: We should just register the item bounds here, rather than equating. // FIXME(const_trait_impl): When we do that, please make sure to also register - // the `~const` bounds. + // the `[const]` bounds. match ocx.eq(&misc_cause, param_env, opaque_ty, hidden_ty) { Ok(()) => {} Err(ty_err) => { 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 47681a78ecca8..dab4d7e5db1b0 100644 --- a/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs +++ b/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs @@ -264,9 +264,9 @@ fn compare_method_predicate_entailment<'tcx>( } // If we're within a const implementation, we need to make sure that the method - // does not assume stronger `~const` bounds than the trait definition. + // does not assume stronger `[const]` bounds than the trait definition. // - // This registers the `~const` bounds of the impl method, which we will prove + // This registers the `[const]` bounds of the impl method, which we will prove // using the hybrid param-env that we earlier augmented with the const conditions // from the impl header and trait method declaration. if is_conditionally_const { @@ -2335,7 +2335,7 @@ pub(super) fn check_type_bounds<'tcx>( ) .collect(); - // Only in a const implementation do we need to check that the `~const` item bounds hold. + // Only in a const implementation do we need to check that the `[const]` item bounds hold. if tcx.is_conditionally_const(impl_ty_def_id) { obligations.extend(util::elaborate( tcx, diff --git a/compiler/rustc_hir_analysis/src/check/wfcheck.rs b/compiler/rustc_hir_analysis/src/check/wfcheck.rs index d05e381f8c86b..f0b550398b69c 100644 --- a/compiler/rustc_hir_analysis/src/check/wfcheck.rs +++ b/compiler/rustc_hir_analysis/src/check/wfcheck.rs @@ -1399,7 +1399,7 @@ fn check_impl<'tcx>( } } - // Ensure that the `~const` where clauses of the trait hold for the impl. + // Ensure that the `[const]` where clauses of the trait hold for the impl. if tcx.is_conditionally_const(item.owner_id.def_id) { for (bound, _) in tcx.const_conditions(trait_ref.def_id).instantiate(tcx, trait_ref.args) diff --git a/compiler/rustc_hir_analysis/src/collect/item_bounds.rs b/compiler/rustc_hir_analysis/src/collect/item_bounds.rs index 53c44cdc4115d..e51ef46afb72f 100644 --- a/compiler/rustc_hir_analysis/src/collect/item_bounds.rs +++ b/compiler/rustc_hir_analysis/src/collect/item_bounds.rs @@ -54,7 +54,7 @@ fn associated_type_bounds<'tcx>( ); icx.lowerer().add_default_traits(&mut bounds, item_ty, hir_bounds, None, span); } - // `ConstIfConst` is only interested in `~const` bounds. + // `ConstIfConst` is only interested in `[const]` bounds. PredicateFilter::ConstIfConst | PredicateFilter::SelfConstIfConst => {} } @@ -351,7 +351,7 @@ fn opaque_type_bounds<'tcx>( ); icx.lowerer().add_default_traits(&mut bounds, item_ty, hir_bounds, None, span); } - //`ConstIfConst` is only interested in `~const` bounds. + //`ConstIfConst` is only interested in `[const]` bounds. PredicateFilter::ConstIfConst | PredicateFilter::SelfConstIfConst => {} } debug!(?bounds); diff --git a/compiler/rustc_hir_analysis/src/collect/predicates_of.rs b/compiler/rustc_hir_analysis/src/collect/predicates_of.rs index c337765c5fec3..2813d4204a70f 100644 --- a/compiler/rustc_hir_analysis/src/collect/predicates_of.rs +++ b/compiler/rustc_hir_analysis/src/collect/predicates_of.rs @@ -666,7 +666,7 @@ pub(super) fn implied_predicates_with_filter<'tcx>( item.span, ); } - //`ConstIfConst` is only interested in `~const` bounds. + //`ConstIfConst` is only interested in `[const]` bounds. PredicateFilter::ConstIfConst | PredicateFilter::SelfConstIfConst => {} } @@ -821,7 +821,7 @@ pub(super) fn assert_only_contains_predicates_from<'tcx>( assert_eq!( pred.constness, ty::BoundConstness::Maybe, - "expected `~const` predicate when computing `{filter:?}` \ + "expected `[const]` predicate when computing `{filter:?}` \ implied bounds: {clause:?}", ); assert_eq!( @@ -1009,7 +1009,7 @@ pub(super) fn const_conditions<'tcx>( } _ => bug!("const_conditions called on wrong item: {def_id:?}"), }, - // While associated types are not really const, we do allow them to have `~const` + // While associated types are not really const, we do allow them to have `[const]` // bounds and where clauses. `const_conditions` is responsible for gathering // these up so we can check them in `compare_type_predicate_entailment`, and // in `HostEffect` goal computation. diff --git a/compiler/rustc_hir_analysis/src/errors/wrong_number_of_generic_args.rs b/compiler/rustc_hir_analysis/src/errors/wrong_number_of_generic_args.rs index a3c8ce620b366..ef789743e06f7 100644 --- a/compiler/rustc_hir_analysis/src/errors/wrong_number_of_generic_args.rs +++ b/compiler/rustc_hir_analysis/src/errors/wrong_number_of_generic_args.rs @@ -635,7 +635,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> { self.suggest_adding_type_and_const_args(err); } ExcessTypesOrConsts { .. } => { - // this can happen with `~const T` where T isn't a const_trait. + // this can happen with `[const] T` where T isn't a const_trait. } _ => unreachable!(), } diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs index ea1dfdfd80619..7aab8ecc74ee3 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs @@ -492,7 +492,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { ); } hir::GenericBound::Outlives(lifetime) => { - // `ConstIfConst` is only interested in `~const` bounds. + // `ConstIfConst` is only interested in `[const]` bounds. if matches!( predicate_filter, PredicateFilter::ConstIfConst | PredicateFilter::SelfConstIfConst @@ -708,7 +708,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { } // SelfTraitThatDefines is only interested in trait predicates. PredicateFilter::SelfTraitThatDefines(_) => {} - // `ConstIfConst` is only interested in `~const` bounds. + // `ConstIfConst` is only interested in `[const]` bounds. PredicateFilter::ConstIfConst | PredicateFilter::SelfConstIfConst => {} } } 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 baf3b9b5bc9e0..74739355e1fcb 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs @@ -80,10 +80,10 @@ pub enum PredicateFilter { /// and `::A: B`. SelfAndAssociatedTypeBounds, - /// Filter only the `~const` bounds, which are lowered into `HostEffect` clauses. + /// Filter only the `[const]` bounds, which are lowered into `HostEffect` clauses. ConstIfConst, - /// Filter only the `~const` bounds which are *also* in the supertrait position. + /// Filter only the `[const]` bounds which are *also* in the supertrait position. SelfConstIfConst, } @@ -885,7 +885,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { } } // On the flip side, when filtering `ConstIfConst` bounds, we only need to convert - // `~const` bounds. All other predicates are handled in their respective queries. + // `[const]` bounds. All other predicates are handled in their respective queries. // // Note that like `PredicateFilter::SelfOnly`, we don't need to do any filtering // here because we only call this on self bounds, and deal with the recursive case 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 309221f9a127a..574d19a5aa5a4 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 @@ -402,22 +402,22 @@ fn check_predicates<'tcx>( /// as some predicate on the base impl (`predicate2`). /// /// This basically just checks syntactic equivalence, but is a little more -/// forgiving since we want to equate `T: Tr` with `T: ~const Tr` so this can work: +/// forgiving since we want to equate `T: Tr` with `T: [const] Tr` so this can work: /// /// ```ignore (illustrative) /// #[rustc_specialization_trait] /// trait Specialize { } /// /// impl Tr for T { } -/// impl const Tr for T { } +/// impl const Tr for T { } /// ``` /// /// However, we *don't* want to allow the reverse, i.e., when the bound on the /// specializing impl is not as const as the bound on the base impl: /// /// ```ignore (illustrative) -/// impl const Tr for T { } -/// impl const Tr for T { } // should be T: ~const Bound +/// impl const Tr for T { } +/// impl const Tr for T { } // should be T: [const] Bound /// ``` /// /// So we make that check in this function and try to raise a helpful error message. diff --git a/compiler/rustc_hir_pretty/src/lib.rs b/compiler/rustc_hir_pretty/src/lib.rs index d3289e4cc6d0f..b295a21381147 100644 --- a/compiler/rustc_hir_pretty/src/lib.rs +++ b/compiler/rustc_hir_pretty/src/lib.rs @@ -784,7 +784,7 @@ impl<'a> State<'a> { match constness { hir::BoundConstness::Never => {} hir::BoundConstness::Always(_) => self.word("const"), - hir::BoundConstness::Maybe(_) => self.word("~const"), + hir::BoundConstness::Maybe(_) => self.word("[const]"), } match polarity { hir::BoundPolarity::Positive => {} diff --git a/compiler/rustc_hir_typeck/src/callee.rs b/compiler/rustc_hir_typeck/src/callee.rs index 7a3647df0c405..80d504f0dc690 100644 --- a/compiler/rustc_hir_typeck/src/callee.rs +++ b/compiler/rustc_hir_typeck/src/callee.rs @@ -903,7 +903,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { return; } - // If we have `rustc_do_not_const_check`, do not check `~const` bounds. + // If we have `rustc_do_not_const_check`, do not check `[const]` bounds. if self.tcx.has_attr(self.body_id, sym::rustc_do_not_const_check) { return; } diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs index 2df19cb21d583..58751f232d032 100644 --- a/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs +++ b/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs @@ -281,7 +281,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { ); } Adjust::Deref(None) => { - // FIXME(const_trait_impl): We *could* enforce `&T: ~const Deref` here. + // FIXME(const_trait_impl): We *could* enforce `&T: [const] Deref` here. } Adjust::Pointer(_pointer_coercion) => { // FIXME(const_trait_impl): We should probably enforce these. diff --git a/compiler/rustc_middle/src/middle/stability.rs b/compiler/rustc_middle/src/middle/stability.rs index ab6a65ed52634..99faba7b2c0ae 100644 --- a/compiler/rustc_middle/src/middle/stability.rs +++ b/compiler/rustc_middle/src/middle/stability.rs @@ -620,7 +620,7 @@ impl<'tcx> TyCtxt<'tcx> { /// instead of regular stability. /// /// This enforces *syntactical* const stability of const traits. In other words, - /// it enforces the ability to name `~const`/`const` traits in trait bounds in various + /// it enforces the ability to name `[const]`/`const` traits in trait bounds in various /// syntax positions in HIR (including in the trait of an impl header). pub fn check_const_stability(self, def_id: DefId, span: Span, const_kw_span: Span) { let is_staged_api = self.lookup_stability(def_id.krate.as_def_id()).is_some(); diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index 3668f4e12f5d9..3dd8ccbc8550c 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -850,14 +850,14 @@ rustc_queries! { } /// Compute the conditions that need to hold for a conditionally-const item to be const. - /// That is, compute the set of `~const` where clauses for a given item. + /// That is, compute the set of `[const]` where clauses for a given item. /// - /// This can be thought of as the `~const` equivalent of `predicates_of`. These are the + /// This can be thought of as the `[const]` equivalent of `predicates_of`. These are the /// predicates that need to be proven at usage sites, and can be assumed at definition. /// - /// This query also computes the `~const` where clauses for associated types, which are - /// not "const", but which have item bounds which may be `~const`. These must hold for - /// the `~const` item bound to hold. + /// This query also computes the `[const]` where clauses for associated types, which are + /// not "const", but which have item bounds which may be `[const]`. These must hold for + /// the `[const]` item bound to hold. query const_conditions( key: DefId ) -> ty::ConstConditions<'tcx> { @@ -869,13 +869,13 @@ rustc_queries! { /// Compute the const bounds that are implied for a conditionally-const item. /// - /// This can be though of as the `~const` equivalent of `explicit_item_bounds`. These + /// This can be though of as the `[const]` equivalent of `explicit_item_bounds`. These /// are the predicates that need to proven at definition sites, and can be assumed at /// usage sites. query explicit_implied_const_bounds( key: DefId ) -> ty::EarlyBinder<'tcx, &'tcx [(ty::PolyTraitRef<'tcx>, Span)]> { - desc { |tcx| "computing the implied `~const` bounds for `{}`", + desc { |tcx| "computing the implied `[const]` bounds for `{}`", tcx.def_path_str(key) } separate_provide_extern diff --git a/compiler/rustc_middle/src/ty/generics.rs b/compiler/rustc_middle/src/ty/generics.rs index d4cc562e70cc7..c7b3b5415492b 100644 --- a/compiler/rustc_middle/src/ty/generics.rs +++ b/compiler/rustc_middle/src/ty/generics.rs @@ -419,7 +419,7 @@ impl<'tcx> GenericPredicates<'tcx> { } } -/// `~const` bounds for a given item. This is represented using a struct much like +/// `[const]` bounds for a given item. This is represented using a struct much like /// `GenericPredicates`, where you can either choose to only instantiate the "own" /// bounds or all of the bounds including those from the parent. This distinction /// is necessary for code like `compare_method_predicate_entailment`. diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index 97408e31854ae..f7e569654bd48 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -2156,7 +2156,7 @@ impl<'tcx> TyCtxt<'tcx> { }, DefKind::Closure => { // Closures and RPITs will eventually have const conditions - // for `~const` bounds. + // for `[const]` bounds. false } DefKind::Ctor(_, CtorKind::Const) diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index c10277c75a79b..1392d1d08fcb5 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -2077,7 +2077,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write { p!("const "); } ty::BoundConstness::Maybe => { - p!("~const "); + p!("[const] "); } } Ok(()) @@ -3250,7 +3250,7 @@ define_print! { ty::HostEffectPredicate<'tcx> { let constness = match self.constness { ty::BoundConstness::Const => { "const" } - ty::BoundConstness::Maybe => { "~const" } + ty::BoundConstness::Maybe => { "[const]" } }; p!(print(self.trait_ref.self_ty()), ": {constness} "); p!(print(self.trait_ref.print_trait_sugared())) diff --git a/compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs b/compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs index f39d32260093c..a7b8a9ed9a862 100644 --- a/compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs +++ b/compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs @@ -735,11 +735,11 @@ pub(in crate::solve) fn const_conditions_for_destruct( let destruct_def_id = cx.require_lang_item(TraitSolverLangItem::Destruct); match self_ty.kind() { - // `ManuallyDrop` is trivially `~const Destruct` as we do not run any drop glue on it. + // `ManuallyDrop` is trivially `[const] Destruct` as we do not run any drop glue on it. ty::Adt(adt_def, _) if adt_def.is_manually_drop() => Ok(vec![]), - // An ADT is `~const Destruct` only if all of the fields are, - // *and* if there is a `Drop` impl, that `Drop` impl is also `~const`. + // An ADT is `[const] Destruct` only if all of the fields are, + // *and* if there is a `Drop` impl, that `Drop` impl is also `[const]`. ty::Adt(adt_def, args) => { let mut const_conditions: Vec<_> = adt_def .all_field_tys(cx) @@ -747,9 +747,9 @@ pub(in crate::solve) fn const_conditions_for_destruct( .map(|field_ty| ty::TraitRef::new(cx, destruct_def_id, [field_ty])) .collect(); match adt_def.destructor(cx) { - // `Drop` impl exists, but it's not const. Type cannot be `~const Destruct`. + // `Drop` impl exists, but it's not const. Type cannot be `[const] Destruct`. Some(AdtDestructorKind::NotConst) => return Err(NoSolution), - // `Drop` impl exists, and it's const. Require `Ty: ~const Drop` to hold. + // `Drop` impl exists, and it's const. Require `Ty: [const] Drop` to hold. Some(AdtDestructorKind::Const) => { let drop_def_id = cx.require_lang_item(TraitSolverLangItem::Drop); let drop_trait_ref = ty::TraitRef::new(cx, drop_def_id, [self_ty]); @@ -770,7 +770,7 @@ pub(in crate::solve) fn const_conditions_for_destruct( .map(|field_ty| ty::TraitRef::new(cx, destruct_def_id, [field_ty])) .collect()), - // Trivially implement `~const Destruct` + // Trivially implement `[const] Destruct` ty::Bool | ty::Char | ty::Int(..) @@ -785,14 +785,14 @@ pub(in crate::solve) fn const_conditions_for_destruct( | ty::Infer(ty::InferTy::FloatVar(_) | ty::InferTy::IntVar(_)) | ty::Error(_) => Ok(vec![]), - // Coroutines and closures could implement `~const Drop`, + // Coroutines and closures could implement `[const] Drop`, // but they don't really need to right now. ty::Closure(_, _) | ty::CoroutineClosure(_, _) | ty::Coroutine(_, _) | ty::CoroutineWitness(_, _) => Err(NoSolution), - // FIXME(unsafe_binders): Unsafe binders could implement `~const Drop` + // FIXME(unsafe_binders): Unsafe binders could implement `[const] Drop` // if their inner type implements it. ty::UnsafeBinder(_) => Err(NoSolution), 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 1690c908d123b..0547eb77f8d83 100644 --- a/compiler/rustc_next_trait_solver/src/solve/effect_goals.rs +++ b/compiler/rustc_next_trait_solver/src/solve/effect_goals.rs @@ -1,5 +1,5 @@ //! Dealing with host effect goals, i.e. enforcing the constness in -//! `T: const Trait` or `T: ~const Trait`. +//! `T: const Trait` or `T: [const] Trait`. use rustc_type_ir::fast_reject::DeepRejectCtxt; use rustc_type_ir::inherent::*; @@ -72,7 +72,7 @@ where then(ecx) } - /// Register additional assumptions for aliases corresponding to `~const` item bounds. + /// Register additional assumptions for aliases corresponding to `[const]` item bounds. /// /// Unlike item bounds, they are not simply implied by the well-formedness of the alias. /// Instead, they only hold if the const conditons on the alias also hold. This is why @@ -161,7 +161,7 @@ where .map(|pred| goal.with(cx, pred)); ecx.add_goals(GoalSource::ImplWhereBound, where_clause_bounds); - // For this impl to be `const`, we need to check its `~const` bounds too. + // For this impl to be `const`, we need to check its `[const]` bounds too. let const_conditions = cx .const_conditions(impl_def_id) .iter_instantiated(cx, impl_args) diff --git a/compiler/rustc_parse/src/parser/ty.rs b/compiler/rustc_parse/src/parser/ty.rs index aa51b550426a8..f181097813dba 100644 --- a/compiler/rustc_parse/src/parser/ty.rs +++ b/compiler/rustc_parse/src/parser/ty.rs @@ -885,6 +885,7 @@ impl<'a> Parser<'a> { || self.check(exp!(Tilde)) || self.check_keyword(exp!(For)) || self.check(exp!(OpenParen)) + || self.check(exp!(OpenBracket)) || self.check_keyword(exp!(Const)) || self.check_keyword(exp!(Async)) || self.check_keyword(exp!(Use)) @@ -982,12 +983,12 @@ impl<'a> Parser<'a> { Ok(()) } - /// Parses the modifiers that may precede a trait in a bound, e.g. `?Trait` or `~const Trait`. + /// Parses the modifiers that may precede a trait in a bound, e.g. `?Trait` or `[const] Trait`. /// /// If no modifiers are present, this does not consume any tokens. /// /// ```ebnf - /// CONSTNESS = [["~"] "const"] + /// CONSTNESS = [["["] "const" ["]"]] /// ASYNCNESS = ["async"] /// POLARITY = ["?" | "!"] /// ``` @@ -1057,13 +1058,26 @@ impl<'a> Parser<'a> { Ok(TraitBoundModifiers { constness, asyncness, polarity }) } - fn parse_bound_constness(&mut self) -> PResult<'a, BoundConstness> { + pub fn parse_bound_constness(&mut self) -> PResult<'a, BoundConstness> { + // FIXME(const_trait_impl): remove `~const` parser support once bootstrap has the new syntax + // in rustfmt Ok(if self.eat(exp!(Tilde)) { let tilde = self.prev_token.span; self.expect_keyword(exp!(Const))?; let span = tilde.to(self.prev_token.span); self.psess.gated_spans.gate(sym::const_trait_impl, span); BoundConstness::Maybe(span) + } else if self.check(exp!(OpenBracket)) + && self.look_ahead(1, |t| t.is_keyword(kw::Const)) + && self.look_ahead(2, |t| *t == token::CloseBracket) + { + let start = self.prev_token.span; + self.bump(); + self.expect_keyword(exp!(Const)).unwrap(); + self.bump(); + let span = start.to(self.prev_token.span); + self.psess.gated_spans.gate(sym::const_trait_impl, span); + BoundConstness::Maybe(span) } else if self.eat_keyword(exp!(Const)) { self.psess.gated_spans.gate(sym::const_trait_impl, self.prev_token.span); BoundConstness::Always(self.prev_token.span) @@ -1078,7 +1092,7 @@ impl<'a> Parser<'a> { /// TY_BOUND_NOPAREN = [for CONSTNESS ASYNCNESS | POLARITY] SIMPLE_PATH /// ``` /// - /// For example, this grammar accepts `for<'a: 'b> ~const ?m::Trait<'a>`. + /// For example, this grammar accepts `for<'a: 'b> [const] ?m::Trait<'a>`. fn parse_generic_ty_bound( &mut self, lo: Span, @@ -1105,7 +1119,7 @@ impl<'a> Parser<'a> { } // Recover erroneous lifetime bound with modifiers or binder. - // e.g. `T: for<'a> 'a` or `T: ~const 'a`. + // e.g. `T: for<'a> 'a` or `T: [const] 'a`. if self.token.is_lifetime() { let _: ErrorGuaranteed = self.error_lt_bound_with_modifiers(modifiers, binder_span); return self.parse_generic_lt_bound(lo, has_parens); 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 0c88bd3dcbc54..f643e61a98928 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 @@ -775,7 +775,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { param_env: ty::ParamEnv<'tcx>, span: Span, ) -> Diag<'a> { - // FIXME(const_trait_impl): 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 diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/on_unimplemented.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/on_unimplemented.rs index 89dab90dc681c..a52dbedfe1eb2 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/on_unimplemented.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/on_unimplemented.rs @@ -334,7 +334,7 @@ pub struct OnUnimplementedNote { pub append_const_msg: Option, } -/// Append a message for `~const Trait` errors. +/// Append a message for `[const] Trait` errors. #[derive(Clone, Copy, PartialEq, Eq, Debug, Default)] pub enum AppendConstMessage { #[default] diff --git a/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs b/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs index bdfe48a3928eb..8d049fedf230d 100644 --- a/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs +++ b/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs @@ -593,7 +593,7 @@ fn receiver_is_dispatchable<'tcx>( // will cause ambiguity that the user can't really avoid. // // We leave out certain complexities of the param-env query here. Specifically, we: - // 1. Do not add `~const` bounds since there are no `dyn const Trait`s. + // 1. Do not add `[const]` bounds since there are no `dyn const Trait`s. // 2. Do not add RPITIT self projection bounds for defaulted methods, since we // are not constructing a param-env for "inside" of the body of the defaulted // method, so we don't really care about projecting to a specific RPIT type, diff --git a/compiler/rustc_trait_selection/src/traits/effects.rs b/compiler/rustc_trait_selection/src/traits/effects.rs index e77d9e32cb98c..fc95e42d67fc4 100644 --- a/compiler/rustc_trait_selection/src/traits/effects.rs +++ b/compiler/rustc_trait_selection/src/traits/effects.rs @@ -252,20 +252,20 @@ fn evaluate_host_effect_for_destruct_goal<'tcx>( let self_ty = obligation.predicate.self_ty(); let const_conditions = match *self_ty.kind() { - // `ManuallyDrop` is trivially `~const Destruct` as we do not run any drop glue on it. + // `ManuallyDrop` is trivially `[const] Destruct` as we do not run any drop glue on it. ty::Adt(adt_def, _) if adt_def.is_manually_drop() => thin_vec![], - // An ADT is `~const Destruct` only if all of the fields are, - // *and* if there is a `Drop` impl, that `Drop` impl is also `~const`. + // An ADT is `[const] Destruct` only if all of the fields are, + // *and* if there is a `Drop` impl, that `Drop` impl is also `[const]`. ty::Adt(adt_def, args) => { let mut const_conditions: ThinVec<_> = adt_def .all_fields() .map(|field| ty::TraitRef::new(tcx, destruct_def_id, [field.ty(tcx, args)])) .collect(); match adt_def.destructor(tcx).map(|dtor| tcx.constness(dtor.did)) { - // `Drop` impl exists, but it's not const. Type cannot be `~const Destruct`. + // `Drop` impl exists, but it's not const. Type cannot be `[const] Destruct`. Some(hir::Constness::NotConst) => return Err(EvaluationFailure::NoSolution), - // `Drop` impl exists, and it's const. Require `Ty: ~const Drop` to hold. + // `Drop` impl exists, and it's const. Require `Ty: [const] Drop` to hold. Some(hir::Constness::Const) => { let drop_def_id = tcx.require_lang_item(LangItem::Drop, obligation.cause.span); let drop_trait_ref = ty::TraitRef::new(tcx, drop_def_id, [self_ty]); @@ -285,7 +285,7 @@ fn evaluate_host_effect_for_destruct_goal<'tcx>( tys.iter().map(|field_ty| ty::TraitRef::new(tcx, destruct_def_id, [field_ty])).collect() } - // Trivially implement `~const Destruct` + // Trivially implement `[const] Destruct` ty::Bool | ty::Char | ty::Int(..) @@ -300,14 +300,14 @@ fn evaluate_host_effect_for_destruct_goal<'tcx>( | ty::Infer(ty::InferTy::FloatVar(_) | ty::InferTy::IntVar(_)) | ty::Error(_) => thin_vec![], - // Coroutines and closures could implement `~const Drop`, + // Coroutines and closures could implement `[const] Drop`, // but they don't really need to right now. ty::Closure(_, _) | ty::CoroutineClosure(_, _) | ty::Coroutine(_, _) | ty::CoroutineWitness(_, _) => return Err(EvaluationFailure::NoSolution), - // FIXME(unsafe_binders): Unsafe binders could implement `~const Drop` + // FIXME(unsafe_binders): Unsafe binders could implement `[const] Drop` // if their inner type implements it. ty::UnsafeBinder(_) => return Err(EvaluationFailure::NoSolution), diff --git a/compiler/rustc_trait_selection/src/traits/specialize/mod.rs b/compiler/rustc_trait_selection/src/traits/specialize/mod.rs index b30fadd3e5b7d..4bb12694c478a 100644 --- a/compiler/rustc_trait_selection/src/traits/specialize/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/specialize/mod.rs @@ -233,7 +233,7 @@ pub(super) fn specialization_enabled_in(tcx: TyCtxt<'_>, _: LocalCrate) -> bool /// /// For the purposes of const traits, we also check that the specializing /// impl is not more restrictive than the parent impl. That is, if the -/// `parent_impl_def_id` is a const impl (conditionally based off of some `~const` +/// `parent_impl_def_id` is a const impl (conditionally based off of some `[const]` /// bounds), then `specializing_impl_def_id` must also be const for the same /// set of types. #[instrument(skip(tcx), level = "debug")] diff --git a/compiler/rustc_ty_utils/src/ty.rs b/compiler/rustc_ty_utils/src/ty.rs index d996ee2b60aa4..553f5e0e1b5d9 100644 --- a/compiler/rustc_ty_utils/src/ty.rs +++ b/compiler/rustc_ty_utils/src/ty.rs @@ -175,7 +175,7 @@ fn param_env(tcx: TyCtxt<'_>, def_id: DefId) -> ty::ParamEnv<'_> { } // We extend the param-env of our item with the const conditions of the item, - // since we're allowed to assume `~const` bounds hold within the item itself. + // since we're allowed to assume `[const]` bounds hold within the item itself. if tcx.is_conditionally_const(def_id) { predicates.extend( tcx.const_conditions(def_id).instantiate_identity(tcx).into_iter().map( diff --git a/compiler/rustc_type_ir/src/elaborate.rs b/compiler/rustc_type_ir/src/elaborate.rs index 852949d707bff..177bad96595e0 100644 --- a/compiler/rustc_type_ir/src/elaborate.rs +++ b/compiler/rustc_type_ir/src/elaborate.rs @@ -179,7 +179,7 @@ impl> Elaborator { ), }; } - // `T: ~const Trait` implies `T: ~const Supertrait`. + // `T: [const] Trait` implies `T: [const] Supertrait`. ty::ClauseKind::HostEffect(data) => self.extend_deduped( cx.explicit_implied_const_bounds(data.def_id()).iter_identity().map(|trait_ref| { elaboratable.child( diff --git a/compiler/rustc_type_ir/src/predicate.rs b/compiler/rustc_type_ir/src/predicate.rs index f02d9c988c8de..4643cd0ab850f 100644 --- a/compiler/rustc_type_ir/src/predicate.rs +++ b/compiler/rustc_type_ir/src/predicate.rs @@ -911,7 +911,7 @@ pub enum BoundConstness { /// /// A bound is required to be unconditionally const, even in a runtime function. Const, - /// `Type: ~const Trait` + /// `Type: [const] Trait` /// /// Requires resolving to const only when we are in a const context. Maybe, @@ -929,7 +929,7 @@ impl BoundConstness { pub fn as_str(self) -> &'static str { match self { Self::Const => "const", - Self::Maybe => "~const", + Self::Maybe => "[const]", } } } @@ -938,7 +938,7 @@ impl fmt::Display for BoundConstness { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { Self::Const => f.write_str("const"), - Self::Maybe => f.write_str("~const"), + Self::Maybe => f.write_str("[const]"), } } } diff --git a/compiler/rustc_type_ir/src/solve/mod.rs b/compiler/rustc_type_ir/src/solve/mod.rs index bbbeaa29f84aa..a6571ef261a16 100644 --- a/compiler/rustc_type_ir/src/solve/mod.rs +++ b/compiler/rustc_type_ir/src/solve/mod.rs @@ -79,7 +79,7 @@ pub enum GoalSource { TypeRelating, /// We're proving a where-bound of an impl. ImplWhereBound, - /// Const conditions that need to hold for `~const` alias bounds to hold. + /// Const conditions that need to hold for `[const]` alias bounds to hold. AliasBoundConstCondition, /// Instantiating a higher-ranked goal and re-proving it. InstantiateHigherRanked, diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index d77bdf09d010a..3d027db2622df 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -227,7 +227,7 @@ fn clean_generic_bound<'tcx>( Some(match bound { hir::GenericBound::Outlives(lt) => GenericBound::Outlives(clean_lifetime(lt, cx)), hir::GenericBound::Trait(t) => { - // `T: ~const Destruct` is hidden because `T: Destruct` is a no-op. + // `T: [const] Destruct` is hidden because `T: Destruct` is a no-op. if let hir::BoundConstness::Maybe(_) = t.modifiers.constness && cx.tcx.lang_items().destruct_trait() == Some(t.trait_ref.trait_def_id().unwrap()) { @@ -395,7 +395,7 @@ pub(crate) fn clean_predicate<'tcx>( ty::ClauseKind::ConstEvaluatable(..) | ty::ClauseKind::WellFormed(..) | ty::ClauseKind::ConstArgHasType(..) - // FIXME(const_trait_impl): 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, } } @@ -404,7 +404,7 @@ fn clean_poly_trait_predicate<'tcx>( pred: ty::PolyTraitPredicate<'tcx>, cx: &mut DocContext<'tcx>, ) -> Option { - // `T: ~const Destruct` is hidden because `T: Destruct` is a no-op. + // `T: [const] Destruct` is hidden because `T: Destruct` is a no-op. // 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/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index 6ab1520386d8e..bcb3e57c84428 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -268,7 +268,7 @@ impl clean::GenericBound { fmt::from_fn(move |f| match self { clean::GenericBound::Outlives(lt) => write!(f, "{}", lt.print()), clean::GenericBound::TraitBound(ty, modifiers) => { - // `const` and `~const` trait bounds are experimental; don't render them. + // `const` and `[const]` trait bounds are experimental; don't render them. let hir::TraitBoundModifiers { polarity, constness: _ } = modifiers; f.write_str(match polarity { hir::BoundPolarity::Positive => "", 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 e629012b187cd..328fe3d428b8a 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 @@ -436,7 +436,7 @@ fn is_ty_const_destruct<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, body: &Body<'tcx> // 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 { - // If this doesn't need drop at all, then don't select `~const Destruct`. + // If this doesn't need drop at all, then don't select `[const] Destruct`. if !ty.needs_drop(tcx, body.typing_env(tcx)) { return false; } diff --git a/src/tools/clippy/tests/ui/assign_ops.fixed b/src/tools/clippy/tests/ui/assign_ops.fixed index 3bc6885d7c3e6..99beea850a258 100644 --- a/src/tools/clippy/tests/ui/assign_ops.fixed +++ b/src/tools/clippy/tests/ui/assign_ops.fixed @@ -91,7 +91,7 @@ mod issue14871 { impl const NumberConstants for T where - T: Number + ~const core::ops::Add, + T: Number + [const] core::ops::Add, { fn constant(value: usize) -> Self { let mut res = Self::ZERO; diff --git a/src/tools/clippy/tests/ui/assign_ops.rs b/src/tools/clippy/tests/ui/assign_ops.rs index f1f8f9daff95e..900d5ad38e03b 100644 --- a/src/tools/clippy/tests/ui/assign_ops.rs +++ b/src/tools/clippy/tests/ui/assign_ops.rs @@ -91,7 +91,7 @@ mod issue14871 { impl const NumberConstants for T where - T: Number + ~const core::ops::Add, + T: Number + [const] core::ops::Add, { fn constant(value: usize) -> Self { let mut res = Self::ZERO; diff --git a/src/tools/clippy/tests/ui/trait_duplication_in_bounds.fixed b/src/tools/clippy/tests/ui/trait_duplication_in_bounds.fixed index 666ff78b21897..cf52ecf2f0326 100644 --- a/src/tools/clippy/tests/ui/trait_duplication_in_bounds.fixed +++ b/src/tools/clippy/tests/ui/trait_duplication_in_bounds.fixed @@ -169,9 +169,9 @@ where // #13476 #[const_trait] trait ConstTrait {} -const fn const_trait_bounds_good() {} +const fn const_trait_bounds_good() {} -const fn const_trait_bounds_bad() {} +const fn const_trait_bounds_bad() {} //~^ trait_duplication_in_bounds fn projections() diff --git a/src/tools/clippy/tests/ui/trait_duplication_in_bounds.rs b/src/tools/clippy/tests/ui/trait_duplication_in_bounds.rs index a1a86fe058e63..955562f08dc32 100644 --- a/src/tools/clippy/tests/ui/trait_duplication_in_bounds.rs +++ b/src/tools/clippy/tests/ui/trait_duplication_in_bounds.rs @@ -169,9 +169,9 @@ where // #13476 #[const_trait] trait ConstTrait {} -const fn const_trait_bounds_good() {} +const fn const_trait_bounds_good() {} -const fn const_trait_bounds_bad() {} +const fn const_trait_bounds_bad() {} //~^ trait_duplication_in_bounds fn projections() diff --git a/src/tools/clippy/tests/ui/trait_duplication_in_bounds.stderr b/src/tools/clippy/tests/ui/trait_duplication_in_bounds.stderr index d76b4e458480f..ab31721ef5157 100644 --- a/src/tools/clippy/tests/ui/trait_duplication_in_bounds.stderr +++ b/src/tools/clippy/tests/ui/trait_duplication_in_bounds.stderr @@ -61,8 +61,8 @@ LL | fn bad_trait_object(arg0: &(dyn Any + Send + Send)) { error: these bounds contain repeated elements --> tests/ui/trait_duplication_in_bounds.rs:174:36 | -LL | const fn const_trait_bounds_bad() {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `~const ConstTrait` +LL | const fn const_trait_bounds_bad() {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `[const] ConstTrait` error: these where clauses contain repeated elements --> tests/ui/trait_duplication_in_bounds.rs:181:8 diff --git a/src/tools/rustfmt/tests/source/type.rs b/src/tools/rustfmt/tests/source/type.rs index 7a232f85198a8..213fad7cb16b7 100644 --- a/src/tools/rustfmt/tests/source/type.rs +++ b/src/tools/rustfmt/tests/source/type.rs @@ -142,18 +142,18 @@ type MyFn = fn(a: SomeLongComplexType, b: SomeOtherLongComplexType,) -> Box() -> i32 { ::CONST } +const fn not_quite_const() -> i32 { ::CONST } -impl ~ const T {} +impl const T for U {} -fn apit(_: impl ~ const T) {} +fn apit(_: impl [ const ] T) {} -fn rpit() -> impl ~ const T { S } +fn rpit() -> impl [ const] T { S } pub struct Foo(T); -impl Foo { +impl Foo { fn new(t: T) -> Self { Self(t) } diff --git a/src/tools/rustfmt/tests/target/type.rs b/src/tools/rustfmt/tests/target/type.rs index 325adb52f3f99..93479f8b484cb 100644 --- a/src/tools/rustfmt/tests/target/type.rs +++ b/src/tools/rustfmt/tests/target/type.rs @@ -147,22 +147,22 @@ type MyFn = fn( // Const bound -trait T: ~const Super {} +trait T: [const] Super {} -const fn not_quite_const() -> i32 { +const fn not_quite_const() -> i32 { ::CONST } -impl ~const T {} +impl const T for U {} -fn apit(_: impl ~const T) {} +fn apit(_: impl [const] T) {} -fn rpit() -> impl ~const T { +fn rpit() -> impl [const] T { S } pub struct Foo(T); -impl Foo { +impl Foo { fn new(t: T) -> Self { Self(t) } diff --git a/tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-disabled.stderr b/tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-disabled.stderr index 82f57864d859e..be3de58098325 100644 --- a/tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-disabled.stderr +++ b/tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-disabled.stderr @@ -1,10 +1,10 @@ -error: `~const` is not allowed here +error: `[const]` is not allowed here --> const-super-trait.rs:7:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ | -note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds +note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds --> const-super-trait.rs:7:1 | LL | trait Bar: ~const Foo {} @@ -30,7 +30,7 @@ LL | const fn foo(x: &T) { = 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 -error: `~const` can only be applied to `#[const_trait]` traits +error: `[const]` can only be applied to `#[const_trait]` traits --> const-super-trait.rs:7:12 | LL | trait Bar: ~const Foo {} @@ -41,7 +41,7 @@ help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[ LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits +error: `[const]` can only be applied to `#[const_trait]` traits --> const-super-trait.rs:9:17 | LL | const fn foo(x: &T) { diff --git a/tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-enabled.stderr b/tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-enabled.stderr index 8f4c78ccfa4c2..ef764a62b0667 100644 --- a/tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-enabled.stderr +++ b/tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-enabled.stderr @@ -1,16 +1,16 @@ -error: `~const` is not allowed here +error: `[const]` is not allowed here --> const-super-trait.rs:7:12 | LL | trait Bar: ~const Foo {} | ^^^^^^ | -note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds +note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds --> const-super-trait.rs:7:1 | LL | trait Bar: ~const Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^ -error: `~const` can only be applied to `#[const_trait]` traits +error: `[const]` can only be applied to `#[const_trait]` traits --> const-super-trait.rs:7:12 | LL | trait Bar: ~const Foo {} @@ -21,7 +21,7 @@ help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits +error: `[const]` can only be applied to `#[const_trait]` traits --> const-super-trait.rs:9:17 | LL | const fn foo(x: &T) { diff --git a/tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-disabled.stderr b/tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-disabled.stderr index b7cd7097f4447..a23793580f7a8 100644 --- a/tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-disabled.stderr +++ b/tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-disabled.stderr @@ -1,10 +1,10 @@ -error: `~const` is not allowed here +error: `[const]` is not allowed here --> const-super-trait.rs:7:12 | 7 | trait Bar: ~const Foo {} | ^^^^^^ | -note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds +note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds --> const-super-trait.rs:7:1 | 7 | trait Bar: ~const Foo {} @@ -26,25 +26,25 @@ error[E0658]: const trait impls are experimental | = note: see issue #67792 for more information -error: `~const` can only be applied to `#[const_trait]` traits +error: `[const]` can only be applied to `#[const_trait]` traits --> const-super-trait.rs:7:12 | 7 | trait Bar: ~const Foo {} | ^^^^^^ can't be applied to `Foo` | -note: `Foo` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Foo` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> const-super-trait.rs:3:1 | 3 | trait Foo { | ^^^^^^^^^ -error: `~const` can only be applied to `#[const_trait]` traits +error: `[const]` can only be applied to `#[const_trait]` traits --> const-super-trait.rs:9:17 | 9 | const fn foo(x: &T) { | ^^^^^^ can't be applied to `Bar` | -note: `Bar` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Bar` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> const-super-trait.rs:7:1 | 7 | trait Bar: ~const Foo {} diff --git a/tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-enabled.stderr b/tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-enabled.stderr index 4c59d870671d0..2cdeb277ca4a6 100644 --- a/tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-enabled.stderr +++ b/tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-enabled.stderr @@ -1,10 +1,10 @@ -error: `~const` is not allowed here +error: `[const]` is not allowed here --> const-super-trait.rs:7:12 | 7 | trait Bar: ~const Foo {} | ^^^^^^ | -note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds +note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds --> const-super-trait.rs:7:1 | 7 | trait Bar: ~const Foo {} @@ -16,25 +16,25 @@ error[E0554]: `#![feature]` may not be used on the NIGHTLY release channel 1 | #![cfg_attr(feature_enabled, feature(const_trait_impl))] | ^^^^^^^^^^^^^^^^^^^^^^^^^ -error: `~const` can only be applied to `#[const_trait]` traits +error: `[const]` can only be applied to `#[const_trait]` traits --> const-super-trait.rs:7:12 | 7 | trait Bar: ~const Foo {} | ^^^^^^ can't be applied to `Foo` | -note: `Foo` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Foo` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> const-super-trait.rs:3:1 | 3 | trait Foo { | ^^^^^^^^^ -error: `~const` can only be applied to `#[const_trait]` traits +error: `[const]` can only be applied to `#[const_trait]` traits --> const-super-trait.rs:9:17 | 9 | const fn foo(x: &T) { | ^^^^^^ can't be applied to `Bar` | -note: `Bar` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Bar` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> const-super-trait.rs:7:1 | 7 | trait Bar: ~const Foo {} diff --git a/tests/rustdoc/constant/const-effect-param.rs b/tests/rustdoc/constant/const-effect-param.rs index cceb0adac3096..3dc63fb3d30f6 100644 --- a/tests/rustdoc/constant/const-effect-param.rs +++ b/tests/rustdoc/constant/const-effect-param.rs @@ -11,4 +11,4 @@ pub trait Tr { //@ has foo/fn.g.html //@ has - '//pre[@class="rust item-decl"]' 'pub const fn g()' /// foo -pub const fn g() {} +pub const fn g() {} diff --git a/tests/rustdoc/constant/rfc-2632-const-trait-impl.rs b/tests/rustdoc/constant/rfc-2632-const-trait-impl.rs index 8a86e3e5e9782..e304eff14e8cb 100644 --- a/tests/rustdoc/constant/rfc-2632-const-trait-impl.rs +++ b/tests/rustdoc/constant/rfc-2632-const-trait-impl.rs @@ -1,12 +1,12 @@ -// Test that we do not currently display `~const` in rustdoc -// as that syntax is currently provisional; `~const Destruct` has +// Test that we do not currently display `[const]` in rustdoc +// as that syntax is currently provisional; `[const] Destruct` has // no effect on stable code so it should be hidden as well. // // To future blessers: make sure that `const_trait_impl` is // stabilized when changing `@!has` to `@has`, and please do // not remove this test. // -// FIXME(const_trait_impl) add `const_trait` to `Fn` so we use `~const` +// 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"] @@ -15,58 +15,58 @@ use std::marker::Destruct; pub struct S(T); -//@ !has foo/trait.Tr.html '//pre[@class="rust item-decl"]/code/a[@class="trait"]' '~const' +//@ !has foo/trait.Tr.html '//pre[@class="rust item-decl"]/code/a[@class="trait"]' '[const]' //@ has - '//pre[@class="rust item-decl"]/code/a[@class="trait"]' 'Fn' -//@ !has - '//pre[@class="rust item-decl"]/code/span[@class="where"]' '~const' +//@ !has - '//pre[@class="rust item-decl"]/code/span[@class="where"]' '[const]' //@ has - '//pre[@class="rust item-decl"]/code/span[@class="where"]' ': Fn' #[const_trait] pub trait Tr { - //@ !has - '//section[@id="method.a"]/h4[@class="code-header"]' '~const' + //@ !has - '//section[@id="method.a"]/h4[@class="code-header"]' '[const]' //@ has - '//section[@id="method.a"]/h4[@class="code-header"]/a[@class="trait"]' 'Fn' - //@ !has - '//section[@id="method.a"]/h4[@class="code-header"]/span[@class="where"]' '~const' + //@ !has - '//section[@id="method.a"]/h4[@class="code-header"]/span[@class="where"]' '[const]' //@ has - '//section[@id="method.a"]/h4[@class="code-header"]/div[@class="where"]' ': Fn' - fn a() + fn a() where - Option: /* ~const */ Fn() /* + ~const Destruct */, + Option: /* [const] */ Fn() /* + [const] Destruct */, { } } //@ has - '//section[@id="impl-Tr%3CT%3E-for-T"]' '' -//@ !has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]' '~const' +//@ !has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]' '[const]' //@ has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/a[@class="trait"]' 'Fn' -//@ !has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/span[@class="where"]' '~const' +//@ !has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/span[@class="where"]' '[const]' //@ has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/div[@class="where"]' ': Fn' -impl const Tr for T +impl const Tr for T where - Option: /* ~const */ Fn() /* + ~const Destruct */, + Option: /* [const] */ Fn() /* + [const] Destruct */, { - fn a() + fn a() where - Option: /* ~const */ Fn() /* + ~const Destruct */, + Option: /* [const] */ Fn() /* + [const] Destruct */, { } } -//@ !has foo/fn.foo.html '//pre[@class="rust item-decl"]/code/a[@class="trait"]' '~const' +//@ !has foo/fn.foo.html '//pre[@class="rust item-decl"]/code/a[@class="trait"]' '[const]' //@ has - '//pre[@class="rust item-decl"]/code/a[@class="trait"]' 'Fn' -//@ !has - '//pre[@class="rust item-decl"]/code/div[@class="where"]' '~const' +//@ !has - '//pre[@class="rust item-decl"]/code/div[@class="where"]' '[const]' //@ has - '//pre[@class="rust item-decl"]/code/div[@class="where"]' ': Fn' -pub const fn foo() +pub const fn foo() where - Option: /* ~const */ Fn() /* + ~const Destruct */, + Option: /* [const] */ Fn() /* + [const] Destruct */, { F::a() } impl S { - //@ !has foo/struct.S.html '//section[@id="method.foo"]/h4[@class="code-header"]' '~const' + //@ !has foo/struct.S.html '//section[@id="method.foo"]/h4[@class="code-header"]' '[const]' //@ has - '//section[@id="method.foo"]/h4[@class="code-header"]/a[@class="trait"]' 'Fn' - //@ !has - '//section[@id="method.foo"]/h4[@class="code-header"]/span[@class="where"]' '~const' + //@ !has - '//section[@id="method.foo"]/h4[@class="code-header"]/span[@class="where"]' '[const]' //@ has - '//section[@id="method.foo"]/h4[@class="code-header"]/div[@class="where"]' ': Fn' - pub const fn foo() + pub const fn foo() where - B: /* ~const */ Fn() /* + ~const Destruct */, + B: /* [const] */ Fn() /* + [const] Destruct */, { B::a() } diff --git a/tests/rustdoc/inline_cross/auxiliary/const-effect-param.rs b/tests/rustdoc/inline_cross/auxiliary/const-effect-param.rs index db198e0fce993..d7d7b32e2b8b7 100644 --- a/tests/rustdoc/inline_cross/auxiliary/const-effect-param.rs +++ b/tests/rustdoc/inline_cross/auxiliary/const-effect-param.rs @@ -4,7 +4,7 @@ #[const_trait] pub trait Resource {} -pub const fn load() -> i32 { +pub const fn load() -> i32 { 0 } 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 bc91fc1700eaf..2f92a528bf728 100644 --- a/tests/ui/const-generics/const_trait_fn-issue-88433.rs +++ b/tests/ui/const-generics/const_trait_fn-issue-88433.rs @@ -10,7 +10,6 @@ trait Func { fn call_once(self, arg: T) -> Self::Output; } - struct Closure; impl const Func<&usize> for Closure { @@ -21,7 +20,7 @@ impl const Func<&usize> for Closure { } } -enum Bug { +enum Bug { V(T), } diff --git a/tests/ui/const-generics/issues/issue-88119.stderr b/tests/ui/const-generics/issues/issue-88119.stderr index 94f06bbbbc45a..0aabf48011dcd 100644 --- a/tests/ui/const-generics/issues/issue-88119.stderr +++ b/tests/ui/const-generics/issues/issue-88119.stderr @@ -6,7 +6,7 @@ LL | #![feature(const_trait_impl, generic_const_exprs)] | = help: remove one of these features -error[E0275]: overflow evaluating the requirement `&T: ~const ConstName` +error[E0275]: overflow evaluating the requirement `&T: [const] ConstName` --> $DIR/issue-88119.rs:19:49 | LL | impl const ConstName for &T @@ -42,7 +42,7 @@ note: required by a bound in `<&T as ConstName>` LL | [(); name_len::()]:, | ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `<&T as ConstName>` -error[E0275]: overflow evaluating the requirement `&mut T: ~const ConstName` +error[E0275]: overflow evaluating the requirement `&mut T: [const] ConstName` --> $DIR/issue-88119.rs:26:49 | LL | impl const ConstName for &mut T diff --git a/tests/ui/consts/const-block-const-bound.rs b/tests/ui/consts/const-block-const-bound.rs index b4b89a93e759f..1847c880a3915 100644 --- a/tests/ui/consts/const-block-const-bound.rs +++ b/tests/ui/consts/const-block-const-bound.rs @@ -3,7 +3,7 @@ use std::marker::Destruct; -const fn f(x: T) {} +const fn f(x: T) {} struct UnconstDrop; diff --git a/tests/ui/consts/const-block-const-bound.stderr b/tests/ui/consts/const-block-const-bound.stderr index 624772f5aedc6..b6c8027918ff0 100644 --- a/tests/ui/consts/const-block-const-bound.stderr +++ b/tests/ui/consts/const-block-const-bound.stderr @@ -9,8 +9,8 @@ LL | f(UnconstDrop); note: required by a bound in `f` --> $DIR/const-block-const-bound.rs:6:15 | -LL | const fn f(x: T) {} - | ^^^^^^^^^^^^^^^ required by this bound in `f` +LL | const fn f(x: T) {} + | ^^^^^^^^^^^^^^^^ required by this bound in `f` error: aborting due to 1 previous error diff --git a/tests/ui/consts/constifconst-call-in-const-position.rs b/tests/ui/consts/constifconst-call-in-const-position.rs index 80e47c2230f22..da29030dbc746 100644 --- a/tests/ui/consts/constifconst-call-in-const-position.rs +++ b/tests/ui/consts/constifconst-call-in-const-position.rs @@ -14,7 +14,7 @@ impl Tr for () { } } -const fn foo() -> [u8; T::a()] { +const fn foo() -> [u8; T::a()] { [0; T::a()] } diff --git a/tests/ui/consts/constifconst-call-in-const-position.stderr b/tests/ui/consts/constifconst-call-in-const-position.stderr index c778299560fab..e84e686251a5b 100644 --- a/tests/ui/consts/constifconst-call-in-const-position.stderr +++ b/tests/ui/consts/constifconst-call-in-const-position.stderr @@ -1,8 +1,8 @@ error[E0277]: the trait bound `T: const Tr` is not satisfied - --> $DIR/constifconst-call-in-const-position.rs:17:38 + --> $DIR/constifconst-call-in-const-position.rs:17:39 | -LL | const fn foo() -> [u8; T::a()] { - | ^ +LL | const fn foo() -> [u8; T::a()] { + | ^ error[E0277]: the trait bound `T: const Tr` is not satisfied --> $DIR/constifconst-call-in-const-position.rs:18:9 diff --git a/tests/ui/consts/fn_trait_refs.rs b/tests/ui/consts/fn_trait_refs.rs index af233efd738a2..e475c0a1b6fd1 100644 --- a/tests/ui/consts/fn_trait_refs.rs +++ b/tests/ui/consts/fn_trait_refs.rs @@ -11,47 +11,47 @@ use std::marker::Destruct; const fn tester_fn(f: T) -> T::Output where - T: ~const Fn<()> + ~const Destruct, + T: [const] Fn<()> + [const] Destruct, { f() } const fn tester_fn_mut(mut f: T) -> T::Output where - T: ~const FnMut<()> + ~const Destruct, + T: [const] FnMut<()> + [const] Destruct, { f() } const fn tester_fn_once(f: T) -> T::Output where - T: ~const FnOnce<()>, + T: [const] FnOnce<()>, { f() } const fn test_fn(mut f: T) -> (T::Output, T::Output, T::Output) where - T: ~const Fn<()> + ~const Destruct, + T: [const] Fn<()> + [const] Destruct, { ( - // impl const Fn for &F + // impl const Fn for &F tester_fn(&f), - // impl const FnMut for &F + // impl const FnMut for &F tester_fn_mut(&f), - // impl const FnOnce for &F + // impl const FnOnce for &F tester_fn_once(&f), ) } const fn test_fn_mut(mut f: T) -> (T::Output, T::Output) where - T: ~const FnMut<()> + ~const Destruct, + T: [const] FnMut<()> + [const] Destruct, { ( - // impl const FnMut for &mut F + // impl const FnMut for &mut F tester_fn_mut(&mut f), - // impl const FnOnce for &mut F + // impl const FnOnce for &mut F tester_fn_once(&mut f), ) } diff --git a/tests/ui/consts/fn_trait_refs.stderr b/tests/ui/consts/fn_trait_refs.stderr index 7dc0804988963..ee716c932e832 100644 --- a/tests/ui/consts/fn_trait_refs.stderr +++ b/tests/ui/consts/fn_trait_refs.stderr @@ -4,148 +4,148 @@ error[E0635]: unknown feature `const_fn_trait_ref_impls` LL | #![feature(const_fn_trait_ref_impls)] | ^^^^^^^^^^^^^^^^^^^^^^^^ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/fn_trait_refs.rs:14:8 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/fn_trait_refs.rs:14:6 | -LL | T: ~const Fn<()> + ~const Destruct, - | ^^^^^^ can't be applied to `Fn` +LL | T: [const] Fn<()> + [const] Destruct, + | ^^^^^^^^^ can't be applied to `Fn` | -note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/fn_trait_refs.rs:14:8 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/fn_trait_refs.rs:14:6 | -LL | T: ~const Fn<()> + ~const Destruct, - | ^^^^^^ can't be applied to `Fn` +LL | T: [const] Fn<()> + [const] Destruct, + | ^^^^^^^^^ can't be applied to `Fn` | -note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/fn_trait_refs.rs:14:8 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/fn_trait_refs.rs:14:6 | -LL | T: ~const Fn<()> + ~const Destruct, - | ^^^^^^ can't be applied to `Fn` +LL | T: [const] Fn<()> + [const] Destruct, + | ^^^^^^^^^ can't be applied to `Fn` | -note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/fn_trait_refs.rs:21:8 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/fn_trait_refs.rs:21:6 | -LL | T: ~const FnMut<()> + ~const Destruct, - | ^^^^^^ can't be applied to `FnMut` +LL | T: [const] FnMut<()> + [const] Destruct, + | ^^^^^^^^^ can't be applied to `FnMut` | -note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/fn_trait_refs.rs:21:8 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/fn_trait_refs.rs:21:6 | -LL | T: ~const FnMut<()> + ~const Destruct, - | ^^^^^^ can't be applied to `FnMut` +LL | T: [const] FnMut<()> + [const] Destruct, + | ^^^^^^^^^ can't be applied to `FnMut` | -note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/fn_trait_refs.rs:21:8 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/fn_trait_refs.rs:21:6 | -LL | T: ~const FnMut<()> + ~const Destruct, - | ^^^^^^ can't be applied to `FnMut` +LL | T: [const] FnMut<()> + [const] Destruct, + | ^^^^^^^^^ can't be applied to `FnMut` | -note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/fn_trait_refs.rs:28:8 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/fn_trait_refs.rs:28:6 | -LL | T: ~const FnOnce<()>, - | ^^^^^^ can't be applied to `FnOnce` +LL | T: [const] FnOnce<()>, + | ^^^^^^^^^ can't be applied to `FnOnce` | -note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/fn_trait_refs.rs:28:8 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/fn_trait_refs.rs:28:6 | -LL | T: ~const FnOnce<()>, - | ^^^^^^ can't be applied to `FnOnce` +LL | T: [const] FnOnce<()>, + | ^^^^^^^^^ can't be applied to `FnOnce` | -note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/fn_trait_refs.rs:28:8 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/fn_trait_refs.rs:28:6 | -LL | T: ~const FnOnce<()>, - | ^^^^^^ can't be applied to `FnOnce` +LL | T: [const] FnOnce<()>, + | ^^^^^^^^^ can't be applied to `FnOnce` | -note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/fn_trait_refs.rs:35:8 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/fn_trait_refs.rs:35:6 | -LL | T: ~const Fn<()> + ~const Destruct, - | ^^^^^^ can't be applied to `Fn` +LL | T: [const] Fn<()> + [const] Destruct, + | ^^^^^^^^^ can't be applied to `Fn` | -note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/fn_trait_refs.rs:35:8 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/fn_trait_refs.rs:35:6 | -LL | T: ~const Fn<()> + ~const Destruct, - | ^^^^^^ can't be applied to `Fn` +LL | T: [const] Fn<()> + [const] Destruct, + | ^^^^^^^^^ can't be applied to `Fn` | -note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/fn_trait_refs.rs:35:8 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/fn_trait_refs.rs:35:6 | -LL | T: ~const Fn<()> + ~const Destruct, - | ^^^^^^ can't be applied to `Fn` +LL | T: [const] Fn<()> + [const] Destruct, + | ^^^^^^^^^ can't be applied to `Fn` | -note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/fn_trait_refs.rs:49:8 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/fn_trait_refs.rs:49:6 | -LL | T: ~const FnMut<()> + ~const Destruct, - | ^^^^^^ can't be applied to `FnMut` +LL | T: [const] FnMut<()> + [const] Destruct, + | ^^^^^^^^^ can't be applied to `FnMut` | -note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/fn_trait_refs.rs:49:8 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/fn_trait_refs.rs:49:6 | -LL | T: ~const FnMut<()> + ~const Destruct, - | ^^^^^^ can't be applied to `FnMut` +LL | T: [const] FnMut<()> + [const] Destruct, + | ^^^^^^^^^ can't be applied to `FnMut` | -note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/fn_trait_refs.rs:49:8 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/fn_trait_refs.rs:49:6 | -LL | T: ~const FnMut<()> + ~const Destruct, - | ^^^^^^ can't be applied to `FnMut` +LL | T: [const] FnMut<()> + [const] Destruct, + | ^^^^^^^^^ can't be applied to `FnMut` | -note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` diff --git a/tests/ui/consts/issue-73976-monomorphic.stderr b/tests/ui/consts/issue-73976-monomorphic.stderr index e5b32e0c4adff..367d5be09da4e 100644 --- a/tests/ui/consts/issue-73976-monomorphic.stderr +++ b/tests/ui/consts/issue-73976-monomorphic.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `TypeId: ~const PartialEq` is not satisfied +error[E0277]: the trait bound `TypeId: [const] PartialEq` is not satisfied --> $DIR/issue-73976-monomorphic.rs:21:5 | LL | GetTypeId::::VALUE == GetTypeId::::VALUE diff --git a/tests/ui/consts/unstable-const-fn-in-libcore.rs b/tests/ui/consts/unstable-const-fn-in-libcore.rs index baeece40a52bb..f4b4c687bd2ea 100644 --- a/tests/ui/consts/unstable-const-fn-in-libcore.rs +++ b/tests/ui/consts/unstable-const-fn-in-libcore.rs @@ -16,7 +16,7 @@ enum Opt { impl Opt { #[rustc_const_unstable(feature = "foo", issue = "none")] #[stable(feature = "rust1", since = "1.0.0")] - const fn unwrap_or_else T>(self, f: F) -> T { + const fn unwrap_or_else T>(self, f: F) -> T { //FIXME ~^ ERROR destructor of //FIXME ~| ERROR destructor of match self { diff --git a/tests/ui/consts/unstable-const-fn-in-libcore.stderr b/tests/ui/consts/unstable-const-fn-in-libcore.stderr index 32693edbfcbda..b43fa1f7e6c35 100644 --- a/tests/ui/consts/unstable-const-fn-in-libcore.stderr +++ b/tests/ui/consts/unstable-const-fn-in-libcore.stderr @@ -1,19 +1,19 @@ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/unstable-const-fn-in-libcore.rs:19:32 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/unstable-const-fn-in-libcore.rs:19:30 | -LL | const fn unwrap_or_else T>(self, f: F) -> T { - | ^^^^^^ can't be applied to `FnOnce` +LL | const fn unwrap_or_else T>(self, f: F) -> T { + | ^^^^^^^^^ can't be applied to `FnOnce` | -note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/unstable-const-fn-in-libcore.rs:19:32 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/unstable-const-fn-in-libcore.rs:19:30 | -LL | const fn unwrap_or_else T>(self, f: F) -> T { - | ^^^^^^ can't be applied to `FnOnce` +LL | const fn unwrap_or_else T>(self, f: F) -> T { + | ^^^^^^^^^ can't be applied to `FnOnce` | -note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` @@ -26,19 +26,19 @@ LL | Opt::None => f(), = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants error[E0493]: destructor of `F` cannot be evaluated at compile-time - --> $DIR/unstable-const-fn-in-libcore.rs:19:60 + --> $DIR/unstable-const-fn-in-libcore.rs:19:61 | -LL | const fn unwrap_or_else T>(self, f: F) -> T { - | ^ the destructor for this type cannot be evaluated in constant functions +LL | const fn unwrap_or_else T>(self, f: F) -> T { + | ^ the destructor for this type cannot be evaluated in constant functions ... LL | } | - value is dropped here error[E0493]: destructor of `Opt` cannot be evaluated at compile-time - --> $DIR/unstable-const-fn-in-libcore.rs:19:54 + --> $DIR/unstable-const-fn-in-libcore.rs:19:55 | -LL | const fn unwrap_or_else T>(self, f: F) -> T { - | ^^^^ the destructor for this type cannot be evaluated in constant functions +LL | const fn unwrap_or_else T>(self, f: F) -> T { + | ^^^^ the destructor for this type cannot be evaluated in constant functions ... LL | } | - value is dropped here diff --git a/tests/ui/impl-trait/normalize-tait-in-const.rs b/tests/ui/impl-trait/normalize-tait-in-const.rs index a735ef766737b..0c7969c0e9ed8 100644 --- a/tests/ui/impl-trait/normalize-tait-in-const.rs +++ b/tests/ui/impl-trait/normalize-tait-in-const.rs @@ -24,7 +24,7 @@ mod foo { } use foo::*; -const fn with_positive ~const Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) { +const fn with_positive [const] Fn(&'a Alias<'a>) + [const] Destruct>(fun: F) { fun(filter_positive()); } diff --git a/tests/ui/impl-trait/normalize-tait-in-const.stderr b/tests/ui/impl-trait/normalize-tait-in-const.stderr index 2b6825b1ac672..01427c78dd982 100644 --- a/tests/ui/impl-trait/normalize-tait-in-const.stderr +++ b/tests/ui/impl-trait/normalize-tait-in-const.stderr @@ -1,19 +1,19 @@ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/normalize-tait-in-const.rs:27:35 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/normalize-tait-in-const.rs:27:33 | -LL | const fn with_positive ~const Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) { - | ^^^^^^ can't be applied to `Fn` +LL | const fn with_positive [const] Fn(&'a Alias<'a>) + [const] Destruct>(fun: F) { + | ^^^^^^^^^ can't be applied to `Fn` | -note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/normalize-tait-in-const.rs:27:35 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/normalize-tait-in-const.rs:27:33 | -LL | const fn with_positive ~const Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) { - | ^^^^^^ can't be applied to `Fn` +LL | const fn with_positive [const] Fn(&'a Alias<'a>) + [const] Destruct>(fun: F) { + | ^^^^^^^^^ can't be applied to `Fn` | -note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` diff --git a/tests/ui/macros/stringify.rs b/tests/ui/macros/stringify.rs index 3f3d9252adbe8..c858051a7ebfa 100644 --- a/tests/ui/macros/stringify.rs +++ b/tests/ui/macros/stringify.rs @@ -483,7 +483,6 @@ fn test_item() { c1!(item, [ impl Struct {} ], "impl Struct {}"); c1!(item, [ pub impl Trait for Struct {} ], "pub impl Trait for Struct {}"); c1!(item, [ impl const Trait for T {} ], "impl const Trait for T {}"); - c1!(item, [ impl ~const Struct {} ], "impl ~const Struct {}"); // ItemKind::MacCall c1!(item, [ mac!(); ], "mac!();"); @@ -730,7 +729,7 @@ fn test_ty() { c1!(ty, [ dyn Send + 'a ], "dyn Send + 'a"); c1!(ty, [ dyn 'a + Send ], "dyn 'a + Send"); c1!(ty, [ dyn ?Sized ], "dyn ?Sized"); - c1!(ty, [ dyn ~const Clone ], "dyn ~const Clone"); + c1!(ty, [ dyn [const] Clone ], "dyn [const] Clone"); c1!(ty, [ dyn for<'a> Send ], "dyn for<'a> Send"); // TyKind::ImplTrait @@ -738,7 +737,7 @@ fn test_ty() { c1!(ty, [ impl Send + 'a ], "impl Send + 'a"); c1!(ty, [ impl 'a + Send ], "impl 'a + Send"); c1!(ty, [ impl ?Sized ], "impl ?Sized"); - c1!(ty, [ impl ~const Clone ], "impl ~const Clone"); + c1!(ty, [ impl [const] Clone ], "impl [const] Clone"); c1!(ty, [ impl for<'a> Send ], "impl for<'a> Send"); // TyKind::Paren diff --git a/tests/ui/parser/bounds-type.rs b/tests/ui/parser/bounds-type.rs index ec0e83c314e1d..1bd67bbba6b0a 100644 --- a/tests/ui/parser/bounds-type.rs +++ b/tests/ui/parser/bounds-type.rs @@ -10,10 +10,10 @@ struct S< T: Tr +, // OK T: ?'a, //~ ERROR `?` may only modify trait bounds, not lifetime bounds - T: ~const Tr, // OK - T: ~const ?Tr, //~ ERROR `~const` trait not allowed with `?` trait polarity modifier - T: ~const Tr + 'a, // OK - T: ~const 'a, //~ ERROR `~const` may only modify trait bounds, not lifetime bounds + T: [const] Tr, // OK + T: [const] ?Tr, //~ ERROR `[const]` trait not allowed with `?` trait polarity modifier + T: [const] Tr + 'a, // OK + T: [const] 'a, //~ ERROR `[const]` may only modify trait bounds, not lifetime bounds T: const 'a, //~ ERROR `const` may only modify trait bounds, not lifetime bounds T: async Tr, // OK diff --git a/tests/ui/parser/bounds-type.stderr b/tests/ui/parser/bounds-type.stderr index 09c35c12b000a..0d929c76f0276 100644 --- a/tests/ui/parser/bounds-type.stderr +++ b/tests/ui/parser/bounds-type.stderr @@ -12,19 +12,19 @@ error: `?` may only modify trait bounds, not lifetime bounds LL | T: ?'a, | ^ -error: `~const` trait not allowed with `?` trait polarity modifier - --> $DIR/bounds-type.rs:14:15 +error: `[const]` trait not allowed with `?` trait polarity modifier + --> $DIR/bounds-type.rs:14:16 | -LL | T: ~const ?Tr, - | ------ ^ +LL | T: [const] ?Tr, + | ------- ^ | | - | there is not a well-defined meaning for a `~const ?` trait + | there is not a well-defined meaning for a `[const] ?` trait -error: `~const` may only modify trait bounds, not lifetime bounds - --> $DIR/bounds-type.rs:16:8 +error: `[const]` may only modify trait bounds, not lifetime bounds + --> $DIR/bounds-type.rs:16:6 | -LL | T: ~const 'a, - | ^^^^^^ +LL | T: [const] 'a, + | ^^^^^^^^^ error: `const` may only modify trait bounds, not lifetime bounds --> $DIR/bounds-type.rs:17:8 diff --git a/tests/ui/parser/trait-object-delimiters.rs b/tests/ui/parser/trait-object-delimiters.rs index 8f6221c1b9434..1cbd2ff1bdfb6 100644 --- a/tests/ui/parser/trait-object-delimiters.rs +++ b/tests/ui/parser/trait-object-delimiters.rs @@ -8,7 +8,7 @@ fn foo2(_: &dyn (Drop + AsRef)) {} //~ ERROR incorrect parentheses around t fn foo2_no_space(_: &dyn(Drop + AsRef)) {} //~ ERROR incorrect parentheses around trait bounds fn foo3(_: &dyn {Drop + AsRef}) {} //~ ERROR expected parameter name, found `{` -//~^ ERROR expected one of `!`, `(`, `)`, `*`, `,`, `?`, `async`, `const`, `for`, `use`, `~`, lifetime, or path, found `{` +//~^ ERROR expected one of `!`, `(`, `)`, `*`, `,`, `?`, `[`, `async`, `const`, `for`, `use`, `~`, lifetime, or path, found `{` //~| ERROR at least one trait is required for an object type fn foo4(_: &dyn >) {} //~ ERROR expected identifier, found `<` diff --git a/tests/ui/parser/trait-object-delimiters.stderr b/tests/ui/parser/trait-object-delimiters.stderr index be130ac7ab231..16d5392eec84a 100644 --- a/tests/ui/parser/trait-object-delimiters.stderr +++ b/tests/ui/parser/trait-object-delimiters.stderr @@ -39,11 +39,11 @@ error: expected parameter name, found `{` LL | fn foo3(_: &dyn {Drop + AsRef}) {} | ^ expected parameter name -error: expected one of `!`, `(`, `)`, `*`, `,`, `?`, `async`, `const`, `for`, `use`, `~`, lifetime, or path, found `{` +error: expected one of `!`, `(`, `)`, `*`, `,`, `?`, `[`, `async`, `const`, `for`, `use`, `~`, lifetime, or path, found `{` --> $DIR/trait-object-delimiters.rs:10:17 | LL | fn foo3(_: &dyn {Drop + AsRef}) {} - | -^ expected one of 13 possible tokens + | -^ expected one of 14 possible tokens | | | help: missing `,` diff --git a/tests/ui/specialization/const_trait_impl.rs b/tests/ui/specialization/const_trait_impl.rs index d842601a6b7b9..2df92dfad3be5 100644 --- a/tests/ui/specialization/const_trait_impl.rs +++ b/tests/ui/specialization/const_trait_impl.rs @@ -10,7 +10,7 @@ pub unsafe trait Sup { #[rustc_specialization_trait] #[const_trait] -pub unsafe trait Sub: ~const Sup {} +pub unsafe trait Sub: [const] Sup {} unsafe impl const Sup for u8 { default fn foo() -> u32 { @@ -31,19 +31,19 @@ pub trait A { fn a() -> u32; } -impl const A for T { +impl const A for T { default fn a() -> u32 { 2 } } -impl const A for T { +impl const A for T { default fn a() -> u32 { 3 } } -impl const A for T { +impl const A for T { fn a() -> u32 { T::foo() } diff --git a/tests/ui/specialization/const_trait_impl.stderr b/tests/ui/specialization/const_trait_impl.stderr index 3e1260ff09c92..d36a0a1c2dc8f 100644 --- a/tests/ui/specialization/const_trait_impl.stderr +++ b/tests/ui/specialization/const_trait_impl.stderr @@ -1,57 +1,57 @@ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const_trait_impl.rs:34:9 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const_trait_impl.rs:34:7 | -LL | impl const A for T { - | ^^^^^^ can't be applied to `Default` +LL | impl const A for T { + | ^^^^^^^^^ can't be applied to `Default` | -note: `Default` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/default.rs:LL:COL -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const_trait_impl.rs:40:9 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const_trait_impl.rs:40:7 | -LL | impl const A for T { - | ^^^^^^ can't be applied to `Default` +LL | impl const A for T { + | ^^^^^^^^^ can't be applied to `Default` | -note: `Default` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/default.rs:LL:COL -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const_trait_impl.rs:46:9 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const_trait_impl.rs:46:7 | -LL | impl const A for T { - | ^^^^^^ can't be applied to `Default` +LL | impl const A for T { + | ^^^^^^^^^ can't be applied to `Default` | -note: `Default` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/default.rs:LL:COL -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const_trait_impl.rs:40:9 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const_trait_impl.rs:40:7 | -LL | impl const A for T { - | ^^^^^^ can't be applied to `Default` +LL | impl const A for T { + | ^^^^^^^^^ can't be applied to `Default` | -note: `Default` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/default.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const_trait_impl.rs:34:9 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const_trait_impl.rs:34:7 | -LL | impl const A for T { - | ^^^^^^ can't be applied to `Default` +LL | impl const A for T { + | ^^^^^^^^^ can't be applied to `Default` | -note: `Default` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/default.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const_trait_impl.rs:46:9 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const_trait_impl.rs:46:7 | -LL | impl const A for T { - | ^^^^^^ can't be applied to `Default` +LL | impl const A for T { + | ^^^^^^^^^ can't be applied to `Default` | -note: `Default` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/default.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` 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 9141d327aee87..ff1ce949f097d 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 @@ -6,15 +6,15 @@ #[const_trait] trait Trait { - type Assoc: ~const Trait; + type Assoc: [const] Trait; fn func() -> i32; } -const fn unqualified() -> i32 { +const fn unqualified() -> i32 { T::Assoc::func() } -const fn qualified() -> i32 { +const fn qualified() -> i32 { ::Assoc::func() } 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 19e86b50d3321..5773f2281c390 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 @@ -5,7 +5,7 @@ #[const_trait] trait Trait { - type Assoc: ~const Trait; + type Assoc: [const] Trait; fn func() -> i32; } diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.current.stderr b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.current.stderr index 4cd87002e4910..a0474e65efeba 100644 --- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.current.stderr +++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.current.stderr @@ -1,10 +1,10 @@ -error[E0277]: the trait bound `U: ~const Other` is not satisfied +error[E0277]: the trait bound `U: [const] Other` is not satisfied --> $DIR/assoc-type-const-bound-usage-fail-2.rs:24:5 | LL | T::Assoc::::func(); | ^^^^^^^^^^^^^ -error[E0277]: the trait bound `U: ~const Other` is not satisfied +error[E0277]: the trait bound `U: [const] Other` is not satisfied --> $DIR/assoc-type-const-bound-usage-fail-2.rs:26:5 | LL | ::Assoc::::func(); diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.next.stderr b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.next.stderr index 4cd87002e4910..a0474e65efeba 100644 --- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.next.stderr +++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.next.stderr @@ -1,10 +1,10 @@ -error[E0277]: the trait bound `U: ~const Other` is not satisfied +error[E0277]: the trait bound `U: [const] Other` is not satisfied --> $DIR/assoc-type-const-bound-usage-fail-2.rs:24:5 | LL | T::Assoc::::func(); | ^^^^^^^^^^^^^ -error[E0277]: the trait bound `U: ~const Other` is not satisfied +error[E0277]: the trait bound `U: [const] Other` is not satisfied --> $DIR/assoc-type-const-bound-usage-fail-2.rs:26:5 | LL | ::Assoc::::func(); 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 e1c30b5361124..5338c27bedca5 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 @@ -1,7 +1,7 @@ //@ revisions: current next //@[next] compile-flags: -Znext-solver -// Check that `~const` item bounds only hold if the where clauses on the +// Check that `[const]` item bounds only hold if the where clauses on the // associated type are also const. // i.e. check that we validate the const conditions for the associated type // when considering one of implied const bounds. @@ -10,9 +10,9 @@ #[const_trait] trait Trait { - type Assoc: ~const Trait + type Assoc: [const] Trait where - U: ~const Other; + U: [const] Other; fn func(); } @@ -20,14 +20,14 @@ trait Trait { #[const_trait] trait Other {} -const fn fails() { +const fn fails() { T::Assoc::::func(); - //~^ ERROR the trait bound `U: ~const Other` is not satisfied + //~^ ERROR the trait bound `U: [const] Other` is not satisfied ::Assoc::::func(); - //~^ ERROR the trait bound `U: ~const Other` is not satisfied + //~^ ERROR the trait bound `U: [const] Other` is not satisfied } -const fn works() { +const fn works() { T::Assoc::::func(); ::Assoc::::func(); } diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.current.stderr b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.current.stderr index 9c29a894749e9..20b01d06e8d5e 100644 --- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.current.stderr +++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.current.stderr @@ -1,10 +1,10 @@ -error[E0277]: the trait bound `T: ~const Trait` is not satisfied +error[E0277]: the trait bound `T: [const] Trait` is not satisfied --> $DIR/assoc-type-const-bound-usage-fail.rs:17:5 | LL | T::Assoc::func(); | ^^^^^^^^ -error[E0277]: the trait bound `T: ~const Trait` is not satisfied +error[E0277]: the trait bound `T: [const] Trait` is not satisfied --> $DIR/assoc-type-const-bound-usage-fail.rs:19:5 | LL | ::Assoc::func(); diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.next.stderr b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.next.stderr index 9c29a894749e9..20b01d06e8d5e 100644 --- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.next.stderr +++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.next.stderr @@ -1,10 +1,10 @@ -error[E0277]: the trait bound `T: ~const Trait` is not satisfied +error[E0277]: the trait bound `T: [const] Trait` is not satisfied --> $DIR/assoc-type-const-bound-usage-fail.rs:17:5 | LL | T::Assoc::func(); | ^^^^^^^^ -error[E0277]: the trait bound `T: ~const Trait` is not satisfied +error[E0277]: the trait bound `T: [const] Trait` is not satisfied --> $DIR/assoc-type-const-bound-usage-fail.rs:19: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 3761fea19684d..4940b3a1aa6ce 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 @@ -1,7 +1,7 @@ //@ revisions: current next //@[next] compile-flags: -Znext-solver -// Check that `~const` item bounds only hold if the parent trait is `~const`. +// Check that `[const]` item bounds only hold if the parent trait is `[const]`. // i.e. check that we validate the const conditions for the associated type // when considering one of implied const bounds. @@ -9,18 +9,18 @@ #[const_trait] trait Trait { - type Assoc: ~const Trait; + type Assoc: [const] Trait; fn func(); } const fn unqualified() { T::Assoc::func(); - //~^ ERROR the trait bound `T: ~const Trait` is not satisfied + //~^ ERROR the trait bound `T: [const] Trait` is not satisfied ::Assoc::func(); - //~^ ERROR the trait bound `T: ~const Trait` is not satisfied + //~^ ERROR the trait bound `T: [const] Trait` is not satisfied } -const fn works() { +const fn works() { T::Assoc::func(); ::Assoc::func(); } diff --git a/tests/ui/traits/const-traits/assoc-type.current.stderr b/tests/ui/traits/const-traits/assoc-type.current.stderr index 7526369194b4e..1e58efeedeea1 100644 --- a/tests/ui/traits/const-traits/assoc-type.current.stderr +++ b/tests/ui/traits/const-traits/assoc-type.current.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `NonConstAdd: ~const Add` is not satisfied +error[E0277]: the trait bound `NonConstAdd: [const] Add` is not satisfied --> $DIR/assoc-type.rs:37:16 | LL | type Bar = NonConstAdd; @@ -7,8 +7,8 @@ LL | type Bar = NonConstAdd; note: required by a bound in `Foo::Bar` --> $DIR/assoc-type.rs:33:15 | -LL | type Bar: ~const Add; - | ^^^^^^^^^^ required by this bound in `Foo::Bar` +LL | type Bar: [const] Add; + | ^^^^^^^^^^^ required by this bound in `Foo::Bar` error: aborting due to 1 previous error diff --git a/tests/ui/traits/const-traits/assoc-type.next.stderr b/tests/ui/traits/const-traits/assoc-type.next.stderr index 7526369194b4e..1e58efeedeea1 100644 --- a/tests/ui/traits/const-traits/assoc-type.next.stderr +++ b/tests/ui/traits/const-traits/assoc-type.next.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `NonConstAdd: ~const Add` is not satisfied +error[E0277]: the trait bound `NonConstAdd: [const] Add` is not satisfied --> $DIR/assoc-type.rs:37:16 | LL | type Bar = NonConstAdd; @@ -7,8 +7,8 @@ LL | type Bar = NonConstAdd; note: required by a bound in `Foo::Bar` --> $DIR/assoc-type.rs:33:15 | -LL | type Bar: ~const Add; - | ^^^^^^^^^^ required by this bound in `Foo::Bar` +LL | type Bar: [const] Add; + | ^^^^^^^^^^^ required by this bound in `Foo::Bar` error: aborting due to 1 previous error diff --git a/tests/ui/traits/const-traits/assoc-type.rs b/tests/ui/traits/const-traits/assoc-type.rs index a169b61994cbf..1faef1b0a3251 100644 --- a/tests/ui/traits/const-traits/assoc-type.rs +++ b/tests/ui/traits/const-traits/assoc-type.rs @@ -30,12 +30,12 @@ impl Add for NonConstAdd { #[const_trait] trait Foo { - type Bar: ~const Add; + type Bar: [const] Add; } impl const Foo for NonConstAdd { type Bar = NonConstAdd; - //~^ ERROR the trait bound `NonConstAdd: ~const Add` is not satisfied + //~^ ERROR the trait bound `NonConstAdd: [const] Add` is not satisfied } #[const_trait] diff --git a/tests/ui/traits/const-traits/auxiliary/minicore.rs b/tests/ui/traits/const-traits/auxiliary/minicore.rs index 073337b2ac6db..d2133bbbcaea4 100644 --- a/tests/ui/traits/const-traits/auxiliary/minicore.rs +++ b/tests/ui/traits/const-traits/auxiliary/minicore.rs @@ -86,14 +86,14 @@ enum ControlFlow { #[const_trait] #[lang = "fn"] #[rustc_paren_sugar] -pub trait Fn: ~const FnMut { +pub trait Fn: [const] FnMut { extern "rust-call" fn call(&self, args: Args) -> Self::Output; } #[const_trait] #[lang = "fn_mut"] #[rustc_paren_sugar] -pub trait FnMut: ~const FnOnce { +pub trait FnMut: [const] FnOnce { extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output; } @@ -142,7 +142,7 @@ pub trait Drop { #[const_trait] pub trait Residual { - type TryType: ~const Try + Try; + type TryType: [const] Try + Try; } const fn size_of() -> usize { @@ -183,7 +183,7 @@ pub unsafe trait SliceIndex { impl const Index for [T] where - I: ~const SliceIndex<[T]>, + I: [const] SliceIndex<[T]>, { type Output = I::Output; @@ -195,7 +195,7 @@ where impl const Index for [T; N] where - [T]: ~const Index, + [T]: [const] Index, { type Output = <[T] as Index>::Output; @@ -265,7 +265,7 @@ use Option::*; const fn as_deref(opt: &Option) -> Option<&T::Target> where - T: ~const Deref, + T: [const] Deref, { match opt { Option::Some(t) => Option::Some(t.deref()), @@ -285,7 +285,7 @@ pub trait From: Sized { impl const Into for T where - U: ~const From, + U: [const] From, { fn into(self) -> U { U::from(self) @@ -323,7 +323,7 @@ pub trait PartialEq: PointeeSized { impl const PartialEq<&B> for &A where - A: ~const PartialEq, + A: [const] PartialEq, { fn eq(&self, other: &&B) -> bool { PartialEq::eq(*self, *other) @@ -373,7 +373,7 @@ impl<'a, T: PointeeSized> Pin<&'a T> { impl Pin

{ const fn as_ref(&self) -> Pin<&P::Target> where - P: ~const Deref, + P: [const] Deref, { unsafe { Pin::new_unchecked(&*self.pointer) } } @@ -403,7 +403,7 @@ impl Option { } } -impl const Deref for Pin

{ +impl const Deref for Pin

{ type Target = P::Target; fn deref(&self) -> &P::Target { Pin::get_ref(Pin::as_ref(self)) @@ -467,7 +467,7 @@ pub trait Clone: Sized { fn clone(&self) -> Self; fn clone_from(&mut self, source: &Self) where - Self: ~const Destruct, + Self: [const] Destruct, { *self = source.clone() } @@ -476,7 +476,7 @@ pub trait Clone: Sized { #[lang = "structural_peq"] pub trait StructuralPartialEq {} -pub const fn drop(_: T) {} +pub const fn drop(_: T) {} #[rustc_intrinsic] const fn const_eval_select( diff --git a/tests/ui/traits/const-traits/call-const-closure.rs b/tests/ui/traits/const-traits/call-const-closure.rs index 21f4374b8d530..70dfaf724c9bd 100644 --- a/tests/ui/traits/const-traits/call-const-closure.rs +++ b/tests/ui/traits/const-traits/call-const-closure.rs @@ -15,7 +15,7 @@ impl Bar for () { const FOO: () = { (const || ().foo())(); - //~^ ERROR the trait bound `(): ~const Bar` is not satisfied + //~^ ERROR the trait bound `(): [const] Bar` is not satisfied // FIXME(const_trait_impl): The constness environment for const closures is wrong. }; diff --git a/tests/ui/traits/const-traits/call-const-closure.stderr b/tests/ui/traits/const-traits/call-const-closure.stderr index fe7c115aaab44..4bb8b2e9777e6 100644 --- a/tests/ui/traits/const-traits/call-const-closure.stderr +++ b/tests/ui/traits/const-traits/call-const-closure.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): ~const Bar` is not satisfied +error[E0277]: the trait bound `(): [const] Bar` is not satisfied --> $DIR/call-const-closure.rs:17:18 | LL | (const || ().foo())(); 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 b6d1517499d6e..4e8c2cd171e6c 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 @@ -5,7 +5,7 @@ fn foo(); } -const fn foo() { +const fn foo() { const { T::foo() } //~^ ERROR the trait bound `T: const Foo` is not satisfied } 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 e06d04db80409..c03d3e950b0b4 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 @@ -24,7 +24,7 @@ pub const fn add_i32(a: i32, b: i32) -> i32 { pub const fn add_u32(a: u32, b: u32) -> u32 { a.plus(b) - //~^ ERROR the trait bound `u32: ~const Plus` + //~^ ERROR the trait bound `u32: [const] Plus` } fn main() {} 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 64850335c2ab6..4aaf53344c90a 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,4 +1,4 @@ -error[E0277]: the trait bound `u32: ~const Plus` is not satisfied +error[E0277]: the trait bound `u32: [const] Plus` is not satisfied --> $DIR/call-const-trait-method-fail.rs:26:5 | LL | a.plus(b) 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 b63458b39e95d..f38590fa3c012 100644 --- a/tests/ui/traits/const-traits/call-generic-in-impl.rs +++ b/tests/ui/traits/const-traits/call-generic-in-impl.rs @@ -6,7 +6,7 @@ trait MyPartialEq { fn eq(&self, other: &Self) -> bool; } -impl const MyPartialEq for T { +impl const MyPartialEq for T { fn eq(&self, other: &Self) -> bool { PartialEq::eq(self, other) } 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 b515c0e711da4..1ad71c424a3bd 100644 --- a/tests/ui/traits/const-traits/call-generic-method-chain.rs +++ b/tests/ui/traits/const-traits/call-generic-method-chain.rs @@ -16,11 +16,11 @@ impl const PartialEq for S { } } -const fn equals_self(t: &T) -> bool { +const fn equals_self(t: &T) -> bool { *t == *t } -const fn equals_self_wrapper(t: &T) -> bool { +const fn equals_self_wrapper(t: &T) -> bool { equals_self(t) } 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 fdc439845ace7..58f293b5ac5cd 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 @@ -14,16 +14,16 @@ impl const PartialEq for S { } } -// This duplicate bound should not result in ambiguities. It should be equivalent to a single ~const -// bound. -const fn equals_self(t: &T) -> bool { +// This duplicate bound should not result in ambiguities. +// It should be equivalent to a single [const] bound. +const fn equals_self(t: &T) -> bool { *t == *t } trait A: PartialEq {} impl A for T {} -const fn equals_self2(t: &T) -> bool { +const fn equals_self2(t: &T) -> bool { *t == *t } 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 3ab5cc58ce3ca..4528f3b122f97 100644 --- a/tests/ui/traits/const-traits/call-generic-method-fail.rs +++ b/tests/ui/traits/const-traits/call-generic-method-fail.rs @@ -3,7 +3,7 @@ pub const fn equals_self(t: &T) -> bool { *t == *t - //~^ ERROR the trait bound `T: ~const PartialEq` is not satisfied + //~^ ERROR the trait bound `T: [const] PartialEq` is not satisfied } fn main() {} 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 9facf80ee8761..a2fba141f7b89 100644 --- a/tests/ui/traits/const-traits/call-generic-method-fail.stderr +++ b/tests/ui/traits/const-traits/call-generic-method-fail.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: ~const PartialEq` is not satisfied +error[E0277]: the trait bound `T: [const] PartialEq` is not satisfied --> $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 446a74eb7b7d4..0efc8a954dedb 100644 --- a/tests/ui/traits/const-traits/call-generic-method-nonconst.rs +++ b/tests/ui/traits/const-traits/call-generic-method-nonconst.rs @@ -14,7 +14,7 @@ impl Foo for S { } } -const fn equals_self(t: &T) -> bool { +const fn equals_self(t: &T) -> bool { true } 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 11bbe8bbb408b..9c1e0fee9e711 100644 --- a/tests/ui/traits/const-traits/call-generic-method-nonconst.stderr +++ b/tests/ui/traits/const-traits/call-generic-method-nonconst.stderr @@ -9,8 +9,8 @@ LL | pub const EQ: bool = equals_self(&S); note: required by a bound in `equals_self` --> $DIR/call-generic-method-nonconst.rs:17:25 | -LL | const fn equals_self(t: &T) -> bool { - | ^^^^^^^^^^ required by this bound in `equals_self` +LL | const fn equals_self(t: &T) -> bool { + | ^^^^^^^^^^^ required by this bound in `equals_self` error: aborting due to 1 previous error 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 bc671c897f075..aa52a7b9e473e 100644 --- a/tests/ui/traits/const-traits/call-generic-method-pass.rs +++ b/tests/ui/traits/const-traits/call-generic-method-pass.rs @@ -16,7 +16,7 @@ impl const PartialEq for S { } } -const fn equals_self(t: &T) -> bool { +const fn equals_self(t: &T) -> bool { *t == *t } 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 c735f855bcea7..9411127270833 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 @@ -8,8 +8,8 @@ trait MyTrait { } trait OtherTrait { - fn do_something_else() where Self: ~const MyTrait; - //~^ ERROR `~const` is not allowed here + fn do_something_else() where Self: [const] MyTrait; + //~^ ERROR `[const]` is not allowed here } struct MyStruct(T); @@ -19,8 +19,8 @@ impl const MyTrait for u32 { } impl MyStruct { - pub fn foo(&self) where T: ~const MyTrait { - //~^ ERROR `~const` is not allowed here + pub fn foo(&self) where T: [const] MyTrait { + //~^ ERROR `[const]` is not allowed here self.0.do_something(); } } 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 50ab52ade49c7..c0af644d3deb0 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,25 +1,25 @@ -error: `~const` is not allowed here - --> $DIR/const-bound-on-not-const-associated-fn.rs:11:40 +error: `[const]` is not allowed here + --> $DIR/const-bound-on-not-const-associated-fn.rs:11:38 | -LL | fn do_something_else() where Self: ~const MyTrait; - | ^^^^^^ +LL | fn do_something_else() where Self: [const] MyTrait; + | ^^^^^^^^^ | -note: this function is not `const`, so it cannot have `~const` trait bounds +note: this function is not `const`, so it cannot have `[const]` trait bounds --> $DIR/const-bound-on-not-const-associated-fn.rs:11:8 | -LL | fn do_something_else() where Self: ~const MyTrait; +LL | fn do_something_else() where Self: [const] MyTrait; | ^^^^^^^^^^^^^^^^^ -error: `~const` is not allowed here - --> $DIR/const-bound-on-not-const-associated-fn.rs:22:32 +error: `[const]` is not allowed here + --> $DIR/const-bound-on-not-const-associated-fn.rs:22:30 | -LL | pub fn foo(&self) where T: ~const MyTrait { - | ^^^^^^ +LL | pub fn foo(&self) where T: [const] MyTrait { + | ^^^^^^^^^ | -note: this function is not `const`, so it cannot have `~const` trait bounds +note: this function is not `const`, so it cannot have `[const]` trait bounds --> $DIR/const-bound-on-not-const-associated-fn.rs:22:12 | -LL | pub fn foo(&self) where T: ~const MyTrait { +LL | pub fn foo(&self) where T: [const] MyTrait { | ^^^ error: aborting due to 2 previous errors 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 e446eb154814f..ae31d9ae0ac0e 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 @@ -3,9 +3,9 @@ trait NonConst {} -const fn perform() {} -//~^ ERROR `~const` can only be applied to `#[const_trait]` traits -//~| ERROR `~const` can only be applied to `#[const_trait]` traits +const fn perform() {} +//~^ ERROR `[const]` can only be applied to `#[const_trait]` traits +//~| ERROR `[const]` can only be applied to `#[const_trait]` traits fn operate() {} //~^ ERROR `const` can only be applied to `#[const_trait]` traits 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 f97d3a9181e06..2ff5fb74031b1 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,19 +1,19 @@ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const-bounds-non-const-trait.rs:6:21 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const-bounds-non-const-trait.rs:6:19 | -LL | const fn perform() {} - | ^^^^^^ can't be applied to `NonConst` +LL | const fn perform() {} + | ^^^^^^^^^ can't be applied to `NonConst` | help: mark `NonConst` as `#[const_trait]` to allow it to have `const` implementations | LL | #[const_trait] trait NonConst {} | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const-bounds-non-const-trait.rs:6:21 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const-bounds-non-const-trait.rs:6:19 | -LL | const fn perform() {} - | ^^^^^^ can't be applied to `NonConst` +LL | const fn perform() {} + | ^^^^^^^^^ can't be applied to `NonConst` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: mark `NonConst` as `#[const_trait]` to allow it to have `const` implementations diff --git a/tests/ui/traits/const-traits/const-closure-parse-not-item.rs b/tests/ui/traits/const-traits/const-closure-parse-not-item.rs index b1b0e68b90db7..35127eda5c039 100644 --- a/tests/ui/traits/const-traits/const-closure-parse-not-item.rs +++ b/tests/ui/traits/const-traits/const-closure-parse-not-item.rs @@ -4,7 +4,7 @@ #![feature(const_trait_impl, const_closures)] #![allow(incomplete_features)] -const fn test() -> impl ~const Fn() { +const fn test() -> impl [const] Fn() { const move || {} } diff --git a/tests/ui/traits/const-traits/const-closure-parse-not-item.stderr b/tests/ui/traits/const-traits/const-closure-parse-not-item.stderr index 57afa2257b7d4..cc9d9bd602294 100644 --- a/tests/ui/traits/const-traits/const-closure-parse-not-item.stderr +++ b/tests/ui/traits/const-traits/const-closure-parse-not-item.stderr @@ -1,29 +1,29 @@ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const-closure-parse-not-item.rs:7:25 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const-closure-parse-not-item.rs:7:20 | -LL | const fn test() -> impl ~const Fn() { - | ^^^^^^ can't be applied to `Fn` +LL | const fn test() -> impl [const] Fn() { + | ^^^^^^^^^^^^ can't be applied to `Fn` | -note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const-closure-parse-not-item.rs:7:25 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const-closure-parse-not-item.rs:7:20 | -LL | const fn test() -> impl ~const Fn() { - | ^^^^^^ can't be applied to `Fn` +LL | const fn test() -> impl [const] Fn() { + | ^^^^^^^^^^^^ can't be applied to `Fn` | -note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const-closure-parse-not-item.rs:7:25 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const-closure-parse-not-item.rs:7:20 | -LL | const fn test() -> impl ~const Fn() { - | ^^^^^^ can't be applied to `Fn` +LL | const fn test() -> impl [const] Fn() { + | ^^^^^^^^^^^^ can't be applied to `Fn` | -note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` diff --git a/tests/ui/traits/const-traits/const-closure-trait-method-fail.rs b/tests/ui/traits/const-traits/const-closure-trait-method-fail.rs index 8c6286426d324..cbcc4aa7c3cdb 100644 --- a/tests/ui/traits/const-traits/const-closure-trait-method-fail.rs +++ b/tests/ui/traits/const-traits/const-closure-trait-method-fail.rs @@ -11,7 +11,7 @@ impl Tr for () { fn a(self) -> i32 { 42 } } -const fn need_const_closure i32>(x: T) -> i32 { +const fn need_const_closure i32>(x: T) -> i32 { x(()) } diff --git a/tests/ui/traits/const-traits/const-closure-trait-method-fail.stderr b/tests/ui/traits/const-traits/const-closure-trait-method-fail.stderr index 2a97846ccb448..7a146b9d8a112 100644 --- a/tests/ui/traits/const-traits/const-closure-trait-method-fail.stderr +++ b/tests/ui/traits/const-traits/const-closure-trait-method-fail.stderr @@ -1,19 +1,19 @@ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const-closure-trait-method-fail.rs:14:32 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const-closure-trait-method-fail.rs:14:30 | -LL | const fn need_const_closure i32>(x: T) -> i32 { - | ^^^^^^ can't be applied to `FnOnce` +LL | const fn need_const_closure i32>(x: T) -> i32 { + | ^^^^^^^^^ can't be applied to `FnOnce` | -note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const-closure-trait-method-fail.rs:14:32 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const-closure-trait-method-fail.rs:14:30 | -LL | const fn need_const_closure i32>(x: T) -> i32 { - | ^^^^^^ can't be applied to `FnOnce` +LL | const fn need_const_closure i32>(x: T) -> i32 { + | ^^^^^^^^^ can't be applied to `FnOnce` | -note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` diff --git a/tests/ui/traits/const-traits/const-closure-trait-method.rs b/tests/ui/traits/const-traits/const-closure-trait-method.rs index ebee4daefbea3..831d6e27946d1 100644 --- a/tests/ui/traits/const-traits/const-closure-trait-method.rs +++ b/tests/ui/traits/const-traits/const-closure-trait-method.rs @@ -11,7 +11,7 @@ impl const Tr for () { fn a(self) -> i32 { 42 } } -const fn need_const_closure i32>(x: T) -> i32 { +const fn need_const_closure i32>(x: T) -> i32 { x(()) } diff --git a/tests/ui/traits/const-traits/const-closure-trait-method.stderr b/tests/ui/traits/const-traits/const-closure-trait-method.stderr index 9c63b7e63a65d..6c003f87ada6a 100644 --- a/tests/ui/traits/const-traits/const-closure-trait-method.stderr +++ b/tests/ui/traits/const-traits/const-closure-trait-method.stderr @@ -1,19 +1,19 @@ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const-closure-trait-method.rs:14:32 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const-closure-trait-method.rs:14:30 | -LL | const fn need_const_closure i32>(x: T) -> i32 { - | ^^^^^^ can't be applied to `FnOnce` +LL | const fn need_const_closure i32>(x: T) -> i32 { + | ^^^^^^^^^ can't be applied to `FnOnce` | -note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const-closure-trait-method.rs:14:32 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const-closure-trait-method.rs:14:30 | -LL | const fn need_const_closure i32>(x: T) -> i32 { - | ^^^^^^ can't be applied to `FnOnce` +LL | const fn need_const_closure i32>(x: T) -> i32 { + | ^^^^^^^^^ can't be applied to `FnOnce` | -note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` diff --git a/tests/ui/traits/const-traits/const-closures.rs b/tests/ui/traits/const-traits/const-closures.rs index 98f8d039cd643..2f6f4dc4ba335 100644 --- a/tests/ui/traits/const-traits/const-closures.rs +++ b/tests/ui/traits/const-traits/const-closures.rs @@ -5,9 +5,9 @@ const fn answer_p1(f: &F) -> u8 where - F: ~const FnOnce() -> u8, - F: ~const FnMut() -> u8, - F: ~const Fn() -> u8, + F: [const] FnOnce() -> u8, + F: [const] FnMut() -> u8, + F: [const] Fn() -> u8, { f() * 7 } @@ -20,7 +20,7 @@ const fn answer_p2() -> u8 { answer_p1(&three) } -const fn answer u8>(f: &F) -> u8 { +const fn answer u8>(f: &F) -> u8 { f() + f() } diff --git a/tests/ui/traits/const-traits/const-closures.stderr b/tests/ui/traits/const-traits/const-closures.stderr index 92f3ba2082072..c76a73418a533 100644 --- a/tests/ui/traits/const-traits/const-closures.stderr +++ b/tests/ui/traits/const-traits/const-closures.stderr @@ -1,76 +1,76 @@ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const-closures.rs:8:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const-closures.rs:8:10 | -LL | F: ~const FnOnce() -> u8, - | ^^^^^^ can't be applied to `FnOnce` +LL | F: [const] FnOnce() -> u8, + | ^^^^^^^^^ can't be applied to `FnOnce` | -note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const-closures.rs:9:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const-closures.rs:9:10 | -LL | F: ~const FnMut() -> u8, - | ^^^^^^ can't be applied to `FnMut` +LL | F: [const] FnMut() -> u8, + | ^^^^^^^^^ can't be applied to `FnMut` | -note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const-closures.rs:10:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const-closures.rs:10:10 | -LL | F: ~const Fn() -> u8, - | ^^^^^^ can't be applied to `Fn` +LL | F: [const] Fn() -> u8, + | ^^^^^^^^^ can't be applied to `Fn` | -note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const-closures.rs:8:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const-closures.rs:8:10 | -LL | F: ~const FnOnce() -> u8, - | ^^^^^^ can't be applied to `FnOnce` +LL | F: [const] FnOnce() -> u8, + | ^^^^^^^^^ can't be applied to `FnOnce` | -note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const-closures.rs:9:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const-closures.rs:9:10 | -LL | F: ~const FnMut() -> u8, - | ^^^^^^ can't be applied to `FnMut` +LL | F: [const] FnMut() -> u8, + | ^^^^^^^^^ can't be applied to `FnMut` | -note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const-closures.rs:10:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const-closures.rs:10:10 | -LL | F: ~const Fn() -> u8, - | ^^^^^^ can't be applied to `Fn` +LL | F: [const] Fn() -> u8, + | ^^^^^^^^^ can't be applied to `Fn` | -note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const-closures.rs:23:20 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const-closures.rs:23:18 | -LL | const fn answer u8>(f: &F) -> u8 { - | ^^^^^^ can't be applied to `Fn` +LL | const fn answer u8>(f: &F) -> u8 { + | ^^^^^^^^^ can't be applied to `Fn` | -note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/const-closures.rs:23:20 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/const-closures.rs:23:18 | -LL | const fn answer u8>(f: &F) -> u8 { - | ^^^^^^ can't be applied to `Fn` +LL | const fn answer u8>(f: &F) -> u8 { + | ^^^^^^^^^ can't be applied to `Fn` | -note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` diff --git a/tests/ui/traits/const-traits/const-cond-for-rpitit.rs b/tests/ui/traits/const-traits/const-cond-for-rpitit.rs index 50bf93f9a0328..da83e054dd9bb 100644 --- a/tests/ui/traits/const-traits/const-cond-for-rpitit.rs +++ b/tests/ui/traits/const-traits/const-cond-for-rpitit.rs @@ -6,15 +6,15 @@ #[const_trait] pub trait Foo { - fn method(self) -> impl ~const Bar; + fn method(self) -> impl [const] Bar; } #[const_trait] pub trait Bar {} struct A(T); -impl const Foo for A where A: ~const Bar { - fn method(self) -> impl ~const Bar { +impl const Foo for A where A: [const] Bar { + fn method(self) -> impl [const] Bar { self } } 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 0ef11a7f0c933..27e828c7ab91a 100644 --- a/tests/ui/traits/const-traits/const-default-method-bodies.rs +++ b/tests/ui/traits/const-traits/const-default-method-bodies.rs @@ -23,7 +23,7 @@ impl const ConstDefaultFn for ConstImpl { const fn test() { NonConstImpl.a(); - //~^ ERROR the trait bound `NonConstImpl: ~const ConstDefaultFn` is not satisfied + //~^ ERROR the trait bound `NonConstImpl: [const] ConstDefaultFn` is not satisfied ConstImpl.a(); } 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 903f7d37f9d8e..03ca6f1d51155 100644 --- a/tests/ui/traits/const-traits/const-default-method-bodies.stderr +++ b/tests/ui/traits/const-traits/const-default-method-bodies.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `NonConstImpl: ~const ConstDefaultFn` is not satisfied +error[E0277]: the trait bound `NonConstImpl: [const] ConstDefaultFn` is not satisfied --> $DIR/const-default-method-bodies.rs:25:18 | LL | NonConstImpl.a(); diff --git a/tests/ui/traits/const-traits/const-drop-bound.rs b/tests/ui/traits/const-traits/const-drop-bound.rs index 4819da7c3a403..7fa9b10fa0405 100644 --- a/tests/ui/traits/const-traits/const-drop-bound.rs +++ b/tests/ui/traits/const-traits/const-drop-bound.rs @@ -5,7 +5,7 @@ use std::marker::Destruct; -const fn foo(res: Result) -> Option where E: ~const Destruct { +const fn foo(res: Result) -> Option where E: [const] Destruct { match res { Ok(t) => Some(t), Err(_e) => None, @@ -16,8 +16,8 @@ pub struct Foo(T); const fn baz(res: Result, Foo>) -> Option> where - T: ~const Destruct, - E: ~const Destruct, + T: [const] Destruct, + E: [const] Destruct, { foo(res) } diff --git a/tests/ui/traits/const-traits/const-drop-fail-2.precise.stderr b/tests/ui/traits/const-traits/const-drop-fail-2.precise.stderr index 76207ea0939b3..c2309ea6e122e 100644 --- a/tests/ui/traits/const-traits/const-drop-fail-2.precise.stderr +++ b/tests/ui/traits/const-traits/const-drop-fail-2.precise.stderr @@ -5,17 +5,17 @@ LL | const _: () = check::>( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: required for `ConstDropImplWithBounds` to implement `const Drop` - --> $DIR/const-drop-fail-2.rs:25:25 + --> $DIR/const-drop-fail-2.rs:25:26 | -LL | impl const Drop for ConstDropImplWithBounds { - | -------- ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | impl const Drop for ConstDropImplWithBounds { + | --------- ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | unsatisfied trait bound introduced here note: required by a bound in `check` --> $DIR/const-drop-fail-2.rs:21:19 | -LL | const fn check(_: T) {} - | ^^^^^^^^^^^^^^^ required by this bound in `check` +LL | const fn check(_: T) {} + | ^^^^^^^^^^^^^^^^ required by this bound in `check` error: aborting due to 1 previous error 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 1bcc87e907037..3f98a9f715e8b 100644 --- a/tests/ui/traits/const-traits/const-drop-fail-2.rs +++ b/tests/ui/traits/const-traits/const-drop-fail-2.rs @@ -18,11 +18,11 @@ trait A { fn a() { } } impl A for NonTrivialDrop {} -const fn check(_: T) {} +const fn check(_: T) {} struct ConstDropImplWithBounds(PhantomData); -impl const Drop for ConstDropImplWithBounds { +impl const Drop for ConstDropImplWithBounds { fn drop(&mut self) { T::a(); } @@ -35,7 +35,7 @@ const _: () = check::>( struct ConstDropImplWithNonConstBounds(PhantomData); -impl const Drop for ConstDropImplWithNonConstBounds { +impl const Drop for ConstDropImplWithNonConstBounds { fn drop(&mut self) { T::a(); } diff --git a/tests/ui/traits/const-traits/const-drop-fail-2.stock.stderr b/tests/ui/traits/const-traits/const-drop-fail-2.stock.stderr index 76207ea0939b3..c2309ea6e122e 100644 --- a/tests/ui/traits/const-traits/const-drop-fail-2.stock.stderr +++ b/tests/ui/traits/const-traits/const-drop-fail-2.stock.stderr @@ -5,17 +5,17 @@ LL | const _: () = check::>( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: required for `ConstDropImplWithBounds` to implement `const Drop` - --> $DIR/const-drop-fail-2.rs:25:25 + --> $DIR/const-drop-fail-2.rs:25:26 | -LL | impl const Drop for ConstDropImplWithBounds { - | -------- ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | impl const Drop for ConstDropImplWithBounds { + | --------- ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | unsatisfied trait bound introduced here note: required by a bound in `check` --> $DIR/const-drop-fail-2.rs:21:19 | -LL | const fn check(_: T) {} - | ^^^^^^^^^^^^^^^ required by this bound in `check` +LL | const fn check(_: T) {} + | ^^^^^^^^^^^^^^^^ required by this bound in `check` error: aborting due to 1 previous error diff --git a/tests/ui/traits/const-traits/const-drop-fail.new_precise.stderr b/tests/ui/traits/const-traits/const-drop-fail.new_precise.stderr index f38e642bb63e5..9c49ee56b0f4d 100644 --- a/tests/ui/traits/const-traits/const-drop-fail.new_precise.stderr +++ b/tests/ui/traits/const-traits/const-drop-fail.new_precise.stderr @@ -10,8 +10,8 @@ LL | NonTrivialDrop, note: required by a bound in `check` --> $DIR/const-drop-fail.rs:24:19 | -LL | const fn check(_: T) {} - | ^^^^^^^^^^^^^^^ required by this bound in `check` +LL | const fn check(_: T) {} + | ^^^^^^^^^^^^^^^^ required by this bound in `check` error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied --> $DIR/const-drop-fail.rs:35:5 @@ -25,8 +25,8 @@ LL | ConstImplWithDropGlue(NonTrivialDrop), note: required by a bound in `check` --> $DIR/const-drop-fail.rs:24:19 | -LL | const fn check(_: T) {} - | ^^^^^^^^^^^^^^^ required by this bound in `check` +LL | const fn check(_: T) {} + | ^^^^^^^^^^^^^^^^ required by this bound in `check` error: aborting due to 2 previous errors diff --git a/tests/ui/traits/const-traits/const-drop-fail.new_stock.stderr b/tests/ui/traits/const-traits/const-drop-fail.new_stock.stderr index f38e642bb63e5..9c49ee56b0f4d 100644 --- a/tests/ui/traits/const-traits/const-drop-fail.new_stock.stderr +++ b/tests/ui/traits/const-traits/const-drop-fail.new_stock.stderr @@ -10,8 +10,8 @@ LL | NonTrivialDrop, note: required by a bound in `check` --> $DIR/const-drop-fail.rs:24:19 | -LL | const fn check(_: T) {} - | ^^^^^^^^^^^^^^^ required by this bound in `check` +LL | const fn check(_: T) {} + | ^^^^^^^^^^^^^^^^ required by this bound in `check` error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied --> $DIR/const-drop-fail.rs:35:5 @@ -25,8 +25,8 @@ LL | ConstImplWithDropGlue(NonTrivialDrop), note: required by a bound in `check` --> $DIR/const-drop-fail.rs:24:19 | -LL | const fn check(_: T) {} - | ^^^^^^^^^^^^^^^ required by this bound in `check` +LL | const fn check(_: T) {} + | ^^^^^^^^^^^^^^^^ required by this bound in `check` error: aborting due to 2 previous errors diff --git a/tests/ui/traits/const-traits/const-drop-fail.old_precise.stderr b/tests/ui/traits/const-traits/const-drop-fail.old_precise.stderr index f38e642bb63e5..9c49ee56b0f4d 100644 --- a/tests/ui/traits/const-traits/const-drop-fail.old_precise.stderr +++ b/tests/ui/traits/const-traits/const-drop-fail.old_precise.stderr @@ -10,8 +10,8 @@ LL | NonTrivialDrop, note: required by a bound in `check` --> $DIR/const-drop-fail.rs:24:19 | -LL | const fn check(_: T) {} - | ^^^^^^^^^^^^^^^ required by this bound in `check` +LL | const fn check(_: T) {} + | ^^^^^^^^^^^^^^^^ required by this bound in `check` error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied --> $DIR/const-drop-fail.rs:35:5 @@ -25,8 +25,8 @@ LL | ConstImplWithDropGlue(NonTrivialDrop), note: required by a bound in `check` --> $DIR/const-drop-fail.rs:24:19 | -LL | const fn check(_: T) {} - | ^^^^^^^^^^^^^^^ required by this bound in `check` +LL | const fn check(_: T) {} + | ^^^^^^^^^^^^^^^^ required by this bound in `check` error: aborting due to 2 previous errors diff --git a/tests/ui/traits/const-traits/const-drop-fail.old_stock.stderr b/tests/ui/traits/const-traits/const-drop-fail.old_stock.stderr index f38e642bb63e5..9c49ee56b0f4d 100644 --- a/tests/ui/traits/const-traits/const-drop-fail.old_stock.stderr +++ b/tests/ui/traits/const-traits/const-drop-fail.old_stock.stderr @@ -10,8 +10,8 @@ LL | NonTrivialDrop, note: required by a bound in `check` --> $DIR/const-drop-fail.rs:24:19 | -LL | const fn check(_: T) {} - | ^^^^^^^^^^^^^^^ required by this bound in `check` +LL | const fn check(_: T) {} + | ^^^^^^^^^^^^^^^^ required by this bound in `check` error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied --> $DIR/const-drop-fail.rs:35:5 @@ -25,8 +25,8 @@ LL | ConstImplWithDropGlue(NonTrivialDrop), note: required by a bound in `check` --> $DIR/const-drop-fail.rs:24:19 | -LL | const fn check(_: T) {} - | ^^^^^^^^^^^^^^^ required by this bound in `check` +LL | const fn check(_: T) {} + | ^^^^^^^^^^^^^^^^ required by this bound in `check` error: aborting due to 2 previous errors diff --git a/tests/ui/traits/const-traits/const-drop-fail.rs b/tests/ui/traits/const-traits/const-drop-fail.rs index a7f3d5654de93..4513d71f61342 100644 --- a/tests/ui/traits/const-traits/const-drop-fail.rs +++ b/tests/ui/traits/const-traits/const-drop-fail.rs @@ -21,7 +21,7 @@ impl const Drop for ConstImplWithDropGlue { fn drop(&mut self) {} } -const fn check(_: T) {} +const fn check(_: T) {} macro_rules! check_all { ($($exp:expr),*$(,)?) => {$( diff --git a/tests/ui/traits/const-traits/const-drop.rs b/tests/ui/traits/const-traits/const-drop.rs index e2d87aeff47fb..5df3a77f73ab6 100644 --- a/tests/ui/traits/const-traits/const-drop.rs +++ b/tests/ui/traits/const-traits/const-drop.rs @@ -16,7 +16,7 @@ impl<'a> const Drop for S<'a> { } } -const fn a(_: T) {} +const fn a(_: T) {} //FIXME ~^ ERROR destructor of const fn b() -> u8 { @@ -108,7 +108,7 @@ fn main() { } } - // These types should pass because ~const in a non-const context should have no effect. + // These types should pass because [const] in a non-const context should have no effect. a(HasDropGlue(Box::new(0))); a(HasDropImpl); diff --git a/tests/ui/traits/const-traits/const-impl-trait.rs b/tests/ui/traits/const-traits/const-impl-trait.rs index d7fe43ef37ced..dc960422a4a41 100644 --- a/tests/ui/traits/const-traits/const-impl-trait.rs +++ b/tests/ui/traits/const-traits/const-impl-trait.rs @@ -8,23 +8,23 @@ use std::marker::Destruct; -const fn cmp(a: &impl ~const PartialEq) -> bool { +const fn cmp(a: &impl [const] PartialEq) -> bool { a == a } const fn wrap( - x: impl ~const PartialEq + ~const Destruct, -) -> impl ~const PartialEq + ~const Destruct { + x: impl [const] PartialEq + [const] Destruct, +) -> impl [const] PartialEq + [const] Destruct { x } #[const_trait] trait Foo { - fn huh() -> impl ~const PartialEq + ~const Destruct + Copy; + fn huh() -> impl [const] PartialEq + [const] Destruct + Copy; } impl const Foo for () { - fn huh() -> impl ~const PartialEq + ~const Destruct + Copy { + fn huh() -> impl [const] PartialEq + [const] Destruct + Copy { 123 } } @@ -43,16 +43,16 @@ trait T {} struct S; impl const T for S {} -const fn rpit() -> impl ~const T { +const fn rpit() -> impl [const] T { S } -const fn apit(_: impl ~const T + ~const Destruct) {} +const fn apit(_: impl [const] T + [const] Destruct) {} -const fn rpit_assoc_bound() -> impl IntoIterator { +const fn rpit_assoc_bound() -> impl IntoIterator { Some(S) } -const fn apit_assoc_bound(_: impl IntoIterator + ~const Destruct) {} +const fn apit_assoc_bound(_: impl IntoIterator + [const] Destruct) {} fn main() {} diff --git a/tests/ui/traits/const-traits/const-impl-trait.stderr b/tests/ui/traits/const-traits/const-impl-trait.stderr index ee922f9689edd..cbb68d8c9839e 100644 --- a/tests/ui/traits/const-traits/const-impl-trait.stderr +++ b/tests/ui/traits/const-traits/const-impl-trait.stderr @@ -9,8 +9,8 @@ LL | assert!(cmp(&())); note: required by a bound in `cmp` --> $DIR/const-impl-trait.rs:11:23 | -LL | const fn cmp(a: &impl ~const PartialEq) -> bool { - | ^^^^^^^^^^^^^^^^ required by this bound in `cmp` +LL | const fn cmp(a: &impl [const] PartialEq) -> bool { + | ^^^^^^^^^^^^^^^^^ required by this bound in `cmp` error: aborting due to 1 previous error diff --git a/tests/ui/traits/const-traits/const-in-closure.rs b/tests/ui/traits/const-traits/const-in-closure.rs index ebc17a50c8660..0657c5af58837 100644 --- a/tests/ui/traits/const-traits/const-in-closure.rs +++ b/tests/ui/traits/const-traits/const-in-closure.rs @@ -3,13 +3,14 @@ #![feature(const_trait_impl)] -#[const_trait] trait Trait { +#[const_trait] +trait Trait { fn method(); } const fn foo() { let _ = || { - // Make sure this doesn't enforce `T: ~const Trait` + // Make sure this doesn't enforce `T: [const] Trait` T::method(); }; } @@ -17,7 +18,9 @@ const fn foo() { fn bar() { let _ = || { // Make sure unconditionally const bounds propagate from parent. - const { T::method(); }; + const { + T::method(); + }; }; } diff --git a/tests/ui/traits/const-traits/const-opaque.no.stderr b/tests/ui/traits/const-traits/const-opaque.no.stderr index 47e692936e046..acf19ba96ab39 100644 --- a/tests/ui/traits/const-traits/const-opaque.no.stderr +++ b/tests/ui/traits/const-traits/const-opaque.no.stderr @@ -9,8 +9,8 @@ LL | let opaque = bar(()); note: required by a bound in `bar` --> $DIR/const-opaque.rs:26:17 | -LL | const fn bar(t: T) -> impl ~const Foo { - | ^^^^^^^^^^ required by this bound in `bar` +LL | const fn bar(t: T) -> impl [const] Foo { + | ^^^^^^^^^^^ required by this bound in `bar` error[E0277]: the trait bound `(): const Foo` is not satisfied --> $DIR/const-opaque.rs:33:12 diff --git a/tests/ui/traits/const-traits/const-opaque.rs b/tests/ui/traits/const-traits/const-opaque.rs index 96cdd7d9f2619..56ebf0aefccfd 100644 --- a/tests/ui/traits/const-traits/const-opaque.rs +++ b/tests/ui/traits/const-traits/const-opaque.rs @@ -9,7 +9,7 @@ trait Foo { fn method(&self); } -impl const Foo for (T,) { +impl const Foo for (T,) { fn method(&self) {} } @@ -23,7 +23,7 @@ impl Foo for () { fn method(&self) {} } -const fn bar(t: T) -> impl ~const Foo { +const fn bar(t: T) -> impl [const] Foo { (t,) } 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 2dac1970835d2..ece87529c3e3b 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 @@ -7,12 +7,12 @@ trait Trait {} fn main() { let _: &dyn const Trait; //~ ERROR const trait bounds are not allowed in trait object types - let _: &dyn ~const Trait; //~ ERROR `~const` is not allowed here + let _: &dyn [const] Trait; //~ ERROR `[const]` is not allowed here } // Regression test for issue #119525. trait NonConst {} const fn handle(_: &dyn const NonConst) {} //~^ ERROR const trait bounds are not allowed in trait object types -const fn take(_: &dyn ~const NonConst) {} -//~^ ERROR `~const` is not allowed here +const fn take(_: &dyn [const] NonConst) {} +//~^ ERROR `[const]` is not allowed here diff --git a/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.stderr b/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.stderr index bd29b4b860b62..c58e2765168b5 100644 --- a/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.stderr +++ b/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.stderr @@ -4,13 +4,13 @@ error: const trait bounds are not allowed in trait object types LL | let _: &dyn const Trait; | ^^^^^^^^^^^ -error: `~const` is not allowed here - --> $DIR/const-trait-bounds-trait-objects.rs:10:17 +error: `[const]` is not allowed here + --> $DIR/const-trait-bounds-trait-objects.rs:10:13 | -LL | let _: &dyn ~const Trait; - | ^^^^^^ +LL | let _: &dyn [const] Trait; + | ^^^^^^^^^^^ | - = note: trait objects cannot have `~const` trait bounds + = note: trait objects cannot have `[const]` trait bounds error: const trait bounds are not allowed in trait object types --> $DIR/const-trait-bounds-trait-objects.rs:15:25 @@ -18,13 +18,13 @@ error: const trait bounds are not allowed in trait object types LL | const fn handle(_: &dyn const NonConst) {} | ^^^^^^^^^^^^^^ -error: `~const` is not allowed here - --> $DIR/const-trait-bounds-trait-objects.rs:17:23 +error: `[const]` is not allowed here + --> $DIR/const-trait-bounds-trait-objects.rs:17:19 | -LL | const fn take(_: &dyn ~const NonConst) {} - | ^^^^^^ +LL | const fn take(_: &dyn [const] NonConst) {} + | ^^^^^^^^^^^ | - = note: trait objects cannot have `~const` trait bounds + = note: trait objects cannot have `[const]` trait bounds error: aborting due to 4 previous errors diff --git a/tests/ui/traits/const-traits/const-trait-impl-parameter-mismatch.rs b/tests/ui/traits/const-traits/const-trait-impl-parameter-mismatch.rs index b563b78f78a16..955063643e2b6 100644 --- a/tests/ui/traits/const-traits/const-trait-impl-parameter-mismatch.rs +++ b/tests/ui/traits/const-traits/const-trait-impl-parameter-mismatch.rs @@ -13,7 +13,7 @@ #[const_trait] trait Main { - fn compute() -> u32; + fn compute() -> u32; } impl const Main for () { diff --git a/tests/ui/traits/const-traits/const-trait-impl-parameter-mismatch.stderr b/tests/ui/traits/const-traits/const-trait-impl-parameter-mismatch.stderr index a04f98e68a633..cac83fe5cb2ed 100644 --- a/tests/ui/traits/const-traits/const-trait-impl-parameter-mismatch.stderr +++ b/tests/ui/traits/const-traits/const-trait-impl-parameter-mismatch.stderr @@ -10,7 +10,7 @@ LL | #![feature(const_trait_impl, effects)] error[E0049]: associated function `compute` has 0 type parameters but its trait declaration has 1 type parameter --> $DIR/const-trait-impl-parameter-mismatch.rs:20:16 | -LL | fn compute() -> u32; +LL | fn compute() -> u32; | - expected 1 type parameter ... LL | fn compute<'x>() -> u32 { 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 87ac78908bbaf..ce61eb9a1ab97 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 @@ -22,7 +22,7 @@ LL | #[derive_const(Default, PartialEq)] = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const` = note: adding a non-const method body in the future would be a breaking change -error[E0277]: the trait bound `(): ~const PartialEq` is not satisfied +error[E0277]: the trait bound `(): [const] PartialEq` is not satisfied --> $DIR/derive-const-use.rs:16:14 | LL | #[derive_const(Default, PartialEq)] diff --git a/tests/ui/traits/const-traits/cross-crate.gatednc.stderr b/tests/ui/traits/const-traits/cross-crate.gatednc.stderr index 4d5abf643a8c2..1da519151182a 100644 --- a/tests/ui/traits/const-traits/cross-crate.gatednc.stderr +++ b/tests/ui/traits/const-traits/cross-crate.gatednc.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `cross_crate::NonConst: ~const cross_crate::MyTrait` is not satisfied +error[E0277]: the trait bound `cross_crate::NonConst: [const] cross_crate::MyTrait` is not satisfied --> $DIR/cross-crate.rs:19:14 | LL | NonConst.func(); diff --git a/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.rs b/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.rs index 96acdc300e0dd..ea97f755d55c4 100644 --- a/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.rs +++ b/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.rs @@ -4,13 +4,13 @@ trait Tr {} impl Tr for () {} -const fn foo() where T: ~const Tr {} +const fn foo() where T: [const] Tr {} #[const_trait] pub trait Foo { fn foo() { foo::<()>(); - //~^ ERROR the trait bound `(): ~const Tr` is not satisfied + //~^ ERROR the trait bound `(): [const] Tr` is not satisfied } } 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 b3017523b27d0..2e236cecfb475 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 @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): ~const Tr` is not satisfied +error[E0277]: the trait bound `(): [const] Tr` is not satisfied --> $DIR/default-method-body-is-const-body-checking.rs:12:15 | LL | foo::<()>(); @@ -7,8 +7,8 @@ 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` +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/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 b3beba08237c1..eb2c472e3bf7b 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 @@ -7,7 +7,7 @@ pub trait Tr { fn b(&self) { ().a() - //~^ ERROR the trait bound `(): ~const Tr` is not satisfied + //~^ ERROR the trait bound `(): [const] Tr` is not satisfied } } 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 2bd71c940e736..2dc2d48461749 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,4 +1,4 @@ -error[E0277]: the trait bound `(): ~const Tr` is not satisfied +error[E0277]: the trait bound `(): [const] Tr` is not satisfied --> $DIR/default-method-body-is-const-same-trait-ck.rs:9:12 | LL | ().a() diff --git a/tests/ui/traits/const-traits/dont-ice-on-const-pred-for-bounds.rs b/tests/ui/traits/const-traits/dont-ice-on-const-pred-for-bounds.rs index 2295c2c3857c7..d39e661ed9205 100644 --- a/tests/ui/traits/const-traits/dont-ice-on-const-pred-for-bounds.rs +++ b/tests/ui/traits/const-traits/dont-ice-on-const-pred-for-bounds.rs @@ -13,7 +13,7 @@ trait Trait { type Assoc: const Trait; } -const fn needs_trait() {} +const fn needs_trait() {} fn test() { const { needs_trait::() }; diff --git a/tests/ui/traits/const-traits/dont-prefer-param-env-for-infer-self-ty.rs b/tests/ui/traits/const-traits/dont-prefer-param-env-for-infer-self-ty.rs index 08dcd7d80b344..f1fc98d72a547 100644 --- a/tests/ui/traits/const-traits/dont-prefer-param-env-for-infer-self-ty.rs +++ b/tests/ui/traits/const-traits/dont-prefer-param-env-for-infer-self-ty.rs @@ -5,11 +5,11 @@ #[const_trait] trait Foo {} -impl const Foo for (T,) where T: ~const Foo {} +impl const Foo for (T,) where T: [const] Foo {} -const fn needs_const_foo(_: impl ~const Foo + Copy) {} +const fn needs_const_foo(_: impl [const] Foo + Copy) {} -const fn test(t: T) { +const fn test(t: T) { needs_const_foo((t,)); } diff --git a/tests/ui/traits/const-traits/double-error-for-unimplemented-trait.rs b/tests/ui/traits/const-traits/double-error-for-unimplemented-trait.rs index f4b01efe95908..414b80ca0daab 100644 --- a/tests/ui/traits/const-traits/double-error-for-unimplemented-trait.rs +++ b/tests/ui/traits/const-traits/double-error-for-unimplemented-trait.rs @@ -7,7 +7,7 @@ trait Trait { type Out; } -const fn needs_const(_: &T) {} +const fn needs_const(_: &T) {} const IN_CONST: () = { needs_const(&()); diff --git a/tests/ui/traits/const-traits/double-error-for-unimplemented-trait.stderr b/tests/ui/traits/const-traits/double-error-for-unimplemented-trait.stderr index cd68cdaf8a2bf..740a05be06ba6 100644 --- a/tests/ui/traits/const-traits/double-error-for-unimplemented-trait.stderr +++ b/tests/ui/traits/const-traits/double-error-for-unimplemented-trait.stderr @@ -14,8 +14,8 @@ LL | trait Trait { note: required by a bound in `needs_const` --> $DIR/double-error-for-unimplemented-trait.rs:10:25 | -LL | const fn needs_const(_: &T) {} - | ^^^^^^^^^^^^ required by this bound in `needs_const` +LL | const fn needs_const(_: &T) {} + | ^^^^^^^^^^^^^ required by this bound in `needs_const` error[E0277]: the trait bound `(): Trait` is not satisfied --> $DIR/double-error-for-unimplemented-trait.rs:18:15 @@ -33,8 +33,8 @@ LL | trait Trait { note: required by a bound in `needs_const` --> $DIR/double-error-for-unimplemented-trait.rs:10:25 | -LL | const fn needs_const(_: &T) {} - | ^^^^^^^^^^^^ required by this bound in `needs_const` +LL | const fn needs_const(_: &T) {} + | ^^^^^^^^^^^^^ required by this bound in `needs_const` error: aborting due to 2 previous errors diff --git a/tests/ui/traits/const-traits/eval-bad-signature.rs b/tests/ui/traits/const-traits/eval-bad-signature.rs index 97c573ea6528d..66e296d438806 100644 --- a/tests/ui/traits/const-traits/eval-bad-signature.rs +++ b/tests/ui/traits/const-traits/eval-bad-signature.rs @@ -7,7 +7,7 @@ trait Value { fn value() -> u32; } -const fn get_value() -> u32 { +const fn get_value() -> u32 { T::value() } diff --git a/tests/ui/traits/const-traits/feature-gate.rs b/tests/ui/traits/const-traits/feature-gate.rs index 921dfb054e305..5ad56ddcd334e 100644 --- a/tests/ui/traits/const-traits/feature-gate.rs +++ b/tests/ui/traits/const-traits/feature-gate.rs @@ -10,12 +10,12 @@ trait T {} impl const T for S {} //[stock]~^ ERROR const trait impls are experimental -const fn f() {} //[stock]~ ERROR const trait impls are experimental +const fn f() {} //[stock]~ ERROR const trait impls are experimental fn g() {} //[stock]~ ERROR const trait impls are experimental macro_rules! discard { ($ty:ty) => {} } -discard! { impl ~const T } //[stock]~ ERROR const trait impls are experimental +discard! { impl [const] T } //[stock]~ ERROR const trait impls are experimental discard! { impl const T } //[stock]~ ERROR const trait impls are experimental fn main() {} diff --git a/tests/ui/traits/const-traits/feature-gate.stock.stderr b/tests/ui/traits/const-traits/feature-gate.stock.stderr index 78157d5705638..37d76e7f3879c 100644 --- a/tests/ui/traits/const-traits/feature-gate.stock.stderr +++ b/tests/ui/traits/const-traits/feature-gate.stock.stderr @@ -9,10 +9,10 @@ LL | impl const T for S {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: const trait impls are experimental - --> $DIR/feature-gate.rs:13:15 + --> $DIR/feature-gate.rs:13:13 | -LL | const fn f() {} - | ^^^^^^ +LL | const fn f() {} + | ^^^^^^^^^ | = note: see issue #67792 for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable @@ -29,10 +29,10 @@ LL | fn g() {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: const trait impls are experimental - --> $DIR/feature-gate.rs:18:17 + --> $DIR/feature-gate.rs:18:12 | -LL | discard! { impl ~const T } - | ^^^^^^ +LL | discard! { impl [const] T } + | ^^^^^^^^^^^^ | = note: see issue #67792 for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable diff --git a/tests/ui/traits/const-traits/function-pointer-does-not-require-const.rs b/tests/ui/traits/const-traits/function-pointer-does-not-require-const.rs index 61826e9977e85..8acd195e546b2 100644 --- a/tests/ui/traits/const-traits/function-pointer-does-not-require-const.rs +++ b/tests/ui/traits/const-traits/function-pointer-does-not-require-const.rs @@ -6,7 +6,7 @@ pub trait Test {} impl Test for () {} -pub const fn test() {} +pub const fn test() {} pub const fn min_by_i32() -> fn() { test::<()> diff --git a/tests/ui/traits/const-traits/ice-112822-expected-type-for-param.rs b/tests/ui/traits/const-traits/ice-112822-expected-type-for-param.rs index 4312d295b113b..026f2c0d60326 100644 --- a/tests/ui/traits/const-traits/ice-112822-expected-type-for-param.rs +++ b/tests/ui/traits/const-traits/ice-112822-expected-type-for-param.rs @@ -1,9 +1,9 @@ #![feature(const_trait_impl)] -const fn test() -> impl ~const Fn() { - //~^ ERROR `~const` can only be applied to `#[const_trait]` traits - //~| ERROR `~const` can only be applied to `#[const_trait]` traits - //~| ERROR `~const` can only be applied to `#[const_trait]` traits +const fn test() -> impl [const] Fn() { + //~^ ERROR `[const]` can only be applied to `#[const_trait]` traits + //~| ERROR `[const]` can only be applied to `#[const_trait]` traits + //~| ERROR `[const]` can only be applied to `#[const_trait]` traits const move || { //~ ERROR const closures are experimental let sl: &[u8] = b"foo"; diff --git a/tests/ui/traits/const-traits/ice-112822-expected-type-for-param.stderr b/tests/ui/traits/const-traits/ice-112822-expected-type-for-param.stderr index f06bacdeb4e27..f340eaab0e330 100644 --- a/tests/ui/traits/const-traits/ice-112822-expected-type-for-param.stderr +++ b/tests/ui/traits/const-traits/ice-112822-expected-type-for-param.stderr @@ -8,32 +8,32 @@ 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 -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/ice-112822-expected-type-for-param.rs:3:25 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/ice-112822-expected-type-for-param.rs:3:20 | -LL | const fn test() -> impl ~const Fn() { - | ^^^^^^ can't be applied to `Fn` +LL | const fn test() -> impl [const] Fn() { + | ^^^^^^^^^^^^ can't be applied to `Fn` | -note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/ice-112822-expected-type-for-param.rs:3:25 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/ice-112822-expected-type-for-param.rs:3:20 | -LL | const fn test() -> impl ~const Fn() { - | ^^^^^^ can't be applied to `Fn` +LL | const fn test() -> impl [const] Fn() { + | ^^^^^^^^^^^^ can't be applied to `Fn` | -note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/ice-112822-expected-type-for-param.rs:3:25 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/ice-112822-expected-type-for-param.rs:3:20 | -LL | const fn test() -> impl ~const Fn() { - | ^^^^^^ can't be applied to `Fn` +LL | const fn test() -> impl [const] Fn() { + | ^^^^^^^^^^^^ can't be applied to `Fn` | -note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` 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 fadcaa3981670..f1dbd94716171 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,8 +1,8 @@ #![allow(incomplete_features)] #![feature(generic_const_exprs, const_trait_impl)] -const fn with_positive() {} -//~^ ERROR `~const` can only be applied to `#[const_trait]` traits -//~| ERROR `~const` can only be applied to `#[const_trait]` traits +const fn with_positive() {} +//~^ ERROR `[const]` can only be applied to `#[const_trait]` traits +//~| ERROR `[const]` can only be applied to `#[const_trait]` traits pub fn main() {} diff --git a/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.stderr b/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.stderr index 821b257af8807..d8d73173ec4c9 100644 --- a/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.stderr +++ b/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.stderr @@ -1,19 +1,19 @@ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/ice-123664-unexpected-bound-var.rs:4:27 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/ice-123664-unexpected-bound-var.rs:4:25 | -LL | const fn with_positive() {} - | ^^^^^^ can't be applied to `Fn` +LL | const fn with_positive() {} + | ^^^^^^^^^ can't be applied to `Fn` | -note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/ice-123664-unexpected-bound-var.rs:4:27 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/ice-123664-unexpected-bound-var.rs:4:25 | -LL | const fn with_positive() {} - | ^^^^^^ can't be applied to `Fn` +LL | const fn with_positive() {} + | ^^^^^^^^^ can't be applied to `Fn` | -note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/ops/function.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` 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 d6df1714314aa..ea4db0515cd44 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 @@ -7,7 +7,7 @@ trait Foo {} impl const Foo for i32 {} -impl const Foo for T where T: ~const Foo {} +impl const Foo for T where T: [const] Foo {} //~^ ERROR conflicting implementations of trait `Foo` for type `i32` fn main() {} 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 183c2c2cdf4a6..5b417dcfe2cb2 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 @@ -4,8 +4,8 @@ error[E0119]: conflicting implementations of trait `Foo` for type `i32` LL | impl const Foo for i32 {} | ---------------------- first implementation here LL | -LL | impl const Foo for T where T: ~const Foo {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32` +LL | impl const Foo for T where T: [const] Foo {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32` error: aborting due to 1 previous error diff --git a/tests/ui/traits/const-traits/impl-tilde-const-trait.rs b/tests/ui/traits/const-traits/impl-tilde-const-trait.rs index 05b26465c5b0c..cf387ac56fcad 100644 --- a/tests/ui/traits/const-traits/impl-tilde-const-trait.rs +++ b/tests/ui/traits/const-traits/impl-tilde-const-trait.rs @@ -3,7 +3,7 @@ struct S; trait T {} -impl ~const T for S {} -//~^ ERROR expected a trait, found type +impl [const] T for S {} +//~^ ERROR expected identifier, found `]` fn main() {} diff --git a/tests/ui/traits/const-traits/impl-tilde-const-trait.stderr b/tests/ui/traits/const-traits/impl-tilde-const-trait.stderr index 4695728f8caac..98e34a7d9ff36 100644 --- a/tests/ui/traits/const-traits/impl-tilde-const-trait.stderr +++ b/tests/ui/traits/const-traits/impl-tilde-const-trait.stderr @@ -1,8 +1,8 @@ -error: expected a trait, found type - --> $DIR/impl-tilde-const-trait.rs:6:6 +error: expected identifier, found `]` + --> $DIR/impl-tilde-const-trait.rs:6:12 | -LL | impl ~const T for S {} - | ^^^^^^^^ +LL | impl [const] T for S {} + | ^ expected identifier error: aborting due to 1 previous error diff --git a/tests/ui/traits/const-traits/inherent-impl-const-bounds.rs b/tests/ui/traits/const-traits/inherent-impl-const-bounds.rs index 5ead1353bcd96..941f054280375 100644 --- a/tests/ui/traits/const-traits/inherent-impl-const-bounds.rs +++ b/tests/ui/traits/const-traits/inherent-impl-const-bounds.rs @@ -12,7 +12,7 @@ impl const A for S {} impl const B for S {} impl S { - const fn a() where T: ~const B { + const fn a() where T: [const] B { } } diff --git a/tests/ui/traits/const-traits/issue-100222.rs b/tests/ui/traits/const-traits/issue-100222.rs index 55722d35075a2..4c93272b224f8 100644 --- a/tests/ui/traits/const-traits/issue-100222.rs +++ b/tests/ui/traits/const-traits/issue-100222.rs @@ -11,21 +11,28 @@ pub trait Index { } #[cfg_attr(any(ny, yy), const_trait)] -pub trait IndexMut where Self: Index { +pub trait IndexMut +where + Self: Index, +{ const C: ::Output; type Assoc = ::Output; fn foo(&mut self, x: ::Output) -> ::Output; } -impl Index for () { type Output = (); } +impl Index for () { + type Output = (); +} #[cfg(not(any(nn, yn)))] impl const IndexMut for <() as Index>::Output { const C: ::Output = (); type Assoc = ::Output; fn foo(&mut self, x: ::Output) -> ::Output - where ::Output:, - {} + where + ::Output:, + { + } } #[cfg(any(nn, yn))] @@ -33,8 +40,10 @@ impl IndexMut for <() as Index>::Output { const C: ::Output = (); type Assoc = ::Output; fn foo(&mut self, x: ::Output) -> ::Output - where ::Output:, - {} + where + ::Output:, + { + } } const C: <() as Index>::Output = (); diff --git a/tests/ui/traits/const-traits/issue-92111.rs b/tests/ui/traits/const-traits/issue-92111.rs index c8db5cc9e7ad8..2450136793e0c 100644 --- a/tests/ui/traits/const-traits/issue-92111.rs +++ b/tests/ui/traits/const-traits/issue-92111.rs @@ -14,7 +14,7 @@ pub struct S(i32); impl Tr for S {} -const fn a(t: T) {} +const fn a(t: T) {} fn main() { a(S(0)); 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 a3edc5ff8b107..0eb7f54d596fb 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 @@ -10,7 +10,7 @@ pub trait Super {} #[const_trait] pub trait Sub: Super {} -impl const Super for &A where A: ~const Super {} -impl const Sub for &A where A: ~const Sub {} +impl const Super for &A where A: [const] Super {} +impl const Sub for &A where A: [const] Sub {} fn main() {} 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 f4bfcbda0ac44..029597ea1f032 100644 --- a/tests/ui/traits/const-traits/item-bound-entailment-fails.rs +++ b/tests/ui/traits/const-traits/item-bound-entailment-fails.rs @@ -2,27 +2,27 @@ #![feature(const_trait_impl)] #[const_trait] trait Foo { - type Assoc: ~const Bar + type Assoc: [const] Bar where - T: ~const Bar; + T: [const] Bar; } #[const_trait] trait Bar {} struct N(T); impl Bar for N where T: Bar {} struct C(T); -impl const Bar for C where T: ~const Bar {} +impl const Bar for C where T: [const] Bar {} impl const Foo for u32 { type Assoc = N - //~^ ERROR the trait bound `N: ~const Bar` is not satisfied + //~^ ERROR the trait bound `N: [const] Bar` is not satisfied where - T: ~const Bar; + T: [const] Bar; } impl const Foo for i32 { type Assoc = C - //~^ ERROR the trait bound `T: ~const Bar` is not satisfied + //~^ ERROR the trait bound `T: [const] Bar` is not satisfied where T: 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 7e72dc9abaa24..8e5894a32966f 100644 --- a/tests/ui/traits/const-traits/item-bound-entailment-fails.stderr +++ b/tests/ui/traits/const-traits/item-bound-entailment-fails.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `N: ~const Bar` is not satisfied +error[E0277]: the trait bound `N: [const] Bar` is not satisfied --> $DIR/item-bound-entailment-fails.rs:17:21 | LL | type Assoc = N @@ -7,25 +7,25 @@ LL | type Assoc = N note: required by a bound in `Foo::Assoc` --> $DIR/item-bound-entailment-fails.rs:5:20 | -LL | type Assoc: ~const Bar - | ^^^^^^^^^^ required by this bound in `Foo::Assoc` +LL | type Assoc: [const] Bar + | ^^^^^^^^^^^ required by this bound in `Foo::Assoc` -error[E0277]: the trait bound `T: ~const Bar` is not satisfied +error[E0277]: the trait bound `T: [const] Bar` is not satisfied --> $DIR/item-bound-entailment-fails.rs:24:21 | LL | type Assoc = C | ^^^^ | -note: required for `C` to implement `~const Bar` +note: required for `C` to implement `[const] Bar` --> $DIR/item-bound-entailment-fails.rs:14:15 | -LL | impl const Bar for C where T: ~const Bar {} - | ^^^ ^^^^ ---------- unsatisfied trait bound introduced here +LL | impl const Bar for C where T: [const] Bar {} + | ^^^ ^^^^ ----------- unsatisfied trait bound introduced here note: required by a bound in `Foo::Assoc` --> $DIR/item-bound-entailment-fails.rs:5:20 | -LL | type Assoc: ~const Bar - | ^^^^^^^^^^ required by this bound in `Foo::Assoc` +LL | type Assoc: [const] Bar + | ^^^^^^^^^^^ required by this bound in `Foo::Assoc` error: aborting due to 2 previous errors diff --git a/tests/ui/traits/const-traits/item-bound-entailment.rs b/tests/ui/traits/const-traits/item-bound-entailment.rs index 11db57be81513..6e053adb3850d 100644 --- a/tests/ui/traits/const-traits/item-bound-entailment.rs +++ b/tests/ui/traits/const-traits/item-bound-entailment.rs @@ -4,16 +4,16 @@ #![feature(const_trait_impl)] #[const_trait] trait Foo { - type Assoc: ~const Bar + type Assoc: [const] Bar where - T: ~const Bar; + T: [const] Bar; } #[const_trait] trait Bar {} struct N(T); impl Bar for N where T: Bar {} struct C(T); -impl const Bar for C where T: ~const Bar {} +impl const Bar for C where T: [const] Bar {} impl Foo for u32 { type Assoc = N @@ -24,7 +24,7 @@ impl Foo for u32 { impl const Foo for i32 { type Assoc = C where - T: ~const Bar; + T: [const] Bar; } fn main() {} diff --git a/tests/ui/traits/const-traits/mbe-bare-trait-objects-const-trait-bounds.rs b/tests/ui/traits/const-traits/mbe-bare-trait-objects-const-trait-bounds.rs index 820d3d63b62d1..a5f6ae198f611 100644 --- a/tests/ui/traits/const-traits/mbe-bare-trait-objects-const-trait-bounds.rs +++ b/tests/ui/traits/const-traits/mbe-bare-trait-objects-const-trait-bounds.rs @@ -1,20 +1,24 @@ -// Ensure that we don't consider `const Trait` and `~const Trait` to +// Ensure that we don't consider `const Trait` to // match the macro fragment specifier `ty` as that would be a breaking // change theoretically speaking. Syntactically trait object types can // be "bare", i.e., lack the prefix `dyn`. // By contrast, `?Trait` *does* match `ty` and therefore an arm like // `?$Trait:path` would never be reached. // See `parser/macro/mbe-bare-trait-object-maybe-trait-bound.rs`. - -//@ check-pass +// `[const] Trait` is already an error for a `ty` fragment, +// so we do not need to prevent that. macro_rules! check { - ($Type:ty) => { compile_error!("ty"); }; + ($Type:ty) => { + compile_error!("ty"); + }; (const $Trait:path) => {}; - (~const $Trait:path) => {}; + ([const] $Trait:path) => {}; } check! { const Trait } -check! { ~const Trait } +check! { [const] Trait } +//~^ ERROR: expected identifier, found `]` +//~| ERROR: const trait impls are experimental fn main() {} diff --git a/tests/ui/traits/const-traits/mbe-bare-trait-objects-const-trait-bounds.stderr b/tests/ui/traits/const-traits/mbe-bare-trait-objects-const-trait-bounds.stderr new file mode 100644 index 0000000000000..56dad5301a4a3 --- /dev/null +++ b/tests/ui/traits/const-traits/mbe-bare-trait-objects-const-trait-bounds.stderr @@ -0,0 +1,22 @@ +error: expected identifier, found `]` + --> $DIR/mbe-bare-trait-objects-const-trait-bounds.rs:20:16 + | +LL | ($Type:ty) => { + | -------- while parsing argument for this `ty` macro fragment +... +LL | check! { [const] Trait } + | ^ expected identifier + +error[E0658]: const trait impls are experimental + --> $DIR/mbe-bare-trait-objects-const-trait-bounds.rs:20:11 + | +LL | check! { [const] Trait } + | ^^^^^ + | + = note: see issue #67792 for more information + = 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 + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/traits/const-traits/minicore-deref-fail.rs b/tests/ui/traits/const-traits/minicore-deref-fail.rs index f4a7678a00926..d9b33fa040a08 100644 --- a/tests/ui/traits/const-traits/minicore-deref-fail.rs +++ b/tests/ui/traits/const-traits/minicore-deref-fail.rs @@ -11,10 +11,12 @@ use minicore::*; struct Ty; impl Deref for Ty { type Target = (); - fn deref(&self) -> &Self::Target { &() } + fn deref(&self) -> &Self::Target { + &() + } } const fn foo() { *Ty; - //~^ ERROR the trait bound `Ty: ~const minicore::Deref` is not satisfied + //~^ ERROR the trait bound `Ty: [const] minicore::Deref` is not satisfied } diff --git a/tests/ui/traits/const-traits/minicore-deref-fail.stderr b/tests/ui/traits/const-traits/minicore-deref-fail.stderr index a1f840114fc87..4329b235756be 100644 --- a/tests/ui/traits/const-traits/minicore-deref-fail.stderr +++ b/tests/ui/traits/const-traits/minicore-deref-fail.stderr @@ -1,5 +1,5 @@ -error[E0277]: the trait bound `Ty: ~const minicore::Deref` is not satisfied - --> $DIR/minicore-deref-fail.rs:18:5 +error[E0277]: the trait bound `Ty: [const] minicore::Deref` is not satisfied + --> $DIR/minicore-deref-fail.rs:20:5 | LL | *Ty; | ^^^ diff --git a/tests/ui/traits/const-traits/minicore-drop-fail.rs b/tests/ui/traits/const-traits/minicore-drop-fail.rs index 274e5db21c4f6..f3e7c7df4d419 100644 --- a/tests/ui/traits/const-traits/minicore-drop-fail.rs +++ b/tests/ui/traits/const-traits/minicore-drop-fail.rs @@ -19,7 +19,7 @@ impl Drop for NotDropImpl { impl Foo for () {} struct Conditional(T); -impl const Drop for Conditional where T: ~const Foo { +impl const Drop for Conditional where T: [const] Foo { fn drop(&mut self) {} } diff --git a/tests/ui/traits/const-traits/minicore-fn-fail.rs b/tests/ui/traits/const-traits/minicore-fn-fail.rs index ae1cbc6ca5885..d4cd41a51ca5c 100644 --- a/tests/ui/traits/const-traits/minicore-fn-fail.rs +++ b/tests/ui/traits/const-traits/minicore-fn-fail.rs @@ -8,14 +8,14 @@ extern crate minicore; use minicore::*; -const fn call_indirect(t: &T) { t() } +const fn call_indirect(t: &T) { t() } #[const_trait] trait Foo {} impl Foo for () {} -const fn foo() {} +const fn foo() {} const fn test() { call_indirect(&foo::<()>); - //~^ ERROR the trait bound `(): ~const Foo` is not satisfied + //~^ ERROR the trait bound `(): [const] Foo` is not satisfied } diff --git a/tests/ui/traits/const-traits/minicore-fn-fail.stderr b/tests/ui/traits/const-traits/minicore-fn-fail.stderr index 03c7ade87c011..c02a067774b56 100644 --- a/tests/ui/traits/const-traits/minicore-fn-fail.stderr +++ b/tests/ui/traits/const-traits/minicore-fn-fail.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): ~const Foo` is not satisfied +error[E0277]: the trait bound `(): [const] Foo` is not satisfied --> $DIR/minicore-fn-fail.rs:19:19 | LL | call_indirect(&foo::<()>); @@ -9,8 +9,8 @@ LL | call_indirect(&foo::<()>); note: required by a bound in `call_indirect` --> $DIR/minicore-fn-fail.rs:11:27 | -LL | const fn call_indirect(t: &T) { t() } - | ^^^^^^^^^^^ required by this bound in `call_indirect` +LL | const fn call_indirect(t: &T) { t() } + | ^^^^^^^^^^^^ required by this bound in `call_indirect` error: aborting due to 1 previous error diff --git a/tests/ui/traits/const-traits/minicore-works.rs b/tests/ui/traits/const-traits/minicore-works.rs index c79b4fc07dfd6..ef08e84c02b81 100644 --- a/tests/ui/traits/const-traits/minicore-works.rs +++ b/tests/ui/traits/const-traits/minicore-works.rs @@ -21,7 +21,9 @@ const fn test_op() { let _y = Custom + Custom; } -const fn call_indirect(t: &T) { t() } +const fn call_indirect(t: &T) { + t() +} const fn call() { call_indirect(&call); diff --git a/tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.rs b/tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.rs index aaab8e819a39c..5f47778a1404f 100644 --- a/tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.rs +++ b/tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.rs @@ -1,13 +1,13 @@ #![feature(const_trait_impl)] -const fn maybe_const_maybe() {} -//~^ ERROR `~const` trait not allowed with `?` trait polarity modifier +const fn maybe_const_maybe() {} +//~^ ERROR `[const]` trait not allowed with `?` trait polarity modifier fn const_maybe() {} //~^ ERROR `const` trait not allowed with `?` trait polarity modifier -const fn maybe_const_negative() {} -//~^ ERROR `~const` trait not allowed with `!` trait polarity modifier +const fn maybe_const_negative() {} +//~^ ERROR `[const]` trait not allowed with `!` trait polarity modifier //~| ERROR negative bounds are not supported fn const_negative() {} diff --git a/tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.stderr b/tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.stderr index 18e4d160f5f46..429131f905f0e 100644 --- a/tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.stderr +++ b/tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.stderr @@ -1,10 +1,10 @@ -error: `~const` trait not allowed with `?` trait polarity modifier - --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:3:38 +error: `[const]` trait not allowed with `?` trait polarity modifier + --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:3:39 | -LL | const fn maybe_const_maybe() {} - | ------ ^ +LL | const fn maybe_const_maybe() {} + | ------- ^ | | - | there is not a well-defined meaning for a `~const ?` trait + | there is not a well-defined meaning for a `[const] ?` trait error: `const` trait not allowed with `?` trait polarity modifier --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:6:25 @@ -14,13 +14,13 @@ LL | fn const_maybe() {} | | | there is not a well-defined meaning for a `const ?` trait -error: `~const` trait not allowed with `!` trait polarity modifier - --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:9:41 +error: `[const]` trait not allowed with `!` trait polarity modifier + --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:9:42 | -LL | const fn maybe_const_negative() {} - | ------ ^ +LL | const fn maybe_const_negative() {} + | ------- ^ | | - | there is not a well-defined meaning for a `~const !` trait + | there is not a well-defined meaning for a `[const] !` trait error: `const` trait not allowed with `!` trait polarity modifier --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:13:28 @@ -31,10 +31,10 @@ LL | fn const_negative() {} | there is not a well-defined meaning for a `const !` trait error: negative bounds are not supported - --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:9:41 + --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:9:42 | -LL | const fn maybe_const_negative() {} - | ^ +LL | const fn maybe_const_negative() {} + | ^ error: negative bounds are not supported --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:13:28 diff --git a/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.rs b/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.rs index 8f11c8a6e5576..86e3e5f769f8a 100644 --- a/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.rs +++ b/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.rs @@ -7,7 +7,7 @@ trait Convert { fn to(self) -> T; } -impl const Convert for A where B: ~const From { +impl const Convert for A where B: [const] From { fn to(self) -> B { B::from(self) } diff --git a/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.stderr b/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.stderr index 190af5e7c2dd1..8211b2b49bfd0 100644 --- a/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.stderr +++ b/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.stderr @@ -1,19 +1,19 @@ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/non-const-op-in-closure-in-const.rs:10:44 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/non-const-op-in-closure-in-const.rs:10:42 | -LL | impl const Convert for A where B: ~const From { - | ^^^^^^ can't be applied to `From` +LL | impl const Convert for A where B: [const] From { + | ^^^^^^^^^ can't be applied to `From` | -note: `From` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `From` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/convert/mod.rs:LL:COL -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/non-const-op-in-closure-in-const.rs:10:44 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/non-const-op-in-closure-in-const.rs:10:42 | -LL | impl const Convert for A where B: ~const From { - | ^^^^^^ can't be applied to `From` +LL | impl const Convert for A where B: [const] From { + | ^^^^^^^^^ can't be applied to `From` | -note: `From` can't be used with `~const` because it isn't annotated with `#[const_trait]` +note: `From` can't be used with `[const]` because it isn't annotated with `#[const_trait]` --> $SRC_DIR/core/src/convert/mod.rs:LL:COL = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` diff --git a/tests/ui/traits/const-traits/overlap-const-with-nonconst.min_spec.stderr b/tests/ui/traits/const-traits/overlap-const-with-nonconst.min_spec.stderr index bd822970ad1ef..ed671bee63ab5 100644 --- a/tests/ui/traits/const-traits/overlap-const-with-nonconst.min_spec.stderr +++ b/tests/ui/traits/const-traits/overlap-const-with-nonconst.min_spec.stderr @@ -3,8 +3,8 @@ error[E0119]: conflicting implementations of trait `Foo` for type `(_,)` | LL | / impl const Foo for T LL | | where -LL | | T: ~const Bar, - | |__________________- first implementation here +LL | | T: [const] Bar, + | |___________________- first implementation here ... LL | impl Foo for (T,) { | ^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(_,)` diff --git a/tests/ui/traits/const-traits/overlap-const-with-nonconst.rs b/tests/ui/traits/const-traits/overlap-const-with-nonconst.rs index eb66d03faa638..f45690b2f78b9 100644 --- a/tests/ui/traits/const-traits/overlap-const-with-nonconst.rs +++ b/tests/ui/traits/const-traits/overlap-const-with-nonconst.rs @@ -15,7 +15,7 @@ trait Foo { } impl const Foo for T where - T: ~const Bar, + T: [const] Bar, { default fn method(&self) {} } @@ -27,7 +27,7 @@ impl Foo for (T,) { } } -const fn dispatch(t: T) { +const fn dispatch(t: T) { t.method(); } diff --git a/tests/ui/traits/const-traits/overlap-const-with-nonconst.spec.stderr b/tests/ui/traits/const-traits/overlap-const-with-nonconst.spec.stderr index cbdcb45f6beba..35f4d9184cf5b 100644 --- a/tests/ui/traits/const-traits/overlap-const-with-nonconst.spec.stderr +++ b/tests/ui/traits/const-traits/overlap-const-with-nonconst.spec.stderr @@ -13,8 +13,8 @@ error[E0119]: conflicting implementations of trait `Foo` for type `(_,)` | LL | / impl const Foo for T LL | | where -LL | | T: ~const Bar, - | |__________________- first implementation here +LL | | T: [const] Bar, + | |___________________- first implementation here ... LL | impl Foo for (T,) { | ^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(_,)` diff --git a/tests/ui/traits/const-traits/predicate-entailment-fails.rs b/tests/ui/traits/const-traits/predicate-entailment-fails.rs index 266a49f9e386d..0e6c277fd8220 100644 --- a/tests/ui/traits/const-traits/predicate-entailment-fails.rs +++ b/tests/ui/traits/const-traits/predicate-entailment-fails.rs @@ -6,9 +6,9 @@ impl const Bar for () {} #[const_trait] trait TildeConst { - type Bar where T: ~const Bar; + type Bar where T: [const] Bar; - fn foo() where T: ~const Bar; + fn foo() where T: [const] Bar; } impl TildeConst for () { type Bar = () where T: const Bar; @@ -32,10 +32,10 @@ impl NeverConst for i32 { //~^ ERROR impl has stricter requirements than trait } impl const NeverConst for u32 { - type Bar = () where T: ~const Bar; + type Bar = () where T: [const] Bar; //~^ ERROR impl has stricter requirements than trait - fn foo() where T: ~const Bar {} + fn foo() where T: [const] Bar {} //~^ ERROR impl has stricter requirements than trait } diff --git a/tests/ui/traits/const-traits/predicate-entailment-fails.stderr b/tests/ui/traits/const-traits/predicate-entailment-fails.stderr index dfdc4d232508f..cba7c979a42ae 100644 --- a/tests/ui/traits/const-traits/predicate-entailment-fails.stderr +++ b/tests/ui/traits/const-traits/predicate-entailment-fails.stderr @@ -1,7 +1,7 @@ error[E0276]: impl has stricter requirements than trait --> $DIR/predicate-entailment-fails.rs:14:31 | -LL | type Bar where T: ~const Bar; +LL | type Bar where T: [const] Bar; | ----------- definition of `Bar` from trait ... LL | type Bar = () where T: const Bar; @@ -10,8 +10,8 @@ LL | type Bar = () where T: const Bar; error[E0276]: impl has stricter requirements than trait --> $DIR/predicate-entailment-fails.rs:17:26 | -LL | fn foo() where T: ~const Bar; - | -------------------------------- definition of `foo` from trait +LL | fn foo() where T: [const] Bar; + | --------------------------------- definition of `foo` from trait ... LL | fn foo() where T: const Bar {} | ^^^^^^^^^ impl has extra requirement `T: const Bar` @@ -40,8 +40,8 @@ error[E0276]: impl has stricter requirements than trait LL | type Bar where T: Bar; | ----------- definition of `Bar` from trait ... -LL | type Bar = () where T: ~const Bar; - | ^^^^^^^^^^ impl has extra requirement `T: ~const Bar` +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:38:26 @@ -49,8 +49,8 @@ error[E0276]: impl has stricter requirements than trait LL | fn foo() where T: Bar; | ------------------------- definition of `foo` from trait ... -LL | fn foo() where T: ~const Bar {} - | ^^^^^^^^^^ impl has extra requirement `T: ~const Bar` +LL | fn foo() where T: [const] Bar {} + | ^^^^^^^^^^^ impl has extra requirement `T: [const] Bar` error: aborting due to 6 previous errors diff --git a/tests/ui/traits/const-traits/predicate-entailment-passes.rs b/tests/ui/traits/const-traits/predicate-entailment-passes.rs index 28ae21891f386..fe8714831866a 100644 --- a/tests/ui/traits/const-traits/predicate-entailment-passes.rs +++ b/tests/ui/traits/const-traits/predicate-entailment-passes.rs @@ -7,7 +7,7 @@ impl const Bar for () {} #[const_trait] trait TildeConst { - fn foo() where T: ~const Bar; + fn foo() where T: [const] Bar; } impl TildeConst for () { fn foo() where T: Bar {} @@ -21,7 +21,7 @@ impl AlwaysConst for i32 { fn foo() where T: Bar {} } impl const AlwaysConst for u32 { - fn foo() where T: ~const Bar {} + fn foo() where T: [const] Bar {} } fn main() {} 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 5af9ee8614fd5..212d869d94d39 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,5 +1,5 @@ -// 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. +// 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(const_trait_impl) ^ should error @@ -20,14 +20,14 @@ trait Bar { impl const Bar for T where - T: ~const Foo, + T: [const] Foo, { default fn bar() {} } impl Bar for T where - T: Foo, //FIXME ~ ERROR missing `~const` qualifier + T: Foo, //FIXME ~ ERROR missing `[const]` qualifier T: Specialize, { fn bar() {} @@ -40,7 +40,7 @@ trait Baz { impl const Baz for T where - T: ~const Foo, + T: [const] Foo, { default fn baz() {} } diff --git a/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.stderr b/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.stderr index 9166b8ca5d22b..074e6237cc20d 100644 --- a/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.stderr +++ b/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.stderr @@ -3,12 +3,12 @@ error[E0119]: conflicting implementations of trait `Bar` | LL | / impl const Bar for T LL | | where -LL | | T: ~const Foo, - | |__________________- first implementation here +LL | | T: [const] Foo, + | |___________________- first implementation here ... LL | / impl Bar for T LL | | where -LL | | T: Foo, //FIXME ~ ERROR missing `~const` qualifier +LL | | T: Foo, //FIXME ~ ERROR missing `[const]` qualifier LL | | T: Specialize, | |__________________^ conflicting implementation @@ -17,8 +17,8 @@ error[E0119]: conflicting implementations of trait `Baz` | LL | / impl const Baz for T LL | | where -LL | | T: ~const Foo, - | |__________________- first implementation here +LL | | T: [const] Foo, + | |___________________- first implementation here ... LL | / impl const Baz for T //FIXME ~ ERROR conflicting implementations of trait `Baz` LL | | where 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 89ad61c3c31c4..6991b7deda317 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 @@ -11,7 +11,7 @@ trait Value { fn value() -> u32; } -const fn get_value() -> u32 { +const fn get_value() -> u32 { T::value() } diff --git a/tests/ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.rs b/tests/ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.rs index d80370aee8209..b4f3b46c00f55 100644 --- a/tests/ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.rs +++ b/tests/ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.rs @@ -1,4 +1,4 @@ -// Tests that `~const` trait bounds can be used to specialize const trait impls. +// Tests that `[const]` trait bounds can be used to specialize const trait impls. //@ check-pass @@ -21,7 +21,7 @@ impl const Foo for T { impl const Foo for T where - T: ~const Specialize, + T: [const] Specialize, { fn foo() {} } @@ -33,15 +33,15 @@ trait Bar { impl const Bar for T where - T: ~const Foo, + T: [const] Foo, { default fn bar() {} } impl const Bar for T where - T: ~const Foo, - T: ~const Specialize, + T: [const] Foo, + T: [const] Specialize, { fn bar() {} } diff --git a/tests/ui/traits/const-traits/specialization/issue-95187-same-trait-bound-different-constness.rs b/tests/ui/traits/const-traits/specialization/issue-95187-same-trait-bound-different-constness.rs index d97469edaf97f..754f1c6d09d5d 100644 --- a/tests/ui/traits/const-traits/specialization/issue-95187-same-trait-bound-different-constness.rs +++ b/tests/ui/traits/const-traits/specialization/issue-95187-same-trait-bound-different-constness.rs @@ -1,4 +1,4 @@ -// Tests that `T: ~const Foo` in a specializing impl is treated as equivalent to +// Tests that `T: [const] Foo` in a specializing impl is treated as equivalent to // `T: Foo` in the default impl for the purposes of specialization (i.e., it // does not think that the user is attempting to specialize on trait `Foo`). @@ -28,7 +28,7 @@ where impl const Bar for T where - T: ~const Foo, + T: [const] Foo, T: Specialize, { fn bar() {} @@ -48,7 +48,7 @@ where impl const Baz for T where - T: ~const Foo, + T: [const] Foo, T: Specialize, { fn baz() {} 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 e9b494bc2c0d9..b1a1b4a239955 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 @@ -11,7 +11,7 @@ trait Value { fn value() -> u32; } -const fn get_value() -> u32 { +const fn get_value() -> u32 { T::value() } diff --git a/tests/ui/traits/const-traits/specializing-constness-2.rs b/tests/ui/traits/const-traits/specializing-constness-2.rs index c1fe42b975127..86c2cee9fedbc 100644 --- a/tests/ui/traits/const-traits/specializing-constness-2.rs +++ b/tests/ui/traits/const-traits/specializing-constness-2.rs @@ -17,7 +17,7 @@ impl A for T { } } -impl const A for T { +impl const A for T { fn a() -> u32 { 3 } @@ -25,7 +25,7 @@ impl const A for T { const fn generic() { ::a(); - //FIXME ~^ ERROR: the trait bound `T: ~const Sup` is not satisfied + //FIXME ~^ ERROR: the trait bound `T: [const] Sup` is not satisfied } fn main() {} diff --git a/tests/ui/traits/const-traits/specializing-constness-2.stderr b/tests/ui/traits/const-traits/specializing-constness-2.stderr index edba836aac354..850e6939daebc 100644 --- a/tests/ui/traits/const-traits/specializing-constness-2.stderr +++ b/tests/ui/traits/const-traits/specializing-constness-2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: ~const A` is not satisfied +error[E0277]: the trait bound `T: [const] A` is not satisfied --> $DIR/specializing-constness-2.rs:27:6 | LL | ::a(); diff --git a/tests/ui/traits/const-traits/specializing-constness.rs b/tests/ui/traits/const-traits/specializing-constness.rs index 94b6da7124d29..b64d8b21b24be 100644 --- a/tests/ui/traits/const-traits/specializing-constness.rs +++ b/tests/ui/traits/const-traits/specializing-constness.rs @@ -14,7 +14,7 @@ pub trait A { #[const_trait] pub trait Spec {} -impl const A for T { +impl const A for T { default fn a() -> u32 { 2 } diff --git a/tests/ui/traits/const-traits/specializing-constness.stderr b/tests/ui/traits/const-traits/specializing-constness.stderr index 2ca70b53e4e21..f411ebcdfcac5 100644 --- a/tests/ui/traits/const-traits/specializing-constness.stderr +++ b/tests/ui/traits/const-traits/specializing-constness.stderr @@ -1,8 +1,8 @@ error[E0119]: conflicting implementations of trait `A` --> $DIR/specializing-constness.rs:23:1 | -LL | impl const A for T { - | ---------------------------------- first implementation here +LL | impl const A for T { + | ----------------------------------- first implementation here ... LL | impl A for T { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation diff --git a/tests/ui/traits/const-traits/staged-api.rs b/tests/ui/traits/const-traits/staged-api.rs index bf09a5f780385..d24b26be569ca 100644 --- a/tests/ui/traits/const-traits/staged-api.rs +++ b/tests/ui/traits/const-traits/staged-api.rs @@ -23,7 +23,7 @@ impl const MyTrait for Foo { } #[rustc_allow_const_fn_unstable(const_trait_impl, unstable)] -const fn conditionally_const() { +const fn conditionally_const() { T::func(); } 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 8f88e3aa8bc6d..11f73cbf0c9ce 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,31 +1,31 @@ -error: `~const` is not allowed here - --> $DIR/super-traits-fail-2.rs:11:12 +error: `[const]` is not allowed here + --> $DIR/super-traits-fail-2.rs:11:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ | -note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds +note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds --> $DIR/super-traits-fail-2.rs:11:1 | -LL | trait Bar: ~const Foo {} - | ^^^^^^^^^^^^^^^^^^^^^^^^ +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:11:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-2.rs:11:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations | LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:11:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-2.rs:11:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations @@ -33,11 +33,11 @@ help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:11:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-2.rs:11:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations 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 087e80de788e0..1767672e18049 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,19 +1,19 @@ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:11:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-2.rs:11:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations | LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:11:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-2.rs:11:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations @@ -21,11 +21,11 @@ help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:11:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-2.rs:11:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations @@ -33,11 +33,11 @@ help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:11:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-2.rs:11:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations @@ -45,11 +45,11 @@ help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-2.rs:11:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-2.rs:11:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations 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 6cc9d7394767a..781dacb81a197 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-2.rs +++ b/tests/ui/traits/const-traits/super-traits-fail-2.rs @@ -8,17 +8,17 @@ trait Foo { } #[cfg_attr(any(yy, ny), const_trait)] -trait Bar: ~const Foo {} -//[ny,nn]~^ ERROR: `~const` can only be applied to `#[const_trait]` -//[ny,nn]~| ERROR: `~const` can only be applied to `#[const_trait]` -//[ny,nn]~| ERROR: `~const` can only be applied to `#[const_trait]` -//[ny]~| ERROR: `~const` can only be applied to `#[const_trait]` -//[ny]~| ERROR: `~const` can only be applied to `#[const_trait]` -//[yn,nn]~^^^^^^ ERROR: `~const` is not allowed here +trait Bar: [const] Foo {} +//[ny,nn]~^ ERROR: `[const]` can only be applied to `#[const_trait]` +//[ny,nn]~| ERROR: `[const]` can only be applied to `#[const_trait]` +//[ny,nn]~| ERROR: `[const]` can only be applied to `#[const_trait]` +//[ny]~| ERROR: `[const]` can only be applied to `#[const_trait]` +//[ny]~| ERROR: `[const]` can only be applied to `#[const_trait]` +//[yn,nn]~^^^^^^ ERROR: `[const]` is not allowed here const fn foo(x: &T) { x.a(); - //[yy,yn]~^ ERROR the trait bound `T: ~const Foo` + //[yy,yn]~^ ERROR the trait bound `T: [const] Foo` //[nn,ny]~^^ ERROR cannot call non-const method `::a` in constant functions } 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 ee49810bacec4..63c33a00234a6 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,16 +1,16 @@ -error: `~const` is not allowed here - --> $DIR/super-traits-fail-2.rs:11:12 +error: `[const]` is not allowed here + --> $DIR/super-traits-fail-2.rs:11:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ | -note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds +note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds --> $DIR/super-traits-fail-2.rs:11:1 | -LL | trait Bar: ~const Foo {} - | ^^^^^^^^^^^^^^^^^^^^^^^^ +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0277]: the trait bound `T: ~const Foo` is not satisfied +error[E0277]: the trait bound `T: [const] Foo` is not satisfied --> $DIR/super-traits-fail-2.rs:20:7 | 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 a213273c1c78d..4ae4bbde99bb2 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,4 +1,4 @@ -error[E0277]: the trait bound `T: ~const Foo` is not satisfied +error[E0277]: the trait bound `T: [const] Foo` is not satisfied --> $DIR/super-traits-fail-2.rs:20:7 | LL | x.a(); diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.nnn.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.nnn.stderr index a5ef716a62a5d..c6a06d074c93c 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-3.nnn.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-3.nnn.stderr @@ -1,51 +1,51 @@ -error: `~const` is not allowed here - --> $DIR/super-traits-fail-3.rs:23:12 +error: `[const]` is not allowed here + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ | -note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds +note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds --> $DIR/super-traits-fail-3.rs:23:1 | -LL | trait Bar: ~const Foo {} - | ^^^^^^^^^^^^^^^^^^^^^^^^ +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0658]: const trait impls are experimental - --> $DIR/super-traits-fail-3.rs:23:12 + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ | = note: see issue #67792 for more information = 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 error[E0658]: const trait impls are experimental - --> $DIR/super-traits-fail-3.rs:32:17 + --> $DIR/super-traits-fail-3.rs:32:15 | -LL | const fn foo(x: &T) { - | ^^^^^^ +LL | const fn foo(x: &T) { + | ^^^^^^^^^ | = note: see issue #67792 for more information = 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 -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:23:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations | LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:23:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations @@ -53,11 +53,11 @@ help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[ LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:23:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations @@ -65,27 +65,27 @@ help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[ LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:32:17 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:32:15 | -LL | const fn foo(x: &T) { - | ^^^^^^ can't be applied to `Bar` +LL | const fn foo(x: &T) { + | ^^^^^^^^^ can't be applied to `Bar` | help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations | -LL | #[const_trait] trait Bar: ~const Foo {} +LL | #[const_trait] trait Bar: [const] Foo {} | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:32:17 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:32:15 | -LL | const fn foo(x: &T) { - | ^^^^^^ can't be applied to `Bar` +LL | const fn foo(x: &T) { + | ^^^^^^^^^ can't be applied to `Bar` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations | -LL | #[const_trait] trait Bar: ~const Foo {} +LL | #[const_trait] trait Bar: [const] Foo {} | ++++++++++++++ error[E0015]: cannot call non-const method `::a` in constant functions diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.nny.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.nny.stderr index a5ef716a62a5d..c6a06d074c93c 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-3.nny.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-3.nny.stderr @@ -1,51 +1,51 @@ -error: `~const` is not allowed here - --> $DIR/super-traits-fail-3.rs:23:12 +error: `[const]` is not allowed here + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ | -note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds +note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds --> $DIR/super-traits-fail-3.rs:23:1 | -LL | trait Bar: ~const Foo {} - | ^^^^^^^^^^^^^^^^^^^^^^^^ +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0658]: const trait impls are experimental - --> $DIR/super-traits-fail-3.rs:23:12 + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ | = note: see issue #67792 for more information = 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 error[E0658]: const trait impls are experimental - --> $DIR/super-traits-fail-3.rs:32:17 + --> $DIR/super-traits-fail-3.rs:32:15 | -LL | const fn foo(x: &T) { - | ^^^^^^ +LL | const fn foo(x: &T) { + | ^^^^^^^^^ | = note: see issue #67792 for more information = 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 -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:23:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations | LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:23:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations @@ -53,11 +53,11 @@ help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[ LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:23:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations @@ -65,27 +65,27 @@ help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[ LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:32:17 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:32:15 | -LL | const fn foo(x: &T) { - | ^^^^^^ can't be applied to `Bar` +LL | const fn foo(x: &T) { + | ^^^^^^^^^ can't be applied to `Bar` | help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations | -LL | #[const_trait] trait Bar: ~const Foo {} +LL | #[const_trait] trait Bar: [const] Foo {} | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:32:17 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:32:15 | -LL | const fn foo(x: &T) { - | ^^^^^^ can't be applied to `Bar` +LL | const fn foo(x: &T) { + | ^^^^^^^^^ can't be applied to `Bar` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations | -LL | #[const_trait] trait Bar: ~const Foo {} +LL | #[const_trait] trait Bar: [const] Foo {} | ++++++++++++++ error[E0015]: cannot call non-const method `::a` in constant functions diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.nyn.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.nyn.stderr index 024db4b6d68d0..feca029aa6cba 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-3.nyn.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-3.nyn.stderr @@ -1,18 +1,18 @@ error[E0658]: const trait impls are experimental - --> $DIR/super-traits-fail-3.rs:23:12 + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ | = note: see issue #67792 for more information = 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 error[E0658]: const trait impls are experimental - --> $DIR/super-traits-fail-3.rs:32:17 + --> $DIR/super-traits-fail-3.rs:32:15 | -LL | const fn foo(x: &T) { - | ^^^^^^ +LL | const fn foo(x: &T) { + | ^^^^^^^^^ | = note: see issue #67792 for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.nyy.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.nyy.stderr index 024db4b6d68d0..feca029aa6cba 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-3.nyy.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-3.nyy.stderr @@ -1,18 +1,18 @@ error[E0658]: const trait impls are experimental - --> $DIR/super-traits-fail-3.rs:23:12 + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ | = note: see issue #67792 for more information = 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 error[E0658]: const trait impls are experimental - --> $DIR/super-traits-fail-3.rs:32:17 + --> $DIR/super-traits-fail-3.rs:32:15 | -LL | const fn foo(x: &T) { - | ^^^^^^ +LL | const fn foo(x: &T) { + | ^^^^^^^^^ | = note: see issue #67792 for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable 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 d7e0cdc26edd0..5370f607decb7 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-3.rs +++ b/tests/ui/traits/const-traits/super-traits-fail-3.rs @@ -20,21 +20,21 @@ trait Foo { #[cfg_attr(any(yyy, yny, nyy, nyn), const_trait)] //[nyy,nyn]~^ ERROR: `const_trait` is a temporary placeholder for marking a trait that is suitable for `const` `impls` and all default bodies as `const`, which may be removed or renamed in the future -trait Bar: ~const Foo {} -//[yny,ynn,nny,nnn]~^ ERROR: `~const` can only be applied to `#[const_trait]` -//[yny,ynn,nny,nnn]~| ERROR: `~const` can only be applied to `#[const_trait]` -//[yny,ynn,nny,nnn]~| ERROR: `~const` can only be applied to `#[const_trait]` -//[yny]~^^^^ ERROR: `~const` can only be applied to `#[const_trait]` -//[yny]~| ERROR: `~const` can only be applied to `#[const_trait]` -//[yyn,ynn,nny,nnn]~^^^^^^ ERROR: `~const` is not allowed here +trait Bar: [const] Foo {} +//[yny,ynn,nny,nnn]~^ ERROR: `[const]` can only be applied to `#[const_trait]` +//[yny,ynn,nny,nnn]~| ERROR: `[const]` can only be applied to `#[const_trait]` +//[yny,ynn,nny,nnn]~| ERROR: `[const]` can only be applied to `#[const_trait]` +//[yny]~^^^^ ERROR: `[const]` can only be applied to `#[const_trait]` +//[yny]~| ERROR: `[const]` can only be applied to `#[const_trait]` +//[yyn,ynn,nny,nnn]~^^^^^^ ERROR: `[const]` is not allowed here //[nyy,nyn,nny,nnn]~^^^^^^^ ERROR: const trait impls are experimental -const fn foo(x: &T) { - //[yyn,ynn,nny,nnn]~^ ERROR: `~const` can only be applied to `#[const_trait]` - //[yyn,ynn,nny,nnn]~| ERROR: `~const` can only be applied to `#[const_trait]` +const fn foo(x: &T) { + //[yyn,ynn,nny,nnn]~^ ERROR: `[const]` can only be applied to `#[const_trait]` + //[yyn,ynn,nny,nnn]~| ERROR: `[const]` can only be applied to `#[const_trait]` //[nyy,nyn,nny,nnn]~^^^ ERROR: const trait impls are experimental x.a(); - //[yyn]~^ ERROR: the trait bound `T: ~const Foo` is not satisfied + //[yyn]~^ ERROR: the trait bound `T: [const] Foo` is not satisfied //[ynn,yny,nny,nnn]~^^ ERROR: cannot call non-const method `::a` in constant functions //[nyy,nyn]~^^^ ERROR: cannot call conditionally-const method `::a` in constant functions } diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.ynn.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.ynn.stderr index f22bdd472e538..d9112c91776db 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-3.ynn.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-3.ynn.stderr @@ -1,31 +1,31 @@ -error: `~const` is not allowed here - --> $DIR/super-traits-fail-3.rs:23:12 +error: `[const]` is not allowed here + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ | -note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds +note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds --> $DIR/super-traits-fail-3.rs:23:1 | -LL | trait Bar: ~const Foo {} - | ^^^^^^^^^^^^^^^^^^^^^^^^ +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:23:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations | LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:23:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations @@ -33,11 +33,11 @@ help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:23:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations @@ -45,27 +45,27 @@ help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:32:17 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:32:15 | -LL | const fn foo(x: &T) { - | ^^^^^^ can't be applied to `Bar` +LL | const fn foo(x: &T) { + | ^^^^^^^^^ can't be applied to `Bar` | help: mark `Bar` as `#[const_trait]` to allow it to have `const` implementations | -LL | #[const_trait] trait Bar: ~const Foo {} +LL | #[const_trait] trait Bar: [const] Foo {} | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:32:17 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:32:15 | -LL | const fn foo(x: &T) { - | ^^^^^^ can't be applied to `Bar` +LL | const fn foo(x: &T) { + | ^^^^^^^^^ can't be applied to `Bar` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: mark `Bar` as `#[const_trait]` to allow it to have `const` implementations | -LL | #[const_trait] trait Bar: ~const Foo {} +LL | #[const_trait] trait Bar: [const] Foo {} | ++++++++++++++ error[E0015]: cannot call non-const method `::a` in constant functions diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.yny.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.yny.stderr index 14b50815b8e9c..3520b61a81c94 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-3.yny.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-3.yny.stderr @@ -1,19 +1,19 @@ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:23:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations | LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:23:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations @@ -21,11 +21,11 @@ help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:23:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations @@ -33,11 +33,11 @@ help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:23:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations @@ -45,11 +45,11 @@ help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations LL | #[const_trait] trait Foo { | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:23:12 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ can't be applied to `Foo` +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ can't be applied to `Foo` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.yyn.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.yyn.stderr index 3270611dace2e..d714118df6222 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-3.yyn.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-3.yyn.stderr @@ -1,39 +1,39 @@ -error: `~const` is not allowed here - --> $DIR/super-traits-fail-3.rs:23:12 +error: `[const]` is not allowed here + --> $DIR/super-traits-fail-3.rs:23:10 | -LL | trait Bar: ~const Foo {} - | ^^^^^^ +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^ | -note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds +note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds --> $DIR/super-traits-fail-3.rs:23:1 | -LL | trait Bar: ~const Foo {} - | ^^^^^^^^^^^^^^^^^^^^^^^^ +LL | trait Bar: [const] Foo {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:32:17 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:32:15 | -LL | const fn foo(x: &T) { - | ^^^^^^ can't be applied to `Bar` +LL | const fn foo(x: &T) { + | ^^^^^^^^^ can't be applied to `Bar` | help: mark `Bar` as `#[const_trait]` to allow it to have `const` implementations | -LL | #[const_trait] trait Bar: ~const Foo {} +LL | #[const_trait] trait Bar: [const] Foo {} | ++++++++++++++ -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/super-traits-fail-3.rs:32:17 +error: `[const]` can only be applied to `#[const_trait]` traits + --> $DIR/super-traits-fail-3.rs:32:15 | -LL | const fn foo(x: &T) { - | ^^^^^^ can't be applied to `Bar` +LL | const fn foo(x: &T) { + | ^^^^^^^^^ can't be applied to `Bar` | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: mark `Bar` as `#[const_trait]` to allow it to have `const` implementations | -LL | #[const_trait] trait Bar: ~const Foo {} +LL | #[const_trait] trait Bar: [const] Foo {} | ++++++++++++++ -error[E0277]: the trait bound `T: ~const Foo` is not satisfied +error[E0277]: the trait bound `T: [const] Foo` is not satisfied --> $DIR/super-traits-fail-3.rs:36:7 | 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 9fd6263118bdc..15e05be4d8628 100644 --- a/tests/ui/traits/const-traits/super-traits-fail.rs +++ b/tests/ui/traits/const-traits/super-traits-fail.rs @@ -7,7 +7,7 @@ trait Foo { fn a(&self); } #[const_trait] -trait Bar: ~const Foo {} +trait Bar: [const] Foo {} struct S; impl Foo for S { diff --git a/tests/ui/traits/const-traits/super-traits-fail.stderr b/tests/ui/traits/const-traits/super-traits-fail.stderr index 1f453edf0359d..e19aa30cf95c3 100644 --- a/tests/ui/traits/const-traits/super-traits-fail.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `S: ~const Foo` is not satisfied +error[E0277]: the trait bound `S: [const] Foo` is not satisfied --> $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 73ddc037cd795..b5fd985ae439e 100644 --- a/tests/ui/traits/const-traits/super-traits.rs +++ b/tests/ui/traits/const-traits/super-traits.rs @@ -8,7 +8,7 @@ trait Foo { } #[const_trait] -trait Bar: ~const Foo {} +trait Bar: [const] Foo {} struct S; impl const Foo for S { @@ -17,7 +17,7 @@ impl const Foo for S { impl const Bar for S {} -const fn foo(t: &T) { +const fn foo(t: &T) { t.a(); } diff --git a/tests/ui/traits/const-traits/syntactical-unstable.rs b/tests/ui/traits/const-traits/syntactical-unstable.rs index e192e80fabd9e..5c542d327f151 100644 --- a/tests/ui/traits/const-traits/syntactical-unstable.rs +++ b/tests/ui/traits/const-traits/syntactical-unstable.rs @@ -1,6 +1,6 @@ //@ aux-build:staged-api.rs -// Ensure that we enforce const stability of traits in `~const`/`const` bounds. +// Ensure that we enforce const stability of traits in `[const]`/`const` bounds. #![feature(const_trait_impl)] @@ -10,19 +10,19 @@ extern crate staged_api; use staged_api::MyTrait; #[const_trait] -trait Foo: ~const MyTrait { +trait Foo: [const] MyTrait { //~^ ERROR use of unstable const library feature `unstable` - type Item: ~const MyTrait; + type Item: [const] MyTrait; //~^ ERROR use of unstable const library feature `unstable` } -const fn where_clause() where T: ~const MyTrait {} +const fn where_clause() where T: [const] MyTrait {} //~^ ERROR use of unstable const library feature `unstable` -const fn nested() where T: Deref {} +const fn nested() where T: Deref {} //~^ ERROR use of unstable const library feature `unstable` -const fn rpit() -> impl ~const MyTrait { Local } +const fn rpit() -> impl [const] MyTrait { Local } //~^ ERROR use of unstable const library feature `unstable` struct Local; diff --git a/tests/ui/traits/const-traits/syntactical-unstable.stderr b/tests/ui/traits/const-traits/syntactical-unstable.stderr index a2ce2f2b6e9d2..657773d91217e 100644 --- a/tests/ui/traits/const-traits/syntactical-unstable.stderr +++ b/tests/ui/traits/const-traits/syntactical-unstable.stderr @@ -1,43 +1,43 @@ error[E0658]: use of unstable const library feature `unstable` - --> $DIR/syntactical-unstable.rs:13:19 + --> $DIR/syntactical-unstable.rs:13:20 | -LL | trait Foo: ~const MyTrait { - | ------ ^^^^^^^ - | | - | trait is not stable as const yet +LL | trait Foo: [const] MyTrait { + | --------- ^^^^^^^ + | | + | trait is not stable as const yet | = help: add `#![feature(unstable)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable const library feature `unstable` - --> $DIR/syntactical-unstable.rs:19:44 + --> $DIR/syntactical-unstable.rs:19:45 | -LL | const fn where_clause() where T: ~const MyTrait {} - | ------ ^^^^^^^ - | | - | trait is not stable as const yet +LL | const fn where_clause() where T: [const] MyTrait {} + | --------- ^^^^^^^ + | | + | trait is not stable as const yet | = help: add `#![feature(unstable)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable const library feature `unstable` - --> $DIR/syntactical-unstable.rs:22:52 + --> $DIR/syntactical-unstable.rs:22:53 | -LL | const fn nested() where T: Deref {} - | ------ ^^^^^^^ - | | - | trait is not stable as const yet +LL | const fn nested() where T: Deref {} + | --------- ^^^^^^^ + | | + | trait is not stable as const yet | = help: add `#![feature(unstable)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable const library feature `unstable` - --> $DIR/syntactical-unstable.rs:25:32 + --> $DIR/syntactical-unstable.rs:25:33 | -LL | const fn rpit() -> impl ~const MyTrait { Local } - | ------ ^^^^^^^ - | | - | trait is not stable as const yet +LL | const fn rpit() -> impl [const] MyTrait { Local } + | ------------ ^^^^^^^ + | | + | trait is not stable as const yet | = help: add `#![feature(unstable)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -52,12 +52,12 @@ LL | impl const MyTrait for Local { = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable const library feature `unstable` - --> $DIR/syntactical-unstable.rs:15:23 + --> $DIR/syntactical-unstable.rs:15:24 | -LL | type Item: ~const MyTrait; - | ------ ^^^^^^^ - | | - | trait is not stable as const yet +LL | type Item: [const] MyTrait; + | --------- ^^^^^^^ + | | + | trait is not stable as const yet | = help: add `#![feature(unstable)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/ui/traits/const-traits/syntax.rs b/tests/ui/traits/const-traits/syntax.rs index cfac6e0a93e38..b8e0f46e4f8f6 100644 --- a/tests/ui/traits/const-traits/syntax.rs +++ b/tests/ui/traits/const-traits/syntax.rs @@ -1,8 +1,9 @@ //@ compile-flags: -Z parse-crate-root-only -//@ check-pass -#![feature(const_trait_bound_opt_out)] #![feature(const_trait_impl)] -// For now, this parses since an error does not occur until AST lowering. -impl ~const T {} +// This is going down the slice/array parsing route +impl [const] T {} +//~^ ERROR: expected identifier, found `]` + +impl const T {} diff --git a/tests/ui/traits/const-traits/syntax.stderr b/tests/ui/traits/const-traits/syntax.stderr new file mode 100644 index 0000000000000..2e9807866b03b --- /dev/null +++ b/tests/ui/traits/const-traits/syntax.stderr @@ -0,0 +1,8 @@ +error: expected identifier, found `]` + --> $DIR/syntax.rs:6:12 + | +LL | impl [const] T {} + | ^ expected identifier + +error: aborting due to 1 previous error + 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 428223d92c01e..29553884b21c2 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 @@ -5,8 +5,8 @@ struct Foo; impl Foo { - fn add(self) -> Foo<{ A::add(N) }> { - //~^ ERROR `~const` is not allowed here + fn add(self) -> Foo<{ A::add(N) }> { + //~^ ERROR `[const]` is not allowed here //~| ERROR the trait bound `A: const Add42` is not satisfied Foo } @@ -23,8 +23,8 @@ impl const Add42 for () { } } -fn bar(_: Foo) -> Foo<{ A::add(N) }> { - //~^ ERROR `~const` is not allowed here +fn bar(_: Foo) -> Foo<{ A::add(N) }> { + //~^ ERROR `[const]` is not allowed here //~| ERROR the trait bound `A: const Add42` is not satisfied Foo } diff --git a/tests/ui/traits/const-traits/tilde-const-and-const-params.stderr b/tests/ui/traits/const-traits/tilde-const-and-const-params.stderr index 95e684bd0c47d..f33ad02e9a470 100644 --- a/tests/ui/traits/const-traits/tilde-const-and-const-params.stderr +++ b/tests/ui/traits/const-traits/tilde-const-and-const-params.stderr @@ -1,38 +1,38 @@ -error: `~const` is not allowed here - --> $DIR/tilde-const-and-const-params.rs:8:15 +error: `[const]` is not allowed here + --> $DIR/tilde-const-and-const-params.rs:8:13 | -LL | fn add(self) -> Foo<{ A::add(N) }> { - | ^^^^^^ +LL | fn add(self) -> Foo<{ A::add(N) }> { + | ^^^^^^^^^ | -note: this function is not `const`, so it cannot have `~const` trait bounds +note: this function is not `const`, so it cannot have `[const]` trait bounds --> $DIR/tilde-const-and-const-params.rs:8:8 | -LL | fn add(self) -> Foo<{ A::add(N) }> { +LL | fn add(self) -> Foo<{ A::add(N) }> { | ^^^ -error: `~const` is not allowed here - --> $DIR/tilde-const-and-const-params.rs:26:11 +error: `[const]` is not allowed here + --> $DIR/tilde-const-and-const-params.rs:26:9 | -LL | fn bar(_: Foo) -> Foo<{ A::add(N) }> { - | ^^^^^^ +LL | fn bar(_: Foo) -> Foo<{ A::add(N) }> { + | ^^^^^^^^^ | -note: this function is not `const`, so it cannot have `~const` trait bounds +note: this function is not `const`, so it cannot have `[const]` trait bounds --> $DIR/tilde-const-and-const-params.rs:26:4 | -LL | fn bar(_: Foo) -> Foo<{ A::add(N) }> { +LL | fn bar(_: Foo) -> Foo<{ A::add(N) }> { | ^^^ error[E0277]: the trait bound `A: const Add42` is not satisfied - --> $DIR/tilde-const-and-const-params.rs:26:61 + --> $DIR/tilde-const-and-const-params.rs:26:62 | -LL | fn bar(_: Foo) -> Foo<{ A::add(N) }> { - | ^ +LL | fn bar(_: Foo) -> Foo<{ A::add(N) }> { + | ^ error[E0277]: the trait bound `A: const Add42` is not satisfied - --> $DIR/tilde-const-and-const-params.rs:8:44 + --> $DIR/tilde-const-and-const-params.rs:8:45 | -LL | fn add(self) -> Foo<{ A::add(N) }> { - | ^ +LL | fn add(self) -> Foo<{ A::add(N) }> { + | ^ error: aborting due to 4 previous errors 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 73b2bdc4e3f86..7f01c0b7a5c96 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 @@ -5,11 +5,11 @@ #[const_trait] trait Main { - fn compute() -> u32; + fn compute() -> u32; } impl const Main for () { - fn compute() -> u32 { + fn compute() -> u32 { T::generate() } } 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 e7ec3d31eb91f..0c644694585a6 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 @@ -11,7 +11,7 @@ trait Trait {} const fn f< T: Trait< { - struct I>(U); + struct I>(U); 0 }, >, 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 0e010695587f4..56478a6674b0e 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 @@ -10,7 +10,7 @@ trait Foo { struct Bar(T); impl Bar { - const fn foo(&self) where T: ~const Foo { + const fn foo(&self) where T: [const] Foo { self.0.foo() } } diff --git a/tests/ui/traits/const-traits/tilde-const-invalid-places.rs b/tests/ui/traits/const-traits/tilde-const-invalid-places.rs index 9d220686771ec..52627004fb246 100644 --- a/tests/ui/traits/const-traits/tilde-const-invalid-places.rs +++ b/tests/ui/traits/const-traits/tilde-const-invalid-places.rs @@ -4,58 +4,58 @@ trait Trait {} // Regression test for issue #90052. -fn non_const_function() {} //~ ERROR `~const` is not allowed +fn non_const_function() {} //~ ERROR `[const]` is not allowed -struct Struct { field: T } //~ ERROR `~const` is not allowed here -struct TupleStruct(T); //~ ERROR `~const` is not allowed here -struct UnitStruct; //~ ERROR `~const` is not allowed here +struct Struct { field: T } //~ ERROR `[const]` is not allowed here +struct TupleStruct(T); //~ ERROR `[const]` is not allowed here +struct UnitStruct; //~ ERROR `[const]` is not allowed here //~^ ERROR parameter `T` is never used -enum Enum { Variant(T) } //~ ERROR `~const` is not allowed here +enum Enum { Variant(T) } //~ ERROR `[const]` is not allowed here -union Union { field: T } //~ ERROR `~const` is not allowed here +union Union { field: T } //~ ERROR `[const]` is not allowed here //~^ ERROR field must implement `Copy` -type Type = T; //~ ERROR `~const` is not allowed here +type Type = T; //~ ERROR `[const]` is not allowed here -const CONSTANT: () = (); //~ ERROR `~const` is not allowed here +const CONSTANT: () = (); //~ ERROR `[const]` is not allowed here //~^ ERROR generic const items are experimental trait NonConstTrait { - type Type: ~const Trait; - //~^ ERROR `~const` is not allowed - //~| ERROR `~const` is not allowed - fn non_const_function(); //~ ERROR `~const` is not allowed - const CONSTANT: (); //~ ERROR `~const` is not allowed + type Type: [const] Trait; + //~^ ERROR `[const]` is not allowed + //~| ERROR `[const]` is not allowed + fn non_const_function(); //~ ERROR `[const]` is not allowed + const CONSTANT: (); //~ ERROR `[const]` is not allowed //~^ ERROR generic const items are experimental } impl NonConstTrait for () { - type Type = (); //~ ERROR `~const` is not allowed + type Type = (); //~ ERROR `[const]` is not allowed //~^ ERROR overflow evaluating the requirement `(): Trait` - fn non_const_function() {} //~ ERROR `~const` is not allowed - const CONSTANT: () = (); //~ ERROR `~const` is not allowed + fn non_const_function() {} //~ ERROR `[const]` is not allowed + const CONSTANT: () = (); //~ ERROR `[const]` is not allowed //~^ ERROR generic const items are experimental } struct Implementor; impl Implementor { - type Type = (); //~ ERROR `~const` is not allowed + type Type = (); //~ ERROR `[const]` is not allowed //~^ ERROR inherent associated types are unstable - fn non_const_function() {} //~ ERROR `~const` is not allowed - const CONSTANT: () = (); //~ ERROR `~const` is not allowed + fn non_const_function() {} //~ ERROR `[const]` is not allowed + const CONSTANT: () = (); //~ ERROR `[const]` is not allowed //~^ ERROR generic const items are experimental } // non-const traits -trait Child0: ~const Trait {} //~ ERROR `~const` is not allowed -trait Child1 where Self: ~const Trait {} //~ ERROR `~const` is not allowed +trait Child0: [const] Trait {} //~ ERROR `[const]` is not allowed +trait Child1 where Self: [const] Trait {} //~ ERROR `[const]` is not allowed // non-const impl -impl Trait for T {} //~ ERROR `~const` is not allowed +impl Trait for T {} //~ ERROR `[const]` is not allowed // inherent impl (regression test for issue #117004) -impl Struct {} //~ ERROR `~const` is not allowed +impl Struct {} //~ ERROR `[const]` is not allowed fn main() {} diff --git a/tests/ui/traits/const-traits/tilde-const-invalid-places.stderr b/tests/ui/traits/const-traits/tilde-const-invalid-places.stderr index 8151b9aaa23de..bc991811895d4 100644 --- a/tests/ui/traits/const-traits/tilde-const-invalid-places.stderr +++ b/tests/ui/traits/const-traits/tilde-const-invalid-places.stderr @@ -1,232 +1,232 @@ -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:7:26 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:7:24 | -LL | fn non_const_function() {} - | ^^^^^^ +LL | fn non_const_function() {} + | ^^^^^^^^^ | -note: this function is not `const`, so it cannot have `~const` trait bounds +note: this function is not `const`, so it cannot have `[const]` trait bounds --> $DIR/tilde-const-invalid-places.rs:7:4 | -LL | fn non_const_function() {} +LL | fn non_const_function() {} | ^^^^^^^^^^^^^^^^^^ -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:9:18 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:9:16 | -LL | struct Struct { field: T } - | ^^^^^^ +LL | struct Struct { field: T } + | ^^^^^^^^^ | - = note: this item cannot have `~const` trait bounds + = note: this item cannot have `[const]` trait bounds -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:10:23 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:10:21 | -LL | struct TupleStruct(T); - | ^^^^^^ +LL | struct TupleStruct(T); + | ^^^^^^^^^ | - = note: this item cannot have `~const` trait bounds + = note: this item cannot have `[const]` trait bounds -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:11:22 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:11:20 | -LL | struct UnitStruct; - | ^^^^^^ +LL | struct UnitStruct; + | ^^^^^^^^^ | - = note: this item cannot have `~const` trait bounds + = note: this item cannot have `[const]` trait bounds -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:14:14 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:14:12 | -LL | enum Enum { Variant(T) } - | ^^^^^^ +LL | enum Enum { Variant(T) } + | ^^^^^^^^^ | - = note: this item cannot have `~const` trait bounds + = note: this item cannot have `[const]` trait bounds -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:16:16 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:16:14 | -LL | union Union { field: T } - | ^^^^^^ +LL | union Union { field: T } + | ^^^^^^^^^ | - = note: this item cannot have `~const` trait bounds + = note: this item cannot have `[const]` trait bounds -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:19:14 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:19:12 | -LL | type Type = T; - | ^^^^^^ +LL | type Type = T; + | ^^^^^^^^^ | - = note: this item cannot have `~const` trait bounds + = note: this item cannot have `[const]` trait bounds -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:21:19 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:21:17 | -LL | const CONSTANT: () = (); - | ^^^^^^ +LL | const CONSTANT: () = (); + | ^^^^^^^^^ | - = note: this item cannot have `~const` trait bounds + = note: this item cannot have `[const]` trait bounds -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:25:18 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:25:16 | -LL | type Type: ~const Trait; - | ^^^^^^ +LL | type Type: [const] Trait; + | ^^^^^^^^^ | -note: associated types in non-`#[const_trait]` traits cannot have `~const` trait bounds +note: associated types in non-`#[const_trait]` traits cannot have `[const]` trait bounds --> $DIR/tilde-const-invalid-places.rs:25:5 | -LL | type Type: ~const Trait; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | type Type: [const] Trait; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:25:33 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:25:32 | -LL | type Type: ~const Trait; - | ^^^^^^ +LL | type Type: [const] Trait; + | ^^^^^^^^^ | -note: associated types in non-`#[const_trait]` traits cannot have `~const` trait bounds +note: associated types in non-`#[const_trait]` traits cannot have `[const]` trait bounds --> $DIR/tilde-const-invalid-places.rs:25:5 | -LL | type Type: ~const Trait; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | type Type: [const] Trait; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:28:30 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:28:28 | -LL | fn non_const_function(); - | ^^^^^^ +LL | fn non_const_function(); + | ^^^^^^^^^ | -note: this function is not `const`, so it cannot have `~const` trait bounds +note: this function is not `const`, so it cannot have `[const]` trait bounds --> $DIR/tilde-const-invalid-places.rs:28:8 | -LL | fn non_const_function(); +LL | fn non_const_function(); | ^^^^^^^^^^^^^^^^^^ -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:29:23 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:29:21 | -LL | const CONSTANT: (); - | ^^^^^^ +LL | const CONSTANT: (); + | ^^^^^^^^^ | - = note: this item cannot have `~const` trait bounds + = note: this item cannot have `[const]` trait bounds -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:34:18 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:34:16 | -LL | type Type = (); - | ^^^^^^ +LL | type Type = (); + | ^^^^^^^^^ | -note: associated types in non-const impls cannot have `~const` trait bounds +note: associated types in non-const impls cannot have `[const]` trait bounds --> $DIR/tilde-const-invalid-places.rs:34:5 | -LL | type Type = (); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | type Type = (); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:36:30 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:36:28 | -LL | fn non_const_function() {} - | ^^^^^^ +LL | fn non_const_function() {} + | ^^^^^^^^^ | -note: this function is not `const`, so it cannot have `~const` trait bounds +note: this function is not `const`, so it cannot have `[const]` trait bounds --> $DIR/tilde-const-invalid-places.rs:36:8 | -LL | fn non_const_function() {} +LL | fn non_const_function() {} | ^^^^^^^^^^^^^^^^^^ -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:37:23 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:37:21 | -LL | const CONSTANT: () = (); - | ^^^^^^ +LL | const CONSTANT: () = (); + | ^^^^^^^^^ | - = note: this item cannot have `~const` trait bounds + = note: this item cannot have `[const]` trait bounds -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:44:18 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:44:16 | -LL | type Type = (); - | ^^^^^^ +LL | type Type = (); + | ^^^^^^^^^ | -note: inherent associated types cannot have `~const` trait bounds +note: inherent associated types cannot have `[const]` trait bounds --> $DIR/tilde-const-invalid-places.rs:44:5 | -LL | type Type = (); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | type Type = (); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:46:30 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:46:28 | -LL | fn non_const_function() {} - | ^^^^^^ +LL | fn non_const_function() {} + | ^^^^^^^^^ | -note: this function is not `const`, so it cannot have `~const` trait bounds +note: this function is not `const`, so it cannot have `[const]` trait bounds --> $DIR/tilde-const-invalid-places.rs:46:8 | -LL | fn non_const_function() {} +LL | fn non_const_function() {} | ^^^^^^^^^^^^^^^^^^ -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:47:23 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:47:21 | -LL | const CONSTANT: () = (); - | ^^^^^^ +LL | const CONSTANT: () = (); + | ^^^^^^^^^ | - = note: this item cannot have `~const` trait bounds + = note: this item cannot have `[const]` trait bounds -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:52:15 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:52:13 | -LL | trait Child0: ~const Trait {} - | ^^^^^^ +LL | trait Child0: [const] Trait {} + | ^^^^^^^^^ | -note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds +note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds --> $DIR/tilde-const-invalid-places.rs:52:1 | -LL | trait Child0: ~const Trait {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | trait Child0: [const] Trait {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:53:26 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:53:24 | -LL | trait Child1 where Self: ~const Trait {} - | ^^^^^^ +LL | trait Child1 where Self: [const] Trait {} + | ^^^^^^^^^ | -note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds +note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds --> $DIR/tilde-const-invalid-places.rs:53:1 | -LL | trait Child1 where Self: ~const Trait {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | trait Child1 where Self: [const] Trait {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:56:9 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:56:7 | -LL | impl Trait for T {} - | ^^^^^^ +LL | impl Trait for T {} + | ^^^^^^^^^ | -note: this impl is not `const`, so it cannot have `~const` trait bounds +note: this impl is not `const`, so it cannot have `[const]` trait bounds --> $DIR/tilde-const-invalid-places.rs:56:1 | -LL | impl Trait for T {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | impl Trait for T {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: `~const` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:59:9 +error: `[const]` is not allowed here + --> $DIR/tilde-const-invalid-places.rs:59:7 | -LL | impl Struct {} - | ^^^^^^ +LL | impl Struct {} + | ^^^^^^^^^ | -note: inherent impls cannot have `~const` trait bounds +note: inherent impls cannot have `[const]` trait bounds --> $DIR/tilde-const-invalid-places.rs:59:1 | -LL | impl Struct {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | impl Struct {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0658]: generic const items are experimental --> $DIR/tilde-const-invalid-places.rs:21:15 | -LL | const CONSTANT: () = (); - | ^^^^^^^^^^^^^^^^^ +LL | const CONSTANT: () = (); + | ^^^^^^^^^^^^^^^^^^ | = note: see issue #113521 for more information = help: add `#![feature(generic_const_items)]` to the crate attributes to enable @@ -235,8 +235,8 @@ LL | const CONSTANT: () = (); error[E0658]: generic const items are experimental --> $DIR/tilde-const-invalid-places.rs:29:19 | -LL | const CONSTANT: (); - | ^^^^^^^^^^^^^^^^^ +LL | const CONSTANT: (); + | ^^^^^^^^^^^^^^^^^^ | = note: see issue #113521 for more information = help: add `#![feature(generic_const_items)]` to the crate attributes to enable @@ -245,8 +245,8 @@ LL | const CONSTANT: (); error[E0658]: generic const items are experimental --> $DIR/tilde-const-invalid-places.rs:37:19 | -LL | const CONSTANT: () = (); - | ^^^^^^^^^^^^^^^^^ +LL | const CONSTANT: () = (); + | ^^^^^^^^^^^^^^^^^^ | = note: see issue #113521 for more information = help: add `#![feature(generic_const_items)]` to the crate attributes to enable @@ -255,8 +255,8 @@ LL | const CONSTANT: () = (); error[E0658]: generic const items are experimental --> $DIR/tilde-const-invalid-places.rs:47:19 | -LL | const CONSTANT: () = (); - | ^^^^^^^^^^^^^^^^^ +LL | const CONSTANT: () = (); + | ^^^^^^^^^^^^^^^^^^ | = note: see issue #113521 for more information = help: add `#![feature(generic_const_items)]` to the crate attributes to enable @@ -265,40 +265,40 @@ LL | const CONSTANT: () = (); error[E0392]: type parameter `T` is never used --> $DIR/tilde-const-invalid-places.rs:11:19 | -LL | struct UnitStruct; +LL | struct UnitStruct; | ^ unused type parameter | = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData` error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union - --> $DIR/tilde-const-invalid-places.rs:16:32 + --> $DIR/tilde-const-invalid-places.rs:16:33 | -LL | union Union { field: T } - | ^^^^^^^^ +LL | union Union { field: T } + | ^^^^^^^^ | = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>` help: wrap the field type in `ManuallyDrop<...>` | -LL | union Union { field: std::mem::ManuallyDrop } - | +++++++++++++++++++++++ + +LL | union Union { field: std::mem::ManuallyDrop } + | +++++++++++++++++++++++ + error[E0275]: overflow evaluating the requirement `(): Trait` - --> $DIR/tilde-const-invalid-places.rs:34:34 + --> $DIR/tilde-const-invalid-places.rs:34:35 | -LL | type Type = (); - | ^^ +LL | type Type = (); + | ^^ | note: required by a bound in `NonConstTrait::Type` - --> $DIR/tilde-const-invalid-places.rs:25:33 + --> $DIR/tilde-const-invalid-places.rs:25:34 | -LL | type Type: ~const Trait; - | ^^^^^^^^^^^^ required by this bound in `NonConstTrait::Type` +LL | type Type: [const] Trait; + | ^^^^^^^^^^^^^ required by this bound in `NonConstTrait::Type` error[E0658]: inherent associated types are unstable --> $DIR/tilde-const-invalid-places.rs:44:5 | -LL | type Type = (); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | type Type = (); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #8995 for more information = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable diff --git a/tests/ui/traits/const-traits/tilde-const-syntax.rs b/tests/ui/traits/const-traits/tilde-const-syntax.rs index f9944c426ccee..89950c65ef642 100644 --- a/tests/ui/traits/const-traits/tilde-const-syntax.rs +++ b/tests/ui/traits/const-traits/tilde-const-syntax.rs @@ -4,6 +4,6 @@ #![feature(const_trait_impl)] struct S< - T: for<'a> ~const Tr<'a> + 'static + ~const std::ops::Add, - T: for<'a: 'b> ~const m::Trait<'a>, + T: for<'a> [const] Tr<'a> + 'static + [const] std::ops::Add, + T: for<'a: 'b> [const] m::Trait<'a>, >; 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 53ddb5c0cdfc8..b0bd8466f66b9 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,11 +4,11 @@ #[const_trait] trait Trait { - type Assoc; + type Assoc; } impl const Trait for () { - type Assoc = T; + type Assoc = T; } #[const_trait] diff --git a/tests/ui/traits/const-traits/tilde-twice.rs b/tests/ui/traits/const-traits/tilde-twice.rs index d341513b8a819..4b13abe3cf2ca 100644 --- a/tests/ui/traits/const-traits/tilde-twice.rs +++ b/tests/ui/traits/const-traits/tilde-twice.rs @@ -2,5 +2,5 @@ #![feature(const_trait_impl)] -struct S; -//~^ ERROR expected identifier, found `~` +struct S; +//~^ ERROR expected identifier, found `]` diff --git a/tests/ui/traits/const-traits/tilde-twice.stderr b/tests/ui/traits/const-traits/tilde-twice.stderr index a809736a4f824..adfda4c343760 100644 --- a/tests/ui/traits/const-traits/tilde-twice.stderr +++ b/tests/ui/traits/const-traits/tilde-twice.stderr @@ -1,8 +1,8 @@ -error: expected identifier, found `~` - --> $DIR/tilde-twice.rs:5:20 +error: expected identifier, found `]` + --> $DIR/tilde-twice.rs:5:27 | -LL | struct S; - | ^ expected identifier +LL | struct S; + | ^ expected identifier error: aborting due to 1 previous error 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 6f281ca571805..ccb514086cc87 100644 --- a/tests/ui/traits/const-traits/trait-where-clause-const.rs +++ b/tests/ui/traits/const-traits/trait-where-clause-const.rs @@ -12,11 +12,11 @@ trait Bar {} #[const_trait] trait Foo { fn a(); - fn b() where Self: ~const Bar; - fn c(); + fn b() where Self: [const] Bar; + fn c(); } -const fn test1() { +const fn test1() { T::a(); T::b(); //~^ ERROR the trait bound @@ -24,7 +24,7 @@ const fn test1() { //~^ ERROR the trait bound } -const fn test2() { +const fn test2() { T::a(); T::b(); T::c::(); 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 4ebd7b9757fe7..71f9bdff8786e 100644 --- a/tests/ui/traits/const-traits/trait-where-clause-const.stderr +++ b/tests/ui/traits/const-traits/trait-where-clause-const.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: ~const Bar` is not satisfied +error[E0277]: the trait bound `T: [const] Bar` is not satisfied --> $DIR/trait-where-clause-const.rs:21:5 | LL | T::b(); @@ -7,10 +7,10 @@ LL | T::b(); note: required by a bound in `Foo::b` --> $DIR/trait-where-clause-const.rs:15:24 | -LL | fn b() where Self: ~const Bar; - | ^^^^^^^^^^ required by this bound in `Foo::b` +LL | fn b() where Self: [const] Bar; + | ^^^^^^^^^^^ required by this bound in `Foo::b` -error[E0277]: the trait bound `T: ~const Bar` is not satisfied +error[E0277]: the trait bound `T: [const] Bar` is not satisfied --> $DIR/trait-where-clause-const.rs:23:12 | LL | T::c::(); @@ -19,8 +19,8 @@ LL | T::c::(); note: required by a bound in `Foo::c` --> $DIR/trait-where-clause-const.rs:16:13 | -LL | fn c(); - | ^^^^^^^^^^ required by this bound in `Foo::c` +LL | fn c(); + | ^^^^^^^^^^^ required by this bound in `Foo::c` error: aborting due to 2 previous errors 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 2582a69acab20..c40f071f45728 100644 --- a/tests/ui/traits/const-traits/trait-where-clause-run.rs +++ b/tests/ui/traits/const-traits/trait-where-clause-run.rs @@ -10,7 +10,7 @@ trait Bar { #[const_trait] trait Foo { - fn foo() -> u8 where Self: ~const Bar { + fn foo() -> u8 where Self: [const] Bar { ::bar() * 6 } } 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 b6ac574a4fcd8..3a5350cd4ea3d 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 @@ -4,7 +4,7 @@ #[const_trait] trait Foo { - fn bar() where Self: ~const Foo; + fn bar() where Self: [const] Foo; } struct S; @@ -17,7 +17,7 @@ fn baz() { T::bar(); } -const fn qux() { +const fn qux() { T::bar(); } diff --git a/tests/ui/traits/const-traits/trait-where-clause.rs b/tests/ui/traits/const-traits/trait-where-clause.rs index 11f353f3f8ad3..6aebab79090a9 100644 --- a/tests/ui/traits/const-traits/trait-where-clause.rs +++ b/tests/ui/traits/const-traits/trait-where-clause.rs @@ -5,10 +5,10 @@ trait Bar {} trait Foo { fn a(); - fn b() where Self: ~const Bar; - //~^ ERROR `~const` is not allowed here - fn c(); - //~^ ERROR `~const` is not allowed here + fn b() where Self: [const] Bar; + //~^ ERROR `[const]` is not allowed here + fn c(); + //~^ ERROR `[const]` is not allowed here } fn test1() { diff --git a/tests/ui/traits/const-traits/trait-where-clause.stderr b/tests/ui/traits/const-traits/trait-where-clause.stderr index 3a15cc63f3223..04c67903ef50d 100644 --- a/tests/ui/traits/const-traits/trait-where-clause.stderr +++ b/tests/ui/traits/const-traits/trait-where-clause.stderr @@ -1,25 +1,25 @@ -error: `~const` is not allowed here - --> $DIR/trait-where-clause.rs:8:24 +error: `[const]` is not allowed here + --> $DIR/trait-where-clause.rs:8:22 | -LL | fn b() where Self: ~const Bar; - | ^^^^^^ +LL | fn b() where Self: [const] Bar; + | ^^^^^^^^^ | -note: this function is not `const`, so it cannot have `~const` trait bounds +note: this function is not `const`, so it cannot have `[const]` trait bounds --> $DIR/trait-where-clause.rs:8:8 | -LL | fn b() where Self: ~const Bar; +LL | fn b() where Self: [const] Bar; | ^ -error: `~const` is not allowed here - --> $DIR/trait-where-clause.rs:10:13 +error: `[const]` is not allowed here + --> $DIR/trait-where-clause.rs:10:11 | -LL | fn c(); - | ^^^^^^ +LL | fn c(); + | ^^^^^^^^^ | -note: this function is not `const`, so it cannot have `~const` trait bounds +note: this function is not `const`, so it cannot have `[const]` trait bounds --> $DIR/trait-where-clause.rs:10:8 | -LL | fn c(); +LL | fn c(); | ^ error[E0277]: the trait bound `T: Bar` is not satisfied @@ -31,8 +31,8 @@ LL | T::b(); note: required by a bound in `Foo::b` --> $DIR/trait-where-clause.rs:8:24 | -LL | fn b() where Self: ~const Bar; - | ^^^^^^^^^^ required by this bound in `Foo::b` +LL | fn b() where Self: [const] Bar; + | ^^^^^^^^^^^ required by this bound in `Foo::b` help: consider further restricting type parameter `T` with trait `Bar` | LL | fn test1() { @@ -47,8 +47,8 @@ LL | T::c::(); note: required by a bound in `Foo::c` --> $DIR/trait-where-clause.rs:10:13 | -LL | fn c(); - | ^^^^^^^^^^ required by this bound in `Foo::c` +LL | fn c(); + | ^^^^^^^^^^^ required by this bound in `Foo::c` help: consider further restricting type parameter `T` with trait `Bar` | LL | fn test1() { 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 6d19ef771af1f..c82b442750097 100644 --- a/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs +++ b/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs @@ -29,5 +29,5 @@ struct Container; fn accept0(_: Container<{ T::make() }>) {} // FIXME(const_trait_impl): Instead of suggesting `+ const Trait`, suggest -// changing `~const Trait` to `const Trait`. -const fn accept1(_: Container<{ T::make() }>) {} +// changing `[const] Trait` to `const Trait`. +const fn accept1(_: Container<{ T::make() }>) {} 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 03e26615d7edc..9b536b801823e 100644 --- a/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.stderr +++ b/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.stderr @@ -71,67 +71,67 @@ LL | fn accept0(_: Container<{ T::make() }>) {} = 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[E0391]: cycle detected when caching mir of `accept1::{constant#0}` for CTFE - --> $DIR/unsatisfied-const-trait-bound.rs:33:48 + --> $DIR/unsatisfied-const-trait-bound.rs:33:49 | -LL | const fn accept1(_: Container<{ T::make() }>) {} - | ^^^^^^^^^^^^^ +LL | const fn accept1(_: Container<{ T::make() }>) {} + | ^^^^^^^^^^^^^ | note: ...which requires elaborating drops for `accept1::{constant#0}`... - --> $DIR/unsatisfied-const-trait-bound.rs:33:48 + --> $DIR/unsatisfied-const-trait-bound.rs:33:49 | -LL | const fn accept1(_: Container<{ T::make() }>) {} - | ^^^^^^^^^^^^^ +LL | const fn accept1(_: Container<{ T::make() }>) {} + | ^^^^^^^^^^^^^ note: ...which requires borrow-checking `accept1::{constant#0}`... - --> $DIR/unsatisfied-const-trait-bound.rs:33:48 + --> $DIR/unsatisfied-const-trait-bound.rs:33:49 | -LL | const fn accept1(_: Container<{ T::make() }>) {} - | ^^^^^^^^^^^^^ +LL | const fn accept1(_: Container<{ T::make() }>) {} + | ^^^^^^^^^^^^^ note: ...which requires promoting constants in MIR for `accept1::{constant#0}`... - --> $DIR/unsatisfied-const-trait-bound.rs:33:48 + --> $DIR/unsatisfied-const-trait-bound.rs:33:49 | -LL | const fn accept1(_: Container<{ T::make() }>) {} - | ^^^^^^^^^^^^^ +LL | const fn accept1(_: Container<{ T::make() }>) {} + | ^^^^^^^^^^^^^ note: ...which requires const checking `accept1::{constant#0}`... - --> $DIR/unsatisfied-const-trait-bound.rs:33:48 + --> $DIR/unsatisfied-const-trait-bound.rs:33:49 | -LL | const fn accept1(_: Container<{ T::make() }>) {} - | ^^^^^^^^^^^^^ +LL | const fn accept1(_: Container<{ T::make() }>) {} + | ^^^^^^^^^^^^^ note: ...which requires building MIR for `accept1::{constant#0}`... - --> $DIR/unsatisfied-const-trait-bound.rs:33:48 + --> $DIR/unsatisfied-const-trait-bound.rs:33:49 | -LL | const fn accept1(_: Container<{ T::make() }>) {} - | ^^^^^^^^^^^^^ +LL | const fn accept1(_: Container<{ T::make() }>) {} + | ^^^^^^^^^^^^^ note: ...which requires building an abstract representation for `accept1::{constant#0}`... - --> $DIR/unsatisfied-const-trait-bound.rs:33:48 + --> $DIR/unsatisfied-const-trait-bound.rs:33:49 | -LL | const fn accept1(_: Container<{ T::make() }>) {} - | ^^^^^^^^^^^^^ +LL | const fn accept1(_: Container<{ T::make() }>) {} + | ^^^^^^^^^^^^^ note: ...which requires building THIR for `accept1::{constant#0}`... - --> $DIR/unsatisfied-const-trait-bound.rs:33:48 + --> $DIR/unsatisfied-const-trait-bound.rs:33:49 | -LL | const fn accept1(_: Container<{ T::make() }>) {} - | ^^^^^^^^^^^^^ +LL | const fn accept1(_: Container<{ T::make() }>) {} + | ^^^^^^^^^^^^^ note: ...which requires type-checking `accept1::{constant#0}`... - --> $DIR/unsatisfied-const-trait-bound.rs:33:48 + --> $DIR/unsatisfied-const-trait-bound.rs:33:49 | -LL | const fn accept1(_: Container<{ T::make() }>) {} - | ^^^^^^^^^^^^^ +LL | const fn accept1(_: Container<{ T::make() }>) {} + | ^^^^^^^^^^^^^ note: ...which requires evaluating type-level constant... - --> $DIR/unsatisfied-const-trait-bound.rs:33:48 + --> $DIR/unsatisfied-const-trait-bound.rs:33:49 | -LL | const fn accept1(_: Container<{ T::make() }>) {} - | ^^^^^^^^^^^^^ +LL | const fn accept1(_: Container<{ T::make() }>) {} + | ^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `accept1::{constant#0}`... - --> $DIR/unsatisfied-const-trait-bound.rs:33:48 + --> $DIR/unsatisfied-const-trait-bound.rs:33:49 | -LL | const fn accept1(_: Container<{ T::make() }>) {} - | ^^^^^^^^^^^^^ +LL | const fn accept1(_: Container<{ T::make() }>) {} + | ^^^^^^^^^^^^^ = note: ...which again requires caching mir of `accept1::{constant#0}` for CTFE, completing the cycle note: cycle used when const-evaluating + checking `accept1::{constant#0}` - --> $DIR/unsatisfied-const-trait-bound.rs:33:48 + --> $DIR/unsatisfied-const-trait-bound.rs:33:49 | -LL | const fn accept1(_: Container<{ T::make() }>) {} - | ^^^^^^^^^^^^^ +LL | const fn accept1(_: Container<{ T::make() }>) {} + | ^^^^^^^^^^^^^ = 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: aborting due to 3 previous errors diff --git a/tests/ui/unpretty/ast-const-trait-bound.rs b/tests/ui/unpretty/ast-const-trait-bound.rs index f4de86bb0d03a..761bff87a628a 100644 --- a/tests/ui/unpretty/ast-const-trait-bound.rs +++ b/tests/ui/unpretty/ast-const-trait-bound.rs @@ -1,4 +1,4 @@ //@ compile-flags: -Zunpretty=normal //@ check-pass -fn foo() where T: ~const Bar {} +fn foo() where T: [const] Bar {} diff --git a/tests/ui/unpretty/ast-const-trait-bound.stdout b/tests/ui/unpretty/ast-const-trait-bound.stdout index f4de86bb0d03a..761bff87a628a 100644 --- a/tests/ui/unpretty/ast-const-trait-bound.stdout +++ b/tests/ui/unpretty/ast-const-trait-bound.stdout @@ -1,4 +1,4 @@ //@ compile-flags: -Zunpretty=normal //@ check-pass -fn foo() where T: ~const Bar {} +fn foo() where T: [const] Bar {} diff --git a/tests/ui/unpretty/exhaustive.expanded.stdout b/tests/ui/unpretty/exhaustive.expanded.stdout index cd1a5d0af08af..e714e4e952597 100644 --- a/tests/ui/unpretty/exhaustive.expanded.stdout +++ b/tests/ui/unpretty/exhaustive.expanded.stdout @@ -606,7 +606,7 @@ mod types { let _: impl Send + 'static; let _: impl 'static + Send; let _: impl ?Sized; - let _: impl ~const Clone; + let _: impl [const] Clone; let _: impl for<'a> Send; } /// TyKind::Paren diff --git a/tests/ui/unpretty/exhaustive.hir.stderr b/tests/ui/unpretty/exhaustive.hir.stderr index 58f7ff0f59812..2d535c18ab9af 100644 --- a/tests/ui/unpretty/exhaustive.hir.stderr +++ b/tests/ui/unpretty/exhaustive.hir.stderr @@ -147,8 +147,8 @@ LL | let _: impl ?Sized; error[E0562]: `impl Trait` is not allowed in the type of variable bindings --> $DIR/exhaustive.rs:813:16 | -LL | let _: impl ~const Clone; - | ^^^^^^^^^^^^^^^^^ +LL | let _: impl [const] Clone; + | ^^^^^^^^^^^^^^^^^^ | = note: `impl Trait` is only allowed in arguments and return types of functions and methods = note: see issue #63065 for more information diff --git a/tests/ui/unpretty/exhaustive.rs b/tests/ui/unpretty/exhaustive.rs index 60ad3564689d7..4f59f63dcd61d 100644 --- a/tests/ui/unpretty/exhaustive.rs +++ b/tests/ui/unpretty/exhaustive.rs @@ -810,7 +810,7 @@ mod types { let _: impl Send + 'static; //[hir]~ ERROR `impl Trait` is not allowed let _: impl 'static + Send; //[hir]~ ERROR `impl Trait` is not allowed let _: impl ?Sized; //[hir]~ ERROR `impl Trait` is not allowed - let _: impl ~const Clone; //[hir]~ ERROR `impl Trait` is not allowed + let _: impl [const] Clone; //[hir]~ ERROR `impl Trait` is not allowed let _: impl for<'a> Send; //[hir]~ ERROR `impl Trait` is not allowed } From 512ff9520666a952850d0a360a4310c5995f6991 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Thu, 26 Jun 2025 10:25:24 +0000 Subject: [PATCH 18/23] Rename `tilde const` test files to `conditionally const` --- src/tools/tidy/src/issues.txt | 1 - ...s => call-const-in-conditionally-const.rs} | 0 ... call-const-in-conditionally-const.stderr} | 2 +- ...> conditionally-const-and-const-params.rs} | 0 ...nditionally-const-and-const-params.stderr} | 12 +-- ...itionally-const-assoc-fn-in-trait-impl.rs} | 0 ... => conditionally-const-in-struct-args.rs} | 0 ...tionally-const-inherent-assoc-const-fn.rs} | 0 ... => conditionally-const-invalid-places.rs} | 0 ...conditionally-const-invalid-places.stderr} | 86 +++++++++---------- ...ditionally-const-trait-bound-assoc-tys.rs} | 0 ...conditionally-const-trait-bound-syntax.rs} | 0 ...{tilde-twice.rs => duplicate-constness.rs} | 0 ...wice.stderr => duplicate-constness.stderr} | 2 +- .../impl-conditionally-const-trait.rs | 12 +++ ... => impl-conditionally-const-trait.stderr} | 2 +- .../const-traits/impl-tilde-const-trait.rs | 9 -- ...s => specialize-on-conditionally-const.rs} | 1 + 18 files changed, 65 insertions(+), 62 deletions(-) rename tests/ui/traits/const-traits/{call-const-in-tilde-const.rs => call-const-in-conditionally-const.rs} (100%) rename tests/ui/traits/const-traits/{call-const-in-tilde-const.stderr => call-const-in-conditionally-const.stderr} (80%) rename tests/ui/traits/const-traits/{tilde-const-and-const-params.rs => conditionally-const-and-const-params.rs} (100%) rename tests/ui/traits/const-traits/{tilde-const-and-const-params.stderr => conditionally-const-and-const-params.stderr} (77%) rename tests/ui/traits/const-traits/{tilde-const-assoc-fn-in-trait-impl.rs => conditionally-const-assoc-fn-in-trait-impl.rs} (100%) rename tests/ui/traits/const-traits/{tilde-const-in-struct-args.rs => conditionally-const-in-struct-args.rs} (100%) rename tests/ui/traits/const-traits/{tilde-const-inherent-assoc-const-fn.rs => conditionally-const-inherent-assoc-const-fn.rs} (100%) rename tests/ui/traits/const-traits/{tilde-const-invalid-places.rs => conditionally-const-invalid-places.rs} (100%) rename tests/ui/traits/const-traits/{tilde-const-invalid-places.stderr => conditionally-const-invalid-places.stderr} (79%) rename tests/ui/traits/const-traits/{tilde-const-trait-assoc-tys.rs => conditionally-const-trait-bound-assoc-tys.rs} (100%) rename tests/ui/traits/const-traits/{tilde-const-syntax.rs => conditionally-const-trait-bound-syntax.rs} (100%) rename tests/ui/traits/const-traits/{tilde-twice.rs => duplicate-constness.rs} (100%) rename tests/ui/traits/const-traits/{tilde-twice.stderr => duplicate-constness.stderr} (81%) create mode 100644 tests/ui/traits/const-traits/impl-conditionally-const-trait.rs rename tests/ui/traits/const-traits/{impl-tilde-const-trait.stderr => impl-conditionally-const-trait.stderr} (75%) delete mode 100644 tests/ui/traits/const-traits/impl-tilde-const-trait.rs rename tests/ui/traits/const-traits/specialization/{issue-95186-specialize-on-tilde-const.rs => specialize-on-conditionally-const.rs} (98%) diff --git a/src/tools/tidy/src/issues.txt b/src/tools/tidy/src/issues.txt index b3517b2e9da08..bad943441b321 100644 --- a/src/tools/tidy/src/issues.txt +++ b/src/tools/tidy/src/issues.txt @@ -3921,7 +3921,6 @@ ui/traits/const-traits/issue-79450.rs ui/traits/const-traits/issue-88155.rs ui/traits/const-traits/issue-92111.rs ui/traits/const-traits/issue-92230-wf-super-trait-env.rs -ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.rs ui/traits/const-traits/specialization/issue-95187-same-trait-bound-different-constness.rs ui/traits/issue-103563.rs ui/traits/issue-104322.rs diff --git a/tests/ui/traits/const-traits/call-const-in-tilde-const.rs b/tests/ui/traits/const-traits/call-const-in-conditionally-const.rs similarity index 100% rename from tests/ui/traits/const-traits/call-const-in-tilde-const.rs rename to tests/ui/traits/const-traits/call-const-in-conditionally-const.rs diff --git a/tests/ui/traits/const-traits/call-const-in-tilde-const.stderr b/tests/ui/traits/const-traits/call-const-in-conditionally-const.stderr similarity index 80% rename from tests/ui/traits/const-traits/call-const-in-tilde-const.stderr rename to tests/ui/traits/const-traits/call-const-in-conditionally-const.stderr index b9dabceb5de47..f14b640ca315a 100644 --- a/tests/ui/traits/const-traits/call-const-in-tilde-const.stderr +++ b/tests/ui/traits/const-traits/call-const-in-conditionally-const.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `T: const Foo` is not satisfied - --> $DIR/call-const-in-tilde-const.rs:9:13 + --> $DIR/call-const-in-conditionally-const.rs:9:13 | LL | const { T::foo() } | ^ diff --git a/tests/ui/traits/const-traits/tilde-const-and-const-params.rs b/tests/ui/traits/const-traits/conditionally-const-and-const-params.rs similarity index 100% rename from tests/ui/traits/const-traits/tilde-const-and-const-params.rs rename to tests/ui/traits/const-traits/conditionally-const-and-const-params.rs diff --git a/tests/ui/traits/const-traits/tilde-const-and-const-params.stderr b/tests/ui/traits/const-traits/conditionally-const-and-const-params.stderr similarity index 77% rename from tests/ui/traits/const-traits/tilde-const-and-const-params.stderr rename to tests/ui/traits/const-traits/conditionally-const-and-const-params.stderr index f33ad02e9a470..f450bc6c9ab6f 100644 --- a/tests/ui/traits/const-traits/tilde-const-and-const-params.stderr +++ b/tests/ui/traits/const-traits/conditionally-const-and-const-params.stderr @@ -1,35 +1,35 @@ error: `[const]` is not allowed here - --> $DIR/tilde-const-and-const-params.rs:8:13 + --> $DIR/conditionally-const-and-const-params.rs:8:13 | LL | fn add(self) -> Foo<{ A::add(N) }> { | ^^^^^^^^^ | note: this function is not `const`, so it cannot have `[const]` trait bounds - --> $DIR/tilde-const-and-const-params.rs:8:8 + --> $DIR/conditionally-const-and-const-params.rs:8:8 | LL | fn add(self) -> Foo<{ A::add(N) }> { | ^^^ error: `[const]` is not allowed here - --> $DIR/tilde-const-and-const-params.rs:26:9 + --> $DIR/conditionally-const-and-const-params.rs:26:9 | LL | fn bar(_: Foo) -> Foo<{ A::add(N) }> { | ^^^^^^^^^ | note: this function is not `const`, so it cannot have `[const]` trait bounds - --> $DIR/tilde-const-and-const-params.rs:26:4 + --> $DIR/conditionally-const-and-const-params.rs:26:4 | LL | fn bar(_: Foo) -> Foo<{ A::add(N) }> { | ^^^ error[E0277]: the trait bound `A: const Add42` is not satisfied - --> $DIR/tilde-const-and-const-params.rs:26:62 + --> $DIR/conditionally-const-and-const-params.rs:26:62 | LL | fn bar(_: Foo) -> Foo<{ A::add(N) }> { | ^ error[E0277]: the trait bound `A: const Add42` is not satisfied - --> $DIR/tilde-const-and-const-params.rs:8:45 + --> $DIR/conditionally-const-and-const-params.rs:8:45 | LL | fn add(self) -> Foo<{ A::add(N) }> { | ^ diff --git a/tests/ui/traits/const-traits/tilde-const-assoc-fn-in-trait-impl.rs b/tests/ui/traits/const-traits/conditionally-const-assoc-fn-in-trait-impl.rs similarity index 100% rename from tests/ui/traits/const-traits/tilde-const-assoc-fn-in-trait-impl.rs rename to tests/ui/traits/const-traits/conditionally-const-assoc-fn-in-trait-impl.rs diff --git a/tests/ui/traits/const-traits/tilde-const-in-struct-args.rs b/tests/ui/traits/const-traits/conditionally-const-in-struct-args.rs similarity index 100% rename from tests/ui/traits/const-traits/tilde-const-in-struct-args.rs rename to tests/ui/traits/const-traits/conditionally-const-in-struct-args.rs diff --git a/tests/ui/traits/const-traits/tilde-const-inherent-assoc-const-fn.rs b/tests/ui/traits/const-traits/conditionally-const-inherent-assoc-const-fn.rs similarity index 100% rename from tests/ui/traits/const-traits/tilde-const-inherent-assoc-const-fn.rs rename to tests/ui/traits/const-traits/conditionally-const-inherent-assoc-const-fn.rs diff --git a/tests/ui/traits/const-traits/tilde-const-invalid-places.rs b/tests/ui/traits/const-traits/conditionally-const-invalid-places.rs similarity index 100% rename from tests/ui/traits/const-traits/tilde-const-invalid-places.rs rename to tests/ui/traits/const-traits/conditionally-const-invalid-places.rs diff --git a/tests/ui/traits/const-traits/tilde-const-invalid-places.stderr b/tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr similarity index 79% rename from tests/ui/traits/const-traits/tilde-const-invalid-places.stderr rename to tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr index bc991811895d4..62319689861b9 100644 --- a/tests/ui/traits/const-traits/tilde-const-invalid-places.stderr +++ b/tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr @@ -1,17 +1,17 @@ error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:7:24 + --> $DIR/conditionally-const-invalid-places.rs:7:24 | LL | fn non_const_function() {} | ^^^^^^^^^ | note: this function is not `const`, so it cannot have `[const]` trait bounds - --> $DIR/tilde-const-invalid-places.rs:7:4 + --> $DIR/conditionally-const-invalid-places.rs:7:4 | LL | fn non_const_function() {} | ^^^^^^^^^^^^^^^^^^ error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:9:16 + --> $DIR/conditionally-const-invalid-places.rs:9:16 | LL | struct Struct { field: T } | ^^^^^^^^^ @@ -19,7 +19,7 @@ LL | struct Struct { field: T } = note: this item cannot have `[const]` trait bounds error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:10:21 + --> $DIR/conditionally-const-invalid-places.rs:10:21 | LL | struct TupleStruct(T); | ^^^^^^^^^ @@ -27,7 +27,7 @@ LL | struct TupleStruct(T); = note: this item cannot have `[const]` trait bounds error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:11:20 + --> $DIR/conditionally-const-invalid-places.rs:11:20 | LL | struct UnitStruct; | ^^^^^^^^^ @@ -35,7 +35,7 @@ LL | struct UnitStruct; = note: this item cannot have `[const]` trait bounds error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:14:12 + --> $DIR/conditionally-const-invalid-places.rs:14:12 | LL | enum Enum { Variant(T) } | ^^^^^^^^^ @@ -43,7 +43,7 @@ LL | enum Enum { Variant(T) } = note: this item cannot have `[const]` trait bounds error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:16:14 + --> $DIR/conditionally-const-invalid-places.rs:16:14 | LL | union Union { field: T } | ^^^^^^^^^ @@ -51,7 +51,7 @@ LL | union Union { field: T } = note: this item cannot have `[const]` trait bounds error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:19:12 + --> $DIR/conditionally-const-invalid-places.rs:19:12 | LL | type Type = T; | ^^^^^^^^^ @@ -59,7 +59,7 @@ LL | type Type = T; = note: this item cannot have `[const]` trait bounds error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:21:17 + --> $DIR/conditionally-const-invalid-places.rs:21:17 | LL | const CONSTANT: () = (); | ^^^^^^^^^ @@ -67,43 +67,43 @@ LL | const CONSTANT: () = (); = note: this item cannot have `[const]` trait bounds error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:25:16 + --> $DIR/conditionally-const-invalid-places.rs:25:16 | LL | type Type: [const] Trait; | ^^^^^^^^^ | note: associated types in non-`#[const_trait]` traits cannot have `[const]` trait bounds - --> $DIR/tilde-const-invalid-places.rs:25:5 + --> $DIR/conditionally-const-invalid-places.rs:25:5 | LL | type Type: [const] Trait; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:25:32 + --> $DIR/conditionally-const-invalid-places.rs:25:32 | LL | type Type: [const] Trait; | ^^^^^^^^^ | note: associated types in non-`#[const_trait]` traits cannot have `[const]` trait bounds - --> $DIR/tilde-const-invalid-places.rs:25:5 + --> $DIR/conditionally-const-invalid-places.rs:25:5 | LL | type Type: [const] Trait; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:28:28 + --> $DIR/conditionally-const-invalid-places.rs:28:28 | LL | fn non_const_function(); | ^^^^^^^^^ | note: this function is not `const`, so it cannot have `[const]` trait bounds - --> $DIR/tilde-const-invalid-places.rs:28:8 + --> $DIR/conditionally-const-invalid-places.rs:28:8 | LL | fn non_const_function(); | ^^^^^^^^^^^^^^^^^^ error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:29:21 + --> $DIR/conditionally-const-invalid-places.rs:29:21 | LL | const CONSTANT: (); | ^^^^^^^^^ @@ -111,31 +111,31 @@ LL | const CONSTANT: (); = note: this item cannot have `[const]` trait bounds error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:34:16 + --> $DIR/conditionally-const-invalid-places.rs:34:16 | LL | type Type = (); | ^^^^^^^^^ | note: associated types in non-const impls cannot have `[const]` trait bounds - --> $DIR/tilde-const-invalid-places.rs:34:5 + --> $DIR/conditionally-const-invalid-places.rs:34:5 | LL | type Type = (); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:36:28 + --> $DIR/conditionally-const-invalid-places.rs:36:28 | LL | fn non_const_function() {} | ^^^^^^^^^ | note: this function is not `const`, so it cannot have `[const]` trait bounds - --> $DIR/tilde-const-invalid-places.rs:36:8 + --> $DIR/conditionally-const-invalid-places.rs:36:8 | LL | fn non_const_function() {} | ^^^^^^^^^^^^^^^^^^ error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:37:21 + --> $DIR/conditionally-const-invalid-places.rs:37:21 | LL | const CONSTANT: () = (); | ^^^^^^^^^ @@ -143,31 +143,31 @@ LL | const CONSTANT: () = (); = note: this item cannot have `[const]` trait bounds error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:44:16 + --> $DIR/conditionally-const-invalid-places.rs:44:16 | LL | type Type = (); | ^^^^^^^^^ | note: inherent associated types cannot have `[const]` trait bounds - --> $DIR/tilde-const-invalid-places.rs:44:5 + --> $DIR/conditionally-const-invalid-places.rs:44:5 | LL | type Type = (); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:46:28 + --> $DIR/conditionally-const-invalid-places.rs:46:28 | LL | fn non_const_function() {} | ^^^^^^^^^ | note: this function is not `const`, so it cannot have `[const]` trait bounds - --> $DIR/tilde-const-invalid-places.rs:46:8 + --> $DIR/conditionally-const-invalid-places.rs:46:8 | LL | fn non_const_function() {} | ^^^^^^^^^^^^^^^^^^ error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:47:21 + --> $DIR/conditionally-const-invalid-places.rs:47:21 | LL | const CONSTANT: () = (); | ^^^^^^^^^ @@ -175,55 +175,55 @@ LL | const CONSTANT: () = (); = note: this item cannot have `[const]` trait bounds error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:52:13 + --> $DIR/conditionally-const-invalid-places.rs:52:13 | LL | trait Child0: [const] Trait {} | ^^^^^^^^^ | note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds - --> $DIR/tilde-const-invalid-places.rs:52:1 + --> $DIR/conditionally-const-invalid-places.rs:52:1 | LL | trait Child0: [const] Trait {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:53:24 + --> $DIR/conditionally-const-invalid-places.rs:53:24 | LL | trait Child1 where Self: [const] Trait {} | ^^^^^^^^^ | note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds - --> $DIR/tilde-const-invalid-places.rs:53:1 + --> $DIR/conditionally-const-invalid-places.rs:53:1 | LL | trait Child1 where Self: [const] Trait {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:56:7 + --> $DIR/conditionally-const-invalid-places.rs:56:7 | LL | impl Trait for T {} | ^^^^^^^^^ | note: this impl is not `const`, so it cannot have `[const]` trait bounds - --> $DIR/tilde-const-invalid-places.rs:56:1 + --> $DIR/conditionally-const-invalid-places.rs:56:1 | LL | impl Trait for T {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `[const]` is not allowed here - --> $DIR/tilde-const-invalid-places.rs:59:7 + --> $DIR/conditionally-const-invalid-places.rs:59:7 | LL | impl Struct {} | ^^^^^^^^^ | note: inherent impls cannot have `[const]` trait bounds - --> $DIR/tilde-const-invalid-places.rs:59:1 + --> $DIR/conditionally-const-invalid-places.rs:59:1 | LL | impl Struct {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0658]: generic const items are experimental - --> $DIR/tilde-const-invalid-places.rs:21:15 + --> $DIR/conditionally-const-invalid-places.rs:21:15 | LL | const CONSTANT: () = (); | ^^^^^^^^^^^^^^^^^^ @@ -233,7 +233,7 @@ LL | const CONSTANT: () = (); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: generic const items are experimental - --> $DIR/tilde-const-invalid-places.rs:29:19 + --> $DIR/conditionally-const-invalid-places.rs:29:19 | LL | const CONSTANT: (); | ^^^^^^^^^^^^^^^^^^ @@ -243,7 +243,7 @@ LL | const CONSTANT: (); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: generic const items are experimental - --> $DIR/tilde-const-invalid-places.rs:37:19 + --> $DIR/conditionally-const-invalid-places.rs:37:19 | LL | const CONSTANT: () = (); | ^^^^^^^^^^^^^^^^^^ @@ -253,7 +253,7 @@ LL | const CONSTANT: () = (); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: generic const items are experimental - --> $DIR/tilde-const-invalid-places.rs:47:19 + --> $DIR/conditionally-const-invalid-places.rs:47:19 | LL | const CONSTANT: () = (); | ^^^^^^^^^^^^^^^^^^ @@ -263,7 +263,7 @@ LL | const CONSTANT: () = (); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0392]: type parameter `T` is never used - --> $DIR/tilde-const-invalid-places.rs:11:19 + --> $DIR/conditionally-const-invalid-places.rs:11:19 | LL | struct UnitStruct; | ^ unused type parameter @@ -271,7 +271,7 @@ LL | struct UnitStruct; = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData` error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union - --> $DIR/tilde-const-invalid-places.rs:16:33 + --> $DIR/conditionally-const-invalid-places.rs:16:33 | LL | union Union { field: T } | ^^^^^^^^ @@ -283,19 +283,19 @@ LL | union Union { field: std::mem::ManuallyDrop } | +++++++++++++++++++++++ + error[E0275]: overflow evaluating the requirement `(): Trait` - --> $DIR/tilde-const-invalid-places.rs:34:35 + --> $DIR/conditionally-const-invalid-places.rs:34:35 | LL | type Type = (); | ^^ | note: required by a bound in `NonConstTrait::Type` - --> $DIR/tilde-const-invalid-places.rs:25:34 + --> $DIR/conditionally-const-invalid-places.rs:25:34 | LL | type Type: [const] Trait; | ^^^^^^^^^^^^^ required by this bound in `NonConstTrait::Type` error[E0658]: inherent associated types are unstable - --> $DIR/tilde-const-invalid-places.rs:44:5 + --> $DIR/conditionally-const-invalid-places.rs:44:5 | LL | type Type = (); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs b/tests/ui/traits/const-traits/conditionally-const-trait-bound-assoc-tys.rs similarity index 100% rename from tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs rename to tests/ui/traits/const-traits/conditionally-const-trait-bound-assoc-tys.rs diff --git a/tests/ui/traits/const-traits/tilde-const-syntax.rs b/tests/ui/traits/const-traits/conditionally-const-trait-bound-syntax.rs similarity index 100% rename from tests/ui/traits/const-traits/tilde-const-syntax.rs rename to tests/ui/traits/const-traits/conditionally-const-trait-bound-syntax.rs diff --git a/tests/ui/traits/const-traits/tilde-twice.rs b/tests/ui/traits/const-traits/duplicate-constness.rs similarity index 100% rename from tests/ui/traits/const-traits/tilde-twice.rs rename to tests/ui/traits/const-traits/duplicate-constness.rs diff --git a/tests/ui/traits/const-traits/tilde-twice.stderr b/tests/ui/traits/const-traits/duplicate-constness.stderr similarity index 81% rename from tests/ui/traits/const-traits/tilde-twice.stderr rename to tests/ui/traits/const-traits/duplicate-constness.stderr index adfda4c343760..27f69cd2386c6 100644 --- a/tests/ui/traits/const-traits/tilde-twice.stderr +++ b/tests/ui/traits/const-traits/duplicate-constness.stderr @@ -1,5 +1,5 @@ error: expected identifier, found `]` - --> $DIR/tilde-twice.rs:5:27 + --> $DIR/duplicate-constness.rs:5:27 | LL | struct S; | ^ expected identifier diff --git a/tests/ui/traits/const-traits/impl-conditionally-const-trait.rs b/tests/ui/traits/const-traits/impl-conditionally-const-trait.rs new file mode 100644 index 0000000000000..f3783c9e69b2e --- /dev/null +++ b/tests/ui/traits/const-traits/impl-conditionally-const-trait.rs @@ -0,0 +1,12 @@ +//! This test ensures that we can only implement `const Trait` for a type +//! and not have the conditionally const syntax in that position. + +#![feature(const_trait_impl)] + +struct S; +trait T {} + +impl [const] T for S {} +//~^ ERROR expected identifier, found `]` + +fn main() {} diff --git a/tests/ui/traits/const-traits/impl-tilde-const-trait.stderr b/tests/ui/traits/const-traits/impl-conditionally-const-trait.stderr similarity index 75% rename from tests/ui/traits/const-traits/impl-tilde-const-trait.stderr rename to tests/ui/traits/const-traits/impl-conditionally-const-trait.stderr index 98e34a7d9ff36..fc8db61b9409d 100644 --- a/tests/ui/traits/const-traits/impl-tilde-const-trait.stderr +++ b/tests/ui/traits/const-traits/impl-conditionally-const-trait.stderr @@ -1,5 +1,5 @@ error: expected identifier, found `]` - --> $DIR/impl-tilde-const-trait.rs:6:12 + --> $DIR/impl-conditionally-const-trait.rs:9:12 | LL | impl [const] T for S {} | ^ expected identifier diff --git a/tests/ui/traits/const-traits/impl-tilde-const-trait.rs b/tests/ui/traits/const-traits/impl-tilde-const-trait.rs deleted file mode 100644 index cf387ac56fcad..0000000000000 --- a/tests/ui/traits/const-traits/impl-tilde-const-trait.rs +++ /dev/null @@ -1,9 +0,0 @@ -#![feature(const_trait_impl)] - -struct S; -trait T {} - -impl [const] T for S {} -//~^ ERROR expected identifier, found `]` - -fn main() {} diff --git a/tests/ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.rs b/tests/ui/traits/const-traits/specialization/specialize-on-conditionally-const.rs similarity index 98% rename from tests/ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.rs rename to tests/ui/traits/const-traits/specialization/specialize-on-conditionally-const.rs index b4f3b46c00f55..0106bb13875ac 100644 --- a/tests/ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.rs +++ b/tests/ui/traits/const-traits/specialization/specialize-on-conditionally-const.rs @@ -1,4 +1,5 @@ // Tests that `[const]` trait bounds can be used to specialize const trait impls. +// cc #95186 //@ check-pass From b2be01c81567e89142577f9474a810e3a8676cfc Mon Sep 17 00:00:00 2001 From: binarycat Date: Tue, 24 Jun 2025 17:47:24 -0500 Subject: [PATCH 19/23] rustdoc: show attributes on enum variants mostly for #[non_exhaustive] --- src/librustdoc/html/render/print_item.rs | 1 + .../rustdoc/enum/enum-variant-non_exhaustive.rs | 17 +++++++++++++++++ ...-variant-non_exhaustive.type-alias-code.html | 4 ++++ .../enum-variant-non_exhaustive.type-code.html | 4 ++++ 4 files changed, 26 insertions(+) create mode 100644 tests/rustdoc/enum/enum-variant-non_exhaustive.rs create mode 100644 tests/rustdoc/enum/enum-variant-non_exhaustive.type-alias-code.html create mode 100644 tests/rustdoc/enum/enum-variant-non_exhaustive.type-code.html diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index 515424cbef19b..5456a09dce72c 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -1702,6 +1702,7 @@ fn render_enum_fields( if v.is_stripped() { continue; } + write!(w, "{}", render_attributes_in_pre(v, TAB, cx))?; w.write_str(TAB)?; match v.kind { clean::VariantItem(ref var) => match var.kind { diff --git a/tests/rustdoc/enum/enum-variant-non_exhaustive.rs b/tests/rustdoc/enum/enum-variant-non_exhaustive.rs new file mode 100644 index 0000000000000..ea0234a49f640 --- /dev/null +++ b/tests/rustdoc/enum/enum-variant-non_exhaustive.rs @@ -0,0 +1,17 @@ +// regression test for https://github.com/rust-lang/rust/issues/142599 + +#![crate_name = "foo"] + +//@ snapshot type-code 'foo/enum.Type.html' '//pre[@class="rust item-decl"]/code' +pub enum Type { + #[non_exhaustive] + // attribute that should not be shown + #[warn(unsafe_code)] + Variant, +} + +// we would love to use the `following-sibling::` axis +// (along with an `h2[@id="aliased-type"]` query), +// but unfortunately python doesn't implement that. +//@ snapshot type-alias-code 'foo/type.TypeAlias.html' '//pre[@class="rust item-decl"][2]/code' +pub type TypeAlias = Type; diff --git a/tests/rustdoc/enum/enum-variant-non_exhaustive.type-alias-code.html b/tests/rustdoc/enum/enum-variant-non_exhaustive.type-alias-code.html new file mode 100644 index 0000000000000..04eea709079d7 --- /dev/null +++ b/tests/rustdoc/enum/enum-variant-non_exhaustive.type-alias-code.html @@ -0,0 +1,4 @@ +pub enum TypeAlias { + #[non_exhaustive] + Variant, +} \ No newline at end of file diff --git a/tests/rustdoc/enum/enum-variant-non_exhaustive.type-code.html b/tests/rustdoc/enum/enum-variant-non_exhaustive.type-code.html new file mode 100644 index 0000000000000..6c8851ea5df47 --- /dev/null +++ b/tests/rustdoc/enum/enum-variant-non_exhaustive.type-code.html @@ -0,0 +1,4 @@ +pub enum Type { + #[non_exhaustive] + Variant, +} \ No newline at end of file From 4573c8435c3915c8d1802dc93202f6e3afba1ddc Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Wed, 25 Jun 2025 07:56:40 +0200 Subject: [PATCH 20/23] tests: Require `run-fail` ui tests to have an exit code (`SIGABRT` not ok) Normally a `run-fail` ui test shall not be terminated by a signal like `SIGABRT`. So begin having that as a hard requirement. Some of our current tests do terminate by a signal however. Introduce and use `run-crash` for those tests. --- .../rustc-dev-guide/src/tests/directives.md | 5 +-- src/doc/rustc-dev-guide/src/tests/ui.md | 7 ++-- src/tools/compiletest/src/common.rs | 14 +++++++- src/tools/compiletest/src/directive-list.rs | 1 + src/tools/compiletest/src/header.rs | 7 ++-- src/tools/compiletest/src/runtest.rs | 14 +++++--- src/tools/compiletest/src/runtest/ui.rs | 34 +++++++++++++++---- .../contracts/contract-attributes-generics.rs | 6 ++-- .../ui/contracts/contract-attributes-nest.rs | 4 +-- .../ui/contracts/contract-attributes-tail.rs | 4 +-- .../contract-captures-via-closure-copy.rs | 2 +- tests/ui/contracts/contract-const-fn.rs | 4 +-- .../contracts-ensures-early-fn-exit.rs | 6 ++-- .../contract-ast-extensions-nest.rs | 4 +-- .../contract-ast-extensions-tail.rs | 4 +-- .../internal_machinery/contract-intrinsics.rs | 4 +-- .../internal_machinery/contract-lang-items.rs | 2 +- tests/ui/extern/extern-types-field-offset.rs | 2 +- .../borrow_misaligned_field_projection.rs | 2 +- tests/ui/mir/alignment/misaligned_borrow.rs | 2 +- tests/ui/mir/alignment/misaligned_lhs.rs | 2 +- .../ui/mir/alignment/misaligned_mut_borrow.rs | 2 +- tests/ui/mir/alignment/misaligned_rhs.rs | 2 +- tests/ui/mir/alignment/two_pointers.rs | 2 +- tests/ui/mir/null/borrowed_mut_null.rs | 2 +- tests/ui/mir/null/borrowed_null.rs | 2 +- tests/ui/mir/null/borrowed_null_zst.rs | 2 +- tests/ui/mir/null/null_lhs.rs | 2 +- tests/ui/mir/null/null_rhs.rs | 2 +- tests/ui/mir/null/two_pointers.rs | 2 +- tests/ui/panics/panic-in-cleanup.rs | 2 +- tests/ui/panics/panic-in-ffi.rs | 2 +- tests/ui/panics/panic-in-message-fmt.rs | 2 +- tests/ui/precondition-checks/alignment.rs | 2 +- .../ascii-char-digit_unchecked.rs | 2 +- .../precondition-checks/assert_unchecked.rs | 2 +- .../char-from_u32_unchecked.rs | 2 +- .../copy-nonoverlapping.rs | 2 +- tests/ui/precondition-checks/copy.rs | 2 +- tests/ui/precondition-checks/layout.rs | 2 +- tests/ui/precondition-checks/nonnull.rs | 2 +- .../nonzero-from_mut_unchecked.rs | 2 +- .../nonzero-new_unchecked.rs | 2 +- tests/ui/precondition-checks/read_volatile.rs | 2 +- tests/ui/precondition-checks/replace.rs | 2 +- .../slice-from-raw-parts-mut.rs | 2 +- .../slice-from-raw-parts.rs | 2 +- .../slice-get_unchecked.rs | 2 +- .../slice-get_unchecked_mut.rs | 2 +- .../precondition-checks/str-get_unchecked.rs | 2 +- .../str-get_unchecked_mut.rs | 2 +- .../swap-nonoverlapping.rs | 2 +- tests/ui/precondition-checks/unchecked_add.rs | 2 +- tests/ui/precondition-checks/unchecked_mul.rs | 2 +- tests/ui/precondition-checks/unchecked_shl.rs | 2 +- tests/ui/precondition-checks/unchecked_shr.rs | 2 +- tests/ui/precondition-checks/unchecked_sub.rs | 2 +- .../unreachable_unchecked.rs | 2 +- .../ui/precondition-checks/write_volatile.rs | 2 +- .../std/issue-81357-unsound-file-methods.rs | 2 +- 60 files changed, 127 insertions(+), 81 deletions(-) diff --git a/src/doc/rustc-dev-guide/src/tests/directives.md b/src/doc/rustc-dev-guide/src/tests/directives.md index 839076b809df8..9ef0e51e6a782 100644 --- a/src/doc/rustc-dev-guide/src/tests/directives.md +++ b/src/doc/rustc-dev-guide/src/tests/directives.md @@ -75,8 +75,9 @@ expectations](ui.md#controlling-passfail-expectations). | `check-fail` | Building (no codegen) should fail | `ui`, `crashes` | N/A | | `build-pass` | Building should pass | `ui`, `crashes`, `codegen`, `incremental` | N/A | | `build-fail` | Building should fail | `ui`, `crashes` | N/A | -| `run-pass` | Running the test binary should pass | `ui`, `crashes`, `incremental` | N/A | -| `run-fail` | Running the test binary should fail | `ui`, `crashes` | N/A | +| `run-pass` | Program must exit with code `0` | `ui`, `crashes`, `incremental` | N/A | +| `run-fail` | Program must exit with code `1..=127` | `ui`, `crashes` | N/A | +| `run-crash` | Program must crash | `ui`, | N/A | | `ignore-pass` | Ignore `--pass` flag | `ui`, `crashes`, `codegen`, `incremental` | N/A | | `dont-check-failure-status` | Don't check exact failure status (i.e. `1`) | `ui`, `incremental` | N/A | | `failure-status` | Check | `ui`, `crashes` | Any `u16` | diff --git a/src/doc/rustc-dev-guide/src/tests/ui.md b/src/doc/rustc-dev-guide/src/tests/ui.md index 09dc476d68eea..9e2c754cd7b17 100644 --- a/src/doc/rustc-dev-guide/src/tests/ui.md +++ b/src/doc/rustc-dev-guide/src/tests/ui.md @@ -448,7 +448,7 @@ even run the resulting program. Just add one of the following - `//@ build-pass` — compilation and linking should succeed but do not run the resulting binary. - `//@ run-pass` — compilation should succeed and running the resulting - binary should also succeed. + binary should make it exit with code 0 which indicates success. - Fail directives: - `//@ check-fail` — compilation should fail (the codegen phase is skipped). This is the default for UI tests. @@ -457,7 +457,10 @@ even run the resulting program. Just add one of the following without the codegen phase, then a second time the full compile should fail. - `//@ run-fail` — compilation should succeed, but running the resulting - binary should fail. + binary should make it exit with a code in the range `1..=127` which + indicates regular failure. + - `//@ run-crash` — compilation should succeed, but running the resulting + binary should fail with a crash (e.g. `SIGABRT` or `SIGSEGV`). For `run-pass` and `run-fail` tests, by default the output of the program itself is not checked. diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs index 9b9d94bbead09..621266e3af84f 100644 --- a/src/tools/compiletest/src/common.rs +++ b/src/tools/compiletest/src/common.rs @@ -110,11 +110,23 @@ string_enum! { } } +#[derive(Copy, Clone, Debug, PartialEq, PartialOrd)] +pub enum RunFailMode { + /// Running the program must make it exit with a regular failure exit code + /// in the range `1..=127`. If the program is terminated by e.g. a signal + /// the test will fail. + ExitWithFailure, + /// Running the program must result in a crash, e.g. by `SIGABRT` or + /// `SIGSEGV` on Unix or on Windows by having an appropriate NTSTATUS high + /// bit in the exit code. + Crash, +} + #[derive(Copy, Clone, Debug, PartialEq, PartialOrd)] pub enum FailMode { Check, Build, - Run, + Run(RunFailMode), } string_enum! { diff --git a/src/tools/compiletest/src/directive-list.rs b/src/tools/compiletest/src/directive-list.rs index 2ecb4fc865213..b3c5be0a844c8 100644 --- a/src/tools/compiletest/src/directive-list.rs +++ b/src/tools/compiletest/src/directive-list.rs @@ -241,6 +241,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[ "regex-error-pattern", "remap-src-base", "revisions", + "run-crash", "run-fail", "run-flags", "run-pass", diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index 2b203bb309c63..f1c5a7d7c83ec 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -9,7 +9,7 @@ use camino::{Utf8Path, Utf8PathBuf}; use semver::Version; use tracing::*; -use crate::common::{Config, Debugger, FailMode, Mode, PassMode}; +use crate::common::{Config, Debugger, FailMode, Mode, PassMode, RunFailMode}; use crate::debuggers::{extract_cdb_version, extract_gdb_version}; use crate::errors::ErrorKind; use crate::executor::{CollectedTestDesc, ShouldPanic}; @@ -655,7 +655,10 @@ impl TestProps { Some(FailMode::Build) } else if config.parse_name_directive(ln, "run-fail") { check_ui("run"); - Some(FailMode::Run) + Some(FailMode::Run(RunFailMode::ExitWithFailure)) + } else if config.parse_name_directive(ln, "run-crash") { + check_ui("run"); + Some(FailMode::Run(RunFailMode::Crash)) } else { None }; diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 980e89889abba..b28a30cfd31de 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -17,10 +17,10 @@ use tracing::*; use crate::common::{ Assembly, Codegen, CodegenUnits, CompareMode, Config, CoverageMap, CoverageRun, Crashes, - DebugInfo, Debugger, FailMode, Incremental, MirOpt, PassMode, Pretty, RunMake, Rustdoc, - RustdocJs, RustdocJson, TestPaths, UI_EXTENSIONS, UI_FIXED, UI_RUN_STDERR, UI_RUN_STDOUT, - UI_STDERR, UI_STDOUT, UI_SVG, UI_WINDOWS_SVG, Ui, expected_output_path, incremental_dir, - output_base_dir, output_base_name, output_testname_unique, + DebugInfo, Debugger, FailMode, Incremental, MirOpt, PassMode, Pretty, RunFailMode, RunMake, + Rustdoc, RustdocJs, RustdocJson, TestPaths, UI_EXTENSIONS, UI_FIXED, UI_RUN_STDERR, + UI_RUN_STDOUT, UI_STDERR, UI_STDOUT, UI_SVG, UI_WINDOWS_SVG, Ui, expected_output_path, + incremental_dir, output_base_dir, output_base_name, output_testname_unique, }; use crate::compute_diff::{DiffLine, make_diff, write_diff, write_filtered_diff}; use crate::errors::{Error, ErrorKind, load_errors}; @@ -277,7 +277,11 @@ impl<'test> TestCx<'test> { fn should_run(&self, pm: Option) -> WillExecute { let test_should_run = match self.config.mode { - Ui if pm == Some(PassMode::Run) || self.props.fail_mode == Some(FailMode::Run) => true, + Ui if pm == Some(PassMode::Run) + || matches!(self.props.fail_mode, Some(FailMode::Run(_))) => + { + true + } MirOpt if pm == Some(PassMode::Run) => true, Ui | MirOpt => false, mode => panic!("unimplemented for mode {:?}", mode), diff --git a/src/tools/compiletest/src/runtest/ui.rs b/src/tools/compiletest/src/runtest/ui.rs index cc50a918f757a..abb18a1f7679c 100644 --- a/src/tools/compiletest/src/runtest/ui.rs +++ b/src/tools/compiletest/src/runtest/ui.rs @@ -6,8 +6,8 @@ use rustfix::{Filter, apply_suggestions, get_suggestions_from_json}; use tracing::debug; use super::{ - AllowUnused, Emit, FailMode, LinkToAux, PassMode, TargetLocation, TestCx, TestOutput, - Truncated, UI_FIXED, WillExecute, + AllowUnused, Emit, FailMode, LinkToAux, PassMode, RunFailMode, TargetLocation, TestCx, + TestOutput, Truncated, UI_FIXED, WillExecute, }; use crate::json; @@ -140,12 +140,34 @@ impl TestCx<'_> { &proc_res, ); } + let code = proc_res.status.code(); + let exit_with_success = proc_res.status.success(); + // A normal failure exit code is between 1 and 127. If we don't have + // an exit code or if it is outside that range (and not 0) we + // consider it a crash. + let exit_with_failure = code.is_some_and(|c| c >= 1 && c <= 127); if self.should_run_successfully(pm) { - if !proc_res.status.success() { - self.fatal_proc_rec("test run failed!", &proc_res); + if !exit_with_success { + self.fatal_proc_rec( + &format!("test did not exit with success! code={code:?}"), + &proc_res, + ); + } + } else if self.props.fail_mode == Some(FailMode::Run(RunFailMode::ExitWithFailure)) { + if !exit_with_failure { + self.fatal_proc_rec( + &format!("test did not exit with failure! code={code:?}"), + &proc_res, + ); + } + } else { + // If we get here it means we should not run successfully and we + // should not exit with failure. So we should crash. And if we + // did exit with success or did exit with failure it means we + // did NOT crash. + if exit_with_success || exit_with_failure { + self.fatal_proc_rec(&format!("test did not crash! code={code:?}"), &proc_res); } - } else if proc_res.status.success() { - self.fatal_proc_rec("test run succeeded!", &proc_res); } self.get_output(&proc_res) diff --git a/tests/ui/contracts/contract-attributes-generics.rs b/tests/ui/contracts/contract-attributes-generics.rs index fd79c6abedd85..3763ce116f844 100644 --- a/tests/ui/contracts/contract-attributes-generics.rs +++ b/tests/ui/contracts/contract-attributes-generics.rs @@ -5,9 +5,9 @@ //@ [unchk_pass] run-pass //@ [chk_pass] run-pass // -//@ [chk_fail_pre] run-fail -//@ [chk_fail_post] run-fail -//@ [chk_const_fail] run-fail +//@ [chk_fail_pre] run-crash +//@ [chk_fail_post] run-crash +//@ [chk_const_fail] run-crash // //@ [unchk_pass] compile-flags: -Zcontract-checks=no // diff --git a/tests/ui/contracts/contract-attributes-nest.rs b/tests/ui/contracts/contract-attributes-nest.rs index e1e61b88f282e..d367687b84e31 100644 --- a/tests/ui/contracts/contract-attributes-nest.rs +++ b/tests/ui/contracts/contract-attributes-nest.rs @@ -5,8 +5,8 @@ //@ [unchk_fail_post] run-pass //@ [chk_pass] run-pass // -//@ [chk_fail_pre] run-fail -//@ [chk_fail_post] run-fail +//@ [chk_fail_pre] run-crash +//@ [chk_fail_post] run-crash // //@ [unchk_pass] compile-flags: -Zcontract-checks=no //@ [unchk_fail_pre] compile-flags: -Zcontract-checks=no diff --git a/tests/ui/contracts/contract-attributes-tail.rs b/tests/ui/contracts/contract-attributes-tail.rs index ce4a6be5b82f7..43edfe5e803fe 100644 --- a/tests/ui/contracts/contract-attributes-tail.rs +++ b/tests/ui/contracts/contract-attributes-tail.rs @@ -5,8 +5,8 @@ //@ [unchk_fail_post] run-pass //@ [chk_pass] run-pass // -//@ [chk_fail_pre] run-fail -//@ [chk_fail_post] run-fail +//@ [chk_fail_pre] run-crash +//@ [chk_fail_post] run-crash // //@ [unchk_pass] compile-flags: -Zcontract-checks=no //@ [unchk_fail_pre] compile-flags: -Zcontract-checks=no diff --git a/tests/ui/contracts/contract-captures-via-closure-copy.rs b/tests/ui/contracts/contract-captures-via-closure-copy.rs index 32c6d2bf4fe17..bc7e5b9b6f101 100644 --- a/tests/ui/contracts/contract-captures-via-closure-copy.rs +++ b/tests/ui/contracts/contract-captures-via-closure-copy.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Zcontract-checks=yes #![feature(contracts)] diff --git a/tests/ui/contracts/contract-const-fn.rs b/tests/ui/contracts/contract-const-fn.rs index 733a06ae57090..fe8dd37b1f52d 100644 --- a/tests/ui/contracts/contract-const-fn.rs +++ b/tests/ui/contracts/contract-const-fn.rs @@ -8,8 +8,8 @@ // //@ [all_pass] run-pass // -//@ [runtime_fail_pre] run-fail -//@ [runtime_fail_post] run-fail +//@ [runtime_fail_pre] run-crash +//@ [runtime_fail_post] run-crash // //@ [all_pass] compile-flags: -Zcontract-checks=yes //@ [runtime_fail_pre] compile-flags: -Zcontract-checks=yes diff --git a/tests/ui/contracts/contracts-ensures-early-fn-exit.rs b/tests/ui/contracts/contracts-ensures-early-fn-exit.rs index 034cead3b4e9f..44ae07d8c95c0 100644 --- a/tests/ui/contracts/contracts-ensures-early-fn-exit.rs +++ b/tests/ui/contracts/contracts-ensures-early-fn-exit.rs @@ -2,9 +2,9 @@ // //@ [unchk_pass] run-pass //@ [chk_pass] run-pass -//@ [chk_fail_try] run-fail -//@ [chk_fail_ret] run-fail -//@ [chk_fail_yeet] run-fail +//@ [chk_fail_try] run-crash +//@ [chk_fail_ret] run-crash +//@ [chk_fail_yeet] run-crash // //@ [unchk_pass] compile-flags: -Zcontract-checks=no //@ [chk_pass] compile-flags: -Zcontract-checks=yes diff --git a/tests/ui/contracts/internal_machinery/contract-ast-extensions-nest.rs b/tests/ui/contracts/internal_machinery/contract-ast-extensions-nest.rs index 6d8cd3949eedb..4da0480f8bc10 100644 --- a/tests/ui/contracts/internal_machinery/contract-ast-extensions-nest.rs +++ b/tests/ui/contracts/internal_machinery/contract-ast-extensions-nest.rs @@ -5,8 +5,8 @@ //@ [unchk_fail_post] run-pass //@ [chk_pass] run-pass // -//@ [chk_fail_pre] run-fail -//@ [chk_fail_post] run-fail +//@ [chk_fail_pre] run-crash +//@ [chk_fail_post] run-crash // //@ [unchk_pass] compile-flags: -Zcontract-checks=no //@ [unchk_fail_pre] compile-flags: -Zcontract-checks=no diff --git a/tests/ui/contracts/internal_machinery/contract-ast-extensions-tail.rs b/tests/ui/contracts/internal_machinery/contract-ast-extensions-tail.rs index 07ec26f921b80..f3cf5ce082c03 100644 --- a/tests/ui/contracts/internal_machinery/contract-ast-extensions-tail.rs +++ b/tests/ui/contracts/internal_machinery/contract-ast-extensions-tail.rs @@ -5,8 +5,8 @@ //@ [unchk_fail_post] run-pass //@ [chk_pass] run-pass // -//@ [chk_fail_pre] run-fail -//@ [chk_fail_post] run-fail +//@ [chk_fail_pre] run-crash +//@ [chk_fail_post] run-crash // //@ [unchk_pass] compile-flags: -Zcontract-checks=no //@ [unchk_fail_pre] compile-flags: -Zcontract-checks=no diff --git a/tests/ui/contracts/internal_machinery/contract-intrinsics.rs b/tests/ui/contracts/internal_machinery/contract-intrinsics.rs index c62b8cca75ab7..6e613b53fc9b1 100644 --- a/tests/ui/contracts/internal_machinery/contract-intrinsics.rs +++ b/tests/ui/contracts/internal_machinery/contract-intrinsics.rs @@ -3,8 +3,8 @@ //@ [default] run-pass //@ [unchk_pass] run-pass //@ [chk_pass] run-pass -//@ [chk_fail_requires] run-fail -//@ [chk_fail_ensures] run-fail +//@ [chk_fail_requires] run-crash +//@ [chk_fail_ensures] run-crash // //@ [unchk_pass] compile-flags: -Zcontract-checks=no //@ [chk_pass] compile-flags: -Zcontract-checks=yes diff --git a/tests/ui/contracts/internal_machinery/contract-lang-items.rs b/tests/ui/contracts/internal_machinery/contract-lang-items.rs index 73c5919453101..ac72d233bf6b4 100644 --- a/tests/ui/contracts/internal_machinery/contract-lang-items.rs +++ b/tests/ui/contracts/internal_machinery/contract-lang-items.rs @@ -4,7 +4,7 @@ //@ [unchk_fail_post] run-pass //@ [chk_pass] run-pass // -//@ [chk_fail_post] run-fail +//@ [chk_fail_post] run-crash // //@ [unchk_pass] compile-flags: -Zcontract-checks=no //@ [unchk_fail_post] compile-flags: -Zcontract-checks=no diff --git a/tests/ui/extern/extern-types-field-offset.rs b/tests/ui/extern/extern-types-field-offset.rs index 75f3eab3e275f..035f063cd502c 100644 --- a/tests/ui/extern/extern-types-field-offset.rs +++ b/tests/ui/extern/extern-types-field-offset.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ check-run-results //@ exec-env:RUST_BACKTRACE=0 //@ normalize-stderr: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" diff --git a/tests/ui/mir/alignment/borrow_misaligned_field_projection.rs b/tests/ui/mir/alignment/borrow_misaligned_field_projection.rs index a22965ce1d873..6ba895f172d9e 100644 --- a/tests/ui/mir/alignment/borrow_misaligned_field_projection.rs +++ b/tests/ui/mir/alignment/borrow_misaligned_field_projection.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ ignore-i686-pc-windows-msvc: #112480 //@ compile-flags: -C debug-assertions //@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is diff --git a/tests/ui/mir/alignment/misaligned_borrow.rs b/tests/ui/mir/alignment/misaligned_borrow.rs index de8912c703827..60c21deaba5ab 100644 --- a/tests/ui/mir/alignment/misaligned_borrow.rs +++ b/tests/ui/mir/alignment/misaligned_borrow.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ ignore-i686-pc-windows-msvc: #112480 //@ compile-flags: -C debug-assertions //@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is diff --git a/tests/ui/mir/alignment/misaligned_lhs.rs b/tests/ui/mir/alignment/misaligned_lhs.rs index b169823bc081f..e8ddb10fd9c41 100644 --- a/tests/ui/mir/alignment/misaligned_lhs.rs +++ b/tests/ui/mir/alignment/misaligned_lhs.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ ignore-i686-pc-windows-msvc: #112480 //@ compile-flags: -C debug-assertions //@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is diff --git a/tests/ui/mir/alignment/misaligned_mut_borrow.rs b/tests/ui/mir/alignment/misaligned_mut_borrow.rs index bba20edecfddb..c066cc0efcd92 100644 --- a/tests/ui/mir/alignment/misaligned_mut_borrow.rs +++ b/tests/ui/mir/alignment/misaligned_mut_borrow.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ ignore-i686-pc-windows-msvc: #112480 //@ compile-flags: -C debug-assertions //@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is diff --git a/tests/ui/mir/alignment/misaligned_rhs.rs b/tests/ui/mir/alignment/misaligned_rhs.rs index 55da30a2fd75d..6bdc39c9d9144 100644 --- a/tests/ui/mir/alignment/misaligned_rhs.rs +++ b/tests/ui/mir/alignment/misaligned_rhs.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ ignore-i686-pc-windows-msvc: #112480 //@ compile-flags: -C debug-assertions //@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is diff --git a/tests/ui/mir/alignment/two_pointers.rs b/tests/ui/mir/alignment/two_pointers.rs index 198a1c9853d97..fd8b2f543aa6d 100644 --- a/tests/ui/mir/alignment/two_pointers.rs +++ b/tests/ui/mir/alignment/two_pointers.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ ignore-i686-pc-windows-msvc: #112480 //@ compile-flags: -C debug-assertions //@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is diff --git a/tests/ui/mir/null/borrowed_mut_null.rs b/tests/ui/mir/null/borrowed_mut_null.rs index d26452b9dac29..a4660f4bf5734 100644 --- a/tests/ui/mir/null/borrowed_mut_null.rs +++ b/tests/ui/mir/null/borrowed_mut_null.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -C debug-assertions //@ error-pattern: null pointer dereference occurred diff --git a/tests/ui/mir/null/borrowed_null.rs b/tests/ui/mir/null/borrowed_null.rs index fefac3a7212c9..2a50058a48202 100644 --- a/tests/ui/mir/null/borrowed_null.rs +++ b/tests/ui/mir/null/borrowed_null.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -C debug-assertions //@ error-pattern: null pointer dereference occurred diff --git a/tests/ui/mir/null/borrowed_null_zst.rs b/tests/ui/mir/null/borrowed_null_zst.rs index 835727c068b33..106fa00b1db5a 100644 --- a/tests/ui/mir/null/borrowed_null_zst.rs +++ b/tests/ui/mir/null/borrowed_null_zst.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -C debug-assertions //@ error-pattern: null pointer dereference occurred diff --git a/tests/ui/mir/null/null_lhs.rs b/tests/ui/mir/null/null_lhs.rs index 238d350d1bdaf..b59338588a5ca 100644 --- a/tests/ui/mir/null/null_lhs.rs +++ b/tests/ui/mir/null/null_lhs.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -C debug-assertions //@ error-pattern: null pointer dereference occurred diff --git a/tests/ui/mir/null/null_rhs.rs b/tests/ui/mir/null/null_rhs.rs index 18eafb618698f..18fdad759fd57 100644 --- a/tests/ui/mir/null/null_rhs.rs +++ b/tests/ui/mir/null/null_rhs.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -C debug-assertions //@ error-pattern: null pointer dereference occurred diff --git a/tests/ui/mir/null/two_pointers.rs b/tests/ui/mir/null/two_pointers.rs index 52b9510be12eb..b2aa7cf0384dc 100644 --- a/tests/ui/mir/null/two_pointers.rs +++ b/tests/ui/mir/null/two_pointers.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -C debug-assertions //@ error-pattern: null pointer dereference occurred diff --git a/tests/ui/panics/panic-in-cleanup.rs b/tests/ui/panics/panic-in-cleanup.rs index 8cddeb37348d0..2e307de439390 100644 --- a/tests/ui/panics/panic-in-cleanup.rs +++ b/tests/ui/panics/panic-in-cleanup.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ exec-env:RUST_BACKTRACE=0 //@ check-run-results //@ error-pattern: panic in a destructor during cleanup diff --git a/tests/ui/panics/panic-in-ffi.rs b/tests/ui/panics/panic-in-ffi.rs index 6068e4fdc59be..b926d0fa77619 100644 --- a/tests/ui/panics/panic-in-ffi.rs +++ b/tests/ui/panics/panic-in-ffi.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ exec-env:RUST_BACKTRACE=0 //@ check-run-results //@ error-pattern: panic in a function that cannot unwind diff --git a/tests/ui/panics/panic-in-message-fmt.rs b/tests/ui/panics/panic-in-message-fmt.rs index 1e9bbaf45c54f..4d539f17a0afc 100644 --- a/tests/ui/panics/panic-in-message-fmt.rs +++ b/tests/ui/panics/panic-in-message-fmt.rs @@ -1,6 +1,6 @@ // Checks what happens when formatting the panic message panics. -//@ run-fail +//@ run-crash //@ exec-env:RUST_BACKTRACE=0 //@ check-run-results //@ error-pattern: panicked while processing panic diff --git a/tests/ui/precondition-checks/alignment.rs b/tests/ui/precondition-checks/alignment.rs index 92400528fa07f..038a625bed7e3 100644 --- a/tests/ui/precondition-checks/alignment.rs +++ b/tests/ui/precondition-checks/alignment.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: Alignment::new_unchecked requires diff --git a/tests/ui/precondition-checks/ascii-char-digit_unchecked.rs b/tests/ui/precondition-checks/ascii-char-digit_unchecked.rs index 30c6f79fb08f0..41ba2c5254a4d 100644 --- a/tests/ui/precondition-checks/ascii-char-digit_unchecked.rs +++ b/tests/ui/precondition-checks/ascii-char-digit_unchecked.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: `ascii::Char::digit_unchecked` input cannot exceed 9 diff --git a/tests/ui/precondition-checks/assert_unchecked.rs b/tests/ui/precondition-checks/assert_unchecked.rs index 22b2b41455021..da5383cdea025 100644 --- a/tests/ui/precondition-checks/assert_unchecked.rs +++ b/tests/ui/precondition-checks/assert_unchecked.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: hint::assert_unchecked must never be called when the condition is false diff --git a/tests/ui/precondition-checks/char-from_u32_unchecked.rs b/tests/ui/precondition-checks/char-from_u32_unchecked.rs index d950f20c77208..7c34d926d3e9f 100644 --- a/tests/ui/precondition-checks/char-from_u32_unchecked.rs +++ b/tests/ui/precondition-checks/char-from_u32_unchecked.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: invalid value for `char` diff --git a/tests/ui/precondition-checks/copy-nonoverlapping.rs b/tests/ui/precondition-checks/copy-nonoverlapping.rs index eacaa63e543af..1d584ddef4c28 100644 --- a/tests/ui/precondition-checks/copy-nonoverlapping.rs +++ b/tests/ui/precondition-checks/copy-nonoverlapping.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: ptr::copy_nonoverlapping requires //@ revisions: null_src null_dst misaligned_src misaligned_dst overlapping diff --git a/tests/ui/precondition-checks/copy.rs b/tests/ui/precondition-checks/copy.rs index 1fadd90bf70bd..8faa56a880ead 100644 --- a/tests/ui/precondition-checks/copy.rs +++ b/tests/ui/precondition-checks/copy.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: ptr::copy requires //@ revisions: null_src null_dst misaligned_src misaligned_dst diff --git a/tests/ui/precondition-checks/layout.rs b/tests/ui/precondition-checks/layout.rs index 4ee66cc932886..6755ebce854e4 100644 --- a/tests/ui/precondition-checks/layout.rs +++ b/tests/ui/precondition-checks/layout.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: Layout::from_size_align_unchecked requires //@ revisions: toolarge badalign diff --git a/tests/ui/precondition-checks/nonnull.rs b/tests/ui/precondition-checks/nonnull.rs index 6b8edd4e5825e..75bbd65b4868b 100644 --- a/tests/ui/precondition-checks/nonnull.rs +++ b/tests/ui/precondition-checks/nonnull.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: NonNull::new_unchecked requires diff --git a/tests/ui/precondition-checks/nonzero-from_mut_unchecked.rs b/tests/ui/precondition-checks/nonzero-from_mut_unchecked.rs index 46ce7dc356fe2..d55707fdd0be2 100644 --- a/tests/ui/precondition-checks/nonzero-from_mut_unchecked.rs +++ b/tests/ui/precondition-checks/nonzero-from_mut_unchecked.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: NonZero::from_mut_unchecked requires diff --git a/tests/ui/precondition-checks/nonzero-new_unchecked.rs b/tests/ui/precondition-checks/nonzero-new_unchecked.rs index 7827a42844fd4..978f01f150f08 100644 --- a/tests/ui/precondition-checks/nonzero-new_unchecked.rs +++ b/tests/ui/precondition-checks/nonzero-new_unchecked.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: NonZero::new_unchecked requires diff --git a/tests/ui/precondition-checks/read_volatile.rs b/tests/ui/precondition-checks/read_volatile.rs index ada8932c398ce..fa1c2c827d746 100644 --- a/tests/ui/precondition-checks/read_volatile.rs +++ b/tests/ui/precondition-checks/read_volatile.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: ptr::read_volatile requires //@ revisions: null misaligned diff --git a/tests/ui/precondition-checks/replace.rs b/tests/ui/precondition-checks/replace.rs index 44afbd8174c03..447a00c65723b 100644 --- a/tests/ui/precondition-checks/replace.rs +++ b/tests/ui/precondition-checks/replace.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: ptr::replace requires //@ revisions: null misaligned diff --git a/tests/ui/precondition-checks/slice-from-raw-parts-mut.rs b/tests/ui/precondition-checks/slice-from-raw-parts-mut.rs index 9b9ded69a83b6..b6397ab2a12bc 100644 --- a/tests/ui/precondition-checks/slice-from-raw-parts-mut.rs +++ b/tests/ui/precondition-checks/slice-from-raw-parts-mut.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: slice::from_raw_parts_mut requires //@ revisions: null misaligned toolarge diff --git a/tests/ui/precondition-checks/slice-from-raw-parts.rs b/tests/ui/precondition-checks/slice-from-raw-parts.rs index 96578c1eae58b..a317e3d41a0fa 100644 --- a/tests/ui/precondition-checks/slice-from-raw-parts.rs +++ b/tests/ui/precondition-checks/slice-from-raw-parts.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: slice::from_raw_parts requires //@ revisions: null misaligned toolarge diff --git a/tests/ui/precondition-checks/slice-get_unchecked.rs b/tests/ui/precondition-checks/slice-get_unchecked.rs index 1d8188fb9531a..7bcb8442540a4 100644 --- a/tests/ui/precondition-checks/slice-get_unchecked.rs +++ b/tests/ui/precondition-checks/slice-get_unchecked.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: slice::get_unchecked requires //@ revisions: usize range range_to range_from backwards_range diff --git a/tests/ui/precondition-checks/slice-get_unchecked_mut.rs b/tests/ui/precondition-checks/slice-get_unchecked_mut.rs index 34c1454af438d..2ba3227f39ea8 100644 --- a/tests/ui/precondition-checks/slice-get_unchecked_mut.rs +++ b/tests/ui/precondition-checks/slice-get_unchecked_mut.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: slice::get_unchecked_mut requires //@ revisions: usize range range_to range_from backwards_range diff --git a/tests/ui/precondition-checks/str-get_unchecked.rs b/tests/ui/precondition-checks/str-get_unchecked.rs index 14d17f997ec9b..2273190e9f4c8 100644 --- a/tests/ui/precondition-checks/str-get_unchecked.rs +++ b/tests/ui/precondition-checks/str-get_unchecked.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: str::get_unchecked requires //@ revisions: range range_to range_from backwards_range diff --git a/tests/ui/precondition-checks/str-get_unchecked_mut.rs b/tests/ui/precondition-checks/str-get_unchecked_mut.rs index ca1b169005559..53e6ee64d470c 100644 --- a/tests/ui/precondition-checks/str-get_unchecked_mut.rs +++ b/tests/ui/precondition-checks/str-get_unchecked_mut.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: str::get_unchecked_mut requires //@ revisions: range range_to range_from backwards_range diff --git a/tests/ui/precondition-checks/swap-nonoverlapping.rs b/tests/ui/precondition-checks/swap-nonoverlapping.rs index ea1f6f36ad787..81ba72382c0da 100644 --- a/tests/ui/precondition-checks/swap-nonoverlapping.rs +++ b/tests/ui/precondition-checks/swap-nonoverlapping.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: ptr::swap_nonoverlapping requires //@ revisions: null_src null_dst misaligned_src misaligned_dst overlapping diff --git a/tests/ui/precondition-checks/unchecked_add.rs b/tests/ui/precondition-checks/unchecked_add.rs index f44a6ea32ad8f..b7727aeb9682c 100644 --- a/tests/ui/precondition-checks/unchecked_add.rs +++ b/tests/ui/precondition-checks/unchecked_add.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: u8::unchecked_add cannot overflow diff --git a/tests/ui/precondition-checks/unchecked_mul.rs b/tests/ui/precondition-checks/unchecked_mul.rs index 66655dda136e9..3eea8b66abbac 100644 --- a/tests/ui/precondition-checks/unchecked_mul.rs +++ b/tests/ui/precondition-checks/unchecked_mul.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: u8::unchecked_add cannot overflow diff --git a/tests/ui/precondition-checks/unchecked_shl.rs b/tests/ui/precondition-checks/unchecked_shl.rs index 1c96db0b1ec71..57c617e08455b 100644 --- a/tests/ui/precondition-checks/unchecked_shl.rs +++ b/tests/ui/precondition-checks/unchecked_shl.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: u8::unchecked_shl cannot overflow diff --git a/tests/ui/precondition-checks/unchecked_shr.rs b/tests/ui/precondition-checks/unchecked_shr.rs index 4a6d9ffb1d35b..18502d2b64593 100644 --- a/tests/ui/precondition-checks/unchecked_shr.rs +++ b/tests/ui/precondition-checks/unchecked_shr.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: u8::unchecked_shr cannot overflow diff --git a/tests/ui/precondition-checks/unchecked_sub.rs b/tests/ui/precondition-checks/unchecked_sub.rs index 545dde0e27809..bfe8f5849f592 100644 --- a/tests/ui/precondition-checks/unchecked_sub.rs +++ b/tests/ui/precondition-checks/unchecked_sub.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: u8::unchecked_sub cannot overflow diff --git a/tests/ui/precondition-checks/unreachable_unchecked.rs b/tests/ui/precondition-checks/unreachable_unchecked.rs index 2435450c4b5a1..f2855d03a3e79 100644 --- a/tests/ui/precondition-checks/unreachable_unchecked.rs +++ b/tests/ui/precondition-checks/unreachable_unchecked.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: hint::unreachable_unchecked must never be reached diff --git a/tests/ui/precondition-checks/write_volatile.rs b/tests/ui/precondition-checks/write_volatile.rs index 0d5ecb014b3d9..25107871c39c4 100644 --- a/tests/ui/precondition-checks/write_volatile.rs +++ b/tests/ui/precondition-checks/write_volatile.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: ptr::write_volatile requires //@ revisions: null misaligned diff --git a/tests/ui/std/issue-81357-unsound-file-methods.rs b/tests/ui/std/issue-81357-unsound-file-methods.rs index 838df40c32d72..99bd31aa26084 100644 --- a/tests/ui/std/issue-81357-unsound-file-methods.rs +++ b/tests/ui/std/issue-81357-unsound-file-methods.rs @@ -1,4 +1,4 @@ -//@ run-fail +//@ run-crash //@ only-windows fn main() { From 4b7711520bc1a04b05252e59c4c371aa0bcc6793 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Fri, 27 Jun 2025 09:49:18 +0000 Subject: [PATCH 21/23] Update comments --- compiler/rustc_codegen_ssa/src/back/linker.rs | 10 +++++----- compiler/rustc_middle/src/middle/exported_symbols.rs | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs index 3d8ff3fbf568b..556aa4ed61665 100644 --- a/compiler/rustc_codegen_ssa/src/back/linker.rs +++ b/compiler/rustc_codegen_ssa/src/back/linker.rs @@ -1882,11 +1882,11 @@ pub(crate) fn linked_symbols( // We really only need symbols from upstream rlibs to end up in the linked symbols list. // The rest are in separate object files which the linker will always link in and // doesn't have rules around the order in which they need to appear. - // When doing LTO, some of the symbols in the linked symbols list may end up getting - // internalized, which then prevents referencing them from symbols.o. When doing LTO, - // all object files that get linked in will be local object files rather than pulled in - // from rlibs, so an empty linked symbols list works fine to avoid referencing all those - // internalized symbols from symbols.o. + // When doing LTO, some of the symbols in the linked symbols list happen to be + // internalized by LTO, which then prevents referencing them from symbols.o. When doing + // LTO, all object files that get linked in will be local object files rather than + // pulled in from rlibs, so an empty linked symbols list works fine to avoid referencing + // all those internalized symbols from symbols.o. return Vec::new(); } } diff --git a/compiler/rustc_middle/src/middle/exported_symbols.rs b/compiler/rustc_middle/src/middle/exported_symbols.rs index 491bba98c1946..c70ff398ceafe 100644 --- a/compiler/rustc_middle/src/middle/exported_symbols.rs +++ b/compiler/rustc_middle/src/middle/exported_symbols.rs @@ -31,6 +31,9 @@ pub enum SymbolExportKind { /// The `SymbolExportInfo` of a symbols specifies symbol-related information /// that is relevant to code generation and linking. +/// +/// The difference between `used` and `rustc_std_internal_symbol` is that the +/// former is exported by LTO while the latter isn't. #[derive(Eq, PartialEq, Debug, Copy, Clone, TyEncodable, TyDecodable, HashStable)] pub struct SymbolExportInfo { pub level: SymbolExportLevel, From d0fa0260ca410b5691a03237e7336bb09c135230 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 27 Jun 2025 15:32:53 +0200 Subject: [PATCH 22/23] const checks: avoid 'top-level scope' terminology --- compiler/rustc_const_eval/messages.ftl | 28 ++++------- .../rustc_const_eval/src/check_consts/ops.rs | 13 +---- compiler/rustc_const_eval/src/errors.rs | 13 ++--- tests/ui/consts/const-mut-refs/issue-76510.rs | 2 +- .../consts/const-mut-refs/issue-76510.stderr | 8 +++- .../consts/const-mut-refs/mut_ref_in_final.rs | 12 ++--- .../const-mut-refs/mut_ref_in_final.stderr | 48 ++++++++++++++----- .../const-promoted-opaque.atomic.stderr | 8 +++- tests/ui/consts/const-promoted-opaque.rs | 2 +- .../ui/consts/issue-17718-const-bad-values.rs | 2 +- .../issue-17718-const-bad-values.stderr | 8 +++- tests/ui/consts/issue-17718-const-borrow.rs | 6 +-- .../ui/consts/issue-17718-const-borrow.stderr | 24 +++++++--- tests/ui/consts/partial_qualif.rs | 2 +- tests/ui/consts/partial_qualif.stderr | 8 +++- tests/ui/consts/qualif_overwrite.rs | 2 +- tests/ui/consts/qualif_overwrite.stderr | 8 +++- tests/ui/consts/qualif_overwrite_2.rs | 2 +- tests/ui/consts/qualif_overwrite_2.stderr | 8 +++- tests/ui/consts/refs-to-cell-in-final.rs | 6 +-- tests/ui/consts/refs-to-cell-in-final.stderr | 24 +++++++--- .../ui/consts/write_to_static_via_mut_ref.rs | 2 +- .../consts/write_to_static_via_mut_ref.stderr | 8 +++- tests/ui/error-codes/E0017.rs | 4 +- tests/ui/error-codes/E0017.stderr | 16 +++++-- tests/ui/error-codes/E0492.stderr | 16 +++++-- tests/ui/issues/issue-46604.rs | 2 +- tests/ui/issues/issue-46604.stderr | 8 +++- .../ui/statics/check-immutable-mut-slices.rs | 2 +- .../statics/check-immutable-mut-slices.stderr | 8 +++- 30 files changed, 190 insertions(+), 110 deletions(-) diff --git a/compiler/rustc_const_eval/messages.ftl b/compiler/rustc_const_eval/messages.ftl index 97b154ad14235..94d1d7d388bf1 100644 --- a/compiler/rustc_const_eval/messages.ftl +++ b/compiler/rustc_const_eval/messages.ftl @@ -125,16 +125,11 @@ const_eval_incompatible_types = calling a function with argument of type {$callee_ty} passing data of type {$caller_ty} const_eval_interior_mutable_borrow_escaping = - interior mutable shared borrows of lifetime-extended temporaries in the top-level scope of a {const_eval_const_context} are not allowed - .label = this borrow of an interior mutable value refers to a lifetime-extended temporary - .help = to fix this, the value can be extracted to a separate `static` item and then referenced - .teach_note = - This creates a raw pointer to a temporary that has its lifetime extended to last for the entire program. - Lifetime-extended temporaries in constants and statics must be immutable. - This is to avoid accidentally creating shared mutable state. - - - If you really want global mutable state, try using an interior mutable `static` or a `static mut`. + interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed + .label = this borrow of an interior mutable value refers to such a temporary + .note = Temporaries in constants and statics can have their lifetime extended until the end of the program + .note2 = To avoid accidentally creating global mutable state, such temporaries must be immutable + .help = If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` const_eval_intern_kind = {$kind -> [static] static @@ -215,14 +210,11 @@ const_eval_modified_global = modifying a static's initial value from another static's initializer const_eval_mutable_borrow_escaping = - mutable borrows of lifetime-extended temporaries in the top-level scope of a {const_eval_const_context} are not allowed - .teach_note = - This creates a reference to a temporary that has its lifetime extended to last for the entire program. - Lifetime-extended temporaries in constants and statics must be immutable. - This is to avoid accidentally creating shared mutable state. - - - If you really want global mutable state, try using an interior mutable `static` or a `static mut`. + mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed + .label = this mutable borrow refers to such a temporary + .note = Temporaries in constants and statics can have their lifetime extended until the end of the program + .note2 = To avoid accidentally creating global mutable state, such temporaries must be immutable + .help = If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` const_eval_mutable_ptr_in_final = encountered mutable pointer in final value of {const_eval_intern_kind} diff --git a/compiler/rustc_const_eval/src/check_consts/ops.rs b/compiler/rustc_const_eval/src/check_consts/ops.rs index 02edff8f63294..9c583a35f1bd2 100644 --- a/compiler/rustc_const_eval/src/check_consts/ops.rs +++ b/compiler/rustc_const_eval/src/check_consts/ops.rs @@ -567,12 +567,7 @@ impl<'tcx> NonConstOp<'tcx> for EscapingCellBorrow { DiagImportance::Secondary } fn build_error(&self, ccx: &ConstCx<'_, 'tcx>, span: Span) -> Diag<'tcx> { - ccx.dcx().create_err(errors::InteriorMutableBorrowEscaping { - span, - opt_help: matches!(ccx.const_kind(), hir::ConstContext::Static(_)), - kind: ccx.const_kind(), - teach: ccx.tcx.sess.teach(E0492), - }) + ccx.dcx().create_err(errors::InteriorMutableBorrowEscaping { span, kind: ccx.const_kind() }) } } @@ -594,11 +589,7 @@ impl<'tcx> NonConstOp<'tcx> for EscapingMutBorrow { } fn build_error(&self, ccx: &ConstCx<'_, 'tcx>, span: Span) -> Diag<'tcx> { - ccx.dcx().create_err(errors::MutableBorrowEscaping { - span, - kind: ccx.const_kind(), - teach: ccx.tcx.sess.teach(E0764), - }) + ccx.dcx().create_err(errors::MutableBorrowEscaping { span, kind: ccx.const_kind() }) } } diff --git a/compiler/rustc_const_eval/src/errors.rs b/compiler/rustc_const_eval/src/errors.rs index b2c3103c34af6..14abdd8c98c18 100644 --- a/compiler/rustc_const_eval/src/errors.rs +++ b/compiler/rustc_const_eval/src/errors.rs @@ -151,12 +151,14 @@ pub(crate) struct UnmarkedIntrinsicExposed { #[derive(Diagnostic)] #[diag(const_eval_mutable_borrow_escaping, code = E0764)] +#[note] +#[note(const_eval_note2)] +#[help] pub(crate) struct MutableBorrowEscaping { #[primary_span] + #[label] pub span: Span, pub kind: ConstContext, - #[note(const_eval_teach_note)] - pub teach: bool, } #[derive(Diagnostic)] @@ -217,15 +219,14 @@ pub(crate) struct UnallowedInlineAsm { #[derive(Diagnostic)] #[diag(const_eval_interior_mutable_borrow_escaping, code = E0492)] +#[note] +#[note(const_eval_note2)] +#[help] pub(crate) struct InteriorMutableBorrowEscaping { #[primary_span] #[label] pub span: Span, - #[help] - pub opt_help: bool, pub kind: ConstContext, - #[note(const_eval_teach_note)] - pub teach: bool, } #[derive(LintDiagnostic)] diff --git a/tests/ui/consts/const-mut-refs/issue-76510.rs b/tests/ui/consts/const-mut-refs/issue-76510.rs index 3b248d77a6b9a..a6f7540dd59d6 100644 --- a/tests/ui/consts/const-mut-refs/issue-76510.rs +++ b/tests/ui/consts/const-mut-refs/issue-76510.rs @@ -1,7 +1,7 @@ use std::mem::{transmute, ManuallyDrop}; const S: &'static mut str = &mut " hello "; -//~^ ERROR: mutable borrows of lifetime-extended temporaries +//~^ ERROR: mutable borrows of temporaries const fn trigger() -> [(); unsafe { let s = transmute::<(*const u8, usize), &ManuallyDrop>((S.as_ptr(), 3)); diff --git a/tests/ui/consts/const-mut-refs/issue-76510.stderr b/tests/ui/consts/const-mut-refs/issue-76510.stderr index 6d5dac268e532..3a6c95141e528 100644 --- a/tests/ui/consts/const-mut-refs/issue-76510.stderr +++ b/tests/ui/consts/const-mut-refs/issue-76510.stderr @@ -1,8 +1,12 @@ -error[E0764]: mutable borrows of lifetime-extended temporaries in the top-level scope of a constant are not allowed +error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/issue-76510.rs:3:29 | LL | const S: &'static mut str = &mut " hello "; - | ^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^ this mutable borrow refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` error: aborting due to 1 previous error diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final.rs b/tests/ui/consts/const-mut-refs/mut_ref_in_final.rs index 2af92bd1b9d9d..9f9384adeb710 100644 --- a/tests/ui/consts/const-mut-refs/mut_ref_in_final.rs +++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final.rs @@ -12,13 +12,13 @@ const A: *const i32 = &4; // It could be made sound to allow it to compile, // but we do not want to allow this to compile, // as that would be an enormous footgun in oli-obk's opinion. -const B: *mut i32 = &mut 4; //~ ERROR mutable borrows of lifetime-extended temporaries +const B: *mut i32 = &mut 4; //~ ERROR mutable borrows of temporaries // Ok, no actual mutable allocation exists const B2: Option<&mut i32> = None; // Not ok, can't prove that no mutable allocation ends up in final value -const B3: Option<&mut i32> = Some(&mut 42); //~ ERROR mutable borrows of lifetime-extended temporaries +const B3: Option<&mut i32> = Some(&mut 42); //~ ERROR mutable borrows of temporaries const fn helper(x: &mut i32) -> Option<&mut i32> { Some(x) } const B4: Option<&mut i32> = helper(&mut 42); //~ ERROR temporary value dropped while borrowed @@ -69,13 +69,13 @@ unsafe impl Sync for SyncPtr {} // (This relies on `SyncPtr` being a curly brace struct.) // However, we intern the inner memory as read-only, so this must be rejected. static RAW_MUT_CAST_S: SyncPtr = SyncPtr { x : &mut 42 as *mut _ as *const _ }; -//~^ ERROR mutable borrows of lifetime-extended temporaries +//~^ ERROR mutable borrows of temporaries static RAW_MUT_COERCE_S: SyncPtr = SyncPtr { x: &mut 0 }; -//~^ ERROR mutable borrows of lifetime-extended temporaries +//~^ ERROR mutable borrows of temporaries const RAW_MUT_CAST_C: SyncPtr = SyncPtr { x : &mut 42 as *mut _ as *const _ }; -//~^ ERROR mutable borrows of lifetime-extended temporaries +//~^ ERROR mutable borrows of temporaries const RAW_MUT_COERCE_C: SyncPtr = SyncPtr { x: &mut 0 }; -//~^ ERROR mutable borrows of lifetime-extended temporaries +//~^ ERROR mutable borrows of temporaries fn main() { println!("{}", unsafe { *A }); diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final.stderr b/tests/ui/consts/const-mut-refs/mut_ref_in_final.stderr index a55ccf71bc4e9..16dee44d8006f 100644 --- a/tests/ui/consts/const-mut-refs/mut_ref_in_final.stderr +++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final.stderr @@ -1,14 +1,22 @@ -error[E0764]: mutable borrows of lifetime-extended temporaries in the top-level scope of a constant are not allowed +error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/mut_ref_in_final.rs:15:21 | LL | const B: *mut i32 = &mut 4; - | ^^^^^^ + | ^^^^^^ this mutable borrow refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` -error[E0764]: mutable borrows of lifetime-extended temporaries in the top-level scope of a constant are not allowed +error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/mut_ref_in_final.rs:21:35 | LL | const B3: Option<&mut i32> = Some(&mut 42); - | ^^^^^^^ + | ^^^^^^^ this mutable borrow refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` error[E0716]: temporary value dropped while borrowed --> $DIR/mut_ref_in_final.rs:24:42 @@ -72,29 +80,45 @@ LL | static mut FOO3: NotAMutex<&mut i32> = NotAMutex(UnsafeCell::new(&mut 42)); | | creates a temporary value which is freed while still in use | using this value as a static requires that borrow lasts for `'static` -error[E0764]: mutable borrows of lifetime-extended temporaries in the top-level scope of a static are not allowed +error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/mut_ref_in_final.rs:71:53 | LL | static RAW_MUT_CAST_S: SyncPtr = SyncPtr { x : &mut 42 as *mut _ as *const _ }; - | ^^^^^^^ + | ^^^^^^^ this mutable borrow refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` -error[E0764]: mutable borrows of lifetime-extended temporaries in the top-level scope of a static are not allowed +error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/mut_ref_in_final.rs:73:54 | LL | static RAW_MUT_COERCE_S: SyncPtr = SyncPtr { x: &mut 0 }; - | ^^^^^^ + | ^^^^^^ this mutable borrow refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` -error[E0764]: mutable borrows of lifetime-extended temporaries in the top-level scope of a constant are not allowed +error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/mut_ref_in_final.rs:75:52 | LL | const RAW_MUT_CAST_C: SyncPtr = SyncPtr { x : &mut 42 as *mut _ as *const _ }; - | ^^^^^^^ + | ^^^^^^^ this mutable borrow refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` -error[E0764]: mutable borrows of lifetime-extended temporaries in the top-level scope of a constant are not allowed +error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/mut_ref_in_final.rs:77:53 | LL | const RAW_MUT_COERCE_C: SyncPtr = SyncPtr { x: &mut 0 }; - | ^^^^^^ + | ^^^^^^ this mutable borrow refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` error: aborting due to 12 previous errors diff --git a/tests/ui/consts/const-promoted-opaque.atomic.stderr b/tests/ui/consts/const-promoted-opaque.atomic.stderr index 337bfa4137a9e..64cc7b3a32929 100644 --- a/tests/ui/consts/const-promoted-opaque.atomic.stderr +++ b/tests/ui/consts/const-promoted-opaque.atomic.stderr @@ -7,11 +7,15 @@ LL | LL | }; | - value is dropped here -error[E0492]: interior mutable shared borrows of lifetime-extended temporaries in the top-level scope of a constant are not allowed +error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/const-promoted-opaque.rs:36:19 | LL | const BAZ: &Foo = &FOO; - | ^^^^ this borrow of an interior mutable value refers to a lifetime-extended temporary + | ^^^^ this borrow of an interior mutable value refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` error[E0716]: temporary value dropped while borrowed --> $DIR/const-promoted-opaque.rs:40:26 diff --git a/tests/ui/consts/const-promoted-opaque.rs b/tests/ui/consts/const-promoted-opaque.rs index 9ad2b108ca78a..270dddbb4a2fa 100644 --- a/tests/ui/consts/const-promoted-opaque.rs +++ b/tests/ui/consts/const-promoted-opaque.rs @@ -34,7 +34,7 @@ const BAR: () = { }; const BAZ: &Foo = &FOO; -//[atomic]~^ ERROR: interior mutable shared borrows of lifetime-extended temporaries +//[atomic]~^ ERROR: interior mutable shared borrows of temporaries fn main() { let _: &'static _ = &FOO; diff --git a/tests/ui/consts/issue-17718-const-bad-values.rs b/tests/ui/consts/issue-17718-const-bad-values.rs index ae101927fd4e7..a447350e35bf8 100644 --- a/tests/ui/consts/issue-17718-const-bad-values.rs +++ b/tests/ui/consts/issue-17718-const-bad-values.rs @@ -5,7 +5,7 @@ #![allow(static_mut_refs)] const C1: &'static mut [usize] = &mut []; -//~^ ERROR: mutable borrows of lifetime-extended temporaries +//~^ ERROR: mutable borrows of temporaries static mut S: i32 = 3; const C2: &'static mut i32 = unsafe { &mut S }; diff --git a/tests/ui/consts/issue-17718-const-bad-values.stderr b/tests/ui/consts/issue-17718-const-bad-values.stderr index f0b02bdbc4554..68d1a72b71e62 100644 --- a/tests/ui/consts/issue-17718-const-bad-values.stderr +++ b/tests/ui/consts/issue-17718-const-bad-values.stderr @@ -1,8 +1,12 @@ -error[E0764]: mutable borrows of lifetime-extended temporaries in the top-level scope of a constant are not allowed +error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/issue-17718-const-bad-values.rs:7:34 | LL | const C1: &'static mut [usize] = &mut []; - | ^^^^^^^ + | ^^^^^^^ this mutable borrow refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` error[E0080]: constructing invalid value: encountered mutable reference in `const` value --> $DIR/issue-17718-const-bad-values.rs:11:1 diff --git a/tests/ui/consts/issue-17718-const-borrow.rs b/tests/ui/consts/issue-17718-const-borrow.rs index 541d27965f249..6373333259144 100644 --- a/tests/ui/consts/issue-17718-const-borrow.rs +++ b/tests/ui/consts/issue-17718-const-borrow.rs @@ -2,13 +2,13 @@ use std::cell::UnsafeCell; const A: UnsafeCell = UnsafeCell::new(1); const B: &'static UnsafeCell = &A; -//~^ ERROR: interior mutable shared borrows of lifetime-extended temporaries +//~^ ERROR: interior mutable shared borrows of temporaries struct C { a: UnsafeCell } const D: C = C { a: UnsafeCell::new(1) }; const E: &'static UnsafeCell = &D.a; -//~^ ERROR: interior mutable shared borrows of lifetime-extended temporaries +//~^ ERROR: interior mutable shared borrows of temporaries const F: &'static C = &D; -//~^ ERROR: interior mutable shared borrows of lifetime-extended temporaries +//~^ ERROR: interior mutable shared borrows of temporaries fn main() {} diff --git a/tests/ui/consts/issue-17718-const-borrow.stderr b/tests/ui/consts/issue-17718-const-borrow.stderr index 962a81e70b3e8..420a2c378a256 100644 --- a/tests/ui/consts/issue-17718-const-borrow.stderr +++ b/tests/ui/consts/issue-17718-const-borrow.stderr @@ -1,20 +1,32 @@ -error[E0492]: interior mutable shared borrows of lifetime-extended temporaries in the top-level scope of a constant are not allowed +error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/issue-17718-const-borrow.rs:4:39 | LL | const B: &'static UnsafeCell = &A; - | ^^ this borrow of an interior mutable value refers to a lifetime-extended temporary + | ^^ this borrow of an interior mutable value refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` -error[E0492]: interior mutable shared borrows of lifetime-extended temporaries in the top-level scope of a constant are not allowed +error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/issue-17718-const-borrow.rs:9:39 | LL | const E: &'static UnsafeCell = &D.a; - | ^^^^ this borrow of an interior mutable value refers to a lifetime-extended temporary + | ^^^^ this borrow of an interior mutable value refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` -error[E0492]: interior mutable shared borrows of lifetime-extended temporaries in the top-level scope of a constant are not allowed +error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/issue-17718-const-borrow.rs:11:23 | LL | const F: &'static C = &D; - | ^^ this borrow of an interior mutable value refers to a lifetime-extended temporary + | ^^ this borrow of an interior mutable value refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` error: aborting due to 3 previous errors diff --git a/tests/ui/consts/partial_qualif.rs b/tests/ui/consts/partial_qualif.rs index 6770e138eca0f..18438cc576b19 100644 --- a/tests/ui/consts/partial_qualif.rs +++ b/tests/ui/consts/partial_qualif.rs @@ -3,7 +3,7 @@ use std::cell::Cell; const FOO: &(Cell, bool) = { let mut a = (Cell::new(0), false); a.1 = true; // sets `qualif(a)` to `qualif(a) | qualif(true)` - &{a} //~ ERROR interior mutable shared borrows of lifetime-extended temporaries + &{a} //~ ERROR interior mutable shared borrows of temporaries }; fn main() {} diff --git a/tests/ui/consts/partial_qualif.stderr b/tests/ui/consts/partial_qualif.stderr index eb1a388ddee90..b7632eb868acf 100644 --- a/tests/ui/consts/partial_qualif.stderr +++ b/tests/ui/consts/partial_qualif.stderr @@ -1,8 +1,12 @@ -error[E0492]: interior mutable shared borrows of lifetime-extended temporaries in the top-level scope of a constant are not allowed +error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/partial_qualif.rs:6:5 | LL | &{a} - | ^^^^ this borrow of an interior mutable value refers to a lifetime-extended temporary + | ^^^^ this borrow of an interior mutable value refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` error: aborting due to 1 previous error diff --git a/tests/ui/consts/qualif_overwrite.rs b/tests/ui/consts/qualif_overwrite.rs index 3b494caa2c118..93310b3f2a6af 100644 --- a/tests/ui/consts/qualif_overwrite.rs +++ b/tests/ui/consts/qualif_overwrite.rs @@ -7,7 +7,7 @@ use std::cell::Cell; const FOO: &Option> = { let mut a = Some(Cell::new(0)); a = None; // sets `qualif(a)` to `qualif(a) | qualif(None)` - &{a} //~ ERROR interior mutable shared borrows of lifetime-extended temporaries + &{a} //~ ERROR interior mutable shared borrows of temporaries }; fn main() {} diff --git a/tests/ui/consts/qualif_overwrite.stderr b/tests/ui/consts/qualif_overwrite.stderr index 92430a89b9ed8..4aaaa4b2ca90b 100644 --- a/tests/ui/consts/qualif_overwrite.stderr +++ b/tests/ui/consts/qualif_overwrite.stderr @@ -1,8 +1,12 @@ -error[E0492]: interior mutable shared borrows of lifetime-extended temporaries in the top-level scope of a constant are not allowed +error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/qualif_overwrite.rs:10:5 | LL | &{a} - | ^^^^ this borrow of an interior mutable value refers to a lifetime-extended temporary + | ^^^^ this borrow of an interior mutable value refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` error: aborting due to 1 previous error diff --git a/tests/ui/consts/qualif_overwrite_2.rs b/tests/ui/consts/qualif_overwrite_2.rs index e06fd3225539d..e739790b56662 100644 --- a/tests/ui/consts/qualif_overwrite_2.rs +++ b/tests/ui/consts/qualif_overwrite_2.rs @@ -5,7 +5,7 @@ use std::cell::Cell; const FOO: &Option> = { let mut a = (Some(Cell::new(0)),); a.0 = None; // sets `qualif(a)` to `qualif(a) | qualif(None)` - &{a.0} //~ ERROR interior mutable shared borrows of lifetime-extended temporaries + &{a.0} //~ ERROR interior mutable shared borrows of temporaries }; fn main() {} diff --git a/tests/ui/consts/qualif_overwrite_2.stderr b/tests/ui/consts/qualif_overwrite_2.stderr index a994ab61ea7b3..bc1681418765f 100644 --- a/tests/ui/consts/qualif_overwrite_2.stderr +++ b/tests/ui/consts/qualif_overwrite_2.stderr @@ -1,8 +1,12 @@ -error[E0492]: interior mutable shared borrows of lifetime-extended temporaries in the top-level scope of a constant are not allowed +error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/qualif_overwrite_2.rs:8:5 | LL | &{a.0} - | ^^^^^^ this borrow of an interior mutable value refers to a lifetime-extended temporary + | ^^^^^^ this borrow of an interior mutable value refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` error: aborting due to 1 previous error diff --git a/tests/ui/consts/refs-to-cell-in-final.rs b/tests/ui/consts/refs-to-cell-in-final.rs index 28a26f8690919..2bd0623d94bca 100644 --- a/tests/ui/consts/refs-to-cell-in-final.rs +++ b/tests/ui/consts/refs-to-cell-in-final.rs @@ -11,9 +11,9 @@ unsafe impl Sync for SyncPtr {} // The resulting constant would pass all validation checks, so it is crucial that this gets rejected // by static const checks! static RAW_SYNC_S: SyncPtr> = SyncPtr { x: &Cell::new(42) }; -//~^ ERROR: interior mutable shared borrows of lifetime-extended temporaries +//~^ ERROR: interior mutable shared borrows of temporaries const RAW_SYNC_C: SyncPtr> = SyncPtr { x: &Cell::new(42) }; -//~^ ERROR: interior mutable shared borrows of lifetime-extended temporaries +//~^ ERROR: interior mutable shared borrows of temporaries // This one does not get promoted because of `Drop`, and then enters interesting codepaths because // as a value it has no interior mutability, but as a type it does. See @@ -39,7 +39,7 @@ const NONE_EXPLICIT_PROMOTED: &'static Option> = { // Not okay, since we are borrowing something with interior mutability. const INTERIOR_MUT_VARIANT: &Option> = &{ - //~^ERROR: interior mutable shared borrows of lifetime-extended temporaries + //~^ERROR: interior mutable shared borrows of temporaries let mut x = None; assert!(x.is_none()); x = Some(UnsafeCell::new(false)); diff --git a/tests/ui/consts/refs-to-cell-in-final.stderr b/tests/ui/consts/refs-to-cell-in-final.stderr index 41f7a23852cad..ac866dbe7210c 100644 --- a/tests/ui/consts/refs-to-cell-in-final.stderr +++ b/tests/ui/consts/refs-to-cell-in-final.stderr @@ -1,18 +1,24 @@ -error[E0492]: interior mutable shared borrows of lifetime-extended temporaries in the top-level scope of a static are not allowed +error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/refs-to-cell-in-final.rs:13:54 | LL | static RAW_SYNC_S: SyncPtr> = SyncPtr { x: &Cell::new(42) }; - | ^^^^^^^^^^^^^^ this borrow of an interior mutable value refers to a lifetime-extended temporary + | ^^^^^^^^^^^^^^ this borrow of an interior mutable value refers to such a temporary | - = help: to fix this, the value can be extracted to a separate `static` item and then referenced + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` -error[E0492]: interior mutable shared borrows of lifetime-extended temporaries in the top-level scope of a constant are not allowed +error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/refs-to-cell-in-final.rs:15:53 | LL | const RAW_SYNC_C: SyncPtr> = SyncPtr { x: &Cell::new(42) }; - | ^^^^^^^^^^^^^^ this borrow of an interior mutable value refers to a lifetime-extended temporary + | ^^^^^^^^^^^^^^ this borrow of an interior mutable value refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` -error[E0492]: interior mutable shared borrows of lifetime-extended temporaries in the top-level scope of a constant are not allowed +error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/refs-to-cell-in-final.rs:41:57 | LL | const INTERIOR_MUT_VARIANT: &Option> = &{ @@ -23,7 +29,11 @@ LL | | assert!(x.is_none()); LL | | x = Some(UnsafeCell::new(false)); LL | | x LL | | }; - | |_^ this borrow of an interior mutable value refers to a lifetime-extended temporary + | |_^ this borrow of an interior mutable value refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` error: aborting due to 3 previous errors diff --git a/tests/ui/consts/write_to_static_via_mut_ref.rs b/tests/ui/consts/write_to_static_via_mut_ref.rs index 6d3ddf01a2d21..dc8a7eed13d81 100644 --- a/tests/ui/consts/write_to_static_via_mut_ref.rs +++ b/tests/ui/consts/write_to_static_via_mut_ref.rs @@ -1,4 +1,4 @@ -static OH_NO: &mut i32 = &mut 42; //~ ERROR mutable borrows of lifetime-extended temporaries +static OH_NO: &mut i32 = &mut 42; //~ ERROR mutable borrows of temporaries fn main() { assert_eq!(*OH_NO, 42); *OH_NO = 43; //~ ERROR cannot assign to `*OH_NO`, as `OH_NO` is an immutable static diff --git a/tests/ui/consts/write_to_static_via_mut_ref.stderr b/tests/ui/consts/write_to_static_via_mut_ref.stderr index 76926e6949177..1bcd7b81fe059 100644 --- a/tests/ui/consts/write_to_static_via_mut_ref.stderr +++ b/tests/ui/consts/write_to_static_via_mut_ref.stderr @@ -1,8 +1,12 @@ -error[E0764]: mutable borrows of lifetime-extended temporaries in the top-level scope of a static are not allowed +error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/write_to_static_via_mut_ref.rs:1:26 | LL | static OH_NO: &mut i32 = &mut 42; - | ^^^^^^^ + | ^^^^^^^ this mutable borrow refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` error[E0594]: cannot assign to `*OH_NO`, as `OH_NO` is an immutable static item --> $DIR/write_to_static_via_mut_ref.rs:4:5 diff --git a/tests/ui/error-codes/E0017.rs b/tests/ui/error-codes/E0017.rs index 52b81c8a09d55..0f00ddac579d6 100644 --- a/tests/ui/error-codes/E0017.rs +++ b/tests/ui/error-codes/E0017.rs @@ -5,12 +5,12 @@ static X: i32 = 1; const C: i32 = 2; static mut M: i32 = 3; -const CR: &'static mut i32 = &mut C; //~ ERROR mutable borrows of lifetime-extended temporaries +const CR: &'static mut i32 = &mut C; //~ ERROR mutable borrows of temporaries //~| WARN taking a mutable static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR cannot borrow immutable static item `X` as mutable -static CONST_REF: &'static mut i32 = &mut C; //~ ERROR mutable borrows of lifetime-extended temporaries +static CONST_REF: &'static mut i32 = &mut C; //~ ERROR mutable borrows of temporaries //~| WARN taking a mutable fn main() {} diff --git a/tests/ui/error-codes/E0017.stderr b/tests/ui/error-codes/E0017.stderr index b1a94ca3e9da0..2039e5564701a 100644 --- a/tests/ui/error-codes/E0017.stderr +++ b/tests/ui/error-codes/E0017.stderr @@ -13,11 +13,15 @@ LL | const C: i32 = 2; | ^^^^^^^^^^^^ = note: `#[warn(const_item_mutation)]` on by default -error[E0764]: mutable borrows of lifetime-extended temporaries in the top-level scope of a constant are not allowed +error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/E0017.rs:8:30 | LL | const CR: &'static mut i32 = &mut C; - | ^^^^^^ + | ^^^^^^ this mutable borrow refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` error[E0596]: cannot borrow immutable static item `X` as mutable --> $DIR/E0017.rs:11:39 @@ -39,11 +43,15 @@ note: `const` item defined here LL | const C: i32 = 2; | ^^^^^^^^^^^^ -error[E0764]: mutable borrows of lifetime-extended temporaries in the top-level scope of a static are not allowed +error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/E0017.rs:13:38 | LL | static CONST_REF: &'static mut i32 = &mut C; - | ^^^^^^ + | ^^^^^^ this mutable borrow refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` error: aborting due to 3 previous errors; 2 warnings emitted diff --git a/tests/ui/error-codes/E0492.stderr b/tests/ui/error-codes/E0492.stderr index fbbcf8f7d9285..43a3a872e4e7d 100644 --- a/tests/ui/error-codes/E0492.stderr +++ b/tests/ui/error-codes/E0492.stderr @@ -1,16 +1,22 @@ -error[E0492]: interior mutable shared borrows of lifetime-extended temporaries in the top-level scope of a constant are not allowed +error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/E0492.rs:4:33 | LL | const B: &'static AtomicUsize = &A; - | ^^ this borrow of an interior mutable value refers to a lifetime-extended temporary + | ^^ this borrow of an interior mutable value refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` -error[E0492]: interior mutable shared borrows of lifetime-extended temporaries in the top-level scope of a static are not allowed +error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/E0492.rs:5:34 | LL | static C: &'static AtomicUsize = &A; - | ^^ this borrow of an interior mutable value refers to a lifetime-extended temporary + | ^^ this borrow of an interior mutable value refers to such a temporary | - = help: to fix this, the value can be extracted to a separate `static` item and then referenced + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` error: aborting due to 2 previous errors diff --git a/tests/ui/issues/issue-46604.rs b/tests/ui/issues/issue-46604.rs index 03960941b2e5f..e15f0b52da2f4 100644 --- a/tests/ui/issues/issue-46604.rs +++ b/tests/ui/issues/issue-46604.rs @@ -1,4 +1,4 @@ -static buf: &mut [u8] = &mut [1u8,2,3,4,5,7]; //~ ERROR mutable borrows of lifetime-extended temporaries +static buf: &mut [u8] = &mut [1u8,2,3,4,5,7]; //~ ERROR mutable borrows of temporaries fn write>(buffer: T) { } fn main() { diff --git a/tests/ui/issues/issue-46604.stderr b/tests/ui/issues/issue-46604.stderr index f00f3f0d23fe6..d983674995ed2 100644 --- a/tests/ui/issues/issue-46604.stderr +++ b/tests/ui/issues/issue-46604.stderr @@ -1,8 +1,12 @@ -error[E0764]: mutable borrows of lifetime-extended temporaries in the top-level scope of a static are not allowed +error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/issue-46604.rs:1:25 | LL | static buf: &mut [u8] = &mut [1u8,2,3,4,5,7]; - | ^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^ this mutable borrow refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` error[E0594]: cannot assign to `buf[_]`, as `buf` is an immutable static item --> $DIR/issue-46604.rs:6:5 diff --git a/tests/ui/statics/check-immutable-mut-slices.rs b/tests/ui/statics/check-immutable-mut-slices.rs index 9e5ca5059d6a8..19545a1c92554 100644 --- a/tests/ui/statics/check-immutable-mut-slices.rs +++ b/tests/ui/statics/check-immutable-mut-slices.rs @@ -1,6 +1,6 @@ // Checks that immutable static items can't have mutable slices static TEST: &'static mut [isize] = &mut []; -//~^ ERROR mutable borrows of lifetime-extended temporaries +//~^ ERROR mutable borrows of temporaries pub fn main() { } diff --git a/tests/ui/statics/check-immutable-mut-slices.stderr b/tests/ui/statics/check-immutable-mut-slices.stderr index 3552175565040..a9486fc9d7814 100644 --- a/tests/ui/statics/check-immutable-mut-slices.stderr +++ b/tests/ui/statics/check-immutable-mut-slices.stderr @@ -1,8 +1,12 @@ -error[E0764]: mutable borrows of lifetime-extended temporaries in the top-level scope of a static are not allowed +error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed --> $DIR/check-immutable-mut-slices.rs:3:37 | LL | static TEST: &'static mut [isize] = &mut []; - | ^^^^^^^ + | ^^^^^^^ this mutable borrow refers to such a temporary + | + = note: Temporaries in constants and statics can have their lifetime extended until the end of the program + = note: To avoid accidentally creating global mutable state, such temporaries must be immutable + = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut` error: aborting due to 1 previous error From 5af79242ac1b04f3ab79548f782dacac331a2f67 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 27 Jun 2025 17:02:47 +0200 Subject: [PATCH 23/23] tag_for_variant: properly pass TypingEnv --- compiler/rustc_const_eval/src/const_eval/mod.rs | 13 ++++--------- compiler/rustc_middle/src/query/mod.rs | 2 +- compiler/rustc_transmute/src/layout/tree.rs | 4 +++- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/compiler/rustc_const_eval/src/const_eval/mod.rs b/compiler/rustc_const_eval/src/const_eval/mod.rs index 73cb1e774361d..9e65161f64ab6 100644 --- a/compiler/rustc_const_eval/src/const_eval/mod.rs +++ b/compiler/rustc_const_eval/src/const_eval/mod.rs @@ -67,18 +67,13 @@ pub(crate) fn try_destructure_mir_constant_for_user_output<'tcx>( #[instrument(skip(tcx), level = "debug")] pub fn tag_for_variant_provider<'tcx>( tcx: TyCtxt<'tcx>, - (ty, variant_index): (Ty<'tcx>, VariantIdx), + key: ty::PseudoCanonicalInput<'tcx, (Ty<'tcx>, VariantIdx)>, ) -> Option { + let (ty, variant_index) = key.value; assert!(ty.is_enum()); - // FIXME: This uses an empty `TypingEnv` even though - // it may be used by a generic CTFE. - let ecx = InterpCx::new( - tcx, - ty.default_span(tcx), - ty::TypingEnv::fully_monomorphized(), - crate::const_eval::DummyMachine, - ); + let ecx = + InterpCx::new(tcx, ty.default_span(tcx), key.typing_env, crate::const_eval::DummyMachine); let layout = ecx.layout_of(ty).unwrap(); ecx.tag_for_variant(layout, variant_index).unwrap().map(|(tag, _tag_field)| tag) diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index 3668f4e12f5d9..0f0afc80f3e5d 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -1311,7 +1311,7 @@ rustc_queries! { /// /// This query will panic for uninhabited variants and if the passed type is not an enum. query tag_for_variant( - key: (Ty<'tcx>, abi::VariantIdx) + key: PseudoCanonicalInput<'tcx, (Ty<'tcx>, abi::VariantIdx)>, ) -> Option { desc { "computing variant tag for enum" } } diff --git a/compiler/rustc_transmute/src/layout/tree.rs b/compiler/rustc_transmute/src/layout/tree.rs index 372b4f5353abb..150f5d118e09b 100644 --- a/compiler/rustc_transmute/src/layout/tree.rs +++ b/compiler/rustc_transmute/src/layout/tree.rs @@ -432,7 +432,9 @@ pub(crate) mod rustc { if variant_layout.is_uninhabited() { return Ok(Self::uninhabited()); } - let tag = cx.tcx().tag_for_variant((cx.tcx().erase_regions(ty), index)); + let tag = cx.tcx().tag_for_variant( + cx.typing_env.as_query_input((cx.tcx().erase_regions(ty), index)), + ); let variant_def = Def::Variant(def.variant(index)); Self::from_variant( variant_def,